Skip to main content

ICS-721 Token Transfer

Welcome to the ICS-721 Token Transfer Feature Documentation on HaloTrade. This document serves as a comprehensive guide for developers and users interested in understanding and implementing the transfer of non-fungible tokens over IBC channels between Aura Network and other chains.

Supported Chains

ICS-721 Token Transfer on HaloTrade currently supports the following chains:

Transfer NFTs from Aura Network to Other Chains

Users must prepare their NFTs before transferring to other chains. This includes:

  • Creating a new NFT: there are many ways to create a new NFT on Aura Network. For example, users can create a new collection and mint a new NFT, or buy NFTs from other users on Seekhype Marketplace,...
  • Wrapping NFT (if nessesary): some NFTs on Aura Network are not compatible with other chains. Users must wrap their NFTs before transferring to other chains. For example, some NFTs on Aura Network have metadata uri in http protocol, which is not supported by Stargaze. Users must wrap their NFTs and change the metadata uri to ipfs protocol before transferring to Stargaze. The source code of the wrapping contract can be found here

After preparing NFTs, users can transfer them to other chains using ArkProtocol's guidelines. We have deployed contracts both on Aura Network mainnet and testnet to support the transfer of NFTs to other chains:

Mainnet:

// From Stargaze to Aura Network
CHAIN_ID="stargaze-1"
CHANNEL="channel-271"
RATE_LIMITER_OUTGOING_PROXY="stars12r3q66jllecd6gegemtlv0dvueqcnnkvkgpqhyp3avpscasgz4fqnn2u2l"

// From Aura Network to Stargaze
CHAIN_ID="xstaxy-1"
CHANNEL="channel-24"
RATE_LIMITER_OUTGOING_PROXY="aura1ezngmms9pzsuep7w4llvnq4wgr7cy8dk066yj6w30lej5gfxm36snnnr2a"

Testnet:

// From Stargaze to Aura Network
CHAIN_ID="elgafar-1"
CHANNEL="channel-707"
RATE_LIMITER_OUTGOING_PROXY="stars1338rc4fn2r3k9z9x783pmtgcwcqmz5phaksurrznnu9dnu4dmctqr2gyzl"

// From Aura Network to Stargaze
CHAIN_ID="euphoria-2"
CHANNEL="channel-99"
RATE_LIMITER_OUTGOING_PROXY="aura1jcn22cxl7th8wn6uk0rdrdm8s2srw3srgl6qt9hd588a8sttdqhsvd2ul3"

To transfer a NFT from Aura to other chain, user must send NFT to the RATE_LIMITER_OUTGOING_PROXY with attached ibc_msg:

let ibc_msg = {
"receiver": RECEIVER_ON_OTHER_CHAIN,
"channel_id": CHANNEL,
"timeout": {
"block": {
"revision": 1,
"height": block_height,
},
"timestamp": null,
},
"memo": null
}

let send_msg = {
"send_nft": {
"contract": RATE_LIMITER_OUTGOING_PROXY_AURA,
"token_id": TOKEN_ID,
"msg": btoa(JSON.stringify(ibc_msg)),
}
}

To get more information about the IBC channels on Aura Network mainnet, please refer to Aura Network IBC Channels

Transfer NFTs from Other Chains to Aura Network

Transfer NFTs from Stargaze

Now, Aura network supports metadata of NFTs in both http and ipfs protocols. Therefore, users can transfer NFTs from Stargaze to Aura Network without wrapping them. To transfer a NFT from Stargaze to Aura Network, user must send NFT to the RATE_LIMITER_OUTGOING_PROXY with attached ibc_msg:

let ibc_msg = {
"receiver": RECEIVER_ON_AURA_NETWORK,
"channel_id": CHANNEL,
"timeout": {
"block": {
"revision": 1,
"height": block_height,
},
"timestamp": null,
},
"memo": null
}

let send_msg = {
"send_nft": {
"contract": RATE_LIMITER_OUTGOING_PROXY_AURA,
"token_id": TOKEN_ID,
"msg": btoa(JSON.stringify(ibc_msg)),
}
}