Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexanderadam/07a5feeba29a9edaed16386db1a51424 to your computer and use it in GitHub Desktop.
Save alexanderadam/07a5feeba29a9edaed16386db1a51424 to your computer and use it in GitHub Desktop.

EasterHegg 18 Workshop: Smart Contracts on Ethereum

Requirements:

Coding your first smart contract!

a. Setting up Metamask

  1. Install the Metamask Chrome plugin.
  2. Open Metamask (there should be an orange fox icon in your browser toolbar).
  3. Click through the license agreements.
  4. Create a new "den" which will house your Ethereum account.
  5. COPY THE 12 WORDS SOMEWHERE SAFE.
  6. Click the network selection button on the top left part of the Metmask app. It should say "Ethereum Mainnet" or "Ropsten". Change that to Rinkeby.
  7. Copy your Ethereum account address by clicking the "Copy" icon above the "Buy" and "Send" buttons. Mouse over the icons to reveal their label.

b. Get Rinkeby Testnet Ether

  1. Create a tweet containing your Rinkeby account address (the one you just copied, it looks something like 0x8F555E28F70AF161e811e95Fc1e56B5356601E15).
  2. Copy the permalink of your tweet.
  3. Visit the Rinkeby website and click "Crypto Faucet".
  4. Paste the permalink into the box provided and click "Give me Ether - 3 ethers/8 hours".
  5. Some confirmation message should appear.
  6. You can new delete your tweet if you like.
  7. Wait 10-20 seconds.
  8. Look at your Metamask client and verify that you received 3 Rinkeby testnet ether.

c. This does not work or I don't use / like twitter

  1. Send me your account address either as a comment under this gist or to chris@ethereum.org
  2. Wait maybe more than 20 seconds.
  3. Try to get my attention.

d. Writing your first smart contract.

  1. Go to the Remix website.
  2. It will display a rather complicated example contract.
  3. Click on the + button in the top left to create a new file. Choose a name and click OK.
  4. We will walk through the rest of the steps live.

e. Some source files we will use:

  1. Simple Contract
  2. EasterHeggs

f. Some Links:

  1. https://rinkeby.io (testnet interface)
  2. https://rinkeby.etherscan.io (testnet blockchain explorer)
  3. https://remix.ethereum.org (development environment)

g. If you want to know more:

  1. https://solidity.readthedocs.io (Solidity documentation)
  2. https://cryptozombies.io (interactive tutorial)

What are things?

Ethereum is an open-source, public, blockchain-based distributed computing platform featuring smart contract (scripting) functionality.

MetaMask is a bridge between your Browser and the Ethereum blockchain. It allows you to run Ethereum Dapps in your browser without running a full Ethereum node. MetaMask includes a secure identity vault, providing a user interface to manage your identities on different sites and sign blockchain transactions.

Solidity is a programming language used to code smart contracts that are compatible with Ethereum. The documentation for Solidity is located here. We will be using Remix when developing our smart contracts. Remix is an online development environment that allows you to code, deploy, and test smart contracts on the public Ethereum networks and test Ethereum networks.

Rinkeby is a public Ethereum test network that is used to deploy and test smart contracts for free. In order to receive Rinkeby ether coins, you will need to visit https://www.rinkeby.io/ once you have your Metamask client installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment