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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ZombitContract | contracts/zombit.sol | 0xb77a17d9e61c0c46debbb7a83a5d40e7eee4dbcd | Solidity | ZombitContract | contract ZombitContract is ERC721Enumerable, Ownable {
using SafeMath for uint256;
address admin;
uint256 public maxZombitPurchase = 10;
uint256 public presaleMaxZombitPurchase = 5;
uint256 public zombitPrice = 80000000000000000; //0.08 ETH
uint256 public maxZombits = 10000;
uint256 p... | withdraw | function withdraw() public onlyAdmin {
uint256 balance = address(this).balance;
require(balance > 0);
payable(_msgSender()).transfer(balance);
}
| /**
* Withdraw all balance to the admin address
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://676673b2541ab5708a84328d036883491ae88042640f01de48e51374de125b10 | {
"func_code_index": [
3098,
3279
]
} | 9,307 | ||
ZombitContract | contracts/zombit.sol | 0xb77a17d9e61c0c46debbb7a83a5d40e7eee4dbcd | Solidity | ZombitContract | contract ZombitContract is ERC721Enumerable, Ownable {
using SafeMath for uint256;
address admin;
uint256 public maxZombitPurchase = 10;
uint256 public presaleMaxZombitPurchase = 5;
uint256 public zombitPrice = 80000000000000000; //0.08 ETH
uint256 public maxZombits = 10000;
uint256 p... | flipSaleState | function flipSaleState() public onlyAdmin {
if (saleStatus < 3) {
saleStatus = saleStatus + 1;
}
}
| //Sales switch | LineComment | v0.8.0+commit.c7dfd78e | MIT | ipfs://676673b2541ab5708a84328d036883491ae88042640f01de48e51374de125b10 | {
"func_code_index": [
3302,
3441
]
} | 9,308 | ||
ZombitContract | contracts/zombit.sol | 0xb77a17d9e61c0c46debbb7a83a5d40e7eee4dbcd | Solidity | ZombitContract | contract ZombitContract is ERC721Enumerable, Ownable {
using SafeMath for uint256;
address admin;
uint256 public maxZombitPurchase = 10;
uint256 public presaleMaxZombitPurchase = 5;
uint256 public zombitPrice = 80000000000000000; //0.08 ETH
uint256 public maxZombits = 10000;
uint256 p... | setBaseURI | function setBaseURI(string memory baseURI) external onlyAdmin {
m_BaseURI = baseURI;
}
| // setBaseURI
// - Metadata lives here | LineComment | v0.8.0+commit.c7dfd78e | MIT | ipfs://676673b2541ab5708a84328d036883491ae88042640f01de48e51374de125b10 | {
"func_code_index": [
4256,
4361
]
} | 9,309 | ||
ZombitContract | contracts/zombit.sol | 0xb77a17d9e61c0c46debbb7a83a5d40e7eee4dbcd | Solidity | ZombitContract | contract ZombitContract is ERC721Enumerable, Ownable {
using SafeMath for uint256;
address admin;
uint256 public maxZombitPurchase = 10;
uint256 public presaleMaxZombitPurchase = 5;
uint256 public zombitPrice = 80000000000000000; //0.08 ETH
uint256 public maxZombits = 10000;
uint256 p... | _baseURI | function _baseURI() internal view override returns (string memory) {
return m_BaseURI;
}
| // _baseURI | LineComment | v0.8.0+commit.c7dfd78e | MIT | ipfs://676673b2541ab5708a84328d036883491ae88042640f01de48e51374de125b10 | {
"func_code_index": [
4381,
4488
]
} | 9,310 | ||
ZombitContract | contracts/zombit.sol | 0xb77a17d9e61c0c46debbb7a83a5d40e7eee4dbcd | Solidity | ZombitContract | contract ZombitContract is ERC721Enumerable, Ownable {
using SafeMath for uint256;
address admin;
uint256 public maxZombitPurchase = 10;
uint256 public presaleMaxZombitPurchase = 5;
uint256 public zombitPrice = 80000000000000000; //0.08 ETH
uint256 public maxZombits = 10000;
uint256 p... | tokensOfOwner | function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory ownerTokens)
{
uint256 tokenCount = balanceOf(_owner);
if (tokenCount == 0) {
// Return an empty array
return new uint256[](0);
} else {
uint256[] memory result = new uint256[](toke... | //All tokens under this address | LineComment | v0.8.0+commit.c7dfd78e | MIT | ipfs://676673b2541ab5708a84328d036883491ae88042640f01de48e51374de125b10 | {
"func_code_index": [
4528,
5119
]
} | 9,311 | ||
HungaryGold | HungaryGold.sol | 0x858b1f24940e64e08b6941946a29aa352f218ae6 | 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.12+commit.194ff033 | bzzr://5c709160f4bb4e6d6639d99a493bbf4ea7156022038ee75a12d714b88f2cb675 | {
"func_code_index": [
60,
124
]
} | 9,312 | |||
HungaryGold | HungaryGold.sol | 0x858b1f24940e64e08b6941946a29aa352f218ae6 | 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.12+commit.194ff033 | bzzr://5c709160f4bb4e6d6639d99a493bbf4ea7156022038ee75a12d714b88f2cb675 | {
"func_code_index": [
232,
309
]
} | 9,313 | |||
HungaryGold | HungaryGold.sol | 0x858b1f24940e64e08b6941946a29aa352f218ae6 | 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.12+commit.194ff033 | bzzr://5c709160f4bb4e6d6639d99a493bbf4ea7156022038ee75a12d714b88f2cb675 | {
"func_code_index": [
546,
623
]
} | 9,314 | |||
HungaryGold | HungaryGold.sol | 0x858b1f24940e64e08b6941946a29aa352f218ae6 | 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.12+commit.194ff033 | bzzr://5c709160f4bb4e6d6639d99a493bbf4ea7156022038ee75a12d714b88f2cb675 | {
"func_code_index": [
946,
1042
]
} | 9,315 | |||
HungaryGold | HungaryGold.sol | 0x858b1f24940e64e08b6941946a29aa352f218ae6 | 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.12+commit.194ff033 | bzzr://5c709160f4bb4e6d6639d99a493bbf4ea7156022038ee75a12d714b88f2cb675 | {
"func_code_index": [
1326,
1407
]
} | 9,316 | |||
HungaryGold | HungaryGold.sol | 0x858b1f24940e64e08b6941946a29aa352f218ae6 | 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.12+commit.194ff033 | bzzr://5c709160f4bb4e6d6639d99a493bbf4ea7156022038ee75a12d714b88f2cb675 | {
"func_code_index": [
1615,
1712
]
} | 9,317 | |||
HungaryGold | HungaryGold.sol | 0x858b1f24940e64e08b6941946a29aa352f218ae6 | Solidity | HungaryGold | contract HungaryGold 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 fun... | HungaryGold | function HungaryGold() {
balances[msg.sender] = 99999999999999999999999999999; // 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 = 99999999999999... | // 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.12+commit.194ff033 | bzzr://5c709160f4bb4e6d6639d99a493bbf4ea7156022038ee75a12d714b88f2cb675 | {
"func_code_index": [
1199,
2233
]
} | 9,318 | |||
HungaryGold | HungaryGold.sol | 0x858b1f24940e64e08b6941946a29aa352f218ae6 | Solidity | HungaryGold | contract HungaryGold 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 fun... | 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.12+commit.194ff033 | bzzr://5c709160f4bb4e6d6639d99a493bbf4ea7156022038ee75a12d714b88f2cb675 | {
"func_code_index": [
2789,
3594
]
} | 9,319 | |||
DONDIRoulette | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0x308c64faa8e33cd377df9dc0ff83683543e272db | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, addr... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | callOptionalReturn | function callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves.
// A Solidity high level call has three parts:
// 1. The target address is checke... | /**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://52894f00254319baee2c3b3c3e7f8fb09875c8232b435167010047b0970a4860 | {
"func_code_index": [
2127,
3246
]
} | 9,320 |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner = ms... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | Ownable | function Ownable() public {
owner = msg.sender;
}
| /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
269,
337
]
} | 9,321 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner = ms... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
682,
874
]
} | 9,322 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | AddressUtils | library AddressUtils {
/**
* Returns whether the target address is a contract
* @dev This function will return false if invoked during the constructor of a contract,
* as the code is not actually created until after the constructor finishes.
* @param addr address to check
* @return... | isContract | function isContract(address addr) internal view returns (bool) {
uint256 size;
// XXX Currently there is no better way to check if there is a contract in an address
// than to check the size of the code at that address.
// See https://ethereum.stackexchange.com/a/14016/36603
// for more details... | /**
* Returns whether the target address is a contract
* @dev This function will return false if invoked during the constructor of a contract,
* as the code is not actually created until after the constructor finishes.
* @param addr address to check
* @return whether the target address is a contract
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
372,
1006
]
} | 9,323 | |||
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* ... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
95,
302
]
} | 9,324 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* ... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
// uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return a / b;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
392,
692
]
} | 9,325 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* ... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
812,
940
]
} | 9,326 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* ... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
1010,
1156
]
} | 9,327 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721Receiver | contract ERC721Receiver {
/**
* @dev Magic value to be returned upon successful reception of an NFT
* Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`,
* which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
*/
bytes4 constant ERC721_RECE... | onERC721Received | function onERC721Received(address _from, uint256 _tokenId, bytes _data) public returns(bytes4);
| /**
* @notice Handle the receipt of an NFT
* @dev The ERC721 smart contract calls this function on the recipient
* after a `safetransfer`. This function MAY throw to revert and reject the
* transfer. This function MUST use 50,000 gas or less. Return of other
* than the magic value MUST result in the transa... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
1035,
1135
]
} | 9,328 | |||
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721BasicToken | contract ERC721BasicToken is ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4 constant ERC721_RECEIVED = 0... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public view returns (uint256) {
require(_owner != address(0));
return ownedTokensCount[_owner];
}
| /**
* @dev Gets the balance of the specified address
* @param _owner address to query the balance of
* @return uint256 representing the amount owned by the passed address
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
1580,
1740
]
} | 9,329 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721BasicToken | contract ERC721BasicToken is ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4 constant ERC721_RECEIVED = 0... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | ownerOf | function ownerOf(uint256 _tokenId) public view returns (address) {
address owner = tokenOwner[_tokenId];
require(owner != address(0));
return owner;
}
| /**
* @dev Gets the owner of the specified token ID
* @param _tokenId uint256 ID of the token to query the owner of
* @return owner address currently marked as the owner of the given token ID
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
1967,
2154
]
} | 9,330 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721BasicToken | contract ERC721BasicToken is ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4 constant ERC721_RECEIVED = 0... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | exists | function exists(uint256 _tokenId) public view returns (bool) {
address owner = tokenOwner[_tokenId];
return owner != address(0);
}
| /**
* @dev Returns whether the specified token exists
* @param _tokenId uint256 ID of the token to query the existence of
* @return whether the token exists
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
2346,
2504
]
} | 9,331 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721BasicToken | contract ERC721BasicToken is ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4 constant ERC721_RECEIVED = 0... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | approve | function approve(address _to, uint256 _tokenId) public {
address owner = ownerOf(_tokenId);
require(_to != owner);
require(msg.sender == owner || isApprovedForAll(owner, msg.sender));
if (getApproved(_tokenId) != address(0) || _to != address(0)) {
tokenApprovals[_tokenId] = _to;
... | /**
* @dev Approves another address to transfer the given token ID
* @dev The zero address indicates there is no approved address.
* @dev There can only be one approved address per token at a given time.
* @dev Can only be called by the token owner or an approved operator.
* @param _to address to be approved ... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
2947,
3345
]
} | 9,332 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721BasicToken | contract ERC721BasicToken is ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4 constant ERC721_RECEIVED = 0... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | getApproved | function getApproved(uint256 _tokenId) public view returns (address) {
return tokenApprovals[_tokenId];
}
| /**
* @dev Gets the approved address for a token ID, or zero if no address set
* @param _tokenId uint256 ID of the token to query the approval of
* @return address currently approved for the given token ID
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
3586,
3710
]
} | 9,333 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721BasicToken | contract ERC721BasicToken is ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4 constant ERC721_RECEIVED = 0... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | setApprovalForAll | function setApprovalForAll(address _to, bool _approved) public {
require(_to != msg.sender);
operatorApprovals[msg.sender][_to] = _approved;
ApprovalForAll(msg.sender, _to, _approved);
}
| /**
* @dev Sets or unsets the approval of a given operator
* @dev An operator is allowed to transfer all tokens of the sender on their behalf
* @param _to operator address to set the approval
* @param _approved representing the status of the approval to be set
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
4012,
4235
]
} | 9,334 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721BasicToken | contract ERC721BasicToken is ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4 constant ERC721_RECEIVED = 0... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | isApprovedForAll | function isApprovedForAll(address _owner, address _operator) public view returns (bool)
{
return operatorApprovals[_owner][_operator];
}
| /**
* @dev Tells whether an operator is approved by a given owner
* @param _owner owner address which you want to query the approval of
* @param _operator operator address which you want to query the approval of
* @return bool whether the given operator is approved by the given owner
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
4561,
4721
]
} | 9,335 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721BasicToken | contract ERC721BasicToken is ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4 constant ERC721_RECEIVED = 0... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _tokenId) public canTransfer(_tokenId)
{
require(_from != address(0));
require(_to != address(0));
clearApproval(_from, _tokenId);
removeTokenFrom(_from, _tokenId);
addTokenTo(_to, _tokenId);
Transfer(_from, _to, _tokenId);
}
... | /**
* @dev Transfers the ownership of a given token ID to another address
* @dev Usage of this method is discouraged, use `safeTransferFrom` whenever possible
* @dev Requires the msg sender to be the owner, approved, or operator
* @param _from current owner of the token
* @param _to address to receive the own... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
5172,
5528
]
} | 9,336 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721BasicToken | contract ERC721BasicToken is ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4 constant ERC721_RECEIVED = 0... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(address _from, address _to, uint256 _tokenId) public canTransfer(_tokenId)
{
// solium-disable-next-line arg-overflow
safeTransferFrom(_from, _to, _tokenId, "");
}
| /**
* @dev Safely transfers the ownership of a given token ID to another address
* @dev If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`; otherwise,
*... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
6176,
6398
]
} | 9,337 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721BasicToken | contract ERC721BasicToken is ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4 constant ERC721_RECEIVED = 0... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes _data) public canTransfer(_tokenId)
{
transferFrom(_from, _to, _tokenId);
// solium-disable-next-line arg-overflow
require(checkAndCallSafeTransfer(_from, _to, _tokenId, _data));
}
| /**
* @dev Safely transfers the ownership of a given token ID to another address
* @dev If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`; otherwise,
*... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
7120,
7420
]
} | 9,338 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721BasicToken | contract ERC721BasicToken is ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4 constant ERC721_RECEIVED = 0... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | isApprovedOrOwner | function isApprovedOrOwner(address _spender, uint256 _tokenId) internal view returns (bool)
{
address owner = ownerOf(_tokenId);
// Disable solium check because of
// https://github.com/duaraghav8/Solium/issues/175
// solium-disable-next-line operator-whitespace
return (
_spender == owner... | /**
* @dev Returns whether the given spender can transfer a given token ID
* @param _spender address of the spender to query
* @param _tokenId uint256 ID of the token to be transferred
* @return bool whether the msg.sender is approved for the given token ID,
* is an operator of the owner, or is the owner of ... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
7787,
8251
]
} | 9,339 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721BasicToken | contract ERC721BasicToken is ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4 constant ERC721_RECEIVED = 0... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | _mint | function _mint(address _to, uint256 _tokenId) internal {
require(_to != address(0));
addTokenTo(_to, _tokenId);
Transfer(address(0), _to, _tokenId);
}
| /**
* @dev Internal function to mint a new token
* @dev Reverts if the given token ID already exists
* @param _to The address that will own the minted token
* @param _tokenId uint256 ID of the token to be minted by the msg.sender
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
8522,
8709
]
} | 9,340 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721BasicToken | contract ERC721BasicToken is ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4 constant ERC721_RECEIVED = 0... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | _burn | function _burn(address _owner, uint256 _tokenId) internal {
clearApproval(_owner, _tokenId);
removeTokenFrom(_owner, _tokenId);
Transfer(_owner, address(0), _tokenId);
}
| /**
* @dev Internal function to burn a specific token
* @dev Reverts if the token does not exist
* @param _tokenId uint256 ID of the token being burned by the msg.sender
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
8914,
9120
]
} | 9,341 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721BasicToken | contract ERC721BasicToken is ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4 constant ERC721_RECEIVED = 0... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | clearApproval | function clearApproval(address _owner, uint256 _tokenId) internal {
require(ownerOf(_tokenId) == _owner);
if (tokenApprovals[_tokenId] != address(0)) {
tokenApprovals[_tokenId] = address(0);
Approval(_owner, address(0), _tokenId);
}
}
| /**
* @dev Internal function to clear current approval of a given token ID
* @dev Reverts if the given address is not indeed the owner of the token
* @param _owner owner of the token
* @param _tokenId uint256 ID of the token to be transferred
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
9404,
9701
]
} | 9,342 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721BasicToken | contract ERC721BasicToken is ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4 constant ERC721_RECEIVED = 0... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | addTokenTo | function addTokenTo(address _to, uint256 _tokenId) internal {
require(tokenOwner[_tokenId] == address(0));
tokenOwner[_tokenId] = _to;
ownedTokensCount[_to] = ownedTokensCount[_to].add(1);
}
| /**
* @dev Internal function to add a token ID to the list of a given address
* @param _to address representing the new owner of the given token ID
* @param _tokenId uint256 ID of the token to be added to the tokens list of the given address
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
9978,
10205
]
} | 9,343 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721BasicToken | contract ERC721BasicToken is ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4 constant ERC721_RECEIVED = 0... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | removeTokenFrom | function removeTokenFrom(address _from, uint256 _tokenId) internal {
require(ownerOf(_tokenId) == _from);
ownedTokensCount[_from] = ownedTokensCount[_from].sub(1);
tokenOwner[_tokenId] = address(0);
}
| /**
* @dev Internal function to remove a token ID from the list of a given address
* @param _from address representing the previous owner of the given token ID
* @param _tokenId uint256 ID of the token to be removed from the tokens list of the given address
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
10498,
10735
]
} | 9,344 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721BasicToken | contract ERC721BasicToken is ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4 constant ERC721_RECEIVED = 0... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | checkAndCallSafeTransfer | function checkAndCallSafeTransfer(address _from, address _to, uint256 _tokenId, bytes _data) internal returns (bool)
{
if (!_to.isContract()) {
return true;
}
bytes4 retval = ERC721Receiver(_to).onERC721Received(
_from, _tokenId, _data);
return (retval == ERC721_RECEIVED);
}
| /**
* @dev Internal function to invoke `onERC721Received` on a target address
* @dev The call is not executed if the target address is not a contract
* @param _from address representing the previous owner of the given token ID
* @param _to target address that will receive the tokens
* @param _tokenId uint256 ... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
11272,
11620
]
} | 9,345 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721Token | contract ERC721Token is ERC721, ERC721BasicToken {
// Token name
string internal name_;
// Token symbol
string internal symbol_;
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) internal ownedTokens;
// Mapping from token ID to index of the owner to... | /**
* @title Full ERC721 Token
* This implementation includes all the required and some optional functionality of the ERC721 standard
* Moreover, it includes approve all functionality using operator terminology
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | ERC721Token | function ERC721Token(string _name, string _symbol) public {
name_ = _name;
symbol_ = _symbol;
}
| /**
* @dev Constructor function
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
756,
879
]
} | 9,346 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721Token | contract ERC721Token is ERC721, ERC721BasicToken {
// Token name
string internal name_;
// Token symbol
string internal symbol_;
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) internal ownedTokens;
// Mapping from token ID to index of the owner to... | /**
* @title Full ERC721 Token
* This implementation includes all the required and some optional functionality of the ERC721 standard
* Moreover, it includes approve all functionality using operator terminology
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | name | function name() public view returns (string) {
return name_;
}
| /**
* @dev Gets the token name
* @return string representing the token name
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
984,
1065
]
} | 9,347 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721Token | contract ERC721Token is ERC721, ERC721BasicToken {
// Token name
string internal name_;
// Token symbol
string internal symbol_;
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) internal ownedTokens;
// Mapping from token ID to index of the owner to... | /**
* @title Full ERC721 Token
* This implementation includes all the required and some optional functionality of the ERC721 standard
* Moreover, it includes approve all functionality using operator terminology
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | symbol | function symbol() public view returns (string) {
return symbol_;
}
| /**
* @dev Gets the token symbol
* @return string representing the token symbol
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
1174,
1259
]
} | 9,348 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721Token | contract ERC721Token is ERC721, ERC721BasicToken {
// Token name
string internal name_;
// Token symbol
string internal symbol_;
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) internal ownedTokens;
// Mapping from token ID to index of the owner to... | /**
* @title Full ERC721 Token
* This implementation includes all the required and some optional functionality of the ERC721 standard
* Moreover, it includes approve all functionality using operator terminology
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | tokenURI | function tokenURI(uint256 _tokenId) public view returns (string) {
require(exists(_tokenId));
return tokenURIs[_tokenId];
}
| /**
* @dev Returns an URI for a given token ID
* @dev Throws if the token ID does not exist. May return an empty string.
* @param _tokenId uint256 ID of the token to query
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
1466,
1617
]
} | 9,349 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721Token | contract ERC721Token is ERC721, ERC721BasicToken {
// Token name
string internal name_;
// Token symbol
string internal symbol_;
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) internal ownedTokens;
// Mapping from token ID to index of the owner to... | /**
* @title Full ERC721 Token
* This implementation includes all the required and some optional functionality of the ERC721 standard
* Moreover, it includes approve all functionality using operator terminology
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | tokenOfOwnerByIndex | function tokenOfOwnerByIndex(address _owner, uint256 _index) public view returns (uint256)
{
require(_index < balanceOf(_owner));
return ownedTokens[_owner][_index];
}
| /**
* @dev Gets the token ID at a given index of the tokens list of the requested owner
* @param _owner address owning the tokens list to be accessed
* @param _index uint256 representing the index to be accessed of the requested tokens list
* @return uint256 token ID at the given index of the tokens list owned ... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
1995,
2195
]
} | 9,350 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721Token | contract ERC721Token is ERC721, ERC721BasicToken {
// Token name
string internal name_;
// Token symbol
string internal symbol_;
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) internal ownedTokens;
// Mapping from token ID to index of the owner to... | /**
* @title Full ERC721 Token
* This implementation includes all the required and some optional functionality of the ERC721 standard
* Moreover, it includes approve all functionality using operator terminology
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | tokensOfOwner | function tokensOfOwner(address _owner) public view returns (uint256[])
{
return ownedTokens[_owner];
}
| /**
* @dev Gets list of tokens of the requested owner
* @param _owner address owning the tokens list to be accessed
* @return uint256[] token IDs
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
2376,
2502
]
} | 9,351 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721Token | contract ERC721Token is ERC721, ERC721BasicToken {
// Token name
string internal name_;
// Token symbol
string internal symbol_;
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) internal ownedTokens;
// Mapping from token ID to index of the owner to... | /**
* @title Full ERC721 Token
* This implementation includes all the required and some optional functionality of the ERC721 standard
* Moreover, it includes approve all functionality using operator terminology
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return allTokens.length;
}
| /**
* @dev Gets the total amount of tokens stored by the contract
* @return uint256 representing the total amount of tokens
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
2655,
2755
]
} | 9,352 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721Token | contract ERC721Token is ERC721, ERC721BasicToken {
// Token name
string internal name_;
// Token symbol
string internal symbol_;
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) internal ownedTokens;
// Mapping from token ID to index of the owner to... | /**
* @title Full ERC721 Token
* This implementation includes all the required and some optional functionality of the ERC721 standard
* Moreover, it includes approve all functionality using operator terminology
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | tokenByIndex | function tokenByIndex(uint256 _index) public view returns (uint256) {
require(_index < totalSupply());
return allTokens[_index];
}
| /**
* @dev Gets the token ID at a given index of all the tokens in this contract
* @dev Reverts if the index is greater or equal to the total number of tokens
* @param _index uint256 representing the index to be accessed of the tokens list
* @return uint256 token ID at the given index of the tokens list
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
3101,
3259
]
} | 9,353 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721Token | contract ERC721Token is ERC721, ERC721BasicToken {
// Token name
string internal name_;
// Token symbol
string internal symbol_;
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) internal ownedTokens;
// Mapping from token ID to index of the owner to... | /**
* @title Full ERC721 Token
* This implementation includes all the required and some optional functionality of the ERC721 standard
* Moreover, it includes approve all functionality using operator terminology
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | _setTokenURI | function _setTokenURI(uint256 _tokenId, string _uri) internal {
require(exists(_tokenId));
tokenURIs[_tokenId] = _uri;
}
| /**
* @dev Internal function to set the token URI for a given token
* @dev Reverts if the token ID does not exist
* @param _tokenId uint256 ID of the token to set its URI
* @param _uri string URI to assign
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
3506,
3654
]
} | 9,354 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721Token | contract ERC721Token is ERC721, ERC721BasicToken {
// Token name
string internal name_;
// Token symbol
string internal symbol_;
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) internal ownedTokens;
// Mapping from token ID to index of the owner to... | /**
* @title Full ERC721 Token
* This implementation includes all the required and some optional functionality of the ERC721 standard
* Moreover, it includes approve all functionality using operator terminology
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | addTokenTo | function addTokenTo(address _to, uint256 _tokenId) internal {
super.addTokenTo(_to, _tokenId);
uint256 length = ownedTokens[_to].length;
ownedTokens[_to].push(_tokenId);
ownedTokensIndex[_tokenId] = length;
}
| /**
* @dev Internal function to add a token ID to the list of a given address
* @param _to address representing the new owner of the given token ID
* @param _tokenId uint256 ID of the token to be added to the tokens list of the given address
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
3931,
4185
]
} | 9,355 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721Token | contract ERC721Token is ERC721, ERC721BasicToken {
// Token name
string internal name_;
// Token symbol
string internal symbol_;
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) internal ownedTokens;
// Mapping from token ID to index of the owner to... | /**
* @title Full ERC721 Token
* This implementation includes all the required and some optional functionality of the ERC721 standard
* Moreover, it includes approve all functionality using operator terminology
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | removeTokenFrom | function removeTokenFrom(address _from, uint256 _tokenId) internal {
super.removeTokenFrom(_from, _tokenId);
uint256 tokenIndex = ownedTokensIndex[_tokenId];
uint256 lastTokenIndex = ownedTokens[_from].length.sub(1);
uint256 lastToken = ownedTokens[_from][lastTokenIndex];
ownedTokens[_from]... | /**
* @dev Internal function to remove a token ID from the list of a given address
* @param _from address representing the previous owner of the given token ID
* @param _tokenId uint256 ID of the token to be removed from the tokens list of the given address
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
4478,
5405
]
} | 9,356 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721Token | contract ERC721Token is ERC721, ERC721BasicToken {
// Token name
string internal name_;
// Token symbol
string internal symbol_;
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) internal ownedTokens;
// Mapping from token ID to index of the owner to... | /**
* @title Full ERC721 Token
* This implementation includes all the required and some optional functionality of the ERC721 standard
* Moreover, it includes approve all functionality using operator terminology
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | _mint | function _mint(address _to, uint256 _tokenId) internal {
super._mint(_to, _tokenId);
allTokensIndex[_tokenId] = allTokens.length;
allTokens.push(_tokenId);
}
| /**
* @dev Internal function to mint a new token
* @dev Reverts if the given token ID already exists
* @param _to address the beneficiary that will own the minted token
* @param _tokenId uint256 ID of the token to be minted by the msg.sender
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
5688,
5884
]
} | 9,357 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | ERC721Token | contract ERC721Token is ERC721, ERC721BasicToken {
// Token name
string internal name_;
// Token symbol
string internal symbol_;
// Mapping from owner to list of owned token IDs
mapping(address => uint256[]) internal ownedTokens;
// Mapping from token ID to index of the owner to... | /**
* @title Full ERC721 Token
* This implementation includes all the required and some optional functionality of the ERC721 standard
* Moreover, it includes approve all functionality using operator terminology
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | _burn | function _burn(address _owner, uint256 _tokenId) internal {
super._burn(_owner, _tokenId);
// Clear metadata (if any)
if (bytes(tokenURIs[_tokenId]).length != 0) {
delete tokenURIs[_tokenId];
}
// Reorg all tokens array
uint256 tokenIndex = allTokensIndex[_tokenId];
uint2... | /**
* @dev Internal function to burn a specific token
* @dev Reverts if the token does not exist
* @param _owner owner of the token to burn
* @param _tokenId uint256 ID of the token being burned by the msg.sender
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
6140,
6809
]
} | 9,358 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | MintableToken | contract MintableToken is ERC721Token, Ownable {
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
require(!mintingFinished);
_;
}
function mint(address _to, uint256 _tokenId) public onlyOwner canMint {
_mint(_to, _tokenId);
}
... | finishMinting | function finishMinting() onlyOwner canMint public returns (bool) {
mintingFinished = true;
MintFinished();
return true;
}
| /**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
627,
785
]
} | 9,359 | |||
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | CappedToken | contract CappedToken is MintableToken {
uint256 public cap;
function CappedToken(uint256 _cap) public {
require(_cap > 0);
cap = _cap;
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _tokenId id of th... | /**
* @title Capped token
* @dev Mintable token with a token cap.
*/ | NatSpecMultiLine | mint | function mint(address _to, uint256 _tokenId) onlyOwner canMint public {
require(totalSupply().add(1) <= cap);
return super.mint(_to, _tokenId);
}
| /**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _tokenId id of the new token
* @return A boolean that indicates if the operation was successful.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
416,
591
]
} | 9,360 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | Pausable | contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
require(!paused);
_;
}
/**
* @dev Mo... | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/ | NatSpecMultiLine | pause | function pause() onlyOwner whenNotPaused public {
paused = true;
Pause();
}
| /**
* @dev called by the owner to pause, triggers stopped state
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
559,
662
]
} | 9,361 | |
Token | Token.sol | 0x93c157f72f2a35f722fb7e71c52f6269cacd9f0d | Solidity | Pausable | contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
require(!paused);
_;
}
/**
* @dev Mo... | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/ | NatSpecMultiLine | unpause | function unpause() onlyOwner whenPaused public {
paused = false;
Unpause();
}
| /**
* @dev called by the owner to unpause, returns to normal state
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7240e0bfe8ce7d8ba5e415d48bb9731af65b7eba9882d3d38c4dca09c37f0226 | {
"func_code_index": [
752,
857
]
} | 9,362 | |
DOUBLEDIVS | DOUBLEDIVS.sol | 0x8e648139985398ddf0a0349982df65f33b1aee73 | Solidity | DOUBLEDIVS | contract DOUBLEDIVS{
using SafeMath for uint256;
mapping(address => uint256) investments;
mapping(address => uint256) joined;
mapping(address => uint256) withdrawals;
mapping(address => uint256) referrer;
uint256 public minimum = 10000000000000000;
uint256 public step = 50;
... | /**
* https://doubledivs.cash/
* _______ ______ __ __ .______ __ _______
* | \ / __ \ | | | | | _ \ | | | ____|
* | .--. | | | | | | | | | |_) | | | | |__
* | | | | | | | | | | | | _ < | | | __|
* | ... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner, address newOwnerWallet) public onlyOwner {
require(newOwner != address(0));
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
ownerWallet = newOwnerWallet;
}
| /**
* @dev Allows current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
* @param newOwnerWallet The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://29d84ff5d3afaae088ae862df56b595949a26a6fe9d12c9737c8789e2de01238 | {
"func_code_index": [
1466,
1726
]
} | 9,363 | |
DOUBLEDIVS | DOUBLEDIVS.sol | 0x8e648139985398ddf0a0349982df65f33b1aee73 | Solidity | DOUBLEDIVS | contract DOUBLEDIVS{
using SafeMath for uint256;
mapping(address => uint256) investments;
mapping(address => uint256) joined;
mapping(address => uint256) withdrawals;
mapping(address => uint256) referrer;
uint256 public minimum = 10000000000000000;
uint256 public step = 50;
... | /**
* https://doubledivs.cash/
* _______ ______ __ __ .______ __ _______
* | \ / __ \ | | | | | _ \ | | | ____|
* | .--. | | | | | | | | | |_) | | | | |__
* | | | | | | | | | | | | _ < | | | __|
* | ... | NatSpecMultiLine | function () external payable {
require(msg.value >= minimum);
if (investments[msg.sender] > 0){
if (withdraw()){
withdrawals[msg.sender] = 0;
}
}
investments[msg.sender] = investments[msg.sender].add(msg.value);
joined[msg.sender] = block.timestamp;
ownerWall... | /**
* @dev Investments
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://29d84ff5d3afaae088ae862df56b595949a26a6fe9d12c9737c8789e2de01238 | {
"func_code_index": [
1772,
2279
]
} | 9,364 | ||
DOUBLEDIVS | DOUBLEDIVS.sol | 0x8e648139985398ddf0a0349982df65f33b1aee73 | Solidity | DOUBLEDIVS | contract DOUBLEDIVS{
using SafeMath for uint256;
mapping(address => uint256) investments;
mapping(address => uint256) joined;
mapping(address => uint256) withdrawals;
mapping(address => uint256) referrer;
uint256 public minimum = 10000000000000000;
uint256 public step = 50;
... | /**
* https://doubledivs.cash/
* _______ ______ __ __ .______ __ _______
* | \ / __ \ | | | | | _ \ | | | ____|
* | .--. | | | | | | | | | |_) | | | | |__
* | | | | | | | | | | | | _ < | | | __|
* | ... | NatSpecMultiLine | getBalance | function getBalance(address _address) view public returns (uint256) {
uint256 minutesCount = now.sub(joined[_address]).div(1 minutes);
uint256 percent = investments[_address].mul(step).div(100);
uint256 different = percent.mul(minutesCount).div(1440);
uint256 balance = different.sub(withdrawals[_add... | /**
* @dev Evaluate current balance
* @param _address Address of investor
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://29d84ff5d3afaae088ae862df56b595949a26a6fe9d12c9737c8789e2de01238 | {
"func_code_index": [
2379,
2761
]
} | 9,365 | |
DOUBLEDIVS | DOUBLEDIVS.sol | 0x8e648139985398ddf0a0349982df65f33b1aee73 | Solidity | DOUBLEDIVS | contract DOUBLEDIVS{
using SafeMath for uint256;
mapping(address => uint256) investments;
mapping(address => uint256) joined;
mapping(address => uint256) withdrawals;
mapping(address => uint256) referrer;
uint256 public minimum = 10000000000000000;
uint256 public step = 50;
... | /**
* https://doubledivs.cash/
* _______ ______ __ __ .______ __ _______
* | \ / __ \ | | | | | _ \ | | | ____|
* | .--. | | | | | | | | | |_) | | | | |__
* | | | | | | | | | | | | _ < | | | __|
* | ... | NatSpecMultiLine | withdraw | function withdraw() public returns (bool){
require(joined[msg.sender] > 0);
uint256 balance = getBalance(msg.sender);
if (address(this).balance > balance){
if (balance > 0){
withdrawals[msg.sender] = withdrawals[msg.sender].add(balance);
msg.sender.transfer(balance);
... | /**
* @dev Withdraw dividends from contract
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://29d84ff5d3afaae088ae862df56b595949a26a6fe9d12c9737c8789e2de01238 | {
"func_code_index": [
2826,
3329
]
} | 9,366 | |
DOUBLEDIVS | DOUBLEDIVS.sol | 0x8e648139985398ddf0a0349982df65f33b1aee73 | Solidity | DOUBLEDIVS | contract DOUBLEDIVS{
using SafeMath for uint256;
mapping(address => uint256) investments;
mapping(address => uint256) joined;
mapping(address => uint256) withdrawals;
mapping(address => uint256) referrer;
uint256 public minimum = 10000000000000000;
uint256 public step = 50;
... | /**
* https://doubledivs.cash/
* _______ ______ __ __ .______ __ _______
* | \ / __ \ | | | | | _ \ | | | ____|
* | .--. | | | | | | | | | |_) | | | | |__
* | | | | | | | | | | | | _ < | | | __|
* | ... | NatSpecMultiLine | bounty | function bounty() public {
uint256 refBalance = checkReferral(msg.sender);
if(refBalance >= minimum) {
if (address(this).balance > refBalance) {
referrer[msg.sender] = 0;
msg.sender.transfer(refBalance);
emit Bounty(msg.sender, refBalance);
}
}
... | /**
* @dev Bounty reward
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://29d84ff5d3afaae088ae862df56b595949a26a6fe9d12c9737c8789e2de01238 | {
"func_code_index": [
3379,
3741
]
} | 9,367 | |
DOUBLEDIVS | DOUBLEDIVS.sol | 0x8e648139985398ddf0a0349982df65f33b1aee73 | Solidity | DOUBLEDIVS | contract DOUBLEDIVS{
using SafeMath for uint256;
mapping(address => uint256) investments;
mapping(address => uint256) joined;
mapping(address => uint256) withdrawals;
mapping(address => uint256) referrer;
uint256 public minimum = 10000000000000000;
uint256 public step = 50;
... | /**
* https://doubledivs.cash/
* _______ ______ __ __ .______ __ _______
* | \ / __ \ | | | | | _ \ | | | ____|
* | .--. | | | | | | | | | |_) | | | | |__
* | | | | | | | | | | | | _ < | | | __|
* | ... | NatSpecMultiLine | checkBalance | function checkBalance() public view returns (uint256) {
return getBalance(msg.sender);
}
| /**
* @dev Gets balance of the sender address.
* @return An uint256 representing the amount owned by the msg.sender.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://29d84ff5d3afaae088ae862df56b595949a26a6fe9d12c9737c8789e2de01238 | {
"func_code_index": [
3884,
3991
]
} | 9,368 | |
DOUBLEDIVS | DOUBLEDIVS.sol | 0x8e648139985398ddf0a0349982df65f33b1aee73 | Solidity | DOUBLEDIVS | contract DOUBLEDIVS{
using SafeMath for uint256;
mapping(address => uint256) investments;
mapping(address => uint256) joined;
mapping(address => uint256) withdrawals;
mapping(address => uint256) referrer;
uint256 public minimum = 10000000000000000;
uint256 public step = 50;
... | /**
* https://doubledivs.cash/
* _______ ______ __ __ .______ __ _______
* | \ / __ \ | | | | | _ \ | | | ____|
* | .--. | | | | | | | | | |_) | | | | |__
* | | | | | | | | | | | | _ < | | | __|
* | ... | NatSpecMultiLine | checkWithdrawals | function checkWithdrawals(address _investor) public view returns (uint256) {
return withdrawals[_investor];
}
| /**
* @dev Gets withdrawals of the specified address.
* @param _investor The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://29d84ff5d3afaae088ae862df56b595949a26a6fe9d12c9737c8789e2de01238 | {
"func_code_index": [
4210,
4338
]
} | 9,369 | |
DOUBLEDIVS | DOUBLEDIVS.sol | 0x8e648139985398ddf0a0349982df65f33b1aee73 | Solidity | DOUBLEDIVS | contract DOUBLEDIVS{
using SafeMath for uint256;
mapping(address => uint256) investments;
mapping(address => uint256) joined;
mapping(address => uint256) withdrawals;
mapping(address => uint256) referrer;
uint256 public minimum = 10000000000000000;
uint256 public step = 50;
... | /**
* https://doubledivs.cash/
* _______ ______ __ __ .______ __ _______
* | \ / __ \ | | | | | _ \ | | | ____|
* | .--. | | | | | | | | | |_) | | | | |__
* | | | | | | | | | | | | _ < | | | __|
* | ... | NatSpecMultiLine | checkInvestments | function checkInvestments(address _investor) public view returns (uint256) {
return investments[_investor];
}
| /**
* @dev Gets investments of the specified address.
* @param _investor The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://29d84ff5d3afaae088ae862df56b595949a26a6fe9d12c9737c8789e2de01238 | {
"func_code_index": [
4557,
4685
]
} | 9,370 | |
DOUBLEDIVS | DOUBLEDIVS.sol | 0x8e648139985398ddf0a0349982df65f33b1aee73 | Solidity | DOUBLEDIVS | contract DOUBLEDIVS{
using SafeMath for uint256;
mapping(address => uint256) investments;
mapping(address => uint256) joined;
mapping(address => uint256) withdrawals;
mapping(address => uint256) referrer;
uint256 public minimum = 10000000000000000;
uint256 public step = 50;
... | /**
* https://doubledivs.cash/
* _______ ______ __ __ .______ __ _______
* | \ / __ \ | | | | | _ \ | | | ____|
* | .--. | | | | | | | | | |_) | | | | |__
* | | | | | | | | | | | | _ < | | | __|
* | ... | NatSpecMultiLine | checkReferral | function checkReferral(address _hunter) public view returns (uint256) {
return referrer[_hunter];
}
| /**
* @dev Gets referrer balance of the specified address.
* @param _hunter The address of the referrer
* @return An uint256 representing the referral earnings.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://29d84ff5d3afaae088ae862df56b595949a26a6fe9d12c9737c8789e2de01238 | {
"func_code_index": [
4877,
4995
]
} | 9,371 | |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
259,
445
]
} | 9,372 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
723,
864
]
} | 9,373 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
1162,
1359
]
} | 9,374 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
1613,
2089
]
} | 9,375 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
2560,
2697
]
} | 9,376 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
3188,
3471
]
} | 9,377 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
3931,
4066
]
} | 9,378 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
4546,
4717
]
} | 9,379 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// This method relies in extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
606,
1033
]
} | 9,380 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
1963,
2365
]
} | 9,381 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
3121,
3299
]
} | 9,382 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
3524,
3725
]
} | 9,383 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
4095,
4326
]
} | 9,384 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
4577,
4898
]
} | 9,385 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _add | function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
retur... | /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
908,
1327
]
} | 9,386 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _remove | function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) { // Equivalent to contains(set, value)
// To delete an element f... | /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
1498,
3047
]
} | 9,387 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _contains | function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
3128,
3262
]
} | 9,388 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _length | function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
3343,
3457
]
} | 9,389 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _at | function _at(Set storage set, uint256 index) private view returns (bytes32) {
require(set._values.length > index, "EnumerableSet: index out of bounds");
return set._values[index];
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
3796,
4005
]
} | 9,390 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | add | function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
4254,
4402
]
} | 9,391 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | remove | function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
4573,
4727
]
} | 9,392 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | contains | function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
4808,
4971
]
} | 9,393 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | length | function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values in the set. O(1).
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
5052,
5174
]
} | 9,394 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | at | function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint256(_at(set._inner, index)));
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
5513,
5667
]
} | 9,395 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | add | function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
5912,
6048
]
} | 9,396 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | remove | function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
6219,
6361
]
} | 9,397 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | contains | function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
6442,
6593
]
} | 9,398 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | length | function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
6674,
6793
]
} | 9,399 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | at | function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
7132,
7274
]
} | 9,400 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, add... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | safeApprove | function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line ... | /**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
747,
1374
]
} | 9,401 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, add... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | _callOptionalReturn | function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target ad... | /**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi... | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
2393,
3159
]
} | 9,402 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
94,
154
]
} | 9,403 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
237,
310
]
} | 9,404 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
534,
616
]
} | 9,405 |
Vault | Vault.sol | 0x8ce610ec56ce3ad3678c426f0dfc965568db6ddc | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://1856e7c256ec8ffeca9a098693359e57ee947766cbac10a43db675a174fefa7f | {
"func_code_index": [
895,
983
]
} | 9,406 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.