Test bridge
Let's test by sending some tokens.
1
export FROM=$KYLIN_TEST_ACCOUNT
2
export TO=$KYLIN_BRIDGE_ACCOUNT
3
export QUANTITY="1.0000 TKN"
4
# user address, not token/tokenpeg account/contract, third account you created
5
export MEMO="0xE60dEdC13Ee13D563034dF75Acce5C58CB60ab12"
6
cleos -u $KYLIN_ENDPOINT push action $KYLIN_TOKEN_ACCOUNT transfer "[\"$FROM\",\"$TO\",\"$QUANTITY\",\"$MEMO\"]" -p $KYLIN_TEST_ACCOUNT@active
Copied!
Now let's see if the tokens make it! Navigate to your user account's address
Address 0xE60dEdC13Ee13D563034dF75Acce5C58CB60ab12 | BscScan
Binance (BNB) Blockchain Explorer
Now let's send it back!
Navigate to your tokenpeg contract on the EVM side, click on the contract tab, go to Write Contract, and connect using your user's account.
Scroll to #4. We're going to send 1 token back 10000. And to determine the destination address we're going to use a helper function on our bridge contract.
1
cleos -u $EOS_ENDPOINT push action $KYLIN_BRIDGE_ACCOUNT getdest '["YOUR EOSIO USER ACCOUNT HERE"]' -p $KYLIN_BRIDGE_ACCOUNT@active
Copied!
The assertion error will relay the uint64_t for the account specified, and you said EOSIO assertion messages weren't good for anything, pish posh, we move on!
Destination EOSIO Account Name Value: 11075078730411234672
Fire. Example trx​
Copy link