Smart Contract Generation
Last updated
Last updated
To generate contract content, the application uses Langchain and OpenAI. Langchain helps provide sufficient training data to OpenAI. It enables the AI to create contract code.
As initial validation check the contract is build to be sure the generated code is working properly without any syntaxical error.
The generated smart contract may not always be accurate. For financial applications, accuracy is crucial. The system initially checks the generated content against existing vectors and uses OpenAI for generating the smart contract testing files. After that tests are executed into the generated code.
If the smart contract doesn't meet the criteria of an executable and secure contract, the process iterates until a suitable and safe contract is generated by passing test'errors to give to the model a precise indication on how and where to iterate the changes.