createAsset

Create an unsigned transaction to issue vrc10 token,equivalent to createToken.

Usage

visionWeb.transactionBuilder.createAsset(options, address);

Parameters

ParameterDescriptionTypeDefault
optionsVrc 10 options,their descriptions are below.object-
addressAccount address.stringDefault account address

options parameters

ParameterDescriptionTypeDefault
nameToken name.string-
abbreviationToken name abbreviation.string-
descriptionToken description.string-
urlToken official website url.string-
totalSupplyToken total supply.number0
vsRatioDefine the price by the ratio of vsNum/num.number1
tokenRatioDefine the price by the ratio of vsNum/num.number1
saleStartICO start time.timestamp-
saleEndICO end time.timestamp-
freePhotonThe creator's "donated" photon for use by token holders.number0
freePhotonLimitOut of totalFreePhoton, the amount each token holder get.number0
frozenAmountToken frozen supply.number0
frozenDurationFor now there is no default for the following values.number0
precisionPrecision of issued tokens.number-
permission_idOptional, 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'
}