Quick Start
Get started quickly with TransactionKit
Last updated
Was this helpful?
Get started quickly with TransactionKit
Last updated
Was this helpful?
The Quick Start below is available as a well documented, fully functioning live example on CodeSandbox.
View or fork the Send Native Asset CodeSandbox
View all our CodeSandbox examples
Otherwise, please keep following the instructions below.
Let's keep it simple and use create-react-app
here. Run the following command in a directory of your choice:
The above command will install and bootstrap a basic React App into a directory called txkit-quickstart.
Once the installation has finished, change directory into your newly bootstrapped React app by typing:
Next, install TransactionKit and Ethers
A Web3 provider ultimately provides access to blockchain account, also known as a wallet.
For the Quick Start example, we will randomly generate a wallet.
Wrap your React <App />
tag in the <EtherspotTransactionKit />
tag. This will turbocharge your React app with the power of Etherspot and everything that the platform can offer.
Get yourself some Polygon Mumbai Testnet funds
In order to execute a transaction, you need to fund your randomly created account with Test MATIC, the native token on Polygon Mumbai. You can get some for free below.
We're going to start with a simple example - sending some MATIC to another address. TransactionKit makes this really, really easy. Have a look at the code below.
You must always estimate before sending
Estimating first performs important transaction cost calculations that are required before sending.
Once sent - you can check the transaction on the Polygon Mumbai blockchain explorer here.
You've just sent your first transaction using TransactionKit! Wasn't that easy? Why not have a look around the TransactionKit documentation to see what else you can do with TransactionKit!