<EtherspotContractTransaction />
Introduction
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 |
---|---|
| Optional: An ID (which can be a |
| The destination Smart Contract address on the blockchain. Every Smart Contract has a unique address, including tokens. |
| 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. |
| The name of the function we want to call on the Smart Contract |
| The parameter(s), if any, we want to provide to the "method" above. |
| 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). |
How to use
Below is an example of how to use the <EtherspotContractTransaction />
component.
Sending a token
Sending a token is a very common practice within the blockchain ecosystem. When you send a token, you are interacting with the Smart Contract for that token. For example - you might want to send 10 USDC to pay for something, or, you might want to send 200 SHIB to a friend. Here's how to do that.
🎉 Congratulations!
You have learned how to send transactions that interact with Smart Contract and tokens with TransactionKit.
Last updated