ICO and ERC20 Token deployment on Rinkeby Testnet. Testing the ICO.
A free video tutorial from Andrei Dumitrescu
DevOps Engineer and Professional Trainer
4.6 instructor rating • 8 courses • 30,319 students
Learn more from the full courseMaster Ethereum & Solidity Programming From Scratch in 2021
Ethereum & Solidity Programming For Beginners. Build 5 Hands-On Smart Contracts: Token,ICO,Lottery,Auction,Crowdfunding
09:43:15 of on-demand video • Updated April 2021
- Understand the Ethereum Blockchain Platform (accounts, addresses, ether, gas, opcodes, transactions, blocks, mining, etc)
- Have a very good understanding of Solidity Contract Programming Language (syntax and concepts like state variables, storage, functions, visibility specifiers, mappings, structs, enums, etc)
- Understand concepts like Events, Function Modifiers, Contract Inheritance, Abstract Contracts & Interfaces, etc
- Design, create and deploy a fully-compliant ERC20 Token and launch an Initial Coin Offering (ICO)
- Design, develop and deploy a smart contract for a decentralized Lottery
- Design, develop and deploy a smart contract for a decentralized Auction Platform
- Understand good practices for developing Ethereum Smart Contracts and see real-world examples to comprehend what is the advantage of Blockchain Technologies.
- Design, develop and deploy a smart contract for a decentralized FundRaising Platform
- Use geth and Set Up a Private Ethereum Blockchain
- Understand what is InterPlanetary File System (IPFS) and how it works. Installing and Running an IPFS Node on Linux or Windows
English Now it's time to deploy our ERC20 token and the ICO contract to a live network. So using Metamask and the Rinkeby Test Network I'll deploy this smart contract. First of all if I try to deploy the contract without unlocking Metamask I get an error. For example deploy And this is the error. So first I must unlock Metamask now that Metamask is unlocked We can deploy the contract here. I select injected web3 This means Rinkeby Test Network and I need a deposit address. I'll create a brand new Ethereum account using Metamask. I'll use this account only for our ICO. I copied its address and here I paste the deposit address. Of course we must select an account that has an ether balance because somebody must pay for the gas. So here let's select the third account or another account with some ether and deploy. The Metamask window appears. I can increase the gas fee if I want my transaction to be mined faster So here let's set ten gigawei and confirm. And the transaction has been sent to the network. OK. It has been already mind. We can see the transaction on etherscan.io So this transaction has been included in block number and this is the number and will be reflected in a shortwhile. So we wait a little bit. OK. This is our transaction. This is a transaction that created a contract. This is the address of our ICO contract. OK. So any investor should send either to this contract address. Let's try an example. Let's suppose we are an investor and want to buy some Cryptos. So using my etherwallet I select send ether and tokens and here json file I have another wallet with some ether and I'll send either from that address, from that wallet. So here open, the json file is encrypted with a password. So here I must enter the password and the account has been unlocked. So this is an externally owned account a user account and it has a balance of almost zero point five ether. So let's send to the contact address. The amount of ether I want to invest, so I'll send zero point one either to the contract address. generate transaction, the gas price of ten gigawei is OK and send transaction the transaction has been sent and we can wait for the transaction to be mined. Until the transaction is mined Let's take a look at our contract. Here I said that one either equals 1000 CRPT So our investor sent 0.1 ether so that investor should receive 100 Cryptos. And the transaction has been mined. Now let's see what is the balance of our investor. We can see It's balance here. OK. This is the same account we used in a previous lecture from our previous section when we've created our first erc20 token. So this is why we see here 85 CRPT. But these tokens have nothing to do with our ICO and transaction so I delete them and here I press on add custom token. Here I'll paste the contract address, the ICO contract address. OK token symbol CRPP, the number of decimals is 0. and safe. And we can see that this account received one hundred CRPT. The account sent 0.1 ether and received in turn 100 CRPT. OK? We can also see its balance here. So you can use any ERC compatible wallet. So here If I want I could load contract from address. And I Ioad contract address, at address And this is our contract from the Rinkeby Test Network. OK? And let's see what is the balance of an account so of this account. This is the address I copied the address to clipboard and here in remix I pasted it in this edit box balance of And we can see it's balance is 100 Cryptos. So everything works as expected. One more thing we must verify. The deposit address should have received 0.1 either. So let's open Metamask and let's check what is the balance of the deposit address. So the deposit address was the ICO deposit. And you can see there are 0.1 ether. This is the ether that was automatically sent by our contract. So here by this statement. So the contract sent to this address, so to the deposit address, the value received from that externally owned account. So we could see that everything works perfect. OK. Let's all, thank you.