Cellar contracts for the Sommelier Network.
Getting Started
Before attempting to setup the repo, first make sure you have Foundry installed and updated, which can be done here.
Building
Install Foundry dependencies and build the project.
forge build
To install new libraries.
forge install <GITHUB_USER>/<REPO>
Example
forge install transmissions11/solmate
Whenever you install new libraries using Foundry, make sure to update your remappings.txt
file.
Testing
Before running test, rename sample.env
to .env
, and add your mainnet RPC. If you want to deploy any contracts, you will need that networks RPC, a Private Key, and an Etherscan key(if you want foundry to verify the contracts).
Note in order to run tests against forked mainnet, your RPC must be an archive node. My favorite archive node is Alchemy.
Run tests with Foundry:
npm run forkTest