Ethereum first dapp - part 2

Frontend Prepare your folder for your dapp I will be using as it’s quite nice and I’ve been playing with React for a bit now. I will not go into the details of setting this up, it’s a totally different topic. If you are not familiar with it, it’s probably a waste of time for you to read. Example web3 component with React This boilerplate uses immutable, redux and redux-sagas in order to deal with data....

August 10, 2016 · 3 min · Me

Ethereum first dapp - part 1

Contracts Prepare your folder for your dapp mkdir dapp inside this folder, we’ll create one folder for truffle, one for geth. cd dapp mkdir truffle geth inside the geth folder, simply put the customGenesis block you can find in the ethereum-dev-environment blog post. We are going to use two Ethereum clients, one for tests and devs, testrpc and one for a more real interaction, geth. Let’s install truffle and testrpc...

August 8, 2016 · 4 min · Me

Interacting with an Ethereum smart contract

Check the address of the current deployed contract Remember when you mined your contract, it told your its address. Now, reuse it! eth.getCode("0x5f3425ccedeae0eb36521c4cf93ec6544dbad9bd") Test the contract with a simple interaction get the latest web3-light.min.js js from and simply copy the dist/web3-light.min.js into the same folder as the following HTML file. then, use this html to interact with your contract on the local node: <!doctype> <html> <head> <script type="text/javascript" src=""></script> <script type="text/javascript" src="....

August 3, 2016 · 2 min · Me

Ethereum first smart contract

Launch your geth (or testrpc) private instance ./geth \ --identity "gethTest" \ --rpc --rpcport "9012" \ --rpccorsdomain "YOUR_TEST_DOMAIN_APP_RUN_FROM" \ --datadir "./testChain" \ --port "30303" \ --nodiscover \ --rpcapi "db,eth,net,web3" \ --networkid 1999 \ --dev console Within the console, compile your contract check this tutorial: I had an issue when I followed the contract tutorial, my contract would not be mined after I was trying to deploy it. The issue was that my account was locked :/ and the greeter contract stupidly silently fails… Here is the modified code to see the obvious error....

August 3, 2016 · 2 min · Me

Ethereum dev environment

Part 1 - Setup your ethereum node There are many ways you can setup a node to dev an Ethereum dapp. You can use the live network: not advisable obviously for cost and speed reasons. You can use the test network: not advisable for speed reasons. You can use a testchain set up with Geth: easy but a bit tedious as you need to mine. You can the ethereum testrpc: easiest!...

August 1, 2016 · 2 min · Me

Kubernetes Singapore Birthday Event

On the 28th, I was invited to talk at Google Singapore for the Kubernetes birthday I spoke about my experience with Kubernetes in production for one of my side projects. As I like to experiment stuff, I decide to drop power point and use React Spectacle library for my presentation! here is the result: here is the source code: The framework can be found here: I will do it again!...

July 28, 2016 · 1 min · Me

learning react

React Nothing beats the facebook React page: Redux Nothing beats the redux tutorial: And also available on egghead, by Dan Abramov himself: A list of tutorials: A great detailed introduction to your SPA setup An advanced SPA (still under construction)

April 12, 2016 · 1 min · Me

react setup with essential tools

Working with ES6-7 In order to work with ECMAScript 2015 and even with future implementations of ES, you can use Babel. Babel is a transpiler, it will convert your ES6-7 to plain ES5 javascript that most browsers (>ie9 most probably) will understand. To install babel npm install -g babel Then within your javascript project, you can create a .babelrc file with the following content: { "presets": ["es2015", "stage-0", "react"] } React and its surrounding libraries After starting using React, I realized it was vey good and was surrounded with libraries which makes it even better: redux, immutable, react-router…...

April 11, 2016 · 2 min · Me

javascript dev environment setup

NodeJS Go to the nodejs website and install nodejs latest stable version: NPM Go to the npm website and follow the instructions Install nodejs essential packages npm install -g eslint webpack webpack-dev-server babel-eslint serve Install sublime-text essential plugins With the help of the package manager, in sublime-text, install the following packages: babel, Sublime-Linter-Contrib-eslint, React ES6 snippets Make sure your linter is working In sublime text, open the console (view > show console) and check if there is any error message....

March 10, 2016 · 1 min · Me

golang dev environment setup

Golang environment install golang Within sublimetext, from the package manager, install gosublime, install gooracle. install go/tools: go get -u go get -u go get -u go get -u install gometalinter ( install interfacer ( install gosimple ( install gocov ( Here is the package settings I use for gosublime: { // you may set specific environment variables here // e.g "env": { "PATH": "$HOME/go/bin:$PATH" } // in values, $PATH and ${PATH} are replaced with // the corresponding environment(PATH) variable, if it exists....

February 20, 2016 · 2 min · Me