This function initializes the PriceManager contract with the addresses of the Operators contract and the Pyth contract.
initialize(address _operators,address _pyth)
Set Asset
This function allows an operator with level 3 to set the information for a specific asset. It takes parameters such as the asset ID, symbol, Pyth ID, price, allowed staleness (in seconds), allowed deviation (in basis points), and maximum leverage.
This function allows an operator with level 3 to set the information for a USD stablecoin asset. It takes parameters such as the token address, asset ID, symbol, Pyth ID, price, allowed staleness (in seconds), allowed deviation (in basis points), and token decimals.
This function retrieves the last recorded price of an asset based on its asset ID. It returns the price as a uint256 value.
Token To Usd
This function converts a given token amount to an equivalent USD amount based on the asset's price and token decimals. It takes the token address and token amount as parameters and returns the equivalent USD amount as a uint256 value.
Usd To Token
This function converts a given USD amount to an equivalent token amount based on the asset's price and token decimals. It takes the token address and USD amount as parameters and returns the equivalent token amount as a uint256 value.