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
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint2...
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://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 239, 409 ] }
4,907
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint2...
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://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 667, 800 ] }
4,908
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint2...
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://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 1078, 1279 ] }
4,909
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint2...
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; } uint25...
/** * @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://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 1513, 1947 ] }
4,910
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint2...
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://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 2394, 2523 ] }
4,911
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint2...
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://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 2990, 3273 ] }
4,912
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint2...
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://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 3709, 3836 ] }
4,913
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint2...
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://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 4292, 4471 ] }
4,914
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
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 return false for t...
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 codehash; b...
/** * @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://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 572, 1172 ] }
4,915
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
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 return false for t...
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, "Addr...
/** * @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://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 2070, 2473 ] }
4,916
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
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 return false for t...
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://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 3193, 3378 ] }
4,917
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
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 return false for t...
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://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 3591, 3804 ] }
4,918
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
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 return false for t...
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://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 4152, 4447 ] }
4,919
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
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 return false for t...
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, errorMe...
/** * @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://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 4686, 5041 ] }
4,920
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
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. *...
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://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 544, 620 ] }
4,921
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
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. *...
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://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 1146, 1287 ] }
4,922
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
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. *...
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://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 1429, 1662 ] }
4,923
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
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. *...
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://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 1820, 2019 ] }
4,924
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
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. *...
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://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 2084, 2382 ] }
4,925
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
Solidity
HODLCapital
contract HODLCapital 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) private ...
// Contract implementation
LineComment
manualSwap
function manualSwap() external onlyOwner { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); }
// We are exposing these functions to be able to manual swap and send // in case the token is highly valued and 5M becomes too much
LineComment
v0.6.12+commit.27d51765
None
ipfs://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 10108, 10255 ] }
4,926
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
Solidity
HODLCapital
contract HODLCapital 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) private ...
// Contract implementation
LineComment
//to recieve ETH from uniswapV2Router when swaping
LineComment
v0.6.12+commit.27d51765
None
ipfs://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 14165, 14197 ] }
4,927
Fractal
Fractal.sol
0xc9652efc267982b82df4ffd4bba5e0e7392f51f5
Solidity
Fractal
contract Fractal { struct Inversor { address inversor; uint Dia_de_la_inversion; uint Inversion_en_ETH; bool Esta_Activo; } // Fractal Founds Wallet (ETH) by default address owner = 0x78c25AA14b12fa53efDB77a5a46A59e0c571d0A6; address payable FRACT...
// SmartContract for Fractal Company - All Rights Reserved // :::::::::: ::::::::: ::: :::::::: ::::::::::: ::: ::: // :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: // +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+...
LineComment
Invertir_Ahora
function Invertir_Ahora() external payable { require(msg.value > 0); uint investment = msg.value; Buscar_Inversor[msg.sender] = Inversor({ inversor: msg.sender, Dia_de_la_inversion: block.timestamp, Inversion_en_ETH: investment, Esta_Activo: true ...
//by default // (1st)
LineComment
v0.5.16+commit.9c3226ce
None
bzzr://7bb013355a608e8e376975a14c9666d4fc73b86a3416b76bb37a93e39da81ac4
{ "func_code_index": [ 409, 823 ] }
4,928
Fractal
Fractal.sol
0xc9652efc267982b82df4ffd4bba5e0e7392f51f5
Solidity
Fractal
contract Fractal { struct Inversor { address inversor; uint Dia_de_la_inversion; uint Inversion_en_ETH; bool Esta_Activo; } // Fractal Founds Wallet (ETH) by default address owner = 0x78c25AA14b12fa53efDB77a5a46A59e0c571d0A6; address payable FRACT...
// SmartContract for Fractal Company - All Rights Reserved // :::::::::: ::::::::: ::: :::::::: ::::::::::: ::: ::: // :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: // +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+...
LineComment
Realizar_Pago
function Realizar_Pago(address payable _client) external payable { require(msg.value > 0); _client.transfer(msg.value); Buscar_Inversor[_client].Esta_Activo = false; }
// (3rd)
LineComment
v0.5.16+commit.9c3226ce
None
bzzr://7bb013355a608e8e376975a14c9666d4fc73b86a3416b76bb37a93e39da81ac4
{ "func_code_index": [ 923, 1129 ] }
4,929
Fractal
Fractal.sol
0xc9652efc267982b82df4ffd4bba5e0e7392f51f5
Solidity
Fractal
contract Fractal { struct Inversor { address inversor; uint Dia_de_la_inversion; uint Inversion_en_ETH; bool Esta_Activo; } // Fractal Founds Wallet (ETH) by default address owner = 0x78c25AA14b12fa53efDB77a5a46A59e0c571d0A6; address payable FRACT...
// SmartContract for Fractal Company - All Rights Reserved // :::::::::: ::::::::: ::: :::::::: ::::::::::: ::: ::: // :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: // +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+...
LineComment
Cambiar_Direccion_de_Fractal_Founds
function Cambiar_Direccion_de_Fractal_Founds (address payable _direccion) external { require (msg.sender == owner); FRACTALFOUNDS = _direccion; }
// (4th)
LineComment
v0.5.16+commit.9c3226ce
None
bzzr://7bb013355a608e8e376975a14c9666d4fc73b86a3416b76bb37a93e39da81ac4
{ "func_code_index": [ 1150, 1323 ] }
4,930
CookDistribution
contracts/core/CookDistribution.sol
0xb4d9dd5cb9e40c1a51e0e47f5110a643c28b0301
Solidity
CookDistribution
contract CookDistribution is Ownable, AccessControl { using SafeMath for uint256; using SafeERC20 for IERC20; event AllocationRegistered(address indexed beneficiary, uint256 amount); event TokensWithdrawal(address userAddress, uint256 amount); struct Allocation { uint256 amount; ...
/** * @title TokenVesting * @dev A token holder contract that can release its token balance gradually like a * typical vesting scheme, with a cliff and vesting period. */
NatSpecMultiLine
today
function today() public view virtual returns (uint256 dayNumber) { return uint256(block.timestamp / SECONDS_PER_DAY); }
/** * @dev returns the day number of the current day, in days since the UNIX epoch. */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://be8b6d5abcf228e898a25260316712bae59fe3232df1fc6ee5aa0bddce3e9250
{ "func_code_index": [ 5531, 5669 ] }
4,931
CookDistribution
contracts/core/CookDistribution.sol
0xb4d9dd5cb9e40c1a51e0e47f5110a643c28b0301
Solidity
CookDistribution
contract CookDistribution is Ownable, AccessControl { using SafeMath for uint256; using SafeERC20 for IERC20; event AllocationRegistered(address indexed beneficiary, uint256 amount); event TokensWithdrawal(address userAddress, uint256 amount); struct Allocation { uint256 amount; ...
/** * @title TokenVesting * @dev A token holder contract that can release its token balance gradually like a * typical vesting scheme, with a cliff and vesting period. */
NatSpecMultiLine
withdraw
function withdraw(uint256 withdrawAmount) public { address userAddress = msg.sender; require(_beneficiaryAllocations[userAddress].blackListed == false, "You're blacklisted."); require(_pauseClaim == false, "Not claimable due to emgergency"); require(getUserAvailableAmount(userAddress, today()) >...
/** withdraw function */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://be8b6d5abcf228e898a25260316712bae59fe3232df1fc6ee5aa0bddce3e9250
{ "func_code_index": [ 7867, 8521 ] }
4,932
CookDistribution
contracts/core/CookDistribution.sol
0xb4d9dd5cb9e40c1a51e0e47f5110a643c28b0301
Solidity
CookDistribution
contract CookDistribution is Ownable, AccessControl { using SafeMath for uint256; using SafeERC20 for IERC20; event AllocationRegistered(address indexed beneficiary, uint256 amount); event TokensWithdrawal(address userAddress, uint256 amount); struct Allocation { uint256 amount; ...
/** * @title TokenVesting * @dev A token holder contract that can release its token balance gradually like a * typical vesting scheme, with a cliff and vesting period. */
NatSpecMultiLine
zapCook
function zapCook(uint256 cookAmount, address cookPoolAddress) external { address userAddress = msg.sender; _checkValidZap(userAddress, cookAmount); IERC20(address(_token)).approve(cookPoolAddress, cookAmount); IPool(cookPoolAddress).zapStake(cookAmount, userAddress); }
// Zap into Cook staking pool functions
LineComment
v0.6.2+commit.bacdbe57
MIT
ipfs://be8b6d5abcf228e898a25260316712bae59fe3232df1fc6ee5aa0bddce3e9250
{ "func_code_index": [ 11908, 12223 ] }
4,933
CookDistribution
contracts/core/CookDistribution.sol
0xb4d9dd5cb9e40c1a51e0e47f5110a643c28b0301
Solidity
CookDistribution
contract CookDistribution is Ownable, AccessControl { using SafeMath for uint256; using SafeERC20 for IERC20; event AllocationRegistered(address indexed beneficiary, uint256 amount); event TokensWithdrawal(address userAddress, uint256 amount); struct Allocation { uint256 amount; ...
/** * @title TokenVesting * @dev A token holder contract that can release its token balance gradually like a * typical vesting scheme, with a cliff and vesting period. */
NatSpecMultiLine
setPriceBasedMaxStep
function setPriceBasedMaxStep(uint32 newMaxPriceBasedStep) public { require(hasRole(MANAGER_ROLE, msg.sender), "only manager"); _maxPriceUnlockMoveStep = newMaxPriceBasedStep; }
// Admin Functions
LineComment
v0.6.2+commit.bacdbe57
MIT
ipfs://be8b6d5abcf228e898a25260316712bae59fe3232df1fc6ee5aa0bddce3e9250
{ "func_code_index": [ 12250, 12455 ] }
4,934
CookDistribution
contracts/core/CookDistribution.sol
0xb4d9dd5cb9e40c1a51e0e47f5110a643c28b0301
Solidity
CookDistribution
contract CookDistribution is Ownable, AccessControl { using SafeMath for uint256; using SafeERC20 for IERC20; event AllocationRegistered(address indexed beneficiary, uint256 amount); event TokensWithdrawal(address userAddress, uint256 amount); struct Allocation { uint256 amount; ...
/** * @title TokenVesting * @dev A token holder contract that can release its token balance gradually like a * typical vesting scheme, with a cliff and vesting period. */
NatSpecMultiLine
addAddressWithAllocation
function addAddressWithAllocation(address beneficiaryAddress, uint256 amount, uint256 release) public { require(hasRole(MANAGER_ROLE, msg.sender), "only manager"); require(_beneficiaryAllocations[beneficiaryAddress].isRegistered == false, "The address exisits."); _beneficiaryAllocations[beneficiaryAddre...
/** * add adddress with allocation */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://be8b6d5abcf228e898a25260316712bae59fe3232df1fc6ee5aa0bddce3e9250
{ "func_code_index": [ 12513, 13055 ] }
4,935
CookDistribution
contracts/core/CookDistribution.sol
0xb4d9dd5cb9e40c1a51e0e47f5110a643c28b0301
Solidity
CookDistribution
contract CookDistribution is Ownable, AccessControl { using SafeMath for uint256; using SafeERC20 for IERC20; event AllocationRegistered(address indexed beneficiary, uint256 amount); event TokensWithdrawal(address userAddress, uint256 amount); struct Allocation { uint256 amount; ...
/** * @title TokenVesting * @dev A token holder contract that can release its token balance gradually like a * typical vesting scheme, with a cliff and vesting period. */
NatSpecMultiLine
addMultipleAddressWithAllocations
function addMultipleAddressWithAllocations(address[] memory beneficiaryAddresses, uint256[] memory amounts, uint256[] memory releases) public { require(hasRole(MANAGER_ROLE, msg.sender), "only manager"); require(beneficiaryAddresses.length > 0 && amounts.length > 0 && beneficiaryAddresses.length == amounts....
/** * Add multiple address with multiple allocations */
NatSpecMultiLine
v0.6.2+commit.bacdbe57
MIT
ipfs://be8b6d5abcf228e898a25260316712bae59fe3232df1fc6ee5aa0bddce3e9250
{ "func_code_index": [ 13131, 13984 ] }
4,936
CookDistribution
contracts/core/CookDistribution.sol
0xb4d9dd5cb9e40c1a51e0e47f5110a643c28b0301
Solidity
CookDistribution
contract CookDistribution is Ownable, AccessControl { using SafeMath for uint256; using SafeERC20 for IERC20; event AllocationRegistered(address indexed beneficiary, uint256 amount); event TokensWithdrawal(address userAddress, uint256 amount); struct Allocation { uint256 amount; ...
/** * @title TokenVesting * @dev A token holder contract that can release its token balance gradually like a * typical vesting scheme, with a cliff and vesting period. */
NatSpecMultiLine
blacklistAddress
function blacklistAddress(address userAddress) public { require(hasRole(MANAGER_ROLE, msg.sender), "only manager"); _beneficiaryAllocations[userAddress].blackListed = true; }
// Put an evil address into blacklist
LineComment
v0.6.2+commit.bacdbe57
MIT
ipfs://be8b6d5abcf228e898a25260316712bae59fe3232df1fc6ee5aa0bddce3e9250
{ "func_code_index": [ 16713, 16915 ] }
4,937
CookDistribution
contracts/core/CookDistribution.sol
0xb4d9dd5cb9e40c1a51e0e47f5110a643c28b0301
Solidity
CookDistribution
contract CookDistribution is Ownable, AccessControl { using SafeMath for uint256; using SafeERC20 for IERC20; event AllocationRegistered(address indexed beneficiary, uint256 amount); event TokensWithdrawal(address userAddress, uint256 amount); struct Allocation { uint256 amount; ...
/** * @title TokenVesting * @dev A token holder contract that can release its token balance gradually like a * typical vesting scheme, with a cliff and vesting period. */
NatSpecMultiLine
removeAddressFromBlacklist
function removeAddressFromBlacklist(address userAddress) public { require(hasRole(MANAGER_ROLE, msg.sender), "only manager"); _beneficiaryAllocations[userAddress].blackListed = false; }
//Remove an address from blacklist
LineComment
v0.6.2+commit.bacdbe57
MIT
ipfs://be8b6d5abcf228e898a25260316712bae59fe3232df1fc6ee5aa0bddce3e9250
{ "func_code_index": [ 16958, 17171 ] }
4,938
CookDistribution
contracts/core/CookDistribution.sol
0xb4d9dd5cb9e40c1a51e0e47f5110a643c28b0301
Solidity
CookDistribution
contract CookDistribution is Ownable, AccessControl { using SafeMath for uint256; using SafeERC20 for IERC20; event AllocationRegistered(address indexed beneficiary, uint256 amount); event TokensWithdrawal(address userAddress, uint256 amount); struct Allocation { uint256 amount; ...
/** * @title TokenVesting * @dev A token holder contract that can release its token balance gradually like a * typical vesting scheme, with a cliff and vesting period. */
NatSpecMultiLine
pauseClaim
function pauseClaim() public { require(hasRole(MANAGER_ROLE, msg.sender), "only manager"); _pauseClaim = true; }
// Pause all claim due to emergency
LineComment
v0.6.2+commit.bacdbe57
MIT
ipfs://be8b6d5abcf228e898a25260316712bae59fe3232df1fc6ee5aa0bddce3e9250
{ "func_code_index": [ 17215, 17355 ] }
4,939
CookDistribution
contracts/core/CookDistribution.sol
0xb4d9dd5cb9e40c1a51e0e47f5110a643c28b0301
Solidity
CookDistribution
contract CookDistribution is Ownable, AccessControl { using SafeMath for uint256; using SafeERC20 for IERC20; event AllocationRegistered(address indexed beneficiary, uint256 amount); event TokensWithdrawal(address userAddress, uint256 amount); struct Allocation { uint256 amount; ...
/** * @title TokenVesting * @dev A token holder contract that can release its token balance gradually like a * typical vesting scheme, with a cliff and vesting period. */
NatSpecMultiLine
resumeCliam
function resumeCliam() public { require(hasRole(MANAGER_ROLE, msg.sender), "only manager"); _pauseClaim = false; }
// resume cliamable
LineComment
v0.6.2+commit.bacdbe57
MIT
ipfs://be8b6d5abcf228e898a25260316712bae59fe3232df1fc6ee5aa0bddce3e9250
{ "func_code_index": [ 17383, 17525 ] }
4,940
CookDistribution
contracts/core/CookDistribution.sol
0xb4d9dd5cb9e40c1a51e0e47f5110a643c28b0301
Solidity
CookDistribution
contract CookDistribution is Ownable, AccessControl { using SafeMath for uint256; using SafeERC20 for IERC20; event AllocationRegistered(address indexed beneficiary, uint256 amount); event TokensWithdrawal(address userAddress, uint256 amount); struct Allocation { uint256 amount; ...
/** * @title TokenVesting * @dev A token holder contract that can release its token balance gradually like a * typical vesting scheme, with a cliff and vesting period. */
NatSpecMultiLine
emergencyWithdraw
function emergencyWithdraw(uint256 amount) public onlyOwner { _token.safeTransfer(msg.sender, amount); }
// admin emergency to transfer token to owner
LineComment
v0.6.2+commit.bacdbe57
MIT
ipfs://be8b6d5abcf228e898a25260316712bae59fe3232df1fc6ee5aa0bddce3e9250
{ "func_code_index": [ 17579, 17702 ] }
4,941
FxRates
contracts/FxRates.sol
0x27f2d2d38c6a7863c7554f357af02f648773361a
Solidity
FxRates
contract FxRates is Ownable { using SafeMath for uint256; struct Rate { string rate; string timestamp; } /** * @dev Event for logging an update of the exchange rates * @param symbol one of ["ETH", "BTC"] * @param updateNumber an incremental number giving the n...
/** * @title FxRates * @dev Store the historic fx rates for conversion ETHEUR and BTCEUR */
NatSpecMultiLine
updateEthRate
function updateEthRate(string _rate, string _timestamp) public onlyOwner { numberEthUpdates = numberEthUpdates.add(1); ethUpdates[numberEthUpdates] = Rate({ rate: _rate, timestamp: _timestamp }); RateUpdate("ETH", numberEthUpdates, _timestamp, _rate); }
/** * @dev Adds the latest Ether Euro rate to the history. Only the crontract owner can execute this. * @param _rate the exchange rate * @param _timestamp human readable earliest point in time where the rate is valid */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://239c8caaa3f6afba08237b811d97c7e646ccca04f115ba2b84c27ef37df81b10
{ "func_code_index": [ 1013, 1338 ] }
4,942
FxRates
contracts/FxRates.sol
0x27f2d2d38c6a7863c7554f357af02f648773361a
Solidity
FxRates
contract FxRates is Ownable { using SafeMath for uint256; struct Rate { string rate; string timestamp; } /** * @dev Event for logging an update of the exchange rates * @param symbol one of ["ETH", "BTC"] * @param updateNumber an incremental number giving the n...
/** * @title FxRates * @dev Store the historic fx rates for conversion ETHEUR and BTCEUR */
NatSpecMultiLine
updateBtcRate
function updateBtcRate(string _rate, string _timestamp) public onlyOwner { numberBtcUpdates = numberBtcUpdates.add(1); btcUpdates[numberBtcUpdates] = Rate({ rate: _rate, timestamp: _timestamp }); RateUpdate("BTC", numberBtcUpdates, _timestamp, _rate); }
/** * @dev Adds the latest Btc Euro rate to the history. . Only the crontract owner can execute this. * @param _rate the exchange rate * @param _timestamp human readable earliest point in time where the rate is valid */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://239c8caaa3f6afba08237b811d97c7e646ccca04f115ba2b84c27ef37df81b10
{ "func_code_index": [ 1590, 1915 ] }
4,943
FxRates
contracts/FxRates.sol
0x27f2d2d38c6a7863c7554f357af02f648773361a
Solidity
FxRates
contract FxRates is Ownable { using SafeMath for uint256; struct Rate { string rate; string timestamp; } /** * @dev Event for logging an update of the exchange rates * @param symbol one of ["ETH", "BTC"] * @param updateNumber an incremental number giving the n...
/** * @title FxRates * @dev Store the historic fx rates for conversion ETHEUR and BTCEUR */
NatSpecMultiLine
getEthRate
function getEthRate() public view returns(Rate) { /* require(numberEthUpdates > 0); */ return ethUpdates[numberEthUpdates]; /* ethUpdates[numberEthUpdates].rate, */ /* ethUpdates[numberEthUpdates].timestamp */ /* ); */ }
/** * @dev Gets the latest Eth Euro rate * @return a tuple containing the rate and the timestamp in human readable format */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://239c8caaa3f6afba08237b811d97c7e646ccca04f115ba2b84c27ef37df81b10
{ "func_code_index": [ 2066, 2349 ] }
4,944
FxRates
contracts/FxRates.sol
0x27f2d2d38c6a7863c7554f357af02f648773361a
Solidity
FxRates
contract FxRates is Ownable { using SafeMath for uint256; struct Rate { string rate; string timestamp; } /** * @dev Event for logging an update of the exchange rates * @param symbol one of ["ETH", "BTC"] * @param updateNumber an incremental number giving the n...
/** * @title FxRates * @dev Store the historic fx rates for conversion ETHEUR and BTCEUR */
NatSpecMultiLine
getBtcRate
function getBtcRate() public view returns(string, string) { /* require(numberBtcUpdates > 0); */ return ( btcUpdates[numberBtcUpdates].rate, btcUpdates[numberBtcUpdates].timestamp ); }
/** * @dev Gets the latest Btc Euro rate * @return a tuple containing the rate and the timestamp in human readable format */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://239c8caaa3f6afba08237b811d97c7e646ccca04f115ba2b84c27ef37df81b10
{ "func_code_index": [ 2500, 2747 ] }
4,945
FxRates
contracts/FxRates.sol
0x27f2d2d38c6a7863c7554f357af02f648773361a
Solidity
FxRates
contract FxRates is Ownable { using SafeMath for uint256; struct Rate { string rate; string timestamp; } /** * @dev Event for logging an update of the exchange rates * @param symbol one of ["ETH", "BTC"] * @param updateNumber an incremental number giving the n...
/** * @title FxRates * @dev Store the historic fx rates for conversion ETHEUR and BTCEUR */
NatSpecMultiLine
getHistEthRate
function getHistEthRate(uint256 _updateNumber) public view returns(string, string) { require(_updateNumber <= numberEthUpdates); return ( ethUpdates[_updateNumber].rate, ethUpdates[_updateNumber].timestamp ); }
/** * @dev Gets the historic Eth Euro rate * @param _updateNumber the number of the update the rate corresponds to. * @return a tuple containing the rate and the timestamp in human readable format */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://239c8caaa3f6afba08237b811d97c7e646ccca04f115ba2b84c27ef37df81b10
{ "func_code_index": [ 2979, 3252 ] }
4,946
FxRates
contracts/FxRates.sol
0x27f2d2d38c6a7863c7554f357af02f648773361a
Solidity
FxRates
contract FxRates is Ownable { using SafeMath for uint256; struct Rate { string rate; string timestamp; } /** * @dev Event for logging an update of the exchange rates * @param symbol one of ["ETH", "BTC"] * @param updateNumber an incremental number giving the n...
/** * @title FxRates * @dev Store the historic fx rates for conversion ETHEUR and BTCEUR */
NatSpecMultiLine
getHistBtcRate
function getHistBtcRate(uint256 _updateNumber) public view returns(string, string) { require(_updateNumber <= numberBtcUpdates); return ( btcUpdates[_updateNumber].rate, btcUpdates[_updateNumber].timestamp ); }
/** * @dev Gets the historic Btc Euro rate * @param _updateNumber the number of the update the rate corresponds to. * @return a tuple containing the rate and the timestamp in human readable format */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://239c8caaa3f6afba08237b811d97c7e646ccca04f115ba2b84c27ef37df81b10
{ "func_code_index": [ 3484, 3757 ] }
4,947
AtomicTokenProxy
AtomicTokenProxy.sol
0x197ad54648338ff265235c28fda966a637b13c63
Solidity
AtomicUtils
contract AtomicUtils{ // ETH and its wrappers address constant WETHAddress = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; IWETH constant WETH = IWETH(WETHAddress); Token constant ETH = Token(address(0)); address constant EEEAddress = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; Token con...
balanceOf
function balanceOf(Token token) internal view returns(uint balance){ if(isETH(token)){ return address(this).balance; }else{ return token.balanceOf(address(this)); } }
// Universal function to query this contracts balance, supporting and Token
LineComment
v0.6.12+commit.27d51765
None
ipfs://ca01bb6266925b6945b275a49f3f5f70c51cf4baf0e60829dfbf165e99e69210
{ "func_code_index": [ 440, 669 ] }
4,948
AtomicTokenProxy
AtomicTokenProxy.sol
0x197ad54648338ff265235c28fda966a637b13c63
Solidity
AtomicUtils
contract AtomicUtils{ // ETH and its wrappers address constant WETHAddress = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; IWETH constant WETH = IWETH(WETHAddress); Token constant ETH = Token(address(0)); address constant EEEAddress = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; Token con...
send
function send(Token token, address payable recipient, uint amount) internal { if(isETH(token)){ require( recipient.send(amount), "Sending of ETH failed." ); }else{ Token(token).transfer(recipient, amount); require( validateOptionalERC2...
// Universal send function, supporting ETH and Token
LineComment
v0.6.12+commit.27d51765
None
ipfs://ca01bb6266925b6945b275a49f3f5f70c51cf4baf0e60829dfbf165e99e69210
{ "func_code_index": [ 734, 1187 ] }
4,949
AtomicTokenProxy
AtomicTokenProxy.sol
0x197ad54648338ff265235c28fda966a637b13c63
Solidity
AtomicUtils
contract AtomicUtils{ // ETH and its wrappers address constant WETHAddress = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; IWETH constant WETH = IWETH(WETHAddress); Token constant ETH = Token(address(0)); address constant EEEAddress = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; Token con...
claimTokenFromSenderTo
function claimTokenFromSenderTo(Token _token, uint _amount, address _receiver) internal { if (isETH(_token)) { require(msg.value == _amount); // dont forward ETH }else{ require(msg.value == 0); _token.transferFrom(msg.sender, _receiver, _amount); } }
// Universal function to claim tokens from msg.sender
LineComment
v0.6.12+commit.27d51765
None
ipfs://ca01bb6266925b6945b275a49f3f5f70c51cf4baf0e60829dfbf165e99e69210
{ "func_code_index": [ 1253, 1593 ] }
4,950
AtomicTokenProxy
AtomicTokenProxy.sol
0x197ad54648338ff265235c28fda966a637b13c63
Solidity
AtomicUtils
contract AtomicUtils{ // ETH and its wrappers address constant WETHAddress = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; IWETH constant WETH = IWETH(WETHAddress); Token constant ETH = Token(address(0)); address constant EEEAddress = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; Token con...
approve
function approve(Token _token, address _spender, uint _amount) internal { if (!isETH(_token)) { _token.approve(_spender, _amount); require( validateOptionalERC20Return(), "ERC20 approval failed." ); } }
// Token approval function supporting non-compliant tokens
LineComment
v0.6.12+commit.27d51765
None
ipfs://ca01bb6266925b6945b275a49f3f5f70c51cf4baf0e60829dfbf165e99e69210
{ "func_code_index": [ 1664, 1967 ] }
4,951
AtomicTokenProxy
AtomicTokenProxy.sol
0x197ad54648338ff265235c28fda966a637b13c63
Solidity
AtomicUtils
contract AtomicUtils{ // ETH and its wrappers address constant WETHAddress = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; IWETH constant WETH = IWETH(WETHAddress); Token constant ETH = Token(address(0)); address constant EEEAddress = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; Token con...
validateOptionalERC20Return
function validateOptionalERC20Return() pure internal returns (bool){ uint256 success = 0; assembly { switch returndatasize() // Check the number of bytes the token contract returned case 0 { // Nothing returned, but contract did not throw > assume our...
// Validate return data of non-compliant erc20s
LineComment
v0.6.12+commit.27d51765
None
ipfs://ca01bb6266925b6945b275a49f3f5f70c51cf4baf0e60829dfbf165e99e69210
{ "func_code_index": [ 2027, 2675 ] }
4,952
AtomicTokenProxy
AtomicTokenProxy.sol
0x197ad54648338ff265235c28fda966a637b13c63
Solidity
AtomicUtils
contract AtomicUtils{ // ETH and its wrappers address constant WETHAddress = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; IWETH constant WETH = IWETH(WETHAddress); Token constant ETH = Token(address(0)); address constant EEEAddress = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; Token con...
sliceBytes
function sliceBytes( bytes memory _bytes, uint256 _start, uint256 _length ) internal pure returns (bytes memory) { require(_bytes.length >= (_start + _length), "Read out of bounds"); bytes memory tempBytes; assembly { switch iszero(_length) case 0 { // G...
// Source: https://github.com/GNSPS/solidity-bytes-utils/blob/master/contracts/BytesLib.sol
LineComment
v0.6.12+commit.27d51765
None
ipfs://ca01bb6266925b6945b275a49f3f5f70c51cf4baf0e60829dfbf165e99e69210
{ "func_code_index": [ 3242, 5795 ] }
4,953
AtomicTokenProxy
AtomicTokenProxy.sol
0x197ad54648338ff265235c28fda966a637b13c63
Solidity
AtomicBlue
contract AtomicBlue is AtomicUtils, AtomicTypes{ // IMPORTANT NOTICE: // NEVER set a token allowance to this contract, as everybody can do arbitrary calls from it. // When swapping tokens always go through AtomicTokenProxy. // This contract assumes token to swap has already been transfered to it whe...
swapAndSend
function swapAndSend( SwapParams memory _swap, DistributionParams memory _distribution, address payable _receipient ) public payable returns (uint _output){ // execute swaps on behalf of trader _output = doDistributedSwap(_swap, _distribution); // check if output of ...
// IMPORTANT NOTICE: // NEVER set a token allowance to this contract, as everybody can do arbitrary calls from it. // When swapping tokens always go through AtomicTokenProxy. // This contract assumes token to swap has already been transfered to it when being called. Ether can be sent directly with the call. // perform ...
LineComment
v0.6.12+commit.27d51765
None
ipfs://ca01bb6266925b6945b275a49f3f5f70c51cf4baf0e60829dfbf165e99e69210
{ "func_code_index": [ 452, 1236 ] }
4,954
AtomicTokenProxy
AtomicTokenProxy.sol
0x197ad54648338ff265235c28fda966a637b13c63
Solidity
AtomicBlue
contract AtomicBlue is AtomicUtils, AtomicTypes{ // IMPORTANT NOTICE: // NEVER set a token allowance to this contract, as everybody can do arbitrary calls from it. // When swapping tokens always go through AtomicTokenProxy. // This contract assumes token to swap has already been transfered to it whe...
doDistributedSwap
function doDistributedSwap( SwapParams memory _swap, DistributionParams memory _distribution ) internal returns(uint){ // count totalChunks uint totalChunks = 0; for(uint i = 0; i < _distribution.chunks.length; i++){ totalChunks += _distribution.chunks[i]; ...
// internal function to perform a distributed swap
LineComment
v0.6.12+commit.27d51765
None
ipfs://ca01bb6266925b6945b275a49f3f5f70c51cf4baf0e60829dfbf165e99e69210
{ "func_code_index": [ 2722, 4885 ] }
4,955
AtomicTokenProxy
AtomicTokenProxy.sol
0x197ad54648338ff265235c28fda966a637b13c63
Solidity
AtomicBlue
contract AtomicBlue is AtomicUtils, AtomicTypes{ // IMPORTANT NOTICE: // NEVER set a token allowance to this contract, as everybody can do arbitrary calls from it. // When swapping tokens always go through AtomicTokenProxy. // This contract assumes token to swap has already been transfered to it whe...
swap
function swap( SwapParams memory _swap, DistributionParams memory _distribution ) public payable returns (uint _output){ return swapAndSend(_swap, _distribution, msg.sender); }
// perform a distributed swap
LineComment
v0.6.12+commit.27d51765
None
ipfs://ca01bb6266925b6945b275a49f3f5f70c51cf4baf0e60829dfbf165e99e69210
{ "func_code_index": [ 4927, 5145 ] }
4,956
AtomicTokenProxy
AtomicTokenProxy.sol
0x197ad54648338ff265235c28fda966a637b13c63
Solidity
AtomicBlue
contract AtomicBlue is AtomicUtils, AtomicTypes{ // IMPORTANT NOTICE: // NEVER set a token allowance to this contract, as everybody can do arbitrary calls from it. // When swapping tokens always go through AtomicTokenProxy. // This contract assumes token to swap has already been transfered to it whe...
multiPathSwap
function multiPathSwap( SwapParams memory _swap, Token[] calldata _path, DistributionParams[] memory _distribution ) public payable returns (uint _output){ return multiPathSwapAndSend(_swap, _path, _distribution, msg.sender); }
// perform a multi-path distributed swap
LineComment
v0.6.12+commit.27d51765
None
ipfs://ca01bb6266925b6945b275a49f3f5f70c51cf4baf0e60829dfbf165e99e69210
{ "func_code_index": [ 5198, 5476 ] }
4,957
AtomicTokenProxy
AtomicTokenProxy.sol
0x197ad54648338ff265235c28fda966a637b13c63
Solidity
AtomicBlue
contract AtomicBlue is AtomicUtils, AtomicTypes{ // IMPORTANT NOTICE: // NEVER set a token allowance to this contract, as everybody can do arbitrary calls from it. // When swapping tokens always go through AtomicTokenProxy. // This contract assumes token to swap has already been transfered to it whe...
// allow ETH receivals
LineComment
v0.6.12+commit.27d51765
None
ipfs://ca01bb6266925b6945b275a49f3f5f70c51cf4baf0e60829dfbf165e99e69210
{ "func_code_index": [ 5507, 5541 ] }
4,958
AtomicTokenProxy
AtomicTokenProxy.sol
0x197ad54648338ff265235c28fda966a637b13c63
Solidity
AtomicTokenProxy
contract AtomicTokenProxy is AtomicUtils, AtomicTypes{ AtomicBlue constant atomic = AtomicBlue(0xeb5DF44d56B0d4cCd63734A99881B2F3f002ECC2); // perform a distributed swap and transfer outcome to _receipient function swapAndSend( SwapParams calldata _swap, DistributionParams c...
swapAndSend
function swapAndSend( SwapParams calldata _swap, DistributionParams calldata _distribution, address payable _receipient ) public payable returns (uint _output){ // deposit tokens to executor claimTokenFromSenderTo(_swap.sellToken, _swap.input, address(atomic)); ...
// perform a distributed swap and transfer outcome to _receipient
LineComment
v0.6.12+commit.27d51765
None
ipfs://ca01bb6266925b6945b275a49f3f5f70c51cf4baf0e60829dfbf165e99e69210
{ "func_code_index": [ 219, 709 ] }
4,959
AtomicTokenProxy
AtomicTokenProxy.sol
0x197ad54648338ff265235c28fda966a637b13c63
Solidity
AtomicTokenProxy
contract AtomicTokenProxy is AtomicUtils, AtomicTypes{ AtomicBlue constant atomic = AtomicBlue(0xeb5DF44d56B0d4cCd63734A99881B2F3f002ECC2); // perform a distributed swap and transfer outcome to _receipient function swapAndSend( SwapParams calldata _swap, DistributionParams c...
multiPathSwapAndSend
function multiPathSwapAndSend( SwapParams calldata _swap, Token[] calldata _path, DistributionParams[] calldata _distribution, address payable _receipient ) public payable returns (uint _output){ // deposit tokens to executor claimTokenFromSenderTo(_swap.sell...
// perform a multi-path distributed swap and transfer outcome to _receipient
LineComment
v0.6.12+commit.27d51765
None
ipfs://ca01bb6266925b6945b275a49f3f5f70c51cf4baf0e60829dfbf165e99e69210
{ "func_code_index": [ 798, 1421 ] }
4,960
AtomicTokenProxy
AtomicTokenProxy.sol
0x197ad54648338ff265235c28fda966a637b13c63
Solidity
AtomicTokenProxy
contract AtomicTokenProxy is AtomicUtils, AtomicTypes{ AtomicBlue constant atomic = AtomicBlue(0xeb5DF44d56B0d4cCd63734A99881B2F3f002ECC2); // perform a distributed swap and transfer outcome to _receipient function swapAndSend( SwapParams calldata _swap, DistributionParams c...
swap
function swap( SwapParams calldata _swap, DistributionParams calldata _distribution ) public payable returns (uint _output){ return swapAndSend(_swap, _distribution, msg.sender); }
// perform a distributed swap
LineComment
v0.6.12+commit.27d51765
None
ipfs://ca01bb6266925b6945b275a49f3f5f70c51cf4baf0e60829dfbf165e99e69210
{ "func_code_index": [ 1463, 1685 ] }
4,961
AtomicTokenProxy
AtomicTokenProxy.sol
0x197ad54648338ff265235c28fda966a637b13c63
Solidity
AtomicTokenProxy
contract AtomicTokenProxy is AtomicUtils, AtomicTypes{ AtomicBlue constant atomic = AtomicBlue(0xeb5DF44d56B0d4cCd63734A99881B2F3f002ECC2); // perform a distributed swap and transfer outcome to _receipient function swapAndSend( SwapParams calldata _swap, DistributionParams c...
swapWithGasTokens
function swapWithGasTokens( SwapParams calldata _swap, DistributionParams calldata _distribution, IGasToken _gasToken, uint _gasQtyPerToken ) public payable returns (uint _output){ uint startGas = gasleft(); _output = swapAndSend(_swap, _distribution, msg.sender); _gasToken.freeFromU...
// perform a distributed swap and burn optimal gastoken amount afterwards
LineComment
v0.6.12+commit.27d51765
None
ipfs://ca01bb6266925b6945b275a49f3f5f70c51cf4baf0e60829dfbf165e99e69210
{ "func_code_index": [ 1771, 2201 ] }
4,962
AtomicTokenProxy
AtomicTokenProxy.sol
0x197ad54648338ff265235c28fda966a637b13c63
Solidity
AtomicTokenProxy
contract AtomicTokenProxy is AtomicUtils, AtomicTypes{ AtomicBlue constant atomic = AtomicBlue(0xeb5DF44d56B0d4cCd63734A99881B2F3f002ECC2); // perform a distributed swap and transfer outcome to _receipient function swapAndSend( SwapParams calldata _swap, DistributionParams c...
multiPathSwap
function multiPathSwap( SwapParams calldata _swap, Token[] calldata _path, DistributionParams[] calldata _distribution ) public payable returns (uint _output){ return multiPathSwapAndSend(_swap, _path, _distribution, msg.sender); }
// perform a multi-path distributed swap
LineComment
v0.6.12+commit.27d51765
None
ipfs://ca01bb6266925b6945b275a49f3f5f70c51cf4baf0e60829dfbf165e99e69210
{ "func_code_index": [ 2254, 2536 ] }
4,963
AtomicTokenProxy
AtomicTokenProxy.sol
0x197ad54648338ff265235c28fda966a637b13c63
Solidity
AtomicTokenProxy
contract AtomicTokenProxy is AtomicUtils, AtomicTypes{ AtomicBlue constant atomic = AtomicBlue(0xeb5DF44d56B0d4cCd63734A99881B2F3f002ECC2); // perform a distributed swap and transfer outcome to _receipient function swapAndSend( SwapParams calldata _swap, DistributionParams c...
multiPathSwapWithGasTokens
function multiPathSwapWithGasTokens( SwapParams calldata _swap, Token[] calldata _path, DistributionParams[] calldata _distribution, IGasToken _gasToken, uint _gasQtyPerToken ) public payable returns (uint _output){ uint startGas = gasleft(); _output = multiPathSwapAndSend(_swap, _pa...
// perform a multi-path distributed swap and burn optimal gastoken amount afterwards
LineComment
v0.6.12+commit.27d51765
None
ipfs://ca01bb6266925b6945b275a49f3f5f70c51cf4baf0e60829dfbf165e99e69210
{ "func_code_index": [ 2633, 3123 ] }
4,964
AtomicTokenProxy
AtomicTokenProxy.sol
0x197ad54648338ff265235c28fda966a637b13c63
Solidity
AtomicTokenProxy
contract AtomicTokenProxy is AtomicUtils, AtomicTypes{ AtomicBlue constant atomic = AtomicBlue(0xeb5DF44d56B0d4cCd63734A99881B2F3f002ECC2); // perform a distributed swap and transfer outcome to _receipient function swapAndSend( SwapParams calldata _swap, DistributionParams c...
swapAndSendWithGasTokens
function swapAndSendWithGasTokens( SwapParams calldata _swap, DistributionParams calldata _distribution, address payable _receipient, IGasToken _gasToken, uint _gasQtyPerToken ) public payable returns (uint _output){ uint startGas = gasleft(); _output = swapAndSend(_swap, _distributi...
// perform a distributed swap, send outcome to _receipient and burn optimal gastoken amount afterwards
LineComment
v0.6.12+commit.27d51765
None
ipfs://ca01bb6266925b6945b275a49f3f5f70c51cf4baf0e60829dfbf165e99e69210
{ "func_code_index": [ 3238, 3714 ] }
4,965
AtomicTokenProxy
AtomicTokenProxy.sol
0x197ad54648338ff265235c28fda966a637b13c63
Solidity
AtomicTokenProxy
contract AtomicTokenProxy is AtomicUtils, AtomicTypes{ AtomicBlue constant atomic = AtomicBlue(0xeb5DF44d56B0d4cCd63734A99881B2F3f002ECC2); // perform a distributed swap and transfer outcome to _receipient function swapAndSend( SwapParams calldata _swap, DistributionParams c...
multiPathSwapAndSendWithGasTokens
function multiPathSwapAndSendWithGasTokens( SwapParams calldata _swap, Token[] calldata _path, DistributionParams[] calldata _distribution, address payable _receipient, IGasToken _gasToken, uint _gasQtyPerToken ) public payable returns (uint _output){ uint startGas = gasleft(); ...
// perform a multi-path distributed swap, send outcome to _receipient and burn optimal gastoken amount afterwards
LineComment
v0.6.12+commit.27d51765
None
ipfs://ca01bb6266925b6945b275a49f3f5f70c51cf4baf0e60829dfbf165e99e69210
{ "func_code_index": [ 3840, 4376 ] }
4,966
Warsnails
contracts/Warsnails.sol
0x3c197a9bbedccd44d71f4dd8581bbf6a7196c57d
Solidity
Warsnails
contract Warsnails is ERC721Enumerable, Ownable { using SafeMath for uint256; using Strings for uint256; string public baseURI; string public extension = ".json"; uint256 public cost = 0.08 ether; uint256 public presaleCost = 0.06 ether; uint256 public maxSnails = 88...
mintSnailsPresale
function mintSnailsPresale(uint256 _mintAmount) public payable { uint256 supply = totalSupply(); if (msg.sender == owner()) { teamCount += _mintAmount; require(teamCount <= teamAlloctation, "teamAlloctation cap reached!"); require(supply.add(_mintAmount) <= maxSnails, "Max...
/** * @dev function to mint presale snails * * - function checks teams allocation */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://965e4270ffb99672fc47ec19c80866d92c5b2b82ed007c03d36b5238214c5afa
{ "func_code_index": [ 1480, 2612 ] }
4,967
Warsnails
contracts/Warsnails.sol
0x3c197a9bbedccd44d71f4dd8581bbf6a7196c57d
Solidity
Warsnails
contract Warsnails is ERC721Enumerable, Ownable { using SafeMath for uint256; using Strings for uint256; string public baseURI; string public extension = ".json"; uint256 public cost = 0.08 ether; uint256 public presaleCost = 0.06 ether; uint256 public maxSnails = 88...
updatePresaleCap
function updatePresaleCap(uint256 _newCap) public onlyOwner { presaleCap = _newCap; }
/** * @dev function to update presalecap * * - Snail presale can be up to 5 waves */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://965e4270ffb99672fc47ec19c80866d92c5b2b82ed007c03d36b5238214c5afa
{ "func_code_index": [ 4323, 4431 ] }
4,968
DiscCoin
DiscCoin.sol
0x3e318c580d23c28156fe0da55ad71b41798b75ed
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
totalSupply
function totalSupply() constant returns (uint256 supply) {}
/// @return total amount of tokens
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://dc8b7a5a75d96119aab014a689b92b1af3d0293899c693e36bcae95564213c91
{ "func_code_index": [ 60, 124 ] }
4,969
DiscCoin
DiscCoin.sol
0x3e318c580d23c28156fe0da55ad71b41798b75ed
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
balanceOf
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @param _owner The address from which the balance will be retrieved /// @return The balance
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://dc8b7a5a75d96119aab014a689b92b1af3d0293899c693e36bcae95564213c91
{ "func_code_index": [ 232, 309 ] }
4,970
DiscCoin
DiscCoin.sol
0x3e318c580d23c28156fe0da55ad71b41798b75ed
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
transfer
function transfer(address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://dc8b7a5a75d96119aab014a689b92b1af3d0293899c693e36bcae95564213c91
{ "func_code_index": [ 546, 623 ] }
4,971
DiscCoin
DiscCoin.sol
0x3e318c580d23c28156fe0da55ad71b41798b75ed
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://dc8b7a5a75d96119aab014a689b92b1af3d0293899c693e36bcae95564213c91
{ "func_code_index": [ 946, 1042 ] }
4,972
DiscCoin
DiscCoin.sol
0x3e318c580d23c28156fe0da55ad71b41798b75ed
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
approve
function approve(address _spender, uint256 _value) returns (bool success) {}
/// @notice `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://dc8b7a5a75d96119aab014a689b92b1af3d0293899c693e36bcae95564213c91
{ "func_code_index": [ 1326, 1407 ] }
4,973
DiscCoin
DiscCoin.sol
0x3e318c580d23c28156fe0da55ad71b41798b75ed
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
allowance
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
/// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://dc8b7a5a75d96119aab014a689b92b1af3d0293899c693e36bcae95564213c91
{ "func_code_index": [ 1615, 1712 ] }
4,974
DiscCoin
DiscCoin.sol
0x3e318c580d23c28156fe0da55ad71b41798b75ed
Solidity
DiscCoin
contract DiscCoin is StandardToken { // CHANGE THIS. Update the contract name. /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to customise the token contract & in no way influences the core functi...
DiscCoin
function DiscCoin() { balances[msg.sender] = 58980000000000000000000000; // Give the creator all initial tokens. This is set to 1000 for example. If you want your initial tokens to be X and your decimal is 5, set this value to X * 100000. (CHANGE THIS) totalSupply = 58980000000000000000000000; ...
// Where should the raised ETH go? // This is a constructor function // which means the following function name has to match the contract name declared above
LineComment
v0.4.19+commit.c4cbbb05
bzzr://dc8b7a5a75d96119aab014a689b92b1af3d0293899c693e36bcae95564213c91
{ "func_code_index": [ 1196, 2214 ] }
4,975
DiscCoin
DiscCoin.sol
0x3e318c580d23c28156fe0da55ad71b41798b75ed
Solidity
DiscCoin
contract DiscCoin is StandardToken { // CHANGE THIS. Update the contract name. /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to customise the token contract & in no way influences the core functi...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually s...
/* Approves and then calls the receiving contract */
Comment
v0.4.19+commit.c4cbbb05
bzzr://dc8b7a5a75d96119aab014a689b92b1af3d0293899c693e36bcae95564213c91
{ "func_code_index": [ 2838, 3643 ] }
4,976
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
approve
function approve(address to, uint256 tokenId) public virtual override { address owner = BYOT.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approve...
/** * @dev See {IERC721-approve}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 3667, 4070 ] }
4,977
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
getApproved
function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; }
/** * @dev See {IERC721-getApproved}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 4127, 4348 ] }
4,978
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
setApprovalForAll
function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); }
/** * @dev See {IERC721-setApprovalForAll}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 4411, 4568 ] }
4,979
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
isApprovedForAll
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; }
/** * @dev See {IERC721-isApprovedForAll}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 4630, 4796 ] }
4,980
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
transferFrom
function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); }
/** * @dev See {IERC721-transferFrom}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 4854, 5188 ] }
4,981
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); }
/** * @dev See {IERC721-safeTransferFrom}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 5250, 5433 ] }
4,982
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); }
/** * @dev See {IERC721-safeTransferFrom}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 5495, 5819 ] }
4,983
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
_safeTransfer
function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); }
/** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivale...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 6677, 6988 ] }
4,984
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
_exists
function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); }
/** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 7287, 7416 ] }
4,985
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
_isApprovedOrOwner
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = BYOT.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spende...
/** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 7570, 7916 ] }
4,986
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
_safeMint
function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); }
/** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 8242, 8354 ] }
4,987
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
_safeMint
function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); }
/** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 8571, 8886 ] }
4,988
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
_mint
function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(add...
/** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 9204, 9580 ] }
4,989
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
_transfer
function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(BYOT.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approv...
/** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 9901, 10462 ] }
4,990
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
_approve
function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(BYOT.ownerOf(tokenId), to, tokenId); }
/** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 10569, 10742 ] }
4,991
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
_setApprovalForAll
function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); }
/** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 10873, 11184 ] }
4,992
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
_checkOnERC721Received
function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver...
/** * @dev Internal function to invoke {IERC721Receiver-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 ...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 11733, 12515 ] }
4,993
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
_beforeTokenTransfer
function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {}
/** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s ...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 13067, 13193 ] }
4,994
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || super.supportsInterface(interfaceId); }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 13254, 13494 ] }
4,995
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
balanceOf
function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; }
/** * @dev See {IERC721-balanceOf}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 13549, 13758 ] }
4,996
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
ownerOf
function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; }
/** * @dev See {IERC721-ownerOf}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 13811, 14050 ] }
4,997
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
random
function random(string memory input) internal pure returns (uint256) { return uint256(keccak256(abi.encodePacked(input))); }
///////////////////// //// BYOT ///////////// //////////////////////
NatSpecSingleLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 14137, 14277 ] }
4,998
BYOT
BYOT.sol
0x49789d0b0f73b9195d72d94979320a33530aea94
Solidity
BYOT
contract BYOT is Context, ERC165, IERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _bal...
withdraw
function withdraw() external onlyOwner returns(bool){ address payable _owner = payable(msg.sender); _owner.transfer(address(this).balance); return true;
// only owner can withdraw money deposited in the contract
LineComment
v0.8.0+commit.c7dfd78e
MIT
ipfs://3d2af5faaea75e4440bc37580d0bd820ff1679fff9b93e8bb3bdad01f537d744
{ "func_code_index": [ 20184, 20372 ] }
4,999
PlayerOneToken
PlayerOneToken.sol
0xedf2f194c8d885b3b28098ef8e0b6700a2d95de0
Solidity
PlayerOneToken
contract PlayerOneToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public view returns (uint) { return _totalSupply.sub(balances[address(0)]); }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.5.12+commit.7709ece9
None
bzzr://2d9b13d046cef584da94e0dd7f45c7c37b0a6b58d61536070c4b09e5beeee8da
{ "func_code_index": [ 939, 1058 ] }
5,000
PlayerOneToken
PlayerOneToken.sol
0xedf2f194c8d885b3b28098ef8e0b6700a2d95de0
Solidity
PlayerOneToken
contract PlayerOneToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public view returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account `tokenOwner` // ------------------------------------------------------------------------
LineComment
v0.5.12+commit.7709ece9
None
bzzr://2d9b13d046cef584da94e0dd7f45c7c37b0a6b58d61536070c4b09e5beeee8da
{ "func_code_index": [ 1280, 1405 ] }
5,001
PlayerOneToken
PlayerOneToken.sol
0xedf2f194c8d885b3b28098ef8e0b6700a2d95de0
Solidity
PlayerOneToken
contract PlayerOneToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { require(!isContract(to)); balances[msg.sender] = balances[msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(msg.sender, to, tokens); return true; }
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to `to` account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.5.12+commit.7709ece9
None
bzzr://2d9b13d046cef584da94e0dd7f45c7c37b0a6b58d61536070c4b09e5beeee8da
{ "func_code_index": [ 1751, 2058 ] }
5,002
PlayerOneToken
PlayerOneToken.sol
0xedf2f194c8d885b3b28098ef8e0b6700a2d95de0
Solidity
PlayerOneToken
contract PlayerOneToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval do...
LineComment
v0.5.12+commit.7709ece9
None
bzzr://2d9b13d046cef584da94e0dd7f45c7c37b0a6b58d61536070c4b09e5beeee8da
{ "func_code_index": [ 2779, 2992 ] }
5,003
PlayerOneToken
PlayerOneToken.sol
0xedf2f194c8d885b3b28098ef8e0b6700a2d95de0
Solidity
PlayerOneToken
contract PlayerOneToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = balances[from].sub(tokens); allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(from, to, tokens); return true; } ...
// ------------------------------------------------------------------------ // Transfer `tokens` from the `from` account to the `to` account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the `from` account and // - From account must have sufficient balance to transfer...
LineComment
v0.5.12+commit.7709ece9
None
bzzr://2d9b13d046cef584da94e0dd7f45c7c37b0a6b58d61536070c4b09e5beeee8da
{ "func_code_index": [ 3530, 3878 ] }
5,004
PlayerOneToken
PlayerOneToken.sol
0xedf2f194c8d885b3b28098ef8e0b6700a2d95de0
Solidity
PlayerOneToken
contract PlayerOneToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
allowance
function allowance(address tokenOwner, address spender) public view returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.5.12+commit.7709ece9
None
bzzr://2d9b13d046cef584da94e0dd7f45c7c37b0a6b58d61536070c4b09e5beeee8da
{ "func_code_index": [ 4161, 4313 ] }
5,005
PlayerOneToken
PlayerOneToken.sol
0xedf2f194c8d885b3b28098ef8e0b6700a2d95de0
Solidity
PlayerOneToken
contract PlayerOneToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes memory data) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, address(this), data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account. The `spender` contract function // `receiveApproval(...)` is then executed // ------------------------------------------------------------...
LineComment
v0.5.12+commit.7709ece9
None
bzzr://2d9b13d046cef584da94e0dd7f45c7c37b0a6b58d61536070c4b09e5beeee8da
{ "func_code_index": [ 4676, 5014 ] }
5,006