blackironj / solidity-template

with hardhat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Basic Solidity template using hardhat

This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, a sample script that deploys that contract, and an example of a task implementation, which simply lists the available accounts.

Try running some of the following tasks:

Prerequisite

  • node v16
  • Burnable Wallet address & private key for testing

    ⚠️ I would recommand that do not use a real wallet for testing!

  • Alchemy API key
  • Etherscan API key
  • Install yarn & dependencies
    npm install -g yarn
    yarn install

Quick start

  • compile contract
yarn compile
  • How to deploy sample contract to sample
    • create .env file and write down env value
      ROPSTEN_URL=https://eth-ropsten.alchemyapi.io/v2/YOUR_API_KEY
      # you can add more network URL
      PRIVATE_KEY=YOUR_BURNABLE_WALLET_PRIVATE_KEY
      ETHERSCAN_API_KEY=YOUR_ETHERSCAN_API_KEY
      
    • Deploy your contract
      yarn deploy:ropsten
    • Verify contract address
      yarn verify:ropsten <YOUR_CONTRACT_ADDRESS>

About

with hardhat


Languages

Language:TypeScript 57.6%Language:Solidity 42.4%