diff --git a/unit08_blockchain/lab/README.md b/unit08_blockchain/lab/README.md index 9e03487..b6b3803 100644 --- a/unit08_blockchain/lab/README.md +++ b/unit08_blockchain/lab/README.md @@ -168,30 +168,28 @@ To test, we can just enter the variables for a given function, and get a result: ## Creating ERC-20 tokens
Within the Ethereum blockchain, we can record transactions and run smart contracts. These things allow us to run DApps (decentralized applications) and which can support the running of the infrastructure in return for some payment (Ether). A DApp can also create tokens for new currencies, shares in a company or to prove the ownership of an asset. ERC-20 is a standard format for a Fungible Token and which can support the sharing, transfer and storage of tokens. These tokens are supported by the whole of the Ethereum infrastructure and can be easily traded. They support a number of mandatory functions:
-There are also a number of options:
-- So, let's create a token named "ENUToken", and use the tutorial sample from [ - here]. 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:
-
+```
pragma solidity ^0.4.24;
// ----------------------------------------------------------------------------
@@ -412,11 +410,11 @@ contract BillToken is ERC20Interface, Owned, SafeMath {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
}
-
+```
When you create your own contract, make sure you change the public constructor() with: the symbol, the name, and the wallet ID:
-
+```
constructor() public {
symbol = "ENUToken";
name = "ENU Token";
@@ -425,7 +423,8 @@ contract BillToken is ERC20Interface, Owned, SafeMath {
balances[0xbB15B38e4ef6aF154b89A2E57E03Cd5cbD752233] = _totalSupply;
emit Transfer(address(0), 0xbB15B38e4ef6aF154b89A2E57E03Cd5cbD752233, _totalSupply);
}
-
+```
+
The wallet ID is the public ID of your wallet in Metamask. Now we compile:
