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
Poker
Poker.sol
0x8e1fd7f5ea7f7760a83222d3d470dfbf8493a03f
Solidity
IBoostedVaultWithLockup
interface IBoostedVaultWithLockup { /** * @dev Stakes a given amount of the StakingToken for the sender * @param _amount Units of StakingToken */ function stake(uint256 _amount) external; /** * @dev Stakes a given amount of the StakingToken for a given beneficiary * @param...
exit
function exit(uint256 _first, uint256 _last) external;
/** * @dev Withdraws stake from pool and claims any unlocked rewards. * @param _first Index of the first array element to claim * @param _last Index of the last array element to claim */
NatSpecMultiLine
v0.8.2+commit.661d1103
Unknown
ipfs://1429e1fcfcf05c33c73f22341e7312447162274e94d9fa3c0869a71d0605d235
{ "func_code_index": [ 988, 1047 ] }
26,200
Poker
Poker.sol
0x8e1fd7f5ea7f7760a83222d3d470dfbf8493a03f
Solidity
IBoostedVaultWithLockup
interface IBoostedVaultWithLockup { /** * @dev Stakes a given amount of the StakingToken for the sender * @param _amount Units of StakingToken */ function stake(uint256 _amount) external; /** * @dev Stakes a given amount of the StakingToken for a given beneficiary * @param...
withdraw
function withdraw(uint256 _amount) external;
/** * @dev Withdraws given stake amount from the pool * @param _amount Units of the staked token to withdraw */
NatSpecMultiLine
v0.8.2+commit.661d1103
Unknown
ipfs://1429e1fcfcf05c33c73f22341e7312447162274e94d9fa3c0869a71d0605d235
{ "func_code_index": [ 1185, 1234 ] }
26,201
Poker
Poker.sol
0x8e1fd7f5ea7f7760a83222d3d470dfbf8493a03f
Solidity
IBoostedVaultWithLockup
interface IBoostedVaultWithLockup { /** * @dev Stakes a given amount of the StakingToken for the sender * @param _amount Units of StakingToken */ function stake(uint256 _amount) external; /** * @dev Stakes a given amount of the StakingToken for a given beneficiary * @param...
claimReward
function claimReward() external;
/** * @dev Claims only the tokens that have been immediately unlocked, not including * those that are in the lockers. */
NatSpecMultiLine
v0.8.2+commit.661d1103
Unknown
ipfs://1429e1fcfcf05c33c73f22341e7312447162274e94d9fa3c0869a71d0605d235
{ "func_code_index": [ 1381, 1418 ] }
26,202
Poker
Poker.sol
0x8e1fd7f5ea7f7760a83222d3d470dfbf8493a03f
Solidity
IBoostedVaultWithLockup
interface IBoostedVaultWithLockup { /** * @dev Stakes a given amount of the StakingToken for the sender * @param _amount Units of StakingToken */ function stake(uint256 _amount) external; /** * @dev Stakes a given amount of the StakingToken for a given beneficiary * @param...
claimRewards
function claimRewards() external;
/** * @dev Claims all unlocked rewards for sender. * Note, this function is costly - the args for _claimRewards * should be determined off chain and then passed to other fn */
NatSpecMultiLine
v0.8.2+commit.661d1103
Unknown
ipfs://1429e1fcfcf05c33c73f22341e7312447162274e94d9fa3c0869a71d0605d235
{ "func_code_index": [ 1626, 1664 ] }
26,203
Poker
Poker.sol
0x8e1fd7f5ea7f7760a83222d3d470dfbf8493a03f
Solidity
IBoostedVaultWithLockup
interface IBoostedVaultWithLockup { /** * @dev Stakes a given amount of the StakingToken for the sender * @param _amount Units of StakingToken */ function stake(uint256 _amount) external; /** * @dev Stakes a given amount of the StakingToken for a given beneficiary * @param...
claimRewards
function claimRewards(uint256 _first, uint256 _last) external;
/** * @dev Claims all unlocked rewards for sender. Both immediately unlocked * rewards and also locked rewards past their time lock. * @param _first Index of the first array element to claim * @param _last Index of the last array element to claim */
NatSpecMultiLine
v0.8.2+commit.661d1103
Unknown
ipfs://1429e1fcfcf05c33c73f22341e7312447162274e94d9fa3c0869a71d0605d235
{ "func_code_index": [ 1959, 2026 ] }
26,204
Poker
Poker.sol
0x8e1fd7f5ea7f7760a83222d3d470dfbf8493a03f
Solidity
IBoostedVaultWithLockup
interface IBoostedVaultWithLockup { /** * @dev Stakes a given amount of the StakingToken for the sender * @param _amount Units of StakingToken */ function stake(uint256 _amount) external; /** * @dev Stakes a given amount of the StakingToken for a given beneficiary * @param...
pokeBoost
function pokeBoost(address _account) external;
/** * @dev Pokes a given account to reset the boost */
NatSpecMultiLine
v0.8.2+commit.661d1103
Unknown
ipfs://1429e1fcfcf05c33c73f22341e7312447162274e94d9fa3c0869a71d0605d235
{ "func_code_index": [ 2101, 2152 ] }
26,205
Poker
Poker.sol
0x8e1fd7f5ea7f7760a83222d3d470dfbf8493a03f
Solidity
IBoostedVaultWithLockup
interface IBoostedVaultWithLockup { /** * @dev Stakes a given amount of the StakingToken for the sender * @param _amount Units of StakingToken */ function stake(uint256 _amount) external; /** * @dev Stakes a given amount of the StakingToken for a given beneficiary * @param...
lastTimeRewardApplicable
function lastTimeRewardApplicable() external view returns (uint256);
/** * @dev Gets the last applicable timestamp for this reward period */
NatSpecMultiLine
v0.8.2+commit.661d1103
Unknown
ipfs://1429e1fcfcf05c33c73f22341e7312447162274e94d9fa3c0869a71d0605d235
{ "func_code_index": [ 2244, 2317 ] }
26,206
Poker
Poker.sol
0x8e1fd7f5ea7f7760a83222d3d470dfbf8493a03f
Solidity
IBoostedVaultWithLockup
interface IBoostedVaultWithLockup { /** * @dev Stakes a given amount of the StakingToken for the sender * @param _amount Units of StakingToken */ function stake(uint256 _amount) external; /** * @dev Stakes a given amount of the StakingToken for a given beneficiary * @param...
rewardPerToken
function rewardPerToken() external view returns (uint256);
/** * @dev Calculates the amount of unclaimed rewards per token since last update, * and sums with stored to give the new cumulative reward per token * @return 'Reward' per staked token */
NatSpecMultiLine
v0.8.2+commit.661d1103
Unknown
ipfs://1429e1fcfcf05c33c73f22341e7312447162274e94d9fa3c0869a71d0605d235
{ "func_code_index": [ 2538, 2601 ] }
26,207
Poker
Poker.sol
0x8e1fd7f5ea7f7760a83222d3d470dfbf8493a03f
Solidity
IBoostedVaultWithLockup
interface IBoostedVaultWithLockup { /** * @dev Stakes a given amount of the StakingToken for the sender * @param _amount Units of StakingToken */ function stake(uint256 _amount) external; /** * @dev Stakes a given amount of the StakingToken for a given beneficiary * @param...
earned
function earned(address _account) external view returns (uint256);
/** * @dev Returned the units of IMMEDIATELY claimable rewards a user has to receive. Note - this * does NOT include the majority of rewards which will be locked up. * @param _account User address * @return Total reward amount earned */
NatSpecMultiLine
v0.8.2+commit.661d1103
Unknown
ipfs://1429e1fcfcf05c33c73f22341e7312447162274e94d9fa3c0869a71d0605d235
{ "func_code_index": [ 2876, 2947 ] }
26,208
Poker
Poker.sol
0x8e1fd7f5ea7f7760a83222d3d470dfbf8493a03f
Solidity
IBoostedVaultWithLockup
interface IBoostedVaultWithLockup { /** * @dev Stakes a given amount of the StakingToken for the sender * @param _amount Units of StakingToken */ function stake(uint256 _amount) external; /** * @dev Stakes a given amount of the StakingToken for a given beneficiary * @param...
unclaimedRewards
function unclaimedRewards(address _account) external view returns ( uint256 amount, uint256 first, uint256 last );
/** * @dev Calculates all unclaimed reward data, finding both immediately unlocked rewards * and those that have passed their time lock. * @param _account User address * @return amount Total units of unclaimed rewards * @return first Index of the first userReward that has unlocked * @return last Index of th...
NatSpecMultiLine
v0.8.2+commit.661d1103
Unknown
ipfs://1429e1fcfcf05c33c73f22341e7312447162274e94d9fa3c0869a71d0605d235
{ "func_code_index": [ 3344, 3538 ] }
26,209
Poker
Poker.sol
0x8e1fd7f5ea7f7760a83222d3d470dfbf8493a03f
Solidity
Poker
contract Poker { /** * @dev For each boosted vault, poke all the over boosted accounts. * @param _vaultAccounts An array of PokeVaultAccounts structs */ function poke(PokeVaultAccounts[] memory _vaultAccounts) external { uint vaultCount = _vaultAccounts.length; for(ui...
/** * @title Poker * @author mStable * @notice Pokes accounts on boosted vaults so their vault balances can be recalculated. * @dev VERSION: 1.0 * DATE: 2021-04-17 */
NatSpecMultiLine
poke
function poke(PokeVaultAccounts[] memory _vaultAccounts) external { uint vaultCount = _vaultAccounts.length; for(uint i = 0; i < vaultCount; i++) { PokeVaultAccounts memory vaultAccounts = _vaultAccounts[i]; address boostVaultAddress = vaultAccounts.boostVault; require(boostVaultAdd...
/** * @dev For each boosted vault, poke all the over boosted accounts. * @param _vaultAccounts An array of PokeVaultAccounts structs */
NatSpecMultiLine
v0.8.2+commit.661d1103
Unknown
ipfs://1429e1fcfcf05c33c73f22341e7312447162274e94d9fa3c0869a71d0605d235
{ "func_code_index": [ 183, 1019 ] }
26,210
yVault_ZapInOut_General_V1_5
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol
0xb0880df8420974ef1b040111e5e0e95f05f8fee1
Solidity
Ownable
contract Ownable is Context { address payable public _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() internal { ...
/** * @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.5.17+commit.d19bba13
GNU GPLv2
bzzr://184a43a060b0273986d1b0e862f73f891f6ddb7b2fa3a0a845e623c3b0c50d07
{ "func_code_index": [ 536, 620 ] }
26,211
yVault_ZapInOut_General_V1_5
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol
0xb0880df8420974ef1b040111e5e0e95f05f8fee1
Solidity
Ownable
contract Ownable is Context { address payable public _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() internal { ...
/** * @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
isOwner
function isOwner() public view returns (bool) { return _msgSender() == _owner; }
/** * @dev Returns true if the caller is the current owner. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
GNU GPLv2
bzzr://184a43a060b0273986d1b0e862f73f891f6ddb7b2fa3a0a845e623c3b0c50d07
{ "func_code_index": [ 902, 1001 ] }
26,212
yVault_ZapInOut_General_V1_5
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol
0xb0880df8420974ef1b040111e5e0e95f05f8fee1
Solidity
Ownable
contract Ownable is Context { address payable public _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() internal { ...
/** * @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 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.5.17+commit.d19bba13
GNU GPLv2
bzzr://184a43a060b0273986d1b0e862f73f891f6ddb7b2fa3a0a845e623c3b0c50d07
{ "func_code_index": [ 1347, 1492 ] }
26,213
yVault_ZapInOut_General_V1_5
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol
0xb0880df8420974ef1b040111e5e0e95f05f8fee1
Solidity
Ownable
contract Ownable is Context { address payable public _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() internal { ...
/** * @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 payable newOwner) public onlyOwner { _transferOwnership(newOwner); }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
GNU GPLv2
bzzr://184a43a060b0273986d1b0e862f73f891f6ddb7b2fa3a0a845e623c3b0c50d07
{ "func_code_index": [ 1642, 1764 ] }
26,214
yVault_ZapInOut_General_V1_5
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol
0xb0880df8420974ef1b040111e5e0e95f05f8fee1
Solidity
Ownable
contract Ownable is Context { address payable public _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() internal { ...
/** * @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 payable newOwner) internal { 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`). */
NatSpecMultiLine
v0.5.17+commit.d19bba13
GNU GPLv2
bzzr://184a43a060b0273986d1b0e862f73f891f6ddb7b2fa3a0a845e623c3b0c50d07
{ "func_code_index": [ 1865, 2144 ] }
26,215
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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 || interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInt...
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 992, 1362 ] }
26,216
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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.12+commit.f00d7308
{ "func_code_index": [ 1417, 1626 ] }
26,217
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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.12+commit.f00d7308
{ "func_code_index": [ 1679, 1918 ] }
26,218
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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.12+commit.f00d7308
{ "func_code_index": [ 1976, 2078 ] }
26,219
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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.12+commit.f00d7308
{ "func_code_index": [ 2138, 2244 ] }
26,220
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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(), ".json")) : "";...
/** * @dev See {IERC721Metadata-tokenURI}. */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 2306, 2648 ] }
26,221
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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 = Metamorph.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor ap...
/** * @dev See {IERC721-approve}. */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 3378, 3786 ] }
26,222
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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.12+commit.f00d7308
{ "func_code_index": [ 3843, 4064 ] }
26,223
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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.12+commit.f00d7308
{ "func_code_index": [ 4127, 4421 ] }
26,224
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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.12+commit.f00d7308
{ "func_code_index": [ 4483, 4649 ] }
26,225
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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.12+commit.f00d7308
{ "func_code_index": [ 4707, 5040 ] }
26,226
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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.12+commit.f00d7308
{ "func_code_index": [ 5102, 5285 ] }
26,227
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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.12+commit.f00d7308
{ "func_code_index": [ 5347, 5671 ] }
26,228
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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 is equivale...
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 6529, 6840 ] }
26,229
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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.12+commit.f00d7308
{ "func_code_index": [ 7139, 7268 ] }
26,230
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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 = Metamorph.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, s...
/** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 7422, 7773 ] }
26,231
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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
safeMintInitial
function safeMintInitial() external onlyOwner returns (bool) { require(saleState == 0, "initial assignment is ended"); for (uint256 i = 1; i <= _initialMintCount; i++) { _safeMint(owner(), i); } return true; }
// initial assignment
LineComment
v0.8.12+commit.f00d7308
{ "func_code_index": [ 8947, 9208 ] }
26,232
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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(uint8 count) external payable { require(saleState == 3, "public sale is not begun"); require(count > 0 && count <= 3, "invalid count"); uint256 price = tokenPrice * count; require(msg.value >= price, "insufficient value"); payable(owner()).transfer(price); payable(_msgSender()...
// public sale
LineComment
v0.8.12+commit.f00d7308
{ "func_code_index": [ 12351, 12925 ] }
26,233
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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 { require(tokenId <= _totalSaleCount, "out of token"); _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.12+commit.f00d7308
{ "func_code_index": [ 13251, 13424 ] }
26,234
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); }
/** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 13641, 13956 ] }
26,235
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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
_mint
function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(add...
/** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 14274, 14650 ] }
26,236
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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
_burn
function _burn(uint256 tokenId) internal virtual { address owner = Metamorph.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); }
/** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 14863, 15218 ] }
26,237
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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
_transfer
function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(saleState == 3 || from == owner(), "wait for public sale begins"); require(Metamorph.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to ...
/** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 15538, 16225 ] }
26,238
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(Metamorph.ownerOf(tokenId), to, tokenId); }
/** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 16332, 16510 ] }
26,239
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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
_checkOnERC721Received
function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver...
/** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId ...
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 17059, 17841 ] }
26,240
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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
tokenOfOwnerByIndex
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < Metamorph.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; }
/** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 18378, 18638 ] }
26,241
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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
totalSupply
function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; }
/** * @dev See {IERC721Enumerable-totalSupply}. */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 18705, 18820 ] }
26,242
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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
tokenByIndex
function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < Metamorph.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; }
/** * @dev See {IERC721Enumerable-tokenByIndex}. */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 18888, 19115 ] }
26,243
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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
_beforeTokenTransfer
function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual { if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _remov...
/** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s ...
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 19707, 20218 ] }
26,244
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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
_addTokenToOwnerEnumeration
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = Metamorph.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.12+commit.f00d7308
{ "func_code_index": [ 20508, 20732 ] }
26,245
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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
_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.12+commit.f00d7308
{ "func_code_index": [ 20923, 21088 ] }
26,246
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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
_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 = Metamorph.balanceOf(from) - 1; uint256 to...
/** * @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 writes). *...
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 21701, 22678 ] }
26,247
Metamorph
contracts/Metamorph.sol
0xf386ceea734ab050f32d429d8afb6353088f2734
Solidity
Metamorph
contract Metamorph is Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using SafeMath for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address ...
/** * @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
_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 = _allTokens...
/** * @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.12+commit.f00d7308
{ "func_code_index": [ 22962, 24027 ] }
26,248
FoxicoPool
FoxicoPool.sol
0xf051a2f404435d3413337aae24171342fddc8571
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.21+commit.dfe3193c
bzzr://f76222fbaa30caf4de64d9f763309bf157f5666ca5ec6545c372911c5c5a8127
{ "func_code_index": [ 89, 272 ] }
26,249
FoxicoPool
FoxicoPool.sol
0xf051a2f404435d3413337aae24171342fddc8571
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.21+commit.dfe3193c
bzzr://f76222fbaa30caf4de64d9f763309bf157f5666ca5ec6545c372911c5c5a8127
{ "func_code_index": [ 356, 629 ] }
26,250
FoxicoPool
FoxicoPool.sol
0xf051a2f404435d3413337aae24171342fddc8571
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.21+commit.dfe3193c
bzzr://f76222fbaa30caf4de64d9f763309bf157f5666ca5ec6545c372911c5c5a8127
{ "func_code_index": [ 744, 860 ] }
26,251
FoxicoPool
FoxicoPool.sol
0xf051a2f404435d3413337aae24171342fddc8571
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.21+commit.dfe3193c
bzzr://f76222fbaa30caf4de64d9f763309bf157f5666ca5ec6545c372911c5c5a8127
{ "func_code_index": [ 924, 1060 ] }
26,252
FoxicoPool
FoxicoPool.sol
0xf051a2f404435d3413337aae24171342fddc8571
Solidity
Ownable
contract Ownable { mapping(address => bool) internal owners; 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{...
/** * @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{ owners[msg.sender] = true; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://f76222fbaa30caf4de64d9f763309bf157f5666ca5ec6545c372911c5c5a8127
{ "func_code_index": [ 290, 364 ] }
26,253
FoxicoPool
FoxicoPool.sol
0xf051a2f404435d3413337aae24171342fddc8571
Solidity
FoxicoPool
contract FoxicoPool is Ownable { using SafeMath for uint256; mapping (address => uint256) public deposited; mapping (address => uint256) public claimed; // start and end timestamps where investments are allowed (both inclusive) uint256 public startTime; uint256 public endTime; // address wh...
forwardFunds
function forwardFunds() onlyOwner public { require(now >= endTime); wallet.transfer(address(this).balance); }
// send ether to the fund collection wallet
LineComment
v0.4.21+commit.dfe3193c
bzzr://f76222fbaa30caf4de64d9f763309bf157f5666ca5ec6545c372911c5c5a8127
{ "func_code_index": [ 1922, 2047 ] }
26,254
GoofToken
contracts/GoofToken.sol
0x84802079fde7658f9d0969810693a2fa1870eedf
Solidity
GoofToken
contract GoofToken is Ownable, ERC20("Goofball Gang Token", "GOOF"), ERC20Burnable { uint256 public constant DAILY_RATE = 10 ether; uint256 public constant START_TIME = 1634250000; /* ~Oct 15th 2021 */ uint256 public constant TIME_BLOCKSIZE = 10_000; uint256 public constant BONUS_TIME_LIMIT_1 = 163831...
burnTokens
function burnTokens(uint256 amount) private { if (msg.value > 0 && gweiPerGoof > 0) { uint256 converted = (msg.value * 1 gwei) / gweiPerGoof; if (converted >= amount) { amount = 0; } else { amount -= converted; } } if (amount > 0) { _burn(msg.s...
// burn tokens, allowing sent ETH to be converted according to gweiPerGoof
LineComment
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 5579, 5974 ] }
26,255
GoofToken
contracts/GoofToken.sol
0x84802079fde7658f9d0969810693a2fa1870eedf
Solidity
GoofToken
contract GoofToken is Ownable, ERC20("Goofball Gang Token", "GOOF"), ERC20Burnable { uint256 public constant DAILY_RATE = 10 ether; uint256 public constant START_TIME = 1634250000; /* ~Oct 15th 2021 */ uint256 public constant TIME_BLOCKSIZE = 10_000; uint256 public constant BONUS_TIME_LIMIT_1 = 163831...
commitChange
function commitChange( uint256 tokenId, uint256 pricePaid, bytes memory changeData ) public payable { require(delegate.ownerOf(tokenId) == msg.sender, "not owner"); burnTokens(pricePaid); emit ChangeCommit(tokenId, pricePaid, changeData); }
// Buy items
LineComment
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 5993, 6293 ] }
26,256
LaiNongToken
LaiNongToken.sol
0x5018356fa98da22e7554e957fb660ea8b995f464
Solidity
LaiNongToken
contract LaiNongToken { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (add...
LaiNongToken
function LaiNongToken( uint256 initialSupply, string tokenName, string tokenSymbol ) public { totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens n...
/** * Constructor function * * Initializes contract with initial supply tokens to the creator of the contract */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://a33a280b32eeb0172f09a60dc004f2a0efe29289e43a72f0779db196be9b8518
{ "func_code_index": [ 843, 1390 ] }
26,257
LaiNongToken
LaiNongToken.sol
0x5018356fa98da22e7554e957fb660ea8b995f464
Solidity
LaiNongToken
contract LaiNongToken { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (add...
_transfer
function _transfer(address _from, address _to, uint _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(_to != 0x0); // Check if the sender has enough require(balanceOf[_from] >= _value); // Check for overflows require(balanceOf[_to] + _value >= balanceOf[_to]...
/** * Internal transfer, only can be called by this contract */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://a33a280b32eeb0172f09a60dc004f2a0efe29289e43a72f0779db196be9b8518
{ "func_code_index": [ 1474, 2322 ] }
26,258
LaiNongToken
LaiNongToken.sol
0x5018356fa98da22e7554e957fb660ea8b995f464
Solidity
LaiNongToken
contract LaiNongToken { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (add...
transfer
function transfer(address _to, uint256 _value) public { _transfer(msg.sender, _to, _value); }
/** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://a33a280b32eeb0172f09a60dc004f2a0efe29289e43a72f0779db196be9b8518
{ "func_code_index": [ 2528, 2640 ] }
26,259
LaiNongToken
LaiNongToken.sol
0x5018356fa98da22e7554e957fb660ea8b995f464
Solidity
LaiNongToken
contract LaiNongToken { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (add...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_value <= allowance[_from][msg.sender]); // Check allowance allowance[_from][msg.sender] -= _value; _transfer(_from, _to, _value); return true; }
/** * Transfer tokens from other address * * Send `_value` tokens to `_to` on behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://a33a280b32eeb0172f09a60dc004f2a0efe29289e43a72f0779db196be9b8518
{ "func_code_index": [ 2915, 3216 ] }
26,260
LaiNongToken
LaiNongToken.sol
0x5018356fa98da22e7554e957fb660ea8b995f464
Solidity
LaiNongToken
contract LaiNongToken { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (add...
approve
function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; return true; }
/** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens on your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://a33a280b32eeb0172f09a60dc004f2a0efe29289e43a72f0779db196be9b8518
{ "func_code_index": [ 3480, 3656 ] }
26,261
LaiNongToken
LaiNongToken.sol
0x5018356fa98da22e7554e957fb660ea8b995f464
Solidity
LaiNongToken
contract LaiNongToken { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (add...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } }
/** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens on your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to s...
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://a33a280b32eeb0172f09a60dc004f2a0efe29289e43a72f0779db196be9b8518
{ "func_code_index": [ 4050, 4402 ] }
26,262
LaiNongToken
LaiNongToken.sol
0x5018356fa98da22e7554e957fb660ea8b995f464
Solidity
LaiNongToken
contract LaiNongToken { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (add...
burn
function burn(uint256 _value) public returns (bool success) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough balanceOf[msg.sender] -= _value; // Subtract from the sender totalSupply -= _value; // Updates totalSupply emit Burn(msg.sender,...
/** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://a33a280b32eeb0172f09a60dc004f2a0efe29289e43a72f0779db196be9b8518
{ "func_code_index": [ 4572, 4951 ] }
26,263
LaiNongToken
LaiNongToken.sol
0x5018356fa98da22e7554e957fb660ea8b995f464
Solidity
LaiNongToken
contract LaiNongToken { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (add...
burnFrom
function burnFrom(address _from, uint256 _value) public returns (bool success) { require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] -= _value; // Sub...
/** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://a33a280b32eeb0172f09a60dc004f2a0efe29289e43a72f0779db196be9b8518
{ "func_code_index": [ 5209, 5825 ] }
26,264
Helex
Helex.sol
0x9a00d6564945681018619fc8957c798c2bc7c9fc
Solidity
Helex
contract Helex{ string public standard = 'Helex 5.0'; using SafeMath for uint256; mapping(address => mapping(address => uint256)) allowed; mapping(address => uint256) balances; uint256 public totalSupply; uint256 public decimals; address public owner; bytes32 public symbol...
Helex
function Helex() { totalSupply = 50000000; symbol = 'HLX'; owner = 0x753f309A8d9Aaed2fb92e54628043099d043180e; balances[owner] = 50000000; decimals = 1; }
/* Public variables of the Helex Token. Total Supply 5 million */
Comment
v0.4.18+commit.9cf6e910
bzzr://e1e51537f99f7dfde15c1c65f2ed9b9d14832736c7e44250754f11fa3419aa01
{ "func_code_index": [ 573, 789 ] }
26,265
ETToken
ETToken.sol
0x8fe19c447821b4cdcdd5012bca1b5469ca96d80d
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Protection from short address attack */ modifier onlyPayloadSize(uint size) { assert(msg.data.length == size + 4); _; } ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev total number of tokens in existence */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17eec06f396b0ca99a695c50ebca4876cca778c0bd1a22a29ae6199c2e734ecd
{ "func_code_index": [ 387, 483 ] }
26,266
ETToken
ETToken.sol
0x8fe19c447821b4cdcdd5012bca1b5469ca96d80d
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Protection from short address attack */ modifier onlyPayloadSize(uint size) { assert(msg.data.length == size + 4); _; } ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) onlyPayloadSize(2 * 32) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to]...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17eec06f396b0ca99a695c50ebca4876cca778c0bd1a22a29ae6199c2e734ecd
{ "func_code_index": [ 651, 1160 ] }
26,267
ETToken
ETToken.sol
0x8fe19c447821b4cdcdd5012bca1b5469ca96d80d
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Protection from short address attack */ modifier onlyPayloadSize(uint size) { assert(msg.data.length == size + 4); _; } ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17eec06f396b0ca99a695c50ebca4876cca778c0bd1a22a29ae6199c2e734ecd
{ "func_code_index": [ 1376, 1496 ] }
26,268
ETToken
ETToken.sol
0x8fe19c447821b4cdcdd5012bca1b5469ca96d80d
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Protection from short address attack */ modifier onlyPayloadSize(uint size) { assert(msg.data.length == size + 4); _; } ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
_postTransferHook
function _postTransferHook(address _from, address _to, uint256 _value) internal;
/** * @dev Hook for custom actions to be executed after transfer has completed * @param _from Transferred from * @param _to Transferred to * @param _value Value transferred */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17eec06f396b0ca99a695c50ebca4876cca778c0bd1a22a29ae6199c2e734ecd
{ "func_code_index": [ 1705, 1790 ] }
26,269
ETToken
ETToken.sol
0x8fe19c447821b4cdcdd5012bca1b5469ca96d80d
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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...
/** * @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) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); ...
/** * @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 amount of tokens to be transferred */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17eec06f396b0ca99a695c50ebca4876cca778c0bd1a22a29ae6199c2e734ecd
{ "func_code_index": [ 415, 960 ] }
26,270
ETToken
ETToken.sol
0x8fe19c447821b4cdcdd5012bca1b5469ca96d80d
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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...
/** * @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) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17eec06f396b0ca99a695c50ebca4876cca778c0bd1a22a29ae6199c2e734ecd
{ "func_code_index": [ 1612, 1823 ] }
26,271
ETToken
ETToken.sol
0x8fe19c447821b4cdcdd5012bca1b5469ca96d80d
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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...
/** * @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) { 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 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17eec06f396b0ca99a695c50ebca4876cca778c0bd1a22a29ae6199c2e734ecd
{ "func_code_index": [ 2159, 2298 ] }
26,272
ETToken
ETToken.sol
0x8fe19c447821b4cdcdd5012bca1b5469ca96d80d
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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...
/** * @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
increaseApproval
function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17eec06f396b0ca99a695c50ebca4876cca778c0bd1a22a29ae6199c2e734ecd
{ "func_code_index": [ 2784, 3069 ] }
26,273
ETToken
ETToken.sol
0x8fe19c447821b4cdcdd5012bca1b5469ca96d80d
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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...
/** * @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
decreaseApproval
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); }...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17eec06f396b0ca99a695c50ebca4876cca778c0bd1a22a29ae6199c2e734ecd
{ "func_code_index": [ 3560, 4015 ] }
26,274
ETToken
ETToken.sol
0x8fe19c447821b4cdcdd5012bca1b5469ca96d80d
Solidity
Owned
contract Owned { address owner; modifier onlyOwner { require(msg.sender == owner); _; } /// @dev Contract constructor function Owned() public { owner = msg.sender; } }
Owned
function Owned() public { owner = msg.sender; }
/// @dev Contract constructor
NatSpecSingleLine
v0.4.21+commit.dfe3193c
bzzr://17eec06f396b0ca99a695c50ebca4876cca778c0bd1a22a29ae6199c2e734ecd
{ "func_code_index": [ 161, 227 ] }
26,275
ETToken
ETToken.sol
0x8fe19c447821b4cdcdd5012bca1b5469ca96d80d
Solidity
ETToken
contract ETToken is Owned, StandardToken { using SafeMath for uint; string public name = "ETH.TOWN Token"; string public symbol = "ETIT"; uint8 public decimals = 18; address public beneficiary; address public oracle; address public heroContract; modifier onlyOracle { ...
transferWithParams
function transferWithParams(address _to, uint256 _value, uint256 _param1, uint256 _param2, uint256 _param3) onlyPayloadSize(5 * 32) external returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg...
/** * @dev transfer token for a specified address and forward the parameters to token recipient if any * @param _to The address to transfer to. * @param _value The amount to be transferred. * @param _param1 Parameter 1 for the token recipient * @param _param2 Parameter 2 for the token recipient * @param _pa...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17eec06f396b0ca99a695c50ebca4876cca778c0bd1a22a29ae6199c2e734ecd
{ "func_code_index": [ 4115, 4718 ] }
26,276
ETToken
ETToken.sol
0x8fe19c447821b4cdcdd5012bca1b5469ca96d80d
Solidity
ETToken
contract ETToken is Owned, StandardToken { using SafeMath for uint; string public name = "ETH.TOWN Token"; string public symbol = "ETIT"; uint8 public decimals = 18; address public beneficiary; address public oracle; address public heroContract; modifier onlyOracle { ...
_postTransferHook
function _postTransferHook(address _from, address _to, uint256 _value) internal { _invokeTokenRecipient(_from, _to, _value, 0, 0, 0); }
/** * @dev Hook for custom actions to be executed after transfer has completed * @param _from Transferred from * @param _to Transferred to * @param _value Value transferred */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://17eec06f396b0ca99a695c50ebca4876cca778c0bd1a22a29ae6199c2e734ecd
{ "func_code_index": [ 4927, 5081 ] }
26,277
DFS
DFS.sol
0x0936921033fa797ca46db4a06a977c346f181832
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) pub...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); T...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
MIT
bzzr://bb32759b4d7a5680db03b51e499abb7f2db13ff43861eddcf34441dbc337570a
{ "func_code_index": [ 268, 659 ] }
26,278
DFS
DFS.sol
0x0936921033fa797ca46db4a06a977c346f181832
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) pub...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
MIT
bzzr://bb32759b4d7a5680db03b51e499abb7f2db13ff43861eddcf34441dbc337570a
{ "func_code_index": [ 865, 977 ] }
26,279
DFS
DFS.sol
0x0936921033fa797ca46db4a06a977c346f181832
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transf...
/** * @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) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); 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 * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
MIT
bzzr://bb32759b4d7a5680db03b51e499abb7f2db13ff43861eddcf34441dbc337570a
{ "func_code_index": [ 401, 853 ] }
26,280
DFS
DFS.sol
0x0936921033fa797ca46db4a06a977c346f181832
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transf...
/** * @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) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
MIT
bzzr://bb32759b4d7a5680db03b51e499abb7f2db13ff43861eddcf34441dbc337570a
{ "func_code_index": [ 1485, 1675 ] }
26,281
DFS
DFS.sol
0x0936921033fa797ca46db4a06a977c346f181832
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transf...
/** * @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) { 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 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
MIT
bzzr://bb32759b4d7a5680db03b51e499abb7f2db13ff43861eddcf34441dbc337570a
{ "func_code_index": [ 1999, 2130 ] }
26,282
DFS
DFS.sol
0x0936921033fa797ca46db4a06a977c346f181832
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transf...
/** * @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
increaseApproval
function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
MIT
bzzr://bb32759b4d7a5680db03b51e499abb7f2db13ff43861eddcf34441dbc337570a
{ "func_code_index": [ 2375, 2639 ] }
26,283
DFS
DFS.sol
0x0936921033fa797ca46db4a06a977c346f181832
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.25+commit.59dbf8f1
MIT
bzzr://bb32759b4d7a5680db03b51e499abb7f2db13ff43861eddcf34441dbc337570a
{ "func_code_index": [ 261, 321 ] }
26,284
DFS
DFS.sol
0x0936921033fa797ca46db4a06a977c346f181832
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.25+commit.59dbf8f1
MIT
bzzr://bb32759b4d7a5680db03b51e499abb7f2db13ff43861eddcf34441dbc337570a
{ "func_code_index": [ 644, 820 ] }
26,285
LiquidationAuction01
/Users/dougmolina/Apps/projects/yearn/unit-protocol-core/contracts/liquidators/LiquidationAuction01.sol
0xa41a3625c02c60ae932515e7f921ada1811af6a5
Solidity
LiquidationAuction01
contract LiquidationAuction01 is ReentrancyGuard { using SafeMath for uint; uint public constant DENOMINATOR_1E2 = 1e2; // vault manager parameters contract VaultManagerParameters public immutable vaultManagerParameters; // Vault contract Vault public immutable vault; /** * @dev Tri...
/** * @title LiquidationAuction01 * @author Unit Protocol: Artem Zakharov (az@unit.xyz), Alexander Ponomorev (@bcngod) * @dev Manages liquidation auction of position collateral **/
NatSpecMultiLine
buyout
function buyout(address asset, address user) public nonReentrant { require(vault.liquidationBlock(asset, user) != 0, "Unit Protocol: LIQUIDATION_NOT_TRIGGERED"); uint startingPrice = vault.liquidationPrice(asset, user); uint blocksPast = block.number.sub(vault.liquidationBlock(asset, user)); uint devalu...
/** * @dev Buyouts a position's collateral * @param asset The address of the main collateral token of a position * @param user The owner of a position **/
NatSpecMultiLine
v0.7.5+commit.eb77ed08
{ "func_code_index": [ 1005, 2327 ] }
26,286
CryptoBeauties
contracts/IERC165.sol
0xfa1dbfeb3933acab666ce8bc7a20d5560fbe2504
Solidity
IERC165
interface IERC165 { /// @notice Query if a contract implements an interface /// @param interfaceID The interface identifier, as specified in ERC-165 /// @dev Interface identification is specified in ERC-165. This function /// uses less than 30,000 gas. /// @return `true` if the contract implem...
supportsInterface
function supportsInterface(bytes4 interfaceID) external view returns (bool);
/// @notice Query if a contract implements an interface /// @param interfaceID The interface identifier, as specified in ERC-165 /// @dev Interface identification is specified in ERC-165. This function /// uses less than 30,000 gas. /// @return `true` if the contract implements `interfaceID` and /// `interfaceID` is ...
NatSpecSingleLine
v0.8.7+commit.e28d00a7
MIT
ipfs://7a3c20c32e1c7de0d2d43582a2a6385b1070506260e629e6e16f54361ce371bb
{ "func_code_index": [ 405, 486 ] }
26,287
MetaVault
MetaVault.sol
0xf0df7a455e2e72e9b71364679a66af2c2d86f7a2
Solidity
Ownable
abstract contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = msg.sender; ...
/** * @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.8.9+commit.e5eed63a
None
ipfs://85f36c3b6e8e65613da6d069cdad73d2dcca8752d54c3ecf9b39262f16bd078d
{ "func_code_index": [ 484, 568 ] }
26,288
MetaVault
MetaVault.sol
0xf0df7a455e2e72e9b71364679a66af2c2d86f7a2
Solidity
Ownable
abstract contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = msg.sender; ...
/** * @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 onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://85f36c3b6e8e65613da6d069cdad73d2dcca8752d54c3ecf9b39262f16bd078d
{ "func_code_index": [ 1125, 1270 ] }
26,289
MetaVault
MetaVault.sol
0xf0df7a455e2e72e9b71364679a66af2c2d86f7a2
Solidity
Ownable
abstract contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = msg.sender; ...
/** * @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 onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://85f36c3b6e8e65613da6d069cdad73d2dcca8752d54c3ecf9b39262f16bd078d
{ "func_code_index": [ 1420, 1661 ] }
26,290
MetaVault
MetaVault.sol
0xf0df7a455e2e72e9b71364679a66af2c2d86f7a2
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly ...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://85f36c3b6e8e65613da6d069cdad73d2dcca8752d54c3ecf9b39262f16bd078d
{ "func_code_index": [ 606, 1033 ] }
26,291
MetaVault
MetaVault.sol
0xf0df7a455e2e72e9b71364679a66af2c2d86f7a2
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://85f36c3b6e8e65613da6d069cdad73d2dcca8752d54c3ecf9b39262f16bd078d
{ "func_code_index": [ 1963, 2365 ] }
26,292
MetaVault
MetaVault.sol
0xf0df7a455e2e72e9b71364679a66af2c2d86f7a2
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://85f36c3b6e8e65613da6d069cdad73d2dcca8752d54c3ecf9b39262f16bd078d
{ "func_code_index": [ 3121, 3299 ] }
26,293
MetaVault
MetaVault.sol
0xf0df7a455e2e72e9b71364679a66af2c2d86f7a2
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://85f36c3b6e8e65613da6d069cdad73d2dcca8752d54c3ecf9b39262f16bd078d
{ "func_code_index": [ 3524, 3724 ] }
26,294
MetaVault
MetaVault.sol
0xf0df7a455e2e72e9b71364679a66af2c2d86f7a2
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://85f36c3b6e8e65613da6d069cdad73d2dcca8752d54c3ecf9b39262f16bd078d
{ "func_code_index": [ 4094, 4325 ] }
26,295
MetaVault
MetaVault.sol
0xf0df7a455e2e72e9b71364679a66af2c2d86f7a2
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disa...
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://85f36c3b6e8e65613da6d069cdad73d2dcca8752d54c3ecf9b39262f16bd078d
{ "func_code_index": [ 4576, 5111 ] }
26,296
MetaVault
MetaVault.sol
0xf0df7a455e2e72e9b71364679a66af2c2d86f7a2
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionStaticCall
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://85f36c3b6e8e65613da6d069cdad73d2dcca8752d54c3ecf9b39262f16bd078d
{ "func_code_index": [ 5291, 5495 ] }
26,297
MetaVault
MetaVault.sol
0xf0df7a455e2e72e9b71364679a66af2c2d86f7a2
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionStaticCall
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.stat...
/** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://85f36c3b6e8e65613da6d069cdad73d2dcca8752d54c3ecf9b39262f16bd078d
{ "func_code_index": [ 5682, 6109 ] }
26,298
MetaVault
MetaVault.sol
0xf0df7a455e2e72e9b71364679a66af2c2d86f7a2
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionDelegateCall
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://85f36c3b6e8e65613da6d069cdad73d2dcca8752d54c3ecf9b39262f16bd078d
{ "func_code_index": [ 6291, 6496 ] }
26,299