-
Notifications
You must be signed in to change notification settings - Fork 2
Staking v2 #10
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
base: main
Are you sure you want to change the base?
Staking v2 #10
Conversation
| * Requirements: | ||
| * - `holder` should hold at least the `amount` of tokens with the `id` passed | ||
| */ | ||
| function _burnHeldTokens( |
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 would still just call this a burn function. A burn may affect a token that is currently being held but it also may not. It should just attempt burn flows, check if its being held, if it is, then do more, if not, continue with burn flow.
| using Address for address; | ||
|
|
||
| // Mapping holder => id => balance | ||
| mapping(address => mapping(uint256 => uint256)) private _heldBalances; |
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.
Should we add another mapping for discoverability?
As a user/application I would want an easy way to check who might be a holder of a particular token. This mapping just gives us the balances of a specific holder we might be interested in.
IERC1238Holdable&ERC1238Holdableextension to let ERC1238 tokens be held by another accountIERC1238Holderinterface that should be inherited by smart contract holding tokens