CallGenericWriteFunctionTest
Description
This function can be used to estimate the Gas Limit and Gas Price that will be required by a CallGenericWriteFunction
invocation. The information can be presented to users before they confirm the transaction.
Details
Signature
async CallGenericWriteFunctionTest(args, apiKey)
Arguments
args.contractAddress
String
Contract address of the smart contract to be called
args.functionABI
JSON
args.functionName
String
Name of the function to be called
args.value?
BigNumber
args.chain
chain (class)
args.params
array
apiKey
String
Return Value
Handling Large Numerical Values
Applicable to EVM Chains only
While passing in large numerical values (values above 9007199254740991) in args.params
, a conversion to BigNumber format needs to be made. You can use the following methods that convert the number to and from the appropriate format:
ConvertNumberToBigNumber(number, decimal)
- Use this method while passing in numbers as params to a smart function that requires uint256 numbers
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
Last updated