Ethereum, tokens & smart contracts.
Read till the end if you want to save a week in developing time !
A basic understanding of cryptocurrencies, programming languages and development practices (github, npm, terminal etc) seems to be a prerequisite, but if you’ve done any software or tech development you know that learning on the job is the norm, else just research on your own whenever you see a strange or new concept or term.
Also note, this space is fast changing, this guide might not be up to date in a few month but hopefully will be an indication of what to look for and where.
Where to start:
- Official Site : https://www.ethereum.org, the documentation is very readable and you will be consulting it from time to time.
- Forum: https://gitter.im/ethereum/home , the forums helped me with some super newb questions.
- Other: https://ethereum.stackexchange.com , for in depth technical questions, & troubleshooting, reddit/r/ethereum also has some valuable information.
( One way of doing it, you could of course go in a different path )
In order to make a development environment you need a few things.
1.Command line tools: https://ethereum.org/cli, there are a few to choose from.
I went with geth for iOS, seems to be the popular entry level one.
Install instructions:https://ethereum.gitbooks.io/frontier-guide/content/installing_mac.htmlDon't forget to set up your etherbase ( Account ) with$ geth account new Alternatively you can do it via the wallet:
2. Ethereum wallet: The official ethereum wallet, it also has tools for launching contracts and tokens ( our goal here ), while you can do everything with the command line tools, it has an UI for balances, accounts etc,etc, which makes thing easier and nicer to work with.
Note on terminology/stack: Mist is the browser for decentralized web apps, and the ethereum wallet is a Decentralized Application ( DApp ), it is also called Meteor DApp Wallet. More here...
The first catch is that of test nets , in a nutshell rather than deploy your contracts in the real Ethereum network ( which costs money ) it is preferable to do it on a testnet which recreates the ethereum blockchain and allows you to test how your contracts and code perform against it for free. They come in 2 flavors:
- Public : Online, a few to choose from: Ropsten, Rinkeby, Kovan for now.
- Private : On your own computer.
Connecting to a testnet ( default is Ropsten):
$ geth --testnet --fast --cache=512 console Notes:--fast --cache=512 and console are convenience options for speed and starting the interactive js environment. --fast in particular does not download the whole blockchain, but a recent state, it will still take many hours.
To disconnect: Ctrl-C.
Detailed instructions: https://github.com/ethereum/go-ethereum
Note: to see your progress syncing, check the last block in the test net block chain ( ropsten revival in this case ) in the block explorer ( https://ropsten.etherscan.io/ ) or your chosen blockchain.Note on the note: it is called ropsten revival because the original testnet got attacked,it died, this is the new revived one. More here...
Things I tried:
- Download the testnet blockchain on the ethereum wallet…My laptops punny ssd cried about space, ( the blockchain was about 30+ GB ).
- Light Client Mode: An experimental mode which downsizes the blockchain, this worked (sometimes ) in OSX, but as of this writing has issues interacting with the ethereum wallet, sigh.
geth — syncmode “light” — testnet
- Parity: Another ethereum client/browser for running Dapps.
parity --chain ropsten
parity ui The last one launches the Browser UI ( which didn't work on safari in my case )
The good news is that syncing is a breeze on parity, the bad news is that it doesn’t come with a miner, we still need some ether for our contracts, so
TRY 1 ( On osx)Get a miner and install it:https://github.com/ethereum-mining/ethminerrestart parity with the author flag (so you can get send some ether to that address:$ parity --author 0x002b17A** Your Address **46F5a -- chain ropstenAnd fire up your miner:$ ethminer -GResults: Inconclusive ( couldn't mine, probably didn't gave it enough time, DAG supposedly takes a day or so)
TRY 2 (On a pc-windows with a better HD overnight on geth)Sync in fast mode Mine:> geth --testnet --mine --minerthreads 1Results: No ether, turns out you can't mine my chosen testnet (ropsten) without a beefy gpu, you might have a better result.TRY 3 (with a pool) http://pool.ropsten.ethereum.org:Resulst: Mined for hours did not got any ether.
Faucets : Not having had much luck getting test ether via mining, the faucets while scant and ever changing are your friends, this one: ( http://faucet.ropsten.be:3001 ) gave me 3 (three) precious test ethers !
Switching to Kovan + Parity
While I did get a setup going with geth-mist, I wasn't all that great, maybe in the future, so I decided to try another stack that was recommended to me, kovan+ parity.
Right off the bat syncing took like 5 minutes with parity, signing up for a daily test ether faucet a couple more, while I didn't try all the combinations, I think this is the best so far although it does have some bugs ( didn't work on safari ) and the UI/UX is challenging.
you can try the other ways if you want to learn, but this was the fast simple one for me.
Things I didn't try: You can mix an match wallets/syncing ways and testnets, and more will probably be available in the future, you can also make your own private blockchain, but for getting started that seems overkill.
What’s next ?: Once you are comfortable with interacting with wallets, command line tools and testnets you are mostly on your way to developing on the ethereum blockchain, mind you this took me a week and as mentioned is fast changing and we have yet to write any code, that will be the next part.
PART 2 (web3.js) : https://medium.com/@k3no/ethereum-tokens-smart-contracts-a263b43d4c54
Hey, These notes were polished and made into a book... If you are looking for an introduction to Ethereum, Solidity and Smart Contracts I just published an eBook and print Book on getting started:https://www.amazon.com/dp/B078CQ8L7V
About the Author :
Born Eugenio Noyola Leon (Keno) I am a Designer,Web Developer/programmer, Artist and Inventor, currently living in Mexico City, you can find me at www.k3no.com