-
Notifications
You must be signed in to change notification settings - Fork 14
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
fix(x/evm): update genesis params to use FX denom #813
Conversation
WalkthroughThe modifications in the pull request focus on the Changes
Sequence Diagram(s)sequenceDiagram
participant AppModuleBasic
participant GenesisState
participant Codec
AppModuleBasic->>GenesisState: Initialize with evmtypes.DefaultGenesisState()
GenesisState->>GenesisState: Set EvmDenom to fxtypes.DefaultDenom
AppModuleBasic->>Codec: Marshal GenesisState to JSON
Codec-->>AppModuleBasic: Return JSON representation
Poem
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 (1)
x/evm/module.go (1)
42-45
: Consider testing genesis export/import scenariosWhile the implementation is correct, please ensure:
- Genesis export/import functionality is tested with the new denom
- Chain upgrade procedures handle the denom change correctly
- Integration tests cover interaction with other modules that might depend on EVM denom
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
x/evm/module.go
(1 hunks)
🔇 Additional comments (2)
x/evm/module.go (2)
43-45
: LGTM! Clean implementation of DefaultGenesis
The changes correctly initialize the genesis state with the FX denom while maintaining the default values for other parameters.
Line range hint 156-157
: Verify consistent denom usage across the codebase
The change to use fxtypes.DefaultDenom
in both genesis and simulation is good. Let's verify this denom is used consistently.
✅ Verification successful
Based on the search results, I can now generate the final response:
Consistent denom usage verified across the codebase
The codebase consistently uses fxtypes.DefaultDenom
for EVM operations. Key findings:
- EVM module correctly sets
EvmDenom = fxtypes.DefaultDenom
in both normal genesis and simulation - The
DefaultDenom
constant is properly defined intypes/constant.go
as "FX" - All references to EVM denom are using the centralized
fxtypes.DefaultDenom
constant - No hardcoded denom strings that should be using
DefaultDenom
were found
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for any other denom definitions or usages that might need updating
rg "EvmDenom.*=.*" --type go
# Check for any hardcoded denom strings that should use fxtypes.DefaultDenom
rg -g '*.go' '"[a-zA-Z]+denom"'
Length of output: 1159
Script:
#!/bin/bash
# Let's check for DefaultDenom usage to ensure consistency
rg "DefaultDenom" --type go -A 2
# Also check for any other denom-related constants or parameters
rg "(?i)denom.*=.*" --type go
# Check for any direct string assignments to EvmDenom
ast-grep --pattern 'EvmDenom = "$_"'
Length of output: 71921
Summary by CodeRabbit
New Features
Bug Fixes