Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

TreasureProject/treasure-project-contracts

Repository files navigation

Treasure Project

Development

Install dependencies via Yarn:

yarn install

Setup Husky to format code on commit:

yarn prepare

Compile contracts via Hardhat:

yarn run hardhat compile

Networks

Configurations are defined for mainnet and rinkeby networks. Network forking is also available, and can be utilized by setting the FORK_MODE environment variable to true and FORK_NETWORK to either mainnet or rinkeby.

Testing

Test contracts via Hardhat:

yarn run hardhat test

Activate gas usage reporting by setting the REPORT_GAS environment variable to "true":

REPORT_GAS=true yarn run hardhat test

Generate a code coverage report using solidity-coverage:

yarn run hardhat coverage

Documentation

A documentation site is output on contract compilation to the docgen directory. It can also be generated manually:

yarn run hardhat docgen