Skip to content

AmadiaFlare/flare-hardhat-starter

 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 57.2%
  • Solidity 42.8%