Project Types

Hardhat Project

We need a .js file that fully deploys the projects.

Example:

import { ethers } from "hardhat";

async function main() {
  ...
  const lock = await ethers.deployContract("Lock");
	...
}

main().catch((error) => {
  ...
});

Please ensure the project can be fully deployed by running node deploy.js to a local testnet (anvil / Ganache) and the integration test does not fail.

Foundry

We need a .sol file with a contract containing setUp function, and invoking this function can fully deploy the project.

Example:

pragma solidity ^0.8.13;

import "forge-std/Test.sol";

contract ContractTest is Test {
    function setUp() public {
			vm.startPrank(...);
			new Project();
			...
		}
}

Please ensure the project can be fully deployed by running forge test -mc deploy.sol -vvv

Note: all Foundry VM cheatcodes are supported, including the invariant test qualifiers.

Vanilla Solidity

We need a JSON-formatted string containing the deployment configuration. It shall contain all contracts that needed to be deployed, which is a map from contract file name to (a map from contract name to configs). All file names and contract names available can be obtained from **results** Build artifacts URL, this will be consumed by other services Contracts not mentioned in offchain_config are not deployed or tested.

Example:

{"src/Counter.sol":{"Counter":{"constructor_args":"","address":"0x6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b"}},"src/Counter2.sol":{"Test2":{"constructor_args":"0x00000000000000000000000000000000000000000000000000000144bc78b202","address":"0x8B5b40e31dCB1166f17d31315E3b17b6Bfc82B37"}}}

External Dependencies