Skip to main content

Use in DApp

On this page, you can test the integration between Openfabric and Airnode through a specially designed demo Dapp. The Dapp allows you to explore the functionalities and features of both platforms, and observe how they work together seamlessly. To get started with the demo Dapp, follow these steps:

info

Prerequisites: Before starting the demo Dapp, ensure that your machine meets the following prerequisites:

  • NPM (Node Package Manager) version 8.19.2 or higher.
  • Node.js version 16 or higher.
$ npm install & npm run start:airnode

Open browser on http://localhost:3000.

Setup the DApp

In order to set up the demo DApp, you need to obtain the following information from Finish screen (Bridge contract):

  • App contract address: This is the unique Ethereum address where your smart contract is deployed. The demo Dapp requires this address to interact with your smart contract and execute its functions.
  • App contract ABI: The ABI is a JSON representation of your smart contract's functions and events. It allows the demo Dapp to encode and decode the data that is sent and received from the smart contract. Make sure to copy the entire ABI JSON provided on the Finish screen (Bridge contract).

In this context, we've deployed the Cognitive Assistant AI. This enables users to ask any questions they wish, and the AI will provide appropriate responses, making interactions intuitive and user-friendly.

Copy the ABI

Airnode - Setuo ABI

Fig. 19 - Setuo ABI

Test integration

The Dapp allows you to test the integration by simply entering your questions or queries into the provided input field. Once you've entered your question, run the demo Dapp to initiate the interaction with the Cognitive Assistant. Upon processing your query, the app will generate a response, which will be displayed in the output field.

Use in dapp

Fig. 20 - Test Openfabric

Conclusion

In conclusion, our tutorial has focused on the critical aspect of blockchain interoperability, demonstrating how to effectively integrate Openfabric with various third-party blockchains. Interoperability is a cornerstone in the blockchain world, allowing distinct networks to communicate and exchange data seamlessly, enhancing functionality without requiring intermediaries.

Throughout this tutorial, we have explored the necessary steps and best practices for establishing a seamless connection between Openfabric and Airnode, enabling efficient data exchange and communication. By following these guidelines, you will be well-equipped to harness the combined capabilities of Openfabric and Airnode, ultimately leading to the development of more robust and powerful AI applications.

OpenfabricAI Robot
OpenfabricAI FooterOpenfabricAI Footer