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
AddressProvider
: 0x0000000022D53366457F9d5E68Ec105046FC4383Registry
: 0x90e00ace148ca3b23ac1bc8c240c2a7dd9c2d7f5PoolInfo
: 0xe64608E223433E8a03a1DaaeFD8Cb638C14B552C
Testing and Development
Dependencies
- 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.
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.