Hackathon Starter Pack, DApps Dev Club edition

If you're at a hackathon, and wanna develop a DApp, we've got the basics covered here!

We're currently in the midst of NBC'19, and there are a few questions that keep coming up, and a few resources that I have been referring you to quite often. In the spirit of scaling my reach up, and also so that everyone gets the same information … the following compiles all of thoses things into one post! 🎉

Things you need to install

  • NodeJs

    • Javascript development platform, which several of the Ethereum development tools run on
  • MetaMask

    • Chrome browser extension, which acts as a wallet plus a means to interact with you smart contract from a web page
  • Truffle

    • A suite of smart contract development tools
  • Ganache

    • A simulated blockchain that you can run on your own computer, with a GUI

Hands-on guides

What are you currently trying to do? Just jump in to the part which is relevant to you!

The items below are not intended to be comprehensive or thorough, but rather the absolute mininum necessary required to pull off something during a hackathon.

What is an Ethereum wallet?

  • BIP39

    • go through the slides in this section to understand how to derive accounts from seed phrases
    • MetaMask and Ganache will make use of this
  • Simple Transactions

    • Once you have a wallet, try using it on this page
    • Get some ether try it out here

Smart contract development

DApps Dev Club session #04

Front-end development

DApps Dev Club session #06

Frequently asked questions

Why does MetaMask not connect to Truffle?

Make sure that you have changed your network in MetaMask to the localhost network, and that the port number matches too. Usually this will be localhost:8545.

Why doesn't Truffle deploy connect to Ganache?

  • Make sure that you Ganache is running
  • Open truffle-config.js, and ensure that the development object is uncommented.

    • Also, ensure that the port number and network ID are match that found in Ganache

What's the difference between truffle develop and truffle console?

  • truffle develop runs its own local simulated blockchain, and thus whatever you have on ganache is ignored.
  • truffle console --network develop does not run its own blockchain, and instead attempts to connect to whatever has been defined in truffle-config.js, which in this case should be your instance of Ganache that is running.

Anything else?

Is there anything else that you think should be here? Let me know and I'll update the list!

… Happy hacking!