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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DopeyDoge | DopeyDoge.sol | 0x091102444cc671be7076b9f2f35cfa4c91fa624f | 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 ... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.8.1+commit.df193b15 | MIT | ipfs://2c4c8f6fcc2e8a2535aebfc93a56ac2d0887c307832d7b025a6030e68736d783 | {
"func_code_index": [
2560,
2697
]
} | 21,000 | ||
DopeyDoge | DopeyDoge.sol | 0x091102444cc671be7076b9f2f35cfa4c91fa624f | 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 ... | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.8.1+commit.df193b15 | MIT | ipfs://2c4c8f6fcc2e8a2535aebfc93a56ac2d0887c307832d7b025a6030e68736d783 | {
"func_code_index": [
3188,
3471
]
} | 21,001 | ||
DopeyDoge | DopeyDoge.sol | 0x091102444cc671be7076b9f2f35cfa4c91fa624f | 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 ... | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.8.1+commit.df193b15 | MIT | ipfs://2c4c8f6fcc2e8a2535aebfc93a56ac2d0887c307832d7b025a6030e68736d783 | {
"func_code_index": [
3931,
4066
]
} | 21,002 | ||
DopeyDoge | DopeyDoge.sol | 0x091102444cc671be7076b9f2f35cfa4c91fa624f | 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 ... | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.8.1+commit.df193b15 | MIT | ipfs://2c4c8f6fcc2e8a2535aebfc93a56ac2d0887c307832d7b025a6030e68736d783 | {
"func_code_index": [
4546,
4717
]
} | 21,003 | ||
DopeyDoge | DopeyDoge.sol | 0x091102444cc671be7076b9f2f35cfa4c91fa624f | 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 ... | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.8.1+commit.df193b15 | MIT | ipfs://2c4c8f6fcc2e8a2535aebfc93a56ac2d0887c307832d7b025a6030e68736d783 | {
"func_code_index": [
606,
1230
]
} | 21,004 | ||
DopeyDoge | DopeyDoge.sol | 0x091102444cc671be7076b9f2f35cfa4c91fa624f | 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 ... | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.8.1+commit.df193b15 | MIT | ipfs://2c4c8f6fcc2e8a2535aebfc93a56ac2d0887c307832d7b025a6030e68736d783 | {
"func_code_index": [
2160,
2562
]
} | 21,005 | ||
DopeyDoge | DopeyDoge.sol | 0x091102444cc671be7076b9f2f35cfa4c91fa624f | 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 ... | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.8.1+commit.df193b15 | MIT | ipfs://2c4c8f6fcc2e8a2535aebfc93a56ac2d0887c307832d7b025a6030e68736d783 | {
"func_code_index": [
3318,
3496
]
} | 21,006 | ||
DopeyDoge | DopeyDoge.sol | 0x091102444cc671be7076b9f2f35cfa4c91fa624f | 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 ... | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | MIT | ipfs://2c4c8f6fcc2e8a2535aebfc93a56ac2d0887c307832d7b025a6030e68736d783 | {
"func_code_index": [
3721,
3922
]
} | 21,007 | ||
DopeyDoge | DopeyDoge.sol | 0x091102444cc671be7076b9f2f35cfa4c91fa624f | 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 ... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.8.1+commit.df193b15 | MIT | ipfs://2c4c8f6fcc2e8a2535aebfc93a56ac2d0887c307832d7b025a6030e68736d783 | {
"func_code_index": [
4292,
4523
]
} | 21,008 | ||
DopeyDoge | DopeyDoge.sol | 0x091102444cc671be7076b9f2f35cfa4c91fa624f | 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 ... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | MIT | ipfs://2c4c8f6fcc2e8a2535aebfc93a56ac2d0887c307832d7b025a6030e68736d783 | {
"func_code_index": [
4774,
5095
]
} | 21,009 | ||
DopeyDoge | DopeyDoge.sol | 0x091102444cc671be7076b9f2f35cfa4c91fa624f | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
address msgSender = _msgSender();
... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | MIT | ipfs://2c4c8f6fcc2e8a2535aebfc93a56ac2d0887c307832d7b025a6030e68736d783 | {
"func_code_index": [
488,
572
]
} | 21,010 | ||
DopeyDoge | DopeyDoge.sol | 0x091102444cc671be7076b9f2f35cfa4c91fa624f | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
address msgSender = _msgSender();
... | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | MIT | ipfs://2c4c8f6fcc2e8a2535aebfc93a56ac2d0887c307832d7b025a6030e68736d783 | {
"func_code_index": [
1130,
1283
]
} | 21,011 | ||
DopeyDoge | DopeyDoge.sol | 0x091102444cc671be7076b9f2f35cfa4c91fa624f | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
address msgSender = _msgSender();
... | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | MIT | ipfs://2c4c8f6fcc2e8a2535aebfc93a56ac2d0887c307832d7b025a6030e68736d783 | {
"func_code_index": [
1433,
1682
]
} | 21,012 | ||
AniCatsWorld | contracts/AniCatsWorld.sol | 0xc717eec278199cceb84c6fd33683d772cba02218 | Solidity | AniCatsWorld | contract AniCatsWorld is ERC721, Ownable {
uint constant public TICKET_ID = 0;
uint constant public MAX_SUPPLY = 9000; // 9000 unique AniCats will be in total.
uint constant public PRICE = 0.07 ether; // 0.07 ETH + gas per transaction
uint constant public PRESALE_PRICE = 0.065 ether; // 0.07 ETH +... | claimGiveAway | function claimGiveAway(address to, uint amount) external onlyOwner() {
require(amount <= claimLimit, "All mintpasses were claimed");
claimedWithMintpass[to] += amount;
claimLimit -= amount;
mintNFTs(amount);
}
| // Giveaway from Claim bucket | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
2791,
3048
]
} | 21,013 | ||||
AniCatsWorld | contracts/AniCatsWorld.sol | 0xc717eec278199cceb84c6fd33683d772cba02218 | Solidity | AniCatsWorld | contract AniCatsWorld is ERC721, Ownable {
uint constant public TICKET_ID = 0;
uint constant public MAX_SUPPLY = 9000; // 9000 unique AniCats will be in total.
uint constant public PRICE = 0.07 ether; // 0.07 ETH + gas per transaction
uint constant public PRESALE_PRICE = 0.065 ether; // 0.07 ETH +... | addToPresale | function addToPresale(address wallet) public onlyOwner() {
presaleList[wallet] = true;
}
| // endregion
// Presale helper methods region | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3259,
3366
]
} | 21,014 | ||||
AniCatsWorld | contracts/AniCatsWorld.sol | 0xc717eec278199cceb84c6fd33683d772cba02218 | Solidity | AniCatsWorld | contract AniCatsWorld is ERC721, Ownable {
uint constant public TICKET_ID = 0;
uint constant public MAX_SUPPLY = 9000; // 9000 unique AniCats will be in total.
uint constant public PRICE = 0.07 ether; // 0.07 ETH + gas per transaction
uint constant public PRESALE_PRICE = 0.065 ether; // 0.07 ETH +... | claim | function claim(uint amount) external {
require(isClaimingAvailable, "Claiming is not available");
require(amount <= claimLimit, "All mintpasses were claimed");
uint tickets = mintPassContract.balanceOf(msg.sender, TICKET_ID);
require(claimedWithMintpass[msg.sender] + amount <= tickets, "Insufficie... | // endregion
// Claim a token using Mintpass ticket | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3945,
4427
]
} | 21,015 | ||||
AniCatsWorld | contracts/AniCatsWorld.sol | 0xc717eec278199cceb84c6fd33683d772cba02218 | Solidity | AniCatsWorld | contract AniCatsWorld is ERC721, Ownable {
uint constant public TICKET_ID = 0;
uint constant public MAX_SUPPLY = 9000; // 9000 unique AniCats will be in total.
uint constant public PRICE = 0.07 ether; // 0.07 ETH + gas per transaction
uint constant public PRESALE_PRICE = 0.065 ether; // 0.07 ETH +... | mint | function mint(uint amount) external payable {
require(isMintingAvailable, "Minting is not available");
require(tokensMinted + amount <= MAX_SUPPLY - reservedTokensLimit - claimLimit, "Tokens supply reached limit");
require(amount > 0 && amount <= MINT_PER_TX_LIMIT, "Can only mint 20 tokens at a time");
... | // Main sale mint | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
4680,
5123
]
} | 21,016 | ||||
AniCatsWorld | contracts/AniCatsWorld.sol | 0xc717eec278199cceb84c6fd33683d772cba02218 | Solidity | AniCatsWorld | contract AniCatsWorld is ERC721, Ownable {
uint constant public TICKET_ID = 0;
uint constant public MAX_SUPPLY = 9000; // 9000 unique AniCats will be in total.
uint constant public PRICE = 0.07 ether; // 0.07 ETH + gas per transaction
uint constant public PRESALE_PRICE = 0.065 ether; // 0.07 ETH +... | presaleMint | function presaleMint(uint amount) external payable {
require(isPresaleAvailable, "Presale is not available");
require(presaleTokensMinted + amount <= presaleTokensLimit, "Presale tokens supply reached limit"); // Only presale token validation
require(tokensMinted + amount <= MAX_SUPPLY - reservedTokensLi... | // Presale mint | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
5147,
6082
]
} | 21,017 | ||||
AniCatsWorld | contracts/AniCatsWorld.sol | 0xc717eec278199cceb84c6fd33683d772cba02218 | Solidity | AniCatsWorld | contract AniCatsWorld is ERC721, Ownable {
uint constant public TICKET_ID = 0;
uint constant public MAX_SUPPLY = 9000; // 9000 unique AniCats will be in total.
uint constant public PRICE = 0.07 ether; // 0.07 ETH + gas per transaction
uint constant public PRESALE_PRICE = 0.065 ether; // 0.07 ETH +... | presaleAllowedForWallet | function presaleAllowedForWallet(address wallet) public view returns(bool) {
return presaleList[wallet] ||
friendContract.balanceOf(wallet) > 0 ||
mintPassContract.balanceOf(wallet, TICKET_ID) > 0;
}
| // Validate if sender owns a mintpass or a friend collection token (Cool Cats) or in the presale list | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
6192,
6442
]
} | 21,018 | ||||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | ERC165 | interface ERC165
{
/// @notice Query if a contract implements an interface
/// @param interfaceID The interface identifier, as specified in ERC-165
/// @dev Interface identification is specified in ERC-165. This function
/// uses less than 30,000 gas.
/// @return `true` if the contract implem... | supportsInterface | function supportsInterface(bytes4 interfaceID) external pure returns (bool);
| /// @notice Query if a contract implements an interface
/// @param interfaceID The interface identifier, as specified in ERC-165
/// @dev Interface identification is specified in ERC-165. This function
/// uses less than 30,000 gas.
/// @return `true` if the contract implements `interfaceID` and
/// `interfaceID` is ... | NatSpecSingleLine | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
405,
486
]
} | 21,019 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | ERC721 | interface ERC721 /*is ERC165*/
{
/// @dev This emits when ownership of any NFT changes by any mechanism.
/// This event emits when NFTs are created (`from` == 0) and destroyed
/// (`to` == 0). Exception: during contract creation, any number of NFTs
/// may be created and assigned without emittin... | /// @title ERC-721 Non-Fungible Token Standard
/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
/// Note: the ERC-165 identifier for this interface is 0x80ac58cd | NatSpecSingleLine | balanceOf | function balanceOf(address _owner) external view returns (uint256);
| /// @notice Count all NFTs assigned to an owner
/// @dev NFTs assigned to the zero address are considered invalid, and this
/// function throws for queries about the zero address.
/// @param _owner An address for whom to query the balance
/// @return The number of NFTs owned by `_owner`, possibly zero | NatSpecSingleLine | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
1489,
1561
]
} | 21,020 | |
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | ERC721 | interface ERC721 /*is ERC165*/
{
/// @dev This emits when ownership of any NFT changes by any mechanism.
/// This event emits when NFTs are created (`from` == 0) and destroyed
/// (`to` == 0). Exception: during contract creation, any number of NFTs
/// may be created and assigned without emittin... | /// @title ERC-721 Non-Fungible Token Standard
/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
/// Note: the ERC-165 identifier for this interface is 0x80ac58cd | NatSpecSingleLine | ownerOf | function ownerOf(uint256 _tokenId) external view returns (address);
| /// @notice Find the owner of an NFT
/// @dev NFTs assigned to zero address are considered invalid, and queries
/// about them do throw.
/// @param _tokenId The identifier for an NFT
/// @return The address of the owner of the NFT | NatSpecSingleLine | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
1825,
1897
]
} | 21,021 | |
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | ERC721 | interface ERC721 /*is ERC165*/
{
/// @dev This emits when ownership of any NFT changes by any mechanism.
/// This event emits when NFTs are created (`from` == 0) and destroyed
/// (`to` == 0). Exception: during contract creation, any number of NFTs
/// may be created and assigned without emittin... | /// @title ERC-721 Non-Fungible Token Standard
/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
/// Note: the ERC-165 identifier for this interface is 0x80ac58cd | NatSpecSingleLine | safeTransferFrom | function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes calldata data) external returns (bool);
| /// @notice Transfers the ownership of an NFT from one address to another address
/// @dev Throws unless `msg.sender` is the current owner, an authorized
/// operator, or the approved address for this NFT. Throws if `_from` is
/// not the current owner. Throws if `_to` is the zero address. Throws if
/// `_tokenId` i... | NatSpecSingleLine | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
2761,
2883
]
} | 21,022 | |
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | ERC721 | interface ERC721 /*is ERC165*/
{
/// @dev This emits when ownership of any NFT changes by any mechanism.
/// This event emits when NFTs are created (`from` == 0) and destroyed
/// (`to` == 0). Exception: during contract creation, any number of NFTs
/// may be created and assigned without emittin... | /// @title ERC-721 Non-Fungible Token Standard
/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
/// Note: the ERC-165 identifier for this interface is 0x80ac58cd | NatSpecSingleLine | safeTransferFrom | function safeTransferFrom(address _from, address _to, uint256 _tokenId) external returns (bool);
| /// @notice Transfers the ownership of an NFT from one address to another address
/// @dev This works identically to the other function with an extra data parameter,
/// except this function just sets data to ""
/// @param _from The current owner of the NFT
/// @param _to The new owner
/// @param _tokenId The NFT to t... | NatSpecSingleLine | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
3248,
3349
]
} | 21,023 | |
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | ERC721 | interface ERC721 /*is ERC165*/
{
/// @dev This emits when ownership of any NFT changes by any mechanism.
/// This event emits when NFTs are created (`from` == 0) and destroyed
/// (`to` == 0). Exception: during contract creation, any number of NFTs
/// may be created and assigned without emittin... | /// @title ERC-721 Non-Fungible Token Standard
/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
/// Note: the ERC-165 identifier for this interface is 0x80ac58cd | NatSpecSingleLine | transferFrom | function transferFrom(address _from, address _to, uint256 _tokenId) external returns (bool);
| /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE
/// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE
/// THEY MAY BE PERMANENTLY LOST
/// @dev Throws unless `msg.sender` is the current owner, an authorized
/// operator, or the approved address for this NFT. Throws if `_from` is
/// n... | NatSpecSingleLine | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
3946,
4043
]
} | 21,024 | |
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | ERC721 | interface ERC721 /*is ERC165*/
{
/// @dev This emits when ownership of any NFT changes by any mechanism.
/// This event emits when NFTs are created (`from` == 0) and destroyed
/// (`to` == 0). Exception: during contract creation, any number of NFTs
/// may be created and assigned without emittin... | /// @title ERC-721 Non-Fungible Token Standard
/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
/// Note: the ERC-165 identifier for this interface is 0x80ac58cd | NatSpecSingleLine | approve | function approve(address _approved, uint256 _tokenId) external returns (bool);
| /// @notice Set or reaffirm the approved address for an NFT
/// @dev The zero address indicates there is no approved address.
/// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized
/// operator of the current owner.
/// @param _approved The new approved NFT controller
/// @param _tokenId The NF... | NatSpecSingleLine | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
4413,
4496
]
} | 21,025 | |
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | ERC721 | interface ERC721 /*is ERC165*/
{
/// @dev This emits when ownership of any NFT changes by any mechanism.
/// This event emits when NFTs are created (`from` == 0) and destroyed
/// (`to` == 0). Exception: during contract creation, any number of NFTs
/// may be created and assigned without emittin... | /// @title ERC-721 Non-Fungible Token Standard
/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
/// Note: the ERC-165 identifier for this interface is 0x80ac58cd | NatSpecSingleLine | setApprovalForAll | function setApprovalForAll(address _operator, bool _approved) external returns (bool);
| /// @notice Enable or disable approval for a third party ("operator") to manage
/// all of `msg.sender`'s assets.
/// @dev Emits the ApprovalForAll event. The contract MUST allow
/// multiple operators per owner.
/// @param _operator Address to add to the set of authorized operators.
/// @param _approved True if the ... | NatSpecSingleLine | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
4900,
4991
]
} | 21,026 | |
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | ERC721 | interface ERC721 /*is ERC165*/
{
/// @dev This emits when ownership of any NFT changes by any mechanism.
/// This event emits when NFTs are created (`from` == 0) and destroyed
/// (`to` == 0). Exception: during contract creation, any number of NFTs
/// may be created and assigned without emittin... | /// @title ERC-721 Non-Fungible Token Standard
/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
/// Note: the ERC-165 identifier for this interface is 0x80ac58cd | NatSpecSingleLine | getApproved | function getApproved(uint256 _tokenId) external view returns (address);
| /// @notice Get the approved address for a single NFT
/// @dev Throws if `_tokenId` is not a valid NFT
/// @param _tokenId The NFT to find the approved address for
/// @return The approved address for this NFT, or the zero address if there is none | NatSpecSingleLine | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
5266,
5342
]
} | 21,027 | |
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | ERC721 | interface ERC721 /*is ERC165*/
{
/// @dev This emits when ownership of any NFT changes by any mechanism.
/// This event emits when NFTs are created (`from` == 0) and destroyed
/// (`to` == 0). Exception: during contract creation, any number of NFTs
/// may be created and assigned without emittin... | /// @title ERC-721 Non-Fungible Token Standard
/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
/// Note: the ERC-165 identifier for this interface is 0x80ac58cd | NatSpecSingleLine | isApprovedForAll | function isApprovedForAll(address _owner, address _operator) external view returns (bool);
| /// @notice Query if an address is an authorized operator for another address
/// @param _owner The address that owns the NFTs
/// @param _operator The address that acts on behalf of the owner
/// @return True if `_operator` is an approved operator for `_owner`, false otherwise | NatSpecSingleLine | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
5648,
5743
]
} | 21,028 | |
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | ERC721TokenReceiver | interface ERC721TokenReceiver
{
/// @notice Handle the receipt of an NFT
/// @dev The ERC721 smart contract calls this function on the
/// recipient after a `transfer`. This function MAY throw to revert and reject the transfer. Return
/// of other than the magic value MUST result in the transaction... | onERC721Received | function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes calldata _data) external returns(bytes4);
| /// @notice Handle the receipt of an NFT
/// @dev The ERC721 smart contract calls this function on the
/// recipient after a `transfer`. This function MAY throw to revert and reject the transfer. Return
/// of other than the magic value MUST result in the transaction being reverted.
/// @notice The contract address is ... | NatSpecSingleLine | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
799,
929
]
} | 21,029 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | _addParticipant | function _addParticipant(address _newParticipant) private
{
// Add the participant to the list, but only if they are not 0x0 and they are not already in the list.
if (_newParticipant != address(0x0) && addressToParticipantsArrayIndex[_newParticipant] == 0)
{
addressToParticipantsArrayIndex[_new... | ////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// Internal functions that write to ////////////
//////////// state variables ////////////
//////////// ... | NatSpecSingleLine | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
4648,
5095
]
} | 21,030 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | _removePrimeFromOwnerPrimesArray | function _removePrimeFromOwnerPrimesArray(uint256 _prime) private
{
bytes32 numberdata = numberToNumberdata[_prime];
uint256[] storage ownerPrimes = ownerToPrimes[numberdataToOwner(numberdata)];
uint256 primeIndex = numberdataToOwnerPrimesIndex(numberdata);
// Move the last one backwards ... | ////////////////////////////////////
//////// Internal functions to change ownership of a prime | NatSpecSingleLine | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
5214,
6199
]
} | 21,031 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | _numberdataSetOwnerAndOwnerPrimesIndex | function _numberdataSetOwnerAndOwnerPrimesIndex(uint256 _number, address _owner, uint40 _ownerPrimesIndex) private
{
bytes32 numberdata = numberToNumberdata[_number];
numberdata &= ~NUMBERDATA_OWNER_ADDRESS_MASK;
numberdata |= bytes32(uint256(uint160(_owner))) << NUMBERDATA_OWNER_ADDRESS_SHIFT... | /*function _numberdataSetOwner(uint256 _number, address _owner) private
{
bytes32 numberdata = numberToNumberdata[_number];
numberdata &= ~NUMBERDATA_OWNER_ADDRESS_MASK;
numberdata |= bytes32(uint256(uint160(_owner))) << NUMBERDATA_OWNER_ADDRESS_SHIFT;
numberToNumberdata[_number] = numberdata;
}*/ | Comment | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
15927,
16513
]
} | 21,032 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | isValidNFT | function isValidNFT(uint256 _prime) private view returns (bool)
{
NumberType numberType = numberdataToNumberType(numberToNumberdata[_prime]);
return numberType == NumberType.PROBABLE_PRIME || numberType == NumberType.DEFINITE_PRIME;
}
| ////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// Utility functions for ////////////
//////////// ERC721 implementation ////////////
//////////// ... | NatSpecSingleLine | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
17709,
17976
]
} | 21,033 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | getOwner | function getOwner(uint256 _prime) public view returns (address)
{
return numberdataToOwner(numberToNumberdata[_prime]);
}
| // Does not throw if prime does not exist or has no owner | LineComment | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
19159,
19304
]
} | 21,034 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | name | function name() external pure returns (string memory)
{
return "Prime number";
}
| ////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// Token implementation ////////////
//////////// ////////////
///////////////... | NatSpecSingleLine | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
19827,
19931
]
} | 21,035 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | ownerOf | function ownerOf(uint256 _prime) external view returns (address)
{
address owner = getOwner(_prime);
require(owner != address(0x0), "ownerOf error: owner is set to 0x0");
return owner;
}
| // Throws if prime has no owner or does not exist | LineComment | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
22298,
22526
]
} | 21,036 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | numberToDivisor | function numberToDivisor(uint256 _number) public view returns (uint256)
{
if (_number == 0) return 0;
else if ((_number & 1) == 0) return 2;
else return numberToNonTwoDivisor[_number];
}
| // numberToDivisor returns 0 if no divisor was found | LineComment | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
27093,
27321
]
} | 21,037 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | amountOfParticipants | function amountOfParticipants() external view returns (uint256)
{
return participants.length;
}
| /*function isKnownNotPrime(uint256 _number) external view returns (bool)
{
return numberdataToNumberType(numberToNumberdata[_number]) == NumberType.NOT_PRIME;
}
function isKnownDefinitePrime(uint256 _number) public view returns (bool)
{
return numberdataToNumberType(numberToNumberdata[_number]) == Number... | Comment | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
30949,
31068
]
} | 21,038 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | sqrtRoundedDown | function sqrtRoundedDown(uint256 x) private pure returns (uint256 y)
{
if (x == ~uint256(0)) return 340282366920938463463374607431768211455;
uint256 z = (x + 1) >> 1;
y = x;
while (z < y)
{
y = z;
z = ((x / z) + z) >> 1;
}
return y;
}
| // https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method | LineComment | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
38820,
39168
]
} | 21,039 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | isBalancedPrime | function isBalancedPrime(uint256 _prime) external view returns (Booly result, uint256 lowerPrime, uint256 higherPrime)
{
Booly primality = isPrime(_prime);
if (primality == DEFINITELY_NOT)
{
return (DEFINITELY_NOT, 0, 0);
}
else if (primality == PROBABLY_NOT)
{
return (P... | // Balanced primes are exactly in the middle between the two surrounding primes | LineComment | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
39758,
41325
]
} | 21,040 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | isNTupleMersennePrime | function isNTupleMersennePrime(uint256 _number, uint256 _n) external view returns (Booly _result, uint256[] memory _powers)
{
_powers = new uint256[](_n);
// Prevent overflow on _number+1
if (_number+1 < _number) return (UNKNOWN, _powers);
_result = isPrime(_number);
if (_r... | // NTuple mersenne primes:
// n=0 => primes returns []
// n=1 => mersenne primes of form 2^p-1 returns [p]
// n=2 => double mersenne primes of form 2^(2^p-1)-1 returns [2^p-1, p]
// n=3 => triple mersenne primes of form 2^(2^(2^p-1)-1)-1 returns [2^... | LineComment | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
41712,
42565
]
} | 21,041 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | isGoodPrime | function isGoodPrime(uint256 _number) external view returns (Booly)
{
// 2 is defined not to be a good prime.
if (_number == 2) return DEFINITELY_NOT;
Booly primality = isPrime(_number);
if (primality == DEFINITELY)
{
uint256 index = numberdataToAllPrimesIndex(numberToNumber... | // A good prime's square is greater than the product of all equally distant (by index) primes | LineComment | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
42671,
44480
]
} | 21,042 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | isFactorialPrime | function isFactorialPrime(uint256 _number) external view returns (Booly _result, uint256 _n, int256 _delta)
{
// Prevent underflow on _number-1
if (_number == 0) return (DEFINITELY_NOT, 0, 0);
// Prevent overflow on _number+1
if (_number == ~uint256(0)) return (DEFINITELY_NOT, 0, 0);
... | // Factorial primes are of the form n!+delta where delta = +1 or delta = -1 | LineComment | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
44568,
45710
]
} | 21,043 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | isCullenPrime | function isCullenPrime(uint256 _number) external pure returns (Booly _result, uint256 _n)
{
// There are only two cullen primes that fit in a 256-bit integer
if (_number == 3) // n = 1
{
return (DEFINITELY, 1);
}
else if (_number == 393050634124102232869567034555427371542904833) // n... | // Cullen primes are of the form n * 2^n + 1 | LineComment | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
45767,
46271
]
} | 21,044 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | isFermatPrime | function isFermatPrime(uint256 _number) external view returns (Booly result, uint256 _2_pow_n, uint256 _n)
{
// Prevent underflow on _number-1
if (_number == 0) return (DEFINITELY_NOT, 0, 0);
Booly primality = isPrime(_number);
if (primality == DEFINITELY_NOT) return (... | // Fermat primes are of the form 2^(2^n)+1
// Conjecturally, 3, 5, 17, 257, 65537 are the only ones | LineComment | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
46388,
47185
]
} | 21,045 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | isSuperPrime | function isSuperPrime(uint256 _number) public view returns (Booly _result, uint256 _indexStartAtOne)
{
Booly primality = isPrime(_number);
if (primality == DEFINITELY)
{
_indexStartAtOne = numberdataToAllPrimesIndex(numberToNumberdata[_number]) + 1;
_result = isPrime(_indexStartAtOne);... | // Super-primes are primes with a prime index in the sequence of prime numbers. (indexed starting with 1) | LineComment | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
47303,
48187
]
} | 21,046 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | isFibonacciNumber | function isFibonacciNumber(uint256 _number) public pure returns (Booly _result)
{
// If _number doesn't fit inside a uint126, we can't perform the computations necessary to check fibonaccality.
// We need to be able to square it, multiply by 5 then add 4.
// Adding 4 removes 1 bit of room: uint256 -> ui... | ////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// Number classes ////////////
//////////// ////////////
///////////////... | NatSpecSingleLine | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
48868,
50389
]
} | 21,047 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | reverseFactorial | function reverseFactorial(uint256 _number) private pure returns (uint256 output, bool success)
{
// 0 = immediate failure
if (_number == 0) return (0, false);
uint256 divisor = 1;
while (_number > 1)
{
divisor++;
uint256 remainder = _number % divisor;
if (r... | ////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// Math functions ////////////
//////////// ////////////
///////////////... | NatSpecSingleLine | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
51147,
51641
]
} | 21,048 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | log2ofPowerOf2 | function log2ofPowerOf2(uint256 _powerOf2) private pure returns (uint256)
{
require(_powerOf2 != 0, "log2ofPowerOf2 error: 0 is not a power of 2");
uint256 iterations = 0;
while (true)
{
if (_powerOf2 == 1) return iterations;
require((_powerOf2 & 1) == 0, "log2ofPowerOf2 error: ar... | // Performs a log2 on a power of 2.
// This function will throw if the input was not a power of 2. | LineComment | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
51939,
52456
]
} | 21,049 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | insecureRand | function insecureRand() private view returns (uint256)
{
return uint256(keccak256(abi.encodePacked(
largestDefinitePrimeFound(),
probablePrimes.length,
block.coinbase,
block.timestamp,
block.number,
block.difficulty,
tx.origin,
tx.gasprice,
... | // Generate a random number with low gas cost.
// This RNG is not secure and can be influenced! | LineComment | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
52569,
53019
]
} | 21,050 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | TRY_POW_MOD | function TRY_POW_MOD(uint256 _base, uint256 _power, uint256 _modulus) private pure returns (uint256 result, bool success)
{
if (_modulus == 0) return (0, false);
bool mulSuccess;
_base %= _modulus;
result = 1;
while (_power > 0)
{
if (_power & uint256(1) != 0)
... | // TRY_POW_MOD function defines 0^0 % n = 1 | LineComment | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
53075,
53822
]
} | 21,051 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | probabilisticTest | function probabilisticTest(uint256 d, uint256 _number, uint256 _random) private pure returns (bool result, bool success)
{
// Check d
assert(d & 1 == 1); // d is odd
assert((_number-1) % d == 0); // n-1 divisible by d
uint256 nMinusOneOverD = (_number-1) / d;
assert(isPowerOf2(nMinusOneOverD))... | // This function runs one trial. It returns false if n is
// definitely composite and true if n is probably prime.
// d must be an odd number such that d*2^r = n-1 for some r >= 1 | LineComment | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
54778,
56403
]
} | 21,052 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | isPrime_probabilistic | function isPrime_probabilistic(uint256 _number) public view returns (Booly)
{
// 40 iterations is heuristically enough for extremely high certainty
uint256 probabilistic_iterations = 40;
// Corner cases
if (_number == 0 || _number == 1 || _number == 4) return DEFINITELY_NOT;
if (_nu... | // This functions runs multiple miller-rabin trials.
// It returns false if _number is definitely composite and
// true if _number is probably prime. | LineComment | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
56575,
57929
]
} | 21,053 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | claimProbablePrime | function claimProbablePrime(uint256 _number) public
{
require(tryClaimProbablePrime(_number), "claimProbablePrime error: that number is not prime or has already been claimed");
}
| ////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// Claim & disprove probable primes ////////////
//////////// ////////////
///////////////... | NatSpecSingleLine | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
58434,
58636
]
} | 21,054 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | onERC721Received | function onERC721Received(address, address, uint256, bytes calldata) external pure // ERC721
{
revert("EtherPrime contract should not receive tokens");
}
| ////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// Try to stop people from ////////////
//////////// accidentally sending tokens ////////////
//////////// ... | NatSpecSingleLine | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
62881,
63058
]
} | 21,055 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | depositEther | function depositEther() public payable
{
addressToEtherBalance[msg.sender] += msg.value;
emit EtherDeposited(msg.sender, msg.value);
}
| // depositEther() should only be called at the start of 'external payable' functions. | LineComment | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
68467,
68644
]
} | 21,056 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | countPrimeBuyOrders | function countPrimeBuyOrders(uint256 _prime) external view returns (uint256 _amountOfBuyOrders)
{
_amountOfBuyOrders = 0;
BuyOrder[] storage buyOrders = primeToBuyOrders[_prime];
for (uint256 i=0; i<buyOrders.length; i++)
{
if (buyOrders[i].buyer != address(0x0))
{
... | ////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// Trading view functions ////////////
//////////// ////////////
///////////////... | NatSpecSingleLine | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
75190,
75609
]
} | 21,057 | |||
EtherPrime | EtherPrime.sol | 0x979e4a97d610b83348c5af04d836ce8b968bcc68 | Solidity | EtherPrime | contract EtherPrime is ERC20, ERC721, ERC721Enumerable, ERC721Metadata, ERC165, ERC223
{
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
//////////// ////////////
//////////// State... | tryCancelBuyOrdersAndWithdrawEther | function tryCancelBuyOrdersAndWithdrawEther(uint256[] calldata _primes, uint256[] calldata _buyOrderIndices, uint256 _amountToWithdraw) external returns (uint256 _amountCancelled)
{
withdrawEther(_amountToWithdraw);
return tryCancelBuyOrders(_primes, _buyOrderIndices);
}
| /*function cancelBuyOrders(uint256[] calldata _primes, uint256[] calldata _buyOrderIndices) external
{
require(tryCancelBuyOrders(_primes, _buyOrderIndices) == _primes.length, "cancelBuyOrders error: not all buy orders could be cancelled");
}*/ | Comment | v0.5.4+commit.9549d8ff | bzzr://ae8276540fd97545f69678da3f2ef940e2a21829dfce1520ab923f900ea2a065 | {
"func_code_index": [
82061,
82365
]
} | 21,058 | |||
PersonalCornerSale | @openzeppelin/contracts/utils/cryptography/ECDSA.sol | 0x4680fe5f9219453c5d04ecebd703ceb64015553c | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | /**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/ | NatSpecMultiLine | tryRecover | function tryRecover(bytes32 hash, bytes memory signature)
internal
pure
returns (address, RecoverError)
{
// Check the signature length
// - case 65: r,s,v signature (standard)
// - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
if (signa... | /**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature` or error string. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lo... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | BSD-3-Clause | ipfs://96095d6f84220446c96c9da3e769091d1a05d05811ffbc8a4b5f7ecc8b1b5dae | {
"func_code_index": [
1913,
3258
]
} | 21,059 |
PersonalCornerSale | @openzeppelin/contracts/utils/cryptography/ECDSA.sol | 0x4680fe5f9219453c5d04ecebd703ceb64015553c | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | /**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/ | NatSpecMultiLine | recover | function recover(bytes32 hash, bytes memory signature)
internal
pure
returns (address)
{
(address recovered, RecoverError error) = tryRecover(hash, signature);
_throwError(error);
return recovered;
}
| /**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half ord... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | BSD-3-Clause | ipfs://96095d6f84220446c96c9da3e769091d1a05d05811ffbc8a4b5f7ecc8b1b5dae | {
"func_code_index": [
4055,
4323
]
} | 21,060 |
PersonalCornerSale | @openzeppelin/contracts/utils/cryptography/ECDSA.sol | 0x4680fe5f9219453c5d04ecebd703ceb64015553c | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | /**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/ | NatSpecMultiLine | tryRecover | function tryRecover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address, RecoverError) {
bytes32 s;
uint8 v;
assembly {
s := and(
vs,
0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
)
v := add(shr(25... | /**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
*
* _Available since v4.3._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | BSD-3-Clause | ipfs://96095d6f84220446c96c9da3e769091d1a05d05811ffbc8a4b5f7ecc8b1b5dae | {
"func_code_index": [
4581,
5026
]
} | 21,061 |
PersonalCornerSale | @openzeppelin/contracts/utils/cryptography/ECDSA.sol | 0x4680fe5f9219453c5d04ecebd703ceb64015553c | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | /**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/ | NatSpecMultiLine | recover | function recover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, r, vs);
_throwError(error);
return recovered;
}
| /**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*
* _Available since v4.2._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | BSD-3-Clause | ipfs://96095d6f84220446c96c9da3e769091d1a05d05811ffbc8a4b5f7ecc8b1b5dae | {
"func_code_index": [
5193,
5458
]
} | 21,062 |
PersonalCornerSale | @openzeppelin/contracts/utils/cryptography/ECDSA.sol | 0x4680fe5f9219453c5d04ecebd703ceb64015553c | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | /**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/ | NatSpecMultiLine | tryRecover | function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ether... | /**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | BSD-3-Clause | ipfs://96095d6f84220446c96c9da3e769091d1a05d05811ffbc8a4b5f7ecc8b1b5dae | {
"func_code_index": [
5635,
7306
]
} | 21,063 |
PersonalCornerSale | @openzeppelin/contracts/utils/cryptography/ECDSA.sol | 0x4680fe5f9219453c5d04ecebd703ceb64015553c | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | /**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/ | NatSpecMultiLine | recover | function recover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, v, r, s);
_throwError(error);
return recovered;
}
| /**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | BSD-3-Clause | ipfs://96095d6f84220446c96c9da3e769091d1a05d05811ffbc8a4b5f7ecc8b1b5dae | {
"func_code_index": [
7440,
7724
]
} | 21,064 |
PersonalCornerSale | @openzeppelin/contracts/utils/cryptography/ECDSA.sol | 0x4680fe5f9219453c5d04ecebd703ceb64015553c | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | /**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/ | NatSpecMultiLine | toEthSignedMessageHash | function toEthSignedMessageHash(bytes32 hash)
internal
pure
returns (bytes32)
{
// 32 is the length in bytes of hash,
// enforced by the type signature above
return
keccak256(
abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)
);
}
| /**
* @dev Returns an Ethereum Signed Message, created from a `hash`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | BSD-3-Clause | ipfs://96095d6f84220446c96c9da3e769091d1a05d05811ffbc8a4b5f7ecc8b1b5dae | {
"func_code_index": [
8019,
8370
]
} | 21,065 |
PersonalCornerSale | @openzeppelin/contracts/utils/cryptography/ECDSA.sol | 0x4680fe5f9219453c5d04ecebd703ceb64015553c | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | /**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/ | NatSpecMultiLine | toEthSignedMessageHash | function toEthSignedMessageHash(bytes memory s)
internal
pure
returns (bytes32)
{
return
keccak256(
abi.encodePacked(
"\x19Ethereum Signed Message:\n",
Strings.toString(s.length),
s
)
);
}
| /**
* @dev Returns an Ethereum Signed Message, created from `s`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | BSD-3-Clause | ipfs://96095d6f84220446c96c9da3e769091d1a05d05811ffbc8a4b5f7ecc8b1b5dae | {
"func_code_index": [
8660,
9022
]
} | 21,066 |
PersonalCornerSale | @openzeppelin/contracts/utils/cryptography/ECDSA.sol | 0x4680fe5f9219453c5d04ecebd703ceb64015553c | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | /**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/ | NatSpecMultiLine | toTypedDataHash | function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash)
internal
pure
returns (bytes32)
{
return
keccak256(
abi.encodePacked("\x19\x01", domainSeparator, structHash)
);
}
| /**
* @dev Returns an Ethereum Signed Typed Data, created from a
* `domainSeparator` and a `structHash`. This produces hash corresponding
* to the one signed with the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
* JSON-RPC method as part of EIP-712.
*
* See {recover}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | BSD-3-Clause | ipfs://96095d6f84220446c96c9da3e769091d1a05d05811ffbc8a4b5f7ecc8b1b5dae | {
"func_code_index": [
9367,
9645
]
} | 21,067 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | tryAdd | function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
| /**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
161,
388
]
} | 21,068 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | trySub | function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
| /**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
536,
735
]
} | 21,069 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | tryMul | function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// 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
... | /**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
885,
1393
]
} | 21,070 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | tryDiv | function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
| /**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
1544,
1744
]
} | 21,071 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | tryMod | function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
| /**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
1905,
2105
]
} | 21,072 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
2347,
2450
]
} | 21,073 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
2728,
2831
]
} | 21,074 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
| /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
3085,
3188
]
} | 21,075 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
| /**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
3484,
3587
]
} | 21,076 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting 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 (consu... | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
4049,
4152
]
} | 21,077 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | sub | function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterp... | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
4626,
4871
]
} | 21,078 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | div | function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
| /**
* @dev Returns the integer division of two unsigned integers, reverting 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 ... | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
5364,
5608
]
} | 21,079 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | mod | function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
... | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
6266,
6510
]
} | 21,080 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | Strings | library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT ... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toString | function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 ... | /**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
184,
912
]
} | 21,081 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | Strings | library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT ... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toHexString | function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
| /**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
1017,
1362
]
} | 21,082 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | Strings | library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT ... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toHexString | function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
... | /**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
1485,
1941
]
} | 21,083 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | 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 on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
606,
998
]
} | 21,084 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | 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");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
| /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
1928,
2250
]
} | 21,085 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw... | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
3007,
3187
]
} | 21,086 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
3412,
3646
]
} | 21,087 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
4016,
4281
]
} | 21,088 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | 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");
require(isContract(target), "Address: call to non-contract");... | /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
4532,
5048
]
} | 21,089 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | 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 | functionStaticCall | function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
5228,
5432
]
} | 21,090 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | 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 | functionStaticCall | function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallR... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
5619,
6020
]
} | 21,091 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | 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 | functionDelegateCall | function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
6202,
6407
]
} | 21,092 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | 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 | functionDelegateCall | function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return _verifyCall... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
6596,
6998
]
} | 21,093 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | IERC721Receiver | interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other valu... | /**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/ | NatSpecMultiLine | onERC721Received | function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
| /**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by ... | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
528,
698
]
} | 21,094 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | IERC165 | interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This f... | /**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) external view returns (bool);
| /**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
374,
455
]
} | 21,095 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | ERC165 | abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
} | /**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interface... | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
| /**
* @dev See {IERC165-supportsInterface}.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
103,
265
]
} | 21,096 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address owner) external view returns (uint256 balance);
| /**
* @dev Returns the number of tokens in ``owner``'s account.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
719,
798
]
} | 21,097 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | ownerOf | function ownerOf(uint256 tokenId) external view returns (address owner);
| /**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
944,
1021
]
} | 21,098 |
DegenReindeer | DegenReindeer.sol | 0x59da3cae2d373b0e4ba6376dd0a1e1292cb9144d | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
| /**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token mus... | NatSpecMultiLine | v0.8.10+commit.fc410830 | None | ipfs://99a1a9f1de20f5c0d356dda80587546933f9a6eabe807551f3b621c85a87ba99 | {
"func_code_index": [
1733,
1850
]
} | 21,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.