convert sdk.Coin to ERC20 on internal testnet deploy (#1642)

This commit is contained in:
Robert Pirtle 2023-06-23 15:25:21 -07:00 committed by GitHub
parent 80c8c2c0f0
commit 336bac7466
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,8 +101,7 @@ kava tx issuance issue 6000000000ukava kava1vlpsrmdyuywvaqrv7rx6xga224sqfwz3fyfh
read -r -a GENESIS_VALIDATOR_ADDRESS_ARRAY <<<"$GENESIS_VALIDATOR_ADDRESSES"
# delegate 300KAVA to each validator
for validator in "${GENESIS_VALIDATOR_ADDRESS_ARRAY[@]}"
do
for validator in "${GENESIS_VALIDATOR_ADDRESS_ARRAY[@]}"; do
kava tx staking delegate "${validator}" 300000000ukava --from dev-wallet --gas-prices 0.5ukava -y
done
@ -114,7 +113,8 @@ echo "${KAVA_TESTNET_GOD_MNEMONIC}" | kava keys add --recover god
# create template string for the proposal we want to enact
# https://kava-labs.atlassian.net/wiki/spaces/ENG/pages/1228537857/Submitting+Governance+Proposals+WIP
PARAM_CHANGE_PROP_TEMPLATE=$(cat <<'END_HEREDOC'
PARAM_CHANGE_PROP_TEMPLATE=$(
cat <<'END_HEREDOC'
{
"@type": "/cosmos.params.v1beta1.ParameterChangeProposal",
"title": "Set Initial ERC-20 Contracts",
@ -165,3 +165,10 @@ kava tx committee vote 1 yes --gas 2000000 --gas-prices 0.01ukava --from god -y
# fetch current module params
updatedEvmUtilParams=$(curl https://api.app.internal.testnet.us-east.production.kava.io/kava/evmutil/v1beta1/params)
printf "updated evm util module params\n %s" , "$updatedEvmUtilParams"
# if adding more cosmos coins -> er20s, ensure that the deployment order below remains the same.
# convert 1 HARD to an erc20. doing this ensures the contract is deployed.
kava tx evmutil convert-cosmos-coin-to-erc20 \
"$DEV_TEST_WALLET_ADDRESS" \
1000000hard \
--from dev-wallet --gas 2000000 --gas-prices 0.001ukava -y