Ethereum react dapps

I finished my first dapp with (react-boilerplate)[https://github.com/mxstbr/] this week and here are the few things I learnt. I won’t get into the redux, redux-saga details, I let you play with the amazing boilerplate. Interacting with constant functions Let’s use the typical balanceOf function of the EIP20 contracts: function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; } Here are the sagas (redux-sagas) I used to interact: import { take, call, put, cancel, select, fork } from 'redux-saga/effects'; import { BALANCE_OF_GET, } from '....

October 27, 2016 · 6 min · Me

Ethereum contracts and Golang

The contract contract Trigger { function () { throw; } address owner; function Trigger() { owner = msg.sender; } event TriggerEvt(address _sender, uint _trigger); function trigger(uint _trigger) { TriggerEvt(msg.sender, _trigger); } function getOwner() constant returns (address) { return owner; } } This is a very simple contract that we will take as an example. Getting the right tools for binding A good starting point is this wiki. You will need to follow the install procedure of go-ethereum....

October 10, 2016 · 3 min · Me

Blockchain week in Shanghai!

I participated to the devcon2 and blockchain summit last week. Here is my summary!

September 16, 2016 · 1 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