Delphi is a set of contracts that allows anyone to permissionlessly create oracles which perform an arbitrary mathematical operation on data from ChainLink Aggregators.
Utilizes a modified version of Band Protocol's equation evaluation library that allows for multiple variables to be used.
DelphiFactoryV1
createOracle(string _name, address[] _aggregators, uint256[] _expressions)
- Creates an oracle that uses the given aggregators and evaluates the equation defined in _expressions.
_expressions
is an array of Opcodes and their children. (Seesrc/math/Equation.sol
for more info)
setAllowAggregator(address _aggregator, bool _allow)
- ADMIN FUNCTION: Allows/disallows an aggregator for usage in creation of future oracles.
setEndorsed(address _oracle, bool _endorsed)
- ADMIN FUNCTION: Endorses/Unendorses an oracle that was created by the factory.
transferOwnership(address _newOwner)
- ADMIN FUNCTION: Transfers the ownership of the factory to
_newOwner
- ADMIN FUNCTION: Transfers the ownership of the factory to
DelphiOracleV1
init(address _factory, address[] _aggregators, uint256[] _expressions)
- Called by the
DelphiFactoryV1
contract upon creation of the oracle. Can only be called once.
- Called by the
getLatestValue() view returns (int256)
- Returns the latest value of the oracle by executing the equation with the most recent data from ChainLink Aggregators.
latestRoundData() & latestAnswer()
- Provided for use as an
AggregatorV2V3Interface
- Provided for use as an
getAggregators() view returns (AggregatorV2V3Interface[] memory)
- Get the addresses of the aggregators that the oracle's equation utilizes.
getNodes() view returns (Equation.Node[] memory)
- Get the oracle's equation nodes.
See DEPLOYMENTS.md
See CONTRIBUTE.md