tip: 178
title: TOKENISSUE and UPDATEASSET Instruction in TVM
author: taihao.fu@gmail.com
status: Draft
type: Standards Track
category : Core
created: 2020-08-12
To provide TOKENISSUE and UPDATEASSET Instructions in TVM.
Provide TRC10 asset issue and update functionalities for smart contract.
Asset issued in smart contract is feasible for developers to provide asset management according to a smart contract status. Asset issue related instruction is a big plus to the whole life cycle of TRC10. Previous implementation only consider about TRC10 transfer cases. However, a coinbase for TRC10 token is never mentioned in TVM level. ASSETISSUE
instruction pefect the whole logic system. And makes TRC10 fully controlled by decentralized exchanges and apps to be possible.
TOKENISSUE
takes 4 operands pop up from stack.
name
: the name of the TRC10 token. No more than 32 bytes.
abbreviation
: the abbreviation of the TRC10 token. No more than 32 bytes.
total_supply
: the total supply of the TRC10 token. A uint64 value.
precision
: the precision of the TRC10 token. A uint8 value.
The return value the current address account balance.
UPDATEASSET
takes 4 operands pop up from stack.
TRC10_token_id
: the TRC10 token id. Should bigger than 1000000.
url_offset
: read the token url as a string, and the value is the string offset in TVM memory.
description_offset
: read the token description as a string, and the value is the string offset in TVM memory.
The return value the current address account balance.
25000 Energy
5000 Energy