DEV Community

Asjad Ahmed Khan for Kalp Studio

Posted on

How to Send Transaction of Your Generated API Endpoints on Kalp Studio

Introduction

In the previous tutorial, we saw how Kalp Studio eases generating the API Endpoints of our desired smart contracts with the help of Kalp API Gateway. Now that we have the API Endpoints generated, it’s time to test and play with our API Endpoints and send the transactions on Kalp Studio.

Prerequisites

Before diving further into the tutorial, you must ensure the following are set up.

Once all the requirements are set, we can test the Endpoints on Postman.

Creating the Requests on Postman

To create the requests from the endpoints on Postman, you must create an account and install Postman, once you have it ready, follow the steps below.

  • After generating the API Endpoints of your smart contract, 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.

Deployed Smart Contracts

  • Click on the ID of the desired smart contract, for this tutorial, we will be clicking on the ID SC00000570. Once you click on it, you can see the smart contract details, including the Method, Function, Routes and Action.

Smart Contract Details

  • Copy the Route URL (in this case, the get function’s URL), and go to your Postman Workspace.
  • In your workspace, create a new POST Request and paste the URL “Enter URL or paste text” section.

Postman

  • Next, click on the Headers section. Type x-api-key in the Key column and in the Value column, enter your API Auth Key. To know more about API Auth Key and how to generate one, refer to the docs here.

API Headers

  • Next, head over to the Body, and copy the body section by clicking on the Check Params button.

Check Params

  • 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.

Body Section

  • Once you have all the details filled in, click the Send button to send the transaction to the Ethereum Holesky Blockhain.

Response

The above picture shows that the evaluation of the get function has been done successfully. To check the transaction details, let’s head over to our Kalp Studio Dashbaord.

Examining the Transaction Details on Kalp Studio Dashboard

  • In the dashboard's sidebar, click on the Transaction section, and you’ll see the list of all the deployed smart contracts.

Smart Contract Details

  • 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.

Transaction Details

You can repeat the same steps with the other functions of your deployed smart contracts to measure the details of the transactions.

Conclusion

You can easily send transactions on Kalp Studio using their API Gateway following these steps. The gateway simplifies the interaction between your applications and smart contracts, enabling secure and efficient transaction management. Whether you're sending tokens, executing smart contract functions, or interacting with decentralised applications (dApps), Kalp’s API Gateway provides the tools to make blockchain integration smoother.

Stay tuned for more advanced tutorials on using Kalp Studio to enhance your blockchain projects!

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.

Top comments (0)