contract_name
stringlengths
1
61
file_path
stringlengths
5
50.4k
contract_address
stringlengths
42
42
language
stringclasses
1 value
class_name
stringlengths
1
61
class_code
stringlengths
4
330k
class_documentation
stringlengths
0
29.1k
class_documentation_type
stringclasses
6 values
func_name
stringlengths
0
62
func_code
stringlengths
1
303k
func_documentation
stringlengths
2
14.9k
func_documentation_type
stringclasses
4 values
compiler_version
stringlengths
15
42
license_type
stringclasses
14 values
swarm_source
stringlengths
0
71
meta
dict
__index_level_0__
int64
0
60.4k
Cointorox
Cointorox.sol
0x1c5b760f133220855340003b43cc9113ec494823
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token using SafeMath for uint256; string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; bool pub...
//***************************************************************// //------------------ ERC20 Standard Template -------------------// //***************************************************************//
LineComment
burnFrom
function burnFrom(address _from, uint256 _value) public returns (bool success) { require(!safeguard); require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] = balanceOf[_fr...
/** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://57e4923604f55140b1f022f22fa634b9ac1cbf44bcddfd84a065faefea9f89d1
{ "func_code_index": [ 6237, 6994 ] }
11,300
Cointorox
Cointorox.sol
0x1c5b760f133220855340003b43cc9113ec494823
Solidity
Cointorox
contract Cointorox is owned, TokenERC20 { /*************************************/ /* User whitelisting functionality */ /*************************************/ bool public whitelistingStatus = false; mapping (address => bool) public whitelisted; ...
//****************************************************************************// //--------------------- COINTOROX MAIN CODE STARTS HERE ---------------------// //****************************************************************************//
LineComment
changeWhitelistingStatus
function changeWhitelistingStatus() onlyOwner public{ if (whitelistingStatus == false){ whitelistingStatus = true; } else{ whitelistingStatus = false; } }
/** * Change whitelisting status on or off * * When whitelisting is true, then crowdsale will only accept investors who are whitelisted. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://57e4923604f55140b1f022f22fa634b9ac1cbf44bcddfd84a065faefea9f89d1
{ "func_code_index": [ 503, 765 ] }
11,301
Cointorox
Cointorox.sol
0x1c5b760f133220855340003b43cc9113ec494823
Solidity
Cointorox
contract Cointorox is owned, TokenERC20 { /*************************************/ /* User whitelisting functionality */ /*************************************/ bool public whitelistingStatus = false; mapping (address => bool) public whitelisted; ...
//****************************************************************************// //--------------------- COINTOROX MAIN CODE STARTS HERE ---------------------// //****************************************************************************//
LineComment
whitelistUser
function whitelistUser(address userAddress) onlyOwner public{ require(whitelistingStatus == true); require(userAddress != address(0x0)); whitelisted[userAddress] = true; }
/** * Whitelist any user address - only Owner can do this * * It will add user address in whitelisted mapping */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://57e4923604f55140b1f022f22fa634b9ac1cbf44bcddfd84a065faefea9f89d1
{ "func_code_index": [ 938, 1166 ] }
11,302
Cointorox
Cointorox.sol
0x1c5b760f133220855340003b43cc9113ec494823
Solidity
Cointorox
contract Cointorox is owned, TokenERC20 { /*************************************/ /* User whitelisting functionality */ /*************************************/ bool public whitelistingStatus = false; mapping (address => bool) public whitelisted; ...
//****************************************************************************// //--------------------- COINTOROX MAIN CODE STARTS HERE ---------------------// //****************************************************************************//
LineComment
whitelistManyUsers
function whitelistManyUsers(address[] memory userAddresses) onlyOwner public{ require(whitelistingStatus == true); uint256 addressCount = userAddresses.length; require(addressCount <= 150); for(uint256 i = 0; i < addressCount; i++){ require(userAddresses[i] != address(0x0)); whitel...
/** * Whitelist Many user address at once - only Owner can do this * It will require maximum of 150 addresses to prevent block gas limit max-out and DoS attack * It will add user address in whitelisted mapping */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://57e4923604f55140b1f022f22fa634b9ac1cbf44bcddfd84a065faefea9f89d1
{ "func_code_index": [ 1439, 1873 ] }
11,303
Cointorox
Cointorox.sol
0x1c5b760f133220855340003b43cc9113ec494823
Solidity
Cointorox
contract Cointorox is owned, TokenERC20 { /*************************************/ /* User whitelisting functionality */ /*************************************/ bool public whitelistingStatus = false; mapping (address => bool) public whitelisted; ...
//****************************************************************************// //--------------------- COINTOROX MAIN CODE STARTS HERE ---------------------// //****************************************************************************//
LineComment
_transfer
function _transfer(address _from, address _to, uint _value) internal { require(!safeguard); require (_to != address(0x0)); // Prevent transfer to 0x0 address. Use burn() instead require (balanceOf[_from] >= _value); // Check if the sender has enough require (balanc...
/* Internal transfer, only can be called by this contract */
Comment
v0.4.25+commit.59dbf8f1
bzzr://57e4923604f55140b1f022f22fa634b9ac1cbf44bcddfd84a065faefea9f89d1
{ "func_code_index": [ 2786, 3651 ] }
11,304
Cointorox
Cointorox.sol
0x1c5b760f133220855340003b43cc9113ec494823
Solidity
Cointorox
contract Cointorox is owned, TokenERC20 { /*************************************/ /* User whitelisting functionality */ /*************************************/ bool public whitelistingStatus = false; mapping (address => bool) public whitelisted; ...
//****************************************************************************// //--------------------- COINTOROX MAIN CODE STARTS HERE ---------------------// //****************************************************************************//
LineComment
freezeAccount
function freezeAccount(address target, bool freeze) onlyOwner public { frozenAccount[target] = freeze; emit FrozenFunds(target, freeze); }
/// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://57e4923604f55140b1f022f22fa634b9ac1cbf44bcddfd84a065faefea9f89d1
{ "func_code_index": [ 3852, 4039 ] }
11,305
Cointorox
Cointorox.sol
0x1c5b760f133220855340003b43cc9113ec494823
Solidity
Cointorox
contract Cointorox is owned, TokenERC20 { /*************************************/ /* User whitelisting functionality */ /*************************************/ bool public whitelistingStatus = false; mapping (address => bool) public whitelisted; ...
//****************************************************************************// //--------------------- COINTOROX MAIN CODE STARTS HERE ---------------------// //****************************************************************************//
LineComment
manualWithdrawEther
function manualWithdrawEther()onlyOwner public{ address(owner).transfer(address(this).balance); }
//Just in rare case, owner wants to transfer Ether from contract to owner address
LineComment
v0.4.25+commit.59dbf8f1
bzzr://57e4923604f55140b1f022f22fa634b9ac1cbf44bcddfd84a065faefea9f89d1
{ "func_code_index": [ 4145, 4273 ] }
11,306
Cointorox
Cointorox.sol
0x1c5b760f133220855340003b43cc9113ec494823
Solidity
Cointorox
contract Cointorox is owned, TokenERC20 { /*************************************/ /* User whitelisting functionality */ /*************************************/ bool public whitelistingStatus = false; mapping (address => bool) public whitelisted; ...
//****************************************************************************// //--------------------- COINTOROX MAIN CODE STARTS HERE ---------------------// //****************************************************************************//
LineComment
destructContract
function destructContract()onlyOwner public{ selfdestruct(owner); }
//selfdestruct function. just in case owner decided to destruct this contract.
LineComment
v0.4.25+commit.59dbf8f1
bzzr://57e4923604f55140b1f022f22fa634b9ac1cbf44bcddfd84a065faefea9f89d1
{ "func_code_index": [ 4372, 4470 ] }
11,307
Cointorox
Cointorox.sol
0x1c5b760f133220855340003b43cc9113ec494823
Solidity
Cointorox
contract Cointorox is owned, TokenERC20 { /*************************************/ /* User whitelisting functionality */ /*************************************/ bool public whitelistingStatus = false; mapping (address => bool) public whitelisted; ...
//****************************************************************************// //--------------------- COINTOROX MAIN CODE STARTS HERE ---------------------// //****************************************************************************//
LineComment
changeSafeguardStatus
function changeSafeguardStatus() onlyOwner public{ if (safeguard == false){ safeguard = true; } else{ safeguard = false; } }
/** * Change safeguard status on or off * * When safeguard is true, then all the non-owner functions will stop working. * When safeguard is false, then all the functions will resume working back again! */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://57e4923604f55140b1f022f22fa634b9ac1cbf44bcddfd84a065faefea9f89d1
{ "func_code_index": [ 4745, 4977 ] }
11,308
Cerberus
Cerberus.sol
0xe3ab02fca7ef7c1c4c41dd2760551a2d05c59691
Solidity
IERC20Upgradeable
interface IERC20Upgradeable { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256);...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://8a5526f7d2dbb1440d1d6c5df83523aad259b7f5154d769ecd3f09d3df7f8c3b
{ "func_code_index": [ 105, 165 ] }
11,309
Cerberus
Cerberus.sol
0xe3ab02fca7ef7c1c4c41dd2760551a2d05c59691
Solidity
IERC20Upgradeable
interface IERC20Upgradeable { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256);...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://8a5526f7d2dbb1440d1d6c5df83523aad259b7f5154d769ecd3f09d3df7f8c3b
{ "func_code_index": [ 248, 321 ] }
11,310
Cerberus
Cerberus.sol
0xe3ab02fca7ef7c1c4c41dd2760551a2d05c59691
Solidity
IERC20Upgradeable
interface IERC20Upgradeable { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256);...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://8a5526f7d2dbb1440d1d6c5df83523aad259b7f5154d769ecd3f09d3df7f8c3b
{ "func_code_index": [ 545, 627 ] }
11,311
Cerberus
Cerberus.sol
0xe3ab02fca7ef7c1c4c41dd2760551a2d05c59691
Solidity
IERC20Upgradeable
interface IERC20Upgradeable { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256);...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://8a5526f7d2dbb1440d1d6c5df83523aad259b7f5154d769ecd3f09d3df7f8c3b
{ "func_code_index": [ 906, 994 ] }
11,312
Cerberus
Cerberus.sol
0xe3ab02fca7ef7c1c4c41dd2760551a2d05c59691
Solidity
IERC20Upgradeable
interface IERC20Upgradeable { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256);...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://8a5526f7d2dbb1440d1d6c5df83523aad259b7f5154d769ecd3f09d3df7f8c3b
{ "func_code_index": [ 1660, 1739 ] }
11,313
Cerberus
Cerberus.sol
0xe3ab02fca7ef7c1c4c41dd2760551a2d05c59691
Solidity
IERC20Upgradeable
interface IERC20Upgradeable { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256);...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transferFrom
function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://8a5526f7d2dbb1440d1d6c5df83523aad259b7f5154d769ecd3f09d3df7f8c3b
{ "func_code_index": [ 2052, 2188 ] }
11,314
Cerberus
Cerberus.sol
0xe3ab02fca7ef7c1c4c41dd2760551a2d05c59691
Solidity
Cerberus
contract Cerberus is Context, IERC20Upgradeable { // Ownership moved to in-contract for customizability. address private _owner; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => bool) lpPairs; uint256 private timeSinceLastPai...
owner
function owner() public view returns (address) { return _owner; }
//=============================================================================================================== //=============================================================================================================== //==========================================================================================...
LineComment
v0.8.9+commit.e5eed63a
MIT
ipfs://8a5526f7d2dbb1440d1d6c5df83523aad259b7f5154d769ecd3f09d3df7f8c3b
{ "func_code_index": [ 6236, 6320 ] }
11,315
Cerberus
Cerberus.sol
0xe3ab02fca7ef7c1c4c41dd2760551a2d05c59691
Solidity
Cerberus
contract Cerberus is Context, IERC20Upgradeable { // Ownership moved to in-contract for customizability. address private _owner; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => bool) lpPairs; uint256 private timeSinceLastPai...
totalSupply
function totalSupply() external view override returns (uint256) { return _tTotal; }
//=============================================================================================================== //=============================================================================================================== //==========================================================================================...
LineComment
v0.8.9+commit.e5eed63a
MIT
ipfs://8a5526f7d2dbb1440d1d6c5df83523aad259b7f5154d769ecd3f09d3df7f8c3b
{ "func_code_index": [ 7685, 7773 ] }
11,316
CowGuys
contracts/CowGuys.sol
0x41f6d915901e13782e71effc6d05cab47a42f94d
Solidity
CowGuys
contract CowGuys is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public maxSupply = 3333; // This will be the end of the story. :( string private baseURI = ""; uint256 totalSupply_; // Check out how many Cow Guy NFTs has been minted until now. uint256 public balance; construct...
mintNFT
function mintNFT() public onlyOwner returns (uint256) { uint256 id = totalSupply(); require( totalSupply() + 1 <= maxSupply, "Max NFT amount (3333) has been reached."); require( tx.origin == msg.sender, "You cannot mint on a custom contract!"); _safeMint(msg.sender, id + 1); //starts from tokenID:...
// Let's mint!
LineComment
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 669, 1059 ] }
11,317
MyanmarGoldToken
MyanmarGoldToken.sol
0x9643439501e48c63f8676c834f9da52f4c2b8d6b
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @d...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://9d31a84d2b759f20bf87cf8030872ffc15cd1bd25bd1d0c5ed16a58f8ecdc1f4
{ "func_code_index": [ 93, 300 ] }
11,318
MyanmarGoldToken
MyanmarGoldToken.sol
0x9643439501e48c63f8676c834f9da52f4c2b8d6b
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @d...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://9d31a84d2b759f20bf87cf8030872ffc15cd1bd25bd1d0c5ed16a58f8ecdc1f4
{ "func_code_index": [ 390, 690 ] }
11,319
MyanmarGoldToken
MyanmarGoldToken.sol
0x9643439501e48c63f8676c834f9da52f4c2b8d6b
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @d...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://9d31a84d2b759f20bf87cf8030872ffc15cd1bd25bd1d0c5ed16a58f8ecdc1f4
{ "func_code_index": [ 810, 938 ] }
11,320
MyanmarGoldToken
MyanmarGoldToken.sol
0x9643439501e48c63f8676c834f9da52f4c2b8d6b
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @d...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://9d31a84d2b759f20bf87cf8030872ffc15cd1bd25bd1d0c5ed16a58f8ecdc1f4
{ "func_code_index": [ 1008, 1154 ] }
11,321
MyanmarGoldToken
MyanmarGoldToken.sol
0x9643439501e48c63f8676c834f9da52f4c2b8d6b
Solidity
MyanmarGoldToken
contract MyanmarGoldToken is ERC20 { using SafeMath for uint256; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; uint256 totalSupply_; string public constant name = "MyanmarGoldToken"; // solium-disable-line uppercase string pub...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev total number of tokens in existence */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://9d31a84d2b759f20bf87cf8030872ffc15cd1bd25bd1d0c5ed16a58f8ecdc1f4
{ "func_code_index": [ 813, 909 ] }
11,322
MyanmarGoldToken
MyanmarGoldToken.sol
0x9643439501e48c63f8676c834f9da52f4c2b8d6b
Solidity
MyanmarGoldToken
contract MyanmarGoldToken is ERC20 { using SafeMath for uint256; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; uint256 totalSupply_; string public constant name = "MyanmarGoldToken"; // solium-disable-line uppercase string pub...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return t...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://9d31a84d2b759f20bf87cf8030872ffc15cd1bd25bd1d0c5ed16a58f8ecdc1f4
{ "func_code_index": [ 1077, 1437 ] }
11,323
MyanmarGoldToken
MyanmarGoldToken.sol
0x9643439501e48c63f8676c834f9da52f4c2b8d6b
Solidity
MyanmarGoldToken
contract MyanmarGoldToken is ERC20 { using SafeMath for uint256; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; uint256 totalSupply_; string public constant name = "MyanmarGoldToken"; // solium-disable-line uppercase string pub...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
batchTransfer
function batchTransfer(address[] _tos, uint256[] _values) public returns (bool) { require(_tos.length == _values.length); uint256 arrayLength = _tos.length; for(uint256 i = 0; i < arrayLength; i++) { transfer(_tos[i], _values[i]); } return true; }
/** * @dev batchTransfer token for a specified addresses * @param _tos The addresses to transfer to. * @param _values The amounts to be transferred. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://9d31a84d2b759f20bf87cf8030872ffc15cd1bd25bd1d0c5ed16a58f8ecdc1f4
{ "func_code_index": [ 1617, 1932 ] }
11,324
MyanmarGoldToken
MyanmarGoldToken.sol
0x9643439501e48c63f8676c834f9da52f4c2b8d6b
Solidity
MyanmarGoldToken
contract MyanmarGoldToken is ERC20 { using SafeMath for uint256; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; uint256 totalSupply_; string public constant name = "MyanmarGoldToken"; // solium-disable-line uppercase string pub...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://9d31a84d2b759f20bf87cf8030872ffc15cd1bd25bd1d0c5ed16a58f8ecdc1f4
{ "func_code_index": [ 2148, 2260 ] }
11,325
MyanmarGoldToken
MyanmarGoldToken.sol
0x9643439501e48c63f8676c834f9da52f4c2b8d6b
Solidity
MyanmarGoldToken
contract MyanmarGoldToken is ERC20 { using SafeMath for uint256; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; uint256 totalSupply_; string public constant name = "MyanmarGoldToken"; // solium-disable-line uppercase string pub...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://9d31a84d2b759f20bf87cf8030872ffc15cd1bd25bd1d0c5ed16a58f8ecdc1f4
{ "func_code_index": [ 2547, 3105 ] }
11,326
MyanmarGoldToken
MyanmarGoldToken.sol
0x9643439501e48c63f8676c834f9da52f4c2b8d6b
Solidity
MyanmarGoldToken
contract MyanmarGoldToken is ERC20 { using SafeMath for uint256; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; uint256 totalSupply_; string public constant name = "MyanmarGoldToken"; // solium-disable-line uppercase string pub...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://9d31a84d2b759f20bf87cf8030872ffc15cd1bd25bd1d0c5ed16a58f8ecdc1f4
{ "func_code_index": [ 3748, 3959 ] }
11,327
MyanmarGoldToken
MyanmarGoldToken.sol
0x9643439501e48c63f8676c834f9da52f4c2b8d6b
Solidity
MyanmarGoldToken
contract MyanmarGoldToken is ERC20 { using SafeMath for uint256; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; uint256 totalSupply_; string public constant name = "MyanmarGoldToken"; // solium-disable-line uppercase string pub...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance( address _owner, address _spender ) public view returns (uint256) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://9d31a84d2b759f20bf87cf8030872ffc15cd1bd25bd1d0c5ed16a58f8ecdc1f4
{ "func_code_index": [ 4290, 4486 ] }
11,328
MyanmarGoldToken
MyanmarGoldToken.sol
0x9643439501e48c63f8676c834f9da52f4c2b8d6b
Solidity
MyanmarGoldToken
contract MyanmarGoldToken is ERC20 { using SafeMath for uint256; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; uint256 totalSupply_; string public constant name = "MyanmarGoldToken"; // solium-disable-line uppercase string pub...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
increaseApproval
function increaseApproval( address _spender, uint _addedValue ) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://9d31a84d2b759f20bf87cf8030872ffc15cd1bd25bd1d0c5ed16a58f8ecdc1f4
{ "func_code_index": [ 4963, 5308 ] }
11,329
MyanmarGoldToken
MyanmarGoldToken.sol
0x9643439501e48c63f8676c834f9da52f4c2b8d6b
Solidity
MyanmarGoldToken
contract MyanmarGoldToken is ERC20 { using SafeMath for uint256; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; uint256 totalSupply_; string public constant name = "MyanmarGoldToken"; // solium-disable-line uppercase string pub...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
decreaseApproval
function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://9d31a84d2b759f20bf87cf8030872ffc15cd1bd25bd1d0c5ed16a58f8ecdc1f4
{ "func_code_index": [ 5790, 6293 ] }
11,330
MyanmarGoldToken
MyanmarGoldToken.sol
0x9643439501e48c63f8676c834f9da52f4c2b8d6b
Solidity
MyanmarGoldToken
contract MyanmarGoldToken is ERC20 { using SafeMath for uint256; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; uint256 totalSupply_; string public constant name = "MyanmarGoldToken"; // solium-disable-line uppercase string pub...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
burn
function burn(uint256 _value) public { _burn(msg.sender, _value); }
/** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://9d31a84d2b759f20bf87cf8030872ffc15cd1bd25bd1d0c5ed16a58f8ecdc1f4
{ "func_code_index": [ 6415, 6501 ] }
11,331
CoSoundToken
CoSoundToken.sol
0x7b7b239e7fc2b4680f5cf469ecb968bd94bb38aa
Solidity
StandardToken
contract StandardToken is ERC20, SafeMath, ERC223Interface { /* Actual balances of token holders */ mapping(address => uint) balances; uint public totalSupply; /* approve() allowances */ mapping (address => mapping (address => uint)) internal allowed; /** * * Fix for the ER...
/** * Standard ERC20 token with Short Hand Attack and approve() race condition mitigation. * * Based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transfer
function transfer(address _to, uint _value, bytes _data) onlyPayloadSize(2 * 32) public returns (bool success) { require(_to != address(0)); if (balances[msg.sender] >= _value && _value > 0) { // Standard function transfer similar to ERC20 transfer with no _data . // Added due to backw...
/** * @dev Transfer the specified amount of tokens to the specified address. * Invokes the `tokenFallback` function if the recipient is a contract. * The token transfer fails if the recipient is a contract * but does not implement the `tokenFallback` function * or the fallback function to receive ...
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://04a6bf5bd39c3077d52cd4799bc448a82094fc000fed7a1d51a74f1ce6e2c57a
{ "func_code_index": [ 1091, 2122 ] }
11,332
CoSoundToken
CoSoundToken.sol
0x7b7b239e7fc2b4680f5cf469ecb968bd94bb38aa
Solidity
StandardToken
contract StandardToken is ERC20, SafeMath, ERC223Interface { /* Actual balances of token holders */ mapping(address => uint) balances; uint public totalSupply; /* approve() allowances */ mapping (address => mapping (address => uint)) internal allowed; /** * * Fix for the ER...
/** * Standard ERC20 token with Short Hand Attack and approve() race condition mitigation. * * Based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transfer
function transfer(address _to, uint _value) onlyPayloadSize(2 * 32) public returns (bool success) { require(_to != address(0)); if (balances[msg.sender] >= _value && _value > 0) { uint codeLength; bytes memory empty; assembly { // Retrieve the size of the code on targ...
/** * * Transfer with ERC223 specification * * http://vessenes.com/the-erc20-short-address-attack-explained/ */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://04a6bf5bd39c3077d52cd4799bc448a82094fc000fed7a1d51a74f1ce6e2c57a
{ "func_code_index": [ 2276, 3176 ] }
11,333
CoSoundToken
CoSoundToken.sol
0x7b7b239e7fc2b4680f5cf469ecb968bd94bb38aa
Solidity
StandardToken
contract StandardToken is ERC20, SafeMath, ERC223Interface { /* Actual balances of token holders */ mapping(address => uint) balances; uint public totalSupply; /* approve() allowances */ mapping (address => mapping (address => uint)) internal allowed; /** * * Fix for the ER...
/** * Standard ERC20 token with Short Hand Attack and approve() race condition mitigation. * * Based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
increaseApproval
function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = safeAdd(allowed[msg.sender][_spender], _addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://04a6bf5bd39c3077d52cd4799bc448a82094fc000fed7a1d51a74f1ce6e2c57a
{ "func_code_index": [ 4859, 5149 ] }
11,334
CoSoundToken
CoSoundToken.sol
0x7b7b239e7fc2b4680f5cf469ecb968bd94bb38aa
Solidity
CoSoundToken
contract CoSoundToken is StandardToken, Ownable { string public name; uint8 public decimals; string public symbol; uint totalEthInWei; constructor() public{ decimals = 18; // Amount of decimals for display purposes totalSupply = 1200000000 * 10 ** uint256(decimals); ...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); if(!_spender.call(bytes4(bytes32(keccak256("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _...
/* Approves and then calls the receiving contract */
Comment
v0.4.23+commit.124ca40d
bzzr://04a6bf5bd39c3077d52cd4799bc448a82094fc000fed7a1d51a74f1ce6e2c57a
{ "func_code_index": [ 634, 1047 ] }
11,335
CoSoundToken
CoSoundToken.sol
0x7b7b239e7fc2b4680f5cf469ecb968bd94bb38aa
Solidity
CoSoundToken
contract CoSoundToken is StandardToken, Ownable { string public name; uint8 public decimals; string public symbol; uint totalEthInWei; constructor() public{ decimals = 18; // Amount of decimals for display purposes totalSupply = 1200000000 * 10 ** uint256(decimals); ...
function() payable public{ revert(); }
// can accept ether
LineComment
v0.4.23+commit.124ca40d
bzzr://04a6bf5bd39c3077d52cd4799bc448a82094fc000fed7a1d51a74f1ce6e2c57a
{ "func_code_index": [ 1075, 1132 ] }
11,336
DECVAULT
DECVAULT.sol
0x3d259b5cf3e73bad40e9c1955d77faf3eb7a6876
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * ...
/** * @title DECVAULT Project */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://2f63364488e42379b15d9c4daf2e0f12c0518451e4f687e2be8bbd6e4daf58be
{ "func_code_index": [ 95, 302 ] }
11,337
DECVAULT
DECVAULT.sol
0x3d259b5cf3e73bad40e9c1955d77faf3eb7a6876
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * ...
/** * @title DECVAULT Project */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://2f63364488e42379b15d9c4daf2e0f12c0518451e4f687e2be8bbd6e4daf58be
{ "func_code_index": [ 392, 692 ] }
11,338
DECVAULT
DECVAULT.sol
0x3d259b5cf3e73bad40e9c1955d77faf3eb7a6876
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * ...
/** * @title DECVAULT Project */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://2f63364488e42379b15d9c4daf2e0f12c0518451e4f687e2be8bbd6e4daf58be
{ "func_code_index": [ 812, 940 ] }
11,339
DECVAULT
DECVAULT.sol
0x3d259b5cf3e73bad40e9c1955d77faf3eb7a6876
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * ...
/** * @title DECVAULT Project */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://2f63364488e42379b15d9c4daf2e0f12c0518451e4f687e2be8bbd6e4daf58be
{ "func_code_index": [ 1010, 1156 ] }
11,340
CR7Coin
CR7Coin.sol
0x7f585b9130c64e9e9f470b618a7badd03d79ca7e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://9ca9ad2331a1012d21f47c60166a2d0923bde2fc40a24c4ef7007cdfc81f0672
{ "func_code_index": [ 89, 272 ] }
11,341
CR7Coin
CR7Coin.sol
0x7f585b9130c64e9e9f470b618a7badd03d79ca7e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://9ca9ad2331a1012d21f47c60166a2d0923bde2fc40a24c4ef7007cdfc81f0672
{ "func_code_index": [ 356, 629 ] }
11,342
CR7Coin
CR7Coin.sol
0x7f585b9130c64e9e9f470b618a7badd03d79ca7e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://9ca9ad2331a1012d21f47c60166a2d0923bde2fc40a24c4ef7007cdfc81f0672
{ "func_code_index": [ 744, 860 ] }
11,343
CR7Coin
CR7Coin.sol
0x7f585b9130c64e9e9f470b618a7badd03d79ca7e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://9ca9ad2331a1012d21f47c60166a2d0923bde2fc40a24c4ef7007cdfc81f0672
{ "func_code_index": [ 924, 1060 ] }
11,344
CR7Coin
CR7Coin.sol
0x7f585b9130c64e9e9f470b618a7badd03d79ca7e
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; }...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() public { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://9ca9ad2331a1012d21f47c60166a2d0923bde2fc40a24c4ef7007cdfc81f0672
{ "func_code_index": [ 261, 321 ] }
11,345
CR7Coin
CR7Coin.sol
0x7f585b9130c64e9e9f470b618a7badd03d79ca7e
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; }...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://9ca9ad2331a1012d21f47c60166a2d0923bde2fc40a24c4ef7007cdfc81f0672
{ "func_code_index": [ 640, 816 ] }
11,346
CR7Coin
CR7Coin.sol
0x7f585b9130c64e9e9f470b618a7badd03d79ca7e
Solidity
BasicToken
contract BasicToken is ERC20Basic, Ownable { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev tran...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev total number of tokens in existence */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://9ca9ad2331a1012d21f47c60166a2d0923bde2fc40a24c4ef7007cdfc81f0672
{ "func_code_index": [ 207, 295 ] }
11,347
CR7Coin
CR7Coin.sol
0x7f585b9130c64e9e9f470b618a7badd03d79ca7e
Solidity
BasicToken
contract BasicToken is ERC20Basic, Ownable { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev tran...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value);...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://9ca9ad2331a1012d21f47c60166a2d0923bde2fc40a24c4ef7007cdfc81f0672
{ "func_code_index": [ 455, 845 ] }
11,348
CR7Coin
CR7Coin.sol
0x7f585b9130c64e9e9f470b618a7badd03d79ca7e
Solidity
BasicToken
contract BasicToken is ERC20Basic, Ownable { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev tran...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://9ca9ad2331a1012d21f47c60166a2d0923bde2fc40a24c4ef7007cdfc81f0672
{ "func_code_index": [ 1052, 1164 ] }
11,349
CR7Coin
CR7Coin.sol
0x7f585b9130c64e9e9f470b618a7badd03d79ca7e
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transfered */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://9ca9ad2331a1012d21f47c60166a2d0923bde2fc40a24c4ef7007cdfc81f0672
{ "func_code_index": [ 400, 852 ] }
11,350
CR7Coin
CR7Coin.sol
0x7f585b9130c64e9e9f470b618a7badd03d79ca7e
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://9ca9ad2331a1012d21f47c60166a2d0923bde2fc40a24c4ef7007cdfc81f0672
{ "func_code_index": [ 1088, 1277 ] }
11,351
CR7Coin
CR7Coin.sol
0x7f585b9130c64e9e9f470b618a7badd03d79ca7e
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender];
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://9ca9ad2331a1012d21f47c60166a2d0923bde2fc40a24c4ef7007cdfc81f0672
{ "func_code_index": [ 1601, 1733 ] }
11,352
CR7Coin
CR7Coin.sol
0x7f585b9130c64e9e9f470b618a7badd03d79ca7e
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
function() public payable { revert();
/** * @dev Function to revert eth transfers to this contract */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://9ca9ad2331a1012d21f47c60166a2d0923bde2fc40a24c4ef7007cdfc81f0672
{ "func_code_index": [ 1821, 1873 ] }
11,353
CR7Coin
CR7Coin.sol
0x7f585b9130c64e9e9f470b618a7badd03d79ca7e
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return BasicToken(tokenAddress).transfer(owner, tokens); }
/** * @dev Owner can transfer out any accidentally sent ERC20 tokens */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://9ca9ad2331a1012d21f47c60166a2d0923bde2fc40a24c4ef7007cdfc81f0672
{ "func_code_index": [ 1965, 2147 ] }
11,354
CR7Coin
CR7Coin.sol
0x7f585b9130c64e9e9f470b618a7badd03d79ca7e
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
multiTransfer
function multiTransfer(address[] _toAddresses, uint256[] _amounts) public { /* Ensures _toAddresses array is less than or equal to 255 */ require(_toAddresses.length <= 255); /* Ensures _toAddress and _amounts have the same number of entries. */ require(_toAddresses.length == _amounts.length); ...
/** * @dev Transfer the specified amounts of tokens to the specified addresses. * @dev Be aware that there is no check for duplicate recipients. * * @param _toAddresses Receiver addresses. * @param _amounts Amounts of tokens that will be transferred. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://9ca9ad2331a1012d21f47c60166a2d0923bde2fc40a24c4ef7007cdfc81f0672
{ "func_code_index": [ 2803, 3270 ] }
11,355
CR7Coin
CR7Coin.sol
0x7f585b9130c64e9e9f470b618a7badd03d79ca7e
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
multiTransferFrom
function multiTransferFrom(address _from, address[] _toAddresses, uint256[] _amounts) public { /* Ensures _toAddresses array is less than or equal to 255 */ require(_toAddresses.length <= 255); /* Ensures _toAddress and _amounts have the same number of entries. */ require(_toAddresses.length == _amo...
/** * @dev Transfer the specified amounts of tokens to the specified addresses from authorized balance of sender. * @dev Be aware that there is no check for duplicate recipients. * * @param _from The address of the sender * @param _toAddresses The addresses of the recipients (MAX 255) * @param _amounts The ...
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://9ca9ad2331a1012d21f47c60166a2d0923bde2fc40a24c4ef7007cdfc81f0672
{ "func_code_index": [ 3660, 4157 ] }
11,356
Senate
SenateERC20.sol
0x34be5b8c30ee4fde069dc878989686abe9884470
Solidity
Senate
contract Senate is ERC20 { uint256 constant public MAX_SUPPLY = 300_000_000e18; address public deployer; constructor(address initialKeeper) ERC20("SENATE", "SENATE") { _mint(initialKeeper, MAX_SUPPLY); deployer = _msgSender(); } /** * @dev Destroys `amount` tokens f...
burn
function burn(uint256 amount) external { _burn(_msgSender(), amount); }
/** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */
NatSpecMultiLine
v0.8.10+commit.fc410830
MIT
{ "func_code_index": [ 377, 464 ] }
11,357
Senate
SenateERC20.sol
0x34be5b8c30ee4fde069dc878989686abe9884470
Solidity
Senate
contract Senate is ERC20 { uint256 constant public MAX_SUPPLY = 300_000_000e18; address public deployer; constructor(address initialKeeper) ERC20("SENATE", "SENATE") { _mint(initialKeeper, MAX_SUPPLY); deployer = _msgSender(); } /** * @dev Destroys `amount` tokens f...
reclaimToken
function reclaimToken(ERC20 token) external { require(_msgSender() == deployer, "Only for deployer"); require(address(token) != address(0)); uint256 balance = token.balanceOf(address(this)); token.transfer(msg.sender, balance); }
/** * @dev Deployer can claim any tokens that transfered to this contract * address for prevent users confused */
NatSpecMultiLine
v0.8.10+commit.fc410830
MIT
{ "func_code_index": [ 601, 870 ] }
11,358
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
Context
contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (addres...
/* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending ...
Comment
_msgSender
function _msgSender() internal view returns (address payable) { return msg.sender; }
// solhint-disable-previous-line no-empty-blocks
LineComment
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 265, 368 ] }
11,359
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 94, 154 ] }
11,360
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 237, 310 ] }
11,361
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 534, 616 ] }
11,362
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 895, 983 ] }
11,363
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 1647, 1726 ] }
11,364
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 2039, 2141 ] }
11,365
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 251, 437 ] }
11,366
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 707, 848 ] }
11,367
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 1180, 1377 ] }
11,368
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 1623, 2099 ] }
11,369
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 2562, 2699 ] }
11,370
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b != 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; ...
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 3224, 3575 ] }
11,371
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 4027, 4162 ] }
11,372
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 4676, 4847 ] }
11,373
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
Token
contract Token is Context, IERC20 { using SafeMath for uint256; string private _name; string private _symbol; uint8 private _decimals; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tota...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
name
function name() public view returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 759, 847 ] }
11,374
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
Token
contract Token is Context, IERC20 { using SafeMath for uint256; string private _name; string private _symbol; uint8 private _decimals; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tota...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
symbol
function symbol() public view returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 961, 1053 ] }
11,375
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
Token
contract Token is Context, IERC20 { using SafeMath for uint256; string private _name; string private _symbol; uint8 private _decimals; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tota...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
decimals
function decimals() public view returns (uint8) { return _decimals; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. * *...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 1611, 1699 ] }
11,376
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
Token
contract Token is Context, IERC20 { using SafeMath for uint256; string private _name; string private _symbol; uint8 private _decimals; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tota...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 1769, 1865 ] }
11,377
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
Token
contract Token is Context, IERC20 { using SafeMath for uint256; string private _name; string private _symbol; uint8 private _decimals; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tota...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 1923, 2038 ] }
11,378
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
Token
contract Token is Context, IERC20 { using SafeMath for uint256; string private _name; string private _symbol; uint8 private _decimals; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tota...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) public returns (bool) { _transfer(_msgSender(), recipient, amount); return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 2246, 2409 ] }
11,379
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
Token
contract Token is Context, IERC20 { using SafeMath for uint256; string private _name; string private _symbol; uint8 private _decimals; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tota...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 2467, 2606 ] }
11,380
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
Token
contract Token is Context, IERC20 { using SafeMath for uint256; string private _name; string private _symbol; uint8 private _decimals; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tota...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) public returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 2748, 2905 ] }
11,381
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
Token
contract Token is Context, IERC20 { using SafeMath for uint256; string private _name; string private _symbol; uint8 private _decimals; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tota...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; }
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amou...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 3372, 3681 ] }
11,382
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
Token
contract Token is Context, IERC20 { using SafeMath for uint256; string private _name; string private _symbol; uint8 private _decimals; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tota...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 4085, 4300 ] }
11,383
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
Token
contract Token is Context, IERC20 { using SafeMath for uint256; string private _name; string private _symbol; uint8 private _decimals; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tota...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; }
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 4798, 5064 ] }
11,384
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
Token
contract Token is Context, IERC20 { using SafeMath for uint256; string private _name; string private _symbol; uint8 private _decimals; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tota...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exc...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 5549, 6025 ] }
11,385
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
Token
contract Token is Context, IERC20 { using SafeMath for uint256; string private _name; string private _symbol; uint8 private _decimals; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tota...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); }
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 6301, 6614 ] }
11,386
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
Token
contract Token is Context, IERC20 { using SafeMath for uint256; string private _name; string private _symbol; uint8 private _decimals; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tota...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
_burn
function _burn(address account, uint256 amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amo...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 6941, 7294 ] }
11,387
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
Token
contract Token is Context, IERC20 { using SafeMath for uint256; string private _name; string private _symbol; uint8 private _decimals; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tota...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
_approve
function _approve(address owner, address spender, uint256 amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); }
/** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 7729, 8072 ] }
11,388
Token
Token.sol
0xeaa21b2ba6884a7fadc8ea49ba1391be979ba0f8
Solidity
Token
contract Token is Context, IERC20 { using SafeMath for uint256; string private _name; string private _symbol; uint8 private _decimals; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tota...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide *...
NatSpecMultiLine
_burnFrom
function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance")); }
/** * @dev Destroys `amount` tokens from `account`.`amount` is then deducted * from the caller's allowance. * * See {_burn} and {_approve}. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://109fd991027f29f52b5eca240cbb3973c1ab72886b23f8e328a6208b4fce830e
{ "func_code_index": [ 8253, 8490 ] }
11,389
Llama
contracts/Llama.sol
0x2febe228d2ad5a9adc8ec3f77b3f23ad7bb13b1e
Solidity
Llama
contract Llama is ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, Ownable, ReentrancyGuard, VRFConsumerBase { using Counters for Counters.Counter; using SafeMath for uint256; Counters.Counter private _tokenIdCounter; uint256 private unitCost; uint256 private _maxPurchase; uint256 pri...
resetSeed
function resetSeed() public onlyOwner { require(randomResult != 0, "seed is already 0"); require(_tokenIdCounter.current() < 500, "Cannot reset seed"); randomResult = 0; }
//just have this method so we can check that chainlink is working correctly //before starting minting. Can't reset seed after 500 llamas have been minted.
LineComment
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 3865, 4073 ] }
11,390
Llama
contracts/Llama.sol
0x2febe228d2ad5a9adc8ec3f77b3f23ad7bb13b1e
Solidity
Llama
contract Llama is ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, Ownable, ReentrancyGuard, VRFConsumerBase { using Counters for Counters.Counter; using SafeMath for uint256; Counters.Counter private _tokenIdCounter; uint256 private unitCost; uint256 private _maxPurchase; uint256 pri...
withdrawTokens
function withdrawTokens(IERC20 token) public onlyOwner { require(address(token) != address(0)); uint256 balance = token.balanceOf(address(this)); token.transfer(msg.sender, balance); }
//withdraw link or any other ERC tokens
LineComment
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 8733, 8930 ] }
11,391
Llama
contracts/Llama.sol
0x2febe228d2ad5a9adc8ec3f77b3f23ad7bb13b1e
Solidity
Llama
contract Llama is ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, Ownable, ReentrancyGuard, VRFConsumerBase { using Counters for Counters.Counter; using SafeMath for uint256; Counters.Counter private _tokenIdCounter; uint256 private unitCost; uint256 private _maxPurchase; uint256 pri...
topUpJackpot
function topUpJackpot() public payable nonReentrant { TotalJackpotInWei = TotalJackpotInWei.add(msg.value); }
//not onlyOwner.. Anyone can add money to the jackpot
LineComment
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 9649, 9777 ] }
11,392
Llama
contracts/Llama.sol
0x2febe228d2ad5a9adc8ec3f77b3f23ad7bb13b1e
Solidity
Llama
contract Llama is ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, Ownable, ReentrancyGuard, VRFConsumerBase { using Counters for Counters.Counter; using SafeMath for uint256; Counters.Counter private _tokenIdCounter; uint256 private unitCost; uint256 private _maxPurchase; uint256 pri...
fulfillRandomness
function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override { randomResult = randomness; }
/** * Callback function used by VRF Coordinator */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 10660, 10793 ] }
11,393
IdolMintContract
contracts/OfferingRefundContract.sol
0x7b4b02372d8e54c1c0454d97f01d85ef203cdc5e
Solidity
OfferingRefundContract
contract OfferingRefundContract is Ownable { // merkleRoot is the value of the root of the Merkle Tree used for authenticating airdrop claims. bytes32 public merkleRoot; // alreadyClaimed stores whether an address has already claimed its eligible refund. mapping(address => bool) public alreadyClaimed; const...
/** @notice OfferingRefundContract is an airdrop contract which allows authenticated users to claim a portion of the contract's Ethereum based on how much they overpaid compared to the last price of the dutch auction. All of the calculations on how much ETH to refund to which users are calculated off-chain and auth...
NatSpecMultiLine
/** @notice receive is implemented to allow this contract to receive ETH from IdolMintContract. Any ETH sent to this contract can then be withdrawn by addresses eligible for refund. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 532, 563 ] }
11,394
IdolMintContract
contracts/OfferingRefundContract.sol
0x7b4b02372d8e54c1c0454d97f01d85ef203cdc5e
Solidity
OfferingRefundContract
contract OfferingRefundContract is Ownable { // merkleRoot is the value of the root of the Merkle Tree used for authenticating airdrop claims. bytes32 public merkleRoot; // alreadyClaimed stores whether an address has already claimed its eligible refund. mapping(address => bool) public alreadyClaimed; const...
/** @notice OfferingRefundContract is an airdrop contract which allows authenticated users to claim a portion of the contract's Ethereum based on how much they overpaid compared to the last price of the dutch auction. All of the calculations on how much ETH to refund to which users are calculated off-chain and auth...
NatSpecMultiLine
setMerkleRoot
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { merkleRoot = _merkleRoot; }
/** @notice setMerkleRoot is used to set the root of the Merkle Tree that we will use to authenticate which users are eligible to withdraw refunds from this contract. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 749, 849 ] }
11,395
IdolMintContract
contracts/OfferingRefundContract.sol
0x7b4b02372d8e54c1c0454d97f01d85ef203cdc5e
Solidity
OfferingRefundContract
contract OfferingRefundContract is Ownable { // merkleRoot is the value of the root of the Merkle Tree used for authenticating airdrop claims. bytes32 public merkleRoot; // alreadyClaimed stores whether an address has already claimed its eligible refund. mapping(address => bool) public alreadyClaimed; const...
/** @notice OfferingRefundContract is an airdrop contract which allows authenticated users to claim a portion of the contract's Ethereum based on how much they overpaid compared to the last price of the dutch auction. All of the calculations on how much ETH to refund to which users are calculated off-chain and auth...
NatSpecMultiLine
claimRefund
function claimRefund(address _to, uint _refundAmount, bytes32[] calldata _merkleProof) external { require(!alreadyClaimed[_to], "Refund has already been claimed for this address"); // Verify against the Merkle tree that the transaction is authenticated for the user. bytes32 leaf = keccak256(abi.encodePacked(_to,...
/** @notice claimRefund will claim the ETH refund that an address is eligible to claim. The caller must pass the exact amount of ETH that the address is eligible to claim. @param _to The address to claim refund for. @param _refundAmount The amount of ETH refund to claim. @param _merkleProof The merkle proof used t...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 1257, 1800 ] }
11,396
CashCowCapital
CashCowCapital.sol
0x173a7d4d5a4ca19c07c5c3b608a7764c97ea12cf
Solidity
Auth
abstract contract Auth { address internal owner; constructor(address _owner) { owner = _owner; } /** * Function modifier to require caller to be contract deployer */ modifier onlyOwner() { require(isOwner(msg.sender), "!Owner"); _; } /** * Che...
/** * Allows for contract ownership along with multi-address authorization */
NatSpecMultiLine
isOwner
function isOwner(address account) public view returns (bool) { return account == owner; }
/** * Check if address is owner */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://595d0301a67f5dabe6978569fd55a6900215c6421e408d898c2a3701503af9b0
{ "func_code_index": [ 353, 461 ] }
11,397
CashCowCapital
CashCowCapital.sol
0x173a7d4d5a4ca19c07c5c3b608a7764c97ea12cf
Solidity
Auth
abstract contract Auth { address internal owner; constructor(address _owner) { owner = _owner; } /** * Function modifier to require caller to be contract deployer */ modifier onlyOwner() { require(isOwner(msg.sender), "!Owner"); _; } /** * Che...
/** * Allows for contract ownership along with multi-address authorization */
NatSpecMultiLine
transferOwnership
function transferOwnership(address payable adr) public onlyOwner { owner = adr; emit OwnershipTransferred(adr); }
/** * Transfer ownership to new address. Caller must be deployer. Leaves old deployer authorized */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
Unlicense
ipfs://595d0301a67f5dabe6978569fd55a6900215c6421e408d898c2a3701503af9b0
{ "func_code_index": [ 581, 722 ] }
11,398
CashCowCapital
CashCowCapital.sol
0x173a7d4d5a4ca19c07c5c3b608a7764c97ea12cf
Solidity
DividendDistributor
contract DividendDistributor is IDividendDistributor { using SafeMath for uint256; address public _token; address public _owner; address public _treasury; struct Share { uint256 amount; uint256 totalExcluded; uint256 totalClaimed; } address[] private s...
setShare
function setShare(address shareholder, uint256 amount) external override onlyToken { if(shares[shareholder].amount > 0){ distributeDividend(shareholder); } if(amount > 0 && shares[shareholder].amount == 0){ addShareholder(shareholder); }else if(amount == 0 && shares[shareholder]....
// receive() external payable { }
LineComment
v0.8.7+commit.e28d00a7
Unlicense
ipfs://595d0301a67f5dabe6978569fd55a6900215c6421e408d898c2a3701503af9b0
{ "func_code_index": [ 1027, 1676 ] }
11,399