feat(move): expose fee payer in move context#523
Conversation
📝 WalkthroughWalkthroughThis PR adds fee payer awareness to the Move VM execution environment by replacing the standalone ChangesFee payer context enrichment for Move VM
🎯 3 (Moderate) | ⏱️ ~25 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies" Comment |
Dependency ReviewThe following issues were found:
License Issuesgo.mod
OpenSSF Scorecard
Scanned Files
|
baaed66 to
18ac12e
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
Dockerfile (1)
12-12: EnsureLIBMOVEVM_VERSION=v1.3.0has requiredmovevmrelease artifacts
- Docker pulls
libmovevm_muslc.${ARCH}.aandlibcompiler_muslc.${ARCH}.afrominitia-labs/movevmreleasev1.3.0, and the Go module bump tov1.3.0is consistent.- The
movevmreleasev1.3.0includes all required muslc static libraries:libmovevm_muslc.{x86_64,aarch64}.aandlibcompiler_muslc.{x86_64,aarch64}.a.- SHA256 verification commands in the Dockerfile remain commented out (optional hardening, but pre-existing).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Dockerfile` at line 12, Confirm that the Dockerfile's ENV LIBMOVEVM_VERSION=v1.3.0 points to a release that contains the required muslc static libraries; check the `initia-labs/movevm` release v1.3.0 for the artifacts `libmovevm_muslc.x86_64.a`, `libmovevm_muslc.aarch64.a`, `libcompiler_muslc.x86_64.a`, and `libcompiler_muslc.aarch64.a`; if any are missing, update ENV LIBMOVEVM_VERSION to a release that includes them or add the missing artifacts to the build source, and optionally re-enable and update the commented SHA256 verification commands in the Dockerfile to validate those downloaded files.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@x/move/keeper/contracts/sources/TxContextTests.move`:
- Line 10: The test calls transaction_context::fee_payer() which doesn't exist
in initia_std; either update the test to call the correct exported accessor or
add the missing export. Locate the transaction context module
(initia_std::transaction_context) and either (A) change the call in
TxContextTests.move from transaction_context::fee_payer() to the actual provided
API (e.g., the existing getter name such as get_fee_payer or fee_payer_address —
confirm by searching for functions returning Option<address> in
transaction_context), or (B) if the intended API is missing, add and export a
public function fee_payer(): Option<address> in initia_std::transaction_context
that returns the fee payer from the internal context so the test can call
transaction_context::fee_payer().
---
Nitpick comments:
In `@Dockerfile`:
- Line 12: Confirm that the Dockerfile's ENV LIBMOVEVM_VERSION=v1.3.0 points to
a release that contains the required muslc static libraries; check the
`initia-labs/movevm` release v1.3.0 for the artifacts
`libmovevm_muslc.x86_64.a`, `libmovevm_muslc.aarch64.a`,
`libcompiler_muslc.x86_64.a`, and `libcompiler_muslc.aarch64.a`; if any are
missing, update ENV LIBMOVEVM_VERSION to a release that includes them or add the
missing artifacts to the build source, and optionally re-enable and update the
commented SHA256 verification commands in the Dockerfile to validate those
downloaded files.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: cc5320c6-1acc-4c89-a962-b76ba4810b94
⛔ Files ignored due to path filters (2)
go.modis excluded by!**/*.modgo.sumis excluded by!**/*.sum,!**/*.sum
📒 Files selected for processing (15)
Dockerfileapp/ante/ante.goapp/ante/minimal.gox/move/ante/gas_prices.gox/move/ante/move_context.gox/move/ante/move_context_test.gox/move/keeper/account_abstraction.gox/move/keeper/binaries/TxContextTests.mvx/move/keeper/common_test.gox/move/keeper/contracts/sources/TxContextTests.movex/move/keeper/genesis.gox/move/keeper/handler.gox/move/keeper/transaction_context_test.gox/move/types/env.gox/move/types/keys.go
💤 Files with no reviewable changes (1)
- x/move/ante/gas_prices.go
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #523 +/- ##
==========================================
+ Coverage 38.40% 38.41% +0.01%
==========================================
Files 327 327
Lines 30676 30685 +9
==========================================
+ Hits 11782 11789 +7
- Misses 17004 17006 +2
Partials 1890 1890
🚀 New features to boost your workflow:
|
Description
Closes: N/A
This PR wires movevm v1.3.0's
Env.FeePayersupport into Initia's Move execution path.What changed:
github.com/initia-labs/movevmand the DockerLIBMOVEVM_VERSIONto v1.3.0.MoveContextDecorator, with deprecatedGasPricesDecoratoraliases kept for compatibility.types.NewEnvfor entry functions, scripts, views, and account abstraction authentication.TxContextTeststest module and a keeper regression test that executesstore_fee_payer, reads the stored value back with a view function, and compares it with the expected fee payer.Validation:
go test ./x/move/keeper -run TestExecuteEntryFunctionWithFeePayer -count=1go test ./x/move/...go test ./app/anteAuthor Checklist
I have...
!in the type prefix if API or client breaking change (not applicable)main)Reviewers Checklist
I have...