MakerDAOOracle.sol
View Source: contracts/oracles/MakerDAOOracle.sol
MakerDAOOracle
Contract Members
Constants & Variables
contract IMedianizer public medianizer;
address public currencyAddress;
bytes32 public currencySymbol;
bool public manualOverride;
uint256 public manualPrice;
Events
event ChangeMedianizer(address _newMedianizer, address _oldMedianizer);
event SetManualPrice(uint256 _oldPrice, uint256 _newPrice);
event SetManualOverride(bool _override);
Functions
Creates a new Maker based oracle
function (address _medianizer, address _currencyAddress, bytes32 _currencySymbol) public nonpayable
Arguments
Name
Type
Description
_medianizer
address
Address of Maker medianizer
_currencyAddress
address
Address of currency (0x0 for ETH)
_currencySymbol
bytes32
Symbol of currency
changeMedianier
Updates medianizer address
function changeMedianier(address _medianizer) public nonpayable onlyOwner
Arguments
Name
Type
Description
_medianizer
address
Address of Maker medianizer
getCurrencyAddress
⤾ overrides IOracle.getCurrencyAddress
Returns address of oracle currency (0x0 for ETH)
function getCurrencyAddress() external view
returns(address)
Arguments
Name
Type
Description
getCurrencySymbol
⤾ overrides IOracle.getCurrencySymbol
Returns symbol of oracle currency (0x0 for ETH)
function getCurrencySymbol() external view
returns(bytes32)
Arguments
Name
Type
Description
getCurrencyDenominated
⤾ overrides IOracle.getCurrencyDenominated
Returns denomination of price
function getCurrencyDenominated() external view
returns(bytes32)
Arguments
Name
Type
Description
getPrice
⤾ overrides IOracle.getPrice
Returns price - should throw if not valid
function getPrice() external nonpayable
returns(uint256)
Arguments
Name
Type
Description
setManualPrice
Set a manual price. NA - this will only be used if manualOverride == true
function setManualPrice(uint256 _price) public nonpayable onlyOwner
Arguments
Name
Type
Description
_price
uint256
Price to set
setManualOverride
Determine whether manual price is used or not
function setManualOverride(bool _override) public nonpayable onlyOwner
Arguments
Name
Type
Description
_override
bool
Whether to use the manual override price or not
Last updated
Was this helpful?