This repo will have a code of Gooddoer Smart Contracts.
{
"INFURA_KEY": "",
"DEPLOYER_KEY": "",
"ETHERSCAN_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": {},
"SCRIPTS": {
"OPERATOR_KEY": ""
}
}
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