-
Notifications
You must be signed in to change notification settings - Fork 49
feat: remove x/authz dependency from precompiles #62
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
Conversation
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.
Looks good to me so far — the authz removal seems to be handled well.
I had one question while reviewing the test code, which I left as a comment.
Also, this is not directly related to the scope of your PR, but I noticed that some of the existing test cases don’t validate balance changes. For example, after a delete
, there’s no assertion checking whether the delegator’s balance was reduced accordingly. Since the precompiled contract involves complex state transitions, I think it would be valuable to add more thorough state validation to ensure the transitions happen as expected.
This can probably be addressed in a separate PR, so just leaving this here for reference. I opened an issue to track it.
* feat(x/erc20): add allowance state * test(x/erc20): add unit test for Allowance * fix(x/erc20): add deleteAllowances method and modify genesis validation * fix(x/erc20): validation of SetAllowance/GetAllowance and InitGenesis * test(x/erc20) add test cases for UnsafeSetAllowance * chore: fix lint
fix owner == sender case
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.
I haven’t gone through everything yet, but from what I’ve seen so far in app.go and the ics20 precompile section, it looks good
I’ll continue the review when I have more time.
applied in dc225a2 |
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.
Lgtm, thanks for the work :)
Description
Removal of x/authz dependency on precompiles
Approve
,Revoke
,IncreaseAllowance
,DecreaseAllowance
,Allowance
) and its usage.Allowance
state CRUD methods in x/erc20 moduleAllowance
state of x/erc20 module instead ofGrant
state of x/authz module for authorization methods (Approve
,Revoke
,IncreaseAllowance
,DecreaseAllowance
,Allowance
)Closes: #47
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
main
branchReviewers Checklist
All items are required.
Please add a note if the item is not applicable
and please add your handle next to the items reviewed
if you only reviewed selected items.
I have...
Unreleased
section inCHANGELOG.md