In the FAME project, Trailblu (TRB) developed a trading history service for the Bourse smart contract which provides a general ERC20, ERC721 and ERC1155 token trading service. This component is designed to retrieve recorded data offering transactions and to serve them to data providers and customers. This information can then be used for various purposes such as performing dynamic pricing. The service was developed using the Nest.js framework and the Ethers.js library for Ethereum blockchains. Trading history service provides various query functions, including listing all transactions for a specific data asset offer with id, enumerating transactions for a single user address and providing numbers of trades.
Recent AI technologies are also making it possible to generate software codes from prompts. Given the FAME trading history API, can developers make use of AI chatbots like ChatGPT to quickly generate simple single page web user interfaces from prompt? The answer was surprisingly yes. A few prompts were written to ChatGPT to utilize the Chart.js library for plotting and the Axios library for invoking web APIs and a single html file was generated that retrieved trading history and displayed it in charts. The web interface in the figure above was generated in this way.
This experience also led us to try other code generation examples. Examples of code generation that were tried include:
- Taking the connected address from a connected Metamask wallet and displaying it in shortened form on the web page, as well as updating it automatically when a different address is connected in Metamask
- Retrieving blockchain events and displaying them as tables using the Datatables library with options to export the tables as Excel and CSV files.
- Using the Vis.js library to draw from-to transactions as a directed graph.
This positive experience led us to reach the conclusion that developers and even non-developers can use AI chatbots to easily generate code and build quick user interfaces to the FAME Federated Market.
More info:
TrailBlue