2

I am new to blockchain development, NFT and Solidity and i need your help.

I have fount this twit and this Polygon documentation

Most of the assets are pre-existing on Ethereum chain. But new assets can be created on the Polygon chain as well and moved back to Ethereum chain as and when required.

And now i am trying to realize how to write Solidity smart contract for that task.

As i understand this documentation we need to create smart contract in both networks and use some kind of proxy with grantRole() and then burn the NFT token and network will recreate it on the Ethereum?

In the case of Polygon Mintable tokens, assets are created on Polygon. When a Polygon minted asset has to be moved to Ethereum, the asset has to be burned first and then a proof of this burn transaction has to be submitted on the Ethereum chain

Please help me with Solidity code example how I can transfer the NFT token from Polygon to Ethereum using Polygon proxy address in this case.

2
  • 2
    Just a note: Polygon is not L2, it's a sidechain. The difference is big when you need to transfer assets. With sidechains you need to use some sort of (custodial) bridges. Jan 16, 2022 at 12:34
  • thank you for the comment, i will change the title Jan 16, 2022 at 14:54

1 Answer 1

0

There is no simple way of doing this and it is not inherently supported by either of the chains.

You would need to implement an NFT bridge, which would either lock or burn the asset on one chain and mint or unlock it on the other. In order to achieve this you will need to have some middleware (API) between the chains, which would be taking care of the smart contract interactions.

The problem here is that the bridging party must be trusted by the users (since they are transferring their assets to you in hope of getting the same asset on another chain). So usually bridges are created by the original collection deployers, since only they can deploy a legitimate NFT collection on another chain, that would be bridgeable.

You can read more about bridges here: https://ethereum.org/en/bridges/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.