169 похожих чатов

When it comes to building a bridge for NFTs between

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?

10 ответов

22 просмотра

maybe specify chain at deposit time, as an argument or something

X- Автор вопроса
Drew Diligence (*decentralized only)
maybe specify chain at deposit time, as an argumen...

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?

X
umm... sounds interesting. would u mind elaboratin...

minter should wait confirmations... so no, the mint should not happen before deposit time

X- Автор вопроса
Drew Diligence (*decentralized only)
minter should wait confirmations... so no, the min...

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?

X
sorry, I think I’m missing something here. the min...

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)

X- Автор вопроса
Drew Diligence (*decentralized only)
maybe add a argument to deposit (that is required ...

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)

X- Автор вопроса
Drew Diligence (*decentralized only)
in that example, wheres the real original token 12...

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?

X
Currently, what I have intended is for the NFT to ...

yea thats funky because what would be the real NFT contract address? hmm 🤯

X- Автор вопроса
Drew Diligence (*decentralized only)
yea thats funky because what would be the real NFT...

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?

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
Чёт не понял, я ж правильной функцией воспользовался чтобы вывести отладочную информацию? но что-то она не ловится
notme
18
У меня есть функция где происходит это: write_bit(buffer, 1); write_bit(buffer, 0); write_bit(buffer, 1); write_bit(buffer, 1); write_bit(buffer, 1); w...
~
14
Добрый день! Скажите пожалуйста, а какие программы вы бы рекомендовали написать для того, чтобы научиться управлять памятью? Можно написать динамический массив, можно связный ...
Филипп
7
Недавно Google Project Zero нашёл багу в SQLite с помощью LLM, о чём достаточно было шумно в определённых интернетах, которые сопровождались рассказами, что скоро всех "ибешни...
Alex Sherbakov
5
Ребят в СИ можно реализовать ООП?
Николай
33
https://github.com/erlang/otp/blob/OTP-27.1/lib/kernel/src/logger_h_common.erl#L174 https://github.com/erlang/otp/blob/OTP-27.1/lib/kernel/src/logger_olp.erl#L76 15 лет назад...
Maksim Lapshin
20
Карта сайта