Closed joemonem closed 3 months ago
This update simplifies action name handling for rates in the Andromeda contracts by removing the dependency on get_action_name
and directly converting messages to strings. This change aligns with the requirement to use only the message name for rates, similar to permissioning, enhancing code clarity and maintainability.
Files | Change Summary |
---|---|
contracts/data-storage/andromeda-primitive/... ,contracts/fungible-tokens/andromeda-cw20/... ,contracts/non-fungible-tokens/andromeda-auction/... ,contracts/non-fungible-tokens/andromeda-cw721/... ,contracts/non-fungible-tokens/andromeda-marketplace/... |
Version updates; streamlined action handling in handle_execute by removing get_action_name dependency; adjustments to tests for clarity. |
packages/std/src/common/mod.rs |
Removed call_action module from public exports, focusing on core functionalities. |
tests-integration/tests/... |
Adjusted string parameters in various tests to simplify naming conventions without changing logic. |
sequenceDiagram
participant User
participant Auction
participant Rates
User->>Auction: Execute action
Auction->>Rates: Set rates with action name
Rates-->>Auction: Confirm rates set
Auction-->>User: Return result
Objective | Addressed | Explanation |
---|---|---|
Rates action name should not include contract address (Issue #522) | ✅ | |
Simplify rate setting logic | ✅ | |
Ensure consistency in action retrieval for rates | ✅ |
🐇 In fields of code where rabbits play,
Simplified paths lead us on our way.
With names so clear, no need for fuss,
We leap with joy, in code we trust!
New rates set, with hops so spry,
Let's celebrate, oh my, oh my! 🎉
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?
Motivation
Closes #522 and #523
Implementation
Stopped concatenating
CONTRACT_NAME
tomsg.as_ref()
The previousRates
variant was causing errors during deserialization, so I changed its structure in accordance to the rest of the variants. It is nowinstead of
Added an
AllRates
query which returns a vector of (action,Rate) tuplesTesting
Removed contract name from actions.
Rates
andAllRates
query in marketplace integration test.Version Changes
Bumped affected contracts by 0.0.1
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Bug Fixes
Tests