CoreRef is an abstract contract which references Core. It defines basic modifiers and utilities useful for contracts referencing Core.
Most of all Fei Protocol contracts implement the CoreRef contract.
The contract defines modifiers of the following types:
restrict access to certain roles
conditional execution if a role is held
restrict access to certain contracts (Fei, Core, GenesisGroup)
restrict access to post genesis period
It allows the governor of a currently referenced Core contract to update to a new referenced Core contract
It can read in referenced contract addresses including Core, Fei, Tribe or get token balances.
Referenced Fei Core contract update
new Fei Core
function core() external view returns (ICore);
Returns the referenced Fei Core address as an interface.
function fei() external view returns (IFei);
Returns the FEI token address as an interface.
function tribe() external view returns (IERC20);
Returns the TRIBE token address as an interface.
function feiBalance() external view returns (uint256);
Returns the amount of FEI held by this contract
function tribeBalance() external view returns (uint256);
Returns the amount of TRIBE held by this contract
function setCore(address core) external;
Sets the currently referenced Fei Core contract to
function pause() external;
Puts the contract in the paused state which can shut down pausable external functions
function unpause() external;
Puts the contract in the unpaused state which can reopen pausable external functions