# EOSIO <> EOSIO Atomic Assets Non-Fungible Tokens

This guide will essentially map the [`atomictokenpegeosio.spec.js`](https://github.com/liquidapps-io/zeus-sdk/blob/master/boxes/groups/sample/atomictokenpeg/test/atomictokenpegeosio.spec.js) unit test.&#x20;

Resources:

* Block Explorers:
  * <https://kylin.bloks.io/>
  * <https://wax-test.bloks.io/>
  * <https://kylin.eosq.eosnation.io/>
* DSP Portals
  * <https://dsphq.liquidapps.io/>
* Documentation
  * <https://github.com/cryptokylin/CryptoKylin-Testnet>
  * <https://developer.wax.io/dapps/wax-testnet-quickstart/>
  * <https://waxsweden.org/testnet/> - get accounts / tokens
* NFT Standard Atomic Assets
  * <https://github.com/pinknetworkx/atomicassets-contract>

Steps:

* [Install Zeus](https://docs.liquidapps.io/liquidapps-documentation/working-with-zeus-sdk/overview/install-zeus-and-unboxing) if not installed, zeus is used to unbox or install all the necessary dependencies to compile and deploy the necessary contracts.

{% hint style="warning" %}
Ensure you're using node version 12, IPFS can be picky with other versions
{% endhint %}

* [Unbox](https://docs.liquidapps.io/liquidapps-documentation/working-with-zeus-sdk/overview/install-zeus-and-unboxing) `atomictokenpeg` box

```bash
mkdir atomictokenpeg; cd atomictokenpeg
zeus box create
zeus unbox atomictokenpeg
```

* Add LiquidX mapping file

`/zeus_boxes/liquidx/models/eosio-chains/liquidxxtwax.json`

The following file is for the destination chain's information.&#x20;

```bash
# remove existing JSON file to not confuse the compiler
rm -rf ./zeus_boxes/liquidx/models/eosio-chains/
mkdir ./zeus_boxes/liquidx/models/eosio-chains/
touch ./zeus_boxes/liquidx/models/eosio-chains/liquidxxtwax.json
vim ./zeus_boxes/liquidx/models/eosio-chains/liquidxxtwax.json
```

```javascript
{
  "dsp_port": 3117,
  "webhook_dapp_port": 8813,
  "nodeos_host": "testnet.waxsweden.org",
  "nodeos_port": 443,
  "secured": true,
  "nodeos_state_history_port": 8887,
  "nodeos_p2p_port": 12451,
  "nodeos_endpoint": "https://testnet.waxsweden.org",
  "demux_port": 1232,
  "name": "liquidxxtwax",
  "local": false
}
```

`/zeus_boxes/liquidx/models/liquidx-mappings/sidechain_name.dappservices.json`

This file allows for the compiler to insert relevant chain information into the contract header.

```bash
# remove existing JSON
rm -rf ./zeus_boxes/liquidx/models/liquidx-mappings/
mkdir ./zeus_boxes/liquidx/models/liquidx-mappings/
touch ./zeus_boxes/liquidx/models/liquidx-mappings/liquidxxtwax.dappservices.json
vim ./zeus_boxes/liquidx/models/liquidx-mappings/liquidxxtwax.dappservices.json
```

```javascript
{
  "sidechain_name": "liquidxxtwax",
  "mainnet_account": "dappservices",
  "chain_account": "dappservicex"
}
```

* Compile contracts

Update the atomic assets contract account name for each contract&#x20;

```cpp
// atomictokenpegeosio.cpp
const name NFT_ACCOUNT = "bridgeassets"_n;
// atomictokenpegxeosio.cpp
const name NFT_ACCOUNT = "atomicassets"_n;
```

{% hint style="info" %}
If you do not perform the above step before compiling, your bridge will not function because it will not be able to detect incoming transfers.
{% endhint %}

```bash
zeus compile atomictokenpegeosio; zeus compile atomictokenpegxeosio
```

{% hint style="warning" %}
Examine `./contracts/eos/dappservices/dappservices.config.hpp` and you will see the mapping field populate into c++ definitions, if you see `TEST1`, you need to delete the existing mapping files
{% endhint %}

* Create 2 [Kylin](https://docs.liquidapps.io/liquidapps-documentation/eosio-guides/testnet-creation-guides/creating-cryptokylin-account) and 2 [Wax Testnet](https://docs.liquidapps.io/liquidapps-documentation/eosio-guides/testnet-creation-guides/create-wax-testnet-account) Accounts
  * Kylin bridge contract Account (`atomictokenpegeosio.cpp`)
  * Kylin test Account **no contract**
  * Wax Testnet contract Account (`atomictokenpegxeosio.cpp`)
  * Wax Testnet Account **no contract**

{% hint style="info" %}
We'll be using the existing `atomicassets` contracts on Kylin / Wax Testnet, so no need to create them.
{% endhint %}

```bash
export KYLIN_BRIDGE_ACCOUNT=atomicbridg1
export KYLIN_TOKEN_ACCOUNT=bridgeassets
export KYLIN_TEST_ACCOUNT=natdeveloper
export KYLIN_ENDPOINT=https://kylin.eosn.io
export WAX_TEST_BRIDGE_ACCOUNT=atomicbridg1
export WAX_TEST_TOKEN_ACCOUNT=atomicassets
export WAX_TEST_TEST_ACCOUNT=natdeveloper
export WAX_TEST_ENDPOINT=https://testnet.waxsweden.org
```

* Setup `atomictokenpegeosio` on the **Kylin token contract Account** and `atomictokenpegxeosio` on the **Wax Testnet token contract Account** using `zeus migrate`.
* Import private keys

```bash
zeus key import $KYLIN_BRIDGE_ACCOUNT --owner-private-key 5JPPPML... --active-private-key 5KdLRibwg1v... --network=kylin
zeus key import $WAX_TEST_BRIDGE_ACCOUNT --owner-private-key 5KkDxt... --active-private-key 5KkDxtfyKQQ... --network=waxtest
```

* Create contract deployment files located in `./zeus_boxes/contract-migrations-extensions/models/contract-deployments/`

```bash
zeus create contract-deployment atomictokenpegeosio $KYLIN_BRIDGE_ACCOUNT kylin
zeus create contract-deployment atomictokenpegxeosio $WAX_TEST_BRIDGE_ACCOUNT waxtest
```

* Migrate contracts to Kylin/Wax Testnet

{% tabs %}
{% tab title="Zeus Migrate" %}

```bash
zeus migrate atomictokenpegeosio --network=kylin --creator $KYLIN_BRIDGE_ACCOUNT --no-reset --no-compile-all --creator-key=""
zeus migrate atomictokenpegxeosio --network=waxtest --creator $WAX_TEST_BRIDGE_ACCOUNT --no-reset --no-compile-all --creator-key=""
```

{% endtab %}

{% tab title="cleos set contract" %}

```bash
# if migration fails
cd contracts/eos
cleos -u $KYLIN_ENDPOINT set contract $KYLIN_BRIDGE_ACCOUNT atomictokenpegeosio
cleos -u $WAX_TEST_ENDPOINT set contract $WAX_TEST_BRIDGE_ACCOUNT atomictokenpegxeosio
```

{% endtab %}
{% endtabs %}

**Initialize token contracts**

* Create NFTs on Kylin

For Kylin we'll setup the collection and schema then mint an asset to the test contract.  If you have a pre existing NFT, you can send it to the Kylin test account.

On WAX Test we'll also setup the collection/schema, but we'll make the bridge contract a authorized account on the collection so it can mint new NFTs.

{% tabs %}
{% tab title="Kylin" %}

```bash
export AUTHOR=$KYLIN_TEST_ACCOUNT
export COLLECTION_NAME=nftauthcolll # create a different one because this one's taken
export ALLOW_NOTIFY=1
export AUTHORIZED_ACCOUNTS=[$KYLIN_TEST_ACCOUNT] # add additional accounts if necessary
export NOTIFY_ACCOUNTS=[""]
export MARKET_FEE=0.01 # cause we're fair people
export DATA=[]
export SCHEMA_NAME=nftauthschem
export SCHEMA_FORMAT=[ {name: "name", type: "string"}, {name: "series", type: "string"}, {name: "moment", type: "string"}, {name: "description", type: "string"}, {name: "img", type: "image"}, {name: "backimg", type: "string"}, {name: "rarity", type: "string"} ]
# not working, if you know how to make it (passing array as variable) work, please edit!!
# cleos -u $KYLIN_ENDPOINT push action $KYLIN_TOKEN_ACCOUNT createcol "[\"$AUTHOR\",\"$COLLECTION_NAME\",\"$ALLOW_NOTIFY\",\"$AUTHORIZED_ACCOUNTS\",\"$NOTIFY_ACCOUNTS\",\"$MARKET_FEE\",\"$DATA\"]" -p $KYLIN_TEST_ACCOUNT@active

# create collection
cleos -u $KYLIN_ENDPOINT push transaction '{
  "delay_sec": 0,
  "max_cpu_usage_ms": 0,
  "actions": [
    {
      "account": "bridgeassets",
      "name": "createcol",
      "data": {
        "author": "natdeveloper",
        "collection_name": "nftauthcolll",
        "allow_notify": true,
        "authorized_accounts": [
          "natdeveloper"
        ],
        "notify_accounts": [],
        "market_fee": 0.01,
        "data": []
      },
      "authorization": [
        {
          "actor": "natdeveloper",
          "permission": "active"
        }
      ]
    }
  ]
}'

# create schema
cleos -u $KYLIN_ENDPOINT push transaction '{
  "delay_sec": 0,
  "max_cpu_usage_ms": 0,
  "actions": [
    {
      "account": "bridgeassets",
      "name": "createschema",
      "data": {
        "authorized_creator": "natdeveloper",
        "collection_name": "nftauthcolll",
        "schema_name": "nftauthschem",
        "schema_format": [
          {
            "name": "name",
            "type": "string"
          },
          {
            "name": "series",
            "type": "string"
          },
          {
            "name": "moment",
            "type": "string"
          },
          {
            "name": "description",
            "type": "string"
          },
          {
            "name": "img",
            "type": "image"
          },
          {
            "name": "backimg",
            "type": "string"
          },
          {
            "name": "rarity",
            "type": "string"
          }
        ]
      },
      "authorization": [
        {
          "actor": "natdeveloper",
          "permission": "active"
        }
      ]
    }
  ]
}'
```

{% endtab %}

{% tab title="Wax Testnet" %}

```bash
export AUTHOR=$WAX_TEST_TEST_ACCOUNT
export COLLECTION_NAME=nftauthcolll # create a different one because this one's taken
export ALLOW_NOTIFY=1
export AUTHORIZED_ACCOUNTS=[$WAX_TEST_BRIDGE_ACCOUNT] # add additional accounts if necessary
export NOTIFY_ACCOUNTS=[]
export MARKET_FEE=0.01 # cause we're fair people
export DATA=[]
cleos -u $WAX_TEST_ENDPOINT push action $WAX_TEST_TOKEN_ACCOUNT createcol "[\"$AUTHOR\",\"$COLLECTION_NAME\",\"$ALLOW_NOTIFY\",\"$AUTHORIZED_ACCOUNTS\",\"$NOTIFY_ACCOUNTS\",\"$MARKET_FEE\",\"$DATA\"]" -p $WAX_TEST_TEST_ACCOUNT@active

cleos -u $WAX_TEST_ENDPOINT push transaction '{
  "delay_sec": 0,
  "max_cpu_usage_ms": 0,
  "actions": [
    {
      "account": "atomicassets",
      "name": "createcol",
      "data": {
        "author": "natdeveloper",
        "collection_name": "nftauthcolll",
        "allow_notify": true,
        "authorized_accounts": [
          "natdeveloper",
          "atomicbridg1"
        ],
        "notify_accounts": [],
        "market_fee": 0.01,
        "data": []
      },
      "authorization": [
        {
          "actor": "natdeveloper",
          "permission": "active"
        }
      ]
    }
  ]
}'

# create schema
cleos -u $WAX_TEST_ENDPOINT push transaction '{
  "delay_sec": 0,
  "max_cpu_usage_ms": 0,
  "actions": [
    {
      "account": "atomicassets",
      "name": "createschema",
      "data": {
        "authorized_creator": "natdeveloper",
        "collection_name": "nftauthcolll",
        "schema_name": "nftauthschem",
        "schema_format": [
          {
            "name": "name",
            "type": "string"
          },
          {
            "name": "series",
            "type": "string"
          },
          {
            "name": "moment",
            "type": "string"
          },
          {
            "name": "description",
            "type": "string"
          },
          {
            "name": "img",
            "type": "image"
          },
          {
            "name": "backimg",
            "type": "string"
          },
          {
            "name": "rarity",
            "type": "string"
          }
        ]
      },
      "authorization": [
        {
          "actor": "natdeveloper",
          "permission": "active"
        }
      ]
    }
  ]
}'
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
If you get errors such as **Transaction exceeded the current network usage limit imposed on the transaction**, see the [Kylin](https://docs.liquidapps.io/liquidapps-documentation/eosio-guides/testnet-creation-guides/creating-cryptokylin-account) / [Wax Testnet](https://docs.liquidapps.io/liquidapps-documentation/eosio-guides/testnet-creation-guides/create-wax-testnet-account) account setup guides to get more tokens and to stake for more resources.
{% endhint %}

* Mint test tokens

We will mint some test NFT tokens to our test account.&#x20;

{% hint style="warning" %}
Be sure to update the **account name,** the **new asset owner,** the **collection name** and the **actor** signing the transaction.
{% endhint %}

```bash
export AUTHORIZED_MINTER=$KYLIN_TEST_ACCOUNT
export COLLECTION_NAME=$COLLECTION_NAME
export SCHEMA_NAME=$SCHEMA_NAME
export TEMPLATE_ID=-1
export NEW_ASSET_OWNER=$KYLIN_TEST_ACCOUNT
export IMMUTABLE_DATA=[ { "key": "name", "value": [ "string", "The New Silk Road" ] }, { "key": "img", "value": [ "string", "QmSXDsFeNaPa3CJKmn8WKBnA421Zv5r3Ra8n71LZhvEi9s/main/genesis/1.png" ] }, { "key": "backimg", "value": [ "string", "QmSXDsFeNaPa3CJKmn8WKBnA421Zv5r3Ra8n71LZhvEi9s/main/genesis/1_back.jpg" ] }, { "key": "series", "value": [ "string", "Through the Looking Glass" ] }, { "key": "moment", "value": [ "string", "6 - The Silk Road" ] }, { "key": "rarity", "value": [ "string", "genesis" ] }, { "key": "description", "value": [ "string", "Named after an ancient Chinese trade route, the digital silk road is a virtual pathway for the delivery of merchandise." ] } ]
export MUTABLE_DATA=[]
export TOKENS_TO_BACK=[]

cleos -u $KYLIN_ENDPOINT push transaction '{
  "delay_sec": 0,
  "max_cpu_usage_ms": 0,
  "actions": [
    {
      "account": "bridgeassets",
      "name": "mintasset",
      "data": {
        "authorized_minter": "natdeveloper",
        "collection_name": "nftauthcolll",
        "schema_name": "nftauthschem",
        "template_id": -1,
        "new_asset_owner": "natdeveloper",
        "immutable_data": [ { "key": "name", "value": [ "string", "The New Silk Road" ] }, { "key": "img", "value": [ "string", "QmSXDsFeNaPa3CJKmn8WKBnA421Zv5r3Ra8n71LZhvEi9s/main/genesis/1.png" ] }, { "key": "backimg", "value": [ "string", "QmSXDsFeNaPa3CJKmn8WKBnA421Zv5r3Ra8n71LZhvEi9s/main/genesis/1_back.jpg" ] }, { "key": "series", "value": [ "string", "Through the Looking Glass" ] }, { "key": "moment", "value": [ "string", "6 - The Silk Road" ] }, { "key": "rarity", "value": [ "string", "genesis" ] }, { "key": "description", "value": [ "string", "Named after an ancient Chinese trade route, the digital silk road is a virtual pathway for the delivery of merchandise." ] } ],
        "mutable_data": [],
        "tokens_to_back": []
      },
      "authorization": [
        {
          "actor": "natdeveloper",
          "permission": "active"
        }
      ]
    }
  ]
}'
```

* Register mapping

The collection author for an NFT **must register that NFT with the bridge** before users can transfer.

```bash
cleos -u $KYLIN_ENDPOINT push transaction '{
  "delay_sec": 0,
  "max_cpu_usage_ms": 0,
  "actions": [
    {
      "account": "atomicbridg1",
      "name": "regmapping",
      "data": {
        "template_id": -1,
        "schema_name": "nftauthschem",
        "collection_name": "nftauthcolll",
        "immutable_data": [ { "key": "name", "value": [ "string", "The New Silk Road" ] }, { "key": "img", "value": [ "string", "QmSXDsFeNaPa3CJKmn8WKBnA421Zv5r3Ra8n71LZhvEi9s/main/genesis/1.png" ] }, { "key": "backimg", "value": [ "string", "QmSXDsFeNaPa3CJKmn8WKBnA421Zv5r3Ra8n71LZhvEi9s/main/genesis/1_back.jpg" ] }, { "key": "series", "value": [ "string", "Through the Looking Glass" ] }, { "key": "moment", "value": [ "string", "6 - The Silk Road" ] }, { "key": "rarity", "value": [ "string", "genesis" ] }, { "key": "description", "value": [ "string", "Named after an ancient Chinese trade route, the digital silk road is a virtual pathway for the delivery of merchandise." ] } ],
      },
      "authorization": [
        {
          "actor": "natdeveloper",
          "permission": "active"
        }
      ]
    }
  ]
}'
```

Now that we've prepared that part let's move onto staking DAPP for services. First stop is the faucet for some DAPP tokens [here](https://kylin-dapp-faucet.liquidapps.io/). Use the account that has the `atomictokenpegeosio` contract set to it (`$KYLIN_BRIDGE_ACCOUNT`).

* Stake to required services vRAM, LiquidHarmony Oracles, and LiquidScheduler

Below we'll select each package then stake for it.

{% tabs %}
{% tab title="vRAM" %}

```bash
export PROVIDER=uuddlrlrbass
export PACKAGE=ipfs2
export SERVICE=ipfsservice1
export QUANTITY="10.0000 DAPP"
cleos -u $KYLIN_ENDPOINT push action dappservices selectpkg "[\"$KYLIN_BRIDGE_ACCOUNT\",\"$PROVIDER\",\"$SERVICE\",\"$PACKAGE\"]" -p $KYLIN_BRIDGE_ACCOUNT@active
cleos -u $KYLIN_ENDPOINT push action dappservices stake "[\"$KYLIN_BRIDGE_ACCOUNT\",\"$PROVIDER\",\"$SERVICE\",\"$QUANTITY\"]" -p $KYLIN_BRIDGE_ACCOUNT@active
```

{% endtab %}

{% tab title="LiquidHarmony" %}

```bash
export PROVIDER=uuddlrlrbass
export PACKAGE=oracleservi2
export SERVICE=oracleservic
export QUANTITY="10.0000 DAPP"
cleos -u $KYLIN_ENDPOINT push action dappservices selectpkg "[\"$KYLIN_BRIDGE_ACCOUNT\",\"$PROVIDER\",\"$SERVICE\",\"$PACKAGE\"]" -p $KYLIN_BRIDGE_ACCOUNT@active
cleos -u $KYLIN_ENDPOINT push action dappservices stake "[\"$KYLIN_BRIDGE_ACCOUNT\",\"$PROVIDER\",\"$SERVICE\",\"$QUANTITY\"]" -p $KYLIN_BRIDGE_ACCOUNT@active
```

{% endtab %}

{% tab title="LiquidScheduler" %}

```bash
export PROVIDER=uuddlrlrbass
export PACKAGE=cronservice2
export SERVICE=cronservices
export QUANTITY="10.0000 DAPP"
cleos -u $KYLIN_ENDPOINT push action dappservices selectpkg "[\"$KYLIN_BRIDGE_ACCOUNT\",\"$PROVIDER\",\"$SERVICE\",\"$PACKAGE\"]" -p $KYLIN_BRIDGE_ACCOUNT@active
cleos -u $KYLIN_ENDPOINT push action dappservices stake "[\"$KYLIN_BRIDGE_ACCOUNT\",\"$PROVIDER\",\"$SERVICE\",\"$QUANTITY\"]" -p $KYLIN_BRIDGE_ACCOUNT@active
```

{% endtab %}
{% endtabs %}

* LiquidX stake

In order to stake for services on WAX Testnet, a LiquidX mapping must be created, for more detail see [here](https://docs.liquidapps.io/liquidapps-documentation/liquidx-stake-across-chains/getting-started-with-liquidx/use-dapp-network-services).

{% tabs %}
{% tab title="Kylin" %}

```bash
export OWNER=$KYLIN_BRIDGE_ACCOUNT
export CHAIN_ACCOUNT=$WAX_TEST_BRIDGE_ACCOUNT
export CHAIN_NAME=liquidxxtwax
cleos -u $KYLIN_ENDPOINT push action liquidxxxxxx addaccount "[\"$OWNER\",\"$CHAIN_ACCOUNT\",\"$CHAIN_NAME\"]" -p $KYLIN_BRIDGE_ACCOUNT@active
```

{% endtab %}

{% tab title="WAX Testnet setlink" %}

```bash
export OWNER=$WAX_TEST_BRIDGE_ACCOUNT
export MAINNET_OWNER=$KYLIN_BRIDGE_ACCOUNT
cleos -u $WAX_TEST_ENDPOINT push action dappservicex setlink "[\"$OWNER\",\"$MAINNET_OWNER\"]" -p $WAX_TEST_BRIDGE_ACCOUNT@active
```

{% endtab %}

{% tab title="WAX Testnet add dsp" %}

```bash
export OWNER=$WAX_TEST_BRIDGE_ACCOUNT
export DSP=$PROVIDER
cleos -u $WAX_TEST_ENDPOINT push action dappservicex adddsp "[\"$OWNER\",\"$DSP\"]" -p $WAX_TEST_BRIDGE_ACCOUNT@active
```

{% endtab %}
{% endtabs %}

* Initialize

Here we will initialize both bridges with their settings.  On Kylin we will not allow issuance because the token already exists.  On WAX Testnet we allow the bridge contract to mint/burn.  We set the minimum transfer to 1 TKN.

{% tabs %}
{% tab title="Kylin" %}

```bash
export SISTER_CODE=$WAX_TEST_BRIDGE_ACCOUNT
export SISTER_CHAIN_NAME="waxtest"
export THIS_CHAIN_NAME="kylin"
export PROCESSING_ENABLED=1
export TOKEN_CONRACT=$KYLIN_TOKEN_ACCOUNT
export TRANSFERS_ENABLED=1
export CAN_ISSUE=0
export KYLIN_DSP_ENDPOINT=http://kylin-dsp-2.liquidapps.io
cleos -u $KYLIN_ENDPOINT push action $KYLIN_BRIDGE_ACCOUNT init "[\"$SISTER_CODE\",\"$SISTER_CHAIN_NAME\",\"$THIS_CHAIN_NAME\",\"$PROCESSING_ENABLED\",\"$TOKEN_CONRACT\",\"$TRANSFERS_ENABLED\",\"$CAN_ISSUE\"]" -p $KYLIN_BRIDGE_ACCOUNT@active
```

{% endtab %}

{% tab title="WAX Testnet" %}

```bash
export SISTER_CODE=$KYLIN_BRIDGE_ACCOUNT
export SISTER_CHAIN_NAME="kylin"
export THIS_CHAIN_NAME="waxtest"
export PROCESSING_ENABLED=1
export TOKEN_CONRACT=$WAX_TEST_TOKEN_ACCOUNT
export TRANSFERS_ENABLED=1
export CAN_ISSUE=1
cleos -u $WAX_TEST_ENDPOINT push action $WAX_TEST_BRIDGE_ACCOUNT init "[\"$SISTER_CODE\",\"$SISTER_CHAIN_NAME\",\"$THIS_CHAIN_NAME\",\"$PROCESSING_ENABLED\",\"$TOKEN_CONRACT\",\"$TRANSFERS_ENABLED\",\"$CAN_ISSUE\"]" -p $WAX_TEST_BRIDGE_ACCOUNT@active
```

{% endtab %}
{% endtabs %}

* Transfer

Now we will test with a transfer from the Kylin example user to the Kylin bridge contract, let's see how it goes!!

{% tabs %}
{% tab title="Kylin" %}

```bash
export FROM=$KYLIN_TEST_ACCOUNT
export TO=$KYLIN_BRIDGE_ACCOUNT
export ASSET_ID=1099511627776
# destionation_account,destination_chain
# this is required as the memo type, it tells the bridge which chain the funds go to and who gets them
export MEMO="$WAX_TEST_TEST_ACCOUNT,$CHAIN_NAME"
cleos -u $KYLIN_ENDPOINT push action $KYLIN_TOKEN_ACCOUNT transfer "[\"$FROM\",\"$TO\",[\"$ASSET_ID\"],\"$MEMO\"]" -p $KYLIN_TEST_ACCOUNT@active
```

{% endtab %}
{% endtabs %}

* Confirm

If all goes well you will see the tokens arrive at your WAX Testnet destination account, you can send them back to the bridge contract now to send them back!&#x20;

{% tabs %}
{% tab title="WAX Testnet" %}

```bash
export FROM=$WAX_TEST_TEST_ACCOUNT
export TO=$WAX_TEST_BRIDGE_ACCOUNT
export ASSET_ID=1099511627776
# destionation_account,destination_chain
# this is required as the memo type, it tells the bridge which chain the funds go to and who gets them
export MEMO="$KYLIN_TEST_ACCOUNT,kylin"
cleos -u $WAX_TEST_ENDPOINT push action $WAX_TEST_TOKEN_ACCOUNT transfer "[\"$FROM\",\"$TO\",[\"$ASSET_ID\"],\"$MEMO\"]" -p $WAX_TEST_TEST_ACCOUNT@active
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Note that the memo destination chain is now `kylin` and no longer `liquidxxtwax` because we are sending the tokens to `kylin`.
{% endhint %}

{% hint style="warning" %}
If the transfers are not going through, ensure that the DSP you are using has enough CPU/NET staked for it
{% endhint %}
