yarn
forge install
Then add a .env
file following the .env.exemple
file
-
Write smart contracts in
src
-
Write unit tests in Solidity using Foundry in
src/test
-
OR
-
in Javascript/Typescript in
test
, you can use typechain (once compilled) in TS -
Then deploy with scripts, you can use
deployed
function in your scripts (see exemple) to save a track of your deployed contract indeployed.json
npx hardhat run --network rinkeby scripts/yourScript.ts
Run the script scripts/utils/verify.ts
, this should be used once the deployed.json
is writen (after deployments).
Always verify the constructor arguments, it can prevent from running this script
After deployment, and if you have a deployed.json
file you can create the list of contracts with address
and abi
in orer to export into the front-end repository:
npx hardhat run --network rinkeby scripts/utils/abiList.ts
- contracts-sizer: https://www.npmjs.com/package/hardhat-contract-sizer
- gas-report: included in Foundry (https://book.getfoundry.sh/forge/gas-reports.html)
- Upgradeable contracts, with the upgraded function for the
deployed.json
, to know the implementation address. - Signature utils