Dapp development¶
"The Hichhiker's guide":https://medium.com/zeppelin-blog/the-hitchhikers-guide-to-smart-contracts-in-ethereum-848f08001f05#.cp4famknr
"How to build safe smart contracts":https://medium.com/zeppelin-blog/onward-with-ethereum-smart-contract-security-97a827e47702#.c04d2p4xh
- fail early and loudly (use "function modifiers":http://solidity.readthedocs.io/en/latest/contracts.html#function-modifiers)
- favour pull over push (in order to avoid stuck contracts and "reentrancy issues:hackingdistributed.com/2016/07/13/reentrancy-woes/). Can inherit this pattern from "here":https://github.com/OpenZep/zep-solidity/blob/master/contracts/PullPaymentCapable.sol
- order: conditions, actions, interactions
- Be aware of "EVM":http://solidity.readthedocs.io/en/latest/introduction-to-smart-contracts.html#overview platform limits (e.g. avoid var i = 0 counters for loops as they default to uint8 and will easily and silently overflow, gas limits, max stack depth 1024 entries)
- Write tests (see "Truffle Framework":https://github.com/ConsenSys/truffle/blob/master/docs/getting_started/testing.md)
- Fault tolerance (see "Stoppable":https://github.com/OpenZep/zep-solidity/blob/master/contracts/Stoppable.sol) and "builtin bug bounties":https://github.com/OpenZep/zep-solidity/blob/master/contracts/Bounty.sol
- Limit amount of funds deposited
- Be modular and reuse existing code (as usual)
"gethdev":https://github.com/amacneil/gethdev is a convencience wrapper for geth in dev mode. I needed to manually create an account on first run: @web3.personal.newAccount@. Arguments set in env var @GETHDEV_OPTS@ in @~/.bashrc.
"Dapp using Meteor":https://github.com/ethereum/wiki/wiki/Dapp-using-Meteor
"Consensys noob howto":https://medium.com/@ConsenSys/a-101-noob-intro-to-programming-smart-contracts-on-ethereum-695d15c1dab4#.q9020dk9n
"testrpc":https://github.com/ethereumjs/testrpc is a dev friendly JS Ethereum Client
Frameworks¶
"Truffle":https://github.com/ConsenSys/truffle
"Embark":https://github.com/iurimatias/embark-framework
"Dapple":https://github.com/nexusdev/dapple
"Populus":http://populus.readthedocs.io/en/latest/
"BlockApps":http://blockapps.net/ - API to centralized service