Intro
This component allows you to tell TransactionKit that there will be a blockchain transaction performed, and it will be against a Smart Contract. This component is specifically tailored to Smart Contracts. If you are looking to send a simple transaction, then EtherspotTransaction is what you may be looking for. You can have 1 or many EtherspotContractTransaction components inside an EtherspotBatch component to be sent at the same time (i.e. as part of the same “batch”).Component Properties
Property | Description |
---|---|
id | Optional: An ID (which can be a string, number etc) that allows you to define the ID of this batch group. We will use this ID if you provide it internally, but also allows you to use it to keep track elsewhere within your app. |
contractAddress | The destination Smart Contract address on the blockchain. Every Smart Contract has a unique address, including tokens. |
abi | The “Application Binary Interface” of the Smart Contract… in other words, a dictionary of all the things we can do with this Smart Contract, and what data it needs. |
method | The name of the function we want to call on the Smart Contract |
params | The parameter(s), if any, we want to provide to the “method” above. |
value | Optional: The amount of native token we want to send along. This can either be a string represented in Ether or as a BigNumber (see example). |