From 388fcc6e00f5609ae22e20a62a4388cfafa6c125 Mon Sep 17 00:00:00 2001 From: todd <81545601+todd-woko@users.noreply.github.com> Date: Wed, 21 Feb 2024 18:25:59 +0800 Subject: [PATCH] feat: add bridge token and deploy bridge call contract (#131) --- tests/scripts/ethereum.sh | 24 +++++++++++++++++++++++- tests/scripts/proposal.sh | 2 +- tests/scripts/run.sh | 7 +++++++ 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/tests/scripts/ethereum.sh b/tests/scripts/ethereum.sh index 50059e0e3..c8fa7feef 100755 --- a/tests/scripts/ethereum.sh +++ b/tests/scripts/ethereum.sh @@ -13,9 +13,11 @@ export LOCAL_PORT=${LOCAL_PORT:-"8545"} export LOCAL_URL=${LOCAL_URL:-"http://127.0.0.1:$LOCAL_PORT"} export REST_RPC=${REST_RPC:-"http://127.0.0.1:1317"} export MNEMONIC=${MNEMONIC:-"test test test test test test test test test test test junk"} +export BRIDGE_ADMIN_INDEX=${BRIDGE_ADMIN_INDEX:-"50"} export BRIDGE_TOKENS_OUT_DIR=${BRIDGE_TOKEN_OUT_DIR:-"${OUT_DIR}/bridge_tokens_out.json"} export BRIDGE_CONTRACTS_OUT_DIR=${BRIDGE_CONTRACTS_OUT_DIR:-"${OUT_DIR}/bridge_contracts_out.json"} +export BRIDGE_CALL_CONTRACT_OUT_DIR=${BRIDGE_CALL_CONTRACT_OUT_DIR:-"${OUT_DIR}/bridge_call_contract_out.json"} function start() { stop @@ -131,6 +133,23 @@ EOF rm -r "$BRIDGE_TOKENS_OUT_DIR.new" } +function deploy_bridge_call_contract() { + # deploy erc20 token test + erc20_address=$(deploy_contract "ERC20TokenTest" "TestToken" "TT" "18" "10000000000000000000000") + erc721_address=$(deploy_contract "ERC721TokenTest" "TestToken" "TT") + erc1155_address=$(deploy_contract "ERC1155TokenTest" "test_uri") + staking_address=$(deploy_contract "StakingTest") + + cat >"$BRIDGE_CALL_CONTRACT_OUT_DIR" <