# Change your current directory to '.../solidity/bsh'
cd $PROJECT_DIR/btp/build/contracts/solidity/bsh
export CAROL_ADDR=$(cat $CONFIG_DIR/carol.addr)
export CAROL_BTP_ADDR=$(cat $CONFIG_DIR/carol.btp.addr)
truffle console --network moonbeamlocal
# Get BSHCore contract instance
truffle(moonbeamlocal)> let bshCore = await BSHCore.deployed()
truffle(moonbeamlocal)> let accounts = await web3.eth.getAccounts()
# Check current balance of accounts[2] and make sure it has sufficient amount of coins
truffle(moonbeamlocal)> web3.eth.getBalance(accounts[2])
# Then, make a transfer request
# You can replace 'hx8062076aa5e68f021121d1c3b4b3979d21a6dcae' by your address on ICON network
# You can specify your own value to transfer
truffle(moonbeamlocal)> await bshCore.transferNativeCoin(process.env.CAROL_BTP_ADDR, {from: accounts[2], value: process.env.AMOUNT})
# After a few seconds, please check the account's balance again
# If success, the balance will be deducted. Otherwise, an account will be refunded
truffle(moonbeamlocal)> web3.eth.getBalance(accounts[2])