filecoin-project / filecoin-solidity

Filecoin Solidity API Library
Other
17 stars 11 forks source link

Alternative testing setup that enables the use and testing of proxy mechanisms (#2) #18

Closed wertikalk closed 10 months ago

wertikalk commented 11 months ago

Description:

This setup provides a more readable and concise way of testing when compared to present rust tests.

Related to #2 . It enables the use of hardhat's openzeppelin upgrade plugin needed for closing the issue.

Note: It creates a hybrid foundry-hardhat project

Setup:

How it works (Overview)

It utilises Lotus CLI and Lotus Miner CLI to create new accounts that will be used in the hardhat test and to issue additional commands needed to sign messages and change the miner's control address (Note: miner's control addresses is the address that has the privilege to publish deals on the behalf of the provider).

Test flow

Sample file: ./hh-test/market.sample.t.ts

Scenario:

For proxy tests, this scenario will be expanded such that deal publishing/checking is performed before and after the upgrade.

Additional useful material

Fixes #2

maciejwitowski commented 10 months ago

LGTM. @bojinovic can we merge this?