Open
Conversation
Closed
0xpApaSmURf
reviewed
Apr 14, 2022
| * Requirements: | ||
| * - `holder` should hold at least the `amount` of tokens with the `id` passed | ||
| */ | ||
| function _burnHeldTokens( |
There was a problem hiding this comment.
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.
0xpApaSmURf
reviewed
Apr 14, 2022
| using Address for address; | ||
|
|
||
| // Mapping holder => id => balance | ||
| mapping(address => mapping(uint256 => uint256)) private _heldBalances; |
There was a problem hiding this comment.
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.
This file contains hidden or 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
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.
IERC1238Holdable&ERC1238Holdableextension to let ERC1238 tokens be held by another accountIERC1238Holderinterface that should be inherited by smart contract holding tokens