Create an unsigned transaction to inject tokens into an exchange pair based on Bancor protocol.
Usage
visionWeb.transactionBuilder.injectExchangeTokens(
exchangeId,
tokenId,
tokenAmount,
ownerAddress,
options
);
Parameters
Parameter | Description | Type | Default |
---|---|---|---|
exchangeId | non-negative integer exchange id. | number | - |
tokenId | Token id of the token inject. | number | string | - |
tokenAmount | The amount of token inject. | number | 0 |
ownerAddress | The address of the creator of the exchange pair. | string | Default account address |
options | Descriptions are below. | object | - |
options parameters
Parameter | Description | Type | Default |
---|---|---|---|
permissionId | The permission Id,optional, for multi-signature use. | number | - |
Returns
Object
Example
visionWeb.transactionBuilder.injectExchangeTokens(1,"1000001",10000);
>{
visible: false,
txID: 'b389917e0f8f96c03136a793b86f9bd18d169875e5f22417cef8b01e1b0d17f6',
raw_data: {
contract: [ [Object] ],
ref_block_bytes: '47d2',
ref_block_hash: '221e6396e98b38b6',
expiration: 1608467808000,
timestamp: 1608467750130
},
raw_data_hex: '0a0247d22208221e6396e98b38b64080fe9b81e82e5a65080112610a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412300a154653cd48c2723cb985679f4e44d99c64d22d89f41d1215462d7a77f8bef6fe225bf5e353dd6a380f588a1496180a70f2b99881e82e'
}