Giter Club home page Giter Club logo

hardhat-boilerplate's Introduction

typescript-hardhat-boilerplate

목차

1.reference

2.installation

3.file directory

4.testing contract

5.environment variables

6.deploying contract

1. reference

2. installation

  • node v16.17.1
  • npm 8.15.0
npm install

2.1 initial setting

npx hardhat init
npm install --save @openzeppelin/contracts
npm install dovenv

3. file directory

3.1 contracts/

  • 스마트 컨트랙트 소스코드 파일 보관

3.2 scripts/

  • 스마트 컨트랙트를 배포할 때 실행하는 스크립트코드 파일 보관

3.3 test/

  • 스마트 컨트랙트를 테스트하는 소스코드 파일 보관

3.4 hardhat.config.ts

  • 이더리움 테스트넷 또는 메인넷 등 스마트 컨트랙트를 배포할 네트워크를 설정할 수 있는 config 파일

4. testing contract

  • test/ 폴더에 있는 파일 실행
npx hardhat test test/Lock.ts

5. environment variables

  • $ touch .env
  • 또는 rename .env.example to .env
ALCHEMY_MUMBAI_API_KEY=
ALCHEMY_SEPOLIA_API_KEY=
PRIVATE_KEY=

6. deploying contract

  • scripts/ 폴더에 있는 파일 실행
  • 로컬에 배포 후 테스트 하는 방법
    • $ npx hardhat node
    • $ npx hardhat run scripts/deploy.ts
# sepolia bscMainnet bscTestnet
npx hardhat run scripts/deploy.ts --network mumbai

hardhat-boilerplate's People

Contributors

byeonghunkim avatar

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.