Skip to content

use Foundry + sol! macros for contract tests #163

@haardikk21

Description

@haardikk21

the way the tests currently include dummy contracts is pretty terrible and major tech debt. There's a whole dance to be done manually around constructing a raw transaction, figuring out the txn hash, figuring out the contract address, etc. that needs to happen outside the test files manually and then the test files just have magic raw hex data.

This makes it extremely hard to add new tests or modify existing ones.

We need to significantly improve this situation. We should have an embedded foundry project with test contracts that can be compiled and their artifacts included in the test files with alloy's sol! macro. Then, we can programatically easily construct their deployments and function calls which is significantly more human readable and 100x easier to add/modify new contracts and new tests to the setup.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions