Create an unsigned transaction to issue vrc10 token,equivalent to createToken.
Usage
visionWeb.transactionBuilder.createAsset(options, address);
Parameters
Parameter | Description | Type | Default |
---|---|---|---|
options | Vrc 10 options,their descriptions are below. | object | - |
address | Account address. | string | Default account address |
options parameters
Parameter | Description | Type | Default |
---|---|---|---|
name | Token name. | string | - |
abbreviation | Token name abbreviation. | string | - |
description | Token description. | string | - |
url | Token official website url. | string | - |
totalSupply | Token total supply. | number | 0 |
vsRatio | Define the price by the ratio of vsNum/num. | number | 1 |
tokenRatio | Define the price by the ratio of vsNum/num. | number | 1 |
saleStart | ICO start time. | timestamp | - |
saleEnd | ICO end time. | timestamp | - |
freePhoton | The creator's "donated" photon for use by token holders. | number | 0 |
freePhotonLimit | Out of totalFreePhoton , the amount each token holder get. | number | 0 |
frozenAmount | Token frozen supply. | number | 0 |
frozenDuration | For now there is no default for the following values. | number | 0 |
precision | Precision of issued tokens. | number | - |
permission_id | Optional, for multi-signature use. | number | - |
Returns
Object
Example
const options = {
name: 'vzz',
abbreviation: 'vzz',
description: 'test',
url: 'https://vron.bkbos.space',
totalSupply: 100000000,
vsRatio: 1,
tokenRatio: 1,
saleStart: 1608465600000,
saleEnd: 1614528000000,
freePhoton: 0,
freePhotonLimit: 0,
frozenAmount: 0,
frozenDuration: 0,
precision: 6,
};
await vsWeb.transactionBuilder.createAsset(
options,
);
> {
visible: false,
txID: 'fa0c41175a6e41d614c2720b881fc7a7f5036ce1b74247e254fee77dda542ee9',
raw_data: {
contract: [ [Object] ],
ref_block_bytes: '444d',
ref_block_hash: '02d1228fe5e34e5a',
expiration: 1608465045000,
timestamp: 1608464987245
},
raw_data_hex: '0a02444d220802d1228fe5e34e5a4088acf3ffe72e5a9a0108061295010a2f747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e41737365744973737565436f6e747261637412620a154653cd48c2723cb985679f4e44d99c64d22d89f41d1203767a7a1a03767a7a2080c2d72f2a040801100330013806400148809c9580e82e5080e0f8cafe2ea2010474657374aa011868747470733a2f2f76726f6e2e626b626f732e737061636570ede8efffe72e'
}