Skip to content

This repository contains the smart contract suite used in Midcontract project

License

Notifications You must be signed in to change notification settings

midcontract/contracts

Repository files navigation

Midcontract Platform Contracts

This repository contains the smart contract suite used in Midcontract project


Getting Started

Install Foundry and Forge: installation guide

Usage

Setup:

git clone <repo_link>

Install dependencies:

forge install

Compile contracts:

make build

Run unit tests:

make test

Add required .env variables:

cp .env.example .env

Deploy contracts:

make deploy-escrow

Test coverage:

make coverage

Visual line coverage report with LCOV. It is required to install lcov.

brew install lcov

To run the coverage report, the below command can be executed.

forge coverage --report lcov
LCOV_EXCLUDE=('src/interfaces/*' 'test/*' 'script/*')
lcov --remove lcov.info ${LCOV_EXCLUDE[@]} --output-file lcov-filtered.info --rc lcov_branch_coverage=1
genhtml lcov-filtered.info --branch-coverage --output-directory out/coverage
open out/coverage/index.html

Contracts on Ethereum Sepolia Testnet:

Name Address
Escrow 0xdF26423aa64eA4742209A1c52bBfe9dD0ab6D5B5
Escrow Milestone 0x9fD178b75AE324B573f8A8a21a74159375F383c5
Escrow Hourly 0x9161479c7Edb38D752BD17d31782c49784F52706
Factory 0xeaD5265B6412103d316b6389c0c15EBA82a0cbDa
EscrowRegistry 0xB536cc39702CE1103E12d6fBC3199cFC32d714f3
FeeManager 0xA4857B1178425cfaaaeedBcFc220F242b4A518fA
Mock USDT 0xa801061f49970Ef796e0fD0998348f3436ccCb1d

Licensing

The primary license for the Midcontract platform is MIT, see LICENSE

About

This repository contains the smart contract suite used in Midcontract project

Topics

Resources

License

Stars

Watchers

Forks