From 6b81071dd6c38d3ae2c1fb1ac792130d4f89e2de Mon Sep 17 00:00:00 2001 From: 170210 Date: Fri, 21 Jul 2023 15:10:39 +0900 Subject: [PATCH 1/3] chore: write explanatory comments on test functions Signed-off-by: 170210 --- contracts/call-number/src/contract.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/contracts/call-number/src/contract.rs b/contracts/call-number/src/contract.rs index 22387b671..2ef7ff7f1 100644 --- a/contracts/call-number/src/contract.rs +++ b/contracts/call-number/src/contract.rs @@ -241,6 +241,9 @@ fn query_number_dyn(deps: Deps) -> Result { Ok(NumberResponse { value }) } +// This function is used to check if an appropriate error has been occurred in the VM, +// when a caller with read-only permissions attempts to call a callable point with read/write permissions. +// https://github.com/Finschia/cosmwasm/blob/03abb0871ca5cfe8b874561795bc59d12562002f/packages/vm/src/dynamic_link.rs#L333-L336 fn query_add(deps: Deps, by: i32) -> Result { let address: Addr = from_slice( &deps @@ -254,6 +257,9 @@ fn query_add(deps: Deps, by: i32) -> Result { Ok(NumberResponse { value }) } +// This function is used to check if an appropriate error has been occurred in the VM, +// when a caller with read-only permissions attempts to call a callable point with read/write permissions. +// https://github.com/Finschia/cosmwasm/blob/03abb0871ca5cfe8b874561795bc59d12562002f/packages/vm/src/dynamic_link.rs#L333-L336 fn query_sub(deps: Deps, by: i32) -> Result { let address: Addr = from_slice( &deps @@ -267,6 +273,9 @@ fn query_sub(deps: Deps, by: i32) -> Result { Ok(NumberResponse { value }) } +// This function is used to check if an appropriate error has been occurred in the VM, +// when a caller with read-only permissions attempts to call a callable point with read/write permissions. +// https://github.com/Finschia/cosmwasm/blob/03abb0871ca5cfe8b874561795bc59d12562002f/packages/vm/src/dynamic_link.rs#L333-L336 fn query_mul(deps: Deps, by: i32) -> Result { let address: Addr = from_slice( &deps From e312f40d7468f59cbf20bcc6bccd2cb4086e3877 Mon Sep 17 00:00:00 2001 From: 170210 Date: Fri, 21 Jul 2023 15:35:27 +0900 Subject: [PATCH 2/3] style: format Signed-off-by: 170210 --- contracts/call-number/src/contract.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/call-number/src/contract.rs b/contracts/call-number/src/contract.rs index 2ef7ff7f1..b071f8497 100644 --- a/contracts/call-number/src/contract.rs +++ b/contracts/call-number/src/contract.rs @@ -241,7 +241,7 @@ fn query_number_dyn(deps: Deps) -> Result { Ok(NumberResponse { value }) } -// This function is used to check if an appropriate error has been occurred in the VM, +// This function is used to check if an appropriate error has been occurred in the VM, // when a caller with read-only permissions attempts to call a callable point with read/write permissions. // https://github.com/Finschia/cosmwasm/blob/03abb0871ca5cfe8b874561795bc59d12562002f/packages/vm/src/dynamic_link.rs#L333-L336 fn query_add(deps: Deps, by: i32) -> Result { @@ -257,7 +257,7 @@ fn query_add(deps: Deps, by: i32) -> Result { Ok(NumberResponse { value }) } -// This function is used to check if an appropriate error has been occurred in the VM, +// This function is used to check if an appropriate error has been occurred in the VM, // when a caller with read-only permissions attempts to call a callable point with read/write permissions. // https://github.com/Finschia/cosmwasm/blob/03abb0871ca5cfe8b874561795bc59d12562002f/packages/vm/src/dynamic_link.rs#L333-L336 fn query_sub(deps: Deps, by: i32) -> Result { @@ -273,7 +273,7 @@ fn query_sub(deps: Deps, by: i32) -> Result { Ok(NumberResponse { value }) } -// This function is used to check if an appropriate error has been occurred in the VM, +// This function is used to check if an appropriate error has been occurred in the VM, // when a caller with read-only permissions attempts to call a callable point with read/write permissions. // https://github.com/Finschia/cosmwasm/blob/03abb0871ca5cfe8b874561795bc59d12562002f/packages/vm/src/dynamic_link.rs#L333-L336 fn query_mul(deps: Deps, by: i32) -> Result { From 0ee9ddefa1aac956268983eb9041b5befaeae197 Mon Sep 17 00:00:00 2001 From: 170210 Date: Fri, 21 Jul 2023 16:22:43 +0900 Subject: [PATCH 3/3] style: fix for review Signed-off-by: 170210 --- contracts/call-number/src/contract.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/call-number/src/contract.rs b/contracts/call-number/src/contract.rs index b071f8497..b410518d2 100644 --- a/contracts/call-number/src/contract.rs +++ b/contracts/call-number/src/contract.rs @@ -241,7 +241,7 @@ fn query_number_dyn(deps: Deps) -> Result { Ok(NumberResponse { value }) } -// This function is used to check if an appropriate error has been occurred in the VM, +// This function is used to check if an appropriate error has been occurred in the VM // when a caller with read-only permissions attempts to call a callable point with read/write permissions. // https://github.com/Finschia/cosmwasm/blob/03abb0871ca5cfe8b874561795bc59d12562002f/packages/vm/src/dynamic_link.rs#L333-L336 fn query_add(deps: Deps, by: i32) -> Result { @@ -257,7 +257,7 @@ fn query_add(deps: Deps, by: i32) -> Result { Ok(NumberResponse { value }) } -// This function is used to check if an appropriate error has been occurred in the VM, +// This function is used to check if an appropriate error has been occurred in the VM // when a caller with read-only permissions attempts to call a callable point with read/write permissions. // https://github.com/Finschia/cosmwasm/blob/03abb0871ca5cfe8b874561795bc59d12562002f/packages/vm/src/dynamic_link.rs#L333-L336 fn query_sub(deps: Deps, by: i32) -> Result { @@ -273,7 +273,7 @@ fn query_sub(deps: Deps, by: i32) -> Result { Ok(NumberResponse { value }) } -// This function is used to check if an appropriate error has been occurred in the VM, +// This function is used to check if an appropriate error has been occurred in the VM // when a caller with read-only permissions attempts to call a callable point with read/write permissions. // https://github.com/Finschia/cosmwasm/blob/03abb0871ca5cfe8b874561795bc59d12562002f/packages/vm/src/dynamic_link.rs#L333-L336 fn query_mul(deps: Deps, by: i32) -> Result {