Skip to content

Latest commit

 

History

History
74 lines (49 loc) · 1.76 KB

File metadata and controls

74 lines (49 loc) · 1.76 KB

EMIT Instances

EMIT Instances is a Hardhat project for developing, testing, and deploying smart contracts as part of the EMIT ecosystem. This project contains sample contracts, contracts for various problem scenarios, deployment scripts, and TypeChain-generated factories.

Overview

This project demonstrates a complete setup for Ethereum smart contract development using Hardhat. It includes sample contracts, tests, and deployment scripts, with support for automated deployments using Hardhat Ignition modules.

Project Structure

  • contracts/: Contains Solidity source files for smart contracts.
    • problems/: Organized Solidity files corresponding to different problem statements.
  • deploy/: Deployment scripts to automate contract deployments.
  • typechain-types/: Generated TypeScript typings and factories for the smart contracts.
  • Other root files include configuration files such as hardhat.config.ts and utility scripts.

Prerequisites

  • Node.js (>=14.x)
  • npm or yarn
  • Hardhat (installed as a dev dependency)

Installation

  1. Clone the repository.

  2. Navigate to the emit-instances directory:

    cd emit-instances
  3. Install the dependencies:

    npm install
    # or
    yarn install

Scripts and Tasks

  • Compile Contracts:

    npx hardhat compile
  • Run Tests:

    npx hardhat test
  • Run Hardhat Node:

    npx hardhat node
  • Deploy Contracts using Ignition:

    npx hardhat ignition deploy ./ignition/modules/Lock.ts

Run Instances

Use the following command to run instances:

sh runv2.sh

Note: make sure to put all the ports you want your instances to listen on in the ports.txt file before running the script.