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
HaronToken
HaronToken.sol
0xf000ca9fbb684bfa2f5f8b36fdf222970fc93763
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to *...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_to] = balances[_t...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 The amout of tokens to be transfered */
NatSpecMultiLine
v0.5.1+commit.c8a2cb62
bzzr://5bb63a21792ff64000d44f2894add60ce6c6ec4eff4d11238fc17a528fa1ae01
{ "func_code_index": [ 388, 907 ] }
7,600
HaronToken
HaronToken.sol
0xf000ca9fbb684bfa2f5f8b36fdf222970fc93763
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to *...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender, 0)` if it is not // already 0 to mitigate the race condition described here: // https://github.com/ethereum/...
/** * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */
NatSpecMultiLine
v0.5.1+commit.c8a2cb62
bzzr://5bb63a21792ff64000d44f2894add60ce6c6ec4eff4d11238fc17a528fa1ae01
{ "func_code_index": [ 1142, 1699 ] }
7,601
HaronToken
HaronToken.sol
0xf000ca9fbb684bfa2f5f8b36fdf222970fc93763
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to *...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public view returns (uint256 remaining) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifing the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.5.1+commit.c8a2cb62
bzzr://5bb63a21792ff64000d44f2894add60ce6c6ec4eff4d11238fc17a528fa1ae01
{ "func_code_index": [ 2022, 2163 ] }
7,602
HaronToken
HaronToken.sol
0xf000ca9fbb684bfa2f5f8b36fdf222970fc93763
Solidity
Ownable
contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier on...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.5.1+commit.c8a2cb62
bzzr://5bb63a21792ff64000d44f2894add60ce6c6ec4eff4d11238fc17a528fa1ae01
{ "func_code_index": [ 544, 676 ] }
7,603
HaronToken
HaronToken.sol
0xf000ca9fbb684bfa2f5f8b36fdf222970fc93763
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The address that will recieve the minted tokens. * @param _amoun...
/** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */
NatSpecMultiLine
mint
function mint(address _to, uint256 _amount) public onlyOwner canMint returns (bool) { totalSupply = totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); emit Transfer(address(0), _to, _amount); return true; }
/** * @dev Function to mint tokens * @param _to The address that will recieve the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.5.1+commit.c8a2cb62
bzzr://5bb63a21792ff64000d44f2894add60ce6c6ec4eff4d11238fc17a528fa1ae01
{ "func_code_index": [ 432, 683 ] }
7,604
HaronToken
HaronToken.sol
0xf000ca9fbb684bfa2f5f8b36fdf222970fc93763
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The address that will recieve the minted tokens. * @param _amoun...
/** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */
NatSpecMultiLine
finishMinting
function finishMinting() public onlyOwner returns (bool) { mintingFinished = true; emit MintFinished(); return true; }
/** * @dev Function to stop minting new tokens. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.5.1+commit.c8a2cb62
bzzr://5bb63a21792ff64000d44f2894add60ce6c6ec4eff4d11238fc17a528fa1ae01
{ "func_code_index": [ 820, 959 ] }
7,605
VapenApes2981
vapenapes-contract-main/src/contracts/impl/Enumerable.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with ...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 556, 770 ] }
7,606
VapenApes2981
vapenapes-contract-main/src/contracts/impl/Enumerable.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with ...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
tokenOfOwnerByIndex
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; }
/** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 836, 1075 ] }
7,607
VapenApes2981
vapenapes-contract-main/src/contracts/impl/Enumerable.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with ...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
totalSupply
function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; }
/** * @dev See {IERC721Enumerable-totalSupply}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 1133, 1236 ] }
7,608
VapenApes2981
vapenapes-contract-main/src/contracts/impl/Enumerable.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with ...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
tokenByIndex
function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enu: global index out of bounds"); return _allTokens[index]; }
/** * @dev See {IERC721Enumerable-tokenByIndex}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 1295, 1504 ] }
7,609
VapenApes2981
vapenapes-contract-main/src/contracts/impl/Enumerable.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with ...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == add...
/** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 2051, 2522 ] }
7,610
VapenApes2981
vapenapes-contract-main/src/contracts/impl/Enumerable.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with ...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_addTokenToOwnerEnumeration
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; }
/** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 2797, 2994 ] }
7,611
VapenApes2981
vapenapes-contract-main/src/contracts/impl/Enumerable.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with ...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_addTokenToAllTokensEnumeration
function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); }
/** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 3173, 3320 ] }
7,612
VapenApes2981
vapenapes-contract-main/src/contracts/impl/Enumerable.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with ...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_removeTokenFromOwnerEnumeration
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _own...
/** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double write...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 3909, 4790 ] }
7,613
VapenApes2981
vapenapes-contract-main/src/contracts/impl/Enumerable.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with ...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_removeTokenFromAllTokensEnumeration
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenI...
/** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 5059, 6040 ] }
7,614
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 94, 154 ] }
7,615
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 237, 310 ] }
7,616
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 534, 634 ] }
7,617
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 913, 1028 ] }
7,618
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 1692, 1771 ] }
7,619
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transferFrom
function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 2084, 2220 ] }
7,620
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 259, 445 ] }
7,621
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 723, 864 ] }
7,622
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 1162, 1393 ] }
7,623
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 1647, 2123 ] }
7,624
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 2594, 2731 ] }
7,625
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 3222, 3539 ] }
7,626
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 3999, 4134 ] }
7,627
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 4614, 4819 ] }
7,628
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codeha...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 606, 1270 ] }
7,629
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require( address(this).balance >= amount, "Address: insufficient balance" ); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{value: amount}(""); re...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 2200, 2674 ] }
7,630
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 3430, 3633 ] }
7,631
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 3858, 4093 ] }
7,632
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue( target, data, value, "Address: low-level call with value failed" ); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 4463, 4824 ] }
7,633
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require( address(this).balance >= value, "Address: insufficient balance for call" ); return _functionCallWithValue(target...
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 5075, 5476 ] }
7,634
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
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() internal { addr...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 521, 605 ] }
7,635
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
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() internal { addr...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 1163, 1316 ] }
7,636
NuYear
NuYear.sol
0x881cf099c8f9790bf217e97089f3d2df31640347
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() internal { addr...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require( newOwner != address(0), "Ownable: new owner is the zero address" ); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU GPLv3
ipfs://b2fa0a08a48b26170bf7121db6a1d5204fd5db181c51b0bc224f070c55a7cdde
{ "func_code_index": [ 1466, 1752 ] }
7,637
VapenApes2981
vapenapes-contract-main/src/contracts/Apes2981.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
VapenApes2981
contract VapenApes2981 is ERC721Enumerable, HookPausable { /* ---------- Inheritance for solidity types ---------------- */ using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; /* ---------- Inheritance for solidity types ---------------- */ // uint256 public...
/** * Reference implementation of ERC721 with Enumerable and Counter support */
NatSpecMultiLine
withdraw
function withdraw() public onlyOwner { /* Minimum balance */ require(address(this).balance > 0.5 ether); uint256 balance = address(this).balance - 0.1 ether; for (uint256 i = 0; i < _team.length; i++) { Team storage _st = _team[i]; _st.addr.transfer((balance * _st.percentage) / 100); } }
/** * @dev * Encode team distribution percentage * Embed all individuals equity and payout to seedz project * retain at least 0.1 ether in the smart contract */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 2074, 2381 ] }
7,638
VapenApes2981
vapenapes-contract-main/src/contracts/Apes2981.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
VapenApes2981
contract VapenApes2981 is ERC721Enumerable, HookPausable { /* ---------- Inheritance for solidity types ---------------- */ using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; /* ---------- Inheritance for solidity types ---------------- */ // uint256 public...
/** * Reference implementation of ERC721 with Enumerable and Counter support */
NatSpecMultiLine
pause
function pause(bool val) public onlyOwner { if (val == true) { _pause(); return; } _unpause(); }
/* Extends HookPausable */
Comment
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 2411, 2521 ] }
7,639
VapenApes2981
vapenapes-contract-main/src/contracts/Apes2981.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
VapenApes2981
contract VapenApes2981 is ERC721Enumerable, HookPausable { /* ---------- Inheritance for solidity types ---------------- */ using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; /* ---------- Inheritance for solidity types ---------------- */ // uint256 public...
/** * Reference implementation of ERC721 with Enumerable and Counter support */
NatSpecMultiLine
_totalSupply
function _totalSupply() internal view returns (uint256) { return _tokenIdTracker.current(); }
/* Derives funcrtionality from Counter Library */
Comment
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 2797, 2894 ] }
7,640
VapenApes2981
vapenapes-contract-main/src/contracts/Apes2981.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
VapenApes2981
contract VapenApes2981 is ERC721Enumerable, HookPausable { /* ---------- Inheritance for solidity types ---------------- */ using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; /* ---------- Inheritance for solidity types ---------------- */ // uint256 public...
/** * Reference implementation of ERC721 with Enumerable and Counter support */
NatSpecMultiLine
withdrawTokens
function withdrawTokens(address tokenAddress) external onlyOwner { uint256 balance = IERC20(tokenAddress).balanceOf(address(this)); IERC20(tokenAddress).transfer(_msgSender(), balance); }
/** * @dev * Sometimes tokens sent to contracts and get lostm, due to user errors * This can enable withdrawal of any mistakenly send ERC-20 token to this address. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 3155, 3348 ] }
7,641
VapenApes2981
vapenapes-contract-main/src/contracts/Apes2981.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
VapenApes2981
contract VapenApes2981 is ERC721Enumerable, HookPausable { /* ---------- Inheritance for solidity types ---------------- */ using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; /* ---------- Inheritance for solidity types ---------------- */ // uint256 public...
/** * Reference implementation of ERC721 with Enumerable and Counter support */
NatSpecMultiLine
reserveApes
function reserveApes() public onlyOwner { require(totalSupply().add(NUM_TO_RESERVE) <= MAX_APES, "Reserve would exceed max supply"); uint256 supply = totalSupply(); for (uint256 i = 0; i < NUM_TO_RESERVE; i++) { _safeMint(_msgSender(), supply + i); } }
/** * Set some Apes aside * We will set aside 50 Vapenapes for community giveaways and promotions */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 3458, 3724 ] }
7,642
VapenApes2981
vapenapes-contract-main/src/contracts/Apes2981.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
VapenApes2981
contract VapenApes2981 is ERC721Enumerable, HookPausable { /* ---------- Inheritance for solidity types ---------------- */ using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; /* ---------- Inheritance for solidity types ---------------- */ // uint256 public...
/** * Reference implementation of ERC721 with Enumerable and Counter support */
NatSpecMultiLine
setProvenanceHash
function setProvenanceHash(string memory provenanceHash) public onlyOwner { apesReveal = provenanceHash; }
/* * Set provenance once it's calculated */
Comment
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 3889, 3999 ] }
7,643
VapenApes2981
vapenapes-contract-main/src/contracts/Apes2981.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
VapenApes2981
contract VapenApes2981 is ERC721Enumerable, HookPausable { /* ---------- Inheritance for solidity types ---------------- */ using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; /* ---------- Inheritance for solidity types ---------------- */ // uint256 public...
/** * Reference implementation of ERC721 with Enumerable and Counter support */
NatSpecMultiLine
flipSaleState
function flipSaleState() public onlyOwner { SALE_ACTIVE = !SALE_ACTIVE; }
/* * Pause presale if active, make active if paused */
Comment
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 4165, 4242 ] }
7,644
VapenApes2981
vapenapes-contract-main/src/contracts/Apes2981.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
VapenApes2981
contract VapenApes2981 is ERC721Enumerable, HookPausable { /* ---------- Inheritance for solidity types ---------------- */ using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; /* ---------- Inheritance for solidity types ---------------- */ // uint256 public...
/** * Reference implementation of ERC721 with Enumerable and Counter support */
NatSpecMultiLine
mintApe
function mintApe(uint256 numberOfTokens) public payable saleIsOpen { require(numberOfTokens <= MAX_APE_PURCHASE, "Can only mint 20 tokens at a time"); require(totalSupply().add(numberOfTokens) <= MAX_APES, "Purchase would exceed max supply of Apes"); require(APE_SALEPRICE.mul(numberOfTokens) <= msg.value, "Ether va...
/** * Mints Apes */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 5274, 6267 ] }
7,645
VapenApes2981
vapenapes-contract-main/src/contracts/Apes2981.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
VapenApes2981
contract VapenApes2981 is ERC721Enumerable, HookPausable { /* ---------- Inheritance for solidity types ---------------- */ using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; /* ---------- Inheritance for solidity types ---------------- */ // uint256 public...
/** * Reference implementation of ERC721 with Enumerable and Counter support */
NatSpecMultiLine
setStartingIndex
function setStartingIndex() public { require(startingIndex == 0, "Starting index is already set"); require(startingIndexBlock != 0, "Starting index block must be set"); startingIndex = uint256(blockhash(startingIndexBlock)) % MAX_APES; // Just a sanity case in the worst case if this function is called late (EVM on...
/** * Set the starting index for the collection */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 6325, 6912 ] }
7,646
VapenApes2981
vapenapes-contract-main/src/contracts/Apes2981.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
VapenApes2981
contract VapenApes2981 is ERC721Enumerable, HookPausable { /* ---------- Inheritance for solidity types ---------------- */ using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; /* ---------- Inheritance for solidity types ---------------- */ // uint256 public...
/** * Reference implementation of ERC721 with Enumerable and Counter support */
NatSpecMultiLine
emergencySetStartingIndexBlock
function emergencySetStartingIndexBlock() public onlyOwner { require(startingIndex == 0, "Starting index is already set"); startingIndexBlock = block.number; }
/** * Set the starting index block for the collection, essentially unblocking * setting starting index */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 7332, 7498 ] }
7,647
OkitaInu
OkitaInu.sol
0x4cf77ee06985659402674aa05d08b9152b9e1792
Solidity
OkitaInu
contract OkitaInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Okita Inu"; string private constant _symbol = "OKITA"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) priva...
setMinSwapTokensThreshold
function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; }
//Set minimum tokens required to swap.
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://961b806131a84948edd3b44136b2461496edd9de02e966b95b5119ba6441e297
{ "func_code_index": [ 12896, 13040 ] }
7,648
OkitaInu
OkitaInu.sol
0x4cf77ee06985659402674aa05d08b9152b9e1792
Solidity
OkitaInu
contract OkitaInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Okita Inu"; string private constant _symbol = "OKITA"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) priva...
toggleSwap
function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; }
//Set minimum tokens required to swap.
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://961b806131a84948edd3b44136b2461496edd9de02e966b95b5119ba6441e297
{ "func_code_index": [ 13091, 13197 ] }
7,649
OkitaInu
OkitaInu.sol
0x4cf77ee06985659402674aa05d08b9152b9e1792
Solidity
OkitaInu
contract OkitaInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Okita Inu"; string private constant _symbol = "OKITA"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) priva...
setMaxTxnAmount
function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; }
//Set MAx transaction
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://961b806131a84948edd3b44136b2461496edd9de02e966b95b5119ba6441e297
{ "func_code_index": [ 13231, 13344 ] }
7,650
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 89, 272 ] }
7,651
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 356, 629 ] }
7,652
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 744, 860 ] }
7,653
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 924, 1060 ] }
7,654
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; }...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() public { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 261, 321 ] }
7,655
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; }...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 640, 816 ] }
7,656
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofType_Android = 0x20; byte constant proofType_Ledger = 0x30; ...
parseInt
function parseInt(string _a) internal pure returns (uint) { return parseInt(_a, 0); }
// parseInt
LineComment
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 27483, 27587 ] }
7,657
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofType_Android = 0x20; byte constant proofType_Ledger = 0x30; ...
parseInt
function parseInt(string _a, uint _b) internal pure returns (uint) { bytes memory bresult = bytes(_a); uint mint = 0; bool decimals = false; for (uint i=0; i<bresult.length; i++){ if ((bresult[i] >= 48)&&(bresult[i] <= 57)){ if (decimals){ if (_b == 0) break; ...
// parseInt(parseFloat*10^_b)
LineComment
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 27625, 28239 ] }
7,658
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofType_Android = 0x20; byte constant proofType_Ledger = 0x30; ...
copyBytes
function copyBytes(bytes from, uint fromOffset, uint length, bytes to, uint toOffset) internal pure returns (bytes) { uint minLength = length + toOffset; // Buffer too small require(to.length >= minLength); // Should be a better way? // NOTE: the offset 32 is added to skip the `size` field of bo...
// the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license
LineComment
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 39992, 40683 ] }
7,659
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofType_Android = 0x20; byte constant proofType_Ledger = 0x30; ...
safer_ecrecover
function safer_ecrecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal returns (bool, address) { // We do our own memory management here. Solidity uses memory offset // 0x40 to store the current end of memory. We write past it (as // writes are memory extensions), but don't update the offset so ...
// the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license // Duplicate Solidity's ecrecover, but catching the CALL return value
LineComment
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 40880, 41883 ] }
7,660
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofType_Android = 0x20; byte constant proofType_Ledger = 0x30; ...
ecrecovery
function ecrecovery(bytes32 hash, bytes sig) internal returns (bool, address) { bytes32 r; bytes32 s; uint8 v; if (sig.length != 65) return (false, 0); // The signature format is a compact form of: // {bytes32 r}{bytes32 s}{uint8 v} // Compact means, uint8 is not padded t...
// the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license
LineComment
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 42005, 43431 ] }
7,661
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
pause
function pause() onlyOwner whenNotPaused public { paused = true; Pause(); }
/** * @dev called by the owner to pause, triggers stopped state */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 513, 604 ] }
7,662
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
unpause
function unpause() onlyOwner whenPaused public { paused = false; Unpause(); }
/** * @dev called by the owner to unpause, returns to normal state */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 688, 781 ] }
7,663
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
Finalizable
contract Finalizable is Ownable { event Finalized(); bool public isFinalized = false; /** * @dev Modifier to make a function callable only when the contract is not finalized. */ modifier whenNotFinalized() { require(!isFinalized); _; } /** * @dev called by the owner to fina...
/** * @title Finalizable * @dev Base contract which allows children to implement a finalization mechanism. * inspired by FinalizableCrowdsale from zeppelin */
NatSpecMultiLine
finalize
function finalize() onlyOwner whenNotFinalized public { finalization(); Finalized(); isFinalized = true; }
/** * @dev called by the owner to finalize */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 333, 462 ] }
7,664
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
Finalizable
contract Finalizable is Ownable { event Finalized(); bool public isFinalized = false; /** * @dev Modifier to make a function callable only when the contract is not finalized. */ modifier whenNotFinalized() { require(!isFinalized); _; } /** * @dev called by the owner to fina...
/** * @title Finalizable * @dev Base contract which allows children to implement a finalization mechanism. * inspired by FinalizableCrowdsale from zeppelin */
NatSpecMultiLine
finalization
function finalization() internal { }
/** * @dev Can be overridden to add finalization logic. The overriding function * should call super.finalization() to ensure the chain of finalization is * executed entirely. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 662, 704 ] }
7,665
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
Destructible
contract Destructible is Ownable { function Destructible() public payable { } /** * @dev Transfers the current balance to the owner and terminates the contract. */ function destroy() onlyOwner public { selfdestruct(owner); } function destroyAndSend(address _recipient) onlyOwner public ...
/** * @title Destructible * @dev Base contract that can be destroyed by owner. All funds in contract will be sent to the owner. */
NatSpecMultiLine
destroy
function destroy() onlyOwner public { selfdestruct(owner); }
/** * @dev Transfers the current balance to the owner and terminates the contract. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 183, 254 ] }
7,666
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
CanReclaimToken
contract CanReclaimToken is Ownable { using SafeERC20 for ERC20Basic; /** * @dev Reclaim all ERC20Basic compatible tokens * @param token ERC20Basic The address of the token contract */ function reclaimToken(ERC20Basic token) external onlyOwner { uint256 balance = token.balanceOf(this); ...
/** * @title Contracts that should be able to recover tokens * @author SylTi * @dev This allow a contract to recover any ERC20 token received in a contract by transferring the balance to the contract owner. * This will prevent any accidental loss of tokens. */
NatSpecMultiLine
reclaimToken
function reclaimToken(ERC20Basic token) external onlyOwner { uint256 balance = token.balanceOf(this); token.safeTransfer(owner, balance); }
/** * @dev Reclaim all ERC20Basic compatible tokens * @param token ERC20Basic The address of the token contract */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 206, 361 ] }
7,667
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
HasNoTokens
contract HasNoTokens is CanReclaimToken { /** * @dev Reject all ERC223 compatible tokens * @param from_ address The address that is transferring the tokens * @param value_ uint256 the amount of the specified token * @param data_ Bytes The data passed from the caller. */ function tokenFallback(addr...
/** * @title Contracts that should not own Tokens * @author Remco Bloemen <remco@2π.com> * @dev This blocks incoming ERC223 tokens to prevent accidental loss of tokens. * Should tokens (any ERC20Basic compatible) end up in the contract, it allows the * owner to reclaim the tokens. */
NatSpecMultiLine
tokenFallback
function tokenFallback(address from_, uint256 value_, bytes data_) external { from_; value_; data_; revert(); }
/** * @dev Reject all ERC223 compatible tokens * @param from_ address The address that is transferring the tokens * @param value_ uint256 the amount of the specified token * @param data_ Bytes The data passed from the caller. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 291, 428 ] }
7,668
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
HasNoContracts
contract HasNoContracts is Ownable { /** * @dev Reclaim ownership of Ownable contracts * @param contractAddr The address of the Ownable to be reclaimed. */ function reclaimContract(address contractAddr) external onlyOwner { Ownable contractInst = Ownable(contractAddr); contractInst.transfe...
/** * @title Contracts that should not own Contracts * @author Remco Bloemen <remco@2π.com> * @dev Should contracts (anything Ownable) end up being owned by this contract, it allows the owner * of this contract to reclaim ownership of the contracts. */
NatSpecMultiLine
reclaimContract
function reclaimContract(address contractAddr) external onlyOwner { Ownable contractInst = Ownable(contractAddr); contractInst.transferOwnership(owner); }
/** * @dev Reclaim ownership of Ownable contracts * @param contractAddr The address of the Ownable to be reclaimed. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 174, 344 ] }
7,669
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
EtherSportCrowdsale
contract EtherSportCrowdsale is usingOraclize, Pausable, Finalizable, Destructible, HasNoTokens, HasNoContracts { using SafeMath for uint256; using SafeERC20 for ERC20; // EtherSport token ERC20 public token; // wallet with token allowance address public tokenFrom; // st...
/** * @title EtherSportCrowdsale */
NatSpecMultiLine
EtherSportCrowdsale
function EtherSportCrowdsale( uint256 _startTime, uint256 _endTime, address _token, address _from, address _wallet ) public { require(_startTime < _endTime); require(_token != address(0)); require(_from != address(0)); require(_wallet != address(0)); start...
/** * CONSTRUCTOR * * @dev Initialize the EtherSportCrowdsale * @param _startTime Start time timestamp * @param _endTime End time timestamp * @param _token EtherSport ERC20 token * @param _from Wallet address with token allowance * @param _wallet Wallet address to transfer direct funding to */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 4263, 4781 ] }
7,670
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
EtherSportCrowdsale
contract EtherSportCrowdsale is usingOraclize, Pausable, Finalizable, Destructible, HasNoTokens, HasNoContracts { using SafeMath for uint256; using SafeERC20 for ERC20; // EtherSport token ERC20 public token; // wallet with token allowance address public tokenFrom; // st...
/** * @title EtherSportCrowdsale */
NatSpecMultiLine
function () public payable { if (msg.sender != owner) buyTokensFor(msg.sender, address(0)); }
// fallback function can be used to buy tokens
LineComment
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 4836, 4961 ] }
7,671
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
EtherSportCrowdsale
contract EtherSportCrowdsale is usingOraclize, Pausable, Finalizable, Destructible, HasNoTokens, HasNoContracts { using SafeMath for uint256; using SafeERC20 for ERC20; // EtherSport token ERC20 public token; // wallet with token allowance address public tokenFrom; // st...
/** * @title EtherSportCrowdsale */
NatSpecMultiLine
buyTokens
function buyTokens(address _referer) public payable { buyTokensFor(msg.sender, _referer); }
/** * @dev Makes order for tokens purchase. * @param _referer Funder's referer (optional) */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 5080, 5190 ] }
7,672
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
EtherSportCrowdsale
contract EtherSportCrowdsale is usingOraclize, Pausable, Finalizable, Destructible, HasNoTokens, HasNoContracts { using SafeMath for uint256; using SafeERC20 for ERC20; // EtherSport token ERC20 public token; // wallet with token allowance address public tokenFrom; // st...
/** * @title EtherSportCrowdsale */
NatSpecMultiLine
buyTokensFor
function buyTokensFor( address _beneficiary, address _referer ) public payable { require(_beneficiary != address(0)); require(_beneficiary != _referer); require(msg.value >= MIN_FUNDING_AMOUNT); require(liveEtherSportCampaign()); require(oraclize_getPrice("URL") <=...
/** * @dev Makes order for tokens purchase. * @param _beneficiary Who will get the tokens * @param _referer Beneficiary's referer (optional) */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 5366, 7133 ] }
7,673
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
EtherSportCrowdsale
contract EtherSportCrowdsale is usingOraclize, Pausable, Finalizable, Destructible, HasNoTokens, HasNoContracts { using SafeMath for uint256; using SafeERC20 for ERC20; // EtherSport token ERC20 public token; // wallet with token allowance address public tokenFrom; // st...
/** * @title EtherSportCrowdsale */
NatSpecMultiLine
__callback
function __callback(bytes32 _orderId, string _result) public { // solium-disable-line mixedcase require(msg.sender == oraclize_cbAddress()); uint256 _rate = parseInt(_result, RATE_EXPONENT); address _beneficiary = orders[_orderId].beneficiary; uint256 _funds = orders[_orderId].funds; uint25...
/** * @dev Get current rate from oraclize and transfer tokens. * @param _orderId Oraclize order id * @param _result Current rate */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 7297, 9112 ] }
7,674
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
EtherSportCrowdsale
contract EtherSportCrowdsale is usingOraclize, Pausable, Finalizable, Destructible, HasNoTokens, HasNoContracts { using SafeMath for uint256; using SafeERC20 for ERC20; // EtherSport token ERC20 public token; // wallet with token allowance address public tokenFrom; // st...
/** * @title EtherSportCrowdsale */
NatSpecMultiLine
setOffer
function setOffer(address _beneficiary, uint256 _condition, uint256 _specialPrice) onlyOwner public { require(_beneficiary != address(0)); require(_condition >= MIN_FUNDING_AMOUNT); require(_specialPrice > 0); offers[_beneficiary].condition = _condition; offers[_beneficiary].specialPrice = _spe...
/** * @dev Set offer with special price. * @param _beneficiary Who got the offer * @param _condition Minimum wei amount for offer purchase * @param _specialPrice Price value for the offer (usd), using PRICE_EXPONENT */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 9370, 9732 ] }
7,675
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
EtherSportCrowdsale
contract EtherSportCrowdsale is usingOraclize, Pausable, Finalizable, Destructible, HasNoTokens, HasNoContracts { using SafeMath for uint256; using SafeERC20 for ERC20; // EtherSport token ERC20 public token; // wallet with token allowance address public tokenFrom; // st...
/** * @title EtherSportCrowdsale */
NatSpecMultiLine
withdrawEther
function withdrawEther(uint256 _amount) onlyOwner public { require(this.balance >= _amount); owner.transfer(_amount); }
/** * @dev Withdraw ether from contract * @param _amount Amount to withdraw */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 9837, 9984 ] }
7,676
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
EtherSportCrowdsale
contract EtherSportCrowdsale is usingOraclize, Pausable, Finalizable, Destructible, HasNoTokens, HasNoContracts { using SafeMath for uint256; using SafeERC20 for ERC20; // EtherSport token ERC20 public token; // wallet with token allowance address public tokenFrom; // st...
/** * @title EtherSportCrowdsale */
NatSpecMultiLine
setOraclizeGasLimit
function setOraclizeGasLimit(uint256 _gasLimit) onlyOwner public { require(_gasLimit > 0); oraclizeGasLimit = _gasLimit; }
/** * @dev Set oraclize gas limit * @param _gasLimit New oraclize gas limit */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 10089, 10239 ] }
7,677
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
EtherSportCrowdsale
contract EtherSportCrowdsale is usingOraclize, Pausable, Finalizable, Destructible, HasNoTokens, HasNoContracts { using SafeMath for uint256; using SafeERC20 for ERC20; // EtherSport token ERC20 public token; // wallet with token allowance address public tokenFrom; // st...
/** * @title EtherSportCrowdsale */
NatSpecMultiLine
setOraclizeGasPrice
function setOraclizeGasPrice(uint256 _gasPrice) onlyOwner public { require(_gasPrice > 0); oraclize_setCustomGasPrice(_gasPrice); }
/** * @dev Set oraclize gas price * @param _gasPrice New oraclize gas price */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 10344, 10503 ] }
7,678
EtherSportCrowdsale
EtherSportCrowdsale.sol
0xbfbcf2059f5436167459ed802489e69f5b41decf
Solidity
EtherSportCrowdsale
contract EtherSportCrowdsale is usingOraclize, Pausable, Finalizable, Destructible, HasNoTokens, HasNoContracts { using SafeMath for uint256; using SafeERC20 for ERC20; // EtherSport token ERC20 public token; // wallet with token allowance address public tokenFrom; // st...
/** * @title EtherSportCrowdsale */
NatSpecMultiLine
liveEtherSportCampaign
function liveEtherSportCampaign() internal view returns (bool) { return now >= startTime && now <= endTime && !paused && !isFinalized && sold < TOKENS_HARD_CAP; // solium-disable-line security/no-block-members }
/** * @return true if the EtherSport campaign is alive */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://67910773b9bb9e470685b0d3208614ee597b47c8774304d25ca5118411ac7edf
{ "func_code_index": [ 10581, 10811 ] }
7,679
XBSEpoolthree
contracts/CurveRewards.sol
0x329b328a34da4ea4b15666cbc67557920c3cb7c1
Solidity
XBSEpoolthree
contract XBSEpoolthree is LPTokenWrapper, IRewardDistributionRecipient { IERC20 public xbse = IERC20(0x69861C005D72C77b9E7EF68F4dF6E7f09d6310eb); //used as reward uint256 public EPOCH_REWARD = 15624980000000000000000; uint256 public DURATION = 2 weeks; uint256 public phase = 0; uint256 public cu...
stake
function stake(uint256 amount) public updateReward(msg.sender) checkNextEpoch checkStart { require(amount > 0, "Cannot stake 0"); super.stake(amount); emit Staked(msg.sender, amount); }
// stake visibility is public as overriding LPTokenWrapper's stake() function
LineComment
v0.5.17+commit.d19bba13
{ "func_code_index": [ 2308, 2525 ] }
7,680
VapenApes2981
vapenapes-contract-main/src/contracts/impl/ERC721.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 937, 1193 ] }
7,681
VapenApes2981
vapenapes-contract-main/src/contracts/impl/ERC721.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
balanceOf
function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; }
/** * @dev See {IERC721-balanceOf}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 1239, 1430 ] }
7,682
VapenApes2981
vapenapes-contract-main/src/contracts/impl/ERC721.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
ownerOf
function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; }
/** * @dev See {IERC721-ownerOf}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 1474, 1689 ] }
7,683
VapenApes2981
vapenapes-contract-main/src/contracts/impl/ERC721.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
name
function name() public view virtual override returns (string memory) { return _name; }
/** * @dev See {IERC721Metadata-name}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 1738, 1828 ] }
7,684
VapenApes2981
vapenapes-contract-main/src/contracts/impl/ERC721.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
symbol
function symbol() public view virtual override returns (string memory) { return _symbol; }
/** * @dev See {IERC721Metadata-symbol}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 1879, 1973 ] }
7,685
VapenApes2981
vapenapes-contract-main/src/contracts/impl/ERC721.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
tokenURI
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; }
/** * @dev See {IERC721Metadata-tokenURI}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 2026, 2335 ] }
7,686
VapenApes2981
vapenapes-contract-main/src/contracts/impl/ERC721.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_baseURI
function _baseURI() internal view virtual returns (string memory) { return __baseURI__; }
/** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 2557, 2650 ] }
7,687
VapenApes2981
vapenapes-contract-main/src/contracts/impl/ERC721.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_setBaseURI
function _setBaseURI(string memory baseURI_) internal virtual { __baseURI__ = baseURI_; }
/** * @dev Internal function to set the base URI for all token IDs. It is * automatically added as a prefix to the value returned in {tokenURI}, * or to the token ID if {tokenURI} is empty. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 2854, 2947 ] }
7,688
VapenApes2981
vapenapes-contract-main/src/contracts/impl/ERC721.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
approve
function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all"); _approve(...
/** * @dev See {IERC721-approve}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 2991, 3332 ] }
7,689
VapenApes2981
vapenapes-contract-main/src/contracts/impl/ERC721.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
getApproved
function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; }
/** * @dev See {IERC721-getApproved}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 3380, 3583 ] }
7,690
VapenApes2981
vapenapes-contract-main/src/contracts/impl/ERC721.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
setApprovalForAll
function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); }
/** * @dev See {IERC721-setApprovalForAll}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 3637, 3907 ] }
7,691
VapenApes2981
vapenapes-contract-main/src/contracts/impl/ERC721.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
isApprovedForAll
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; }
/** * @dev See {IERC721-isApprovedForAll}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 3960, 4114 ] }
7,692
VapenApes2981
vapenapes-contract-main/src/contracts/impl/ERC721.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
transferFrom
function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); }
/** * @dev See {IERC721-transferFrom}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 4163, 4452 ] }
7,693
VapenApes2981
vapenapes-contract-main/src/contracts/impl/ERC721.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); }
/** * @dev See {IERC721-safeTransferFrom}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 4505, 4655 ] }
7,694
VapenApes2981
vapenapes-contract-main/src/contracts/impl/ERC721.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); }
/** * @dev See {IERC721-safeTransferFrom}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 4708, 4987 ] }
7,695
VapenApes2981
vapenapes-contract-main/src/contracts/impl/ERC721.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_safeTransfer
function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); }
/** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 5791, 6057 ] }
7,696
VapenApes2981
vapenapes-contract-main/src/contracts/impl/ERC721.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_exists
function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); }
/** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 6332, 6449 ] }
7,697
VapenApes2981
vapenapes-contract-main/src/contracts/impl/ERC721.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_isApprovedOrOwner
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); }
/** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 6582, 6906 ] }
7,698
VapenApes2981
vapenapes-contract-main/src/contracts/impl/ERC721.sol
0x826f34dee336885b58a2db3d7a4c3e664ced0e85
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_safeMint
function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); }
/** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 7202, 7302 ] }
7,699