-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
source config.sh | ||
source rpc.sh | ||
|
||
export PRIVATE_KEY="[\""$(cat $BSC_KEY_STORE.priv)"\"]" | ||
|
||
# Address to transfer the funds to | ||
ADDR=0x69e81Cea7889608A63947814893ad1B86DcC03Aa | ||
|
||
moveLockedEth() { | ||
echo "transferring all locked ETH to ${ADDR}" | ||
cd $CONTRACTS_DIR/solidity/bmc | ||
tx=$(truffle exec --network bsc "$SCRIPTS_DIR"/bts.js \ | ||
--method addOwner --addr "${ADDR}") | ||
echo "$tx" >$CONFIG_DIR/tx/moveLockedEth.bts.bsc | ||
} | ||
|
||
moveLockedEth |
28 changes: 28 additions & 0 deletions
28
devnet/docker/icon-bsc/scripts/transfer_icon_eth_ownership.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
source config.sh | ||
source rpc.sh | ||
|
||
# Address of new owner of ETH token on ICON | ||
ADDR=hx80e312d8e68ee2db8fb95e6e7daae2e770d0e368 | ||
|
||
transferEthOwnership() { | ||
cd $CONFIG_DIR | ||
|
||
if [ ! -f icon.addr.bts ]; then | ||
echo "BTS address file icon.addr.bts does not exist" | ||
exit | ||
fi | ||
|
||
goloop rpc sendtx call --to $(cat icon.addr.bts) \ | ||
--method transferOwnership \ | ||
--param _name=btp-0x38.bsc-ETH \ | ||
--param to=${ADDR} | jq -r . >tx/transferTokenOwnership.icon | ||
sleep 3 | ||
ensure_txresult tx/transferTokenOwnership.icon | ||
echo "Ownership of ETH transferred to ${ADDR} " | ||
} | ||
|
||
transferEthOwnership |