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

Last updated