Show / Hide Table of Contents

Asset Class

Represents the data structure of an asset.

Namespace: Neo.SmartContract.Framework.Services.Neo

Assembly: Neo.SmartContract.Framework

Syntax

public class Asset

Attributes

NameDescription
Admin Returns the administrator (contract address) of the asset who has the right to modify the attributes of the asset (such as total, name, etc)
Amount Returns the total amount of the asset
AssetId Returns the ID of the asset
AssetType Returns the type of this asset
Available Returns the quantity of the asset that has been issued
Issuer Returns the issuer (contract address) of the asset who has the right to issue the asset
Owner Returns the owner (public key) of the asset
Precision Returns the accuracy of the asset (the smallest division), or the number of digits after the decimal point

Methods

NameDescription
Create(byte, string, long, byte, byte[], byte[], byte[]) new Register an asset on the blockchain
Renew(byte) new For asset renewal

Constructor

The Asset object is constructed through Blockchain.GetAsset (byte[]) method.

The Asset.Create(byte, string, long, byte, byte[], byte[], byte[]) method is used to register a new asset on the blockchain and returns an Asset object.