-
Notifications
You must be signed in to change notification settings - Fork 0
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
refactor: remove lien mechanism support #385
Conversation
The lien feature was implemented by having every account pretend it was a vesting account, where the liened amount would appear unvested. A wrapper was placed around AccountKeeper so every account retrieved from the store would be itself wrapped in a ficticious vesting account implementing this mechanism. But operations against a real vesting account, e.g. clawback, adding a new grant, etc, would have to be routed to the wrapped underlying account. Complicating this, the wrapper code lived in the agoric-sdk repository, and we had to avoid importing that, and circular imports all around. The gist of this commit is that without these account wrappers, simple type casts work and the interface and "action" gymnastics are no longer needed. Actions on a vesting account can simply be ordinary methods.
A context was needed for the lien feature to look up records in the store. This usage has been removed.
The failing lint check is expected. |
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! I only noticed one search-and-replaceo.
|
||
// NewAccountKeeper returns a new AccountKeeper that uses go-amino to | ||
// NewAccountKeeper returns a new AccountKeeperI that uses go-amino to |
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.
// NewAccountKeeper returns a new AccountKeeperI that uses go-amino to | |
// NewAccountKeeper returns a new AccountKeeper that uses go-amino to |
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.
This error is in the cosmos release, so I'm going to err on the side of minimizing our fork footprint. We can fix it in upstream some day.
Description
Closes: Agoric/agoric-sdk#8989
AccountKeeper
into an interface.*Action
interfaces for vesting accounts and simplify the implementations of AddGrant, ReturnGrant, Clawback, etc.Reduces the footprint of our fork.
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...
!
in the type prefix if API or client breaking changeCHANGELOG.md
Reviewers 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...