Pharo
  • 🟢Getting Started
  • 🤝Meet Pharo
    • ❔Why Pharo
    • 🌪️Use Cases
    • 📐Architecture
  • ✨Protocol
    • 🎨Product Design
    • 💰Pricing Models
    • 🏛️Capitol Provision
    • 📊Risk Assessment
  • 🛣️Roadmap
  • ⁉️FAQs
  • Market Manager
    • 💹Creating a Pharo Market
    • 👩‍💼Managing a Market
  • Liquidity Provider
    • 🎯Selecting a Market
    • 💵Provide Liquidity
  • Cover Buyer
    • 🤔What it means to buy cover
    • 🔅Buy Cover
  • Governance
    • Overview
    • Process
      • 📄Writing A Proposal
    • Glossary
    • Adversarial Circumstances
    • Governance Reference
  • PHRO Token
    • Overview
    • 🪙Tokenomics
    • Staking
    • 📄Contracts
    • 🐪PHRO Distribution Speed
  • Guides
  • Beginners Guide to Voting
  • Setting Up Your Local Environment
    • Hardhat
    • Foundry
  • API Reference
    • Start Here Developer
  • Technical Reference
    • Litepaper
    • Smart Contracts Overview
    • Pharo SDK
    • Anubis
    • Obelisk
Powered by GitBook
On this page

Was this helpful?

  1. Setting Up Your Local Environment

Hardhat

Getting setup with Hardhat

Setting up your environment

Create a new directory and navigate to it, and create a new project with npm init.

$ mkdir create-pharo-hardhat
$ cd create-pharo-hardhat
$ npm init -y

For this example, we'll use HardHat to compile our contracts.

$ npm i --save-dev hardhat

Now we can install the v1 Core contracts, so that we can inherit what we need to create a new Pharo.

$ npm i @pharo/contracts

Now we can create a new Hardhat config file in our environment, which can help us configure the compilation and testing processes for our contracts.

$ npx hardhat

Setting up Hardhat solidity version

For this example, we'll need to change ./hardhat.config.js to include the appropriate solidity version for compilling the Pharo core v1 contracts.

/**
*    @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
    solidity: "0.8.19",
};

Compiling Your Contract

We can compile our contracts with npx hardhat compile

PreviousSetting Up Your Local EnvironmentNextFoundry

Last updated 1 year ago

Was this helpful?