Skip to content

Conversation

@freeelancer
Copy link
Contributor

@freeelancer freeelancer commented Jun 16, 2025

Summary by CodeRabbit

  • New Features

    • Integrated Cosmos EVM modules, enabling EVM transaction processing and ERC20 token support.
    • Added support for static EVM precompiles and enhanced configuration for EVM chain parameters and coin denominations.
    • Introduced a minimum gas price enforcement for transactions.
    • Added CLI command for adding genesis accounts with vesting options.
  • Improvements

    • Refactored ante handler logic to support both Ethereum and Cosmos SDK transaction types.
    • Enhanced genesis state initialization and upgrade handling for EVM modules.
    • Updated configuration files and command-line tools to support EVM features, including new config sections and improved key management.
  • Bug Fixes

    • Improved balance checks and fee calculations in end-to-end and integration tests.
    • Fixed Docker image version for IBC relayer in test setups.
  • Removals

    • Removed the xfeemarket module and all related files, messages, queries, and tests.
    • Deleted legacy fee market configuration and simulation code.
  • Chores

    • Updated dependencies and module replacements for compatibility and security.
    • Added a new genesis file for the "omstead_5887-1" network.

@coderabbitai
Copy link

coderabbitai bot commented Jun 16, 2025

Caution

Review failed

Failed to post review comments.

Walkthrough

This update removes the entire xfeemarket module and all its code, configuration, simulation, tests, and protobuf definitions. It refactors fee market logic to rely on the EVM module and moves fee burning to the tax module's end blocker. Application and ante handler logic are updated to integrate Cosmos EVM modules and eliminate xfeemarket dependencies.

Changes

File(s) / Path(s) Change Summary
x/xfeemarket/ (all files), proto/mantrachain/xfeemarket/, testutil/keeper/xfeemarket.go Entire xfeemarket module, all its code, tests, simulation, post handler, and protobufs deleted
app/app.go, app/ante.go, app/post_handler.go, app/params/config.go, app/encoding.go, ... Application logic refactored to remove xfeemarket, integrate EVM fee market, update ante handler
app/ante/ (new files) New ante handler logic for Cosmos EVM, including min gas price decorator and handler options
app/evmosante.go, app/precompiles.go, app/token_pair.go, app/config.go New files supporting EVM ante handler options, precompiles, token pairs, and configuration
app/genesis.go, tests/e2e/genesis.go, tests/interchain/chainsuite/config.go Genesis and test logic updated to use EVM feemarket, no longer reference xfeemarket
x/tax/keeper/keeper.go, x/tax/module/abci.go, x/tax/module/module.go, x/tax/types/events.go Fee burning logic moved to tax module's end blocker; new event type for fee burning
x/tax/types/expected_keepers.go BankKeeper interface extended for balance query and burn coins
go.mod, scripts/makefiles/proto.mk Dependency and proto build updates to remove xfeemarket, add EVM modules
client/docs/config.json, client/docs/swagger/swagger.go Swagger and API docs updated to remove xfeemarket, add EVM modules
cmd/mantrachaind/cmd/, cmd/mantrachaind/main.go CLI logic updated for EVM integration, config, and genesis account commands
networks/omstead_5887-1/genesis.json New genesis file for EVM-based chain, no xfeemarket module
tests/e2e/, tests/connect/, tests/interchain/ Tests updated to remove xfeemarket, use EVM feemarket
.golangci.yml, chains.yaml Linter and platform config updated, xfeemarket references removed
x/sanction/module/module.go Invariants interface assertion removed

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant AnteHandler
    participant EVM FeeMarket
    participant TaxModule

    User->>App: Submit transaction
    App->>AnteHandler: Route tx (check extension options)
    AnteHandler->>EVM FeeMarket: (If Ethereum tx) Validate fees, gas, signature
    AnteHandler->>Cosmos SDK Handler: (If Cosmos tx) Validate fees, gas, signature
    App->>TaxModule: EndBlock (burn collected fees)
Loading

Possibly related PRs

  • MANTRA-Chain/mantrachain#332: Also deletes the xfeemarket module, its protobufs, and moves fee burning logic to the tax module's endblocker, making it directly related to this PR at the code level.

Poem

The fee market's gone, its code set free,
Burned away in tax, as clean as can be.
Ante flows anew, with EVM in tow,
Genesis reborn, old modules let go.
With rabbits a-hop and contracts to run,
The chain leaps ahead—onward, omstead, to fun!

((\
( -.-)
o_(")(")

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Commit Unit Tests in branch feat/streamline-app
  • Post Copyable Unit Tests in Comment

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 16, 2025 09:39
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube Cloud

@freeelancer freeelancer merged commit ef1170b into main-evm Jun 16, 2025
20 of 23 checks passed
@freeelancer freeelancer deleted the feat/streamline-app branch June 16, 2025 10:33
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.

2 participants