Skip to content

Commit

Permalink
fix local node build
Browse files Browse the repository at this point in the history
  • Loading branch information
MalteHerrmann committed Nov 25, 2024
1 parent fb6e1d6 commit cf569e4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
3 changes: 2 additions & 1 deletion example_chain/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var sealed = false
var ChainsCoinInfo = map[string]evmtypes.EvmCoinInfo{
EighteenDecimalsChainID: {
Denom: ExampleChainDenom,
DisplayDenom: ExampleChainDenom,
DisplayDenom: ExampleDisplayDenom,
Decimals: evmtypes.EighteenDecimals,
},
}
Expand All @@ -35,6 +35,7 @@ func InitializeAppConfiguration(chainID string) error {
}

// When calling any CLI command, it creates a tempApp inside RootCmdHandler with an empty chainID.
// In that case we want to return here and not touch the app configuration.
if chainID == "" {
return nil
}
Expand Down
3 changes: 3 additions & 0 deletions example_chain/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const (
// ExampleChainDenom is the denomination of the evmOS example chain's base coin.
ExampleChainDenom = "aevmos"

// ExampleDisplayDenom is the display denomination of the evmOS example chain's base coin.
ExampleDisplayDenom = "evmos"

// EighteenDecimalsChainID is the chain ID for the 18 decimals chain.
EighteenDecimalsChainID = "os_9001"

Expand Down
12 changes: 6 additions & 6 deletions example_chain/local_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ if [[ $overwrite == "y" || $overwrite == "Y" ]]; then
jq '.app_state["mint"]["params"]["mint_denom"]="aevmos"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"

# Enable precompiles in EVM params
jq '.app_state["evm"]["params"]["active_static_precompiles"]=["0x0000000000000000000000000000000000000100","0x0000000000000000000000000000000000000400","0x0000000000000000000000000000000000000800","0x0000000000000000000000000000000000000801","0x0000000000000000000000000000000000000802","0x0000000000000000000000000000000000000803","0x0000000000000000000000000000000000000804, "0x0000000000000000000000000000000000000805"]' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"
jq '.app_state["evm"]["params"]["active_static_precompiles"]=["0x0000000000000000000000000000000000000100","0x0000000000000000000000000000000000000400","0x0000000000000000000000000000000000000800","0x0000000000000000000000000000000000000801","0x0000000000000000000000000000000000000802","0x0000000000000000000000000000000000000803","0x0000000000000000000000000000000000000804","0x0000000000000000000000000000000000000805"]' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"

# Set gas limit in genesis
jq '.consensus_params["block"]["max_gas"]="10000000"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"
Expand Down Expand Up @@ -183,11 +183,11 @@ if [[ $overwrite == "y" || $overwrite == "Y" ]]; then
sed -i.bak 's/pruning-interval = "0"/pruning-interval = "10"/g' "$APP_TOML"

# Allocate genesis accounts (cosmos formatted addresses)
osd genesis add-genesis-account "$(osd keys show "$VAL_KEY" -a --keyring-backend "$KEYRING" --home "$HOMEDIR")" 100000000000000000000000000aevmos --keyring-backend "$KEYRING" --home "$HOMEDIR"
osd genesis add-genesis-account "$(osd keys show "$USER1_KEY" -a --keyring-backend "$KEYRING" --home "$HOMEDIR")" 1000000000000000000000aevmos --keyring-backend "$KEYRING" --home "$HOMEDIR"
osd genesis add-genesis-account "$(osd keys show "$USER2_KEY" -a --keyring-backend "$KEYRING" --home "$HOMEDIR")" 1000000000000000000000aevmos --keyring-backend "$KEYRING" --home "$HOMEDIR"
osd genesis add-genesis-account "$(osd keys show "$USER3_KEY" -a --keyring-backend "$KEYRING" --home "$HOMEDIR")" 1000000000000000000000aevmos --keyring-backend "$KEYRING" --home "$HOMEDIR"
osd genesis add-genesis-account "$(osd keys show "$USER4_KEY" -a --keyring-backend "$KEYRING" --home "$HOMEDIR")" 1000000000000000000000aevmos --keyring-backend "$KEYRING" --home "$HOMEDIR"
osd genesis add-genesis-account "$VAL_KEY" 100000000000000000000000000aevmos --keyring-backend "$KEYRING" --home "$HOMEDIR"
osd genesis add-genesis-account "$USER1_KEY" 1000000000000000000000aevmos --keyring-backend "$KEYRING" --home "$HOMEDIR"
osd genesis add-genesis-account "$USER2_KEY" 1000000000000000000000aevmos --keyring-backend "$KEYRING" --home "$HOMEDIR"
osd genesis add-genesis-account "$USER3_KEY" 1000000000000000000000aevmos --keyring-backend "$KEYRING" --home "$HOMEDIR"
osd genesis add-genesis-account "$USER4_KEY" 1000000000000000000000aevmos --keyring-backend "$KEYRING" --home "$HOMEDIR"

# Sign genesis transaction
osd genesis gentx "$VAL_KEY" 1000000000000000000000aevmos --gas-prices ${BASEFEE}aevmos --keyring-backend "$KEYRING" --chain-id "$CHAINID" --home "$HOMEDIR"
Expand Down

0 comments on commit cf569e4

Please sign in to comment.