prepareContractCall
Prepares a contract call by resolving the ABI function, parameters and encoded data. Optionally specify other properties such as value or gas price.
Usage with a human-readable method signature:
Usage with explicit gas price and/or value:
Usage with ERC20 value:
For transactions that transfer ERC20 tokens, you can specify the value as the amount of tokens to transfer.
You can use this in conjuction with the getApprovalForTransaction
function to easily create approval transactions for ERC20 tokens.
This value will also be read by the react hooks and UI components to present to total cost to the user.
Usage with a JSON ABI function object:
Usage with the ABI defined on the contract:
Passing extra call data to the transaction