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
enable backwards compat feature: only contracts after migration are charged for ice creation NTRN-135 #334
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
quasisamurai
force-pushed
the
feat/ica-register-fee-update
branch
from
October 25, 2023 07:15
55d5075
to
41fa1a4
Compare
pr0n00gler
reviewed
Oct 26, 2023
pr0n00gler
requested changes
Oct 30, 2023
sotnikov-s
requested changes
Oct 30, 2023
sotnikov-s
reviewed
Oct 30, 2023
sotnikov-s
reviewed
Nov 1, 2023
sotnikov-s
approved these changes
Nov 2, 2023
# Conflicts: # app/upgrades/nextupgrade/upgrades.go
quasisamurai
force-pushed
the
feat/ica-register-fee-update
branch
from
November 3, 2023 15:31
626dd46
to
ce965ee
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TASK
We need changes in ICTX module related to register_fee backwards compatible.
In the upgrade handler of Neutron v1.1.0 we must take the last uploaded code_id of wasm contracts and save it to the storage.
We make register_fee field optional.
When a contract calls RegisterInterchainAccount method, Neutron compares code_id of the calling contract with the saved one:
If it’s less or equal to the saved one - we allow contract to not pay fees for the ICA registration;
if code_id is greater - register_fee is required.
register_fee is optional field in Neutron CW SDK and in the RegisterInterchainAccount message;
last code_id is saved into the storage in the upgrade handler for v1.1.0;
contracts with code_id less or equal then the saved one do not pay fees for ICA registration;
contract with code_id greater then the saved one pay fees for ICA registration;
documentation is updated;
tests are implemented;