Skip to content

Getting Started

Setting up your environment

First, you will need to install foundry to be able to compile the contracts.

curl -L https://foundry.paradigm.xyz | bash

Then clone the repository and install the dependencies.

git clone https://github.com/mangrovedao/vif-core.git
cd vif-core
forge install

Running the tests

The project contains a set of tests (unit, fuzz, and invariant tests) that you can run with the following command:

forge test -vvv

Deploying the contracts

Contracts can be used with an upgradeable proxy, but here we'll only see how to deploy the contracts immutably.

There is a script called DeployImmutable. We just need to define the arguments and run the script.

WETH=<WETH_ADDRESS>
OWNER=<OWNER_ADDRESS>
PROVISION=<provision in gwei>
forge script DeployImmutable

Review the script options in the Foundry documentation for more configuration options.