filecoin-project / filecoin-project/devgrants

Grant Proposal: FEVM Precompile Testing Harness

Open
#2,181 0 comments 0 reactions 0 assignees View on GitHub
Open Grant
Dominant language
No language data
Stars
409
Forks
311
PR merge metrics
No merged PRs in 30d

Description

**Project Name:** FEVM Precompile Testing Harness (`fevm-foundry-harness`)
**Proposal Category:** Developer Tooling / FEVM Infrastructure
**Individual or Entity Name:** ILE Labs
**Proposer:** Charles Emmanuel
**Project Repo(s):** N/A
**Filecoin ecosystem affiliations:** `foc-devkit` — local FVM development environment and testing framework for Filecoin Onchain Cloud
**Technical Sponsor:** N/A
**Do you agree to open source all work you do on behalf of this RFP under the MIT/Apache-2 dual-license?:** Yes

---

### 1. What is your project and what problem does it solve?

Standard EVM test runners (Foundry/Forge with `revm`, Hardhat) fail when executing FEVM smart contracts that import official Filecoin libraries (`MarketAPI`, `MinerAPI`). This occurs because precompile address `0xfe00000000000000000000000000000000000005` (`CALL_ACTOR_ID`) is unetched in local EVM state, returning empty 0-bytes and breaking downstream CBOR decoders. Existing mocks (`MarketMockAPI`) require developers to rewrite production smart contracts to inject mock addresses. `fevm-foundry-harness` solves this by providing a precompile dispatcher etched to `0xfe00...05` via `vm.etch`, enabling zero-code-modification testing for FEVM Solidity applications.

---

### 2. How is Filecoin used in this project?

This project directly supports the FEVM developer ecosystem. It emulates Filecoin's native actor precompiles (`CALL_ACTOR_ID` at `0xfe00000000000000000000000000000000000005`) within standard local Solidity testing environments. By intercepting raw CBOR calldata and returning valid Filecoin DagCBOR response payloads (such as storage deal status, sector metrics, and balance checks), it enables developers to test complex contract logic locally prior to mainnet/calibration deployment, driving faster dApp iteration on Filecoin.

---

### 3. How will you improve your project with this grant?

| Number | Grant Deliverable | How We Will Meet It | Timeframe | Milestone Funding |
| :---: | :--- | :--- | :---: | :---: |
| **1** | **Core Precompile Dispatcher & Primary Actor Engine** | Build `FEVMPrecompileDispatcher.sol` etched to `0xfe00...05` via `vm.etch` to intercept low-level calls and dispatch CBOR parameters for Market (`0x64`) and Miner (`0x02`) actors. | Weeks 1–3 | **$5,000 USD** |
| **2** | **Complete Actor Fixtures, Test Suite & Starter Kit** | Implement CBOR fixture builders for VerifReg/Power actors, comprehensive Forge test suite, recorded video walkthrough, and production-ready starter template repository. | Weeks 4–6 | **$5,000 USD** |

---

### 4. Total amount of this grant request

**$10,000 USD**
*Milestone 1 (Weeks 1–3): $5,000 USD*
*Milestone 2 (Weeks 4–6): $5,000 USD*

---

### 5. Adoption, Reach, and Growth Strategies

The target audience includes Solidity developers building smart contracts on FEVM (storage DAOs, deal automation, data DAOs). We will promote the tool through Filecoin developer channels (Discord, Slack, GitHub discussions) and publish a step-by-step tutorial on integrating `fevm-foundry-harness` into existing Foundry workflows. By removing the friction of local precompile testing, this tool will lower the barrier to entry for EVM developers building on Filecoin.

---

### 6. Monthly project updates
Yes

---

### 7. Community Code of Conduct
Yes

---

### 8. Links and submissions
[github.com/ILE-Labs/foc-devkit](https://github.com/ILE-Labs/foc-devkit)

---

### Team Members

* **Charles Emmanuel — Project Lead**
Grant coordination, ecosystem strategy, documentation. Active in Arbitrum and Filecoin ecosystems with major contributions to sponsored ecosystem projects. GitHub: [github.com/CodexEmmzy](https://github.com/CodexEmmzy)

* **Gospel Ifeadi (Steven Hert) — Lead Solidity/Rust Engineer**
Rust systems programming, EVM smart contracts, FEVM infrastructure. Led development of `foc-devkit` — ILE Labs' existing Filecoin FVM local development environment that boots a complete local FVM environment with mock contracts. Primary engineer on this proposal. GitHub: [github.com/steven3002](https://github.com/steven3002)

* **Gideon Bature — Blockchain Developer (Solidity/EVM/Tooling)**
Software engineering, DevOps, Solidity, Rust, JavaScript. Strong foundation in EVM tooling and smart contract infrastructure. GitHub: [github.com/GideonBature](https://github.com/GideonBature)

---

### Previous Projects and Experience

* **`foc-devkit`** — [github.com/ILE-Labs/foc-devkit](https://github.com/ILE-Labs/foc-devkit)
Local FVM development environment and testing framework for Filecoin Onchain Cloud. Boots a complete local FVM environment with all four FOC mock contracts. This is ILE Labs' primary prior Filecoin contribution and the direct credibility basis for this proposal. The experience building `foc-devkit` gave the team deep familiarity with FVM contract architecture, local testing patterns, and the gap that `fevm-foundry-harness` now fills at the Foundry/Forge layer.

* **`stylus-debug-suite`** — [github.com/ILE-Labs/stylus-debug-suite](https://github.com/ILE-Labs/stylus-debug-suite)
Production Rust debugging toolkit. Live on crates.io with 25+ downloads across two released versions. Demonstrates the team's ability to ship production developer infrastructure tools that other engineers depend on — the same standard `fevm-foundry-harness` will be held to.

---

### How did you learn about this grant type program?
Filecoin community programs.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the linked foc-devkit repository and the proposal's two milestones; this issue names no target files or tests. The proposed work is complete when the precompile dispatcher, actor fixtures, Forge test suite, walkthrough, and starter template are delivered.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, solidity
Domain
blockchain, devtools, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.