filecoin-project / filecoin-solidity

Filecoin Solidity API Library
Other
17 stars 11 forks source link

[M4] Test suite expansion - Hardhat tests #44

Closed wertikalk closed 3 months ago

wertikalk commented 9 months ago

Context

Majority of current tests are written in Rust, which instantiate ref-fvm.

Writing and maintaing them is time intensive, both because of the slow compilation/run time, but also because of the not fully matured Rust EVM tooling.

Approach

We propose to expand the current test suite with Hardhat tests that will run on filecoin-fvm-localnet.

An example of how this will look like is ./hh-test/market.sample.t.ts (inspired by ./testing/tests/market.rs).

With this approach we can arrange scenarios in which we control both the user and the provider accounts, enabling us to create complex flows that would not be possible on public testnets/mainnet.

Additionally, the code written in these tests would be used to provide FEVM Solidity developers with examples on the filecoin-solidity lib use.