anyCall NFT bridge
This is based on anyCall V6. This example would be updated to V7 soon.
You can create cross-chain ERC721 and ERC1155 with anyCall permissionlessly. This bridge interface can be hosted on your website or you can apply to host it on our site: https://nft.anyswap.exchange/#/nft
Chains supported: BNB Chain, Polygon, Ethereum, Optimism, Gnosis Chain, Fantom, Moonriver, IoTeX, Arbitrum, Avalanche, Harmony
Projects can develop NFT bridge in flexible implementations based on anyCall. We recommend using the template below which supports ERC712 and ERC1155.
This NFT implementation is based on anyCall which is a permission-less cross-chain message protocol. Normally, NFT projects have issued contracts on Chain A and wish to expand to Chain B.
These two templates are gateway contracts which contains
When users call
Swapout, the contract locks the specific NFT on the source chain and it mints NFT with the same token id on the destination chain.
The mechanism is explained further below:
Lock NFT template:
Function Swapout: Locks the specific token id in the gateway contract.
Function Swapin: Releases the specific token id from the gateway contract.
Mint/Burn NFT template:
Function Swapout: Burns the specific token id
Function Swapin: Mints the specific token id
The gateway contract needs minting and burning right on Chain B
The following is a series of txes to showcase the deployments of such NFT bridge.
https://testnet.ftmscan.com/address/0x89e293BF5d2dA344905f3A5bf6C4E29c82bB27bF#code (This NFT contract is normally deployed already)
https://testnet.bscscan.com/address/0x13DA0376f4B37038d83cb4571F68BeA3E7bE8f11#code (This is a erc721 that allows mint/burn freshly deployed)
2. Deploy NFT gateway contract (NFT bridge)
3. Set Peers (Connect the two NFT bridges just deployed)
4. Set Minter
(Not needed if NFTs are locked on the source chain, not minted)
5. Bridge Transaction
As this implementation is based on anyCall, reading the following docs on anyCall is recommended.
anyCall addresses and info:
You can do this either before or after all deployments are completed. We might be able to help you deploy simple wrappers and standard implementations.
After all needed deployments are completed, your NFT will be listed on our website.
The specific flow is below:
- 1.Fill out the form above for communication and understanding of your project’s bridge requirements.
- 2.Projects deploy bridge contracts or we deploy for you.
- 3.Frontend deployments on our website.
- 4.Live on production.
Bridging to ETH chain would cost $20 in gas token, and bridging to non-ETH chain would cost $1 (gas token). The fee is charged on the source chain. For example, bridging NFT from Fantom to AVAX, $1 worth of FTM will be charged as the bridge fee.
Last modified 5mo ago