Ring Protocol
Search
K
Comment on page

CoreRef

A reference to Ring 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 Ring 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 (Rusd, 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, Rusd, Ring or get token balances.

Events

CoreUpdate
Referenced Ring Core contract update
type
param
description
address indexed
_core
new Ring Core

Read-Only Functions

core

function core() external view returns (ICore);
Returns the referenced Ring Core address as an interface.

rusd

function rusd() external view returns (IRusd);
Returns the RUSD token address as an interface.

ring

function ring() external view returns (IERC20);
Returns the RING token address as an interface.

rusdBalance

function rusdBalance() external view returns (uint256);
Returns the amount of RUSD held by this contract

ringBalance

function ringBalance() external view returns (uint256);
Returns the amount of RING held by this contract

Governor-Only⚖️ State-Changing Functions

setCore

function setCore(address core) external;
Sets the currently referenced Ring 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

coreref.json
2KB
Code
CoreRef ABI
icoreref.json
1KB
Code
CoreRef Interface ABI
Last modified 2yr ago