Ethereum first dapp - part 2

Frontend Prepare your folder for your dapp I will be using https://github.com/mxstbr/react-boilerplate 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 https://github.com/ethereum/web3.js/releases 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="https://cdnjs.cloudflare.com/ajax/libs/bignumber.js/2.4.0/bignumber.min.js"></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: https://www.ethereum.org/greeter 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 http://www.meetup.com/fr-FR/GCPUGSG/events/232659329/?eventId=232659329 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: https://kuberneprez.surge.sh here is the source code: https://github.com/vincentserpoul/prez-kubernetes The framework can be found here: http://stack.formidable.com/spectacle/#/?_k=cyx05u I will do it again!...

July 28, 2016 · 1 min · Me

learning react

React Nothing beats the facebook React page: https://facebook.github.io/react/docs/getting-started.html Redux Nothing beats the redux tutorial: http://redux.js.org/ And also available on egghead, by Dan Abramov himself: https://egghead.io/series/getting-started-with-redux A list of tutorials: https://github.com/happypoulp/redux-tutorial A great detailed introduction to your SPA setup http://blog.joanboixados.com/building-a-boilerplate-for-a-koa-redux-react-application-including-webpack-mocha-and-sass/ An advanced SPA (still under construction) https://www.gitbook.com/book/tonyhb/redux-without-profanity/details

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: https://nodejs.org/en/download/stable/ NPM Go to the npm website and follow the instructions https://docs.npmjs.com/getting-started/installing-node 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 http://www.wolfe.id.au/2015/03/05/using-sublime-text-for-go-development/ Within sublimetext, from the package manager, install gosublime, install gooracle. install go/tools: go get -u golang.org/x/tools/cmd/goimports go get -u golang.org/x/tools/cmd/vet go get -u golang.org/x/tools/cmd/oracle go get -u golang.org/x/tools/cmd/godoc install gometalinter (https://github.com/alecthomas/gometalinter) install interfacer (https://github.com/mvdan/interfacer/) install gosimple (https://github.com/dominikh/go-simple) install gocov (https://github.com/axw/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