Skip to content

RoseOnAurora/curve-pool-registry

 
 

Repository files navigation

curve-pool-registry

On-chain registry and unified API for Curve.fi pools.

Usage

See the documentation for information on how this project is organized, and how it may be integrated within other projects.

Deployments

Testing and Development

Dependencies

Curve contracts are compiled using Vyper, however installation of the required Vyper versions is handled by Brownie.

Setup

To get started, first create and initialize a Python virtual environment. Next, clone the repo and install the developer dependencies:

git clone https://github.com/curvefi/curve-pool-registry.git
cd curve-pool-registry
pip install -r requirements.txt

Running the Tests

The registry has two independent test suites.

Local tests

The local test suite is designed to be run in a local environment. It is mostly comprised of parametrized unit tests that validate functionality against many possible pool iterations.

To run the entire local test suite:

brownie test tests/local

You can optionally include the --once flag to skip parametrization and run each test exactly once.

Forked tests

The forked test suite is designed for use with a forked mainnet. These tests verify functionality within the registry against actual data from deployed pools. The data is obtained from the pooldata.json file within each subdirectory in curvefi/curve-contract/contract/pools.

To run the forked tests:

brownie test tests/forked

You can optionally include the --pool flag to only target one or more specific pools:

brownie test tests/forked --pool 3pool,gusd

Deployment

Deployment is handled via functions within scripts/deploy.py.

To run a deployment function:

brownie run deploy [FUNCTION NAME] --network mainnet

You must set deployer prior to running on the mainnet. It is recommended to test the script in a forked mainnet environment prior to actual deployment.

License

Except where otherwise noted, (c) Curve.Fi, 2020 - All rights reserved.

About

On-chain registry and unified API for Curve.fi pools.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%