Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imp(erc20): Add reference to EIP-7528 (native asset address) to default ERC-20 params and use it for example chain #57

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 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 All @@ -49,4 +49,4 @@
},
"legacy_version": null,
"target_repo": "https://github.com/evmos/os"
}
}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This changelog was created using the `clu` binary

### Improvements

- (erc20) [#57](https://github.com/evmos/os/pull/57) Add reference to EIP-7528 (native asset address) to default ERC-20 params and use in example chain.
- (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.
- (cli) [#53](https://github.com/evmos/os/pull/53) Enable specifying default key type for adding keys.
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"]' "$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
Loading