Building dapps 🚀🧱 using solidity👩💻, as a beginner might be a little overwhelming with all the new terminologies and technologies.
So explaining some of the technologies can improve and better your understanding on the moving parts of creating Dapps. 👨🏫
Some of the terms and technologies are:
- 📂.env (dotenv file)
- 📂node_modules file
- 👨💻Npm, yarn , pnpm
- ⚙ABI & Contract Address ( and how using them in js communicates with your smart contract)
- ⛓EVM
- 🧪testnets ( examples)
- 🏧Faucets ( links)
- ⛽Gas fee.
- 🔐Private key.
.env files 📂
This is a file in your project application that keeps your sensitive information used in other parts of the project (variables) like your private key it does this by hiding them away.
(That's why the .env file is kept in .gitignore file => [as the name suggest its a file that contains name of other file your project that are not to show on GitHub repository] )
node_modules folder 📂
This folder is really an important folder of your project as it contains all the downloaded packages you installed from npm (or whatever package manager you use) and it is also created by npm . They are the modules that your project works with in order to perform and run.
Npm , yarn , pnpm
I'm sure you've seen commands like
npm install....
yarn add ....
By taking them one after the other;
npm is commonly said to be the acronym for "Node Package Manager" which is not the case. It is not an acronym but can be said to be "node pm" as pm is a short form for a bash function.
npm, yarn & pnpm are all package managers that help programmers to install, update packages, libraries etc. Programming languages have different package managers like JavaScript-> NPM as Ruby-> GEM.
npm is the pioneer packaging tool used by JavaScript
yarn is also a package manager for js that was developed by Facebook which is faster & more reliable than npm
pnpm is a new package manager for js that was built on top of npm to simplify the installation. in a nutshell its offers additional features to make it better than npm.
ABI & Contract Address ( and ByteCode)
ABI: Application Binary Interface; it is a piece of code generated after a contract is deployed, and it is used to interact with the contract from the frontend of the application by calling function, public variables etc.
Bytecode: This is a bunch of 1's and 0's code that gets deployed to the blockchain, This is the code taken by the blockchain and all contracts gets compiled into an EVM bytecode.
Contract Address: I'm sure you've this term very often. They are used to uniquely identify a smart contract on the blockchain.
The ABI and Contract Address are essentials in calling a function from the client side and the Bytecode for the blockchain.
EVM
Hearing alot about evm when your in the web3 space well from my humble teacher (google)
if you understand the concept of the JVM then this would be easier.
Ethereum Virtual Machine (EVM) is a computation engine which acts like a decentralized computer that has millions of executable projects.
It acts as the virtual machine which is the bedrock of Ethereum’s entire operating structure.
Testnet:
If working with solidity and programming dapps and deploying needs to be on the mainnet then only Elon Musk is gonna be a developer 😂 as any mistake / error would cost real money to change and put on the blockchain and I'm sure lots won't want to write contracts. ( I know i won't).
That's where Testnets come in.
Testnet are exactly like the mainnet's blockchain except they don't cost any real money and they are solely for testing when building of dapps abnd this is a good practice as the dapp should be tested and after the the application has reached its upmost efficiency level without errors before deploying to the mainnet.
Examples of common tetnets are:
- Ethereum: -> Rinkeby Ropsten Kovan Goerli
- Polygon -> Mumbai
- Arbitrum testnet
- Bnb testnet
- cahinlink-> link e.t.c
Faucets
They are services that provide free tokens (testnet) of a particular blockchain to users. Devs go to different Faucets to get testnet for their projects ( I do this a lot ;) )
Rinkeby -> rinkebyfaucet.com
Goerli -> goerlifaucet.com
Ropsten-> faucet.egorfine.com
Bnb -> testnet.binance.org/faucet-smart etc
Gases ⛽
To modify data on Ethereum a transaction is executed which cost gas ( gas/gas fees/transaction fees).
Gas is also a unit to measure the computational effort of a transaction. And transactions are executed by who we call "miners".
Some beginners can be like why do we need to pay gas....?
Well imagine you could execute transactions without gases being paid then the Ethereum network would be spammed and overloaded with transactions, nodes could be stuck due to unoptimised solidity code like infinite loops.
Private key 🔐
This is a key that grants ownership of fund to a particular user and they are used in the production of dapps along with the rpc url of the network being used.
The private keys are not to be shared with anyone as its gives full access to your funds.
That's why they are kept in the .env files and also in the .gitignore file so as to keep it safely.
ENDING I hope now you have a little more understanding about some of the technologies in building in web3.