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
EscrowFixedPrice 0xB3A88448768aa314bAdbE43A5d394B1B8Ef2db1b
EscrowMilestone 0x833cb00a77A82797de64C7453fE235CA369410Dc
EscrowHourly 0x2847A804d24d10a43E765873fc3a670c3b35937A
Factory 0xE5552A5830cd05a3f19553A8879582C33E9E46D8
EscrowRegistry 0x928D26474d15855c697F47A64f8877b228920d59
AdminManager 0xaDfE561EE14842D05a7720a4d9Eb2579891f3D67
FeeManager 0x617247BCcDB41F55AdbE31234b2a8aC273b57c35
AccountRecovery 0x09684b2C9c835198122dBeecE729c202758fE3e6

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