UDF Functions

This following outlines the application of an Oracle contract for retrieving the current price for an asset within a transaction across any network where the required price is distributed:

  • AssetPriceSpotter

  • LpPriceSpotter

AssetPriceSpotter

To obtain the price of any supported asset, the caller must authorize the AssetPriceSpotter contract to access $NGL tokens as a fee, with the exception of prices for Entangle Liquid Vault tokens, for which the fee is waived.

function getPriceByKey(bytes32 key) external returns (Price memory price)

LpPriceSpotter

Get Entangle CDT prices:

function getLpPriceBySid(uint128 sid) external returns (Price memory price)

Last updated