Basis Cash
Search…
Price Oracle
The Price Oracle contract retrieves the exchange rate between Basis Cash and DAI.

Code

A modified version of ExampleOracleSimple.sol from the uniswap-v2-periphery repository has been used.
Oracle.sol
Deployed at [0xcontract_address] on the Ethereum mainnet, [other_testnets] testnets.
This contract is yet to be deployed.

Events

Updated

1
event Updated(uint256 price0CumulativeLast, uint256 price1CumulativeLast);
Copied!
Emitted when the price of Basis Cash is updated via update.

Functions

update

1
function update() external
Copied!
If 24 hours has passed since update was last successfully executed, updates the time-weighted average price (TWAP) of Basis Cash. Emits Updated.

consult

1
function consult(address token, uint amountIn) external view returns (uint amountOut)
Copied!
Returns the amount of output tokens given in exchange for amountIn number oftoken tokens ((Price of token token denominated in output tokens) * amountIn).

pairFor

1
function pairFor(address factory, address tokenA, address tokenB) external pure returns (address lpt)
Copied!
Returns the calculated address for a pair without making any external calls.
Last modified 1yr ago
Copy link