Skip to content

Latest commit

 

History

History
110 lines (71 loc) · 1.59 KB

README.md

File metadata and controls

110 lines (71 loc) · 1.59 KB

DSA Resolvers

Usage

Pre Requisites

Before running any command, make sure to install dependencies:

$ npm install

Compile

Compile the smart contracts with Hardhat:

$ npm run compile

TypeChain

Compile the smart contracts and generate TypeChain artifacts:

$ npm run typechain

Lint Solidity

Lint the Solidity code:

$ npm run lint:sol

Lint TypeScript

Lint the TypeScript code:

$ npm run lint:ts

Test

Run tests using interactive CLI

$ npm run test:runner

Run all the tests:

$ npm run test

Coverage

Generate the code coverage report:

$ npm run coverage

Report Gas

See the gas usage per unit test and average gas per method call:

$ REPORT_GAS=true npm run test

Clean

Delete the smart contract artifacts, the coverage reports and the Hardhat cache:

$ yarn clean

Deploy

Deploy the contracts to Hardhat Network:

$ npm run deploy

Deploy the contracts to a specific network, such as the Ropsten testnet:

$ npm run deploy:network ropsten

Syntax Highlighting

If you use VSCode, 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.4+commit.c7e474f2",
  "solidity.defaultCompiler": "remote"
}

Where of course v0.8.4+commit.c7e474f2 can be replaced with any other version.