Skip to content

Instantly share code, notes, and snippets.

@combattardigrade
Created December 9, 2020 00:42
Show Gist options
  • Save combattardigrade/2d5d9a9a05e57d9184bd26ed0b814551 to your computer and use it in GitHub Desktop.
Save combattardigrade/2d5d9a9a05e57d9184bd26ed0b814551 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.7.5+commit.eb77ed08.js&optimize=false&runs=200&gist=
pragma solidity >=0.6.0 <0.8.0;
contract Token {
mapping (address => uint256) private _balances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint256 private _decimals;
constructor(string memory name, string memory symbol) public {
_name = name;
_symbol = symbol;
_decimals = 18;
}
/**
* @dev Returns the name of the token
*/
function name() public view returns (string memory) {
return _name;
}
/**
* @dev Set the name of the token
*/
function setName(string memory name) public {
_name = name;
}
/**
* @dev Returns the symbol of the token
*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment