Short guide for your first dapp
- Before you begin:
You need to have a foundation of things and underestand things like wallets, contract addresses, RPC URL, dapps, gas limit, gas price
Before anything you must start with a history lesson
and 2 very important articles (and short) that will save you lots of $ in the future
https://cointelegraph.com/ethereum-for-beginners/ethereum-wallets-a-beginners-guide-to-storing-eth
Do you know enough ?
There’s never-ending learning but…. If you don’t know the answer to all of the below questions, than this means that you don’t know the basics… and should address this issue by studying more
1. What is the difference between private key, public key and address what is a seed what is a nonce.
2. What is “wei”, “gwei”
3. How can you get the USD / ETH exchange rate from inside Ethereum ? What are Oracles ?
4. What is an HD Wallet ? Does Metamask have an HD wallet in it ?
5. What is RPC node? how you can connect to it
6. What are Metamask’s alternatives ?
7. What is the difference between RPC node and Signer Node.
8. What is gas price, what is gas limit ?
9. What happens if you set the gas price to low, what happens if you set the gas limit to low ?
10. What is ERC20 ? ERC721 ? ERC1155
11. What is the difference total supply, max supply, circulating supply
12. Who is Vitalik, Joseph Lubin ?
13. What does Consenys company do ?
14. What will ETH2.0 have over 1.0 ?
- Since setting up your own eth node is only for specific projects the usual things you want is to get an RPC connection to the ethereum (or any ETH compatible) blockchain. Usually by: , https://www.alchemy.com/ , https://www.quicknode.com/, https://blockdaemon.com/, https://infura.io (only ETH), https://nodesmith.io/ pick one you like and use ONLY the FREE plan (do not upgrade anything)
2. For testing purposes I suggest you use polygon testnet (called mumbai). [LATER EDIT: until they fix the problems with EIP1559 the testnet is unusable! Use something else, maybe rinkeby] Why? Because it’s the fastest testnet and you would want quick feedback on what you do.
Setting up polygon testnet:
In your metamask, add a new network and configure the RPC url from the one that you got at step #1.
All addresses that you have in metamask are shared between all ETH compatible blockchains.
Go to mumbai faucet https://faucet.polygon.technology/
leave network Mumbai, Token MATIC Token
and just put your wallet address there. Click submit, wait 1 min, click again submit. you should have ~2 MATIC in your wallet for testing purposes
3. 90% of the traffic will come from desktop — with metamask this means that this method has to work perfectly.
There are two ways to connect to metamask. 1. web3.js (old, ugly way… but lots of documentation), 2. ethers.js (new, simpler…less documentation). I would go with ethers.js
Start by reading this:
https://docs.ethers.io/ -> just read the intro part then continue to this
at the end, having a very simple frontend, you should be able to transfer some simple erc20 token.
Finally
You will need an audit on your code. I recommend https://to.wtf as best auditors on the market :)
There are many good tutorials to follow and the learning never ends
Start with this one:
then pick one ffrom this two