Ring Protocol
Search…
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

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

rusd

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

ring

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

rusdBalance

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

ringBalance

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

Governor-Only⚖️ State-Changing Functions

setCore

1
function setCore(address core) external;
Copied!
Sets the currently referenced Ring Core contract to core
emits CoreUpdate

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

pause

1
function pause() external;
Copied!
Puts the contract in the paused state which can shut down pausable external functions

unpause

1
function unpause() external;
Copied!
Puts the contract in the unpaused state which can reopen pausable external functions

ABIs

coreref.json
2KB
Binary
CoreRef ABI
icoreref.json
1KB
Binary
CoreRef Interface ABI
Last modified 4mo ago