Skip to content

Latest commit

 

History

History
executable file
·
63 lines (44 loc) · 1.32 KB

README.md

File metadata and controls

executable file
·
63 lines (44 loc) · 1.32 KB

Credbull Smart Contracts

All our smart contract reside in this project.

If you exclusively want to work on the contracts, you don't need to setup the whole project. Follow only the instructions below to setup the contracts locally.

Setup project locally

  • Ensure that you have:

  • Check your foundry installation

$ forge --help
$ anvil --help

Setup using Docker

  • Clone the repository with submodules `git clone --recurse-submodules
  • Build the image with docker build -f Dockerfile -t credbull-contracts .
  • SSH into the container with docker run --entrypoint "/bin/sh" -it credbull-contracts
  • You can then run forge and anvil commands as usual

Foundry Documentation

https://book.getfoundry.sh/

Usage

Build

forge build

Test

forge test

Advanced Testing

Code Coverage Summary

Pre-requisite: install genhtml

yarn coverage

Reset Submodules

Update each submodules to latest commit recorded

# run from project root dir
git submodule update --init --recursive

Reset the checked out commit for each submodule

cd packages/contracts/lib/<SUBMODULE>
git reset --hard HEAD