Duration: ( 13 Weeks )
W3-351: Developing Smart Contracts and Planet-Scale Web 3.0 Dapps
In this course you will learn how to develop Web 3.0 DApps, create a project, deploy it in production, write smart contracts, unit test them, and create user interfaces for them. We will also learn to develop ERC-20 and NFT tokens, DAOs, Oracles, etc. Please note that in order to develop Web 3 applications you also need to build on top of Web 2.0 technologies which we have already covered in the previous quarters.
Dapp Learning Repo
As you probably know, the ICO ("Initial Coin Offering") industry has been booming, and it's completely reinventing the way new startups kickstart themselves. In fact, have a look at Wikipedia's list of highest crowdfunding projects
and you'll notice that blockchain projects absolutely dominate the list.
Understand the difference between IDO vs. IEO vs. ICO
Also check these links for latest listings:
Top-Rated Crypto Token Sales: List of New ICOs, STOs, IEOs and IDOsTop-Rated Crypto Token Sales: List of New ICOs, STOs, IEOs and IDOs
Project Part 1: How to Launch a IEO on Binance Launchpad
Read How to Launch an IEO
Your first task of the project is to make a google slides presentation on how to start a IEO on the Binance Launch Pad
Note : Also document the alternatives to Binance Launchpad.
Project Part 2: How to Launch a IDO on Polkastarter
Review the list of top fundraising platforms
Your second task of the project is to make a google slides presentation on how to start a IDO on the Polkastarter
Project Part 3: Create a Pako Token
By creating a token and related contracts, you'll also learn how to handle money sent to your contracts, which should come in handy if you want to create some kind of paid decentralized service in the future.
Therefore, for the sake of this chapter, let's imagine that our Pako DApp uses its own coin – the Pako Token. We will create two contracts – one for the token itself and one for the token crowd sale (the ICO).
Now Create your own Pako ERC20 Token and deploy it on a testnet. The Token should be to use OpenZeppelin contracts. You will use the Hardhat development environment. Also, write at least twenty automated tests. We will be using Solidity and Typescript for development.
Project Part 4: Develop Crowd Sale Contract
This contract will be responsible for allowing users to exchange ETH for our Pako Token. In order to do that we need to set a price for our token (1 ETH = 100 Pako Token)
Implement a payable buyToken() function.
Emit a BuyTokens event that will log who’s the buyer, the amount of ETH sent and the amount of Token bought
Transfer 75% of the Tokens to the Crowd Sale contract at deployment time. i.e. Right after the contract is deployed, we want the token contract to send 75% of our token supply to it. While 25% remain in our personal "owner" account.
Transfer the ownership of the Crowd Sale contract (at deploy time) to our frontend address so that we are able to withdraw the ETH.
You can use the openzeppelin crowd sale contracts
however you will have to update the code to the latest solidity version.
Also write extensive tests, for example we will simply send a transaction of 1 ETH from a random account to the contract. After the transaction, we should expect the account to have received Pako, while the contract's balance should have been reduced.
Note : Before you get started writing the token contract we suggest you review the access control
Project Part 5: Trying it with MetaMask
While it's always good to test your code, it's often more satisfying to see the results of your work wrapped in a nice UI. Let's see how we can deploy our contracts and get some Pako tokens into our MetaMask wallet!
We start by running our deployment scripts for the test network so that the new token contracts are uploaded and deployed.
When it's done, take note of what addresses the contracts were uploaded to and copy it!
Now head to MetaMask, and send a transaction of 1 ETH to the crowd sale contract address. If your MetaMask wallet doesn't have any ethers, remember that you can use any faucet.
After the transaction has been confirmed, you might be confused about why you can't see any tokens in your wallet. It turns out that you need to manually add the token address in MetaMask in order to "register" it – after all, there are so many tokens out there, there's no way MetaMask could list them all by default!
To do this, open the side menu and click on the "Add token" button to get started:
Once you're on the token page, click on "Add custom token" and paste in the token contract's address in the address field.
After confirming that you want to add the token, you should be able to see your Pako balance right next to your ETH balance in the wallet. How cool!
Project Part 6: Trying it with Multisignature Wallets
Now use Gnosis Safe with multi-sigs to do what you did in the last part
Project Part 7: Sending Tokens using Ethers.js
Write a Typescript program to send Pako Token to some friend's address using Ethers.js.
Project Part 8 Advance: Create, Deploy, Mint, and Sell an NFT
Read this NFT tutorial series
Create a NFT contract using the OpenZepplen ERC721 NFT Standard
You may use the Preset ERC721 contract
Deploy your NFT contract on a testnet, mint it, and view it on the MetaMask wallet and list it on OpenSea Marketplace for sale.
Implement a ERC721 Market