-
Using as a referenece
.env.example
create a.env
and set the environment variables. If you don't already have a BIP-39 compatible mnemonic, use this website to generate one. -
Install the dependencies:
yarn install
Compile the smart contracts with Hardhat:
$ yarn compile
Compile the smart contracts and generate TypeChain artifacts:
$ yarn typechain
Lint the Solidity code:
$ yarn lint:sol
Lint the TypeScript code:
$ yarn lint:ts
Run the Mocha tests:
$ yarn test
Generate the code coverage report:
$ yarn coverage
See the gas usage per unit test and average gas per method call:
$ REPORT_GAS=true yarn test
Delete the smart contract artifacts, the coverage reports and the Hardhat cache:
$ yarn clean
You can enjoy syntax highlighting for your Solidity code via the vscode-solidity extension. The recommended approach to set the compiler version is to add the following fields to your VSCode user settings:
{
"solidity.compileUsingRemoteVersion": "v0.8.17+commit.8df45f5f",
"solidity.defaultCompiler": "remote"
}
Where of course v0.8.17+commit.8df45f5f
can be replaced with any other version.
Solidity settings are:
{
"solidity.formatter": "prettier"
}
Stack:
- Hardhat: compile and run the smart contracts on a local development network
- TypeChain: generate TypeScript types for smart contracts
- Ethers: renowned Ethereum library and wallet implementation
- Waffle: tooling for writing comprehensive smart contract tests
- Solhint: linter
- Solcover: code coverage
- Prettier Plugin Solidity: code formatter
- Chainlink Smart Contracts: Chainlink smart contracts and their ABIs
Faucets:
Explorers:
- ARB Goerli
- ARB Mainnet
- ARB Rinkeby
- AVAX Fuji
- AVAX Mainnet
- BSC Mainnet
- BSC Tesnet
- ETH Goerli
- ETH Kovan
- ETH Mainnet
- ETH Rinkeby
- FTM Mainnet
- FTM Testnet
- HECO Mainnet
- HECO Testnet
- KLAYTN Baobab
- MATIC Mainnet
- MATIC Mumbai
- METIS Mainnet
- MOONBEAM Mainnet
- MOONBEAM Moonriver
- ONE Mainnet
- OPT Goerli
- OPT Kovan
- OPT Mainnet
- POA Sokol
- RSK Mainnet
- XDAI Mainnet
Free Tier Providers: