Non fungible tokens from same ERC721 contract uses difference token IDs.
The nftToErc20Info
mapping won't be able to store multiple ERC20Info records for the NFTs from same ERC721 contract.
Add following test case to TokenDividerTest.t.sol
:
For example, token1 and token2 are from same ERC721 contract. After
nftToErc20Info[nftAddress]
will only return the ERC20Info for token2.
After that, token1 is "locked". following functions will fail:claimNft
, transferErcTokens
, sellErc20
and buyErc20
.
nftToErc20Info is the only place recording the NFT token IDs in the TokenDivider contract. Once its overwrite, the only way to found it tracking the chains.
foundry
Refactor the nftToErc20Info
mapping to support different token IDs from same ERC721 contract. And update related code.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.