Skip to main content


CI Coverage Status

This repo contains the SDK for developing TypeScript (and JavaScript) apps using the Mangrove.

The core contracts for Mangrove with example Solidity offer logics live in the mangrove-core repo.


If you are looking for the Mangrove developer documentation, the main site to go to is


For Linux or macOS everything should work out of the box, if you are using Windows, then we recommend installing everything from within WSL2 and expect some quirks.

  1. Node.js 18+, we recommend installation through nvm, e.g.:

    $ curl -o- | bash
    # Reopen shell
    $ nvm install --lts
  2. Enable Yarn 2:

    $ corepack enable
  3. Foundry:

    $ curl -L | bash
    # Reopen shell
    $ foundryup
  4. Clone the git repo with sub-modules

    $ git clone --recurse-submodules
    # Or set the global git config once: git config --global submodule.recurse true


The following sections describe the most common use cases in this repo.

Initial setup​

After first cloning the repo, you should run yarn install in the root folder.

$ yarn install

Then you need to setup the local environment (still in the root folder):

$ cp .env.local.example .env.test.local

Then open .env.test.local in your favorite editor and put in settings for, e.g., node urls, pointing to a node provider, like, for instance, Alchemy.


To build, run

$ yarn build

If you encounter issues with JavaScript memory consumption, then try increasing the max available space for heap, and try again:

$ export NODE_OPTIONS="$NODE_OPTIONS --max_old_space_size=4096"
$ yarn build


To run tests, run

$ yarn test

Yarn usage details​

⚠️  Be aware that when googling Yarn commands, it's often not clear whether the results pertain to Yarn 1 (aka 'Classic') or Yarn 2+. Many examples online and a considerable amount of tool support is still implicitly engineered towards Yarn 1.

Lifecycle scripts and Yarn 2​

Yarn 2 deliberately only supports a subset of the lifecycle scripts supported by npm. So when adding/modifying lifecycle scripts, you should consult Yarn 2's documentation on the subject: .

Git hooks and Husky

We use Husky to manage our Git hooks.

The Git hook scripts are in the .husky/ folder.