Docs
Reference
Contract documentation
L1
TaikoToken

TaikoToken

The TaikoToken (TKO), in the protocol is used for prover collateral in the form of bonds. It is an ERC20 token with 18 decimal places of precision.

TKO_INVALID_ADDR

error TKO_INVALID_ADDR()

TKO_INVALID_PREMINT_PARAMS

error TKO_INVALID_PREMINT_PARAMS()

init

function init(address _addressManager, string _name, string _symbol, address[] _premintRecipients, uint256[] _premintAmounts) public

Initializes the TaikoToken contract and mints initial tokens to specified recipients.

Parameters

NameTypeDescription
_addressManageraddressThe {AddressManager} address.
_namestringThe name of the token.
_symbolstringThe symbol of the token.
_premintRecipientsaddress[]An array of addresses to receive initial token minting.
_premintAmountsuint256[]An array of token amounts to mint for each corresponding recipient.

snapshot

function snapshot() public

Creates a new token snapshot.

pause

function pause() public

Pauses token transfers.

unpause

function unpause() public

Unpauses token transfers.

mint

function mint(address to, uint256 amount) public

Mints new tokens to the specified address.

Parameters

NameTypeDescription
toaddressThe address to receive the minted tokens.
amountuint256The amount of tokens to mint.

burn

function burn(address from, uint256 amount) public

Burns tokens from the specified address.

Parameters

NameTypeDescription
fromaddressThe address to burn tokens from.
amountuint256The amount of tokens to burn.

transfer

function transfer(address to, uint256 amount) public returns (bool)

Transfers tokens to a specified address.

Parameters

NameTypeDescription
toaddressThe address to transfer tokens to.
amountuint256The amount of tokens to transfer.

Return Values

NameTypeDescription
[0]boolA boolean indicating whether the transfer was successful or not.

transferFrom

function transferFrom(address from, address to, uint256 amount) public returns (bool)

Transfers tokens from one address to another.

Parameters

NameTypeDescription
fromaddressThe address to transfer tokens from.
toaddressThe address to transfer tokens to.
amountuint256The amount of tokens to transfer.

Return Values

NameTypeDescription
[0]boolA boolean indicating whether the transfer was successful or not.

_beforeTokenTransfer

function _beforeTokenTransfer(address from, address to, uint256 amount) internal

_afterTokenTransfer

function _afterTokenTransfer(address from, address to, uint256 amount) internal

_mint

function _mint(address to, uint256 amount) internal

_burn

function _burn(address from, uint256 amount) internal

title: ProxiedTaikoToken

ProxiedTaikoToken

Proxied version of the TaikoToken contract.