-
Notifications
You must be signed in to change notification settings - Fork 2
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request includes updates to the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
.clconfig.json (1)
27-30
: LGTM! The simplified change type identifiers are more maintainable.The changes make the identifiers more concise and align better with conventional commit formats. The use of "feat-" prefix for breaking changes provides good consistency.
Consider adding a comment in the JSON file documenting the expected format of these change type identifiers to help contributors use them correctly. For example:
{ + // Change types follow these patterns: + // - Breaking changes: feat-* (e.g., feat-api, feat-smb) + // - Improvements: imp + // - Bug fixes: fix "change_types": { "API Breaking": "feat-api", "Bug Fixes": "fix", "Improvements": "imp", "State Machine Breaking": "feat-smb" },CHANGELOG.md (1)
11-11
: LGTM with a minor suggestion for clarity.The changelog entry follows the correct format and accurately reflects the PR's purpose. Consider making the description slightly more informative by explaining what EIP-7528 standardizes.
- (erc20) [#57](https://github.com/evmos/os/pull/57) Add reference to EIP-7528 (native asset address) to default ERC-20 params. + (erc20) [#57](https://github.com/evmos/os/pull/57) Add reference to EIP-7528 (standardized native asset address format) to default ERC-20 params.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
.clconfig.json
(2 hunks)CHANGELOG.md
(1 hunks)x/erc20/types/params.go
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- x/erc20/types/params.go
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days-before-close if no further activity occurs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
CHANGELOG.md (1)
11-11
: LGTM! Consider wrapping the line for better readability.The changelog entry accurately describes the changes and follows the standard format. While the line exceeds the recommended 120-character limit, it maintains consistency with existing entries.
Consider wrapping the line:
-- (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. ++ (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.🧰 Tools
🪛 Markdownlint (0.37.0)
11-11: Expected: 120; Actual: 152
Line length(MD013, line-length)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
CHANGELOG.md
(1 hunks)example_chain/local_node.sh
(1 hunks)
🧰 Additional context used
🪛 Markdownlint (0.37.0)
CHANGELOG.md
11-11: Expected: 120; Actual: 152
Line length
(MD013, line-length)
🔇 Additional comments (1)
example_chain/local_node.sh (1)
137-139
: Verify the contract_owner value and consider adding input validation.
The implementation correctly uses the EIP-7528 canonical address for native assets (0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE). However, there are a few considerations:
- The
contract_owner
value of 1 seems arbitrary. Please verify if this is the intended value. - Consider adding validation for the EIP-7528 address format.
Let's verify the contract_owner usage:
✅ Verification successful
Based on the search results, I can now generate the final response as the findings provide clear context about the contract_owner
value:
The contract_owner value of 1 is correct as it represents a ModuleAccount owner type
The codebase shows that contract_owner
is an ENUM where:
- 0: invalid
- 1: ModuleAccount
- 2: external address
Since this is configuring a native token (using the EIP-7528 canonical address) in the genesis, using ModuleAccount
(value 1) as the owner type is the correct choice.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for other occurrences of contract_owner in the codebase
# to understand its expected values and validation
# Search for contract_owner in Go files
echo "Searching for contract_owner in Go files:"
rg -A 3 "contract_owner" --type go
# Search for validation of EIP-7528 address
echo "Searching for EIP-7528 address validation:"
rg -A 3 "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
Length of output: 4928
This PR adds a reference to EIP-7528 to the default native precompiles entry on the evmOS repository
Summary by CodeRabbit
Improvements
Configuration Changes