-
Notifications
You must be signed in to change notification settings - Fork 26
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
fix: move msg validation to after ADOContract init #641
Conversation
WalkthroughThe changes in this pull request involve an update to the version number of the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🔇 Additional comments (3)contracts/finance/andromeda-vesting/src/contract.rs (3)
The cloning of recipient and denom values before assignment is a good practice to prevent ownership issues.
The cloning of kernel_address and owner values maintains consistency with the defensive programming approach used earlier.
Moving the msg validation after ADOContract initialization correctly resolves the issue where vfs path validation was failing due to unavailable kernel address. Let's verify that no other validation calls exist in the instantiate flow: 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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Motivation
Setting vfs path as recipient during Init in vesting ADO was failing because the validation was fetching kernel address before it became available.
Implementation
Moved message validation to after
ADOContract::default().instantiate
Testing
None
Version Changes
vesting
:3.0.3-beta
->3.0.4-beta
Notes
None
Future work
None
Summary by CodeRabbit
New Features
andromeda-vesting
package to 3.0.4-beta.instantiate
function by cloning fields before assignment.Bug Fixes
instantiate
function.Refactor
execute
,execute_claim
, andexecute_claim_all
functions while ensuring proper error handling and compliance with contract rules.