# Replace YOUR_PASSWORD if needed
goloop ks gen --out $CONFIG_DIR/bmc-owner.json --password $YOUR_PASSWORD
# Create a secret file 'bmc-owner.secret' and save $YOUR_PASSWORD into that file
echo -n $YOUR_PASSWORD > $CONFIG_DIR/bmc-owner.secret
# Save bmc-owner address to a file
echo $(jq -r '.address' "$CONFIG_DIR/bmc-owner.json") > $CONFIG_DIR/bmc-owner.addr
goloop rpc --uri http://127.0.0.1:9080/api/v3/icon sendtx call --to $(cat $CONFIG_DIR/bmc.icon) \
--key_store $CONFIG_DIR/goloop.keystore.json \
--key_password $(cat $CONFIG_DIR/goloop.keysecret) \
--nid $(cat $CONFIG_DIR/nid.icon) \
--step_limit 13610920001 \
--param _addr=$(cat $CONFIG_DIR/bmc-owner.addr) \
| jq -r . > $CONFIG_DIR/tx.addBMCOwner.icon
# Also check whether this transaction is successful
# goloop rpc --uri http://127.0.0.1:9080/api/v3/icon txresult $(cat $CONFIG_DIR/tx.addBMCOwner.icon)
# If fail, it shows error message and status '0x0'
AMOUNT=1000000000000000000000000
goloop rpc --uri http://127.0.0.1:9080/api/v3/icon sendtx transfer \
--to $(cat $CONFIG_DIR/bmc-owner.addr) --value $AMOUNT \
--key_store $CONFIG_DIR/goloop.keystore.json \
--key_password $(cat $CONFIG_DIR/goloop.keysecret) \
--nid $(cat $CONFIG_DIR/nid.icon) \
--step_limit 10000000000 | jq -r . > $CONFIG_DIR/tx.bmcOwner.addFund
# Also check whether this transaction is successful
# goloop rpc --uri http://127.0.0.1:9080/api/v3/icon txresult $(cat $CONFIG_DIR/tx.bmcOwner.addFund)
# If fail, it shows error message and status '0x0'