Documentation ¶
Overview ¶
smart contract code implements Token Registry. User can mint any number of new colored tokens to own address and in the same transaction can register the whole Supply of new tokens in the TokenRegistry. TokenRegistry contains metadata of the supply minted this way. It can be changed by the owner of the record Initially the owner is the minter. Owner can transfer ownership of the metadata record to another address
Index ¶
Constants ¶
View Source
const ( RequestInitSC = sctransaction.RequestCode(uint16(0)) // NOP RequestMintSupply = sctransaction.RequestCode(uint16(1)) RequestUpdateMetadata = sctransaction.RequestCode(uint16(2)) RequestTransferOwnership = sctransaction.RequestCode(uint16(3)) // state vars VarStateTheRegistry = "tr" VarStateListColors = "lc" // for testing only // request vars VarReqDescription = "dscr" VarReqUserDefinedMetadata = "ud" )
View Source
const ProgramHash = "8h2RGcbsUgKckh9rZ4VUF75NUfxP4bj1FC66oSF9us6p"
program hash is an ID of the smart contract program
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TokenMetadata ¶
type TokenMetadata struct { Supply int64 MintedBy address.Address // originator Owner address.Address // who can update metadata Created int64 // when created record Updated int64 // when recordt last updated Description string // any text UserDefined []byte // any other data (marshalled json etc) }
TokenMetadata is a structure for one supply
Click to show internal directories.
Click to hide internal directories.