contracts & tests
SBTs research and considerations.
- Install foundry.
- Clone repo.
cdinto repo.- Run
forge install. pip install pre-commit.pre-commit installto install the fmt and gas snapshot pre-commit hook.
- To build, run
forge build. - To run tests, run
forge test. - To check coverage, run
forge coverage. - To run slither, install it and run
slither .. - To run mythril, install it and run
myth analyze src/Credentials/Credentials.sol --solc-json mythril.config.jsonor similar. - To get a list of all the available methods of a contract, run
forge inspect src/Credentials/Credentials.sol:Credentials methodsor similar.
more info about foundry: foundry book
- Run
anvil, which creates a local EVM network. - Copy one of the private keys and paste it in the
.envfile. - Open another terminal and run
source .env. - Run
forge script script/Credentials.s.sol:LocalDeploy --fork-url $LOCAL_RPC_URL --broadcast.