EstimateTransferTokensGas
Description
This function can be used to estimate the Gas Limit and Gas Price that will be required by a TransferTokens
invocation. The information can be presented to users before they confirm the transaction.
Details
Signature
async EstimateTransferTokensGas(args, apiKey)
Arguments
Return Value
Handling Large Numerical Values
The result of the estimation is returned in the BigNumber format. A conversion will need to be made to display the result in a human-readable format, and the following function can be used:
ConvertBigNumberToNumber(bigNumber, decimal)
- Use this method while converting response values from a smart contract function call (which are in BigNumber format) to a JS Number.
Example
Calling TransferTokens for a native currency:
Last updated