A Framework to Generate Smart Contracts On the Fly - Santiago, Levy; Abijaude, Jauberth; Greve, Fabíola (Anais do Simpósio Brasileiro de Engenharia de Software (SBES), 2021)
Blockchain is a disruptive technology that offers a secure decentralized network, and allows for direct transactions between distributed entities, without the need for a trusted third party. Smart contracts are executable codes hosted on the blockchain and enable the implementation of several decentralized applications, in different domains. However, due to the complexity of contract construction, it is necessary to seek ways to facilitate and make this innovative development process robust. This paper presents Gifflar, a framework for generating smart contract code on the fly, in such a way that it allows a system to write, compile and implement blockchain contracts with a decentralized application still running. Gifflar is structured in components that implement design patterns to better define the responsibility of each one of the parts and exports a simple interaction module for contract modeling in JSON and automatic code writing using the TypeScript language. As far as we know, this framework is one of the first to generate contracts dynamically at run time. Thus, the work contributes to the state of the art by addressing a new paradigm, where systems can act as smart contract developers.