Truffle is a framework that provides compiling, testing and systematic project management for developing Ethereum decentralized applications. As of now, Truffle provides a way to easily deal with bundling node.js modules of decentralized application using the webpack tool. However, due to the Truffle project structure, server-side node.js modules such as network communication modules are not usable in a direct way. In this paper, to address this issue, we propose a method to use server-side node.js modules through Ethereum smart contracts and event processing mechanism. In the proposed method, a separate node application is associated to the server-side module to execute the module in response to the request of the decentralized application. To this end, we introduce the notion of function gateway, a smart contract for connecting two applications with Ethereum's event-watch processing technique. Also, to use the function gateway contract in a robust way, we introduce a robust function gateway that includes the process of confirming whether or not the event-watch has occurred and the node.js module function has been executed. In addition, we present a decentralized application using node.js module for sending actual e-mails based on the function gateway.
Eom et al. (Tue,) studied this question.