This package contains the addresses and ABIs of all Balancer V2 deployed contracts, for Ethereum, Polygon and Arbitrum mainnet, as well as various test networks. Each deployment consists of a deployment script (called 'task'), inputs (script configuration, such as dependencies), outputs (typically contract addresses), and ABIs of related contracts.
Addresses and ABIs can be used consumed from the package in JavaScript environments, or manually retrieved from the GitHub repository.
Note that some protocol contracts are created dynamically: for example, WeightedPool
contracts are deployed by the canonical WeightedPoolFactory
. While the ABIs of these contracts are stored in the abi
directory of each deployment, their addresses are not. Those can be retrieved by querying the on-chain state or processing emitted events.
$ npm install @balancer-labs/v2-deployments
Import @balancer-labs/v2-deployments
to access the different ABIs and deployed addresses. To see all Task IDs and their associated contracts, head to Past Deployments.
- async function getBalancerContract(taskID, contract, network)
Returns an Ethers contract object for a canonical deployment (e.g. the Vault, or a Pool factory).
Note: requires using Hardhat with the hardhat-ethers
plugin.
- async function getBalancerContractAt(taskID, contract, address)
Returns an Ethers contract object for a contract dynamically created at a known address (e.g. a Pool created from a factory).
Note: requires using Hardhat with the hardhat-ethers
plugin.
- async function getBalancerContractAbi(taskID, contract)
Returns a contract's ABI.
- async function getBalancerContractBytecode(taskID, contract)
Returns a contract's creation code.
- async function getBalancerContractAddress(taskID, contract, network)
Returns the address of a contract's canonical deployment.
- async function getBalancerDeployment(taskID, network)
Returns an object with all contracts from a deployment and their addresses.
Description | Task ID |
---|---|
Authorizer, governance contract | 20210418-authorizer |
Vault, main protocol contract | 20210418-vault |
Weighted Pools of up to 8 tokens | 20210418-weighted-pool |
Weighted Pools with two tokens and price oracle | 20210418-weighted-pool |
Liquidity Bootstrapping Pools of up to 4 tokens | 20210721-liquidity-bootstrapping-pool |
Stable Pools of up to 5 tokens | 20210624-stable-pool |
Meta Stable Pools with 2 tokens and price oracle | 20210727-meta-stable-pool |
Relayer for Lido stETH wrapping/unwrapping | 20210812-lido-relayer |
Distributor contract for LDO rewards | 20210811-ldo-merkle |
Rate Provider for wstETH | 20210812-wsteth-rate-provider |
Basic Investment Pools for few tokens | 20210907-investment-pool |
Distributor contract for arbitrum BAL rewards | 20210913-bal-arbitrum-merkle |
Distributor contract for VITA rewards | 20210920-vita-merkle |
Distributor contract for arbitrum MCB rewards | 20210928-mcb-arbitrum-merkle |
Merkle Orchard Distributor | 20211012-merkle-orchard |
Batch Relayer | 20211203-batch-relayer |
Linear Pools for Aave aTokens | 20211208-aave-linear-pool |
Preminted BPT Meta Stable Pools | 20211208-stable-phantom-pool |
Authorizer Adaptor for extending governance | 20220325-authorizer-adaptor |
Wallet for the BAL token | 20220325-bal-token-holder-factory |
Admin of the BAL token | 20220325-balancer-token-admin |
Gauge Registrant | 20220325-gauge-adder |
Liquidity Mining: veBAL, Gauge Controller and Minter | 20220325-gauge-controller |
Mainnet Staking Gauges | 20220325-mainnet-gauge-factory |
Single Recipient Stakeless Gauges | 20220325-single-recipient-gauge-factory |
Delegation of veBAL boosts | 20220325-ve-delegation |
Coordination of the veBAL deployment | 20220325-veBAL-deployment-coordinator |