EasterHegg 18 Workshop: Smart Contracts on Ethereum
- Chrome/ium or Firefox
Coding your first smart contract!
a. Setting up Metamask
- Install the Metamask Chrome plugin.
- Open Metamask (there should be an orange fox icon in your browser toolbar).
- Click through the license agreements.
- Create a new "den" which will house your Ethereum account.
- COPY THE 12 WORDS SOMEWHERE SAFE.
- 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.
- 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
- Create a tweet containing your Rinkeby account address (the one you just copied, it looks something like
- Copy the permalink of your tweet.
- Visit the Rinkeby website and click "Crypto Faucet".
- Paste the permalink into the box provided and click "Give me Ether - 3 ethers/8 hours".
- Some confirmation message should appear.
- You can new delete your tweet if you like.
- Wait 10-20 seconds.
- 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
- Send me your account address either as a comment under this gist or to email@example.com
- Wait maybe more than 20 seconds.
- Try to get my attention.
d. Writing your first smart contract.
- Go to the Remix website.
- It will display a rather complicated example contract.
- Click on the
+button in the top left to create a new file. Choose a name and click OK.
- We will walk through the rest of the steps live.
e. Some source files we will use:
f. Some Links:
- https://rinkeby.io (testnet interface)
- https://rinkeby.etherscan.io (testnet blockchain explorer)
- https://remix.ethereum.org (development environment)
g. If you want to know more:
- https://solidity.readthedocs.io (Solidity documentation)
- 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.