- TypeScrip;
- JavaScript;
- TypeChain;
- SolHint;
- Prettier;
- SolCover;
- Eslint;
- CleanDeployments;
- VerifyByName;
- Convenient configuration of your variables for different networks.
- Deployment of contracts with type support.
- Verification of contracts in a convenient way through the Contract Name.
- Configuring Solidity + TypeScript Linters and Validators.
- Pre-set most popular networks.
- Convenient prepared folder and file structure.
- Additional Utils for testing and interacting with smart contracts.
- An easy-to-use task to clean up deployments.
- Convenient and flexible configuration of logs, forks and gas reports.
- Typed NamedAccounts from convenient interaction.
For more convenient use, you can fork this repository for yourself and make it your personal template.
As an author, I will be very pleased that my build was able to improve your experience in developing amazing decentralized applications.
❗ Send me your comments and suggestions. ❗
This repo will have a code of < Project Name > Smart Contracts.
yarn install
yarn compile
yarn migrate:<NETWORK> (mainnet, goerli, polygon, polygonMumbai, bsc, bscTestnet)
To verify the contract, you must specify the names of the contracts for verification through "," WITHOUT SPACES
yarn verify:<NETWORK> <NAME_CONTRACT_FIRST>,<NAME_CONTRACT_SECOND>
# Run Tests
yarn test
# Run test watcher
yarn test:watch
NOTE:// To work with a node or fork, you need to run the node in a separate console
# Run Node hardhat (For run localfork setting config { FORK_ENABLED: true, FORK_PROVIDER_URI: "https://...."})
yarn node
# Run test watcher
yarn test:node
yarn coverage
You can start the gas reporter either through a separate gas reporter script through "yarn" or by changing the variable in the config "GAS_REPORTER.ENABLED" when running tests
# Native gas reporter
yarn gas-reporter
# GAS_REPORTER.ENABLED = true
yarn test
# Rm artifacts, cache, typechain-types
yarn clean
# Rm deployments for choose network
yarn clean:deployments <NETWORK>
# Checking code style for .ts, .sol
yarn lint
# Run fix code style for .ts, .sol
yarn lint:fix
# Checking code style for .ts
yarn lint:ts
# Run fix code style for .ts
yarn lint:ts:fix
# Checking code style for .sol
yarn lint:sol
# Run fix code style for .sol
yarn lint:sol:fix
To run the analyzer, you must first install it globally
To audit all contracts, use the command :
slither .
To exclude warnings in subsequent audits, use :
slither . --triage
{
"INFURA_KEY": "",
"DEPLOYER_KEY": "",
"ETHERSCAN_API_KEY": "",
"POLYGONSCAN_API_KEY": "",
"BSCSCAN_API_KEY": "",
"GAS_PRICE": "",
"NODE": {
"GAS_PRICE": "auto",
"LOGGING": true,
"FORK": {
"FORK_PROVIDER_URI": "",
"FORK_ENABLED": false
}
},
"GAS_REPORTER": {
"ENABLED": false,
"COINMARKETCAP": "",
"CURRENCY": "USD",
"TOKEN": "ETH",
"GAS_PRICE_API": "https://api.etherscan.io/api?module=proxy&action=eth_gasPrice"
},
"DEPLOY": {}
}