Deploy your first smart contract with this base ethereum/truffle setup

August 27, 2017 in #ethereum #docker #smart contract #truffle | | | Share on Google+

Enter blockchain programming with Ethereum and smart contracts

Your takeaways from this post:

  • Build a base setup to access Ethereum network and quickly deploy smart contract. Docker infra includes:
  • You can easily switch and join the production network, testnet , or even our Geneva devchain (email me if you want to join our local dev group)
  • Some easy steps to understand smart contract with deployment examples of a HelloWorld, a Counter and simple token.
  • Interact with the contracts within Truffle
  • Be ready to build on disruptive technologies and embrace the future!

Why learn smart contract in the first place?

As the internet revolutionized information sharing, blockchain will do the same on how values are transferred (money, stocks, bonds, properties).
Blockchain (the internet of value) is disrupting intermediaries because a trusted entity is not anymore needed to transact value. Ethereum blockchain is the trustless network for transacting. All industries (financial, legal, tech, supply chain, art & media) are moving towards it to reduce their costs.

Smart contracts are programs running on the Ethereum network. When deployed, they are autonomous, and could serve clients (against negligible fees ~0.15$) without human interaction, trusted company or hardware hosting costs.

Imaging a smart contract "uber": where there is no back-office employee, no fee for hosting their infra, or managing transaction. A client orders a taxi through a mobile app (built by a crowdfund open source community), pays $10 for the car ride through the smart contract, and the driver gets all his added value $10-$0.15 if he complies to all the rules of the contract (client has validated that he reached his destination). Same network fees (~$0.15) apply if he had used a private jet, or sent $1 Million to a friend, no entities in the middle (uber, banks, visa) take their cuts.

Our Ethereum setup based on docker

This docker compose deployment will give you, in one command line, all the tools you need to build up a full environment to access Ethereum:

  • Ethereum go-client (geth) running on port 8544 with
    • 2 Ethereum accounts, already unlocked
    • Connected to Geneva devchain (network ID=2017042099)
    • Mining the blocks (optional)
    • Data are saved out of the container on your host, so no problem if you delete the container
  • Testrpc: eth-node running a test network on port 8545
  • Truffle: where you can test and deploy smart contracts
  • Netstatsapi: which will collect and send your node perf to our devchain dashboard on
  • Netstatsfront: dashboard to display eth stats (not used by default)

Start programming smart contracts

Follow the github to get step by step instructions to deploy your Ethereum infra running on docker:

From here you can start test/deploy a simple HelloWorld smart contract and learn more about the ecosystem and commands.

Thank you for reading :-) See you in the next post!

August 27, 2017 in #ethereum #docker #smart contract #truffle | | | Share on Google+