// pragma solidity >= 0.8.0 < 0.9.0; // this auto updates the compiler Remix uses
pragma solidity ^0.8.0;
// in soldity, comments are important
// several of commenting: normal comments, like this one
/*
this is a normal multi-line comment
*/
/**
this is a NatSpec multi-line comment
*/
// there is also NatSpec Format: format of commenting that the compiler can read, and it will notify developers and users alike of these messages from the smart contract
// you can write information in these to help the user, clarify the code that you write, etc.
/// @title The best smart contract
/// @author gspbirel56
/// @dev (Here is a comment where you would explain how to use this smart contract)
contract MyContract {
string public name = "Chris's smart contract";
/// @notice This function changes the name of the `name` variable in this contract.
function updateName(string memory _newName) public {
name = _newName;
}
}
// you can have multiple contracts too within this file, and they can talk to each other