Demonstrates 3 issues with enums / token burns #1
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.
1 ERC3525.burn.ts
This is actually due to an non standard behaviour that's not hit when using the
HyperCertMinter:burn
logic. This prevents burning tokens by their owner if the owner is not the original minter of the slot ("claim") and all the token's fractions aren't fully merged. On behalf of the underlying ERC3525 standard I'd consider it natural, that token owners might consider burning them (instead of looking for an instance to return their tokens to for free, first). If we're burning an nft with value, the nft is gone and the value is gone, too, effectively lowering the total circulating "value supply" without further notice. That might be what we want but maybe... the value could also be returned to the claim / slot owner during the burning process.2 ERC3525.mint.ts
tokenSupplyInSlot
is part of the enumerable extension and part of the test suite I'm PRing against. However my test case demonstrates that the enumeration functionstokenInSlotByIndex
andtokenSupplyInSlot
fail / yield wrong values when called after an implicit value transfer to an address.3 ERC3525.transfer.ts / HyperCertMinter.split.merge.ts
Both cases demonstrate the same unexpected behaviour on primitive level as well as on client level. The
totalSupply
of tokens doesn't decrease after value merges.