Closed bdeneux closed 3 months ago
The changes streamline the smart contract's handling of instantiation and reply processes in Rust. The removal of the INSTANTIATE_CONTEXT
constant simplifies state management, while direct payload conversion enhances clarity and error handling. Tests have been updated accordingly, ensuring robustness and correctness in the new logic. Overall, these modifications improve the efficiency, clarity, and reliability of the contract's operations.
Files | Change Summary |
---|---|
contracts/axone-law-stone/src/contract.rs |
Simplified instantiation by removing INSTANTIATE_CONTEXT , enhancing response creation and error handling in the reply logic. Tests updated to reflect changes. |
contracts/axone-law-stone/src/state.rs |
Removed declaration of constant INSTANTIATE_CONTEXT , indicating a refactor in instantiation context management. |
sequenceDiagram
participant User
participant Contract
participant Storage
User->>Contract: Instantiate Contract
Contract->>Storage: Store Address
Contract-->>User: Send Submessage
User->>Contract: Reply with Payload
Contract->>Storage: Process Payload
Contract-->>User: Response
🐰 In the garden of code so bright,
A change has brought a new delight.
With clearer paths and errors tamed,
Our smart contract now is famed!
Hops of joy, we celebrate,
A cleaner code, oh, isn’t it great? 🌼
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?
Path | Size |
---|---|
target/wasm32-unknown-unknown/release/axone_objectarium.wasm | 458.07 KB (0%) |
target/wasm32-unknown-unknown/release/axone_law_stone.wasm | 647.92 KB (-0.24% 🔽) |
target/wasm32-unknown-unknown/release/axone_cognitarium.wasm | 831.35 KB (0%) |
target/wasm32-unknown-unknown/release/axone_dataverse.wasm | 670.43 KB (0%) |
All modified and coverable lines are covered by tests :white_check_mark:
Files | Coverage Δ | |
---|---|---|
contracts/axone-law-stone/src/contract.rs | 96.09% <100.00%> (+0.10%) |
:arrow_up: |
contracts/axone-law-stone/src/state.rs | 100.00% <ø> (ø) |
On the
law-stone
contract, replace current instantiation context state by the newpayload
on Reply sub message introduced in cosmwasm v2.0.0, following @amimart suggestionSummary by CodeRabbit
New Features
Bug Fixes
Tests