Skip to content

Conversation

@freeelancer
Copy link
Contributor

@freeelancer freeelancer commented Jun 17, 2025

Summary by CodeRabbit

  • New Features

    • Integrated Cosmos EVM modules, enabling EVM transaction support, ERC20 token handling, and EVM-compatible key management.
    • Added support for EVM precompiled contracts and configuration of EVM chain parameters.
    • Introduced new ante handler logic to route transactions based on extension options, supporting both EVM and Cosmos SDK transaction types.
    • Enhanced CLI with EVM-specific commands and improved genesis account management.
  • Bug Fixes

    • Improved minimum gas price enforcement and fee handling for EVM transactions.
    • Updated module account permissions and blocked addresses to align with EVM requirements.
  • Chores

    • Removed the xfeemarket module and all related files, messages, queries, and tests.
    • Updated dependencies and build scripts to support Cosmos EVM modules and remove legacy fee market code.
  • Documentation

    • Updated API documentation configuration to include EVM, feemarket, precisebank, and erc20 modules.
  • Tests

    • Updated test setup and logic to support new EVM fee market features and transaction types.
  • Configuration

    • Added and updated configuration files for EVM chain IDs, coin denominations, and network genesis state.
    • Enhanced application and CLI configuration for EVM compatibility and chain-specific options.

@coderabbitai
Copy link

coderabbitai bot commented Jun 17, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This update removes the entire xfeemarket module and all associated files, including its keeper, message and query servers, simulation, post handler, interfaces, tests, and protobuf definitions. The application is refactored to integrate Cosmos EVM modules for fee market and transaction handling, with new ante handler logic, EVM configuration, precompiles, and updated CLI commands. Genesis and configuration logic are updated to match the new fee market and EVM-based system.

Changes

Files / Groups Change Summary
x/xfeemarket/, proto/mantrachain/xfeemarket/, testutil/keeper/xfeemarket.go Entire xfeemarket module, all Go code, tests, simulation, post handlers, interfaces, and protobufs deleted.
app/ante.go, app/post_handler.go Old ante and post handler implementations for fee market removed.
app/ante/ (new files) New ante handler logic for Cosmos EVM and Cosmos SDK transactions, including decorator and handler options.
app/, app/evmosante.go, app/precompiles.go, app/token_pair.go, app/config.go, app/activators.go EVM module integration: new precompiles, token pairs, EVM configuration, and activators added.
app/app.go, app/encoding.go, app/genesis.go, app/test_helpers.go App struct, genesis, encoding, and helper functions refactored to use Cosmos EVM modules and fee market logic.
app/upgrades/, app/upgrades/v2/, app/upgrades/v3/, app/upgrades/v4/, app/upgrades/v5/ Upgrade handler logic updated to remove legacy fee market module and support EVM-based upgrades.
chains.yaml, client/docs/config.json, client/docs/swagger/swagger.go Build platform, API docs, and swagger FS updated for EVM modules.
cmd/mantrachaind/ CLI refactored for EVM support: Ethermint key commands, EVM server commands, new genesis account command, config changes.
go.mod, scripts/makefiles/proto.mk Dependencies updated: remove skip-mev/feemarket, add Cosmos EVM, update wasmd, add evm proto, remove old feemarket proto.
networks/omstead_5887-1/genesis.json New genesis file added for the omstead_5887-1 network with EVM and erc20 modules.
tests/e2e/, tests/interchain/chainsuite/config.go, tests/connect/ Tests updated to remove xfeemarket dependencies and use Cosmos EVM fee market logic.
x/tax/ Tax module updated to burn EVM coin fees at end block, with new keeper methods and event types.
.golangci.yml Linter config updated: replace tenv with usetesting.
app/params/config.go Denom registration and config sealing commented out.
x/sanction/module/module.go Remove invariants interface assertion.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CLI
    participant App
    participant CosmosEVM
    participant CosmosSDK

    User->>CLI: Submit transaction (Tx)
    CLI->>App: DeliverTx(Tx)
    App->>App: NewAnteHandler(options)
    App->>App: Inspect Tx extension options
    alt EVM extension option
        App->>CosmosEVM: Process EVM ante handler
    else Cosmos SDK extension option or none
        App->>CosmosSDK: Process Cosmos SDK ante handler
    end
    App->>CosmosEVM: Fee market processing (EVM module)
    App->>CosmosEVM: Precompiles, ERC20, etc.
    App->>App: Commit block
Loading

Possibly related PRs

  • MANTRA-Chain/mantrachain#332: Also removes the entire xfeemarket module and its protobufs, indicating a shared goal of deleting the fee market module.
  • MANTRA-Chain/mantrachain#340: Removes the same xfeemarket protobuf-generated files and adjusts linter settings, partially overlapping with this PR at the protobuf file level.

Poem

The fee market’s gone, swept out with the tide,
EVM modules now stand with Cosmos pride.
Ante handlers refactored, precompiles in tow,
Genesis and CLI ready to go.
With every hop, the chain leaps anew—
Rabbits rejoice: "EVM, we welcome you!"
🐇✨

✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Post Copyable Unit Tests in Comment
  • Commit Unit Tests in branch fix/delete-old-feemarket

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@freeelancer freeelancer changed the base branch from main to main-evm June 17, 2025 10:55
@freeelancer freeelancer requested review from mmsqe and yihuang June 17, 2025 10:56
@sonarqubecloud
Copy link

@freeelancer freeelancer merged commit 8638341 into main-evm Jun 18, 2025
7 checks passed
@freeelancer freeelancer deleted the fix/delete-old-feemarket branch June 18, 2025 03:01
freeelancer added a commit that referenced this pull request Jun 18, 2025
* remove skip-mev feemarket

* wired in evm, erc20 from evmos

* added back bank send hook

* updated swagger to include evmos modules

* replace default denom from uom to aom with 18dp

* genesis file for omstead testnet

* register swagger statik with namespace (temporary)

* add ante import to app

* Revert "register swagger statik with namespace (temporary)"

This reverts commit 20b1bde.

* add swagger.go

* switch from evmos evm to cosmos evm

* fix compile error

* add secp256k1 keys for sigverify

* feat: pump go in release.yml

* fix: GORELEASER_IMAGE is outdated

* fix: rest apis and evm routes

* feat: remove validation for CosmosChainID and fix base to 6 decimals

* feat: update dependencies + add client context

* fix: remove duplicate keyring options

* fix: update to use cosmos evm tracers

* refactor: consolidate setup configuration for address prefixes and cointype (#315)

* refactor: consolidate setup configuration for address prefixes and cointype

* fix: lint

---------

Co-authored-by: freeelancer <[email protected]>

* Merge branch 'main' into main-evm (#320)

* chore: remove networks folder

* feat: cosmos/evm v0.2.0 + ibc v10 (#326)

* wip: upgraded cosmos/evm to v0.2.0

* update ibc to v10

* add clienthelpers for defaultNodeHome

* fix: update heighliner tag to v1.7.5 (#325)

* update swagger api with latest versions

---------

Co-authored-by: Leo Pang <[email protected]>

* feat: upgrade from v4 to v5-evm with migration

* chore: remove xfeemarket module

* chore(deps): update github.com/cosmos/evm to v1.0.0-rc0

* feat: burn transaction fees

* chore(deps): update cosmos-sdk fork from v0.53.0-v5-mantra-1 to v0.53.0-v5-mantra-1-1

* chore(deps): update github.com/cosmos/evm with latest main branch commit

* chore: comment out linux/arm64 platform in chains.yaml

* fix(test): e2e tests (#330)

* feat: move burn fees from antehandler to tax endblocker (#332)

* update go.mod for connect

* revert to using default cosmos evm antehandler

* remove xfeemarket leftover

* feat: burn fees using tax endblocker

* feat: init evm chain id from genesis.json or app.toml (#338)

* feat: init evm chain id from genesis.json or app.toml

* remove constant.go and move code over to config.go

* avoid unexpected err

* avoid oom for big genesis

* cleanup

---------

Co-authored-by: mmsqe <[email protected]>

* chore: remove IBC v2 and precompile support temporarily (#340)

* feat: allow only single evm msg (#341)

* feat: remove legacy feemarket (skip-mev) store entirely (#342)

* chore: remove past upgradehandlers

* fix: remove legacy feemarket store entirely

* feat: add nix e2e test

* fix: evm init params (#344)

* fix: evm initial params

* chore: add v5.0.0-rcx to mergify

* chore: remove main-evm from condition

---------

Co-authored-by: allthatjazzleo <[email protected]>

* chore: remove networks folder (#346)

---------

Co-authored-by: allthatjazzleo <[email protected]>
Co-authored-by: Leo Pang <[email protected]>
Co-authored-by: mmsqe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants