IOracleWithValidationFactory
Git Source - Generated with forge doc
Title: IOracleWithValidationFactory
Interface of the CREATE2 factory deploying OracleWithValidation instances.
Functions
createOracleWithValidation
Deploys a new OracleWithValidation via CREATE2.
Reverts if an oracle address is zero, the two oracles are identical, or maxOracleDeviation >= 1e18.
function createOracleWithValidation(
IOracle primaryOracle,
IOracle validationOracle,
uint256 maxOracleDeviation,
bool revertOnValidationOracleFailure,
address owner,
bytes32 salt
) external returns (address oracle);
Parameters
| Name | Type | Description |
|---|---|---|
primaryOracle | IOracle | The primary oracle, always used for the price. |
validationOracle | IOracle | The validation oracle used to bound-check the primary's price. |
maxOracleDeviation | uint256 | The maximum allowed deviation, in WAD. |
revertOnValidationOracleFailure | bool | Whether price() reverts when the validation oracle call reverts. |
owner | address | The initial owner of the deployed oracle. |
salt | bytes32 | The CREATE2 salt. |
Returns
| Name | Type | Description |
|---|---|---|
oracle | address | The address of the deployed oracle. |
isDeployedOracle
Whether oracle was deployed by this factory.
function isDeployedOracle(address oracle) external view returns (bool);
Events
OracleWithValidationDeployed
event OracleWithValidationDeployed(
address indexed oracle,
address primaryOracle,
address validationOracle,
uint256 maxOracleDeviation,
bool revertOnValidationOracleFailure,
address owner,
bytes32 salt
);
Errors
NotAllowed
error NotAllowed();