Question : contract in solidity
Answered by : shirshak
/** contract is container where we write our code.
Each contract have it's own address.
if we have contract address and abi we can iteract with it. **/
contract MyContract { string public name = "Shirshak"; //name is state variable of type string which live in blockchain. /// @notice This function changes the value of the name variable // _newName we use _ before to tell that it is parameter // string,struct and mapping are values that need to use memory // and after sometime it will remove from that place function updateName(string memory _newName) public { name = _newName; }
}
Source : https://youtu.be/sngKPYfUgkc?t=2239 | Last Update : Tue, 10 May 22
Question : Solidity contract
Answered by : reyansh
contract ContractName {
}
Source : | Last Update : Sun, 10 Jul 22