EOSIO <> EOSIO Atomic Assets Non-Fungible Tokens
This guide will essentially map the atomictokenpegeosio.spec.js unit test.
Resources:
DSP Portals
Documentation
https://waxsweden.org/testnet/ - get accounts / tokens
NFT Standard Atomic Assets
Steps:
Install Zeus if not installed, zeus is used to unbox or install all the necessary dependencies to compile and deploy the necessary contracts.
Ensure you're using node version 12, IPFS can be picky with other versions
Unbox
atomictokenpegbox
Add LiquidX mapping file
/zeus_boxes/liquidx/models/eosio-chains/liquidxxtwax.json
The following file is for the destination chain's information.
/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.
Compile contracts
Update the atomic assets contract account name for each contract
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
Create 2 Kylin and 2 Wax Testnet Accounts
Kylin bridge contract Account (
atomictokenpegeosio.cpp)Kylin test Account no contract
Wax Testnet contract Account (
atomictokenpegxeosio.cpp)Wax Testnet Account no contract
Setup
atomictokenpegeosioon the Kylin token contract Account andatomictokenpegxeosioon the Wax Testnet token contract Account usingzeus migrate.Import private keys
Create contract deployment files located in
./zeus_boxes/contract-migrations-extensions/models/contract-deployments/
Migrate contracts to Kylin/Wax Testnet
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.
Mint test tokens
We will mint some test NFT tokens to our test account.
Be sure to update the account name, the new asset owner, the collection name and the actor signing the transaction.
Register mapping
The collection author for an NFT must register that NFT with the bridge before users can transfer.
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. 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.
LiquidX stake
In order to stake for services on WAX Testnet, a LiquidX mapping must be created, for more detail see here.
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.
Transfer
Now we will test with a transfer from the Kylin example user to the Kylin bridge contract, let's see how it goes!!
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!
If the transfers are not going through, ensure that the DSP you are using has enough CPU/NET staked for it
Last updated
Was this helpful?