Transactions
Tx
Field
Type
Description
Nonce
uint64
Increasing number used only once per sender account
Recipient
bytes
Decoded sender account address
Amount
bytes
Amount of transfer
Payload
bytes
Smart contract data
Limit
uint64
Maximum limit of gas to be used (0 = no limit)
Price
bytes
Reserved
Type
int
0 : Normal | 1: Governance | 4: Transfer | 5 : Call | 3: FeeDelegation | 6: Deploy | 2: Redeploy
ChainIDHash
bytes
Hash of chain ID
Sign
bytes
ECDSA signature with secp256k1
Transaction types
Normal type (0)
Normal transactions are used to transfer tokens and calling smart contracts.
Governance type (1)
Governance transactions are used for calling system contracts, such as staking and voting. Transactions of this type have a special payload format and recipient. See below for details.
Transfer type (4)
Transactions that only transfer value. For backwards compatibility, the Normal type can also be used.
Call type (5)
Smart contract calls should be denoted using the Call transaction type. For backwards compatibility, the Normal type can also be used.
FeeDelegation type (3)
FeeDelegation transactions are used for calling smart contract while charging fees to the contract. This only works if the contract supports the fee delegation interface.
Deploy type (6)
Used to deploy contracts. For backwards compatibility, the Normal type can also be used.
Redeploy type (2)
Used to re-deploy a contract.
Governance transaction details
The following table shows the specification for each field of the transaction body of a governance transaction.
Action
Recipient
Amount
Payload
staking
meey.system
amount to stake
{"Name":"v1stake"}
unstaking
meey.system
amount to unstake
{"Name":"v1unstake"}
voting
meey.system
0
{"Name":"v1voteBP","Args":[<peer IDs>]}
voting DAO
meey.system
0
{"Name":"v1voteDAO","Args":[<DAO ID>,<candidate>]}
create name
meey.name
20 meey *
{"Name":"v1createName","Args":[<a name string>]}
update name
meey.name
20 meey *
{"Name":"v1updateName","Args":[<a name string>, <new owner address>]}
add admin
meey.enterprise
0 meey
{"Name":"appendAdmin","Args":[<new admin address>]}
remove admin
meey.enterprise
0 meey
{"Name":"removeAdmin","Args":[<admin address>]}
change raft cluster
meey.enterprise
0 meey
{"Name":"changeCluster","Args":[{"command":"add","name":"[node name]","address":"[peer address]","peerid":"[peer id]"}]}
add config
meey.enterprise
0 meey
{"Name":"appendConf","Args":[<config key>,<config value>]}
enable config
meey.enterprise
0 meey
{"Name":"enableConf","Args":[<config key>,<true|false>]}
remove config
meey.enterprise
0 meey
{"Name":"removeConf","Args":[<config key>,<config value>]}
Transaction receipts
Every transaction generates a receipt upon successful execution which contains the result and metadata such as fee and gas used. The status can be one of three values:
SUCCESS
Simple value transfer transactions and successful contract executions. For contract calls, the result is available in ret.
ERROR
Failed contract execution. The error message can be found in ret.
CREATED
Succesful contract deployment transaction. The created address can be found in contractAddress.
Last updated