Show / Hide Table of Contents

Asset and Account

Asset

There are two kinds of assets in NEO: One is UTXO-type global assets, such as NEO and GAS. They are defined in Genesis Block. The other is NEP5 assets, which is generated by a smart contract. The former are recorded in transactions, while the latter are stored in the contracts' storage space.

SizeFieldTypeDescription
32AssetIdUInt256 assetid = tx.hash
1AssetTypeAssetType
?Namestring
8AmountFixed8 amount = -Fixed8.Satoshi = -1 = infinity
8AvailableFixed8
1Precisionbyte
1FeeModeconst byte
8FeeFixed8
20FeeAddressUInt160default null
?OwnerECPoint
20AdminUInt160
20IssuerUInt160
4Expirationuint
1IsFrozenboolFrozen assets, cannot be transferred

There are two models of Amount : One is unlimited, the amount is set to -Fixed8.Satoshi , which means infinity. The other is fixed amount that cannot be modified.

AssetType

TypeValueDescription
CreditFlag0
DutyFlag0x80
GoverningToken0x00Neo
UtilityToken0x01Gas
Currency0x08
ShareDutyFlag | 0x10Equity-like assets
InvoiceDutyFlag | 0x18
TokenCreditFlag | 0x20Normal token

Asset with DutyFlag , needs the signature of the payee.

Asset NameTypeValueAmountDescription
NEOAssetType.GoverningToken0x00100 millionAll of which are transferred to the address of the standby consensus nodes' multi-signature contract in Genesis Block
GASAssetType.UtilityToken0x01100 millionReleased as new blocks are generated, and NEO holders can claim GAS through ClaimTransaction

Account

In NEO, the account model and UTXO model coexist. An Account has the records of the UTXO-type global assets and the voting information.

SizeFieldTypeDescriptoin
20ScriptHashUInt160The hash of account's script contract.
1IsFrozenboolFronzen accounts cannot transfer. This field is not currently used.
? * ?VotesECPoint[]the voted address list
?BalancesDict<UInt256, Fixed8>UTXO assets, mapping from assetId to amount.