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.
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.
- 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.tsand utility scripts.
- Node.js (>=14.x)
- npm or yarn
- Hardhat (installed as a dev dependency)
-
Clone the repository.
-
Navigate to the
emit-instancesdirectory:cd emit-instances -
Install the dependencies:
npm install # or yarn install
-
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
Use the following command to run instances:
sh runv2.shNote: make sure to put all the ports you want your instances to listen on in the ports.txt file before running the script.