_requestPrice(uint8,bytes32,uint256) :
This function is used to request a price from an external source. It takes in four parameters: chainID, identifier, time, and ancillaryData. It then encodes these parameters into a bytes32 priceRequestId. It then checks if the price has been requested before by looking up the priceRequestId in the prices mapping. If the price has never been requested before, it sets the state of the request to pending and emits an event. (autogenerated documentation)
_finalizeRequest(uint8,bytes32,uint256) :
This function is used to finalize a request for a price. It takes in the chain ID, an identifier, a timestamp, and ancillary data as parameters. It then encodes the parameters into a price request ID and looks up the corresponding price in the prices mapping. It then checks that the state of the price is PendingRequest and sets the state to Requested. (autogenerated documentation)
_publishPrice(uint8,bytes32,uint256,int256) :
This function is used to publish a price for a given request. It takes in the chainID, identifier, time, ancillaryData, and price as parameters. It first encodes the price request using the _encodePriceRequest function. It then looks up the price request in the prices mapping and checks that the state is Requested. If it is, it sets the price and state to PendingResolve and emits an event. (autogenerated documentation)
_finalizePublish(uint8,bytes32,uint256) :
This function is used to finalize the publishing of a price request. It takes in the chain ID, identifier, time, and ancillary data as parameters. It then encodes the price request using the provided parameters and looks up the corresponding price in the prices mapping. It then checks that the state of the price is PendingResolve and sets it to Resolved if it is. (autogenerated documentation)
_getBridge() :
This function is an internal view function that returns an IBridge interface. It uses the finder contract to get the address of the OracleInterfaces.Bridge interface, and then returns an IBridge interface based on that address. (autogenerated documentation)
_encodePriceRequest(uint8,bytes32,uint256) :
This function is used to encode a price request for a given chain ID, identifier, time, and ancillary data. It works by taking the given parameters and encoding them into a single bytes32 value using the keccak256 hashing algorithm. The resulting bytes32 value is then returned as the encoded price request. (autogenerated documentation)