Skip to content

feat: upgrade evm to v0.6.0 and reenable ics precompile#281

Merged
Thaleszh merged 12 commits into
mainfrom
feat/bump-evm-v0.6.0
Mar 6, 2026
Merged

feat: upgrade evm to v0.6.0 and reenable ics precompile#281
Thaleszh merged 12 commits into
mainfrom
feat/bump-evm-v0.6.0

Conversation

@Thaleszh

@Thaleszh Thaleszh commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Description

Bumps EVM to v0.6.0 and re-enables ICS20 precompile

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • chore (Updates on dependencies, gitignore, etc)

How Has This Been Tested?

  • Pipelines
  • Checklist of changes of EVM clear
  • Local upgrade teste
  • Local network basic EVM interaction
  • Mempool broadcast test

PR Checklist:

Make sure each step was done:

  • Updated changelog with PR's intent
  • Lint with make lint-fix

@Thaleszh Thaleszh requested a review from jhelison as a code owner March 5, 2026 14:39
@coderabbitai

coderabbitai Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Updates dependencies (notably cosmos/evm to v0.6.0) and Go module replacements. Replaces the local EVM IBC transfer keeper import with the IBC-Go v10 transfer keeper and re-wires transfer middleware and keeper construction. Re-enables and registers an ICS20 precompile and adds its address to the v7_1 upgrade normalization. Changes EVM keeper APIs to accept an explicit statedb and an extra boolean, updating CallEVM/CallEVMWithData call sites across wasm bindings, tests, app helpers, and precompile registration. Miscellaneous linting, Makefile, simulation API, and small test/assertion edits included.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 62.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately summarizes the primary changes: upgrading EVM to v0.6.0 and re-enabling the ICS precompile, which are the core objectives reflected throughout the changeset.
Description check ✅ Passed The PR description clearly explains the changes: bumping EVM to v0.6.0 and re-enabling the ICS20 precompile, which directly aligns with the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/bump-evm-v0.6.0

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Mar 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 35.89744% with 25 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
wasmbinding/evm/queries.go 0.00% 9 Missing ⚠️
x/tokenfactory/types/msgs.go 0.00% 7 Missing ⚠️
app/apptesting/evm.go 0.00% 6 Missing ⚠️
x/tokenfactory/testhelpers/authz.go 0.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/app_helpers.go (1)

3-32: ⚠️ Potential issue | 🟡 Minor

Re-run import formatting to fix CI lint failure.

The import block around Line 31 is currently failing gci (as reported by pipeline). Please reformat this file’s imports to unblock CI.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/app_helpers.go` around lines 3 - 32, Reformat the import block in
app_helpers.go to satisfy gci ordering/formatting: run your project's import
formatter (e.g., goimports/gci) or IDE auto-import cleanup so standard library
("encoding/json") is grouped, third-party and internal imports are ordered per
project rules and blank lines between groups are correct; ensure imports like
ibckeeper, evidencekeeper, feegrantkeeper, sdk, evmkeeper, evmtypes,
erc20keeper, transferkeeper, and others appear in the correct grouped order and
remove any stray spacing so the file passes CI.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/upgrades/v7_1/upgrade.go`:
- Around line 38-40: Replace the hardcoded ICS20 precompile string with the
canonical constant (use the exported ics20.PrecompileAddress from the
precompiles package) and ensure insertion is idempotent by checking whether that
address already exists in newPrecompiles/ActiveStaticPrecompiles before
appending; import the precompile package, compare using the constant
(ics20.PrecompileAddress) and only append if not present to avoid duplicates.

In `@CHANGELOG.md`:
- Line 11: Update the changelog entry that currently reads "Re enabled ICS
precompile" to use the hyphenated form "Re-enabled ICS precompile" for
consistent wording; locate the exact string "Re enabled ICS precompile" in the
changelog and replace it with "Re-enabled ICS precompile".
- Line 6: Update the CHANGELOG entry to accurately reflect the actual EVM
dependency shipped: replace the plain upstream reference to v0.6.0 with the
forked module and version used in go.mod (github.com/KiiChain/evm v0.6.0-fork.1)
and mention that it's provided via a go.mod replace directive so readers can
trace the forked source.

---

Outside diff comments:
In `@app/app_helpers.go`:
- Around line 3-32: Reformat the import block in app_helpers.go to satisfy gci
ordering/formatting: run your project's import formatter (e.g., goimports/gci)
or IDE auto-import cleanup so standard library ("encoding/json") is grouped,
third-party and internal imports are ordered per project rules and blank lines
between groups are correct; ensure imports like ibckeeper, evidencekeeper,
feegrantkeeper, sdk, evmkeeper, evmtypes, erc20keeper, transferkeeper, and
others appear in the correct grouped order and remove any stray spacing so the
file passes CI.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4eee23f8-9b04-40a2-82d3-6e749f351bb5

📥 Commits

Reviewing files that changed from the base of the PR and between 6e20320 and 5a3da4e.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (9)
  • CHANGELOG.md
  • app/app_helpers.go
  • app/apptesting/evm.go
  • app/keepers/keepers.go
  • app/keepers/precompiles.go
  • app/upgrades/v7_1/upgrade.go
  • go.mod
  • wasmbinding/evm/queries.go
  • wasmbinding/evm/reflect_query_test.go

Comment thread app/upgrades/v7_1/upgrade.go Outdated
Comment thread CHANGELOG.md
Comment thread CHANGELOG.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
app/keepers/precompiles.go (1)

149-156: Variable shadows package import alias.

The local variable ics20precompile on line 149 shadows the package alias imported on line 33. While this works, it's inconsistent with other precompiles in this file (e.g., bankPrecompile variable vs bankprecompile package, stakingPrecompile vs stakingprecompile).

♻️ Suggested rename for consistency
-	ics20precompile := ics20precompile.NewPrecompile(
+	ics20Precompile := ics20precompile.NewPrecompile(
 		bankKeeper,
 		stakingKeeper,
 		transferKeeper,
 		channelKeeper,
 		erc20Keeper,
 	)

And update the registration on line 184:

-	precompiles[ics20precompile.Address()] = ics20precompile
+	precompiles[ics20Precompile.Address()] = ics20Precompile
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/keepers/precompiles.go` around lines 149 - 156, The local variable
currently named `ics20precompile` shadows the imported package alias
`ics20precompile`; rename the variable to `ics20Precompile` (camelCase to match
other locals like `bankPrecompile`/`stakingPrecompile`) and update any
subsequent usage/registration where that variable is passed (the precompile
registration call that currently references `ics20precompile`) to use
`ics20Precompile` instead so the package alias remains unshadowed and naming is
consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@app/keepers/precompiles.go`:
- Around line 149-156: The local variable currently named `ics20precompile`
shadows the imported package alias `ics20precompile`; rename the variable to
`ics20Precompile` (camelCase to match other locals like
`bankPrecompile`/`stakingPrecompile`) and update any subsequent
usage/registration where that variable is passed (the precompile registration
call that currently references `ics20precompile`) to use `ics20Precompile`
instead so the package alias remains unshadowed and naming is consistent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 78c2a191-991f-433b-a3ca-528307f075e6

📥 Commits

Reviewing files that changed from the base of the PR and between 5a3da4e and 5bf61cb.

📒 Files selected for processing (3)
  • app/app_helpers.go
  • app/keepers/keepers.go
  • app/keepers/precompiles.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/app_helpers.go

Comment thread app/upgrades/v7_1/upgrade.go Outdated
Thales Zirbel and others added 2 commits March 6, 2026 11:06
# Description

Applies linting

## Type of change

- [x] chore (Updates on dependencies, gitignore, etc)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
Makefile (1)

315-323: Centralize the golangci-lint bootstrap command.

The same toolchain-prefixed install line now lives in both lint and lint-fix, and format bootstraps it separately again. Pulling this into one variable or helper target will make the next Go/golangci-lint bump much harder to miss.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` around lines 315 - 323, Extract the repeated bootstrap/install
command used in the lint, lint-fix (and format) targets into a single reusable
symbol: either a Makefile variable (e.g., GOLANGCI_BOOTSTRAP) or a phony helper
target (e.g., bootstrap-golangci) and replace the inline lines in the lint and
lint-fix recipes with a reference to that variable or a dependency on that
helper target; update the lint, lint-fix, and format targets to use the new
symbol so future Go/toolchain bumps are changed in one place (refer to the
existing lint and lint-fix targets and their inline GOTOOLCHAIN=go1.24.11 go
install
github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(golangci_version)
command when making the change).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@Makefile`:
- Around line 315-323: Extract the repeated bootstrap/install command used in
the lint, lint-fix (and format) targets into a single reusable symbol: either a
Makefile variable (e.g., GOLANGCI_BOOTSTRAP) or a phony helper target (e.g.,
bootstrap-golangci) and replace the inline lines in the lint and lint-fix
recipes with a reference to that variable or a dependency on that helper target;
update the lint, lint-fix, and format targets to use the new symbol so future
Go/toolchain bumps are changed in one place (refer to the existing lint and
lint-fix targets and their inline GOTOOLCHAIN=go1.24.11 go install
github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(golangci_version)
command when making the change).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: eebe9eef-0e0f-44a6-8bca-76c3960223df

📥 Commits

Reviewing files that changed from the base of the PR and between 7695428 and 0e0c948.

📒 Files selected for processing (7)
  • .golangci.yml
  • Makefile
  • app/sim_test.go
  • cmd/kiichaind/cmd/root.go
  • x/oracle/module.go
  • x/tokenfactory/testhelpers/authz.go
  • x/tokenfactory/types/msgs.go
✅ Files skipped from review due to trivial changes (1)
  • x/oracle/module.go

Comment thread Makefile
Comment thread x/tokenfactory/types/msgs.go
Comment thread app/upgrades/v7_1/upgrade.go
Comment thread app/keepers/keepers.go
@Thaleszh Thaleszh merged commit cfe2997 into main Mar 6, 2026
10 of 11 checks passed
@Thaleszh Thaleszh deleted the feat/bump-evm-v0.6.0 branch March 6, 2026 18:00
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