⬅️ Contracts

ConstantOracle

Constant oracle

Author: Fei Protocol

Return a constant oracle price

Mainnet implementations

Name Address
oneConstantOracle 0x2374800337c6BE8B935f96AA6c10b33f9F12Bd40
zeroConstantOracle 0x43b99923CF06D6D9101110b595234670f73A4934

Core, CollateralizationOracle

Events

ContractAdminRoleUpdate

event ContractAdminRoleUpdate(bytes32,bytes32)
Params
Param Type Notes
oldContractAdminRole bytes32 indexed
newContractAdminRole bytes32 indexed

CoreUpdate

event CoreUpdate(address,address)
Params
Param Type Notes
oldCore address indexed
newCore address indexed

Paused

event Paused(address)
Params
Param Type Notes
account address

Unpaused

event Unpaused(address)
Params
Param Type Notes
account address

Update

event Update(uint256)
Params
Param Type Notes
_peg uint256

Methods

CONTRACT_ADMIN_ROLE

function CONTRACT_ADMIN_ROLE() view returns(bytes32)

a role used with a subset of governor permissions for this contract only

Returns
Param Type Notes
bytes32

core

function core() view returns(address)

address of the Core contract referenced

Returns
Param Type Notes
address ICore implementation address

fei

function fei() view returns(address)

address of the Fei contract referenced by Core

Returns
Param Type Notes
address IFei implementation address

feiBalance

function feiBalance() view returns(uint256)

fei balance of contract

Returns
Param Type Notes
uint256 fei amount held

isContractAdmin

function isContractAdmin(address) view returns(bool)

returns whether a given address has the admin role for this contract

Params
Param Type Notes
_admin address
Returns
Param Type Notes
bool

isOutdated

function isOutdated() pure returns(bool)

determine if read value is stale

always false, oracle is fixed

Returns
Param Type Notes
bool

pause

function pause() nonpayable

set pausable methods to paused

paused

function paused() view returns(bool)

Returns true if the contract is paused, and false otherwise.

Returns
Param Type Notes
bool

read

function read() view returns(tuple,bool)

read the oracle price

Returns
Param Type Notes
tuple constant oracle price
bool true if not paused

setContractAdminRole

function setContractAdminRole(bytes32) nonpayable

sets a new admin role for this contract

Params
Param Type Notes
newContractAdminRole bytes32

setCore

function setCore(address) nonpayable

set new Core reference address

Params
Param Type Notes
newCore address the new core address

tribe

function tribe() view returns(address)

address of the Tribe contract referenced by Core

Returns
Param Type Notes
address IERC20 implementation address

tribeBalance

function tribeBalance() view returns(uint256)

tribe balance of contract

Returns
Param Type Notes
uint256 tribe amount held

unpause

function unpause() nonpayable

set pausable methods to unpaused

update

function update() pure

updates the oracle price

no-op, oracle is fixed

⬅️ Contracts