RioLRT

RioLRT

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();

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.

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

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.

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