app | docs | discord | blog |
Smart Contracts powering the Porter protocol.
For local development there are environment variables necessary to enable some hardhat plugins.
Using hardhat-deploy all of the scripts in the ./deploy
folder are run.
Deploying to rinkeby
npx hardhat deploy --network rinkeby
Verify deployed contracts with hardhat-etherscan
.
npx hardhat verify <address>
Running the hardhat test suite
npx hardhat test
Fork testing requires first running the mainnet-fork
npx hardhat node
and making the target for testing the local node
npx hardhat test --network localhost
Running the fuzzing test suite with Echidna
- Get latest release https://github.com/crytic/echidna
- Install to
/usr/local/bin
npm run echidna
- change the config located at
echidna.config.yaml
to tweak execution
npx hardhat help
npx hardhat compile # create contract artifacts
npx hardhat clean # removes artifacts and maybe other things
npx hardhat coverage # runs the contract coverage report
npx hardhat integration # runs the integration task
npx eslint '**/*.{js,ts}' --fix
npx prettier '**/*.{json,sol,md,ts}' --write
npx solhint 'contracts/**/*.sol' --fix