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 ответов

8 просмотров

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?

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

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

@MrMiscipitlick А можешь макрос написать, который будет вычислять смещение относительно переданных меток? Просто .label1-.label2, и вернуть значение.
КТ315
35
я не магистр хаскеля, но разве не может лейзи тип конвертнуться в не-лейзи запросив вычисление содержимого прям при инициализации?
deadgnom32 λ madao
100
А еще в перле можно уже @arr1 + @arr2?
Sergei Zhmylove
53
Подобного рода ;Следующие три строки это директивы ассемблера, ;которые можно не задавать, т.к.работаем в Visual Studio. ;Символ ";" - это начало однострочного комментария ...
Егор Анелькин
3
Привет всем. появился вопрос. Разрабатываю сайт, в данный момент он запущен. Хостинг beget. Добавляю на сайт яндекс метрику с помощью полей client-settings (взято отсюда http...
Andrew
2
Кто-нибудь знает почему SPM клонирует репо целиком? Некоторые репы просто огромные, как та же swift-syntax которая нужна для использования макросов. Сначала подумал, что это...
iMike
6
Подскажите, где смотреть результат выполнения программы? Код: ;.686 ;Система команд процессора 686 ;.MODEL FLAT,stdcall ;Модель памяти плоская, станда...
Егор Анелькин
5
Привет. Я верно понимаю, что в определении класса Монад m — зафиксирован (к тому же поскольку это моноид в категории эндофункторов). Т.е. используя байнд я не могу перемещать...
Arseny
5
еще вопрос, допустим мы создадим char массив из 10 элементов и присвоим ему через сканф 10 символов. и выведем все символы. Хотел спросить последний элемент /0 будет включать...
Anthem
11
;.686 ;Система команд процессора 686 ;.MODEL FLAT,stdcall ;Модель памяти плоская, стандартный ;вызов процедуры ;option casemap:no...
Егор Анелькин
1
Карта сайта