-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
⬆ Bump cosmwasm 2.0.x #605
Conversation
WalkthroughThe changes encompass significant updates to the dependencies and functionality across multiple projects within the CosmWasm ecosystem. Key adjustments include upgrading libraries, streamlining type declarations by removing unnecessary lifetime annotations, and enhancing test clarity through more consistent use of message info. The introduction of a local testing package facilitates better address handling and mock environment setup, contributing to improved testing practices and overall code maintainability. Changes
Sequence Diagram(s)sequenceDiagram
participant A as Contract
participant B as Testing Framework
participant C as Address Module
A->>B: Send transaction request
B->>C: Retrieve address info
C->>B: Return address
B->>A: Execute transaction with address
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
size-limit report 📦
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
|
7d431e2
to
31e0566
Compare
a0a2308
to
061419b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
Cargo.lock
is excluded by!**/*.lock
Files selected for processing (27)
- Cargo.toml (2 hunks)
- Makefile.toml (1 hunks)
- contracts/axone-cognitarium/Cargo.toml (1 hunks)
- contracts/axone-cognitarium/src/contract.rs (23 hunks)
- contracts/axone-cognitarium/src/state/blank_nodes.rs (1 hunks)
- contracts/axone-cognitarium/src/state/namespaces.rs (2 hunks)
- contracts/axone-cognitarium/src/state/store.rs (1 hunks)
- contracts/axone-cognitarium/src/state/triples.rs (1 hunks)
- contracts/axone-cognitarium/tests/e2e/main.rs (3 hunks)
- contracts/axone-dataverse/Cargo.toml (1 hunks)
- contracts/axone-dataverse/src/contract.rs (13 hunks)
- contracts/axone-dataverse/src/registrar/rdf.rs (2 hunks)
- contracts/axone-dataverse/src/state.rs (1 hunks)
- contracts/axone-law-stone/Cargo.toml (1 hunks)
- contracts/axone-law-stone/src/contract.rs (13 hunks)
- contracts/axone-law-stone/src/state.rs (2 hunks)
- contracts/axone-objectarium/Cargo.toml (1 hunks)
- contracts/axone-objectarium/src/contract.rs (62 hunks)
- contracts/axone-objectarium/src/crypto.rs (2 hunks)
- contracts/axone-objectarium/src/state.rs (4 hunks)
- docs/axone-cognitarium.md (1 hunks)
- docs/axone-law-stone.md (1 hunks)
- packages/testing/Cargo.toml (1 hunks)
- packages/testing/Makefile.toml (1 hunks)
- packages/testing/src/addr.rs (1 hunks)
- packages/testing/src/lib.rs (1 hunks)
- packages/testing/src/mock.rs (1 hunks)
Files skipped from review due to trivial changes (10)
- contracts/axone-cognitarium/src/state/blank_nodes.rs
- contracts/axone-cognitarium/src/state/store.rs
- contracts/axone-dataverse/src/state.rs
- contracts/axone-law-stone/src/state.rs
- contracts/axone-objectarium/src/state.rs
- docs/axone-cognitarium.md
- docs/axone-law-stone.md
- packages/testing/Cargo.toml
- packages/testing/src/addr.rs
- packages/testing/src/lib.rs
Additional comments not posted (77)
packages/testing/Makefile.toml (1)
1-1
: File approved.The new task schema is correctly added.
packages/testing/src/mock.rs (1)
1-9
: File approved.The function
mock_env_addr
correctly sets up a mock environment with the contract address.contracts/axone-law-stone/Cargo.toml (1)
37-37
: File approved.The addition of the
testing
workspace dependency is appropriate, and the removal of thebacktraces
feature is noted.contracts/axone-objectarium/Cargo.toml (2)
42-42
: Verify the rationale behind commenting out thebacktraces
feature.Commenting out the
backtraces
feature suggests a change in error handling or debugging strategy. Ensure this aligns with the project's error handling policies and consider documenting the rationale for future reference.
42-42
: LGTM!The addition of
testing.workspace = true
enhances the testing capabilities of the project by ensuring a properly set up testing environment within the workspace context.contracts/axone-dataverse/Cargo.toml (2)
44-44
: Verify the rationale behind removing thebacktraces
feature.The removal of the
backtraces
feature suggests a change in error handling or debugging strategy. Ensure this aligns with the project's error handling policies and consider documenting the rationale for future reference.
44-44
: LGTM!The addition of
testing.workspace = true
enhances the testing capabilities of the project by ensuring a properly set up testing environment within the workspace context.contracts/axone-cognitarium/Cargo.toml (1)
44-44
: LGTM!The addition of
testing.workspace = true
enhances the testing capabilities of the project by ensuring a properly set up testing environment within the workspace context.Cargo.toml (7)
28-28
: Upgradecosmwasm-schema
to version 2.1.1.The dependency
cosmwasm-schema
has been upgraded from1.5.5
to2.1.1
. Ensure that the new version is compatible with the rest of the codebase and that any breaking changes are addressed.
29-29
: Upgradecosmwasm-std
to version 2.1.1 with featurecosmwasm_2_1
.The dependency
cosmwasm-std
has been upgraded from1.5.5
to2.1.1
with a feature change fromcosmwasm_1_2
tocosmwasm_2_1
. Ensure that the new version and feature are compatible with the rest of the codebase and that any breaking changes are addressed.
31-31
: Upgradecw-multi-test
to version 2.1.0.The dependency
cw-multi-test
has been upgraded from0.20.1
to2.1.0
. Ensure that the new version is compatible with the rest of the codebase and that any breaking changes are addressed.
32-32
: Upgradecw-storage-plus
to version 2.0.0.The dependency
cw-storage-plus
has been upgraded from1.2.0
to2.0.0
. Ensure that the new version is compatible with the rest of the codebase and that any breaking changes are addressed.
33-33
: Upgradecw-utils
to version 2.0.0.The dependency
cw-utils
has been upgraded from1.0.3
to2.0.0
. Ensure that the new version is compatible with the rest of the codebase and that any breaking changes are addressed.
34-34
: Upgradecw2
to version 2.0.0.The dependency
cw2
has been upgraded from1.1.1
to2.0.0
. Ensure that the new version is compatible with the rest of the codebase and that any breaking changes are addressed.
44-44
: Add local dependencytesting
.A new dependency
testing
has been added, pointing to a local package. Ensure that the local package exists and is correctly referenced.contracts/axone-objectarium/src/crypto.rs (2)
126-126
: AddKEY_ELEMS
constant toKeyDeserialize
forHash
.The
KEY_ELEMS
constant has been added to theKeyDeserialize
trait implementation forHash
, improving clarity and type safety.
136-136
: AddKEY_ELEMS
constant toKeyDeserialize
for&Hash
.The
KEY_ELEMS
constant has been added to theKeyDeserialize
trait implementation for&Hash
, improving clarity and type safety.contracts/axone-cognitarium/tests/e2e/main.rs (2)
6-6
: Addmessage_info
import.The
message_info
import has been added to support the updated initialization method.
30-30
: Updateinfo
initialization to usemessage_info
.The initialization of the
info
field inSmartContractWorld
has been updated to usemessage_info
with an address derived from theaddr
function, improving the realism of the test setup.contracts/axone-cognitarium/src/state/triples.rs (1)
Line range hint
23-27
:
Simplified return type improves flexibility.The removal of the lifetime parameter
'a
from the return type of thetriples
function simplifies the function signature and potentially allows for more flexible use of theIndexedMap
.contracts/axone-cognitarium/src/state/namespaces.rs (2)
10-10
: Simplified type signature improves clarity.The removal of the lifetime parameter
'_'
from the type signature of theNAMESPACE_KEY_INCREMENT
constant makes the definition cleaner and potentially easier to use.
Line range hint
35-39
:
Simplified return type improves flexibility.The removal of the lifetime parameter
'a
from the return type of thenamespaces
function simplifies the function signature and potentially allows for more flexible use of theIndexedMap
.contracts/axone-dataverse/src/registrar/rdf.rs (2)
271-273
: Improved handling of byte data.The change from
serialization_res.unwrap().0
toserialization_res.unwrap().to_vec()
ensures that the byte data is correctly transformed into a vector before being converted to a UTF-8 string, preventing potential issues related to ownership or borrowing.
304-306
: Improved handling of byte data.The change from
serialization_res.unwrap().0
toserialization_res.unwrap().to_vec()
ensures that the byte data is correctly transformed into a vector before being converted to a UTF-8 string, preventing potential issues related to ownership or borrowing.Makefile.toml (1)
627-627
: Update dependency version.The version of
cosmwasm-check
has been updated from1.5.3
to2.1.1
. Ensure that the new version is compatible with the rest of the codebase and that any breaking changes are addressed.contracts/axone-dataverse/src/contract.rs (12)
34-34
: Improve type safety.Passing
checksum
as a slice usingchecksum.as_slice()
improves type safety and compatibility with the expected parameter type.
150-150
: Enhance clarity in test cases.Replacing
mock_info
withmessage_info
improves the clarity and consistency of address handling in the test cases.
152-152
: Improve type instantiation.Using
Binary::new()
for instantiation is more explicit and improves code readability.
191-192
: Promote better practices.Using
message_info
and constants for addresses reduces the risk of errors due to string mismatches and promotes better code management practices.
226-226
: Promote better practices.Using
message_info
and constants for addresses reduces the risk of errors due to string mismatches and promotes better code management practices.
275-275
: Promote better practices.Using
message_info
and constants for addresses reduces the risk of errors due to string mismatches and promotes better code management practices.
343-346
: Promote better practices.Using
message_info
and constants for addresses reduces the risk of errors due to string mismatches and promotes better code management practices.
408-411
: Promote better practices.Using
message_info
and constants for addresses reduces the risk of errors due to string mismatches and promotes better code management practices.
427-430
: Promote better practices.Using
message_info
and constants for addresses reduces the risk of errors due to string mismatches and promotes better code management practices.
449-452
: Promote better practices.Using
message_info
and constants for addresses reduces the risk of errors due to string mismatches and promotes better code management practices.
471-474
: Promote better practices.Using
message_info
and constants for addresses reduces the risk of errors due to string mismatches and promotes better code management practices.
522-525
: Promote better practices.Using
message_info
and constants for addresses reduces the risk of errors due to string mismatches and promotes better code management practices.contracts/axone-law-stone/src/contract.rs (9)
288-288
: Enhance clarity in test cases.Replacing
mock_info
withmessage_info
improves the clarity and consistency of address handling in the test cases.
300-300
: Streamline object construction.Using a constructor method to initialize
ContractInfoResponse
directly with parameters simplifies the code and enhances maintainability.
698-699
: Expand functionality ofReply
struct.Adding new fields
payload
andgas_used
to theReply
struct allows for more comprehensive handling of contract interactions.
357-357
: Promote better practices.Using constants for
CREATOR
andSENDER
reduces the risk of errors due to string mismatches and promotes better code management practices.
397-397
: Promote better practices.Using constants for
CREATOR
andSENDER
reduces the risk of errors due to string mismatches and promotes better code management practices.
892-892
: Promote better practices.Using constants for
CREATOR
andSENDER
reduces the risk of errors due to string mismatches and promotes better code management practices.
937-946
: Promote better practices.Using constants for
CREATOR
andSENDER
reduces the risk of errors due to string mismatches and promotes better code management practices.
1060-1063
: Promote better practices.Using constants for
CREATOR
andSENDER
reduces the risk of errors due to string mismatches and promotes better code management practices.
1122-1131
: Promote better practices.Using constants for
CREATOR
andSENDER
reduces the risk of errors due to string mismatches and promotes better code management practices.contracts/axone-cognitarium/src/contract.rs (3)
511-511
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
message_info
match the new usage.
455-455
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
message_info
match the new usage.Verification successful
Verified: The usage of
message_info
matches the new pattern throughout the codebase.The instances of
message_info
in the codebase are consistent with the new usage pattern as shown in the provided snippet.
contracts/axone-cognitarium/src/contract.rs
contracts/axone-dataverse/src/contract.rs
contracts/axone-objectarium/src/contract.rs
contracts/axone-law-stone/src/contract.rs
contracts/axone-cognitarium/tests/e2e/main.rs
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `message_info` match the new usage. # Test: Search for the function usage. Expect: Only occurrences of the new usage. rg --type rust -A 5 $'message_info'Length of output: 51210
576-576
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
message_info
match the new usage.contracts/axone-objectarium/src/contract.rs (28)
1938-1941
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.
[
122-122
: LGTM! But verify the function usage in the codebase.The transition from
data.0
todata.to_vec()
enhances flexibility and correctness of data handling.However, ensure that all function calls to
store_object
match the new data handling approach.
446-446
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
All test cases use the new
message_info
approach.The change from
mock_info
tomessage_info
has been consistently applied across the test cases.
- Verified in
contracts/axone-dataverse/src/contract.rs
- Verified in
contracts/axone-objectarium/src/contract.rs
- Verified in
contracts/axone-cognitarium/src/contract.rs
- Verified in
contracts/axone-law-stone/src/contract.rs
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
814-814
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.
1378-1378
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
Verification successful: All test cases use the new
message_info
approach.The transition from
mock_info
tomessage_info
has been consistently applied across the codebase.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
1258-1258
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
Verification successful: All test cases use the new
message_info
approach.The transition from
mock_info
tomessage_info
has been thoroughly implemented across the codebase.
contracts/axone-law-stone/src/contract.rs
contracts/axone-objectarium/src/contract.rs
contracts/axone-cognitarium/src/contract.rs
contracts/axone-dataverse/src/contract.rs
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
130-130
: LGTM! But verify the function usage in the codebase.The transition from
data.0
todata
for compression enhances flexibility and correctness of data handling.However, ensure that all function calls to
store_object
match the new data handling approach.Verification successful
Verification successful.
All instances of the
store_object
function match the new data handling approach usingdata
directly.
contracts/axone-objectarium/src/contract.rs
: All calls and definitions ofstore_object
use thedata
parameter correctly.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `store_object` match the new data handling approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'store_object'Length of output: 15480
Script:
#!/bin/bash # Description: Verify all function calls to `store_object` match the new data handling approach. # Test: Search for the function usage with more context lines. Expect: Only occurrences of the new approach. rg --type rust -A 10 -B 10 $'store_object'Length of output: 36904
453-453
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
Verification Successful: All test cases use the new
message_info
approach.The transition from
mock_info
tomessage_info
has been fully implemented across the codebase, ensuring consistency and clarity in the test cases.
- No instances of
mock_info
were found in the codebase.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
Script:
#!/bin/bash # Description: Verify that there are no remaining instances of the old `mock_info` approach. # Test: Search for the old `mock_info` function usage. Expect: No occurrences of the old approach. rg --type rust -A 5 $'mock_info'Length of output: 31
599-605
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
All test cases have been updated to use the new
message_info
approach.
- No instances of the old
mock_info
function were found in the codebase.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
Script:
#!/bin/bash # Description: Verify that no test cases use the old `mock_info` approach. # Test: Search for any remaining usage of the old `mock_info` function. Expect: No occurrences. rg --type rust -A 5 $'mock_info'Length of output: 31
753-758
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
All test cases have been updated to use
message_info
.The search did not return any instances of
mock_info
, confirming that the update has been consistently applied across the codebase.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
Script:
#!/bin/bash # Description: Verify no test cases use the old `mock_info` approach. # Test: Search for the function usage. Expect: No occurrences of the old approach. rg --type rust -A 5 $'mock_info'Length of output: 31
828-828
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
Verification Successful
All test cases have been updated to use the new
message_info
approach. No instances of the oldmock_info
were found in the codebase.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
Script:
#!/bin/bash # Description: Verify that no test cases use the old `mock_info` approach. # Test: Search for the function usage. Expect: No occurrences of the old approach. rg --type rust -A 5 $'mock_info'Length of output: 31
527-527
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
All test cases use the new
message_info
approach.The verification confirms that
mock_info
has been completely replaced bymessage_info
across the codebase.
- No instances of
mock_info
were found.- Multiple instances of
message_info
were found, confirming its consistent usage.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
Script:
#!/bin/bash # Description: Verify that `mock_info` has been completely replaced by `message_info`. # Test: Search for any remaining occurrences of `mock_info`. Expect: No occurrences. rg --type rust -A 5 $'mock_info'Length of output: 31
778-778
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
All test cases have been successfully updated to use the new
message_info
approach.
- No occurrences of the old
mock_info
function were found in the codebase.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
Script:
#!/bin/bash # Description: Verify that the old `mock_info` function is no longer used in the codebase. # Test: Search for any occurrences of `mock_info`. Expect: No occurrences. rg --type rust -A 5 $'mock_info'Length of output: 31
795-795
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
Verification Successful: All test cases use the new
message_info
approach.
- The transition from
mock_info
tomessage_info
has been completed successfully across the codebase.- No instances of
mock_info
were found.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
Script:
#!/bin/bash # Description: Verify that there are no remaining instances of `mock_info` in the codebase. # Test: Search for the function usage. Expect: No occurrences of the old approach. rg --type rust -A 5 $'mock_info'Length of output: 31
484-484
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
Verification successful: All test cases use the new
message_info
approach.The search for
mock_info
returned no results, indicating that all instances have been replaced withmessage_info
.
- No occurrences of
mock_info
found in the codebase.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
Script:
#!/bin/bash # Description: Verify all test cases have replaced `mock_info` with `message_info`. # Test: Search for any remaining instances of `mock_info`. Expect: No occurrences. rg --type rust $'mock_info'Length of output: 26
1042-1042
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
Verification complete: All test cases use the new
message_info
approach.The search for
mock_info
returned no results, confirming that the transition tomessage_info
has been fully implemented across the codebase.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
Script:
#!/bin/bash # Description: Verify that there are no remaining instances of the old `mock_info` function. # Test: Search for the old function usage. Expect: No occurrences of the old approach. rg --type rust -A 5 $'mock_info'Length of output: 31
1543-1543
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
All test cases use the new
message_info
approach.The transition from
mock_info
tomessage_info
has been fully implemented across the codebase, ensuring clarity and consistency in the test cases.
- No occurrences of
mock_info
were found.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
Script:
#!/bin/bash # Description: Verify that the old `mock_info` function is no longer used in the codebase. # Test: Search for any occurrences of `mock_info`. Expect: No occurrences. rg --type rust -A 5 $'mock_info'Length of output: 31
1768-1768
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
All test cases use the new
message_info
approach.The transition from
mock_info
tomessage_info
has been successfully completed across the codebase.
- No instances of
mock_info
were found.message_info
is used consistently in test cases.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
Script:
#!/bin/bash # Description: Verify that there are no remaining instances of the old `mock_info` function. # Test: Search for the function usage. Expect: No occurrences of the old approach. rg --type rust -A 5 $'mock_info'Length of output: 31
1629-1629
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
All test cases use the new
message_info
approach.The search for
mock_info
returned no results, confirming that all test cases have been updated to use the newmessage_info
approach.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
Script:
#!/bin/bash # Description: Verify that there are no remaining instances of the old `mock_info` function in the codebase. # Test: Search for the old function usage. Expect: No occurrences of the old approach. rg --type rust -A 5 $'mock_info'Length of output: 31
1865-1868
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
Verification successful: All test cases use the new
message_info
approach.The search confirmed that there are no remaining instances of the old
mock_info
function in the codebase. All test cases have been updated to usemessage_info
, ensuring clarity and consistency.
- No occurrences of
mock_info
found.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
Script:
#!/bin/bash # Description: Verify that no test cases use the old `mock_info` approach. # Test: Search for the function usage. Expect: No occurrences of the old approach. rg --type rust -A 5 $'mock_info'Length of output: 31
1588-1588
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
All test cases now use the
message_info
approach.The transition from
mock_info
tomessage_info
has been successfully completed across the codebase.
- No instances of
mock_info
were found.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
Script:
#!/bin/bash # Description: Verify that there are no remaining instances of `mock_info` in the codebase. # Test: Search for the old function usage. Expect: No occurrences of the old approach. rg --type rust -A 5 $'mock_info'Length of output: 31
1834-1837
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
All test cases use the new
message_info
approach.The verification confirms that no instances of the old
mock_info
approach remain in the codebase.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
Script:
#!/bin/bash # Description: Verify that no test cases use the old `mock_info` approach. # Test: Search for the function usage. Expect: No occurrences of the old approach. rg --type rust -A 5 $'mock_info'Length of output: 31
1811-1814
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
Verification successful: All test cases use the new
message_info
approach.
- The search for
mock_info
returned no results, confirming the complete transition tomessage_info
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
Script:
#!/bin/bash # Description: Verify that `mock_info` is no longer in use. # Test: Search for any remaining instances of `mock_info`. Expect: No occurrences of the old approach. rg --type rust $'mock_info'Length of output: 26
1900-1902
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
Verification successful: All test cases use the new
message_info
approach.
- The search results confirmed that
mock_info
has been fully replaced bymessage_info
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
Script:
#!/bin/bash # Description: Verify that `mock_info` has been fully replaced by `message_info` in the codebase. # Search for any occurrences of `mock_info` in the codebase. rg --type rust 'mock_info'Length of output: 26
1675-1675
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
Verification Successful: All test cases use the new
message_info
approach.The codebase has fully transitioned from
mock_info
tomessage_info
, ensuring consistency and clarity in the test cases.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
Script:
#!/bin/bash # Description: Verify that the old `mock_info` function is no longer used in the codebase. # Test: Search for any occurrences of the old `mock_info` function. rg --type rust $'mock_info'Length of output: 26
1128-1128
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
All test cases use the new
message_info
approach.The verification confirms that there are no remaining instances of
mock_info
in the codebase, indicating a successful transition tomessage_info
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
Script:
#!/bin/bash # Description: Verify that no test cases use the old `mock_info` approach. # Test: Search for any occurrences of the old `mock_info` function. rg --type rust -A 5 $'mock_info'Length of output: 31
559-559
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
Verification complete: All test cases use the new
message_info
approach.The search did not return any instances of
mock_info
, confirming that the transition tomessage_info
is complete across the codebase.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
Script:
#!/bin/bash # Description: Verify that no test cases use the old `mock_info` approach. # Test: Search for any occurrences of the old `mock_info` function. rg --type rust -A 5 $'mock_info'Length of output: 31
1788-1791
: LGTM! But verify the function usage in the codebase.The change from
mock_info
tomessage_info
improves clarity and consistency in the test cases.However, ensure that all test cases use the new
message_info
approach.Verification successful
All test cases use the new
message_info
approach, and no instances ofmock_info
were found in the codebase.
- The transition from
mock_info
tomessage_info
is complete.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all test cases use the new `message_info` approach. # Test: Search for the function usage. Expect: Only occurrences of the new approach. rg --type rust -A 5 $'message_info'Length of output: 51210
Script:
#!/bin/bash # Description: Verify that the old `mock_info` function is not used anywhere in the codebase. # Test: Search for any occurrences of `mock_info`. Expect: No occurrences. rg --type rust -A 5 $'mock_info'Length of output: 31
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice thanks 🙏
I noticed the addition of the payload
field when using sub messages to avoid storing temporary context: CosmWasm/cosmwasm#2008
Maybe we could take the opportunity to use it in the law stone instantiation, we can do that in another PR if you prefer
@amimart Yes, I will do the changes but like you say, I prefer to do it in another PR. I merge this one. |
This PR updates CosmWasm to v2.1.1 following the migration guide.
Additionally, a
testing
package has been added to provide common testing utility functions. Since CosmWasm 2.0.0 introduced a new API for mocking info and requires a valid address, this helper library has been created to avoid duplicating utility functions. It includes functions to generate valid addresses in the mocked environment, addressing the issue described in CosmWasm issue #2157.