-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update vesting contract #28
Conversation
let cfg = CONFIG.load(deps.storage)?; | ||
|
||
// only owner can update config | ||
if info.sender != cfg.owner { |
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.
btw in cosmwasm there is new macro:
ensure_eq!(info.sender, cfg.owner, Error::NotOwner);
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.
At a later point we can update all contracts to use this
contracts/vesting/src/contract.rs
Outdated
}; | ||
|
||
CONFIG.save(deps.storage, &cfg)?; | ||
|
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.
Add set_new_version
@larry0x if you have problem with migration "unsupported optcode" on mars hub downgrade rust-optimizer. |
We want to extend unlocking by 3 months. Currently the contract does not allow changing the unlocking schedule.
This PR adds a method to allow the contract owner to change the config.