Git Source

Inherits: Initializable, OwnableUpgradeable, UUPSUpgradeable, PausableUpgradeable, ReentrancyGuardUpgradeable, AggregatorV3Interface, OracleReader

This contract is an oracle that calculates the BLP price of a Balancer pool, assuming that the OracleReader has access to all the price feeds for the underlying assets.

Inherits: Initializable, OwnableUpgradeable, UUPSUpgradeable, PausableUpgradeable, ReentrancyGuardUpgradeable, AggregatorV3Interface, OracleReader

State Variables

poolAddress

address public poolAddress;

decimals

uint8 public decimals;

Functions

constructor

Note: constructor

constructor();

initialize

Initializes the BalancerOracleAdapter. This function is called once during deployment or upgrading to initialize state variables.

function initialize(address _poolAddress, uint8 _decimals, address _oracleFeeds, address _owner) external initializer;

Parameters

Name Type Description
_poolAddress address Address of the BALANCER Pool used for the oracle.
_decimals uint8 Number of decimals returned by the oracle.
_oracleFeeds address Address of the OracleReader feeds contract, containing the Chainlink price feeds for each asset in the pool.
_owner address

description

Returns the number of decimals used by the oracle.