Skip to main content

SimplePriceOracle

Git Source This is an example implementation of price oracle using the ALTBC Pool During deployment the pool address is set in the constructor

State Variables

PERIOD

uint256 public constant PERIOD = 1000;

pool

address public pool;

priceCumulativeLast

uint256 public priceCumulativeLast;

blockTimestampLast

uint256 public blockTimestampLast;

priceAverage

uint256 public priceAverage;

Functions

constructor

constructor(address _pool);

update

function update() external;