axelarnetwork / support

Your source for support with the Axelar Network
3 stars 1 forks source link

How do I make the NFTlinker example in the repo both ways across chains? #42

Closed Olanetsoft closed 10 months ago

Olanetsoft commented 10 months ago

i.e. not just from one chain to the other but back again

Olanetsoft commented 10 months ago

The NFTLinker example we provide already supports returning assets from the destination chain to the source chain.

Check out https://github.com/axelarnetwork/axelar-examples/blob/main/examples/evm/nft-linker/NftLinker.sol#L99C25-L102. When we send a token from chain A to B, we lock on chain A and mint on chain B. When you return the asset to chain A, we burn on chain B and unlock on chain A.

I hope you find this useful