The Ethereum blockchain supports smart contracts: globally distributed, tamper-proof computer programs. We showed how to program such a contract using a little rock-paper-scissors game. Now it’s time to give the contract a user interface so that friends can easily play along without having to deal with development environments and blockchain details.
“Decentralized applications”, so-called DApps, are used for this purpose. This means the combination of a smart contract and a front end that provides a user interface. Many DApps use web interfaces that can be opened in the browser. In the absence of native support in most browsers, a browser extension such as MetaMask serves as a link between the two worlds.
But why is such a front end needed, can’t smart contracts simply display a user interface? The fundamental problem is that contracts that are compiled and placed on the blockchain consist of mere bytecode for the Ethereum Virtual Machine (EVM). The blockchain does not offer the possibility of directly addressing the functions of a contract, and certainly no interfaces to render control elements, for example.
- Access to all heise + content
- exclusive tests, advice & background: independent, critically well-founded
- Read c’t, iX, MIT Technology Review, Mac & i, Make, c’t photography directly in your browser
- register once – read on all devices – can be canceled monthly
- first month free, thereafter € 12.95 per month
- Weekly newsletter with personal reading recommendations from the editor-in-chief
Start FREE month
Start your FREE month now
Already subscribed to heise +?
Sign up and read
Register now and read articles right away
More information about heise +
Disclaimer: This article is generated from the feed and not edited by our team.