Skip to content

add FVM mock precompile helpers for Anvil integration tests#659

Draft
parkan wants to merge 1 commit intomainfrom
feat/fvm-precompile-mocks
Draft

add FVM mock precompile helpers for Anvil integration tests#659
parkan wants to merge 1 commit intomainfrom
feat/fvm-precompile-mocks

Conversation

@parkan
Copy link
Copy Markdown
Collaborator

@parkan parkan commented Apr 11, 2026

Deploy mock Filecoin precompiles (from fvm-solidity) at their canonical 0xFE00... addresses via anvil_setCode. This lets contracts that call RESOLVE_ADDRESS, CALL_ACTOR_BY_ID, etc. get working responses on Anvil forks instead of reverting on empty addresses.

  • SetupFVMPrecompiles(t, rpcURL): deploys all 3 mock precompiles
  • RegisterActorID(t, rpcURL, evmAddr, actorID): registers address->actor mapping
  • Vendored compiled bytecodes from fvm-solidity mocks (FVMActor, FVMCallActorById, FVMCallActorByAddress)
  • Integration tests verifying deployment and address resolution

Deploy mock Filecoin precompiles (from fvm-solidity) at their canonical
0xFE00... addresses via anvil_setCode. This lets contracts that call
RESOLVE_ADDRESS, CALL_ACTOR_BY_ID, etc. get working responses on Anvil
forks instead of reverting on empty addresses.

- SetupFVMPrecompiles(t, rpcURL): deploys all 3 mock precompiles
- RegisterActorID(t, rpcURL, evmAddr, actorID): registers address->actor mapping
- Vendored compiled bytecodes from fvm-solidity mocks (FVMActor, FVMCallActorById, FVMCallActorByAddress)
- Integration tests verifying deployment and address resolution
@parkan parkan force-pushed the feat/fvm-precompile-mocks branch from 3333338 to ef8d012 Compare April 11, 2026 11: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.

1 participant