MockOracle.sol

View Source: contracts/mocks/MockOracle.solโ€‹

โ†— Extends: IOracleโ€‹

MockOracle

Contract Members

Constants & Variables

address public currency;
bytes32 public currencySymbol;
bytes32 public denominatedCurrency;
uint256 public price;

Functions

function (address _currency, bytes32 _currencySymbol, bytes32 _denominatedCurrency, uint256 _price) public nonpayable

Arguments

Name

Type

Description

_currency

address

โ€‹

_currencySymbol

bytes32

โ€‹

_denominatedCurrency

bytes32

โ€‹

_price

uint256

โ€‹

changePrice

function changePrice(uint256 _price) external nonpayable

Arguments

Name

Type

Description

_price

uint256

โ€‹

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