Ethereum first dapp - part 3

setting up a light wallet In order to have a setup close to what the DAPP would be, we will use (metamask) [http://www.metamask.io] as a light wallet (there are other choices). Metamask allows you to connect to a custom node. We will then connect to our node, http://localhost:9012 If everthing is fine, metamasks should indicate it’s connected. Then, we can import the metamask account to our local node by simply specifying the datadir we have setup the node data....

August 12, 2016 · 1 min · Me

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