Skip to content

Instantly share code, notes, and snippets.

@Scofield-Idehen
Last active December 19, 2021 13:17
Show Gist options
  • Save Scofield-Idehen/cadaa02c822815730a96f3c5582ce293 to your computer and use it in GitHub Desktop.
Save Scofield-Idehen/cadaa02c822815730a96f3c5582ce293 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
//SPDX-Lisence-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
contract Learn{
//uint Count;
// we added public and a =1
uint public Count = 1;
// we can write the code to the uint256 above by calling it under contract
//by making it public and
//constructor() public{
//Count = 0;
}
// since solidity creates a Count Vairiable for us we do not need this
// we can remove it
//Function ViewCall() public view returns(uint256){
//return Count;
}
// we can also take the = Count +1 and add ++ to 1st Count
function ReturnCall() public{
//Count = Count +1;
Count ++;
}
}
@Scofield-Idehen
Copy link
Author

Simple CallProcess

This is a simple Solidity file that allows for an easy count of a number, I can set the number to whatever I want and then view and increase by 1, my aim is to learn how each variable works with other functions and how to call them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment