CreateAssetIssue

POST:http://172.104.51.182:16667/wallet/createassetissue

Issue a TRC10 token.

BODY PARAMS {

owner_address string

name string

abbr string

total_supply int64

trx_num int64

num int64

start_time date-time

end_time date-time

description string

url string

free_asset_net_limit int64

public_free_asset_net_limit int64

frozen_supply json

precision int32

}

Note:

  • owner address default hexString

  • token name, default hexString

  • abbr string

  • total_supply is token total supply

  • trx_num is define the price by the ratio of trx_num/num(The unit of 'trx_num' is SUN)

  • num: define the price by the ratio of trx_num/num

  • start_time ICO start time

  • end_time ICO end time

  • description is token description, default hexString

  • url is token official website url, default hexString

  • free_asset_net_limit is token free asset net limit

  • public_free_asset_net_limit is token public free asset net limit

  • frozen_supply is token frozen supply

  • precision int32

Example:

curl -X POST http://172.104.51.182:16667/wallet/createassetissue -d '{ { "owner_address": "WRSrWnjsK5ePhAVQGHr2JSFdKSjE3vKwE7", "name": "0x68756e675f7772633130", "abbr": "0x7772635f68756e676269656e", "total_supply": 300, "trx_num": 1, "num": 1, "start_time": 1639708246000, "end_time": 1639967446000, "description": "63726561746520617373657420627920415049", "url": "6578706c6f7265722d6465762e77656c7363616e2e696f", "free_asset_net_limit": 10000, "public_free_asset_net_limit": 10000, "frozen_supply": { "frozen_amount": 100, "frozen_days": 3 }, "visible":true }}'

Input:

{

"owner_address": "WRSrWnjsK5ePhAVQGHr2JSFdKSjE3vKwE7",

"name": "0x68756e675f7772633130",

"abbr": "0x7772635f68756e676269656e",

"total_supply": 300,

"trx_num": 1,

"num": 1,

"start_time": 1639708246000,

"end_time": 1639967446000,

"description": "63726561746520617373657420627920415049",

"url": "6578706c6f7265722d6465762e77656c7363616e2e696f",

"free_asset_net_limit": 10000,

"public_free_asset_net_limit": 10000,

"frozen_supply": { "frozen_amount": 100, "frozen_days": 3 },

"visible":true

}

Response:

{

"visible": true, "txID": "eda0bd18ea5e7c825278e36c2b999d452ac42e28f7d319087d4a2fd765e6c8b7", "raw_data": { "contract": [ { "parameter": { "value": { "trx_num": 1, "frozen_supply": [ { "frozen_amount": 100, "frozen_days": 3 } ], "total_supply": 300, "num": 1, "end_time": 1639967446000, "description": "63726561746520617373657420627920415049", "owner_address": "WRSrWnjsK5ePhAVQGHr2JSFdKSjE3vKwE7", "url": "6578706c6f7265722d6465762e77656c7363616e2e696f", "free_asset_net_limit": 10000, "start_time": 1639708246000, "public_free_asset_net_limit": 10000, "name": "0x68756e675f7772633130", "abbr": "0x7772635f68756e676269656e" }, "type_url": "type.googleapis.com/protocol.AssetIssueContract" }, "type": "AssetIssueContract" } ], "ref_block_bytes": "0d80", "ref_block_hash": "a93214d3d95bc157", "expiration": 1639708173000, "timestamp": 1639708113989 }, "raw_data_hex": "0a020d802208a93214d3d95bc15740c8c5e4b1dc2f5a8102080612fc010a2f747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e41737365744973737565436f6e747261637412c8010a1541a9c46373aeb4749e3ce45aca242b027a46f486f91216307836383735366536373566373737323633333133301a1a307837373732363335663638373536653637363236393635366520ac022a04086410033001400148f0ffe8b1dc2f50f0a7b5addd2fa201263633373236353631373436353230363137333733363537343230363237393230343135303439aa012e36353738373036633666373236353732326436343635373632653737363536633733363336313665326536393666b001904eb801904e70c5f8e0b1dc2f"

}

=> Continue call gettransactionsign API then call broadcasttransaction API

We will the final result: The account created success on WEL network.

{

"result": true, "txid": "eda0bd18ea5e7c825278e36c2b999d452ac42e28f7d319087d4a2fd765e6c8b7"

}

Last updated