-
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
Feat/law stone program code #395
Conversation
size-limit report 📦
|
Codecov Report
@@ Coverage Diff @@
## main #395 +/- ##
=======================================
Coverage 97.77% 97.77%
=======================================
Files 42 42
Lines 10116 10163 +47
=======================================
+ Hits 9891 9937 +46
- Misses 225 226 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
WalkthroughThe changes introduce a new query message Changes
TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 0
Files selected for processing (3)
- contracts/okp4-law-stone/src/contract.rs (3 hunks)
- contracts/okp4-law-stone/src/msg.rs (1 hunks)
- docs/okp4-law-stone.md (3 hunks)
Files skipped from review due to trivial changes (1)
- docs/okp4-law-stone.md
Additional comments (Suppressed): 4
contracts/okp4-law-stone/src/msg.rs (1)
- 38-45: The new
ProgramCode
variant has been added to theQueryMsg
enum. This variant is used to request the law program code. Ensure that all calls to this enum throughout the codebase have been updated to include this new variant. Also, verify that the returnedBinary
type is handled correctly in all instances where this variant is used.contracts/okp4-law-stone/src/contract.rs (3)
123-127: The new
QueryMsg::ProgramCode
variant is handled correctly in the match statement. Ensure that all calls to this function throughout the codebase have been updated to match the new variant.143-153: The
program_code
function retrieves the code of a program from the contract's storage using thequerier
. It seems to be implemented correctly, but ensure that theObjectRef
struct andPROGRAM
constant are defined and accessible in this scope.401-443: The
program_code
test verifies the functionality of the newprogram_code
function. It sets up a mock environment, saves a program to the contract's storage, and then queries the program code. The test seems to be implemented correctly, but ensure that all the constants, functions, and structs used in this test are defined and accessible in this scope.
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 😉
Implement #389.
Summary by CodeRabbit
QueryMsg
enum and the introduction of theBinary
struct. This will help users understand the new features and how to use them effectively.