Bridge support for erc721

Hi guys,

Been reading through the docs and on the buildingonarbitrum/tokenbridging section it was mentioned that essentially any type of token contract. Ive also taken a look at the token-bridges contracts and noticed the ITransferAndCall lib was only supporting erc20 tokens, was wondering if there is support for erc721. I’m currently building a project on arbitrum but want to have the ability to move tokens between chains.

I also tried reddit but the only plausible post i found was this one

this method would work for sure but it would require me to fractionalize the nft, which i don’t really like the idea for doing for my particular usecase.
If someone could point me to a setup similar to the ICustomToken and or IArbToken interfaces but for erc721 that would be much abliged.

Many thanks.

18 Likes

Yes, it is possible to use the Token Bridging feature of Arbitrum to move ERC721 tokens between chains. The ITransferAndCall library that you mentioned only provides support for ERC20 tokens, but you can still use the Token Bridging feature with an ERC721 contract by using the call method of the ERC721 contract to call the required functions on the other side of the bridge.

Here is an example of how you could use the Token Bridging feature to move an ERC721 token between chains:

  1. On the source chain, you would need to deploy an ERC721 token contract and an instance of the Token Bridge contract.
  2. You would then need to create a message that includes the contract address of the ERC721 token contract and the ID of the ERC721 token that you want to move, as well as any other necessary data.
  3. You would then call the submitMessage function of the Token Bridge contract on the source chain, passing in the message that you created in step 2. This will send the message to the destination chain.
  4. On the destination chain, you would need to deploy an instance of the Token Bridge contract and an ERC721 token contract that is identical to the one on the source chain.
  5. When the message is received on the destination chain, the executeMessage function of the Token Bridge contract will be called. This function will parse the message and extract the necessary data, including the contract address of the ERC721 token contract and the ID of the ERC721 token.
  6. The executeMessage function will then call the call method of the ERC721 token contract on the destination chain, passing in the required parameters to transfer the ERC721 token to the desired address on the destination chain.

I hope this helps!

14 Likes

Joooo, thanks alot sir,

I will post my implementation here when iv’e completed it.
Much thanks.

8 Likes

@rasguy92 The response from @mmt is not accurate. There are many subtle differences to consider when bridging NFTs vs ERC20s, but it’s important to understand that you’ll need a custom gateway for ERC721 bridging. You’ll also need to modify the “destination” chain’s contract (you can’t simply deploy the same contract to both layers as the mint/burn functionality is fundamentally different). We are working on providing better examples of this, but in the meantime, please refer to this talk by our own Daniel Goldman, which may set you on the right path:

And the repo referenced:

-ChrisCo, Integration Engineer @ Offchain Labs

11 Likes

thank you for the clarifications, I am very glad that the project does not stop developing for a single day :grinning: :smiley:

7 Likes