Skip to content

Xiawpohr/dapp-contracts-boilerplate

Repository files navigation

DApp contract boilerplate

Tools

Get Started

npm install
npx builder

change .env.example to .env, and set up your environment variables. Noted: There should be a prefix 0x in private key.

Folder structure

  • artifacts: all constract artifacts are under this folder
  • contracts: all contracts are under this folder
  • scripts: all scripts are under this folder
  • test: all tests are under this folder

Compile contract

npm run compile

After compiling, contract artifacts will be located under artifacts folder.

Lint

Lint with Solhint

npm run lint

If you want to prettier your solidity codes, run

npm run prettier

Test

npm run test

You can specify network options to test contracts on testnet.

npm run test:rinkeby
npm run test:ropsten

Flatten your contracts

npm run flatten

Open console

Using buidler console

npm run console

Write your scripts

You can write your custom scripts, and run.

Write your tasks

Creating tasks

About

The boilerplate for solidity contract development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published