eosio.token¶
Introduction¶
The eosio.token
contract defines the structures and actions that allow users
to create, issue, and manage tokens on EOSIO based blockchains.
The core token EOS
of the EOSIO mainnet are issued under
the account eosio.token
using this smart contract.
Types¶
There are a few types used in eosio.token
as basic data structures.
You can click the link in the action definitions to see how the types are defined.
Smart Contract¶
Actions¶
-
class
token
¶ -
ACTION
create
(eosio::name issuer, eosio::asset maximum_supply)¶
[source] Create a token in supply of
maximum_supply
with anissuer
account. If successful, a new entry instat
table for token symbol scope will be created. Transaction must be signed by the contract account itself.
-
ACTION
issue
(eosio::name to, eosio::asset quantity, string memo)¶
[source] Issue
quantity
of tokens to accountto
with an optionalmemo
that accompanies the token issue transaction. The token needs to be created in advance. Transaction must be signed by theissuer
.
-
ACTION
transfer
(eosio::name from, eosio::name to, eosio::asset quantity, string memo)¶
[source] Transfer
quantity
of tokens from accountfrom
to accountto
, with an optionalmemo
that accompanies the transfer transaction. The token needs to be created in advance. Transaction must be signed by accountfrom
.
-
ACTION
open
(eosio::name owner, eosio::symbol symbol, eosio::name ram_payer)¶
[source] Allows
ram_payer
to create an accountowner
with zero balance for tokensymbol
at the expense ofram_payer
. Transaction must be signed by accountram_payer
.
-
ACTION