From f13ffb6a2a9d4d7af28755164a3830486eea1cbd Mon Sep 17 00:00:00 2001 From: Bill Buchanan Date: Tue, 29 Mar 2022 06:13:29 +0100 Subject: [PATCH] Update README.md --- unit08_blockchain/lab/README.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/unit08_blockchain/lab/README.md b/unit08_blockchain/lab/README.md index e7563d1..be3f013 100644 --- a/unit08_blockchain/lab/README.md +++ b/unit08_blockchain/lab/README.md @@ -2,8 +2,6 @@ # Lab 8: Blockchain and Cryptocurrencies -At the end of this lab, remember to stop your Blockchain (Control-C from the console that is running Geth), and shut down your VM. You may also want to use “rm -r mynapier” in order to delete your blockchain. - Aim: To provide a foundation in understanding in Bitcoin and Blockchain. ## Activities @@ -111,7 +109,7 @@ Balance for 1GbVUSW5WJmRCpaCJ4hanUny77oDaWW4to: ## Creating a Smart Contract in Ethereum So, let’s write a bit of code that does some simple maths. In the following we will implement sqrt(), sqr(), mul(), sub(), and add(): -``` +```solidity pragma solidity ^0.8.0; contract mymath {function sqrt(uint x) public view returns (uint y) { uint z = (x + 1) / 2; @@ -204,19 +202,16 @@ Note:You can get Ether for our wallet [here](https://faucet.metamask.io/) * allowance. This function checks if a user has enough funds in their account for a transaction. -

There are also a number of options:

- +There are also a number of options: * Token Name. This is the name that the token will be defined as. * Symbol. This is the symbol that the token will use. * Decimal. This is the number of decimal places to be used for any transactions. +So, let's create a token named "ENUToken", and use the tutorial sample from [here](https://github.com/bitfwdcommunity/Issue-your-own-ERC20-token/blob/master/contracts/erc20_tutorial.sol). First, we open up remix.ethereum, and enter the following Solidy contract: -

- So, let's create a token named "ENUToken", and use the tutorial sample from [here](https://github.com/bitfwdcommunity/Issue-your-own-ERC20-token/blob/master/contracts/erc20_tutorial.sol). First, we open up remix.ethereum, and enter the following Solidy contract: -

-``` +```solidity pragma solidity ^0.4.24; // ---------------------------------------------------------------------------- @@ -521,6 +516,7 @@ We can view the ENUToken: [here](https://ropsten.etherscan.io/token/0x7db2f938e1 ![Alt text](https://asecuritysite.com/public/sc17.png) # Additional Tutorial +At the end of this lab, remember to stop your Blockchain (Control-C from the console that is running Geth), and shut down your VM. You may also want to use “rm -r mynapier” in order to delete your blockchain. ## Using Geth In this tutorial, we will run an Ethereum blockchain on your Ubuntu host: