Writing a DAPP for the Ethereum block chain
posted October 2017
warning: spil this is a proof of concept to see if 4chan could be implemented on the blockchain, some people might postbode shocking pictures or movies on there. At the time of the writing nothing “bad” has happened, but take precautions if you’re programma to take a look at it 🙂
The FiveMedium DAPP browsed from the Nevel wallet
I’ve bot dabbing ter clever contract security (see my movie here) and I found it natural to attempt and do a DAPP (decentralized application) myself. How hard can it be?
Very first thing I’ll have to say: it’s hella joy.
Writing the wise contract is fairly straight forward. It’s 128 lines of Solidity code, but most of it are comments (yes I comment my code). At one point I should publish it on etherscan.io because this is best practice. It’s not compiled with the last version of Solidity (boooo!) because I deployed it via Nevel and Nevel doesn’t have the last version of Solidity.
The worst is that the documentation gets sparser and sparser spil you inject the world of real DAPPs. You understand that things are switching truly prompt, that wallets will soon zekering supporting web3.js and that a real API will be provided at some point. Everything is way more experimental than I had thought.
On top of that, Metamask doesn’t let you witness for events yet, so say goodbye to your DAPP being “live” for their users.
To make the app offline, meaning browsable without a wallet, I use Infura. You basically just have to switch the url of the knot to the ones Infura gives you, and web3 will be able to interact with it the same way it interacts with a real knot. This is because the standard works via normal Json-RPC routes using the Json way to structure queries and responses. Unluckily, like Metamask, Infura doesn’t let you listen to events so the app is browsable, but not live.
I toevluchthaven’t taken the time to publish the clever contract on the real ethereum network yet. It’s sitting on Rinkeby which is a test network where you can get ethers for free. I’m not going to get rich on a test network, and some of my friends are eyeballing mij for this decision (I see you jc) but this is joy and I want people to attempt it for free 🙂
Is it hard? No but it’s annoying. Very first I need to pull up the entire Ethereum blockchain.
Spil of April 19th, 2017, my blockchain size is 23.Five GB total.
2nd, I need some ethers, and buying ethers from the UK is hard. Of course I already have some (I wouldn’t be writing anything about ethereum if I wasn’t invested), but I had to go through weeks of research to buy them. (If you’re looking for an effortless way, learn from my wasted time: transfer money on a Revolut account, switch it to euro, do a free SEPA transfer to Kritiseren, buy ethers there.)
If you want to see how it works without getting a wallet:
But I recommend you to give a attempt to this fresh technology!
Download Nevel, set the network to Rinkeby, grab some free ethers from the faucet there and browse to my DAPP FiveMedium.