From 18602869ae7331d60ee8452f3dc5dce43b4d2b6d Mon Sep 17 00:00:00 2001 From: gavin <495054021@qq.com> Date: Wed, 29 May 2024 18:44:34 +0800 Subject: [PATCH] Update testing-gclient.mdx 1.Run a local node in development mode for testing purposes 2.The functions `calculate_upload_gas` and `calculate_handle_gas` take 5 parameters instead of 6 --- docs/developing-contracts/testing-gclient.mdx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/developing-contracts/testing-gclient.mdx b/docs/developing-contracts/testing-gclient.mdx index 8d8f8142d..fbf33471e 100644 --- a/docs/developing-contracts/testing-gclient.mdx +++ b/docs/developing-contracts/testing-gclient.mdx @@ -54,11 +54,13 @@ or **Linux x86-64**: [gear-v1.1.1-x86_64-unknown-linux-gnu.tar.xz](https://get.gear.rs/gear-v1.1.1-x86_64-unknown-linux-gnu.tar.xz) -You can try to run the node: +You can try to run the node, Run a local node in development mode for testing purposes: ``` ❯ ./gear --version gear 1.1.1-33ee05d5aab + +❯ ./gear --dev ``` @@ -171,7 +173,6 @@ async fn test_example() -> Result<()> { vec![], 0, true, - None, ) .await?; @@ -192,7 +193,7 @@ async fn test_example() -> Result<()> { // Calculate gas amount needed for handling the message let gas_info = api - .calculate_handle_gas(None, program_id, payload.clone(), 0, true, None) + .calculate_handle_gas(None, program_id, payload.clone(), 0, true) .await?; // Send the PING message