Skip to content

Commit

Permalink
imp(erc20): Add reference to EIP-7528 (native asset address) to defau…
Browse files Browse the repository at this point in the history
…lt ERC-20 params and use it for example chain (#57)
  • Loading branch information
MalteHerrmann authored Jan 8, 2025
1 parent cd67b16 commit e95afb0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .clconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
"types"
],
"change_types": {
"API Breaking": "api\\s*breaking",
"Bug Fixes": "bug\\s*fixes",
"Improvements": "improvements",
"State Machine Breaking": "state\\s*machine\\s*breaking"
"API Breaking": "feat-api",
"Bug Fixes": "fix",
"Improvements": "imp",
"State Machine Breaking": "feat-smb"
},
"expected_spellings": {
"ABI": "abi",
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This changelog was created using the `clu` binary

### Improvements

- (erc20) [#57](https://github.com/evmos/os/pull/57) Reference EIP-7528 (native asset address) in default ERC-20 params.
- (all) [#60](https://github.com/evmos/os/pull/60) Apply latest changes from Evmos repo (f943af3b to b72a32d76).
- (cli) [#55](https://github.com/evmos/os/pull/55) Add missing list key types subcommand.
- (cli) [#54](https://github.com/evmos/os/pull/54) Align debug CLI commands with Cosmos SDK plus other minor clean up.
Expand Down
4 changes: 4 additions & 0 deletions example_chain/local_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ if [[ $overwrite == "y" || $overwrite == "Y" ]]; then
# 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"

# Enable native denomination as a token pair for STRv2
jq '.app_state.erc20.params.native_precompiles=["0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"]' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"
jq '.app_state.erc20.token_pairs=[{contract_owner:1,erc20_address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",denom:"aevmos",enabled:true}]' "$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
5 changes: 5 additions & 0 deletions x/erc20/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ var (
)

var (
// NOTE: We strongly recommend to use the canonical address for the ERC-20 representation
// of the chain's native denomination as defined by
// [ERC-7528](https://eips.ethereum.org/EIPS/eip-7528).
//
// 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
DefaultNativePrecompiles []string
DefaultDynamicPrecompiles []string
)
Expand Down

0 comments on commit e95afb0

Please sign in to comment.