Skip to content

Latest commit

 

History

History
79 lines (50 loc) · 1.76 KB

README.md

File metadata and controls

79 lines (50 loc) · 1.76 KB

If you are from the eth-global/encode hackathon https://github.com/flare-foundation/flare-hardhat-starter/tree/encode-hackathon is the branch you look for

Flare Hardhat Starter Kit

IMPORTANT!! The supporting library uses Openzeppelin version 4.9.3, be careful to use the documentation and examples from that library version.

Getting started

If you are new to Hardhat please check the Hardhat getting started doc

  1. Clone and install dependencies:

    git clone https://github.com/flare-foundation/flare-hardhat-starter.git
    cd flare-hardhat-starter

    and then run:

    yarn

    or

    npm install
  2. Set up .env file

    mv .env.example .env
  3. Change the PRIVATE_KEY in the .env file to yours

  4. Compile the project

    yarn hardhat compile

    or

    npx hardhat compile

    This will compile all .sol files in your /contracts folder. It will also generate artifacts that will be needed for testing. Contracts Imports.sol import MockContracts and Flare related mocks, thus enabling mocking of the contracts from typescript.

  5. Run Tests

    yarn hardhat test

    or

    npx hardhat test
  6. Deploy

    Check the hardhat.config.ts file, where you define which networks you want to interact with. Flare mainnet & test network details are already added in that file.

    Make sure that you have added API Keys in the .env file

    npx hardhat run scripts/tryDeployment.ts

Resources