feat(evm): migrate storageprovider precompile to native runtime base#338
Merged
phenix3443 merged 1 commit intoJul 14, 2026
Merged
Conversation
Move the storageprovider precompile onto x/evm/precompiles/base: - embed base.Precompile; Run delegates to RunPrecompile; dispatch moves to Execute using the existing handler map, method routing + read-only write protection via the base Dispatch (SetupABI) with IsTransaction - drop the hand-rolled cache-context / snapshot / commit template - IsTransaction is derived from ABI mutability (!method.IsConstant()) Runtime alignment only: EOA-only guards and per-handler readonly checks are kept; no balance handler is wired (updateSPPrice moves no bank coins). The storageprovider baseline failure test is updated for native revert semantics: the "StorageProvider does not exist" reason is now decoded from the revert return data via abi.UnpackRevert.
This was referenced Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Part of subtask 3 (storage-series) of the precompile → cosmos/evm native-mode migration. Migrates the storageprovider precompile onto
x/evm/precompiles/base.Changes
Contractembedsbase.Precompile;Rundelegates toRunPrecompile; dispatch moves toExecute(existing handler map + baseDispatch/SetupABIfor routing and read-only write protection).IsTransactionis derived from ABI mutability (!method.IsConstant()) — uniform rule reused across the remaining precompiles.Behavior change (native revert semantics)
Same as bank #337: failures now revert with the reason ABI-encoded in the return data. The storageprovider baseline
TestUpdateSPPrice_FailureDoesNotMutateState(merged in #334) is updated to decodeStorageProvider does not existviaabi.UnpackRevert(res.Ret); the state-invariant and EOA-only assertions are unchanged.Tests
go test ./x/evm/precompiles/storageprovider -count=1→ ok.precompile-integration.