Idle-Finance / idle-foundry-template

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Idle Foundry Template

Based on https://github.com/libevm/forge-example

with some minor modifications/additions to the solidity side such as BaseTest.sol

Overview

  • Uses forge to compile, test, and debug.
  • Uses a custom JS script to deploy, see deploy.js.

Development

Building and testing

forge install
forge build
forge test

Other useful commands:

  • forking from existing state
# -vvv = very very verbose
forge test -f http://127.0.0.1:8545 -vvv
  • access the debugger
forge run --debug src/test/Contract.t.sol --sig "testExample()"
  • run test on a single contract
forge test --match-contract Test3

Contract Deployment

Copy .env.example to .env and fill it out with correct details.

node --experimental-json-modules scripts/deploy.js

Etherscan Verification

Check here https://github.com/libevm/forge-example#etherscan-verification

About


Languages

Language:JavaScript 82.0%Language:Solidity 16.8%Language:Shell 1.2%