Skip to content

Instantly share code, notes, and snippets.

@schesnowitz
Created February 13, 2023 19:05
Show Gist options
  • Save schesnowitz/dede1b4bc330f63f7ab9bc9ddc14e828 to your computer and use it in GitHub Desktop.
Save schesnowitz/dede1b4bc330f63f7ab9bc9ddc14e828 to your computer and use it in GitHub Desktop.
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
contract Basic {
// General vars
uint public someNonSigned = 66;
int private txtAmt = 55000;
string internal coinName = "STEVE COIN";
bool isThisValid = true;
// private can only be called FROM the contract
// internal can only be called from BY the contract AND other contracts within it
// external can only be called from a function
// General vars
uint public blockTime = block.timestamp;
address public sender = msg.sender;
// Arrays
string[] public tokenNames= ['Chainlink', 'Ehereum', 'Bitcoin', 'Dodege'];
uint[5] public levels = [1,2,3,4,5];
// DateTime
uint public timeSeconds = 1 seconds;
uint public timeMinutes = 1 minutes;
uint public timeHours = 1 hours;
uint public timeDays = 1 days;
uint public timeWeeks = 1 weeks;
/// @notice Explain to an end user what this does
/// @dev Explain to a developer any extra details
/// @return Documents the return variables of a contract’s function state variable
/// @inheritdoc Copies all missing tags from the base function (must be followed by the contract name)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment