-
Notifications
You must be signed in to change notification settings - Fork 9
Development Environment
This page has our notes on our smart contract development environment. Andy is currently working on a packaged environment that will cover the web2 and web3 environments.
See the readme
- Truffle 3.2.2 (more recent versions I've had a few problems with)
- Metamask 3.8.0
- testrpc v4.0.1
- geth 1.5.5
We should develop in solidity and javascript, using the standard libraries provided by truffle(well supported). Rich is tooling up and getting some simple dapps with tests running under truffle. Sadly, metamask is our only option for web3 injection and browsing.
- Linux Virts: We have geth syncing testnet on the linode "wfpbb". Andy has a linode virt up running a web2 app.
- Ethereum-only nodes: We have an Infura setup
From zero to running unit tests in metamask:
sudo npm install n -g
sudo npm install -g scrypt
sudo npm uninstall truffle
sudo npm uninstall -g ethereumjs-testrpc
sudo npm install -g truffle@3.2.2
sudo npm install -g ethereumjs-testrpc
mkdir stuff
cd stuff
truffle init webpack
npm install truffle-default-builder --save
truffle compile
truffle build
truffle migrate --reset
truffle migrate --network ropsten
truffle serve ( or "npm run dev" - seems to work on truffle 3.3)
Right here goes some other stuff like editing truffle.js, setting up testrpc and/or geth, funding metamask wallets, etc.
config metamask to talk to testrpc or geth
import a testrpc or geth private key into metamask
use the dapp
here we need the truffle unit test config
Installing truffle and getting started: https://github.com/richbodo/building_blocks/blob/master/docs/truffle_testrpc_install.md
Getting testrpc to work with metamask: http://truffleframework.com/tutorials/truffle-and-metamask
Using the default builder and more about truffle 3 settings:
http://truffleframework.com/tutorials/upgrading-from-truffle-2-to-3
Old reliable reality check without web3:
https://medium.com/@codingwithgas/this-is-a-code-block-906bf915e290
Docker config:
https://github.com/dougvk/truffle3-frontend-example
Dapp packages and dev environments:
https://github.com/OpenZeppelin/zeppelin-solidity
https://truffle-box.github.io/
https://github.com/iurimatias/embark-framework/blob/develop/README.md
- Does inheriting contract methods exact a performance penalty?
i don't think so - http://solidity.readthedocs.io/en/develop/contracts.html#inheritance
- Is it better to handle a set of items as an array, or a mapping coupled with a counter variable?
- How to handle events? Can they be used to store historical data instead of transactions?
Wiki Home | Source Code | Issues | Milestones
FAQ - Frequently Asked Questions
Design - includes use cases
Development Environment and other Dev stuff