RioLRT

Git Source

Inherits: IRioLRT, ERC20BurnableUpgradeable, ERC20PermitUpgradeable, ERC20VotesUpgradeable, OwnableUpgradeable, UUPSUpgradeable

State Variables

issuer

The LRT issuer that's authorized to deploy this contract.

address public immutable issuer;

Functions

onlyCoordinator

Require that the caller is the LRT coordinator.

modifier onlyCoordinator();

onlyWithdrawalQueue

Require that the caller is the LRT withdrawal queue.

modifier onlyWithdrawalQueue();

constructor

Prevent any future reinitialization.

constructor(address issuer_);

Parameters

NameTypeDescription

issuer_

address

The LRT issuer that's authorized to deploy this contract.

initialize

Initializes the contract.

function initialize(address initialOwner, string memory name, string memory symbol) external initializer;

Parameters

NameTypeDescription

initialOwner

address

The initial owner of the contract.

name

string

The name of the token.

symbol

string

The symbol of the token.

mint

Mint amount tokens to the specified address.

function mint(address to, uint256 amount) external onlyCoordinator;

Parameters

NameTypeDescription

to

address

The address to mint tokens to.

amount

uint256

The amount of tokens to mint.

burn

Burn amount tokens from the msg.sender.

This function is only callable by the LRT withdrawal queue.

function burn(uint256 amount) public override(IRioLRT, ERC20BurnableUpgradeable) onlyWithdrawalQueue;

Parameters

NameTypeDescription

amount

uint256

The amount of tokens to burn.

allowance

Returns the remaining number of tokens that spender is allowed to spend on behalf of owner

This function grants an infinite allowance to the LRT coordinator, which is an internal, trusted contract that pulls tokens on withdrawal.

function allowance(address owner, address spender) public view override(ERC20Upgradeable, IERC20) returns (uint256);

Parameters

NameTypeDescription

owner

address

The account that owns the tokens.

spender

address

The account that can spend the tokens.

clock

Clock used for flagging checkpoints, overriden to implement timestamp based checkpoints (and voting).

function clock() public view override returns (uint48);

CLOCK_MODE

Machine-readable description of the clock as specified in EIP-6372.

function CLOCK_MODE() public pure override returns (string memory);

nonces

Returns the current nonce for owner. This value must be included whenever a signature is generated for {permit}.

function nonces(address owner) public view override(ERC20PermitUpgradeable, NoncesUpgradeable) returns (uint256);

Parameters

NameTypeDescription

owner

address

The account to query the nonce for.

_update

Transfers a value amount of tokens from from to to, or alternatively mints (or burns) if from (or to) is the zero address. In addition, this function moves voting power when tokens are transferred.

function _update(address from, address to, uint256 value) internal override(ERC20Upgradeable, ERC20VotesUpgradeable);

Parameters

NameTypeDescription

from

address

The origin address.

to

address

The destination address.

value

uint256

The amount of tokens to transfer.

_authorizeUpgrade

Allows the owner to upgrade the LRT implementation.

function _authorizeUpgrade(address newImplementation) internal override onlyOwner;

Parameters

NameTypeDescription

newImplementation

address

The implementation to upgrade to.

Last updated