# anyCall NFT Bridge

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

### Developments

Projects can develop NFT bridge in flexible implementations based on anyCall. We recommend using the template below which supports ERC712 and ERC1155.&#x20;

**Mechanism**:&#x20;

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**.&#x20;

These two templates are **gateway contracts** which contains `swapin` and `swapout`.

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:

Chain A:&#x20;

**Lock NFT template:**

{% embed url="<https://github.com/anyswap/anyswap-v1-core/blob/master/contracts/anycall_app/ERC721Gateway_LILO.sol>" %}

`Function Swapout`: Locks the specific token id in the gateway contract.

`Function Swapin`: Releases the specific token id from the gateway contract.

Chain B:&#x20;

**Mint/Burn NFT template:**

{% embed url="<https://github.com/anyswap/anyswap-v1-core/blob/master/contracts/anycall_app/ERC721Gateway_MintBurn.sol>" %}

`Function Swapout`: Burns the specific token id

`Function Swapin`: Mints  the specific token id&#x20;

{% hint style="info" %}
The gateway contract needs minting and burning right on Chain B
{% endhint %}

### Deployment examples:

The following is a series of txes to showcase the deployments of such NFT bridge.

| Steps                                                    | Ftm testnet                                                                                                                                                                                                                    | BNB Testnet                                                                                                                                                                                                                              |
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <ol><li>Deploy NFT contracts</li></ol>                   | [ ](https://testnet.ftmscan.com/address/0x89e293BF5d2dA344905f3A5bf6C4E29c82bB27bF#code)<https://testnet.ftmscan.com/address/0x89e293BF5d2dA344905f3A5bf6C4E29c82bB27bF#code> (This NFT contract is normally deployed already) | [**https://testnet.bscscan.com/address/0x13DA0376f4B37038d83cb4571F68BeA3E7bE8f11#code**](https://testnet.bscscan.com/address/0x13DA0376f4B37038d83cb4571F68BeA3E7bE8f11#code) (This is a erc721 that allows mint/burn freshly deployed) |
| 2. Deploy NFT gateway contract (NFT bridge)              | <https://testnet.ftmscan.com/address/0x94c65c68f6BCcE6eE60b3886e567d07b30127732#code>                                                                                                                                          | <https://testnet.bscscan.com/address/0xe001a7bbB0555a4e9A89f4fc9DcF468fC51d9017#code>                                                                                                                                                    |
| 3. Set Peers (Connect the two NFT bridges just deployed) | <https://testnet.ftmscan.com/tx/0xcd7a04c2bf7984eb9d6707db3ee04d11067be934adbc33a07ac1968f1c8d06cf>                                                                                                                            | <https://testnet.bscscan.com/tx/0x303439ee923d61810cdd5ae77f0388b792e818c5c7469c10b212a11305773128>                                                                                                                                      |
| 4. Set Minter                                            | (Not needed if NFTs are locked on the source chain, not minted)                                                                                                                                                                | <https://testnet.bscscan.com/tx/0x5120c3dfbe27f440e3e1921c42f4333bdbbea240019b9473a6a5a73df588b662>                                                                                                                                      |
| 5. Bridge Transaction                                    | [ ](https://testnet.ftmscan.com/tx/0x1373bfb782ac14b445145e8ee55c11043273142bfc7b54b2e0ac663b4d839456)<https://testnet.ftmscan.com/tx/0x1373bfb782ac14b445145e8ee55c11043273142bfc7b54b2e0ac663b4d839456>(Swapout)             | <https://testnet.bscscan.com/tx/0x58463216d7aee6cb8afaeeb9d26206135f7325ed42f014f40374566b4c1b21b5> (Swapin)                                                                                                                             |

{% hint style="info" %}
As this implementation is based on anyCall, reading the following docs on anyCall is recommended.
{% endhint %}

**anyCall addresses and info**:

{% content-ref url="/pages/jGuHlvtDpPmvNSZ2cAeF" %}
[How to integrate anyCall V6?](/developer-guide/anycall-v6/how-to-integrate-anycall-v6.md)
{% endcontent-ref %}

### Listing on our website and activate the bridge:

Please fill out this form: <https://dard6erxu8t.typeform.com/to/C7RwF08A>

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.

### Fee Structure:

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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.multichain.org/developer-guide/anycall-nft-bridge.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
