Skip to content

Instantly share code, notes, and snippets.

@Genesis3800
Last active April 22, 2022 13:00
Show Gist options
  • Save Genesis3800/540187bdae6c02f6c1d18937d4161f15 to your computer and use it in GitHub Desktop.
Save Genesis3800/540187bdae6c02f6c1d18937d4161f15 to your computer and use it in GitHub Desktop.
All the Code used in 'The Solidity Sagas'
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
contract viewAndPure {
uint public tempInteger =30;
function viewFunc( ) public view returns (uint) {
return tempInteger;
}
function pureFunc1( ) public pure returns (uint) {
return 1;
}
function pureFunc2(uint _x , uint _y ) public pure returns (uint) {
return _x + _y;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment