Skip to content

PeggyJV/cellar-contracts

Repository files navigation

Sommelier Cellar Contracts • tests lints license

Cellar contracts for the Sommelier Network.

Documentation

  • UI guidelines Building UI flows with Cellars
  • Permissions Permissions in Cellars
  • Using Cellars Using the Cellars Smart Contracts as a strategist
  • Fees How fees work for the strategist and the platform
  • Positions How positions are created and managed
  • Adapaters How adapters are created and managed

Development

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