On-chain registry and unified API for Curve.fi pools.
See the documentation for information on how this project is organized, and how it may be integrated within other projects.
AddressProvider
: 0x0000000022D53366457F9d5E68Ec105046FC4383Registry
: 0x90e00ace148ca3b23ac1bc8c240c2a7dd9c2d7f5PoolInfo
: 0xe64608E223433E8a03a1DaaeFD8Cb638C14B552C
- python3 version 3.6 or greater, python3-dev
- brownie - tested with version 1.13.0
- brownie-token-tester - version 0.1.0
- ganache-cli - tested with version 6.12.1
Curve contracts are compiled using Vyper, however installation of the required Vyper versions is handled by Brownie.
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
The registry has two independent test suites.
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.
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 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.
Except where otherwise noted, (c) Curve.Fi, 2020 - All rights reserved.