ETH and a layer2, how can I make sure that a same token ID wouldn’t have a duplication on either side of the chains?
For eg, I could have token ID 123 on ETH chain. But what happens if the minter mints another token with the same ID of 123 on Polygon chain? How do I even determine which is the original token now that both chains have the same token ID?
maybe specify chain at deposit time, as an argument or something
umm... sounds interesting. would u mind elaborating a little? so at deposit time, we are referring to when the user calls deposit() to initiate the bridging of the token from ETH to Polygon, right? So what u mean is to make my deposit function like this deposit(tokenId, chainId) where chainId is the Polygon chain ID? But still, wouldn’t the minter be able to mint the same token ID 123 on Polygon before the deposit happens?
minter should wait confirmations... so no, the mint should not happen before deposit time
sorry, I think I’m missing something here. the minter mints token ID 123 to account 0xabc on ETH. But at the same time, the minter accidentally minted token ID 123 on Polygon too. Now, both chains have token 123. How does making deposit(tokenId, chainId) help at recognising which is the correct token?
maybe add a argument to deposit (that is required to be unique) for each request, and then the minter can sort of check-off these request ids maybe deposit(tokenAddress,tokenId,destinationChainId,userProvidedUniqueId)
umm... But how does modifying the deposit function with an additional unique ID going to help with the duplication of tokens on both chains? Imagine if the minter had minted token 123 to account 0xabc on ETH first and then subsequently minted another token 123 to account 0xdef on the Polygon chain later. Now there are 2 duplicated tokens of the same IDs.
in that example, wheres the real original token 123 ? bridged token should be burned when unbridged (original token stays in bridge contract until unbridge)
Currently, what I have intended is for the NFT to be able to be minted on either the ETH chain or the Polygon chain if the minter wants to save on gas. Would this an issue?
yea thats funky because what would be the real NFT contract address? hmm 🤯
Does that mean there must be a predefined chain that minting can only happen and not on the other chain? But I could see most NFT contracts still has the mint function on both chains. So the minter could still technically mint the same token ID on both chains, couldn't he?
Обсуждают сегодня