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 16, IPFS can be picky with other versions
Unbox atomiccolpeg
box
Copy mkdir atomiccolpeg
cd atomiccolpeg
zeus box create
zeus unbox atomiccolpeg
zeus compile
atomictokenpeg1155.cpp
must be updated before we keep rolling. We are not using the official atomicassets contract because it's not setup and the creating team does not have the keys to it, but don't you worry, I've got ya covered, this one is setup and ready to roll. Find this contract in ./zeus_boxes/contracts/eos/atomictokenpeg1155/atomictokenpeg1155.cpp
line 24.
Copy const name NFT_ACCOUNT = "bridgeassets" _n ;
Compile contracts
Create 2 Kylin and 1 Rinkeby Testnet accounts using these guides:
Kylin Accounts:
Kylin bridge contract account (atomictokenpeg1155.cpp
)
Kylin test Account no contract
Token contract is bridgeassets
which I've already setup, yo welcome
Rinkeby Testnet Account ( account will deploy 2 contracts and be the tester)
ERC1155 Contract (ERC1155Tradable.sol
)
Rinkeby bridge contract Account (atomictokenpeg1155.sol
)
Rinkeby test Account no contract
Copy export KYLIN_BRIDGE_ACCOUNT = elevenbridge
export KYLIN_TEST_ACCOUNT = natdeveloper
export KYLIN_ENDPOINT = https://kylin.eosn.io
Import our keys into zeus to deploy contracts to Kylin, or can use cleos as well
Zeus cleos
Copy zeus key import $KYLIN_BRIDGE_ACCOUNT --network kylin --active-private-key 5JB... --owner-private-key 5JB...
Copy # import owner private key
cleos wallet import --private-key 5JB...
# import active private key
cleos wallet import --private-key 5JB...
Create contract deployment files to migrate contracts to Kylin, located in ./zeus_boxes/contract-migrations-extensions/models/contract-deployments/
Copy zeus create contract-deployment atomictokenpeg1155 $KYLIN_BRIDGE_ACCOUNT kylin
Migrate contracts to Kylin
Zeus Migrate cleos set contract
Copy zeus migrate atomictokenpeg1155 --network=kylin --creator $KYLIN_BRIDGE_ACCOUNT --no-reset --no-compile-all --creator-key= ""
Copy # if migration fails
cd contracts/eos
cleos -u $KYLIN_ENDPOINT set contract $KYLIN_BRIDGE_ACCOUNT atomictokenpeg1155
If you use cleos to set the contract, be sure to set the eosio.code
permission level, see here
Stake for services
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 atomictokenpeg1155
contract set to it.
Stake to required services vRAM, LiquidHarmony Oracles, LiquidScheduler, LiquidLink
Using the DSP Portal we can see these packages, stake 10 DAPP to each (Amount to Stake ):
Below we'll select each package then stake for it.
vRAM LiquidHarmony LiquidScheduler LiquidLink
Copy 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
Copy 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
Copy 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
Copy export PROVIDER = uuddlrlrbass
export PACKAGE = sign
export SERVICE = signfndspsvc
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
You can use the command line login option on bloks.io, top right , this will auto-create the cleos commands for you!
Now let's head over to the EVM side.