CoreRef

A reference to Fei Core

Contract

CoreRef.sol implements ICoreRef, Pausable

Description

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.

Events

CoreUpdate
CoreUpdate

Referenced Fei Core contract update

type

param

description

address indexed

_core

new Fei Core

Read-Only Functions

core

function core() external view returns (ICore);

Returns the referenced Fei Core address as an interface.

fei

function fei() external view returns (IFei);

Returns the FEI token address as an interface.

tribe

function tribe() external view returns (IERC20);

Returns the TRIBE token address as an interface.

feiBalance

function feiBalance() external view returns (uint256);

Returns the amount of FEI held by this contract

tribeBalance

function tribeBalance() external view returns (uint256);

Returns the amount of TRIBE held by this contract

Governor-Only⚖️ State-Changing Functions

setCore

function setCore(address core) external;

Sets the currently referenced Fei Core contract to core

emits CoreUpdate

Guardian- Or Governor-Only🛡⚖️ State-Changing Functions

pause

function pause() external;

Puts the contract in the paused state which can shut down pausable external functions

unpause

function unpause() external;

Puts the contract in the unpaused state which can reopen pausable external functions

ABIs