Solidity is a programming language to write code for Ethereum based blockchain applications. The code is popularly known as
smart-contract and the application is referred as
Dapps or Decentralized Apps.
Ethereum blockchain or any other compatible blockchains such as
Binance Smart Chain (BSC),
Polygon and few others.
Properties of Solidity
- Turing complete : It can theoretically complete any task that is given to it.
- Object oriented : supports inheritance
- Statically typed : Data type has to be assigned during the declaration
- Supports Native Data types as well complex user defined data types
IDE for Solidity
- Remix : Official online IDE
- Brownie : Python based dev framework
- Hardhat : Ethereum development environment with local Ethereum network
How it works
Step 1: You write a smart contract Step 2: Compile it
- The compiler will generate three files
- Contract Metadata : JSON file having info such as input, output, data types, compiler version and so on.., of the contract
- Bytecode : Hexadecimal data with opcode, which gets deployed on the
EVM(Ethereum Virtual Machine) -> EVM powers the Ethereum blockchain
- ABI : Application Binary Interface, helps to interact with another contracts on the blockchain as well as from outside the blockchain. Step 3: Deploy the Bytecode & ABI, on a Target blockchain (Real – Mainnet/Testnet or Simulated environment such as browser)
- ABI stays in the EVM while Bytecode gets deployed at the blockchain. This ABI helps to interact with the bytecode.
- Self executing contracts – Smart contracts
- NFT : Non Fungible Token
- Cryptocurrency : Fungible Token
- Dapps : Decentralized applications
- DeFi : Decentralized finance
- Tokens : To share, exchange, stake