Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
swift1337 committed Sep 3, 2024
1 parent da096b0 commit 81012ce
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions contrib/localnet/orchestrator/start-zetae2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,27 @@ config_str() {
yq -r "$1" config.yml
}

# Sends Ether to the given address on ZetaChain
# Usage: fund_zevm <address> <ether> [comment]
fund_zevm() {
# Sends Ether to the given address on Ethereum localnet
# Usage: fund_eth <address> <ether> [comment]
fund_eth() {
local address=$1
local ether=$2
local comment=${3:-}

if [ -z "$comment" ]; then
echo "funding zevm address $address with $ether eth"
echo "funding eth address $address with $ether eth"
else
echo "funding zevm address $address ($comment) with $ether eth"
echo "funding eth address $address ($comment) with $ether eth"
fi

geth --exec \
"eth.sendTransaction({from: eth.coinbase, to: '${address}', value: web3.toWei(${ether}, 'ether')})" \
attach http://eth:8545 > /dev/null;
}

# Combines fund_zevm with config_str
# Usage: fund_zevm_from_config <config-key> <ether> [comment]
fund_zevm_from_config() {
# Combines fund_eth with config_str
# Usage: fund_eth_from_config <config-key> <ether> [comment]
fund_eth_from_config() {
local config_key=$1
local ether=$2
local comment=${3:-}
Expand All @@ -65,8 +65,8 @@ fund_zevm_from_config() {
return 1
fi

# Call fund_zevm with the fetched address, ether amount, and optional comment
fund_zevm "$address" "$ether" "$comment"
# Call fund_eth with the fetched address, ether amount, and optional comment
fund_eth "$address" "$ether" "$comment"
}

# Wait for authorized_keys file to exist (generated by zetacore0)
Expand All @@ -87,46 +87,46 @@ sleep 2
### Create the accounts and fund them with Ether on local Ethereum network

# unlock the default account account
fund_zevm_from_config '.default_account.evm_address' 10000 "deployer"
fund_eth_from_config '.default_account.evm_address' 10000 "deployer"

# unlock erc20 tester accounts
fund_zevm_from_config '.additional_accounts.user_erc20.evm_address' 10000 "ERC20 tester"
fund_eth_from_config '.additional_accounts.user_erc20.evm_address' 10000 "ERC20 tester"

# unlock zeta tester accounts
fund_zevm_from_config '.additional_accounts.user_zeta_test.evm_address' 10000 "zeta tester"
fund_eth_from_config '.additional_accounts.user_zeta_test.evm_address' 10000 "zeta tester"

# unlock zevm message passing tester accounts
fund_zevm_from_config '.additional_accounts.user_zevm_mp_test.evm_address' 10000 "zevm mp tester"
fund_eth_from_config '.additional_accounts.user_zevm_mp_test.evm_address' 10000 "zevm mp tester"

# unlock bitcoin tester accounts
fund_zevm_from_config '.additional_accounts.user_bitcoin.evm_address' 10000 "bitcoin tester"
fund_eth_from_config '.additional_accounts.user_bitcoin.evm_address' 10000 "bitcoin tester"

# unlock solana tester accounts
fund_zevm_from_config '.additional_accounts.user_solana.evm_address' 10000 "solana tester"
fund_eth_from_config '.additional_accounts.user_solana.evm_address' 10000 "solana tester"

# unlock ethers tester accounts
fund_zevm_from_config '.additional_accounts.user_ether.evm_address' 10000 "ether tester"
fund_eth_from_config '.additional_accounts.user_ether.evm_address' 10000 "ether tester"

# unlock miscellaneous tests accounts
fund_zevm_from_config '.additional_accounts.user_misc.evm_address' 10000 "misc tester"
fund_eth_from_config '.additional_accounts.user_misc.evm_address' 10000 "misc tester"

# unlock admin erc20 tests accounts
fund_zevm_from_config '.additional_accounts.user_admin.evm_address' 10000 "admin tester"
fund_eth_from_config '.additional_accounts.user_admin.evm_address' 10000 "admin tester"

# unlock migration tests accounts
fund_zevm_from_config '.additional_accounts.user_migration.evm_address' 10000 "migration tester"
fund_eth_from_config '.additional_accounts.user_migration.evm_address' 10000 "migration tester"

# unlock v2 ethers tests accounts
fund_zevm_from_config '.additional_accounts.user_v2_ether.evm_address' 10000 "V2 ethers tester"
fund_eth_from_config '.additional_accounts.user_v2_ether.evm_address' 10000 "V2 ethers tester"

# unlock v2 erc20 tests accounts
fund_zevm_from_config '.additional_accounts.user_v2_erc20.evm_address' 10000 "V2 ERC20 tester"
fund_eth_from_config '.additional_accounts.user_v2_erc20.evm_address' 10000 "V2 ERC20 tester"

# unlock v2 ethers revert tests accounts
fund_zevm_from_config '.additional_accounts.user_v2_ether_revert.evm_address' 10000 "V2 ethers revert tester"
fund_eth_from_config '.additional_accounts.user_v2_ether_revert.evm_address' 10000 "V2 ethers revert tester"

# unlock v2 erc20 revert tests accounts
fund_zevm_from_config '.additional_accounts.user_v2_erc20_revert.evm_address' 10000 "V2 ERC20 revert tester"
fund_eth_from_config '.additional_accounts.user_v2_erc20_revert.evm_address' 10000 "V2 ERC20 revert tester"

# unlock local solana relayer accounts
if host solana > /dev/null; then
Expand Down

0 comments on commit 81012ce

Please sign in to comment.