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
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 94, 154 ] }
9,007
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 237, 310 ] }
9,008
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 534, 616 ] }
9,009
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 895, 983 ] }
9,010
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 1647, 1726 ] }
9,011
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 2039, 2141 ] }
9,012
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
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.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 259, 445 ] }
9,013
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
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.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 723, 864 ] }
9,014
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
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.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 1162, 1359 ] }
9,015
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
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.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 1613, 2089 ] }
9,016
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
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.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 2560, 2697 ] }
9,017
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
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.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 3188, 3471 ] }
9,018
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
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.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 3931, 4066 ] }
9,019
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
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.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 4546, 4717 ] }
9,020
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
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.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 606, 1230 ] }
9,021
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
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.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 2160, 2562 ] }
9,022
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
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.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 3318, 3496 ] }
9,023
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
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.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 3721, 3922 ] }
9,024
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
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.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 4292, 4523 ] }
9,025
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
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.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 4774, 5095 ] }
9,026
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
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.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 566, 650 ] }
9,027
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
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.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 1209, 1362 ] }
9,028
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
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.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 1512, 1761 ] }
9,029
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
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 = now + time; emit OwnershipTransferred(_owner, address(0)); }
//Locks the contract for owner for the amount of time provided
LineComment
v0.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 1929, 2148 ] }
9,030
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
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(now > _lockTime , "Contract is locked until 7 days"); emit OwnershipTransferred(_owner, _previousOwner); _owner = _previousOwner; }
//Unlocks the contract for owner when _lockTime is exceeds
LineComment
v0.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 2219, 2517 ] }
9,031
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
Solidity
AYF
contract AYF 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 => bool)...
_tokenTransfer
function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private { if(!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded...
// function withdrawTokens() public onlyOwner { // uint256 amount = balanceOf(address(this)); // require(amount > 0, "Not enough tokens available to withdraw"); // _tokenTransfer(address(this),owner(),amount,false); // } // function withdrawWETH() public onlyOwner { // IUniswapV2Pair token = IUniswapV2P...
LineComment
v0.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 13523, 14362 ] }
9,032
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
Solidity
AYF
contract AYF 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 => bool)...
setSwapAndLiquifyEnabled
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner { swapAndLiquifyEnabled = _enabled; emit SwapAndLiquifyEnabledUpdated(_enabled); }
// function setMinTokensBeforeSwapPercent(uint256 _minTokensBeforeSwapPercent, uint256 _minTokensBeforeSwapDecimal) public onlyOwner{ // minTokensBeforeSwap = _tTotal.mul(_minTokensBeforeSwapPercent).div( // 10**(uint256(_minTokensBeforeSwapDecimal) + 2) // ); // emit MinTokensBeforeSwapUpdated(minT...
LineComment
v0.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 23019, 23195 ] }
9,033
AYF
AYF.sol
0x86f9e03caaddb0ae62f80e7f1ea7952d1631d8c9
Solidity
AYF
contract AYF 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 => bool)...
//to recieve ETH from uniswapV2Router when swaping
LineComment
v0.6.12+commit.27d51765
None
ipfs://c99a9d715648f9ab8cd795080e2f01b0695f1b1f74f8f2b1ae8dc19c243bddf9
{ "func_code_index": [ 23259, 23293 ] }
9,034
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721Receiver
contract ERC721Receiver { /** * @dev Magic value to be returned upon successful reception of an NFT * Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`, * which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` */ bytes4 internal constant ERC721...
// produced by the Solididy File Flattener (c) David Appleton 2018 // contact : dave@akomba.com // released under Apache 2.0 licence // input /home/phillip/Projects/cryptocare/contracts/contracts/CryptoCareToken.sol // flattened : Tuesday, 23-Oct-18 14:45:17 UTC
LineComment
onERC721Received
function onERC721Received( address _operator, address _from, uint256 _tokenId, bytes _data ) public returns(bytes4);
/** * @notice Handle the receipt of an NFT * @dev The ERC721 smart contract calls this function on the recipient * after a `safetransfer`. This function MAY throw to revert and reject the * transfer. Return of other than the magic value MUST result in the * transaction being reverted. * Note: the contract ...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 1079, 1231 ] }
9,035
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
AddressUtils
library AddressUtils { /** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param addr address to check * @return whether the ...
isContract
function isContract(address addr) internal view returns (bool) { uint256 size; // XXX Currently there is no better way to check if there is a contract in an address // than to check the size of the code at that address. // See https://ethereum.stackexchange.com/a/14016/36603 // for more details about how...
/** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param addr address to check * @return whether the target address is a contract */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 357, 947 ] }
9,036
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
renounceOwnership
function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); }
/** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 815, 932 ] }
9,037
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
transferOwnership
function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_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.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 1097, 1205 ] }
9,038
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
_transferOwnership
function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; }
/** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 1343, 1521 ] }
9,039
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
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. // See: https://githu...
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; } c = a...
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 89, 476 ] }
9,040
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
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. // See: https://githu...
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://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 560, 840 ] }
9,041
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
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. // See: https://githu...
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://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 954, 1070 ] }
9,042
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
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. // See: https://githu...
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://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 1134, 1264 ] }
9,043
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC165
interface ERC165 { /** * @notice Query if a contract implements an interface * @param _interfaceId The interface identifier, as specified in ERC-165 * @dev Interface identification is specified in ERC-165. This function * uses less than 30,000 gas. */ function supportsInterface(bytes4 _inter...
supportsInterface
function supportsInterface(bytes4 _interfaceId) external view returns (bool);
/** * @notice Query if a contract implements an interface * @param _interfaceId The interface identifier, as specified in ERC-165 * @dev Interface identification is specified in ERC-165. This function * uses less than 30,000 gas. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 278, 373 ] }
9,044
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function ...
pause
function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); }
/** * @dev called by the owner to pause, triggers stopped state */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 513, 609 ] }
9,045
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function ...
unpause
function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); }
/** * @dev called by the owner to unpause, returns to normal state */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 693, 791 ] }
9,046
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
SupportsInterfaceWithLookup
contract SupportsInterfaceWithLookup is ERC165 { bytes4 public constant InterfaceId_ERC165 = 0x01ffc9a7; /** * 0x01ffc9a7 === * bytes4(keccak256('supportsInterface(bytes4)')) */ /** * @dev a mapping of interface id to whether or not it's supported */ mapping(bytes4 => bool) internal ...
supportsInterface
function supportsInterface(bytes4 _interfaceId) external view returns (bool) { return supportedInterfaces[_interfaceId]; }
/** * @dev implement supportsInterface(bytes4) using a lookup table */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 619, 770 ] }
9,047
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
SupportsInterfaceWithLookup
contract SupportsInterfaceWithLookup is ERC165 { bytes4 public constant InterfaceId_ERC165 = 0x01ffc9a7; /** * 0x01ffc9a7 === * bytes4(keccak256('supportsInterface(bytes4)')) */ /** * @dev a mapping of interface id to whether or not it's supported */ mapping(bytes4 => bool) internal ...
_registerInterface
function _registerInterface(bytes4 _interfaceId) internal { require(_interfaceId != 0xffffffff); supportedInterfaces[_interfaceId] = true; }
/** * @dev private method for registering an interface */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 842, 1006 ] }
9,048
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721BasicToken
contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { bytes4 private constant InterfaceId_ERC721 = 0x80ac58cd; /* * 0x80ac58cd === * bytes4(keccak256('balanceOf(address)')) ^ * bytes4(keccak256('ownerOf(uint256)')) ^ * bytes4(keccak256('approve(address,uint256)')) ^ *...
balanceOf
function balanceOf(address _owner) public view returns (uint256) { require(_owner != address(0)); return ownedTokensCount[_owner]; }
/** * @dev Gets the balance of the specified address * @param _owner address to query the balance of * @return uint256 representing the amount owned by the passed address */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 2558, 2706 ] }
9,049
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721BasicToken
contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { bytes4 private constant InterfaceId_ERC721 = 0x80ac58cd; /* * 0x80ac58cd === * bytes4(keccak256('balanceOf(address)')) ^ * bytes4(keccak256('ownerOf(uint256)')) ^ * bytes4(keccak256('approve(address,uint256)')) ^ *...
ownerOf
function ownerOf(uint256 _tokenId) public view returns (address) { address owner = tokenOwner[_tokenId]; require(owner != address(0)); return owner; }
/** * @dev Gets the owner of the specified token ID * @param _tokenId uint256 ID of the token to query the owner of * @return owner address currently marked as the owner of the given token ID */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 2923, 3094 ] }
9,050
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721BasicToken
contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { bytes4 private constant InterfaceId_ERC721 = 0x80ac58cd; /* * 0x80ac58cd === * bytes4(keccak256('balanceOf(address)')) ^ * bytes4(keccak256('ownerOf(uint256)')) ^ * bytes4(keccak256('approve(address,uint256)')) ^ *...
exists
function exists(uint256 _tokenId) public view returns (bool) { address owner = tokenOwner[_tokenId]; return owner != address(0); }
/** * @dev Returns whether the specified token exists * @param _tokenId uint256 ID of the token to query the existence of * @return whether the token exists */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 3276, 3422 ] }
9,051
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721BasicToken
contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { bytes4 private constant InterfaceId_ERC721 = 0x80ac58cd; /* * 0x80ac58cd === * bytes4(keccak256('balanceOf(address)')) ^ * bytes4(keccak256('ownerOf(uint256)')) ^ * bytes4(keccak256('approve(address,uint256)')) ^ *...
approve
function approve(address _to, uint256 _tokenId) public { address owner = ownerOf(_tokenId); require(_to != owner); require(msg.sender == owner || isApprovedForAll(owner, msg.sender)); tokenApprovals[_tokenId] = _to; emit Approval(owner, _to, _tokenId); }
/** * @dev Approves another address to transfer the given token ID * The zero address indicates there is no approved address. * There can only be one approved address per token at a given time. * Can only be called by the token owner or an approved operator. * @param _to address to be approved for the given t...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 3834, 4121 ] }
9,052
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721BasicToken
contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { bytes4 private constant InterfaceId_ERC721 = 0x80ac58cd; /* * 0x80ac58cd === * bytes4(keccak256('balanceOf(address)')) ^ * bytes4(keccak256('ownerOf(uint256)')) ^ * bytes4(keccak256('approve(address,uint256)')) ^ *...
getApproved
function getApproved(uint256 _tokenId) public view returns (address) { return tokenApprovals[_tokenId]; }
/** * @dev Gets the approved address for a token ID, or zero if no address set * @param _tokenId uint256 ID of the token to query the approval of * @return address currently approved for the given token ID */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 4352, 4468 ] }
9,053
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721BasicToken
contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { bytes4 private constant InterfaceId_ERC721 = 0x80ac58cd; /* * 0x80ac58cd === * bytes4(keccak256('balanceOf(address)')) ^ * bytes4(keccak256('ownerOf(uint256)')) ^ * bytes4(keccak256('approve(address,uint256)')) ^ *...
setApprovalForAll
function setApprovalForAll(address _to, bool _approved) public { require(_to != msg.sender); operatorApprovals[msg.sender][_to] = _approved; emit ApprovalForAll(msg.sender, _to, _approved); }
/** * @dev Sets or unsets the approval of a given operator * An operator is allowed to transfer all tokens of the sender on their behalf * @param _to operator address to set the approval * @param _approved representing the status of the approval to be set */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 4753, 4965 ] }
9,054
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721BasicToken
contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { bytes4 private constant InterfaceId_ERC721 = 0x80ac58cd; /* * 0x80ac58cd === * bytes4(keccak256('balanceOf(address)')) ^ * bytes4(keccak256('ownerOf(uint256)')) ^ * bytes4(keccak256('approve(address,uint256)')) ^ *...
isApprovedForAll
function isApprovedForAll( address _owner, address _operator ) public view returns (bool) { return operatorApprovals[_owner][_operator]; }
/** * @dev Tells whether an operator is approved by a given owner * @param _owner owner address which you want to query the approval of * @param _operator operator address which you want to query the approval of * @return bool whether the given operator is approved by the given owner */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 5279, 5459 ] }
9,055
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721BasicToken
contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { bytes4 private constant InterfaceId_ERC721 = 0x80ac58cd; /* * 0x80ac58cd === * bytes4(keccak256('balanceOf(address)')) ^ * bytes4(keccak256('ownerOf(uint256)')) ^ * bytes4(keccak256('approve(address,uint256)')) ^ *...
transferFrom
function transferFrom( address _from, address _to, uint256 _tokenId ) public canTransfer(_tokenId) { require(_from != address(0)); require(_to != address(0)); clearApproval(_from, _tokenId); removeTokenFrom(_from, _tokenId); addTokenTo(_to, _tokenId); emit Transfer(_from, _to, _to...
/** * @dev Transfers the ownership of a given token ID to another address * Usage of this method is discouraged, use `safeTransferFrom` whenever possible * Requires the msg sender to be the owner, approved, or operator * @param _from current owner of the token * @param _to address to receive the ownership of ...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 5884, 6245 ] }
9,056
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721BasicToken
contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { bytes4 private constant InterfaceId_ERC721 = 0x80ac58cd; /* * 0x80ac58cd === * bytes4(keccak256('balanceOf(address)')) ^ * bytes4(keccak256('ownerOf(uint256)')) ^ * bytes4(keccak256('approve(address,uint256)')) ^ *...
safeTransferFrom
function safeTransferFrom( address _from, address _to, uint256 _tokenId ) public canTransfer(_tokenId) { // solium-disable-next-line arg-overflow safeTransferFrom(_from, _to, _tokenId, ""); }
/** * @dev Safely transfers the ownership of a given token ID to another address * If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise, ...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 6872, 7110 ] }
9,057
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721BasicToken
contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { bytes4 private constant InterfaceId_ERC721 = 0x80ac58cd; /* * 0x80ac58cd === * bytes4(keccak256('balanceOf(address)')) ^ * bytes4(keccak256('ownerOf(uint256)')) ^ * bytes4(keccak256('approve(address,uint256)')) ^ *...
safeTransferFrom
function safeTransferFrom( address _from, address _to, uint256 _tokenId, bytes _data ) public canTransfer(_tokenId) { transferFrom(_from, _to, _tokenId); // solium-disable-next-line arg-overflow require(checkAndCallSafeTransfer(_from, _to, _tokenId, _data)); }
/** * @dev Safely transfers the ownership of a given token ID to another address * If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise, ...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 7803, 8120 ] }
9,058
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721BasicToken
contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { bytes4 private constant InterfaceId_ERC721 = 0x80ac58cd; /* * 0x80ac58cd === * bytes4(keccak256('balanceOf(address)')) ^ * bytes4(keccak256('ownerOf(uint256)')) ^ * bytes4(keccak256('approve(address,uint256)')) ^ *...
isApprovedOrOwner
function isApprovedOrOwner( address _spender, uint256 _tokenId ) internal view returns (bool) { address owner = ownerOf(_tokenId); // Disable solium check because of // https://github.com/duaraghav8/Solium/issues/175 // solium-disable-next-line operator-whitespace return ( _spender ...
/** * @dev Returns whether the given spender can transfer a given token ID * @param _spender address of the spender to query * @param _tokenId uint256 ID of the token to be transferred * @return bool whether the msg.sender is approved for the given token ID, * is an operator of the owner, or is the owner of ...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 8473, 8931 ] }
9,059
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721BasicToken
contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { bytes4 private constant InterfaceId_ERC721 = 0x80ac58cd; /* * 0x80ac58cd === * bytes4(keccak256('balanceOf(address)')) ^ * bytes4(keccak256('ownerOf(uint256)')) ^ * bytes4(keccak256('approve(address,uint256)')) ^ *...
_mint
function _mint(address _to, uint256 _tokenId) internal { require(_to != address(0)); addTokenTo(_to, _tokenId); emit Transfer(address(0), _to, _tokenId); }
/** * @dev Internal function to mint a new token * Reverts if the given token ID already exists * @param _to The address that will own the minted token * @param _tokenId uint256 ID of the token to be minted by the msg.sender */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 9185, 9361 ] }
9,060
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721BasicToken
contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { bytes4 private constant InterfaceId_ERC721 = 0x80ac58cd; /* * 0x80ac58cd === * bytes4(keccak256('balanceOf(address)')) ^ * bytes4(keccak256('ownerOf(uint256)')) ^ * bytes4(keccak256('approve(address,uint256)')) ^ *...
_burn
function _burn(address _owner, uint256 _tokenId) internal { clearApproval(_owner, _tokenId); removeTokenFrom(_owner, _tokenId); emit Transfer(_owner, address(0), _tokenId); }
/** * @dev Internal function to burn a specific token * Reverts if the token does not exist * @param _tokenId uint256 ID of the token being burned by the msg.sender */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 9551, 9746 ] }
9,061
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721BasicToken
contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { bytes4 private constant InterfaceId_ERC721 = 0x80ac58cd; /* * 0x80ac58cd === * bytes4(keccak256('balanceOf(address)')) ^ * bytes4(keccak256('ownerOf(uint256)')) ^ * bytes4(keccak256('approve(address,uint256)')) ^ *...
clearApproval
function clearApproval(address _owner, uint256 _tokenId) internal { require(ownerOf(_tokenId) == _owner); if (tokenApprovals[_tokenId] != address(0)) { tokenApprovals[_tokenId] = address(0); } }
/** * @dev Internal function to clear current approval of a given token ID * Reverts if the given address is not indeed the owner of the token * @param _owner owner of the token * @param _tokenId uint256 ID of the token to be transferred */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 10013, 10235 ] }
9,062
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721BasicToken
contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { bytes4 private constant InterfaceId_ERC721 = 0x80ac58cd; /* * 0x80ac58cd === * bytes4(keccak256('balanceOf(address)')) ^ * bytes4(keccak256('ownerOf(uint256)')) ^ * bytes4(keccak256('approve(address,uint256)')) ^ *...
addTokenTo
function addTokenTo(address _to, uint256 _tokenId) internal { require(tokenOwner[_tokenId] == address(0)); tokenOwner[_tokenId] = _to; ownedTokensCount[_to] = ownedTokensCount[_to].add(1); }
/** * @dev Internal function to add a token ID to the list of a given address * @param _to address representing the new owner of the given token ID * @param _tokenId uint256 ID of the token to be added to the tokens list of the given address */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 10502, 10713 ] }
9,063
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721BasicToken
contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { bytes4 private constant InterfaceId_ERC721 = 0x80ac58cd; /* * 0x80ac58cd === * bytes4(keccak256('balanceOf(address)')) ^ * bytes4(keccak256('ownerOf(uint256)')) ^ * bytes4(keccak256('approve(address,uint256)')) ^ *...
removeTokenFrom
function removeTokenFrom(address _from, uint256 _tokenId) internal { require(ownerOf(_tokenId) == _from); ownedTokensCount[_from] = ownedTokensCount[_from].sub(1); tokenOwner[_tokenId] = address(0); }
/** * @dev Internal function to remove a token ID from the list of a given address * @param _from address representing the previous owner of the given token ID * @param _tokenId uint256 ID of the token to be removed from the tokens list of the given address */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 10996, 11217 ] }
9,064
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721BasicToken
contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { bytes4 private constant InterfaceId_ERC721 = 0x80ac58cd; /* * 0x80ac58cd === * bytes4(keccak256('balanceOf(address)')) ^ * bytes4(keccak256('ownerOf(uint256)')) ^ * bytes4(keccak256('approve(address,uint256)')) ^ *...
checkAndCallSafeTransfer
function checkAndCallSafeTransfer( address _from, address _to, uint256 _tokenId, bytes _data ) internal returns (bool) { if (!_to.isContract()) { return true; } bytes4 retval = ERC721Receiver(_to).onERC721Received( msg.sender, _from, _tokenId, _data); return (retval == ERC721_R...
/** * @dev Internal function to invoke `onERC721Received` on a target address * The call is not executed if the target address is not a contract * @param _from address representing the previous owner of the given token ID * @param _to target address that will receive the tokens * @param _tokenId uint256 ID of...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 11731, 12096 ] }
9,065
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721Token
contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { bytes4 private constant InterfaceId_ERC721Enumerable = 0x780e9d63; /** * 0x780e9d63 === * bytes4(keccak256('totalSupply()')) ^ * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^ * bytes4(keccak256('t...
name
function name() external view returns (string) { return name_; }
/** * @dev Gets the token name * @return string representing the token name */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 1637, 1712 ] }
9,066
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721Token
contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { bytes4 private constant InterfaceId_ERC721Enumerable = 0x780e9d63; /** * 0x780e9d63 === * bytes4(keccak256('totalSupply()')) ^ * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^ * bytes4(keccak256('t...
symbol
function symbol() external view returns (string) { return symbol_; }
/** * @dev Gets the token symbol * @return string representing the token symbol */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 1813, 1892 ] }
9,067
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721Token
contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { bytes4 private constant InterfaceId_ERC721Enumerable = 0x780e9d63; /** * 0x780e9d63 === * bytes4(keccak256('totalSupply()')) ^ * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^ * bytes4(keccak256('t...
tokenURI
function tokenURI(uint256 _tokenId) public view returns (string) { require(exists(_tokenId)); return tokenURIs[_tokenId]; }
/** * @dev Returns an URI for a given token ID * Throws if the token ID does not exist. May return an empty string. * @param _tokenId uint256 ID of the token to query */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 2084, 2223 ] }
9,068
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721Token
contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { bytes4 private constant InterfaceId_ERC721Enumerable = 0x780e9d63; /** * 0x780e9d63 === * bytes4(keccak256('totalSupply()')) ^ * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^ * bytes4(keccak256('t...
tokenOfOwnerByIndex
function tokenOfOwnerByIndex( address _owner, uint256 _index ) public view returns (uint256) { require(_index < balanceOf(_owner)); return ownedTokens[_owner][_index]; }
/** * @dev Gets the token ID at a given index of the tokens list of the requested owner * @param _owner address owning the tokens list to be accessed * @param _index uint256 representing the index to be accessed of the requested tokens list * @return uint256 token ID at the given index of the tokens list owned ...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 2589, 2805 ] }
9,069
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721Token
contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { bytes4 private constant InterfaceId_ERC721Enumerable = 0x780e9d63; /** * 0x780e9d63 === * bytes4(keccak256('totalSupply()')) ^ * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^ * bytes4(keccak256('t...
totalSupply
function totalSupply() public view returns (uint256) { return allTokens.length; }
/** * @dev Gets the total amount of tokens stored by the contract * @return uint256 representing the total amount of tokens */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 2950, 3042 ] }
9,070
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721Token
contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { bytes4 private constant InterfaceId_ERC721Enumerable = 0x780e9d63; /** * 0x780e9d63 === * bytes4(keccak256('totalSupply()')) ^ * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^ * bytes4(keccak256('t...
tokenByIndex
function tokenByIndex(uint256 _index) public view returns (uint256) { require(_index < totalSupply()); return allTokens[_index]; }
/** * @dev Gets the token ID at a given index of all the tokens in this contract * Reverts if the index is greater or equal to the total number of tokens * @param _index uint256 representing the index to be accessed of the tokens list * @return uint256 token ID at the given index of the tokens list */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 3371, 3517 ] }
9,071
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721Token
contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { bytes4 private constant InterfaceId_ERC721Enumerable = 0x780e9d63; /** * 0x780e9d63 === * bytes4(keccak256('totalSupply()')) ^ * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^ * bytes4(keccak256('t...
_setTokenURI
function _setTokenURI(uint256 _tokenId, string _uri) internal { require(exists(_tokenId)); tokenURIs[_tokenId] = _uri; }
/** * @dev Internal function to set the token URI for a given token * Reverts if the token ID does not exist * @param _tokenId uint256 ID of the token to set its URI * @param _uri string URI to assign */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 3747, 3883 ] }
9,072
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721Token
contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { bytes4 private constant InterfaceId_ERC721Enumerable = 0x780e9d63; /** * 0x780e9d63 === * bytes4(keccak256('totalSupply()')) ^ * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^ * bytes4(keccak256('t...
addTokenTo
function addTokenTo(address _to, uint256 _tokenId) internal { super.addTokenTo(_to, _tokenId); uint256 length = ownedTokens[_to].length; ownedTokens[_to].push(_tokenId); ownedTokensIndex[_tokenId] = length; }
/** * @dev Internal function to add a token ID to the list of a given address * @param _to address representing the new owner of the given token ID * @param _tokenId uint256 ID of the token to be added to the tokens list of the given address */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 4150, 4384 ] }
9,073
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721Token
contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { bytes4 private constant InterfaceId_ERC721Enumerable = 0x780e9d63; /** * 0x780e9d63 === * bytes4(keccak256('totalSupply()')) ^ * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^ * bytes4(keccak256('t...
removeTokenFrom
function removeTokenFrom(address _from, uint256 _tokenId) internal { super.removeTokenFrom(_from, _tokenId); uint256 tokenIndex = ownedTokensIndex[_tokenId]; uint256 lastTokenIndex = ownedTokens[_from].length.sub(1); uint256 lastToken = ownedTokens[_from][lastTokenIndex]; ownedTokens[_from][tokenInde...
/** * @dev Internal function to remove a token ID from the list of a given address * @param _from address representing the previous owner of the given token ID * @param _tokenId uint256 ID of the token to be removed from the tokens list of the given address */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 4667, 5542 ] }
9,074
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721Token
contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { bytes4 private constant InterfaceId_ERC721Enumerable = 0x780e9d63; /** * 0x780e9d63 === * bytes4(keccak256('totalSupply()')) ^ * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^ * bytes4(keccak256('t...
_mint
function _mint(address _to, uint256 _tokenId) internal { super._mint(_to, _tokenId); allTokensIndex[_tokenId] = allTokens.length; allTokens.push(_tokenId); }
/** * @dev Internal function to mint a new token * Reverts if the given token ID already exists * @param _to address the beneficiary that will own the minted token * @param _tokenId uint256 ID of the token to be minted by the msg.sender */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 5808, 5988 ] }
9,075
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
ERC721Token
contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { bytes4 private constant InterfaceId_ERC721Enumerable = 0x780e9d63; /** * 0x780e9d63 === * bytes4(keccak256('totalSupply()')) ^ * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^ * bytes4(keccak256('t...
_burn
function _burn(address _owner, uint256 _tokenId) internal { super._burn(_owner, _tokenId); // Clear metadata (if any) if (bytes(tokenURIs[_tokenId]).length != 0) { delete tokenURIs[_tokenId]; } // Reorg all tokens array uint256 tokenIndex = allTokensIndex[_tokenId]; uint256 lastTokenIndex ...
/** * @dev Internal function to burn a specific token * Reverts if the token does not exist * @param _owner owner of the token to burn * @param _tokenId uint256 ID of the token being burned by the msg.sender */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 6225, 6832 ] }
9,076
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
CryptoCareToken
contract CryptoCareToken is ERC721Token, Ownable, Pausable { event TokenURIUpdated(uint256 _tokenID, string _tokenURI); address public minterAddress; constructor() public ERC721Token("CryptoCare", "CARE") {} /** * @dev Throws if called by any account other than the minter. */ mo...
mintToken
function mintToken(address _to, string _tokenURI) public onlyMinter whenNotPaused returns (uint256) { uint256 newTokenId = _getNextTokenId(); _mint(_to, newTokenId); _setTokenURI(newTokenId, _tokenURI); return newTokenId; }
/** * @dev Mints a new token with given tokenURI for an address * @param _to the address to mint the token to * @param _tokenURI the token URI containing the token metadata */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 612, 883 ] }
9,077
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
CryptoCareToken
contract CryptoCareToken is ERC721Token, Ownable, Pausable { event TokenURIUpdated(uint256 _tokenID, string _tokenURI); address public minterAddress; constructor() public ERC721Token("CryptoCare", "CARE") {} /** * @dev Throws if called by any account other than the minter. */ mo...
updateTokenURI
function updateTokenURI(uint256 _tokenID, string _tokenURI) public onlyMinter whenNotPaused { _setTokenURI(_tokenID, _tokenURI); emit TokenURIUpdated(_tokenID, _tokenURI); }
/** * @dev Updates the token URI for a given token ID * @param _tokenID the token ID to update */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 1004, 1205 ] }
9,078
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
CryptoCareToken
contract CryptoCareToken is ERC721Token, Ownable, Pausable { event TokenURIUpdated(uint256 _tokenID, string _tokenURI); address public minterAddress; constructor() public ERC721Token("CryptoCare", "CARE") {} /** * @dev Throws if called by any account other than the minter. */ mo...
updateMinter
function updateMinter(address _addr) public onlyOwner whenNotPaused { require(_addr > 0); minterAddress = _addr; }
/** * @dev Updates the minter address * @param _addr the new minter address */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 1307, 1449 ] }
9,079
CryptoCareToken
CryptoCareToken.sol
0xe7049a081f67f1ff4bdbdbf4c48c547d24c48f41
Solidity
CryptoCareToken
contract CryptoCareToken is ERC721Token, Ownable, Pausable { event TokenURIUpdated(uint256 _tokenID, string _tokenURI); address public minterAddress; constructor() public ERC721Token("CryptoCare", "CARE") {} /** * @dev Throws if called by any account other than the minter. */ mo...
_getNextTokenId
function _getNextTokenId() private view returns (uint256) { return totalSupply().add(1); }
/** * @dev calculates the next token ID based on totalSupply * @return uint256 for the next token ID */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7c5b2b0e9ecd78544375677687c19278fc7ddf6ad2061ec4f81465f57067bc30
{ "func_code_index": [ 1576, 1685 ] }
9,080
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 94, 154 ] }
9,081
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 237, 310 ] }
9,082
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 534, 616 ] }
9,083
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 895, 983 ] }
9,084
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * // importANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortuna...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 1650, 1729 ] }
9,085
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 2042, 2144 ] }
9,086
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
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.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 259, 445 ] }
9,087
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
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.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 723, 864 ] }
9,088
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
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.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 1162, 1359 ] }
9,089
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
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.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 1613, 2089 ] }
9,090
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
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.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 2560, 2697 ] }
9,091
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
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.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 3188, 3471 ] }
9,092
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
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.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 3931, 4066 ] }
9,093
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
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.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 4546, 4717 ] }
9,094
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
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` wi...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly ...
/** * @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 addresse...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 609, 1036 ] }
9,095
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
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` wi...
/** * @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.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 1969, 2371 ] }
9,096
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
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` wi...
/** * @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.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 3127, 3305 ] }
9,097
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
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` wi...
/** * @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.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 3530, 3731 ] }
9,098
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
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` wi...
/** * @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.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 4101, 4332 ] }
9,099
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
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` wi...
/** * @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.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 4583, 4904 ] }
9,100
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
Solidity
SafeERC20
library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, add...
/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
safeApprove
function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line ...
/** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 747, 1374 ] }
9,101
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
Solidity
SafeERC20
library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, add...
/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
_callOptionalReturn
function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target ad...
/** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 2393, 3159 ] }
9,102
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
Solidity
TokenTimelock
contract TokenTimelock { using SafeERC20 for IERC20; // ERC20 basic token contract being held IERC20 private _token; // beneficiary of tokens after they are released address private _beneficiary; // timestamp when token release is enabled uint256 private _releaseTime; con...
/** * @dev A token holder contract that will allow a beneficiary to extract the * tokens after a given release time. * * Useful for simple vesting schedules like "advisors get all of their tokens * after 1 year". */
NatSpecMultiLine
token
function token() public view returns (IERC20) { return _token; }
/** * @return the token being held. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 718, 801 ] }
9,103
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
Solidity
TokenTimelock
contract TokenTimelock { using SafeERC20 for IERC20; // ERC20 basic token contract being held IERC20 private _token; // beneficiary of tokens after they are released address private _beneficiary; // timestamp when token release is enabled uint256 private _releaseTime; con...
/** * @dev A token holder contract that will allow a beneficiary to extract the * tokens after a given release time. * * Useful for simple vesting schedules like "advisors get all of their tokens * after 1 year". */
NatSpecMultiLine
beneficiary
function beneficiary() public view returns (address) { return _beneficiary; }
/** * @return the beneficiary of the tokens. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 869, 965 ] }
9,104
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
Solidity
TokenTimelock
contract TokenTimelock { using SafeERC20 for IERC20; // ERC20 basic token contract being held IERC20 private _token; // beneficiary of tokens after they are released address private _beneficiary; // timestamp when token release is enabled uint256 private _releaseTime; con...
/** * @dev A token holder contract that will allow a beneficiary to extract the * tokens after a given release time. * * Useful for simple vesting schedules like "advisors get all of their tokens * after 1 year". */
NatSpecMultiLine
releaseTime
function releaseTime() public view returns (uint256) { return _releaseTime; }
/** * @return the time when the tokens are released. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 1041, 1137 ] }
9,105
TokenTimelock
TokenTimelock.sol
0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880
Solidity
TokenTimelock
contract TokenTimelock { using SafeERC20 for IERC20; // ERC20 basic token contract being held IERC20 private _token; // beneficiary of tokens after they are released address private _beneficiary; // timestamp when token release is enabled uint256 private _releaseTime; con...
/** * @dev A token holder contract that will allow a beneficiary to extract the * tokens after a given release time. * * Useful for simple vesting schedules like "advisors get all of their tokens * after 1 year". */
NatSpecMultiLine
release
function release() public virtual { // solhint-disable-next-line not-rely-on-time require(block.timestamp >= _releaseTime, "TokenTimelock: current time is before release time"); uint256 amount = _token.balanceOf(address(this)); require(amount > 0, "TokenTimelock: no tokens to release"); _to...
/** * @notice Transfers tokens held by timelock to beneficiary. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417
{ "func_code_index": [ 1224, 1615 ] }
9,106