Solidity Smart Contract development template using modern Web3 frameworks/tools including Hardhat, Typechain and more.
For testing features see README-testing.md
This project uses special tasks, adapted from Balancer protocol, to deploy and verify contracts which provides methods for saving custom outputs and easily verifying contracts as well as compartmentalizing different types of deployments.
.env
env
variables before deployment/verification_MNEMONIC
for deployments_API_KEY
for verificationsetherscan
.npx hardhat run ./scripts/deploy/deployLock.ts --network <network>
etherscan
and the DeployManager can use that to verify contracts after deployment.This project uses Prettier, an opinionated code formatter, to keep code styles consistent. This project has additional plugins for Solidity support as well.
yarn lint
: Check Solidity files & TS/JS filesyarn lint:fix
: Fix Solidity files & TS/JS filesprettier.config.js: Provide config settings for Solidity under overrides
.
.solhint.json: Provide config settings for solhint
.
yarn lint:sol
: Check Solidity files
yarn lint:sol:fix
: Fix Solidity files
tsc
to build files to dist/
.files
as there are a lot of support files included in this repo.Consider including only what is needed.
"files": [
"dist/index.js",
"dist/index.d.ts",
"dist/src/**/*",
"dist/typechain-types/**/*",
// "dist/artifacts/**/*"
],
package.json
:
"lint:ts": "prettier --check './{scripts,tasks,src,hardhat,test}/**/*.ts'"