Smart Contract in Solidity (Blockchain)
Sep 20, 2022
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