IOracleProviderRegistry.sol
IOracleProviderRegistry
Interface for the Oracle Provider Registry contract.
OracleProviderRegistered
event OracleProviderRegistered(address oracleProvider, struct OracleProviderProperties properties)
Emitted when a new oracle provider is registered.
Parameters:
Name Type Description oracleProvider address The address of the registered oracle provider. properties struct OracleProviderProperties The properties of the registered oracle provider.
OracleProviderUnregistered
event OracleProviderUnregistered(address oracleProvider)
Emitted when an oracle provider is unregistered.
Parameters:
Name Type Description oracleProvider address The address of the unregistered oracle provider.
UpdateTakeProfitBPSRange
event UpdateTakeProfitBPSRange(address oracleProvider, uint32 minTakeProfitBPS, uint32 maxTakeProfitBPS)
Emitted when the take-profit basis points range of an oracle provider is updated.
Parameters:
Name Type Description oracleProvider address The address of the oracle provider. minTakeProfitBPS uint32 The new minimum take-profit basis points. maxTakeProfitBPS uint32 The new maximum take-profit basis points.
UpdateLeverageLevel
event UpdateLeverageLevel(address oracleProvider, uint8 level)
Emitted when the level of an oracle provider is set.
Parameters:
Name Type Description oracleProvider address The address of the oracle provider. level uint8 The new level set for the oracle provider.
registerOracleProvider
function registerOracleProvider(address oracleProvider, struct OracleProviderProperties properties) external
Registers an oracle provider.
Parameters:
Name Type Description oracleProvider address The address of the oracle provider to register. properties struct OracleProviderProperties The properties of the oracle provider.
unregisterOracleProvider
function unregisterOracleProvider(address oracleProvider) external
Unregisters an oracle provider.
Parameters:
Name Type Description oracleProvider address The address of the oracle provider to unregister.
registeredOracleProviders
function registeredOracleProviders() external view returns (address[])
Gets the registered oracle providers.
Return Values:
Name Type Description [0] address[] An array of registered oracle provider addresses.
isRegisteredOracleProvider
function isRegisteredOracleProvider(address oracleProvider) external view returns (bool)
Checks if an oracle provider is registered.
Parameters:
Name Type Description oracleProvider address The address of the oracle provider to check. Return Values:
Name Type Description [0] bool A boolean indicating if the oracle provider is registered.
getOracleProviderProperties
function getOracleProviderProperties(address oracleProvider) external view returns (struct OracleProviderProperties)
Retrieves the properties of an oracle provider.
Parameters:
Name Type Description oracleProvider address The address of the oracle provider. Return Values:
Name Type Description [0] struct OracleProviderProperties The properties of the oracle provider.
updateTakeProfitBPSRange
function updateTakeProfitBPSRange(address oracleProvider, uint32 minTakeProfitBPS, uint32 maxTakeProfitBPS) external
Updates the take-profit basis points range of an oracle provider.
Parameters:
Name Type Description oracleProvider address The address of the oracle provider. minTakeProfitBPS uint32 The new minimum take-profit basis points. maxTakeProfitBPS uint32 The new maximum take-profit basis points.
updateLeverageLevel
function updateLeverageLevel(address oracleProvider, uint8 level) external
Updates the leverage level of an oracle provider in the registry.
The level must be either 0 or 1, and the max leverage must be x10 for level 0 or x20 for level 1.
Parameters:
Name Type Description oracleProvider address The address of the oracle provider. level uint8 The new leverage level to be set for the oracle provider.