Skip to content
forked from linkpoolio/draft

Direct Request Automation Framework for Testing

License

Notifications You must be signed in to change notification settings

vnavascues/draft

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DRAFT - Direct Request Automation Framework for Testing

Blogposts

Content

Usage

DRAFT - From Zero To Hero

Pre Requisites

  1. 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.

  2. Install the dependencies:

yarn install

Compile

Compile the smart contracts with Hardhat:

$ yarn compile

TypeChain

Compile the smart contracts and generate TypeChain artifacts:

$ yarn typechain

Lint Solidity

Lint the Solidity code:

$ yarn lint:sol

Lint TypeScript

Lint the TypeScript code:

$ yarn lint:ts

Test

Run the Mocha tests:

$ yarn test

Coverage

Generate the code coverage report:

$ yarn coverage

Report Gas

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

$ REPORT_GAS=true yarn test

Clean

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

$ yarn clean

IDE Setup

Syntax Highlighting

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.17+commit.8df45f5f",
  "solidity.defaultCompiler": "remote"
}

Where of course v0.8.17+commit.8df45f5f can be replaced with any other version.

Linting and Style

VSCode

Solidity settings are:

{
  "solidity.formatter": "prettier"
}

Resources

Stack:

Faucets:

Explorers:

Free Tier Providers:

About

Direct Request Automation Framework for Testing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 85.3%
  • Solidity 14.1%
  • Other 0.6%