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
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 259, 445 ] }
107
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 723, 864 ] }
108
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 1162, 1359 ] }
109
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 1613, 2089 ] }
110
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 2560, 2697 ] }
111
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { 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.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 3188, 3471 ] }
112
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 3931, 4066 ] }
113
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 4546, 4717 ] }
114
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
Context
abstract contract Context { //function _msgSender() internal view virtual returns (address payable) { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mut...
_msgSender
function _msgSender() internal view virtual returns (address) { return msg.sender; }
//function _msgSender() internal view virtual returns (address payable) {
LineComment
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 108, 211 ] }
115
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codeha...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 606, 1230 ] }
116
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 2160, 2562 ] }
117
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 3318, 3496 ] }
118
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 3721, 3922 ] }
119
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 4292, 4523 ] }
120
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); }
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 4774, 5095 ] }
121
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */...
/** * @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 returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 557, 641 ] }
122
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */...
/** * @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 { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 1200, 1353 ] }
123
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */...
/** * @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"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 1503, 1752 ] }
124
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */...
/** * @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
lock
function lock(uint256 time) public virtual onlyOwner { _previousOwner = _owner; _owner = address(0); _lockTime = block.timestamp + time; emit OwnershipTransferred(_owner, address(0)); }
//Locks the contract for owner for the amount of time provided
LineComment
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 1920, 2151 ] }
125
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */...
/** * @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
unlock
function unlock() public virtual { require(_previousOwner == msg.sender, "You don't have permission to unlock"); require(block.timestamp > _lockTime , "Contract is locked until 7 days"); emit OwnershipTransferred(_owner, _previousOwner); _owner = _previousOwner; }
//Unlocks the contract for owner when _lockTime is exceeds
LineComment
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 2222, 2532 ] }
126
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
BananaKong
contract BananaKong is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address =...
//to recieve ETH from uniswapV2Router when swaping
LineComment
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 10248, 10282 ] }
127
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
BananaKong
contract BananaKong is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address =...
_tokenTransfer
function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private { if(!canTrade){ require(sender == owner()); // only owner allowed to trade or add liquidity } if(botWallets[sender] || botWallets[recipient]){ require(botscantrade, "bots arent all...
//this method is responsible for taking all fee, if takeFee is true
LineComment
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 18170, 19289 ] }
128
Crowdsale
Crowdsale.sol
0x2029f1376726e9b1e59a9eb0c40656f1949e6684
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://c25574a60ff107cffcf4c6de0de1463e5bf7a8bb64be3760966277d3098f4177
{ "func_code_index": [ 261, 321 ] }
129
Crowdsale
Crowdsale.sol
0x2029f1376726e9b1e59a9eb0c40656f1949e6684
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://c25574a60ff107cffcf4c6de0de1463e5bf7a8bb64be3760966277d3098f4177
{ "func_code_index": [ 644, 820 ] }
130
Crowdsale
Crowdsale.sol
0x2029f1376726e9b1e59a9eb0c40656f1949e6684
Solidity
ALT1Token
contract ALT1Token is Ownable, ERC20Basic { using SafeMath for uint256; string public constant name = "Altair VR presale token"; string public constant symbol = "ALT1"; uint8 public constant decimals = 18; bool public mintingFinished = false; mapping(address => uint256) public balances; ...
mint
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { totalSupply = totalSupply.add(_amount); if (balances[_to] == 0) { holders.push(_to); } balances[_to] = balances[_to].add(_amount); Mint(_to, _amount); Transfer(address(0), _to, _amount); return true; }
/** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://c25574a60ff107cffcf4c6de0de1463e5bf7a8bb64be3760966277d3098f4177
{ "func_code_index": [ 662, 1000 ] }
131
Crowdsale
Crowdsale.sol
0x2029f1376726e9b1e59a9eb0c40656f1949e6684
Solidity
ALT1Token
contract ALT1Token is Ownable, ERC20Basic { using SafeMath for uint256; string public constant name = "Altair VR presale token"; string public constant symbol = "ALT1"; uint8 public constant decimals = 18; bool public mintingFinished = false; mapping(address => uint256) public balances; ...
finishMinting
function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; MintFinished(); return true; }
/** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://c25574a60ff107cffcf4c6de0de1463e5bf7a8bb64be3760966277d3098f4177
{ "func_code_index": [ 1114, 1256 ] }
132
Crowdsale
Crowdsale.sol
0x2029f1376726e9b1e59a9eb0c40656f1949e6684
Solidity
ALT1Token
contract ALT1Token is Ownable, ERC20Basic { using SafeMath for uint256; string public constant name = "Altair VR presale token"; string public constant symbol = "ALT1"; uint8 public constant decimals = 18; bool public mintingFinished = false; mapping(address => uint256) public balances; ...
transfer
function transfer(address, uint256) public returns (bool) { revert(); return false; }
/** * @dev Current token is not transferred. * After start official token sale ALT, you can exchange your ALT1 to ALT */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://c25574a60ff107cffcf4c6de0de1463e5bf7a8bb64be3760966277d3098f4177
{ "func_code_index": [ 1392, 1493 ] }
133
Crowdsale
Crowdsale.sol
0x2029f1376726e9b1e59a9eb0c40656f1949e6684
Solidity
ALT1Token
contract ALT1Token is Ownable, ERC20Basic { using SafeMath for uint256; string public constant name = "Altair VR presale token"; string public constant symbol = "ALT1"; uint8 public constant decimals = 18; bool public mintingFinished = false; mapping(address => uint256) public balances; ...
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://c25574a60ff107cffcf4c6de0de1463e5bf7a8bb64be3760966277d3098f4177
{ "func_code_index": [ 1699, 1811 ] }
134
Crowdsale
Crowdsale.sol
0x2029f1376726e9b1e59a9eb0c40656f1949e6684
Solidity
Crowdsale
contract Crowdsale is Ownable { using SafeMath for uint256; uint256 public constant rate = 10000; // How many token units a buyer gets per wei uint256 public constant cap = 80000000 ether; // Maximum amount of funds bool public isFinalized = false; uint256 publi...
/** * @title Crowdsale ALT1 presale token */
NatSpecMultiLine
finalize
function finalize() onlyOwner public { require(!isFinalized); finalization(); Finalized(); isFinalized = true; }
/** * @dev Calls the contract's finalization function. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://c25574a60ff107cffcf4c6de0de1463e5bf7a8bb64be3760966277d3098f4177
{ "func_code_index": [ 4700, 4842 ] }
135
Crowdsale
Crowdsale.sol
0x2029f1376726e9b1e59a9eb0c40656f1949e6684
Solidity
Crowdsale
contract Crowdsale is Ownable { using SafeMath for uint256; uint256 public constant rate = 10000; // How many token units a buyer gets per wei uint256 public constant cap = 80000000 ether; // Maximum amount of funds bool public isFinalized = false; uint256 publi...
/** * @title Crowdsale ALT1 presale token */
NatSpecMultiLine
forwardFunds
function forwardFunds() internal { wallet.transfer(msg.value); }
// send ether to the fund collection wallet // override to create custom fund forwarding mechanisms
LineComment
v0.4.19+commit.c4cbbb05
bzzr://c25574a60ff107cffcf4c6de0de1463e5bf7a8bb64be3760966277d3098f4177
{ "func_code_index": [ 4951, 5026 ] }
136
Crowdsale
Crowdsale.sol
0x2029f1376726e9b1e59a9eb0c40656f1949e6684
Solidity
Crowdsale
contract Crowdsale is Ownable { using SafeMath for uint256; uint256 public constant rate = 10000; // How many token units a buyer gets per wei uint256 public constant cap = 80000000 ether; // Maximum amount of funds bool public isFinalized = false; uint256 publi...
/** * @title Crowdsale ALT1 presale token */
NatSpecMultiLine
validPurchase
function validPurchase() internal view returns (bool) { bool tokenMintingFinished = token.mintingFinished(); bool withinCap = token.totalSupply().add(tokensForWei(msg.value)) <= cap; bool withinPeriod = now <= endTime; bool nonZeroPurchase = msg.value != 0; bool moreThanMinimumPayment = msg.value >= 0.05...
// @return true if the transaction can buy tokens
LineComment
v0.4.19+commit.c4cbbb05
bzzr://c25574a60ff107cffcf4c6de0de1463e5bf7a8bb64be3760966277d3098f4177
{ "func_code_index": [ 5082, 5538 ] }
137
Crowdsale
Crowdsale.sol
0x2029f1376726e9b1e59a9eb0c40656f1949e6684
Solidity
Crowdsale
contract Crowdsale is Ownable { using SafeMath for uint256; uint256 public constant rate = 10000; // How many token units a buyer gets per wei uint256 public constant cap = 80000000 ether; // Maximum amount of funds bool public isFinalized = false; uint256 publi...
/** * @title Crowdsale ALT1 presale token */
NatSpecMultiLine
hasEnded
function hasEnded() public view returns (bool) { return now > endTime; }
// @return true if crowdsale event has ended
LineComment
v0.4.19+commit.c4cbbb05
bzzr://c25574a60ff107cffcf4c6de0de1463e5bf7a8bb64be3760966277d3098f4177
{ "func_code_index": [ 5845, 5928 ] }
138
CulturalChain
CulturalChain.sol
0x3d8c5681a4f4faf49e5dc9a24f2c7372d7cca65b
Solidity
CulturalChain
contract CulturalChain is EIP20Interface { uint256 constant private MAX_UINT256 = 2**256 - 1; mapping (address => uint256) public balances; mapping (address => mapping (address => uint256)) public allowed; /* NOTE: The following variables are OPTIONAL vanities. One does not have to inclu...
CulturalChain
function CulturalChain( uint256 _initialAmount, string _tokenName, uint8 _decimalUnits, string _tokenSymbol ) public { balances[msg.sender] = _initialAmount; // Give the creator all initial tokens totalSupply = _initialAmount; // Update total supply ...
//An identifier: eg SBX
LineComment
v0.4.21+commit.dfe3193c
bzzr://5f212b015c93277165f273868130d56d7b0e0d68c9b703d4583d46665f97a3a8
{ "func_code_index": [ 730, 1392 ] }
139
Escrow
Escrow.sol
0x8df8d68c2cc0604b45ce5b69d6556722736a18bb
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. /...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; ...
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://c62b407954252e407fbac0052997bfe78e453869286a47a4ea337e31c2196fac
{ "func_code_index": [ 95, 524 ] }
140
Escrow
Escrow.sol
0x8df8d68c2cc0604b45ce5b69d6556722736a18bb
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. /...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://c62b407954252e407fbac0052997bfe78e453869286a47a4ea337e31c2196fac
{ "func_code_index": [ 614, 914 ] }
141
Escrow
Escrow.sol
0x8df8d68c2cc0604b45ce5b69d6556722736a18bb
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. /...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://c62b407954252e407fbac0052997bfe78e453869286a47a4ea337e31c2196fac
{ "func_code_index": [ 1034, 1162 ] }
142
Escrow
Escrow.sol
0x8df8d68c2cc0604b45ce5b69d6556722736a18bb
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. /...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://c62b407954252e407fbac0052997bfe78e453869286a47a4ea337e31c2196fac
{ "func_code_index": [ 1232, 1378 ] }
143
Escrow
Escrow.sol
0x8df8d68c2cc0604b45ce5b69d6556722736a18bb
Solidity
Escrow
contract Escrow is Ownable { using SafeMath for uint256; struct Stage { uint releaseTime; uint percent; bool transferred; } mapping (uint => Stage) public stages; uint public stageCount; uint public stopDay; uint public startBalance = 0; const...
/** * @title TokenTimelock * @dev TokenTimelock is a token holder contract that will allow a * beneficiary to extract the tokens after a given release time */
NatSpecMultiLine
addStage
function addStage(uint _releaseTime, uint _percent) onlyOwner public { require(_percent >= 100); require(_releaseTime > stages[stageCount].releaseTime); stageCount++; stages[stageCount].releaseTime = _releaseTime; stages[stageCount].percent = _percent; }
//1% - 100, 10% - 1000 50% - 5000
LineComment
v0.4.25+commit.59dbf8f1
bzzr://c62b407954252e407fbac0052997bfe78e453869286a47a4ea337e31c2196fac
{ "func_code_index": [ 473, 782 ] }
144
Escrow
Escrow.sol
0x8df8d68c2cc0604b45ce5b69d6556722736a18bb
Solidity
Escrow
contract Escrow is Ownable { using SafeMath for uint256; struct Stage { uint releaseTime; uint percent; bool transferred; } mapping (uint => Stage) public stages; uint public stageCount; uint public stopDay; uint public startBalance = 0; const...
/** * @title TokenTimelock * @dev TokenTimelock is a token holder contract that will allow a * beneficiary to extract the tokens after a given release time */
NatSpecMultiLine
valueFromPercent
function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) { uint _amount = _value.mul(_percent).div(10000); return (_amount); }
//1% - 100, 10% - 1000 50% - 5000
LineComment
v0.4.25+commit.59dbf8f1
bzzr://c62b407954252e407fbac0052997bfe78e453869286a47a4ea337e31c2196fac
{ "func_code_index": [ 1724, 1914 ] }
145
EqualToken
EqualToken.sol
0x5824f275dab2c59b8972a1fda45ff404c9a703e3
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); /// @notic...
totalSupply
function totalSupply() constant returns (uint256 supply);
/// @return total amount of tokens
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://03157a881cbeb271c2ac473f7a83ac498e77628ebad3e7cf4d521bd02770c22e
{ "func_code_index": [ 60, 122 ] }
146
EqualToken
EqualToken.sol
0x5824f275dab2c59b8972a1fda45ff404c9a703e3
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); /// @notic...
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.18+commit.9cf6e910
bzzr://03157a881cbeb271c2ac473f7a83ac498e77628ebad3e7cf4d521bd02770c22e
{ "func_code_index": [ 230, 305 ] }
147
EqualToken
EqualToken.sol
0x5824f275dab2c59b8972a1fda45ff404c9a703e3
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); /// @notic...
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.18+commit.9cf6e910
bzzr://03157a881cbeb271c2ac473f7a83ac498e77628ebad3e7cf4d521bd02770c22e
{ "func_code_index": [ 540, 615 ] }
148
EqualToken
EqualToken.sol
0x5824f275dab2c59b8972a1fda45ff404c9a703e3
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); /// @notic...
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.18+commit.9cf6e910
bzzr://03157a881cbeb271c2ac473f7a83ac498e77628ebad3e7cf4d521bd02770c22e
{ "func_code_index": [ 938, 1032 ] }
149
EqualToken
EqualToken.sol
0x5824f275dab2c59b8972a1fda45ff404c9a703e3
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); /// @notic...
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.18+commit.9cf6e910
bzzr://03157a881cbeb271c2ac473f7a83ac498e77628ebad3e7cf4d521bd02770c22e
{ "func_code_index": [ 1320, 1399 ] }
150
EqualToken
EqualToken.sol
0x5824f275dab2c59b8972a1fda45ff404c9a703e3
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); /// @notic...
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.18+commit.9cf6e910
bzzr://03157a881cbeb271c2ac473f7a83ac498e77628ebad3e7cf4d521bd02770c22e
{ "func_code_index": [ 1607, 1702 ] }
151
EqualToken
EqualToken.sol
0x5824f275dab2c59b8972a1fda45ff404c9a703e3
Solidity
EqualToken
contract EqualToken is StandardToken { function () { //if ether is sent to this address, send it back. revert(); } /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to c...
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 s...
/* Approves and then calls the receiving contract */
Comment
v0.4.18+commit.9cf6e910
bzzr://03157a881cbeb271c2ac473f7a83ac498e77628ebad3e7cf4d521bd02770c22e
{ "func_code_index": [ 2384, 3192 ] }
152
Crowdsale
Crowdsale.sol
0xedb2675b05d3c89cd2800b8f23567bb77a990fe4
Solidity
Crowdsale
contract Crowdsale { using SafeMath for uint256; // uint256 durationInMinutes; // address where funds are collected address public wallet; // token address address public addressOfTokenUsedAsReward; uint256 public price = 300; uint256 public minBuy; uint256 public maxBuy; token token...
function () payable { buyTokens(msg.sender); }
// fallback function can be used to buy tokens
LineComment
v0.4.19+commit.c4cbbb05
bzzr://39bf429bbea86824880515a5e65f781c2fae30581bdaf87b476b674f8148c2fd
{ "func_code_index": [ 2223, 2280 ] }
153
Crowdsale
Crowdsale.sol
0xedb2675b05d3c89cd2800b8f23567bb77a990fe4
Solidity
Crowdsale
contract Crowdsale { using SafeMath for uint256; // uint256 durationInMinutes; // address where funds are collected address public wallet; // token address address public addressOfTokenUsedAsReward; uint256 public price = 300; uint256 public minBuy; uint256 public maxBuy; token token...
buyTokens
function buyTokens(address beneficiary) payable { require(beneficiary != 0x0); require(validPurchase()); uint256 weiAmount = msg.value; // calculate token amount to be sent uint256 tokens = (weiAmount) * price;//weiamount * price if(minBuy!=0){ if(tokens < minBuy*10**18) throw; } i...
// low level token purchase function
LineComment
v0.4.19+commit.c4cbbb05
bzzr://39bf429bbea86824880515a5e65f781c2fae30581bdaf87b476b674f8148c2fd
{ "func_code_index": [ 2323, 3085 ] }
154
Crowdsale
Crowdsale.sol
0xedb2675b05d3c89cd2800b8f23567bb77a990fe4
Solidity
Crowdsale
contract Crowdsale { using SafeMath for uint256; // uint256 durationInMinutes; // address where funds are collected address public wallet; // token address address public addressOfTokenUsedAsReward; uint256 public price = 300; uint256 public minBuy; uint256 public maxBuy; token token...
forwardFunds
function forwardFunds() internal { // wallet.transfer(msg.value); if (!wallet.send(msg.value)) { throw; } }
// send ether to the fund collection wallet // override to create custom fund forwarding mechanisms
LineComment
v0.4.19+commit.c4cbbb05
bzzr://39bf429bbea86824880515a5e65f781c2fae30581bdaf87b476b674f8148c2fd
{ "func_code_index": [ 3194, 3329 ] }
155
Crowdsale
Crowdsale.sol
0xedb2675b05d3c89cd2800b8f23567bb77a990fe4
Solidity
Crowdsale
contract Crowdsale { using SafeMath for uint256; // uint256 durationInMinutes; // address where funds are collected address public wallet; // token address address public addressOfTokenUsedAsReward; uint256 public price = 300; uint256 public minBuy; uint256 public maxBuy; token token...
validPurchase
function validPurchase() internal constant returns (bool) { bool withinPeriod = started&&(now>=startTime); bool nonZeroPurchase = msg.value != 0; return withinPeriod && nonZeroPurchase; }
// @return true if the transaction can buy tokens
LineComment
v0.4.19+commit.c4cbbb05
bzzr://39bf429bbea86824880515a5e65f781c2fae30581bdaf87b476b674f8148c2fd
{ "func_code_index": [ 3385, 3593 ] }
156
CFolioFarm
contracts/src/investment/CFolioFarm.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
CFolioFarm
contract CFolioFarm is IFarm, ICFolioFarm, Ownable, ERC20Recovery { using SafeMath for uint256; using SafeERC20 for IERC20; ////////////////////////////////////////////////////////////////////////////// // State ////////////////////////////////////////////////////////////////////////////// uint256 public ...
/** * @notice Farm is owned by a CFolio contract. * * All state modifing calls are only allowed from this owner. */
NatSpecMultiLine
farmName
function farmName() external view override returns (string memory) { return _farmName; }
//////////////////////////////////////////////////////////////////////////////
NatSpecSingleLine
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 2914, 3010 ] }
157
CFolioFarm
contracts/src/investment/CFolioFarm.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
CFolioFarm
contract CFolioFarm is IFarm, ICFolioFarm, Ownable, ERC20Recovery { using SafeMath for uint256; using SafeERC20 for IERC20; ////////////////////////////////////////////////////////////////////////////// // State ////////////////////////////////////////////////////////////////////////////// uint256 public ...
/** * @notice Farm is owned by a CFolio contract. * * All state modifing calls are only allowed from this owner. */
NatSpecMultiLine
addAssets
function addAssets(address account, uint256 amount) external override onlyOwner { // Validate parameters require(amount > 0, 'CFolioFarm: Cannot add 0'); // Update state _balances[account] = _balances[account].add(amount); // Dispatch event emit AssetAdded(account, amount, _balances[account]); }
//////////////////////////////////////////////////////////////////////////////
NatSpecSingleLine
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 4592, 4932 ] }
158
CFolioFarm
contracts/src/investment/CFolioFarm.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
CFolioFarm
contract CFolioFarm is IFarm, ICFolioFarm, Ownable, ERC20Recovery { using SafeMath for uint256; using SafeERC20 for IERC20; ////////////////////////////////////////////////////////////////////////////// // State ////////////////////////////////////////////////////////////////////////////// uint256 public ...
/** * @notice Farm is owned by a CFolio contract. * * All state modifing calls are only allowed from this owner. */
NatSpecMultiLine
setController
function setController(address newController) external override onlyController { // Update state controller = IController(newController); // Dispatch event emit ControllerChanged(newController); }
//////////////////////////////////////////////////////////////////////////////
NatSpecSingleLine
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 7075, 7306 ] }
159
CFolioFarm
contracts/src/investment/CFolioFarm.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
CFolioFarm
contract CFolioFarm is IFarm, ICFolioFarm, Ownable, ERC20Recovery { using SafeMath for uint256; using SafeERC20 for IERC20; ////////////////////////////////////////////////////////////////////////////// // State ////////////////////////////////////////////////////////////////////////////// uint256 public ...
/** * @notice Farm is owned by a CFolio contract. * * All state modifing calls are only allowed from this owner. */
NatSpecMultiLine
rebalance
function rebalance() external override onlyController {}
// solhint-disable-next-line no-empty-blocks
LineComment
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 8775, 8833 ] }
160
CFolioFarm
contracts/src/investment/CFolioFarm.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
CFolioFarm
contract CFolioFarm is IFarm, ICFolioFarm, Ownable, ERC20Recovery { using SafeMath for uint256; using SafeERC20 for IERC20; ////////////////////////////////////////////////////////////////////////////// // State ////////////////////////////////////////////////////////////////////////////// uint256 public ...
/** * @notice Farm is owned by a CFolio contract. * * All state modifing calls are only allowed from this owner. */
NatSpecMultiLine
recoverERC20
function recoverERC20( address recipient, address tokenAddress, uint256 tokenAmount ) external onlyController { // Call ancestor _recoverERC20(recipient, tokenAddress, tokenAmount); }
/** * @dev Added to support recovering LP Rewards from other systems to be * distributed to holders */
NatSpecMultiLine
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 8949, 9158 ] }
161
DANACHO
DANACHO.sol
0x9256d3de679c96327dd0fca0b64f4b9de3ab95c5
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { owner = msg.sender; } ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://b221d5a22ac6a46fa17293a69741cdf97babc1be9193bf47c942fbc806506981
{ "func_code_index": [ 642, 823 ] }
162
DANACHO
DANACHO.sol
0x9256d3de679c96327dd0fca0b64f4b9de3ab95c5
Solidity
StandardToken
contract StandardToken is ERC20Basic, Ownable { uint256 public totalSupply; 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. ...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public override returns (bool trans1) { 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]....
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://b221d5a22ac6a46fa17293a69741cdf97babc1be9193bf47c942fbc806506981
{ "func_code_index": [ 324, 737 ] }
163
DANACHO
DANACHO.sol
0x9256d3de679c96327dd0fca0b64f4b9de3ab95c5
Solidity
StandardToken
contract StandardToken is ERC20Basic, Ownable { uint256 public totalSupply; 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. ...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view override returns (uint256 balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://b221d5a22ac6a46fa17293a69741cdf97babc1be9193bf47c942fbc806506981
{ "func_code_index": [ 870, 991 ] }
164
DANACHO
DANACHO.sol
0x9256d3de679c96327dd0fca0b64f4b9de3ab95c5
Solidity
StandardToken
contract StandardToken is ERC20Basic, Ownable { uint256 public totalSupply; 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. ...
/** * @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 override returns (bool trans) { 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 cond...
/** * @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.6.12+commit.27d51765
None
ipfs://b221d5a22ac6a46fa17293a69741cdf97babc1be9193bf47c942fbc806506981
{ "func_code_index": [ 1339, 1949 ] }
165
DANACHO
DANACHO.sol
0x9256d3de679c96327dd0fca0b64f4b9de3ab95c5
Solidity
StandardToken
contract StandardToken is ERC20Basic, Ownable { uint256 public totalSupply; 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. ...
/** * @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 override returns (bool hello) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://b221d5a22ac6a46fa17293a69741cdf97babc1be9193bf47c942fbc806506981
{ "func_code_index": [ 2581, 2791 ] }
166
DANACHO
DANACHO.sol
0x9256d3de679c96327dd0fca0b64f4b9de3ab95c5
Solidity
StandardToken
contract StandardToken is ERC20Basic, Ownable { uint256 public totalSupply; 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. ...
/** * @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 override 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. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://b221d5a22ac6a46fa17293a69741cdf97babc1be9193bf47c942fbc806506981
{ "func_code_index": [ 3031, 3182 ] }
167
DANACHO
DANACHO.sol
0x9256d3de679c96327dd0fca0b64f4b9de3ab95c5
Solidity
StandardToken
contract StandardToken is ERC20Basic, Ownable { uint256 public totalSupply; 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. ...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
increaseApproval
function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://b221d5a22ac6a46fa17293a69741cdf97babc1be9193bf47c942fbc806506981
{ "func_code_index": [ 3427, 3705 ] }
168
DANACHO
DANACHO.sol
0x9256d3de679c96327dd0fca0b64f4b9de3ab95c5
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.6.12+commit.27d51765
None
ipfs://b221d5a22ac6a46fa17293a69741cdf97babc1be9193bf47c942fbc806506981
{ "func_code_index": [ 225, 770 ] }
169
DelegateApprovals
DelegateApprovals.sol
0x15fd6e554874b9e70f832ed37f231ac5e142362f
Solidity
Owned
contract Owned { address public owner; address public nominatedOwner; /** * @dev Owned Constructor */ constructor(address _owner) public { require(_owner != address(0), "Owner address cannot be 0"); owner = _owner; emit OwnerChanged(address(0), _owner); } /** ...
// https://docs.synthetix.io/contracts/Owned
LineComment
nominateNewOwner
function nominateNewOwner(address _owner) external onlyOwner { nominatedOwner = _owner; emit OwnerNominated(_owner); }
/** * @notice Nominate a new owner of this contract. * @dev Only the current owner may nominate a new owner. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
{ "func_code_index": [ 443, 585 ] }
170
DelegateApprovals
DelegateApprovals.sol
0x15fd6e554874b9e70f832ed37f231ac5e142362f
Solidity
Owned
contract Owned { address public owner; address public nominatedOwner; /** * @dev Owned Constructor */ constructor(address _owner) public { require(_owner != address(0), "Owner address cannot be 0"); owner = _owner; emit OwnerChanged(address(0), _owner); } /** ...
// https://docs.synthetix.io/contracts/Owned
LineComment
acceptOwnership
function acceptOwnership() external { require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership"); emit OwnerChanged(owner, nominatedOwner); owner = nominatedOwner; nominatedOwner = address(0); }
/** * @notice Accept the nomination to be owner. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
{ "func_code_index": [ 653, 923 ] }
171
DelegateApprovals
DelegateApprovals.sol
0x15fd6e554874b9e70f832ed37f231ac5e142362f
Solidity
State
contract State is Owned { // the address of the contract that can modify variables // this can only be changed by the owner of this contract address public associatedContract; constructor(address _owner, address _associatedContract) public Owned(_owner) { associatedContract = _associatedContrac...
// https://docs.synthetix.io/contracts/State
LineComment
setAssociatedContract
function setAssociatedContract(address _associatedContract) external onlyOwner { associatedContract = _associatedContract; emit AssociatedContractUpdated(_associatedContract); }
// Change the associated contract to a new address
LineComment
v0.4.25+commit.59dbf8f1
{ "func_code_index": [ 487, 688 ] }
172
DelegateApprovals
DelegateApprovals.sol
0x15fd6e554874b9e70f832ed37f231ac5e142362f
Solidity
EternalStorage
contract EternalStorage is State { constructor(address _owner, address _associatedContract) public State(_owner, _associatedContract) {} /* ========== DATA TYPES ========== */ mapping(bytes32 => uint) UIntStorage; mapping(bytes32 => string) StringStorage; mapping(bytes32 => address) AddressStorage;...
// https://docs.synthetix.io/contracts/EternalStorage
LineComment
getUIntValue
function getUIntValue(bytes32 record) external view returns (uint) { return UIntStorage[record]; }
// UIntStorage;
LineComment
v0.4.25+commit.59dbf8f1
{ "func_code_index": [ 519, 633 ] }
173
DelegateApprovals
DelegateApprovals.sol
0x15fd6e554874b9e70f832ed37f231ac5e142362f
Solidity
EternalStorage
contract EternalStorage is State { constructor(address _owner, address _associatedContract) public State(_owner, _associatedContract) {} /* ========== DATA TYPES ========== */ mapping(bytes32 => uint) UIntStorage; mapping(bytes32 => string) StringStorage; mapping(bytes32 => address) AddressStorage;...
// https://docs.synthetix.io/contracts/EternalStorage
LineComment
getStringValue
function getStringValue(bytes32 record) external view returns (string memory) { return StringStorage[record]; }
// StringStorage
LineComment
v0.4.25+commit.59dbf8f1
{ "func_code_index": [ 910, 1037 ] }
174
DelegateApprovals
DelegateApprovals.sol
0x15fd6e554874b9e70f832ed37f231ac5e142362f
Solidity
EternalStorage
contract EternalStorage is State { constructor(address _owner, address _associatedContract) public State(_owner, _associatedContract) {} /* ========== DATA TYPES ========== */ mapping(bytes32 => uint) UIntStorage; mapping(bytes32 => string) StringStorage; mapping(bytes32 => address) AddressStorage;...
// https://docs.synthetix.io/contracts/EternalStorage
LineComment
getAddressValue
function getAddressValue(bytes32 record) external view returns (address) { return AddressStorage[record]; }
// AddressStorage
LineComment
v0.4.25+commit.59dbf8f1
{ "func_code_index": [ 1325, 1448 ] }
175
DelegateApprovals
DelegateApprovals.sol
0x15fd6e554874b9e70f832ed37f231ac5e142362f
Solidity
EternalStorage
contract EternalStorage is State { constructor(address _owner, address _associatedContract) public State(_owner, _associatedContract) {} /* ========== DATA TYPES ========== */ mapping(bytes32 => uint) UIntStorage; mapping(bytes32 => string) StringStorage; mapping(bytes32 => address) AddressStorage;...
// https://docs.synthetix.io/contracts/EternalStorage
LineComment
getBytesValue
function getBytesValue(bytes32 record) external view returns (bytes memory) { return BytesStorage[record]; }
// BytesStorage
LineComment
v0.4.25+commit.59dbf8f1
{ "func_code_index": [ 1739, 1863 ] }
176
DelegateApprovals
DelegateApprovals.sol
0x15fd6e554874b9e70f832ed37f231ac5e142362f
Solidity
EternalStorage
contract EternalStorage is State { constructor(address _owner, address _associatedContract) public State(_owner, _associatedContract) {} /* ========== DATA TYPES ========== */ mapping(bytes32 => uint) UIntStorage; mapping(bytes32 => string) StringStorage; mapping(bytes32 => address) AddressStorage;...
// https://docs.synthetix.io/contracts/EternalStorage
LineComment
getBytes32Value
function getBytes32Value(bytes32 record) external view returns (bytes32) { return Bytes32Storage[record]; }
// Bytes32Storage
LineComment
v0.4.25+commit.59dbf8f1
{ "func_code_index": [ 2146, 2269 ] }
177
DelegateApprovals
DelegateApprovals.sol
0x15fd6e554874b9e70f832ed37f231ac5e142362f
Solidity
EternalStorage
contract EternalStorage is State { constructor(address _owner, address _associatedContract) public State(_owner, _associatedContract) {} /* ========== DATA TYPES ========== */ mapping(bytes32 => uint) UIntStorage; mapping(bytes32 => string) StringStorage; mapping(bytes32 => address) AddressStorage;...
// https://docs.synthetix.io/contracts/EternalStorage
LineComment
getBooleanValue
function getBooleanValue(bytes32 record) external view returns (bool) { return BooleanStorage[record]; }
// BooleanStorage
LineComment
v0.4.25+commit.59dbf8f1
{ "func_code_index": [ 2562, 2682 ] }
178
DelegateApprovals
DelegateApprovals.sol
0x15fd6e554874b9e70f832ed37f231ac5e142362f
Solidity
EternalStorage
contract EternalStorage is State { constructor(address _owner, address _associatedContract) public State(_owner, _associatedContract) {} /* ========== DATA TYPES ========== */ mapping(bytes32 => uint) UIntStorage; mapping(bytes32 => string) StringStorage; mapping(bytes32 => address) AddressStorage;...
// https://docs.synthetix.io/contracts/EternalStorage
LineComment
getIntValue
function getIntValue(bytes32 record) external view returns (int) { return IntStorage[record]; }
// IntStorage
LineComment
v0.4.25+commit.59dbf8f1
{ "func_code_index": [ 2968, 3079 ] }
179
DelegateApprovals
DelegateApprovals.sol
0x15fd6e554874b9e70f832ed37f231ac5e142362f
Solidity
DelegateApprovals
contract DelegateApprovals is Owned { bytes32 public constant BURN_FOR_ADDRESS = "BurnForAddress"; bytes32 public constant ISSUE_FOR_ADDRESS = "IssueForAddress"; bytes32 public constant CLAIM_FOR_ADDRESS = "ClaimForAddress"; bytes32 public constant EXCHANGE_FOR_ADDRESS = "ExchangeForAddress"; bytes3...
// https://docs.synthetix.io/contracts/DelegateApprovals
LineComment
_getKey
function _getKey(bytes32 _action, address _authoriser, address _delegate) internal pure returns (bytes32) { return keccak256(abi.encodePacked(_action, _authoriser, _delegate)); }
// Move it to setter and associatedState // util to get key based on action name + address of authoriser + address for delegate
LineComment
v0.4.25+commit.59dbf8f1
{ "func_code_index": [ 1118, 1312 ] }
180
DelegateApprovals
DelegateApprovals.sol
0x15fd6e554874b9e70f832ed37f231ac5e142362f
Solidity
DelegateApprovals
contract DelegateApprovals is Owned { bytes32 public constant BURN_FOR_ADDRESS = "BurnForAddress"; bytes32 public constant ISSUE_FOR_ADDRESS = "IssueForAddress"; bytes32 public constant CLAIM_FOR_ADDRESS = "ClaimForAddress"; bytes32 public constant EXCHANGE_FOR_ADDRESS = "ExchangeForAddress"; bytes3...
// https://docs.synthetix.io/contracts/DelegateApprovals
LineComment
canBurnFor
function canBurnFor(address authoriser, address delegate) external view returns (bool) { return _checkApproval(BURN_FOR_ADDRESS, authoriser, delegate); }
// hash of actionName + address of authoriser + address for the delegate
LineComment
v0.4.25+commit.59dbf8f1
{ "func_code_index": [ 1391, 1560 ] }
181
DelegateApprovals
DelegateApprovals.sol
0x15fd6e554874b9e70f832ed37f231ac5e142362f
Solidity
DelegateApprovals
contract DelegateApprovals is Owned { bytes32 public constant BURN_FOR_ADDRESS = "BurnForAddress"; bytes32 public constant ISSUE_FOR_ADDRESS = "IssueForAddress"; bytes32 public constant CLAIM_FOR_ADDRESS = "ClaimForAddress"; bytes32 public constant EXCHANGE_FOR_ADDRESS = "ExchangeForAddress"; bytes3...
// https://docs.synthetix.io/contracts/DelegateApprovals
LineComment
_checkApproval
function _checkApproval(bytes32 action, address authoriser, address delegate) internal view returns (bool) { if (approvedAll(authoriser, delegate)) return true; return eternalStorage.getBooleanValue(_getKey(action, authoriser, delegate)); }
// internal function to check approval based on action // if approved for all actions then will return true // before checking specific approvals
LineComment
v0.4.25+commit.59dbf8f1
{ "func_code_index": [ 2435, 2700 ] }
182
DelegateApprovals
DelegateApprovals.sol
0x15fd6e554874b9e70f832ed37f231ac5e142362f
Solidity
DelegateApprovals
contract DelegateApprovals is Owned { bytes32 public constant BURN_FOR_ADDRESS = "BurnForAddress"; bytes32 public constant ISSUE_FOR_ADDRESS = "IssueForAddress"; bytes32 public constant CLAIM_FOR_ADDRESS = "ClaimForAddress"; bytes32 public constant EXCHANGE_FOR_ADDRESS = "ExchangeForAddress"; bytes3...
// https://docs.synthetix.io/contracts/DelegateApprovals
LineComment
approveAllDelegatePowers
function approveAllDelegatePowers(address delegate) external { _setApproval(APPROVE_ALL, msg.sender, delegate); }
// Approve All
LineComment
v0.4.25+commit.59dbf8f1
{ "func_code_index": [ 2762, 2891 ] }
183
DelegateApprovals
DelegateApprovals.sol
0x15fd6e554874b9e70f832ed37f231ac5e142362f
Solidity
DelegateApprovals
contract DelegateApprovals is Owned { bytes32 public constant BURN_FOR_ADDRESS = "BurnForAddress"; bytes32 public constant ISSUE_FOR_ADDRESS = "IssueForAddress"; bytes32 public constant CLAIM_FOR_ADDRESS = "ClaimForAddress"; bytes32 public constant EXCHANGE_FOR_ADDRESS = "ExchangeForAddress"; bytes3...
// https://docs.synthetix.io/contracts/DelegateApprovals
LineComment
removeAllDelegatePowers
function removeAllDelegatePowers(address delegate) external { for (uint i = 0; i < _delegatableFunctions.length; i++) { _withdrawApproval(_delegatableFunctions[i], msg.sender, delegate); } }
// Removes all delegate approvals
LineComment
v0.4.25+commit.59dbf8f1
{ "func_code_index": [ 2931, 3157 ] }
184
DelegateApprovals
DelegateApprovals.sol
0x15fd6e554874b9e70f832ed37f231ac5e142362f
Solidity
DelegateApprovals
contract DelegateApprovals is Owned { bytes32 public constant BURN_FOR_ADDRESS = "BurnForAddress"; bytes32 public constant ISSUE_FOR_ADDRESS = "IssueForAddress"; bytes32 public constant CLAIM_FOR_ADDRESS = "ClaimForAddress"; bytes32 public constant EXCHANGE_FOR_ADDRESS = "ExchangeForAddress"; bytes3...
// https://docs.synthetix.io/contracts/DelegateApprovals
LineComment
approveBurnOnBehalf
function approveBurnOnBehalf(address delegate) external { _setApproval(BURN_FOR_ADDRESS, msg.sender, delegate); }
// Burn on behalf
LineComment
v0.4.25+commit.59dbf8f1
{ "func_code_index": [ 3181, 3310 ] }
185
DelegateApprovals
DelegateApprovals.sol
0x15fd6e554874b9e70f832ed37f231ac5e142362f
Solidity
DelegateApprovals
contract DelegateApprovals is Owned { bytes32 public constant BURN_FOR_ADDRESS = "BurnForAddress"; bytes32 public constant ISSUE_FOR_ADDRESS = "IssueForAddress"; bytes32 public constant CLAIM_FOR_ADDRESS = "ClaimForAddress"; bytes32 public constant EXCHANGE_FOR_ADDRESS = "ExchangeForAddress"; bytes3...
// https://docs.synthetix.io/contracts/DelegateApprovals
LineComment
approveIssueOnBehalf
function approveIssueOnBehalf(address delegate) external { _setApproval(ISSUE_FOR_ADDRESS, msg.sender, delegate); }
// Issue on behalf
LineComment
v0.4.25+commit.59dbf8f1
{ "func_code_index": [ 3470, 3601 ] }
186
DelegateApprovals
DelegateApprovals.sol
0x15fd6e554874b9e70f832ed37f231ac5e142362f
Solidity
DelegateApprovals
contract DelegateApprovals is Owned { bytes32 public constant BURN_FOR_ADDRESS = "BurnForAddress"; bytes32 public constant ISSUE_FOR_ADDRESS = "IssueForAddress"; bytes32 public constant CLAIM_FOR_ADDRESS = "ClaimForAddress"; bytes32 public constant EXCHANGE_FOR_ADDRESS = "ExchangeForAddress"; bytes3...
// https://docs.synthetix.io/contracts/DelegateApprovals
LineComment
approveClaimOnBehalf
function approveClaimOnBehalf(address delegate) external { _setApproval(CLAIM_FOR_ADDRESS, msg.sender, delegate); }
// Claim on behalf
LineComment
v0.4.25+commit.59dbf8f1
{ "func_code_index": [ 3763, 3894 ] }
187
DelegateApprovals
DelegateApprovals.sol
0x15fd6e554874b9e70f832ed37f231ac5e142362f
Solidity
DelegateApprovals
contract DelegateApprovals is Owned { bytes32 public constant BURN_FOR_ADDRESS = "BurnForAddress"; bytes32 public constant ISSUE_FOR_ADDRESS = "IssueForAddress"; bytes32 public constant CLAIM_FOR_ADDRESS = "ClaimForAddress"; bytes32 public constant EXCHANGE_FOR_ADDRESS = "ExchangeForAddress"; bytes3...
// https://docs.synthetix.io/contracts/DelegateApprovals
LineComment
approveExchangeOnBehalf
function approveExchangeOnBehalf(address delegate) external { _setApproval(EXCHANGE_FOR_ADDRESS, msg.sender, delegate); }
// Exchange on behalf
LineComment
v0.4.25+commit.59dbf8f1
{ "func_code_index": [ 4059, 4196 ] }
188
BlackSnail
BlackSnail.sol
0xfe17e67e1b2a69c24a4643442185ec821be0643a
Solidity
Owned
contract Owned { /* Адрес владельца контракта*/ address owner; /* Конструктор контракта, вызывается при первом запуске */ function Owned() { owner = msg.sender; } /* Изменить владельца контракта, newOwner - адрес нового владельца */ function changeOwner(address newOwner...
/* Родительский контракт */
Comment
Owned
function Owned() { owner = msg.sender; }
/* Конструктор контракта, вызывается при первом запуске */
Comment
v0.4.13+commit.fb4cb1a
bzzr://a6ea5b206aa0c5d0c21fe7b31ef1d139aa70f0c650be1bbb25ce22ccd163880f
{ "func_code_index": [ 142, 201 ] }
189
BlackSnail
BlackSnail.sol
0xfe17e67e1b2a69c24a4643442185ec821be0643a
Solidity
Owned
contract Owned { /* Адрес владельца контракта*/ address owner; /* Конструктор контракта, вызывается при первом запуске */ function Owned() { owner = msg.sender; } /* Изменить владельца контракта, newOwner - адрес нового владельца */ function changeOwner(address newOwner...
/* Родительский контракт */
Comment
changeOwner
function changeOwner(address newOwner) onlyowner { owner = newOwner; }
/* Изменить владельца контракта, newOwner - адрес нового владельца */
Comment
v0.4.13+commit.fb4cb1a
bzzr://a6ea5b206aa0c5d0c21fe7b31ef1d139aa70f0c650be1bbb25ce22ccd163880f
{ "func_code_index": [ 279, 368 ] }
190
BlackSnail
BlackSnail.sol
0xfe17e67e1b2a69c24a4643442185ec821be0643a
Solidity
Owned
contract Owned { /* Адрес владельца контракта*/ address owner; /* Конструктор контракта, вызывается при первом запуске */ function Owned() { owner = msg.sender; } /* Изменить владельца контракта, newOwner - адрес нового владельца */ function changeOwner(address newOwner...
/* Родительский контракт */
Comment
kill
function kill() onlyowner { if (msg.sender == owner) suicide(owner); }
/* Удалить контракт */
Comment
v0.4.13+commit.fb4cb1a
bzzr://a6ea5b206aa0c5d0c21fe7b31ef1d139aa70f0c650be1bbb25ce22ccd163880f
{ "func_code_index": [ 550, 639 ] }
191
BlackSnail
BlackSnail.sol
0xfe17e67e1b2a69c24a4643442185ec821be0643a
Solidity
Token
contract Token is Owned { /// Общее кол-во токенов uint256 public totalSupply; /// @param _owner адрес, с которого будет получен баланс /// @return Баланс function balanceOf(address _owner) constant returns (uint256 balance); /// @notice Отправить кол-во `_value` токенов на адрес `_t...
// Абстрактный контракт для токена стандарта ERC 20 // https://github.com/ethereum/EIPs/issues/20
LineComment
balanceOf
function balanceOf(address _owner) constant returns (uint256 balance);
/// @param _owner адрес, с которого будет получен баланс /// @return Баланс
NatSpecSingleLine
v0.4.13+commit.fb4cb1a
bzzr://a6ea5b206aa0c5d0c21fe7b31ef1d139aa70f0c650be1bbb25ce22ccd163880f
{ "func_code_index": [ 180, 255 ] }
192
BlackSnail
BlackSnail.sol
0xfe17e67e1b2a69c24a4643442185ec821be0643a
Solidity
Token
contract Token is Owned { /// Общее кол-во токенов uint256 public totalSupply; /// @param _owner адрес, с которого будет получен баланс /// @return Баланс function balanceOf(address _owner) constant returns (uint256 balance); /// @notice Отправить кол-во `_value` токенов на адрес `_t...
// Абстрактный контракт для токена стандарта ERC 20 // https://github.com/ethereum/EIPs/issues/20
LineComment
transfer
function transfer(address _to, uint256 _value) returns (bool success);
/// @notice Отправить кол-во `_value` токенов на адрес `_to` с адреса `msg.sender` /// @param _to Адрес получателя /// @param _value Кол-во токенов для отправки /// @return Была ли отправка успешной или нет
NatSpecSingleLine
v0.4.13+commit.fb4cb1a
bzzr://a6ea5b206aa0c5d0c21fe7b31ef1d139aa70f0c650be1bbb25ce22ccd163880f
{ "func_code_index": [ 485, 560 ] }
193
BlackSnail
BlackSnail.sol
0xfe17e67e1b2a69c24a4643442185ec821be0643a
Solidity
Token
contract Token is Owned { /// Общее кол-во токенов uint256 public totalSupply; /// @param _owner адрес, с которого будет получен баланс /// @return Баланс function balanceOf(address _owner) constant returns (uint256 balance); /// @notice Отправить кол-во `_value` токенов на адрес `_t...
// Абстрактный контракт для токена стандарта ERC 20 // https://github.com/ethereum/EIPs/issues/20
LineComment
transferFrom
function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
/// @notice Отправить кол-во `_value` токенов на адрес `_to` с адреса `_from` при условии что это подтверждено отправителем `_from` /// @param _from Адрес отправителя /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or no...
NatSpecSingleLine
v0.4.13+commit.fb4cb1a
bzzr://a6ea5b206aa0c5d0c21fe7b31ef1d139aa70f0c650be1bbb25ce22ccd163880f
{ "func_code_index": [ 910, 1004 ] }
194
BlackSnail
BlackSnail.sol
0xfe17e67e1b2a69c24a4643442185ec821be0643a
Solidity
Token
contract Token is Owned { /// Общее кол-во токенов uint256 public totalSupply; /// @param _owner адрес, с которого будет получен баланс /// @return Баланс function balanceOf(address _owner) constant returns (uint256 balance); /// @notice Отправить кол-во `_value` токенов на адрес `_t...
// Абстрактный контракт для токена стандарта ERC 20 // https://github.com/ethereum/EIPs/issues/20
LineComment
approve
function approve(address _spender, uint256 _value) returns (bool success);
/// @notice Вызывающий функции `msg.sender` подтверждает что с адреса `_spender` спишется `_value` токенов /// @param _spender Адрес аккаунта, с которого возможно списать токены /// @param _value Кол-во токенов к подтверждению для отправки /// @return Было ли подтверждение успешным или нет
NatSpecSingleLine
v0.4.13+commit.fb4cb1a
bzzr://a6ea5b206aa0c5d0c21fe7b31ef1d139aa70f0c650be1bbb25ce22ccd163880f
{ "func_code_index": [ 1318, 1397 ] }
195
BlackSnail
BlackSnail.sol
0xfe17e67e1b2a69c24a4643442185ec821be0643a
Solidity
Token
contract Token is Owned { /// Общее кол-во токенов uint256 public totalSupply; /// @param _owner адрес, с которого будет получен баланс /// @return Баланс function balanceOf(address _owner) constant returns (uint256 balance); /// @notice Отправить кол-во `_value` токенов на адрес `_t...
// Абстрактный контракт для токена стандарта ERC 20 // https://github.com/ethereum/EIPs/issues/20
LineComment
allowance
function allowance(address _owner, address _spender) constant returns (uint256 remaining);
/// @param _owner Адрес аккаунта владеющего токенами /// @param _spender Адрес аккаунта, с которого возможно списать токены /// @return Кол-во оставшихся токенов разрешённых для отправки
NatSpecSingleLine
v0.4.13+commit.fb4cb1a
bzzr://a6ea5b206aa0c5d0c21fe7b31ef1d139aa70f0c650be1bbb25ce22ccd163880f
{ "func_code_index": [ 1602, 1697 ] }
196
BlackSnail
BlackSnail.sol
0xfe17e67e1b2a69c24a4643442185ec821be0643a
Solidity
BlackSnail
contract BlackSnail is ERC20Token { function () { // Если кто то пытается отправить эфир на адрес контракта, то будет вызвана ошибка. throw; } /* Публичные переменные токена */ string public name; // Название uint8 public decimals; // Ско...
/* Основной контракт токена, наследует ERC20Token */
Comment
BlackSnail
function BlackSnail( uint256 _initialAmount, string _tokenName, uint8 _decimalUnits, string _tokenSymbol) { balances[msg.sender] = _initialAmount; // Передача создателю всех выпущенных монет totalSupply = _initialAmount; name = _tokenName; decimals = _decimalUni...
// Версия
LineComment
v0.4.13+commit.fb4cb1a
bzzr://a6ea5b206aa0c5d0c21fe7b31ef1d139aa70f0c650be1bbb25ce22ccd163880f
{ "func_code_index": [ 478, 881 ] }
197
EasyAuction
contracts/EasyAuction.sol
0x0b7ffc1f4ad541a4ed16b40d8c37f0929158d101
Solidity
EasyAuction
contract EasyAuction is Ownable { using SafeERC20 for IERC20; using SafeMath for uint64; using SafeMath for uint96; using SafeMath for uint256; using SafeCast for uint256; using IterableOrderedOrderSet for IterableOrderedOrderSet.Data; using IterableOrderedOrderSet for bytes32; using IdT...
initiateAuction
function initiateAuction( IERC20 _auctioningToken, IERC20 _biddingToken, uint256 orderCancellationEndDate, uint256 auctionEndDate, uint96 _auctionedSellAmount, uint96 _minBuyAmount, uint256 minimumBiddingAmountPerOrder, uint256 minFundingThreshold, bool isAtomicClosureAllowed, ad...
// @dev: function to intiate a new auction // Warning: In case the auction is expected to raise more than // 2^96 units of the biddingToken, don't start the auction, as // it will not be settlable. This corresponds to about 79 // billion DAI. // // Prices between biddingToken and auctioningToken are expressed by a // f...
LineComment
v0.6.12+commit.27d51765
None
{ "func_code_index": [ 4641, 7290 ] }
198
EasyAuction
contracts/EasyAuction.sol
0x0b7ffc1f4ad541a4ed16b40d8c37f0929158d101
Solidity
EasyAuction
contract EasyAuction is Ownable { using SafeERC20 for IERC20; using SafeMath for uint64; using SafeMath for uint96; using SafeMath for uint256; using SafeCast for uint256; using IterableOrderedOrderSet for IterableOrderedOrderSet.Data; using IterableOrderedOrderSet for bytes32; using IdT...
settleAuction
function settleAuction(uint256 auctionId) public atStageSolutionSubmission(auctionId) returns (bytes32 clearingOrder) { ( uint64 auctioneerId, uint96 minAuctionedBuyAmount, uint96 fullAuctionedAmount ) = auctionData[auctionId].initialAuctionOrder.decodeOrder(); uint256 c...
// @dev function settling the auction and calculating the price
LineComment
v0.6.12+commit.27d51765
None
{ "func_code_index": [ 15242, 20072 ] }
199
HogeNFTv3
HogeNFTv3.sol
0xae58a033b6d7e66014fe88227c97680cc6ccecd9
Solidity
EnumerableMap
library EnumerableMap { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Map type with // bytes32 keys and values. // The Map implementation uses private functions, and user-facing // implementations (such as Uint25...
_set
function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) { // We read and store the key's index to prevent multiple reads from the same storage slot uint256 keyIndex = map._indexes[key]; if (keyIndex == 0) { // Equivalent to !contains(map, key) map._entries.push(MapEnt...
/** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://c9934b71fc610797d2cdb07781f8b745bc463b58cb1b7325cc49abe91d425949
{ "func_code_index": [ 1091, 1788 ] }
200
HogeNFTv3
HogeNFTv3.sol
0xae58a033b6d7e66014fe88227c97680cc6ccecd9
Solidity
EnumerableMap
library EnumerableMap { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Map type with // bytes32 keys and values. // The Map implementation uses private functions, and user-facing // implementations (such as Uint25...
_remove
function _remove(Map storage map, bytes32 key) private returns (bool) { // We read and store the key's index to prevent multiple reads from the same storage slot uint256 keyIndex = map._indexes[key]; if (keyIndex != 0) { // Equivalent to contains(map, key) // To delete a key-value pair from th...
/** * @dev Removes a key-value pair from a map. O(1). * * Returns true if the key was removed from the map, that is if it was present. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://c9934b71fc610797d2cdb07781f8b745bc463b58cb1b7325cc49abe91d425949
{ "func_code_index": [ 1958, 3512 ] }
201
HogeNFTv3
HogeNFTv3.sol
0xae58a033b6d7e66014fe88227c97680cc6ccecd9
Solidity
EnumerableMap
library EnumerableMap { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Map type with // bytes32 keys and values. // The Map implementation uses private functions, and user-facing // implementations (such as Uint25...
_contains
function _contains(Map storage map, bytes32 key) private view returns (bool) { return map._indexes[key] != 0; }
/** * @dev Returns true if the key is in the map. O(1). */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://c9934b71fc610797d2cdb07781f8b745bc463b58cb1b7325cc49abe91d425949
{ "func_code_index": [ 3591, 3721 ] }
202
HogeNFTv3
HogeNFTv3.sol
0xae58a033b6d7e66014fe88227c97680cc6ccecd9
Solidity
EnumerableMap
library EnumerableMap { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Map type with // bytes32 keys and values. // The Map implementation uses private functions, and user-facing // implementations (such as Uint25...
_length
function _length(Map storage map) private view returns (uint256) { return map._entries.length; }
/** * @dev Returns the number of key-value pairs in the map. O(1). */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://c9934b71fc610797d2cdb07781f8b745bc463b58cb1b7325cc49abe91d425949
{ "func_code_index": [ 3811, 3926 ] }
203
HogeNFTv3
HogeNFTv3.sol
0xae58a033b6d7e66014fe88227c97680cc6ccecd9
Solidity
EnumerableMap
library EnumerableMap { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Map type with // bytes32 keys and values. // The Map implementation uses private functions, and user-facing // implementations (such as Uint25...
_at
function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) { require(map._entries.length > index, "EnumerableMap: index out of bounds"); MapEntry storage entry = map._entries[index]; return (entry._key, entry._value); }
/** * @dev Returns the key-value pair stored at position `index` in the map. O(1). * * Note that there are no guarantees on the ordering of entries inside the * array, and it may change when more entries are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://c9934b71fc610797d2cdb07781f8b745bc463b58cb1b7325cc49abe91d425949
{ "func_code_index": [ 4286, 4570 ] }
204
HogeNFTv3
HogeNFTv3.sol
0xae58a033b6d7e66014fe88227c97680cc6ccecd9
Solidity
EnumerableMap
library EnumerableMap { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Map type with // bytes32 keys and values. // The Map implementation uses private functions, and user-facing // implementations (such as Uint25...
_tryGet
function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) { uint256 keyIndex = map._indexes[key]; if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key) return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based }
/** * @dev Tries to returns the value associated with `key`. O(1). * Does not revert if `key` is not in the map. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://c9934b71fc610797d2cdb07781f8b745bc463b58cb1b7325cc49abe91d425949
{ "func_code_index": [ 4713, 5026 ] }
205
HogeNFTv3
HogeNFTv3.sol
0xae58a033b6d7e66014fe88227c97680cc6ccecd9
Solidity
EnumerableMap
library EnumerableMap { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Map type with // bytes32 keys and values. // The Map implementation uses private functions, and user-facing // implementations (such as Uint25...
_get
function _get(Map storage map, bytes32 key) private view returns (bytes32) { uint256 keyIndex = map._indexes[key]; require(keyIndex != 0, "EnumerableMap: nonexistent key"); // Equivalent to contains(map, key) return map._entries[keyIndex - 1]._value; // All indexes are 1-based }
/** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://c9934b71fc610797d2cdb07781f8b745bc463b58cb1b7325cc49abe91d425949
{ "func_code_index": [ 5182, 5498 ] }
206