Deposit Box
Simple deposit box example that showcases the basic request propose lifecycle of the UMA Optimistic Oracle
UMA Contract Lifecycle
Integrating with the Optimistic Oracle
constructor(
address _collateralAddress,
address _finderAddress,
bytes32 _priceIdentifier,
address _timerAddress
) nonReentrant() Testable(_timerAddress) {
finder = FinderInterface(_finderAddress);
require(_getIdentifierWhitelist().isIdentifierSupported(_priceIdentifier), "Unsupported price identifier");
require(_getAddressWhitelist().isOnWhitelist(_collateralAddress), "Unsupported collateral type");
collateralCurrency = IERC20(_collateralAddress);
priceIdentifier = _priceIdentifier;
}
...
function _getIdentifierWhitelist() internal view returns (IdentifierWhitelistInterface) {
return IdentifierWhitelistInterface(finder.getImplementationAddress(OracleInterfaces.IdentifierWhitelist));
}
function _getAddressWhitelist() internal view returns (AddressWhitelist) {
return AddressWhitelist(finder.getImplementationAddress(OracleInterfaces.CollateralWhitelist));
}Requesting a Price
Price Proposals
Liveness
Proposal Bond
Settlement
Last updated
Was this helpful?
