Smart Contract: Introduction 4
Setup Ethereum Node: Deploy Smart Contract 2
Labs & Assignment 6
Ethereum Node & Development Setup Instructions
In case you run into problems with your domain/ chain, click on RESET CHAIN button in your Manage My Chains page
For the next few exercises, you get to launch your very own, private blockchains & development environments on your very own personal server in the cloud! And you get your own personal domain, so you can easily share with your friends/ colleagues, get them to interact with your blockchain. This is a safe environment to play around, you dont need to buy any actual Ether/tokens to participate in this blockchain. So let’s get started.
Let’s first set up your own private Ethereum blockchain development environment. In this setup, you’ll have access to the following:
- A private Ethereum based node
- A wallet application that can connect to your private node
- A blockchain explorer, so you can explore the blocks in your chain
- Your very own smart contract development environment, running on your domain, which can connect to your private blockchain node.
Steps to setup your node:
1.Go to the Manage My Chains tab in the menu.
2. Select Ethereum.
3. Select a domain name that you prefer. If the domain is available, you’ll be allocated that domain name and all the 4 development items above will be available on your private server, and you can browse to it from anywhere using a browser.
4. Now Click on Launch Blockchain Server.
5. At this point, it may take upto 30 seconds before your wallet, smart contractr development environment, blockchain explorer and your ethereum node are live and running on your domain. It may take 30 minutes for the domain to go live.
6. To interact with your blockchain, you need some tokens/ credits/ ether. You’ll get some prepopulated Ether in your account, but you need to access it via your Private Keys.
7. Click on the “Get Wallet Keys” button. This should bring up your private keys. You’ll use these private keys to unlock your wallet, access ether that you can transfer to your friends, and also use as “Gas” to execute smart contracts.
8. Let’s first make sure your blockchain is live, and browse your blockchain using the blockchain explorer. You can browse existing accounts, the public keys associated with those accounts, and also the funds/ether allocated to those accounts.
9. Next let’s take a look at your Wallet interface. There is some setup required. As we discussed previously, many wallet applications use a common import format, but the wallet could be connected to either the live Ethereum blockchain, the testnet or a private node (which we use in this exercise). We need to tell the Wallet which blockchain network it should connect to in order to execute transactions, verify balances, etc.
10. Give your node a name you prefer, and enter the URL of your private domain, along with port #7852. This is the port on which your private blockchain API is available to the external world.
Since we’re using a Custom Node, select the “Custom” option, save and use current node.
11. At this point, the wallet should be connected to your private node. We’re ready to execute transactions. But first, you need to “Unlock” the wallet using your private key which you fetched earlier in the DappsUni Manage Chains page.
12. Once you unlock your account, you should see the Public Key address matching your Private Key. You can verify the address and the balances on the private blockchain explorer.
13. Finally, let’s set up your environment so you can execute Smart Contracts on your private blockchain.
14. Go to the IDE, select a compiler version. Then click on the “Run” menu item select Web3 Provider Endpoint in the “Environment” pull down. Enter the address of your private blockchain along with the port number. THis tells the Smart Contract interface to connect to your private Node. You should see your accounts with the available funds. You will use these accounts to execute smart contracts.