ZivoeTrancheToken.sol

Native Tranche Token

Introduction

This ERC20 contract outlines the tranche token functionality.

This contract should support the following functionalities:

  • Mintable.

  • Burnable.

  • Inherit the ownable library to handle temporary minterRole management.

This contract was adopted from the OpenZeppelin ERC20 Library.

For further documentation, see: https://docs.openzeppelin.com/contracts/4.x/api/token/erc20#ERC20

State Variables

TypeNameDescription

mapping(address => bool)

_isMinter

Whitelist for accessibility to mint() function, exposed in isMinter() view function.

Sections

Read Functions

  • isMinter() - Returns the whitelist status of account for accessibility to mint() function.

Write Functions

  • burn() - Burns $zTT (Zivoe Tranche Tokens).

  • changeMinterRole() - Update an account's permission for access to mint() function.

  • mint() - Mints $zTT (Zivoe Tranche Tokens).

Events

Read Functions

isMinter()

Returns the whitelist status of account for accessibility to mint() function.

function isMinter(address account) external view returns (bool minter);
TypeNameDescription

address

account

The amount to deposit.

Returns

TypeNameDescription

bool

minter

Returns true if account is allowed to access the mint() function.

Write Functions

burn()

Burns $zTT (Zivoe Tranche Tokens).

function burn(uint256 amount) external;
TypeNameDescription

uint256

amount

The number of $zTT tokens to burn.

changeMinterRole()

Update an account's permission for access to mint() function.

function changeMinterRole(address account, bool allowed) external onlyOwner;
TypeNameDescription

address

account

The account to change permission for.

bool

allowed

The permission to give account (true = permitted, false = prohibited).

Emits the MinterUpdated() event.

mint()

Mints $zTT (Zivoe Tranche Tokens).

function mint(address account, uint256 amount) external isMinterRole;
TypeNameDescription

address

account

The account to mint tokens for.

uint256

amount

The amount of $zTT tokens to mint for account.

Events

MinterUpdated()

Emitted during changeMinterRole()

event MinterUpdated(address indexed account, bool allowed);
TypeIndexedNameDescription

address

True

account

The account who is receiving or losing the minter role.

bool

False

allowed

If true, account receives minter privlidges, if false the account loses minter privlidges.

Last updated

Zivoe Finance - Official Documentation