Giter VIP home page Giter VIP logo

evm-rd's Introduction

template-web3-back-sol-hardhat

template repository for web3 back-end using solidity and hardhat

stacks

stack category description
solidity dev language of smart contract
hardhat dev smart contract framework
ethers dev javascript library for dapps
typechain build provide abi to front-end test
waffle test testing framework for smart contract
mocha test testing framework for bdd / tdd
chai test assertion library
hardhat-gas-reporter test ethereum gas reporter
solidity-coverage test coverage tool
solhint static check linter for solidity
eslint static check linter for javascript / typescript
prettier static check fix style automatically
husky static check prevent to commit non checked code

how to use this template?

  • update xxx on package.json
  • delete sample code under ./contracts, ./test and ./scripts
    • ./contracts : sample solidity code.
    • ./test : sample test code of contract.
    • ./scripts : sample deploy script.
  • set environment variables to .env. sample env is .env.sample.
    • ALCHEMY_API_KEY : for deploy via Alchemy api. please get api key from here
    • PRIVATE_KEY : your private key.
    • ETHERSCAN_API_KEY : your etherscan api key. use it to verify source code on etherscan. please get api key from here
    • COIN_MARKET_CAP_API_KEY : your coin market cap api key. use it to know USD price of eth. please get api key from here

how to verify your source code on etherscan?

case.1: if contract hasn't constructor or has constructor with no arguments.

yarn verify-goerli YOUR_CONTRACT_ADDRESS

/* sample */
yarn verify-goerli 0x3A345Cef4a5d672BADa38f9f03fc09Eb67e70e39

case.2: if contract has constructor with arguments.

yarn verify-goerli YOUR_CONTRACT_ADDRESS CONSTRUCTOR_ARGUMENTS_1
yarn verify-goerli YOUR_CONTRACT_ADDRESS CONSTRUCTOR_ARGUMENTS_1 CONSTRUCTOR_ARGUMENTS_2 ...

/* sample */
yarn verify-goerli 0x3A345Cef4a5d672BADa38f9f03fc09Eb67e70e39 "hello"
yarn verify-goerli 0x3A345Cef4a5d672BADa38f9f03fc09Eb67e70e39 "hello" "world" ...

case.3: if you want to specify contract code. e.g. same structure contract on your repository.

yarn verify-goerli --contract YOUR_CONTRACT_CODE_PATH:YOUR_CONTRACT_NAME YOUR_CONTRACT_ADDRESS

/* sample */
yarn verify-goerli --contract contracts/Token.sol:Token 0x3A345Cef4a5d672BADa38f9f03fc09Eb67e70e39

how to use docker

  • run docker: docker-compose up -d
  • copy private key from console
  • set private key to .env

evm-rd's People

Contributors

osaguild avatar

Stargazers

Jonas Engelhardt avatar

Watchers

 avatar  avatar

Forkers

lanceyan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.