Skip to content

Commit e95afb0

Browse files
imp(erc20): Add reference to EIP-7528 (native asset address) to default ERC-20 params and use it for example chain (#57)
1 parent cd67b16 commit e95afb0

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

.clconfig.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
"types"
2525
],
2626
"change_types": {
27-
"API Breaking": "api\\s*breaking",
28-
"Bug Fixes": "bug\\s*fixes",
29-
"Improvements": "improvements",
30-
"State Machine Breaking": "state\\s*machine\\s*breaking"
27+
"API Breaking": "feat-api",
28+
"Bug Fixes": "fix",
29+
"Improvements": "imp",
30+
"State Machine Breaking": "feat-smb"
3131
},
3232
"expected_spellings": {
3333
"ABI": "abi",

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This changelog was created using the `clu` binary
99

1010
### Improvements
1111

12+
- (erc20) [#57](https://github.com/evmos/os/pull/57) Reference EIP-7528 (native asset address) in default ERC-20 params.
1213
- (all) [#60](https://github.com/evmos/os/pull/60) Apply latest changes from Evmos repo (f943af3b to b72a32d76).
1314
- (cli) [#55](https://github.com/evmos/os/pull/55) Add missing list key types subcommand.
1415
- (cli) [#54](https://github.com/evmos/os/pull/54) Align debug CLI commands with Cosmos SDK plus other minor clean up.

example_chain/local_node.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ if [[ $overwrite == "y" || $overwrite == "Y" ]]; then
134134
# Enable precompiles in EVM params
135135
jq '.app_state["evm"]["params"]["active_static_precompiles"]=["0x0000000000000000000000000000000000000100","0x0000000000000000000000000000000000000400","0x0000000000000000000000000000000000000800","0x0000000000000000000000000000000000000801","0x0000000000000000000000000000000000000802","0x0000000000000000000000000000000000000803","0x0000000000000000000000000000000000000804","0x0000000000000000000000000000000000000805"]' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"
136136

137+
# Enable native denomination as a token pair for STRv2
138+
jq '.app_state.erc20.params.native_precompiles=["0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"]' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"
139+
jq '.app_state.erc20.token_pairs=[{contract_owner:1,erc20_address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",denom:"aevmos",enabled:true}]' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"
140+
137141
# Set gas limit in genesis
138142
jq '.consensus_params["block"]["max_gas"]="10000000"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"
139143

x/erc20/types/params.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ var (
2020
)
2121

2222
var (
23+
// NOTE: We strongly recommend to use the canonical address for the ERC-20 representation
24+
// of the chain's native denomination as defined by
25+
// [ERC-7528](https://eips.ethereum.org/EIPS/eip-7528).
26+
//
27+
// 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
2328
DefaultNativePrecompiles []string
2429
DefaultDynamicPrecompiles []string
2530
)

0 commit comments

Comments
 (0)