Smart Contract in Solidity (Blockchain)
--
When we talk about Blockchain how can we forgot smart contract. Let’s start with the smart contracts creation by using solidity.
For the smart contract we gonna use solidity and Remix IDE. Visit the following link to start.
// SPDX-License-Identifier: MITpragma solidity 0.8.8;contract SimpleStorage{//boolen,uint, int, address, bytesuint256 public favouriteNumber;People[] public people;People public person = People({favouriteNumber:5,name:"javed"});struct People{uint256 favouriteNumber;string name;}function store(uint256 _favouriteNumber) public{favouriteNumber = _favouriteNumber;}function addPerson(uint256 _favouriteNumber, string memory _name) public{People memory person2 = People({favouriteNumber:_favouriteNumber,name:_name});people.push(person2);}}
you can see following IDE on web browser
Let me show you how to compile and deploy the smart contract:
Above image shows you how to compile smart contact. here is the button for deployment.