In this tutorial, we'll walk you through the step-by-step process of sending and monitoring transactions using Kalp Studio’s powerful API Gateway and user-friendly dashboard. By the end of this guide, you'll have the skills to handle transactions seamlessly, from configuring your wallet to monitoring the status and handling potential errors.
We will be using Postman to send transactions.
Prerequisites
- Kalp Studio Account: Create your account on Kalp Studio here.
- Kalp Studio Wallet: You need to have a Kalp Studio wallet connected to the Polygon Network (for this tutorial series, we’re using a wallet connected to the Polygon Blockchain), and the wallet should have some MATIC tokens for gas fees on the Polygon network. To create a Kalp Studio wallet over the Polygon network and transfer MATIC tokens, follow our previous tutorial: Creating Your Custodial Polygon Wallet on AMOY Network Using Kalp Studio.
- Smart Contract Deployed via Kalp Instant Deployer: To ensure you deploy your smart contract on Kalp Studio, look at the second tutorial of this series: Deploying Your Solidity Smart Contract on the Polygon Blockchain Using Kalp Instant Deployer.
- Generated API Endpoints using Kalp API Gateway: To ensure that we can send transactions to Kalp Studio, you must have generated the API Endpoints of your deployed smart contract via Kalp API Gateway. Refer to the previous tutorial for generating the endpoints: Generating the API Endpoints of Your Smart Contract using the Kalp API Gateway.
- Basic understanding of Postman API services and a Postman installed on your computer.
Now that our basic set-up is ready, it’s time to dive into the details immediately.
Creating Transaction Requests on Postman
- Once we have generated the endpoints of our deployed smart contract via Kalp API Gateway, in the API Gateway section, you can see the list of all your smart contracts whose endpoints have been generated or need to be generated.
- Next, click on the ID of the desired smart contract. You will be redirected to the Smart Contract Details page, where you can see all the details, such as the Smart Contract Address, Method, Function, Route etc.
- Copy the Route URL (in this case, the get function’s URL), and go to your Postman Workspace.
- Create a new POST Request in your workspace and paste the URL in the “Enter URL or paste text” section.
- Next, click on the Headers section. Type
x-api-key
in the Key column and in the Value column, enter yourAPI Auth Key
. To know more about API Auth Key and how to generate one, refer to the docs here.
- Next, head over to the Body, and copy the body section by clicking on the Check Params button from the Smart Contract Details page on Kalp Studio.
- On your Postman, once you have clicked on the Body section, choose raw from the radio buttons and select the format to JSON from the dropdown, and paste your Routes Detail, mentioned in the Params section.
- Once you have all the details filled in, click the Send button to send the transaction to the Polygon Blockhain.
The above picture shows that the evaluation of the get function has been done successfully. Let’s head to our Kalp Studio Dashboard to monitor the transaction details.
Monitoring the Transaction Details on the Kalp Studio Dashboard
- In your Kalp Studio’s dashboard sidebar, click on the Transaction section to see the list of all the deployed smart contracts.
- Click on the smart contract whose API Endpoints you used on Postman.
- Once you click on it, you can see the entire transaction history of your smart contract, such as Transaction ID, Blockchain, TxHash, Created on, and the Status of your transactions. You can also see a graphical representation of the stats in the top right corner.
You can repeat the same steps with the other functions of your deployed smart contracts to measure the details of the transactions.
Congratulations!
By completing this tutorial, you’ve gained valuable insights into how to send and monitor transactions using Kalp Studio. From setting up your wallet and configuring API access to tracking transaction status in real time and handling errors, Kalp Studio offers a seamless experience for managing blockchain transactions. Whether developing decentralised applications, interacting with smart contracts, or simply sending cryptocurrency, Kalp Studio simplifies the process and allows you to focus on your core development tasks.
With its intuitive interface and powerful API Gateway, Kalp Studio equips you with the tools to manage transactions and build scalable blockchain solutions confidently and efficiently.
Check out our official documentation here to continue exploring what more Kalp Studio can do. If you have any queries, join our Discord server and let’s continue the discussion there.