More Info
Private Name Tags
ContractCreator
Latest 23 from a total of 23 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Sell Token Ids | 18906770 | 249 days ago | IN | 0 ETH | 0.0038997 | ||||
Sell Token Ids | 18906636 | 249 days ago | IN | 0 ETH | 0.00167987 | ||||
Sell Token Ids | 18906616 | 249 days ago | IN | 0 ETH | 0.00193711 | ||||
Recover | 16431069 | 597 days ago | IN | 0 ETH | 0.00079138 | ||||
Recover | 16431068 | 597 days ago | IN | 0 ETH | 0.00116784 | ||||
Recover | 16420986 | 598 days ago | IN | 0 ETH | 0.00146036 | ||||
Recover | 16420985 | 598 days ago | IN | 0 ETH | 0.00165246 | ||||
Recover | 16420982 | 598 days ago | IN | 0 ETH | 0.00167701 | ||||
Recover | 16420981 | 598 days ago | IN | 0 ETH | 0.00154077 | ||||
Recover | 16420981 | 598 days ago | IN | 0 ETH | 0.00208258 | ||||
Sell Token Ids | 16286545 | 617 days ago | IN | 0 ETH | 0.00603352 | ||||
Sell Token Ids | 16286455 | 617 days ago | IN | 0 ETH | 0.00207585 | ||||
Sell Token Ids | 15239522 | 769 days ago | IN | 0 ETH | 0.0089123 | ||||
Recover | 14053588 | 957 days ago | IN | 0 ETH | 0.00808871 | ||||
Sell Token Ids | 13917343 | 979 days ago | IN | 0 ETH | 0.03768221 | ||||
Sell Token Ids | 13917256 | 979 days ago | IN | 0 ETH | 0.01536183 | ||||
Sell Token Ids | 13814680 | 994 days ago | IN | 0 ETH | 0.01228752 | ||||
Sell Token Ids | 13814536 | 994 days ago | IN | 0 ETH | 0.0135013 | ||||
Sell Token Ids | 13814281 | 994 days ago | IN | 0 ETH | 0.0146716 | ||||
Sell Token Ids | 13814148 | 994 days ago | IN | 0 ETH | 0.01348227 | ||||
Sell Token Ids | 13807861 | 995 days ago | IN | 0 ETH | 0.04174392 | ||||
Transfer | 13807688 | 995 days ago | IN | 0.001 ETH | 0.00129708 | ||||
0x60806040 | 13807643 | 995 days ago | IN | 0 ETH | 0.02730895 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
18906770 | 249 days ago | 0 ETH | ||||
18906763 | 249 days ago | 0 ETH | ||||
18906761 | 249 days ago | 0 ETH | ||||
18906645 | 249 days ago | 0 ETH | ||||
18906641 | 249 days ago | 0 ETH | ||||
18906636 | 249 days ago | 0 ETH | ||||
18906616 | 249 days ago | 0 ETH | ||||
16286583 | 617 days ago | 0 ETH | ||||
16286582 | 617 days ago | 0 ETH | ||||
16286581 | 617 days ago | 0 ETH | ||||
16286580 | 617 days ago | 0 ETH | ||||
16286570 | 617 days ago | 0 ETH | ||||
16286570 | 617 days ago | 0 ETH | ||||
16286545 | 617 days ago | 0 ETH | ||||
16286502 | 617 days ago | 0 ETH | ||||
16286498 | 617 days ago | 0 ETH | ||||
16286495 | 617 days ago | 0 ETH | ||||
16286475 | 617 days ago | 0 ETH | ||||
16286473 | 617 days ago | 0 ETH | ||||
16286455 | 617 days ago | 0 ETH | ||||
16286413 | 617 days ago | 0 ETH | ||||
16286412 | 617 days ago | 0 ETH | ||||
15239522 | 769 days ago | 0.00000002 ETH | ||||
13917449 | 978 days ago | 0 ETH | ||||
13917343 | 979 days ago | 0.00000001 ETH |
Loading...
Loading
Contract Name:
Harvest
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@jpegmint/contracts/harvest/ERC721Harvest.sol"; /**____________________________________________________________________ | ________________________________________________________________ | | | | | | | | | | | ▓▓ ▒▒░░░░░░ | | | | ▓▓ ░░ ▒▒░░░░ | | | | ░░▓▓ ░░░░ ░░ | | | | ░░▓▓ ░░░░░░ ░░░░▒▒░░▒▒ | | | | ░░▓▓ ░░ ▒▒ ░░▒▒▒▒ | | | | ▓▓▓▓ ░░░░▓▓ ░░ ░░░░░░░░░░▒▒░░ | | | | ▓▓██▓▓ ░░░░░░ ░░ ░░ ▒▒░░▒▒ | | | | ▓▓██▓▓ ░░░░░░░░░░░░░░░░▒▒▒▒░░▒▒ | | | | ▓▓██▓▓▓▓ ░░░░░░ ░░ ░░ ▒▒░░▒▒▒▒ | | | | ██▓▓▓▓ ░░▒▒ ░░░░▒▒░░▒▒▒▒░░▒▒▒▒ | | | | ▓▓██▓▓▓▓░░ ░░░░▒▒░░▒▒ ▒▒░░▒▒ | | | | ▓▓██▓▓▓▓ ░░░░ ░░▒▒▒▒▒▒▒▒░░▒▒ | | | | ▓▓▓▓▓▓▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒ | | | | ▓▓▓▓▓▓░░ ▒▒░░▒▒ ▒▒▒▒▒▒▒▒▒▒ | | | | ▓▓▓▓▓▓ ▒▒▒▒ ▒▒░░▒▒░░░░▒▒ | | | | ▓▓██▓▓░░▒▒░░▒▒▒▒▒▒▒▒░░▒▒▒▒██████▓▓ | | | | ▓▓██▓▓░░▒▒▒▒░░▒▒░░▒▒▒▒▒▒▒▒██▓▓▓▓▓▓▓▓▓▓▓▓ | | | | ▓▓██▓▓░░▒▒▒▒▒▒▒▒▒▒░░▒▒████▓▓████▓▓▓▓▓▓▓▓▓▓ | | | | ▓▓██▓▓████▒▒▒▒░░▒▒▒▒████████▓▓▓▓ ▓▓ | | | | ▓▓██▓▓████▒▒▒▒▒▒▒▒████▓▓▓▓ | | | | ▓▓██▓▓██▒▒▒▒▒▒████ | | | | ▓▓██▓▓██▒▒████ | | | | ▓▓██▓▓██ | | | | | | | | | | | | ██╗ ██╗ █████╗ ██████╗ ██╗ ██╗███████╗███████╗████████╗ | | | | ██║ ██║██╔══██╗██╔══██╗██║ ██║██╔════╝██╔════╝╚══██╔══╝ | | | | ███████║███████║██████╔╝██║ ██║█████╗ ███████╗ ██║ | | | | ██╔══██║██╔══██║██╔══██╗╚██╗ ██╔╝██╔══╝ ╚════██║ ██║ | | | | ██║ ██║██║ ██║██║ ██║ ╚████╔╝ ███████╗███████║ ██║ | | | | ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═══╝ ╚══════╝╚══════╝ ╚═╝ | | | |________________________________________________________________| | |_____________________________________________________________________*/ contract Harvest is ERC721Harvest {}
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; contract ERC721Harvest is IERC721Receiver { // Amount per token purchased uint256 public constant AMOUNT_PER_TOKEN = 1 gwei; // Contract owner address public owner; // Initialization constructor() { owner = msg.sender; } receive() external payable {} // Ownable modifier onlyOwner() { require(owner == msg.sender, "X"); _; } function transferOwnership(address newOwner) external onlyOwner { owner = newOwner; } // Harvest modifier hasAvailableBalance(uint256 howMany) { require(address(this).balance > AMOUNT_PER_TOKEN * howMany, "$"); _; } function sellTokenIds(address erc721Contract, uint256[] memory tokenIds) external hasAvailableBalance(tokenIds.length) { for (uint256 i = 0; i < tokenIds.length; i++) { _receiveToken(erc721Contract, tokenIds[i]); } _payForTransaction(msg.sender, tokenIds.length); } function onERC721Received(address operator, address, uint256, bytes calldata) external override hasAvailableBalance(1) returns (bytes4) { _payForTransaction(operator, 1); return this.onERC721Received.selector; } function _receiveToken(address erc721Contract, uint256 tokenId) internal { IERC721(erc721Contract).transferFrom(msg.sender, address(this), tokenId); } function _payForTransaction(address to, uint256 howMany) internal { (bool sent, ) = payable(to).call{ value: AMOUNT_PER_TOKEN * howMany }(""); require(sent, "$"); } // Recover function recover(address erc721Contract, uint256 tokenId, address to) external onlyOwner { IERC721(erc721Contract).transferFrom(address(this), to, tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"AMOUNT_PER_TOKEN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"erc721Contract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"recover","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"erc721Contract","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"sellTokenIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561001057600080fd5b50600080546001600160a01b031916331790556106e5806100326000396000f3fe6080604052600436106100595760003560e01c8063150b7a02146100655780638da5cb5b146100a35780638e5116bc146100db578063a370b0f9146100fd578063e39f9c7c14610123578063f2fde38b1461014357600080fd5b3661006057005b600080fd5b34801561007157600080fd5b50610085610080366004610469565b610163565b6040516001600160e01b031990911681526020015b60405180910390f35b3480156100af57600080fd5b506000546100c3906001600160a01b031681565b6040516001600160a01b03909116815260200161009a565b3480156100e757600080fd5b506100fb6100f63660046105dc565b6101ba565b005b34801561010957600080fd5b50610115633b9aca0081565b60405190815260200161009a565b34801561012f57600080fd5b506100fb61013e366004610504565b610265565b34801561014f57600080fd5b506100fb61015e366004610447565b6102e5565b6000600161017581633b9aca00610633565b471161019c5760405162461bcd60e51b815260040161019390610618565b60405180910390fd5b6101a7876001610345565b50630a85bd0160e11b9695505050505050565b6000546001600160a01b031633146101f85760405162461bcd60e51b81526020600482015260016024820152600b60fb1b6044820152606401610193565b6040516323b872dd60e01b81523060048201526001600160a01b038281166024830152604482018490528416906323b872dd90606401600060405180830381600087803b15801561024857600080fd5b505af115801561025c573d6000803e3d6000fd5b50505050505050565b805161027581633b9aca00610633565b47116102935760405162461bcd60e51b815260040161019390610618565b60005b82518110156102d4576102c2848483815181106102b5576102b5610683565b60200260200101516103c1565b806102cc81610652565b915050610296565b506102e0338351610345565b505050565b6000546001600160a01b031633146103235760405162461bcd60e51b81526020600482015260016024820152600b60fb1b6044820152606401610193565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b03831661035f83633b9aca00610633565b604051600081818185875af1925050503d806000811461039b576040519150601f19603f3d011682016040523d82523d6000602084013e6103a0565b606091505b50509050806102e05760405162461bcd60e51b815260040161019390610618565b6040516323b872dd60e01b8152336004820152306024820152604481018290526001600160a01b038316906323b872dd90606401600060405180830381600087803b15801561040f57600080fd5b505af1158015610423573d6000803e3d6000fd5b505050505050565b80356001600160a01b038116811461044257600080fd5b919050565b60006020828403121561045957600080fd5b6104628261042b565b9392505050565b60008060008060006080868803121561048157600080fd5b61048a8661042b565b94506104986020870161042b565b935060408601359250606086013567ffffffffffffffff808211156104bc57600080fd5b818801915088601f8301126104d057600080fd5b8135818111156104df57600080fd5b8960208285010111156104f157600080fd5b9699959850939650602001949392505050565b6000806040838503121561051757600080fd5b6105208361042b565b915060208084013567ffffffffffffffff8082111561053e57600080fd5b818601915086601f83011261055257600080fd5b81358181111561056457610564610699565b8060051b604051601f19603f8301168101818110858211171561058957610589610699565b604052828152858101935084860182860187018b10156105a857600080fd5b600095505b838610156105cb5780358552600195909501949386019386016105ad565b508096505050505050509250929050565b6000806000606084860312156105f157600080fd5b6105fa8461042b565b92506020840135915061060f6040850161042b565b90509250925092565b6020808252600190820152600960fa1b604082015260600190565b600081600019048311821515161561064d5761064d61066d565b500290565b60006000198214156106665761066661066d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea264697066735822122087f54283d4c3473e877cb7631bc0e30a838884ef6cbb10223a4f7007804b763d64736f6c63430008070033
Deployed Bytecode
0x6080604052600436106100595760003560e01c8063150b7a02146100655780638da5cb5b146100a35780638e5116bc146100db578063a370b0f9146100fd578063e39f9c7c14610123578063f2fde38b1461014357600080fd5b3661006057005b600080fd5b34801561007157600080fd5b50610085610080366004610469565b610163565b6040516001600160e01b031990911681526020015b60405180910390f35b3480156100af57600080fd5b506000546100c3906001600160a01b031681565b6040516001600160a01b03909116815260200161009a565b3480156100e757600080fd5b506100fb6100f63660046105dc565b6101ba565b005b34801561010957600080fd5b50610115633b9aca0081565b60405190815260200161009a565b34801561012f57600080fd5b506100fb61013e366004610504565b610265565b34801561014f57600080fd5b506100fb61015e366004610447565b6102e5565b6000600161017581633b9aca00610633565b471161019c5760405162461bcd60e51b815260040161019390610618565b60405180910390fd5b6101a7876001610345565b50630a85bd0160e11b9695505050505050565b6000546001600160a01b031633146101f85760405162461bcd60e51b81526020600482015260016024820152600b60fb1b6044820152606401610193565b6040516323b872dd60e01b81523060048201526001600160a01b038281166024830152604482018490528416906323b872dd90606401600060405180830381600087803b15801561024857600080fd5b505af115801561025c573d6000803e3d6000fd5b50505050505050565b805161027581633b9aca00610633565b47116102935760405162461bcd60e51b815260040161019390610618565b60005b82518110156102d4576102c2848483815181106102b5576102b5610683565b60200260200101516103c1565b806102cc81610652565b915050610296565b506102e0338351610345565b505050565b6000546001600160a01b031633146103235760405162461bcd60e51b81526020600482015260016024820152600b60fb1b6044820152606401610193565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b03831661035f83633b9aca00610633565b604051600081818185875af1925050503d806000811461039b576040519150601f19603f3d011682016040523d82523d6000602084013e6103a0565b606091505b50509050806102e05760405162461bcd60e51b815260040161019390610618565b6040516323b872dd60e01b8152336004820152306024820152604481018290526001600160a01b038316906323b872dd90606401600060405180830381600087803b15801561040f57600080fd5b505af1158015610423573d6000803e3d6000fd5b505050505050565b80356001600160a01b038116811461044257600080fd5b919050565b60006020828403121561045957600080fd5b6104628261042b565b9392505050565b60008060008060006080868803121561048157600080fd5b61048a8661042b565b94506104986020870161042b565b935060408601359250606086013567ffffffffffffffff808211156104bc57600080fd5b818801915088601f8301126104d057600080fd5b8135818111156104df57600080fd5b8960208285010111156104f157600080fd5b9699959850939650602001949392505050565b6000806040838503121561051757600080fd5b6105208361042b565b915060208084013567ffffffffffffffff8082111561053e57600080fd5b818601915086601f83011261055257600080fd5b81358181111561056457610564610699565b8060051b604051601f19603f8301168101818110858211171561058957610589610699565b604052828152858101935084860182860187018b10156105a857600080fd5b600095505b838610156105cb5780358552600195909501949386019386016105ad565b508096505050505050509250929050565b6000806000606084860312156105f157600080fd5b6105fa8461042b565b92506020840135915061060f6040850161042b565b90509250925092565b6020808252600190820152600960fa1b604082015260600190565b600081600019048311821515161561064d5761064d61066d565b500290565b60006000198214156106665761066661066d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea264697066735822122087f54283d4c3473e877cb7631bc0e30a838884ef6cbb10223a4f7007804b763d64736f6c63430008070033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $2,393.66 | 0.0009999 | $2.39 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.