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
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
EnvoyChain_v1
contract EnvoyChain_v1 is owned { /*=============================== = DATA STORAGE = ===============================*/ // Public variables of the token using SafeMath for uint256; string public name; string public symbol; uint256 public decimals; u...
//****************************************************************************// //--------------------- MAIN CODE STARTS HERE ---------------------// //****************************************************************************//
LineComment
approve
function approve(address _spender, uint256 _value) public returns (bool success) { require(!safeguard); allowance[msg.sender][_spender] = _value; return true; }
/** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */
NatSpecMultiLine
v0.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 3562, 3759 ] }
23,200
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
EnvoyChain_v1
contract EnvoyChain_v1 is owned { /*=============================== = DATA STORAGE = ===============================*/ // Public variables of the token using SafeMath for uint256; string public name; string public symbol; uint256 public decimals; u...
//****************************************************************************// //--------------------- MAIN CODE STARTS HERE ---------------------// //****************************************************************************//
LineComment
burn
function burn(uint256 _value) public returns (bool success) { require(!safeguard); //checking of enough token balance is done by SafeMath balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value); // Subtract from the sender totalSupply = totalSupply.sub(_value); // Updates tot...
/** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */
NatSpecMultiLine
v0.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 4410, 4828 ] }
23,201
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
EnvoyChain_v1
contract EnvoyChain_v1 is owned { /*=============================== = DATA STORAGE = ===============================*/ // Public variables of the token using SafeMath for uint256; string public name; string public symbol; uint256 public decimals; u...
//****************************************************************************// //--------------------- MAIN CODE STARTS HERE ---------------------// //****************************************************************************//
LineComment
burnFrom
function burnFrom(address _from, uint256 _value) public returns (bool success) { require(!safeguard); //checking of allowance and token value is done by SafeMath balanceOf[_from] = balanceOf[_from].sub(_value); // Subtract from the targeted balance allowance[_from][msg.sender...
/** * 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.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 5107, 5702 ] }
23,202
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
EnvoyChain_v1
contract EnvoyChain_v1 is owned { /*=============================== = DATA STORAGE = ===============================*/ // Public variables of the token using SafeMath for uint256; string public name; string public symbol; uint256 public decimals; u...
//****************************************************************************// //--------------------- 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 */
NatSpecMultiLine
v0.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 5925, 6096 ] }
23,203
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
EnvoyChain_v1
contract EnvoyChain_v1 is owned { /*=============================== = DATA STORAGE = ===============================*/ // Public variables of the token using SafeMath for uint256; string public name; string public symbol; uint256 public decimals; u...
//****************************************************************************// //--------------------- MAIN CODE STARTS HERE ---------------------// //****************************************************************************//
LineComment
mintToken
function mintToken(address target, uint256 mintedAmount) onlyOwner public { balanceOf[target] = balanceOf[target].add(mintedAmount); totalSupply = totalSupply.add(mintedAmount); emit Transfer(address(0), target, mintedAmount); }
/** * @notice Create `mintedAmount` tokens and send it to `target` * @param target Address to receive the tokens * @param mintedAmount the amount of tokens it will receive */
NatSpecMultiLine
v0.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 6320, 6585 ] }
23,204
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
EnvoyChain_v1
contract EnvoyChain_v1 is owned { /*=============================== = DATA STORAGE = ===============================*/ // Public variables of the token using SafeMath for uint256; string public name; string public symbol; uint256 public decimals; u...
//****************************************************************************// //--------------------- MAIN CODE STARTS HERE ---------------------// //****************************************************************************//
LineComment
manualWithdrawTokens
function manualWithdrawTokens(uint256 tokenAmount) public onlyOwner{ // no need for overflow checking as that will be done in transfer function _transfer(address(this), owner, tokenAmount); }
/** * Owner can transfer tokens from contract to owner address * * 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.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 6884, 7103 ] }
23,205
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
EnvoyChain_v1
contract EnvoyChain_v1 is owned { /*=============================== = DATA STORAGE = ===============================*/ // Public variables of the token using SafeMath for uint256; string public name; string public symbol; uint256 public decimals; u...
//****************************************************************************// //--------------------- 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.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 7197, 7313 ] }
23,206
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
EnvoyChain_v1
contract EnvoyChain_v1 is owned { /*=============================== = DATA STORAGE = ===============================*/ // Public variables of the token using SafeMath for uint256; string public name; string public symbol; uint256 public decimals; u...
//****************************************************************************// //--------------------- 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.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 7575, 7775 ] }
23,207
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
EnvoyChain_v1
contract EnvoyChain_v1 is owned { /*=============================== = DATA STORAGE = ===============================*/ // Public variables of the token using SafeMath for uint256; string public name; string public symbol; uint256 public decimals; u...
//****************************************************************************// //--------------------- MAIN CODE STARTS HERE ---------------------// //****************************************************************************//
LineComment
startNewPassiveAirDrop
function startNewPassiveAirDrop(uint256 passiveAirdropTokensAllocation_, uint256 airdropAmount_ ) public onlyOwner { passiveAirdropTokensAllocation = passiveAirdropTokensAllocation_; airdropAmount = airdropAmount_; passiveAirdropStatus = true; }
/** * This function to start a passive air drop by admin only * Admin have to put airdrop amount (in wei) and total toens allocated for it. * Admin must keep allocated tokens in the contract */
NatSpecMultiLine
v0.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 8495, 8779 ] }
23,208
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
EnvoyChain_v1
contract EnvoyChain_v1 is owned { /*=============================== = DATA STORAGE = ===============================*/ // Public variables of the token using SafeMath for uint256; string public name; string public symbol; uint256 public decimals; u...
//****************************************************************************// //--------------------- MAIN CODE STARTS HERE ---------------------// //****************************************************************************//
LineComment
stopPassiveAirDropCompletely
function stopPassiveAirDropCompletely() public onlyOwner{ passiveAirdropTokensAllocation = 0; airdropAmount = 0; airdropClaimedIndex++; passiveAirdropStatus = false; }
/** * This function will stop any ongoing passive airdrop */
NatSpecMultiLine
v0.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 8864, 9077 ] }
23,209
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
EnvoyChain_v1
contract EnvoyChain_v1 is owned { /*=============================== = DATA STORAGE = ===============================*/ // Public variables of the token using SafeMath for uint256; string public name; string public symbol; uint256 public decimals; u...
//****************************************************************************// //--------------------- MAIN CODE STARTS HERE ---------------------// //****************************************************************************//
LineComment
claimPassiveAirdrop
function claimPassiveAirdrop() public payable returns(bool) { require(airdropAmount > 0, 'Token amount must not be zero'); require(passiveAirdropStatus, 'Air drop is not active'); require(passiveAirdropTokensSold <= passiveAirdropTokensAllocation, 'Air drop sold out'); require(!airdropClaimed[airdro...
/** * This function called by user who want to claim passive air drop. * He can only claim air drop once, for current air drop. If admin stop an air drop and start fresh, then users can claim again (once only). */
NatSpecMultiLine
v0.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 9321, 10120 ] }
23,210
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
EnvoyChain_v1
contract EnvoyChain_v1 is owned { /*=============================== = DATA STORAGE = ===============================*/ // Public variables of the token using SafeMath for uint256; string public name; string public symbol; uint256 public decimals; u...
//****************************************************************************// //--------------------- MAIN CODE STARTS HERE ---------------------// //****************************************************************************//
LineComment
airdropACTIVE
function airdropACTIVE(address[] memory recipients,uint256 tokenAmount) public onlyOwner { require(recipients.length <= 150); uint256 totalAddresses = recipients.length; for(uint i = 0; i < totalAddresses; i++) { //This will loop through all the recipients and send them the specified tokens ...
/** * Run an ACTIVE Air-Drop * * It requires an array of all the addresses and amount of tokens to distribute * It will only process first 150 recipients. That limit is fixed to prevent gas limit */
NatSpecMultiLine
v0.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 10804, 11339 ] }
23,211
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
EnvoyChain_v1
contract EnvoyChain_v1 is owned { /*=============================== = DATA STORAGE = ===============================*/ // Public variables of the token using SafeMath for uint256; string public name; string public symbol; uint256 public decimals; u...
//****************************************************************************// //--------------------- 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.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 11762, 11992 ] }
23,212
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
EnvoyChain_v1
contract EnvoyChain_v1 is owned { /*=============================== = DATA STORAGE = ===============================*/ // Public variables of the token using SafeMath for uint256; string public name; string public symbol; uint256 public decimals; u...
//****************************************************************************// //--------------------- MAIN CODE STARTS HERE ---------------------// //****************************************************************************//
LineComment
whitelistUser
function whitelistUser(address userAddress) onlyOwner public{ require(whitelistingStatus == true); require(userAddress != address(0)); whitelisted[userAddress] = true; }
/** * Whitelist any user address - only Owner can do this * * It will add user address in whitelisted mapping */
NatSpecMultiLine
v0.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 12141, 12347 ] }
23,213
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
EnvoyChain_v1
contract EnvoyChain_v1 is owned { /*=============================== = DATA STORAGE = ===============================*/ // Public variables of the token using SafeMath for uint256; string public name; string public symbol; uint256 public decimals; u...
//****************************************************************************// //--------------------- 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(0)); whitelis...
/** * 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.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 12596, 12992 ] }
23,214
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
EnvoyChain_v1
contract EnvoyChain_v1 is owned { /*=============================== = DATA STORAGE = ===============================*/ // Public variables of the token using SafeMath for uint256; string public name; string public symbol; uint256 public decimals; u...
//****************************************************************************// //--------------------- MAIN CODE STARTS HERE ---------------------// //****************************************************************************//
LineComment
setPrices
function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public { sellPrice = newSellPrice; //sellPrice is 1 Token = ?? WEI buyPrice = newBuyPrice; //buyPrice is 1 ETH = ?? Tokens }
/** * Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth * newSellPrice Price the users can sell to the contract * newBuyPrice Price users can buy from the contract */
NatSpecMultiLine
v0.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 13447, 13677 ] }
23,215
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
EnvoyChain_v1
contract EnvoyChain_v1 is owned { /*=============================== = DATA STORAGE = ===============================*/ // Public variables of the token using SafeMath for uint256; string public name; string public symbol; uint256 public decimals; u...
//****************************************************************************// //--------------------- MAIN CODE STARTS HERE ---------------------// //****************************************************************************//
LineComment
buyTokens
function buyTokens() payable public { uint amount = msg.value * buyPrice; // calculates the amount _transfer(address(this), msg.sender, amount); // makes the transfers }
/** * Buy tokens from contract by sending ether * buyPrice is 1 ETH = ?? Tokens */
NatSpecMultiLine
v0.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 13792, 14011 ] }
23,216
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
EnvoyChain_v1
contract EnvoyChain_v1 is owned { /*=============================== = DATA STORAGE = ===============================*/ // Public variables of the token using SafeMath for uint256; string public name; string public symbol; uint256 public decimals; u...
//****************************************************************************// //--------------------- MAIN CODE STARTS HERE ---------------------// //****************************************************************************//
LineComment
sellTokens
function sellTokens(uint256 amount) public { uint256 etherAmount = amount * sellPrice/(10**decimals); require(address(this).balance >= etherAmount); // checks if the contract has enough ether to buy _transfer(msg.sender, address(this), amount); // makes the transfers msg.sender.transfer(...
/** * Sell `amount` tokens to contract * amount amount of tokens to be sold */
NatSpecMultiLine
v0.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 14116, 14580 ] }
23,217
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
Proxy
contract Proxy { /** * @dev Tells the address of the implementation where every call will be delegated. * @return address of the implementation to which it will be delegated */ function implementation() public view returns (address); /** * @dev Fallback function allowing to perform a delegatecall...
/** * @title Proxy * @dev Gives the possibility to delegate any call to a foreign implementation. */
NatSpecMultiLine
implementation
function implementation() public view returns (address);
/** * @dev Tells the address of the implementation where every call will be delegated. * @return address of the implementation to which it will be delegated */
NatSpecMultiLine
v0.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 190, 249 ] }
23,218
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
Proxy
contract Proxy { /** * @dev Tells the address of the implementation where every call will be delegated. * @return address of the implementation to which it will be delegated */ function implementation() public view returns (address); /** * @dev Fallback function allowing to perform a delegatecall...
/** * @title Proxy * @dev Gives the possibility to delegate any call to a foreign implementation. */
NatSpecMultiLine
function () payable external { address _impl = implementation(); require(_impl != address(0)); assembly { let ptr := mload(0x40) calldatacopy(ptr, 0, calldatasize) let result := delegatecall(gas, _impl, ptr, calldatasize, 0, 0) let size := returndatasize returndatacopy(ptr, 0, size) ...
/** * @dev Fallback function allowing to perform a delegatecall to the given implementation. * This function will return whatever the implementation call returns */
NatSpecMultiLine
v0.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 429, 875 ] }
23,219
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
UpgradeabilityProxy
contract UpgradeabilityProxy is Proxy { /** * @dev This event will be emitted every time the implementation gets upgraded * @param implementation representing the address of the upgraded implementation */ event Upgraded(address indexed implementation); // Storage position of the address of the cu...
/** * @title UpgradeabilityProxy * @dev This contract represents a proxy where the implementation address to which it will delegate can be upgraded */
NatSpecMultiLine
implementation
function implementation() public view returns (address impl) { bytes32 position = implementationPosition; assembly { impl := sload(position) } }
/** * @dev Tells the address of the current implementation * @return address of the current implementation */
NatSpecMultiLine
v0.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 651, 823 ] }
23,220
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
UpgradeabilityProxy
contract UpgradeabilityProxy is Proxy { /** * @dev This event will be emitted every time the implementation gets upgraded * @param implementation representing the address of the upgraded implementation */ event Upgraded(address indexed implementation); // Storage position of the address of the cu...
/** * @title UpgradeabilityProxy * @dev This contract represents a proxy where the implementation address to which it will delegate can be upgraded */
NatSpecMultiLine
setImplementation
function setImplementation(address newImplementation) internal { bytes32 position = implementationPosition; assembly { sstore(position, newImplementation) } }
/** * @dev Sets the address of the current implementation * @param newImplementation address representing the new implementation to be set */
NatSpecMultiLine
v0.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 983, 1169 ] }
23,221
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
UpgradeabilityProxy
contract UpgradeabilityProxy is Proxy { /** * @dev This event will be emitted every time the implementation gets upgraded * @param implementation representing the address of the upgraded implementation */ event Upgraded(address indexed implementation); // Storage position of the address of the cu...
/** * @title UpgradeabilityProxy * @dev This contract represents a proxy where the implementation address to which it will delegate can be upgraded */
NatSpecMultiLine
_upgradeTo
function _upgradeTo(address newImplementation) internal { address currentImplementation = implementation(); require(currentImplementation != newImplementation); setImplementation(newImplementation); emit Upgraded(newImplementation); }
/** * @dev Upgrades the implementation address * @param newImplementation representing the address of the new implementation to be set */
NatSpecMultiLine
v0.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 1325, 1585 ] }
23,222
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
OwnedUpgradeabilityProxy
contract OwnedUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Event to show ownership has been transferred * @param previousOwner representing the address of the previous owner * @param newOwner representing the address of the new owner */ event ProxyOwnershipTransferred(address previousOwner,...
/** * @title OwnedUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with basic authorization control functionalities */
NatSpecMultiLine
proxyOwner
function proxyOwner() public view returns (address owner) { bytes32 position = proxyOwnerPosition; assembly { owner := sload(position) } }
/** * @dev Tells the address of the owner * @return the address of the owner */
NatSpecMultiLine
v0.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 927, 1093 ] }
23,223
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
OwnedUpgradeabilityProxy
contract OwnedUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Event to show ownership has been transferred * @param previousOwner representing the address of the previous owner * @param newOwner representing the address of the new owner */ event ProxyOwnershipTransferred(address previousOwner,...
/** * @title OwnedUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with basic authorization control functionalities */
NatSpecMultiLine
setUpgradeabilityOwner
function setUpgradeabilityOwner(address newProxyOwner) internal { bytes32 position = proxyOwnerPosition; assembly { sstore(position, newProxyOwner) } }
/** * @dev Sets the address of the owner */
NatSpecMultiLine
v0.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 1151, 1330 ] }
23,224
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
OwnedUpgradeabilityProxy
contract OwnedUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Event to show ownership has been transferred * @param previousOwner representing the address of the previous owner * @param newOwner representing the address of the new owner */ event ProxyOwnershipTransferred(address previousOwner,...
/** * @title OwnedUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with basic authorization control functionalities */
NatSpecMultiLine
transferProxyOwnership
function transferProxyOwnership(address newOwner) public onlyProxyOwner { require(newOwner != address(0)); emit ProxyOwnershipTransferred(proxyOwner(), newOwner); setUpgradeabilityOwner(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.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 1494, 1713 ] }
23,225
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
OwnedUpgradeabilityProxy
contract OwnedUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Event to show ownership has been transferred * @param previousOwner representing the address of the previous owner * @param newOwner representing the address of the new owner */ event ProxyOwnershipTransferred(address previousOwner,...
/** * @title OwnedUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with basic authorization control functionalities */
NatSpecMultiLine
upgradeTo
function upgradeTo(address implementation) public onlyProxyOwner { _upgradeTo(implementation); }
/** * @dev Allows the proxy owner to upgrade the current version of the proxy. * @param implementation representing the address of the new implementation to be set. */
NatSpecMultiLine
v0.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 1899, 2006 ] }
23,226
EnvoyChain_proxy
EnvoyChain_proxy.sol
0x947e7997501cc0c6d775d0c33dac2d03bc7986b6
Solidity
OwnedUpgradeabilityProxy
contract OwnedUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Event to show ownership has been transferred * @param previousOwner representing the address of the previous owner * @param newOwner representing the address of the new owner */ event ProxyOwnershipTransferred(address previousOwner,...
/** * @title OwnedUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with basic authorization control functionalities */
NatSpecMultiLine
upgradeToAndCall
function upgradeToAndCall(address implementation, bytes memory data) payable public onlyProxyOwner { _upgradeTo(implementation); (bool success,) = address(this).call.value(msg.value).gas(200000)(data); require(success,'initialize function errored'); }
/** * @dev Allows the proxy owner to upgrade the current version of the proxy and call the new implementation * to initialize whatever is needed through a low level call. * @param implementation representing the address of the new implementation to be set. * @param data represents the msg.data to bet sent in th...
NatSpecMultiLine
v0.5.5+commit.47a71e8f
bzzr://0b8814a70f70cd24183ed1aa1d3cee090ef12a9febc912286ce9e8c334b5e808
{ "func_code_index": [ 2480, 2752 ] }
23,227
HireGoToken
HireGoToken.sol
0xaaa89105dab822dbc9a6de64a23d045d99d5fd36
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uin...
/** * @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(_va...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://2b9bc36848cd36f767bb0a0dd00e160e75a6ae0fd290ee266feb0d0e557d4dee
{ "func_code_index": [ 282, 705 ] }
23,228
HireGoToken
HireGoToken.sol
0xaaa89105dab822dbc9a6de64a23d045d99d5fd36
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uin...
/** * @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.18+commit.9cf6e910
bzzr://2b9bc36848cd36f767bb0a0dd00e160e75a6ae0fd290ee266feb0d0e557d4dee
{ "func_code_index": [ 921, 1041 ] }
23,229
HireGoToken
HireGoToken.sol
0xaaa89105dab822dbc9a6de64a23d045d99d5fd36
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...
/** * @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); ...
/** * @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.18+commit.9cf6e910
bzzr://2b9bc36848cd36f767bb0a0dd00e160e75a6ae0fd290ee266feb0d0e557d4dee
{ "func_code_index": [ 415, 903 ] }
23,230
HireGoToken
HireGoToken.sol
0xaaa89105dab822dbc9a6de64a23d045d99d5fd36
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...
/** * @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. * * 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.18+commit.9cf6e910
bzzr://2b9bc36848cd36f767bb0a0dd00e160e75a6ae0fd290ee266feb0d0e557d4dee
{ "func_code_index": [ 1555, 1761 ] }
23,231
HireGoToken
HireGoToken.sol
0xaaa89105dab822dbc9a6de64a23d045d99d5fd36
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...
/** * @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.18+commit.9cf6e910
bzzr://2b9bc36848cd36f767bb0a0dd00e160e75a6ae0fd290ee266feb0d0e557d4dee
{ "func_code_index": [ 2097, 2236 ] }
23,232
HireGoToken
HireGoToken.sol
0xaaa89105dab822dbc9a6de64a23d045d99d5fd36
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...
/** * @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); 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.18+commit.9cf6e910
bzzr://2b9bc36848cd36f767bb0a0dd00e160e75a6ae0fd290ee266feb0d0e557d4dee
{ "func_code_index": [ 2493, 2773 ] }
23,233
HireGoToken
HireGoToken.sol
0xaaa89105dab822dbc9a6de64a23d045d99d5fd36
Solidity
BurnableToken
contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value > 0); require(_valu...
/** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */
NatSpecMultiLine
burn
function burn(uint256 _value) public { require(_value > 0); require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; ...
/** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://2b9bc36848cd36f767bb0a0dd00e160e75a6ae0fd290ee266feb0d0e557d4dee
{ "func_code_index": [ 225, 713 ] }
23,234
HireGoToken
HireGoToken.sol
0xaaa89105dab822dbc9a6de64a23d045d99d5fd36
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 ...
/** * @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.18+commit.9cf6e910
bzzr://2b9bc36848cd36f767bb0a0dd00e160e75a6ae0fd290ee266feb0d0e557d4dee
{ "func_code_index": [ 273, 341 ] }
23,235
HireGoToken
HireGoToken.sol
0xaaa89105dab822dbc9a6de64a23d045d99d5fd36
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 ...
/** * @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.18+commit.9cf6e910
bzzr://2b9bc36848cd36f767bb0a0dd00e160e75a6ae0fd290ee266feb0d0e557d4dee
{ "func_code_index": [ 690, 882 ] }
23,236
HireGoToken
HireGoToken.sol
0xaaa89105dab822dbc9a6de64a23d045d99d5fd36
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @par...
/** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */
NatSpecMultiLine
mint
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { totalSupply = totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); Mint(_to, _amount); Transfer(address(0), _to, _amount); return true; }
/** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://2b9bc36848cd36f767bb0a0dd00e160e75a6ae0fd290ee266feb0d0e557d4dee
{ "func_code_index": [ 513, 808 ] }
23,237
HireGoToken
HireGoToken.sol
0xaaa89105dab822dbc9a6de64a23d045d99d5fd36
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @par...
/** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */
NatSpecMultiLine
finishMinting
function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; MintFinished(); return true; }
/** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://2b9bc36848cd36f767bb0a0dd00e160e75a6ae0fd290ee266feb0d0e557d4dee
{ "func_code_index": [ 933, 1091 ] }
23,238
Atp
contracts/token/ERC20/StandardToken.sol
0x66e2e867b93fbe69f84387427d08861285a9a65a
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 transferred */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://491800667e51eac3952024c6368c008d3f00d25fed26edc98f4a651a1eeaa5de
{ "func_code_index": [ 401, 858 ] }
23,239
Atp
contracts/token/ERC20/StandardToken.sol
0x66e2e867b93fbe69f84387427d08861285a9a65a
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; 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.24+commit.e67f0147
bzzr://491800667e51eac3952024c6368c008d3f00d25fed26edc98f4a651a1eeaa5de
{ "func_code_index": [ 1490, 1685 ] }
23,240
Atp
contracts/token/ERC20/StandardToken.sol
0x66e2e867b93fbe69f84387427d08861285a9a65a
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.24+commit.e67f0147
bzzr://491800667e51eac3952024c6368c008d3f00d25fed26edc98f4a651a1eeaa5de
{ "func_code_index": [ 2009, 2140 ] }
23,241
Atp
contracts/token/ERC20/StandardToken.sol
0x66e2e867b93fbe69f84387427d08861285a9a65a
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
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.24+commit.e67f0147
bzzr://491800667e51eac3952024c6368c008d3f00d25fed26edc98f4a651a1eeaa5de
{ "func_code_index": [ 2606, 2875 ] }
23,242
Atp
contracts/token/ERC20/StandardToken.sol
0x66e2e867b93fbe69f84387427d08861285a9a65a
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
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(_subtractedValue); } emit Approva...
/** * @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.24+commit.e67f0147
bzzr://491800667e51eac3952024c6368c008d3f00d25fed26edc98f4a651a1eeaa5de
{ "func_code_index": [ 3346, 3761 ] }
23,243
GanaTokenAirdropper
GanaTokenAirdropper.sol
0xf7596ec6f818ea76140739d3c558789a3567ca45
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.21+commit.dfe3193c
bzzr://df923990911ad9bfb763eb11d80be20ecfe4988fb603003357fb2526ee0a7150
{ "func_code_index": [ 259, 319 ] }
23,244
GanaTokenAirdropper
GanaTokenAirdropper.sol
0xf7596ec6f818ea76140739d3c558789a3567ca45
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)); emit 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.21+commit.dfe3193c
bzzr://df923990911ad9bfb763eb11d80be20ecfe4988fb603003357fb2526ee0a7150
{ "func_code_index": [ 638, 819 ] }
23,245
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
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); /**...
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 94, 154 ] }
23,246
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
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); /**...
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 237, 310 ] }
23,247
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
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); /**...
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.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 534, 616 ] }
23,248
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
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); /**...
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.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 895, 983 ] }
23,249
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
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); /**...
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.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 1647, 1726 ] }
23,250
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
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); /**...
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.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 2039, 2141 ] }
23,251
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
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 ...
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.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 259, 445 ] }
23,252
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
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 ...
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.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 723, 864 ] }
23,253
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
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 ...
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. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 1162, 1359 ] }
23,254
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
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 ...
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.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 1613, 2089 ] }
23,255
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
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 ...
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.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 2560, 2697 ] }
23,256
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
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 ...
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { 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.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 3188, 3471 ] }
23,257
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
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 ...
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.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 3931, 4066 ] }
23,258
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
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 ...
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.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 4546, 4717 ] }
23,259
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
isContract
function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codeha...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 606, 1230 ] }
23,260
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 2160, 2562 ] }
23,261
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 3318, 3496 ] }
23,262
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 3721, 3922 ] }
23,263
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 4292, 4523 ] }
23,264
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); }
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 4774, 5095 ] }
23,265
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 497, 581 ] }
23,266
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 1139, 1292 ] }
23,267
ACER
ACER.sol
0x16522d69f81f555a48fecd20279889226459feec
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://07bbdd540dc246af9533d9a710a38d29b74e86a36381d3ef656445b814a67372
{ "func_code_index": [ 1442, 1691 ] }
23,268
I9X
I9X.sol
0x60a16b9efd33bb45c18833aed45ca66045b3b714
Solidity
I9X
contract I9X is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
I9X
function I9X() public { symbol = "I9X"; name = "i9X Coin"; decimals = 8; _totalSupply = 3000000000000; balances[0x6298Ad8cE57492D08f9BaC6A72C4Dcb194e890c0] = _totalSupply; //Conta Owner Transfer(address(0), 0x6298Ad8cE57492D08f9BaC6A72C4Dcb194e890c0, _totalSupply); //Conta Owner }
// ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://1003fe5cf62c7928eddffe8620903b97f8afcca24556f996b430f3a6aba68882
{ "func_code_index": [ 450, 795 ] }
23,269
I9X
I9X.sol
0x60a16b9efd33bb45c18833aed45ca66045b3b714
Solidity
I9X
contract I9X is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public constant returns (uint) { return _totalSupply - balances[address(0)]; }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://1003fe5cf62c7928eddffe8620903b97f8afcca24556f996b430f3a6aba68882
{ "func_code_index": [ 983, 1104 ] }
23,270
I9X
I9X.sol
0x60a16b9efd33bb45c18833aed45ca66045b3b714
Solidity
I9X
contract I9X is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account tokenOwner // ------------------------------------------------------------------------
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://1003fe5cf62c7928eddffe8620903b97f8afcca24556f996b430f3a6aba68882
{ "func_code_index": [ 1324, 1453 ] }
23,271
I9X
I9X.sol
0x60a16b9efd33bb45c18833aed45ca66045b3b714
Solidity
I9X
contract I9X is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { require(to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead balances[msg.sender] = safeSub(balances[msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); Tra...
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to to account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://1003fe5cf62c7928eddffe8620903b97f8afcca24556f996b430f3a6aba68882
{ "func_code_index": [ 1797, 2197 ] }
23,272
I9X
I9X.sol
0x60a16b9efd33bb45c18833aed45ca66045b3b714
Solidity
I9X
contract I9X is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval double...
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://1003fe5cf62c7928eddffe8620903b97f8afcca24556f996b430f3a6aba68882
{ "func_code_index": [ 2705, 2913 ] }
23,273
I9X
I9X.sol
0x60a16b9efd33bb45c18833aed45ca66045b3b714
Solidity
I9X
contract I9X is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = safeSub(balances[from], tokens); allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); Transfer(from, to, tokens); return...
// ------------------------------------------------------------------------ // Transfer tokens from the from account to the to account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the from account and // - From account must have sufficient balance to transfer // - S...
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://1003fe5cf62c7928eddffe8620903b97f8afcca24556f996b430f3a6aba68882
{ "func_code_index": [ 3444, 3802 ] }
23,274
I9X
I9X.sol
0x60a16b9efd33bb45c18833aed45ca66045b3b714
Solidity
I9X
contract I9X is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
allowance
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://1003fe5cf62c7928eddffe8620903b97f8afcca24556f996b430f3a6aba68882
{ "func_code_index": [ 4085, 4241 ] }
23,275
I9X
I9X.sol
0x60a16b9efd33bb45c18833aed45ca66045b3b714
Solidity
I9X
contract I9X is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account. The spender contract function // receiveApproval(...) is then executed // --------------------------------------------------------------------...
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://1003fe5cf62c7928eddffe8620903b97f8afcca24556f996b430f3a6aba68882
{ "func_code_index": [ 4596, 4913 ] }
23,276
I9X
I9X.sol
0x60a16b9efd33bb45c18833aed45ca66045b3b714
Solidity
I9X
contract I9X is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
burn
function burn(uint256 _value) public returns (bool success) { require(balances[msg.sender] >= _value); // Check if the sender has enough balances[msg.sender] -= _value; // Subtract from the sender _totalSupply -= _value; // Updates totalSupply emit Burn(msg.sender, _val...
// ------------------------------------------------------------------------ // Destroy tokens // //Remove `_value` tokens from the system irreversibly // //@param _value the amount of money to burn //
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://1003fe5cf62c7928eddffe8620903b97f8afcca24556f996b430f3a6aba68882
{ "func_code_index": [ 5154, 5533 ] }
23,277
I9X
I9X.sol
0x60a16b9efd33bb45c18833aed45ca66045b3b714
Solidity
I9X
contract I9X is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
function () public payable { revert(); }
// ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://1003fe5cf62c7928eddffe8620903b97f8afcca24556f996b430f3a6aba68882
{ "func_code_index": [ 5723, 5782 ] }
23,278
I9X
I9X.sol
0x60a16b9efd33bb45c18833aed45ca66045b3b714
Solidity
I9X
contract I9X is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); }
// ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://1003fe5cf62c7928eddffe8620903b97f8afcca24556f996b430f3a6aba68882
{ "func_code_index": [ 6015, 6204 ] }
23,279
AIRx
AIRx.sol
0x8cb1d155a5a1d5d667611b7710920fd9d1cd727f
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. */ constructor() 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) onlyOwner public { require(newOwner != address(0)); emit 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.24+commit.e67f0147
bzzr://4e055dbc96b86b7f6e6b8ea0a1ab043dc6e3fd00a3760209dd6a21ad6628f4bd
{ "func_code_index": [ 639, 820 ] }
23,280
AIRx
AIRx.sol
0x8cb1d155a5a1d5d667611b7710920fd9d1cd727f
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) pub...
/** * @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)); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); re...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://4e055dbc96b86b7f6e6b8ea0a1ab043dc6e3fd00a3760209dd6a21ad6628f4bd
{ "func_code_index": [ 268, 618 ] }
23,281
AIRx
AIRx.sol
0x8cb1d155a5a1d5d667611b7710920fd9d1cd727f
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) pub...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public constant 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.24+commit.e67f0147
bzzr://4e055dbc96b86b7f6e6b8ea0a1ab043dc6e3fd00a3760209dd6a21ad6628f4bd
{ "func_code_index": [ 824, 940 ] }
23,282
AIRx
AIRx.sol
0x8cb1d155a5a1d5d667611b7710920fd9d1cd727f
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) 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 ...
/** * @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)); uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance);...
/** * @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.24+commit.e67f0147
bzzr://4e055dbc96b86b7f6e6b8ea0a1ab043dc6e3fd00a3760209dd6a21ad6628f4bd
{ "func_code_index": [ 392, 946 ] }
23,283
AIRx
AIRx.sol
0x8cb1d155a5a1d5d667611b7710920fd9d1cd727f
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) 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 ...
/** * @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.24+commit.e67f0147
bzzr://4e055dbc96b86b7f6e6b8ea0a1ab043dc6e3fd00a3760209dd6a21ad6628f4bd
{ "func_code_index": [ 1578, 1773 ] }
23,284
AIRx
AIRx.sol
0x8cb1d155a5a1d5d667611b7710920fd9d1cd727f
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) 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 ...
/** * @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 constant returns (uint256 remaining) { 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.24+commit.e67f0147
bzzr://4e055dbc96b86b7f6e6b8ea0a1ab043dc6e3fd00a3760209dd6a21ad6628f4bd
{ "func_code_index": [ 2097, 2242 ] }
23,285
AIRx
AIRx.sol
0x8cb1d155a5a1d5d667611b7710920fd9d1cd727f
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) 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 ...
/** * @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 success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_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.24+commit.e67f0147
bzzr://4e055dbc96b86b7f6e6b8ea0a1ab043dc6e3fd00a3760209dd6a21ad6628f4bd
{ "func_code_index": [ 2487, 2770 ] }
23,286
AIRx
AIRx.sol
0x8cb1d155a5a1d5d667611b7710920fd9d1cd727f
Solidity
BurnableToken
contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value > 0); require(_valu...
/** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */
NatSpecMultiLine
burn
function burn(uint256 _value) public { require(_value > 0); require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; ...
/** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://4e055dbc96b86b7f6e6b8ea0a1ab043dc6e3fd00a3760209dd6a21ad6628f4bd
{ "func_code_index": [ 225, 770 ] }
23,287
WifeyRewards
contracts/CurveRewards.sol
0xc56f6eb44bf4fe162616446dbf9e1c46bcdac512
Solidity
WifeyRewards
contract WifeyRewards is LPTokenWrapper, IRewardDistributionRecipient { IERC20 public wifey = IERC20(0x601D244D9Fe9434E03ccf7d9CD8f4d4D4f8790A9); uint256 public constant DURATION = 7 days; uint256 public initreward = 10000*1e18; uint256 public starttime = 1596463200; // UTC+0 2020 08-23 14:00:00 ...
stake
function stake(uint256 amount) public updateReward(msg.sender) checkhalve checkStart{ require(amount > 0, "Cannot stake 0"); super.stake(amount); emit Staked(msg.sender, amount); }
// stake visibility is public as overriding LPTokenWrapper's stake() function
LineComment
v0.5.17+commit.d19bba13
MIT
bzzr://352183725215449eed5d5a54ab5f4e14fe9d8a9fbc1155f53a7c8b2ff068a796
{ "func_code_index": [ 2068, 2285 ] }
23,288
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
IERC165
interface IERC165 { /** * @notice Query if a contract implements an interface * @param interfaceId The interface identifier, as specified in ERC-165 * @dev Interface identification is specified in ERC-165. This function * uses less than 30,000 gas. */ function supportsInterface(bytes4 interf...
/** * @title IERC165 * @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) external view returns (bool);
/** * @notice Query if a contract implements an interface * @param interfaceId The interface identifier, as specified in ERC-165 * @dev Interface identification is specified in ERC-165. This function * uses less than 30,000 gas. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 278, 372 ] }
23,289
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an account access to this role */ function add(Role storage role, address account) internal { require(account != address(0)); require(!has(role, account)); role.bearer[account] = true; } ...
/** * @title Roles * @dev Library for managing addresses assigned to a Role. */
NatSpecMultiLine
add
function add(Role storage role, address account) internal { require(account != address(0)); require(!has(role, account)); role.bearer[account] = true; }
/** * @dev give an account access to this role */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 141, 316 ] }
23,290
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an account access to this role */ function add(Role storage role, address account) internal { require(account != address(0)); require(!has(role, account)); role.bearer[account] = true; } ...
/** * @title Roles * @dev Library for managing addresses assigned to a Role. */
NatSpecMultiLine
remove
function remove(Role storage role, address account) internal { require(account != address(0)); require(has(role, account)); role.bearer[account] = false; }
/** * @dev remove an account's access to this role */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 384, 562 ] }
23,291
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an account access to this role */ function add(Role storage role, address account) internal { require(account != address(0)); require(!has(role, account)); role.bearer[account] = true; } ...
/** * @title Roles * @dev Library for managing addresses assigned to a Role. */
NatSpecMultiLine
has
function has(Role storage role, address account) internal view returns (bool) { require(account != address(0)); return role.bearer[account]; }
/** * @dev check if an account has this role * @return bool */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 643, 819 ] }
23,292
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC165
contract ERC165 is IERC165 { bytes4 private constant _InterfaceId_ERC165 = 0x01ffc9a7; /** * 0x01ffc9a7 === * bytes4(keccak256('supportsInterface(bytes4)')) */ /** * @dev a mapping of interface id to whether or not it's supported */ mapping(bytes4 => bool) private _supportedInterfa...
/** * @title ERC165 * @author Matt Condon (@shrugs) * @dev Implements ERC165 using a lookup table. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) external view returns (bool) { return _supportedInterfaces[interfaceId]; }
/** * @dev implement supportsInterface(bytes4) using a lookup table */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 606, 756 ] }
23,293
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
ERC165
contract ERC165 is IERC165 { bytes4 private constant _InterfaceId_ERC165 = 0x01ffc9a7; /** * 0x01ffc9a7 === * bytes4(keccak256('supportsInterface(bytes4)')) */ /** * @dev a mapping of interface id to whether or not it's supported */ mapping(bytes4 => bool) private _supportedInterfa...
/** * @title ERC165 * @author Matt Condon (@shrugs) * @dev Implements ERC165 using a lookup table. */
NatSpecMultiLine
_registerInterface
function _registerInterface(bytes4 interfaceId) internal { require(interfaceId != 0xffffffff); _supportedInterfaces[interfaceId] = true; }
/** * @dev internal method for registering an interface */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 829, 991 ] }
23,294
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
IERC721Receiver
contract IERC721Receiver { /** * @notice Handle the receipt of an NFT * @dev The ERC721 smart contract calls this function on the recipient * after a `safeTransfer`. This function MUST return the function selector, * otherwise the caller will revert the transaction. The selector to be * returned ...
/** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */
NatSpecMultiLine
onERC721Received
function onERC721Received( address operator, address from, uint256 tokenId, bytes data ) public returns(bytes4);
/** * @notice Handle the receipt of an NFT * @dev The ERC721 smart contract calls this function on the recipient * after a `safeTransfer`. This function MUST return the function selector, * otherwise the caller will revert the transaction. The selector to be * returned can be obtained as `this.onERC721Receive...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 865, 1013 ] }
23,295
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ 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...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
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-solidity/pull/522 if (a == 0) { return 0; } uint256...
/** * @dev Multiplies two numbers, reverts on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 90, 486 ] }
23,296
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ 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...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0); // Solidity only automatically asserts 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, reverts on division by zero. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 598, 877 ] }
23,297
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ 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...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; }
/** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 992, 1131 ] }
23,298
TreasureHunt
TreasureHunt.sol
0x01ed068115ba99b94c65c7791d4ac5dee1253835
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ 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...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; }
/** * @dev Adds two numbers, reverts on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c79117ae4b71c96a0666dc3fcf7f4bec95fa931b2500ee225d4506f8a8f7c3c5
{ "func_code_index": [ 1196, 1335 ] }
23,299