ETH Price: $3,480.09 (+4.02%)

Contract

0xb2F43262FC23d253538ca5F7b4890f89F0EE95D9
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw144522502022-03-25 0:37:50978 days ago1648168670IN
0xb2F43262...9F0EE95D9
0 ETH0.0052759141.19039952
Withdraw144039712022-03-17 12:17:50986 days ago1647519470IN
0xb2F43262...9F0EE95D9
0 ETH0.0061722232.08502304
Withdraw143831822022-03-14 6:40:46989 days ago1647240046IN
0xb2F43262...9F0EE95D9
0 ETH0.0038974430.42833956
Withdraw142029262022-02-14 7:30:171017 days ago1644823817IN
0xb2F43262...9F0EE95D9
0 ETH0.004219131.84999764
Withdraw141116142022-01-31 4:57:181031 days ago1643605038IN
0xb2F43262...9F0EE95D9
0 ETH0.0181121101.22228679
Withdraw140691982022-01-24 15:43:411037 days ago1643039021IN
0xb2F43262...9F0EE95D9
0 ETH0.01566093136.5990025
Withdraw138630922021-12-23 18:37:551069 days ago1640284675IN
0xb2F43262...9F0EE95D9
0 ETH0.0110061895.99892873
Transfer Ownersh...138194872021-12-17 0:47:151076 days ago1639702035IN
0xb2F43262...9F0EE95D9
0 ETH0.0022299277.34194404
Withdraw137960772021-12-13 9:45:121080 days ago1639388712IN
0xb2F43262...9F0EE95D9
0 ETH0.004330637.77271315
Withdraw137696442021-12-09 7:02:211084 days ago1639033341IN
0xb2F43262...9F0EE95D9
0 ETH0.0084006373.27260736
Withdraw137454612021-12-05 10:06:541088 days ago1638698814IN
0xb2F43262...9F0EE95D9
0 ETH0.0071082362
Withdraw137200282021-12-01 8:30:351092 days ago1638347435IN
0xb2F43262...9F0EE95D9
0 ETH0.01469164128.14459602
Withdraw137116072021-11-30 0:04:151093 days ago1638230655IN
0xb2F43262...9F0EE95D9
0 ETH0.01637951142.86663516
Withdraw136994692021-11-28 1:27:141095 days ago1638062834IN
0xb2F43262...9F0EE95D9
0 ETH0.0172610396.46595218
Withdraw136769662021-11-24 11:28:471099 days ago1637753327IN
0xb2F43262...9F0EE95D9
0 ETH0.0106092492.53670927
Withdraw136540632021-11-20 20:44:081102 days ago1637441048IN
0xb2F43262...9F0EE95D9
0 ETH0.0097451685
Withdraw136459602021-11-19 14:01:381104 days ago1637330498IN
0xb2F43262...9F0EE95D9
0 ETH0.01631493142.3033435
Withdraw136415032021-11-18 20:35:241104 days ago1637267724IN
0xb2F43262...9F0EE95D9
0 ETH0.02166356188.95552846
Withdraw136354512021-11-17 21:43:111105 days ago1637185391IN
0xb2F43262...9F0EE95D9
0 ETH0.01513673132.02671739
Withdraw136141772021-11-14 13:10:131109 days ago1636895413IN
0xb2F43262...9F0EE95D9
0 ETH0.0105312291.85626422
Withdraw136039662021-11-12 22:22:081110 days ago1636755728IN
0xb2F43262...9F0EE95D9
0 ETH0.01942154169.4
Withdraw136005572021-11-12 9:36:131111 days ago1636709773IN
0xb2F43262...9F0EE95D9
0 ETH0.01498433130.69747877
Withdraw135981112021-11-12 0:29:381111 days ago1636676978IN
0xb2F43262...9F0EE95D9
0 ETH0.01513451132.0074309
Withdraw135941952021-11-11 9:52:571112 days ago1636624377IN
0xb2F43262...9F0EE95D9
0 ETH0.0150145130.96061335
Withdraw135915872021-11-10 23:56:421112 days ago1636588602IN
0xb2F43262...9F0EE95D9
0 ETH0.01682484164.38701771
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FishFarm

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 10 runs

Other Settings:
default evmVersion
File 1 of 9 : FishFarm.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import '@openzeppelin/contracts/utils/math/Math.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/utils/structs/EnumerableSet.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/access/Ownable.sol';

contract FishFarm is IERC721Receiver, Ownable {
    using EnumerableSet for EnumerableSet.UintSet;

    address public FISH;
    address private immutable ERC721_CONTRACT;
    uint256 public EXPIRATION;
    uint256 private RATE;

    mapping(address => EnumerableSet.UintSet) private _deposits;
    mapping(address => mapping(uint256 => uint256)) public depositBlocks;

    constructor(
        address fish,
        address erc721,
        uint256 rate,
        uint256 expiration
    ) {
        FISH = fish;
        ERC721_CONTRACT = erc721;
        RATE = rate;
        EXPIRATION = block.number + expiration;
    }

    function setRate(uint256 _rate) public onlyOwner() {
        RATE = _rate;
    }
    function setExpiration(uint256 _expiration) public onlyOwner() {
        EXPIRATION = _expiration;
    }

    function onERC721Received(
        address,
        address,
        uint256,
        bytes calldata
    ) external pure override returns (bytes4) {
        return IERC721Receiver.onERC721Received.selector;
    }

    function depositsOf(address account)
        external
        view
        returns (uint256[] memory)
    {
        EnumerableSet.UintSet storage depositSet = _deposits[account];
        uint256[] memory tokenIds = new uint256[](depositSet.length());

        for (uint256 i; i < depositSet.length(); i++) {
            tokenIds[i] = depositSet.at(i);
        }

        return tokenIds;
    }

    function calculateRewards(address account, uint256[] memory tokenIds)
        public
        view
        returns (uint256[] memory rewards)
    {
        rewards = new uint256[](tokenIds.length);

        for (uint256 i; i < tokenIds.length; i++) {
            uint256 tokenId = tokenIds[i];

            rewards[i] =
                RATE *
                (_deposits[account].contains(tokenId) ? 1 : 0) *
                (Math.min(block.number, EXPIRATION) -
                    depositBlocks[account][tokenId]);
        }
    }

    function claimRewards(uint256[] calldata tokenIds) public {
        uint256 reward;
        uint256 block = Math.min(block.number, EXPIRATION);

        uint256[] memory rewards = calculateRewards(msg.sender, tokenIds);

        for (uint256 i; i < tokenIds.length; i++) {
            reward += rewards[i];
            depositBlocks[msg.sender][tokenIds[i]] = block;
        }

        if (reward > 0) {
            try IERC20(FISH).transfer(msg.sender, reward) returns (bool v) {
            } catch Error(string memory) {}
        }
    }

    function deposit(uint256[] calldata tokenIds) external {
        claimRewards(tokenIds);

        for (uint256 i; i < tokenIds.length; i++) {
            IERC721(ERC721_CONTRACT).safeTransferFrom(
                msg.sender,
                address(this),
                tokenIds[i],
                ''
            );

            _deposits[msg.sender].add(tokenIds[i]);
        }
    }

    function withdraw(uint256[] calldata tokenIds) external {
        claimRewards(tokenIds);

        for (uint256 i; i < tokenIds.length; i++) {
            require(
                _deposits[msg.sender].contains(tokenIds[i]),
                'ERC721Farm: token not deposited'
            );

            _deposits[msg.sender].remove(tokenIds[i]);

            IERC721(ERC721_CONTRACT).safeTransferFrom(
                address(this),
                msg.sender,
                tokenIds[i],
                ''
            );
        }
    }
}

File 2 of 9 : Math.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a / b + (a % b == 0 ? 0 : 1);
    }
}

File 3 of 9 : IERC721.sol
// SPDX-License-Identifier: MIT

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;
}

File 4 of 9 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

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);
}

File 5 of 9 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

File 6 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 7 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @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}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @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.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 8 of 9 : IERC165.sol
// SPDX-License-Identifier: MIT

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);
}

File 9 of 9 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 10
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"fish","type":"address"},{"internalType":"address","name":"erc721","type":"address"},{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"uint256","name":"expiration","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"EXPIRATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FISH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"calculateRewards","outputs":[{"internalType":"uint256[]","name":"rewards","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"depositBlocks","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"depositsOf","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","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":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_expiration","type":"uint256"}],"name":"setExpiration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rate","type":"uint256"}],"name":"setRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a06040523480156200001157600080fd5b50604051620012b6380380620012b68339810160408190526200003491620000f8565b6200003f336200008b565b600180546001600160a01b0319166001600160a01b038616179055606083901b6001600160601b03191660805260038290556200007d81436200013f565b600255506200016492505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000f357600080fd5b919050565b600080600080608085870312156200010e578384fd5b6200011985620000db565b93506200012960208601620000db565b6040860151606090960151949790965092505050565b600082198211156200015f57634e487b7160e01b81526011600452602481fd5b500190565b60805160601c61112c6200018a6000396000818161041501526107ff015261112c6000f3fe608060405234801561001057600080fd5b50600436106100ba5760003560e01c8063068c526f146100bf57806306dfe2d1146100e8578063150b7a021461012157806334fcf43714610159578063515a20ba1461016e578063598b8e71146101815780635eac623914610194578063715018a6146101a75780638da5cb5b146101af578063983d95ce146101cf578063bb4b5734146101e2578063e3a9db1a146101eb578063f2fde38b146101fe578063ffcff32c14610211575b600080fd5b6100d26100cd366004610d55565b610224565b6040516100df9190610f1b565b60405180910390f35b6101136100f6366004610e11565b600560209081526000928352604080842090915290825290205481565b6040519081526020016100df565b61014061012f366004610cc0565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020016100df565b61016c610167366004610ed0565b61038d565b005b61016c61017c366004610ed0565b6103ca565b61016c61018f366004610e3a565b6103fe565b61016c6101a2366004610e3a565b610514565b61016c6106cf565b6101b761070a565b6040516001600160a01b0390911681526020016100df565b61016c6101dd366004610e3a565b610719565b61011360025481565b6100d26101f9366004610ca6565b6108b8565b61016c61020c366004610ca6565b61098f565b6001546101b7906001600160a01b031681565b606081516001600160401b0381111561024d57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610276578160200160208202803683370190505b50905060005b82518110156103865760008382815181106102a757634e487b7160e01b600052603260045260246000fd5b6020026020010151905060056000866001600160a01b03166001600160a01b031681526020019081526020016000206000828152602001908152602001600020546102f443600254610a2f565b6102fe9190610fcb565b6001600160a01b03861660009081526004602052604090206103209083610a49565b61032b57600061032e565b60015b60ff1660035461033e9190610fac565b6103489190610fac565b83838151811061036857634e487b7160e01b600052603260045260246000fd5b6020908102919091010152508061037e8161100e565b91505061027c565b5092915050565b3361039661070a565b6001600160a01b0316146103c55760405162461bcd60e51b81526004016103bc90610f5f565b60405180910390fd5b600355565b336103d361070a565b6001600160a01b0316146103f95760405162461bcd60e51b81526004016103bc90610f5f565b600255565b6104088282610514565b60005b8181101561050f577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b88d4fde333086868681811061046457634e487b7160e01b600052603260045260246000fd5b905060200201356040518463ffffffff1660e01b815260040161048993929190610ee8565b600060405180830381600087803b1580156104a357600080fd5b505af11580156104b7573d6000803e3d6000fd5b505050506104fc8383838181106104de57634e487b7160e01b600052603260045260246000fd5b33600090815260046020908152604090912093910201359050610a55565b50806105078161100e565b91505061040b565b505050565b60008061052343600254610a2f565b905060006105643386868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061022492505050565b905060005b848110156106055781818151811061059157634e487b7160e01b600052603260045260246000fd5b6020026020010151846105a49190610f94565b3360009081526005602052604081209195508491908888858181106105d957634e487b7160e01b600052603260045260246000fd5b9050602002013581526020019081526020016000208190555080806105fd9061100e565b915050610569565b5082156106c85760015460405163a9059cbb60e01b8152336004820152602481018590526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b15801561065857600080fd5b505af1925050508015610688575060408051601f3d908101601f1916820190925261068591810190610ea9565b60015b6106c657610694611055565b806308c379a014156106ba57506106a961106d565b806106b457506106bc565b506106c8565b505b3d6000803e3d6000fd5b505b5050505050565b336106d861070a565b6001600160a01b0316146106fe5760405162461bcd60e51b81526004016103bc90610f5f565b6107086000610a61565b565b6000546001600160a01b031690565b6107238282610514565b60005b8181101561050f5761076f83838381811061075157634e487b7160e01b600052603260045260246000fd5b33600090815260046020908152604090912093910201359050610a49565b6107bb5760405162461bcd60e51b815260206004820152601f60248201527f4552433732314661726d3a20746f6b656e206e6f74206465706f73697465640060448201526064016103bc565b6107fc8383838181106107de57634e487b7160e01b600052603260045260246000fd5b33600090815260046020908152604090912093910201359050610ab1565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b88d4fde303386868681811061084e57634e487b7160e01b600052603260045260246000fd5b905060200201356040518463ffffffff1660e01b815260040161087393929190610ee8565b600060405180830381600087803b15801561088d57600080fd5b505af11580156108a1573d6000803e3d6000fd5b5050505080806108b09061100e565b915050610726565b6001600160a01b03811660009081526004602052604081206060916108dc82610abd565b6001600160401b0381111561090157634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561092a578160200160208202803683370190505b50905060005b61093983610abd565b8110156109875761094a8382610ac7565b82828151811061096a57634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061097f8161100e565b915050610930565b509392505050565b3361099861070a565b6001600160a01b0316146109be5760405162461bcd60e51b81526004016103bc90610f5f565b6001600160a01b038116610a235760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103bc565b610a2c81610a61565b50565b6000818310610a3e5781610a40565b825b90505b92915050565b6000610a408383610ad3565b6000610a408383610aeb565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000610a408383610b35565b6000610a43825490565b6000610a408383610c52565b60009081526001919091016020526040902054151590565b6000610af78383610ad3565b610b2d57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a43565b506000610a43565b60008181526001830160205260408120548015610c48576000610b59600183610fcb565b8554909150600090610b6d90600190610fcb565b9050818114610bee576000866000018281548110610b9b57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080876000018481548110610bcc57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610c0d57634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a43565b6000915050610a43565b6000826000018281548110610c7757634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b80356001600160a01b0381168114610ca157600080fd5b919050565b600060208284031215610cb7578081fd5b610a4082610c8a565b600080600080600060808688031215610cd7578081fd5b610ce086610c8a565b9450610cee60208701610c8a565b93506040860135925060608601356001600160401b0380821115610d10578283fd5b818801915088601f830112610d23578283fd5b813581811115610d31578384fd5b896020828501011115610d42578384fd5b9699959850939650602001949392505050565b60008060408385031215610d67578182fd5b610d7083610c8a565b91506020838101356001600160401b0380821115610d8c578384fd5b818601915086601f830112610d9f578384fd5b813581811115610db157610db161103f565b8060051b9150604051610dc685840182610fe2565b81815284810184860184860187018b1015610ddf578788fd5b8795505b83861015610e01578035825260019590950194908601908601610de3565b5096999098509650505050505050565b60008060408385031215610e23578182fd5b610e2c83610c8a565b946020939093013593505050565b60008060208385031215610e4c578182fd5b82356001600160401b0380821115610e62578384fd5b818501915085601f830112610e75578384fd5b813581811115610e83578485fd5b8660208260051b8501011115610e97578485fd5b60209290920196919550909350505050565b600060208284031215610eba578081fd5b81518015158114610ec9578182fd5b9392505050565b600060208284031215610ee1578081fd5b5035919050565b6001600160a01b039384168152919092166020820152604081019190915260806060820181905260009082015260a00190565b6020808252825182820181905260009190848201906040850190845b81811015610f5357835183529284019291840191600101610f37565b50909695505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610fa757610fa7611029565b500190565b6000816000190483118215151615610fc657610fc6611029565b500290565b600082821015610fdd57610fdd611029565b500390565b601f8201601f191681016001600160401b03811182821017156110075761100761103f565b6040525050565b600060001982141561102257611022611029565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d111561106a57600481823e5160e01c5b90565b600060443d101561107b5790565b6040516003193d81016004833e81513d6001600160401b0380831160248401831017156110aa57505050505090565b82850191508151818111156110c25750505050505090565b843d87010160208285010111156110dc5750505050505090565b6110eb60208286010187610fe2565b50909594505050505056fea264697066735822122074a60afc26355a880231706b634fb0bcff1fa95d64b16f1392275e1082831c7764736f6c634300080400330000000000000000000000002604e9f68259e609e8744fb67cc410d50fc9aa0f000000000000000000000000aadba140ae5e4c8a9ef0cc86ea3124b446e3e46a0000000000000000000000000000000000000000000000000005ebd312a02aaa00000000000000000000000000000000000000000000000000000000014e2ae0

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100ba5760003560e01c8063068c526f146100bf57806306dfe2d1146100e8578063150b7a021461012157806334fcf43714610159578063515a20ba1461016e578063598b8e71146101815780635eac623914610194578063715018a6146101a75780638da5cb5b146101af578063983d95ce146101cf578063bb4b5734146101e2578063e3a9db1a146101eb578063f2fde38b146101fe578063ffcff32c14610211575b600080fd5b6100d26100cd366004610d55565b610224565b6040516100df9190610f1b565b60405180910390f35b6101136100f6366004610e11565b600560209081526000928352604080842090915290825290205481565b6040519081526020016100df565b61014061012f366004610cc0565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020016100df565b61016c610167366004610ed0565b61038d565b005b61016c61017c366004610ed0565b6103ca565b61016c61018f366004610e3a565b6103fe565b61016c6101a2366004610e3a565b610514565b61016c6106cf565b6101b761070a565b6040516001600160a01b0390911681526020016100df565b61016c6101dd366004610e3a565b610719565b61011360025481565b6100d26101f9366004610ca6565b6108b8565b61016c61020c366004610ca6565b61098f565b6001546101b7906001600160a01b031681565b606081516001600160401b0381111561024d57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610276578160200160208202803683370190505b50905060005b82518110156103865760008382815181106102a757634e487b7160e01b600052603260045260246000fd5b6020026020010151905060056000866001600160a01b03166001600160a01b031681526020019081526020016000206000828152602001908152602001600020546102f443600254610a2f565b6102fe9190610fcb565b6001600160a01b03861660009081526004602052604090206103209083610a49565b61032b57600061032e565b60015b60ff1660035461033e9190610fac565b6103489190610fac565b83838151811061036857634e487b7160e01b600052603260045260246000fd5b6020908102919091010152508061037e8161100e565b91505061027c565b5092915050565b3361039661070a565b6001600160a01b0316146103c55760405162461bcd60e51b81526004016103bc90610f5f565b60405180910390fd5b600355565b336103d361070a565b6001600160a01b0316146103f95760405162461bcd60e51b81526004016103bc90610f5f565b600255565b6104088282610514565b60005b8181101561050f577f000000000000000000000000aadba140ae5e4c8a9ef0cc86ea3124b446e3e46a6001600160a01b031663b88d4fde333086868681811061046457634e487b7160e01b600052603260045260246000fd5b905060200201356040518463ffffffff1660e01b815260040161048993929190610ee8565b600060405180830381600087803b1580156104a357600080fd5b505af11580156104b7573d6000803e3d6000fd5b505050506104fc8383838181106104de57634e487b7160e01b600052603260045260246000fd5b33600090815260046020908152604090912093910201359050610a55565b50806105078161100e565b91505061040b565b505050565b60008061052343600254610a2f565b905060006105643386868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061022492505050565b905060005b848110156106055781818151811061059157634e487b7160e01b600052603260045260246000fd5b6020026020010151846105a49190610f94565b3360009081526005602052604081209195508491908888858181106105d957634e487b7160e01b600052603260045260246000fd5b9050602002013581526020019081526020016000208190555080806105fd9061100e565b915050610569565b5082156106c85760015460405163a9059cbb60e01b8152336004820152602481018590526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b15801561065857600080fd5b505af1925050508015610688575060408051601f3d908101601f1916820190925261068591810190610ea9565b60015b6106c657610694611055565b806308c379a014156106ba57506106a961106d565b806106b457506106bc565b506106c8565b505b3d6000803e3d6000fd5b505b5050505050565b336106d861070a565b6001600160a01b0316146106fe5760405162461bcd60e51b81526004016103bc90610f5f565b6107086000610a61565b565b6000546001600160a01b031690565b6107238282610514565b60005b8181101561050f5761076f83838381811061075157634e487b7160e01b600052603260045260246000fd5b33600090815260046020908152604090912093910201359050610a49565b6107bb5760405162461bcd60e51b815260206004820152601f60248201527f4552433732314661726d3a20746f6b656e206e6f74206465706f73697465640060448201526064016103bc565b6107fc8383838181106107de57634e487b7160e01b600052603260045260246000fd5b33600090815260046020908152604090912093910201359050610ab1565b507f000000000000000000000000aadba140ae5e4c8a9ef0cc86ea3124b446e3e46a6001600160a01b031663b88d4fde303386868681811061084e57634e487b7160e01b600052603260045260246000fd5b905060200201356040518463ffffffff1660e01b815260040161087393929190610ee8565b600060405180830381600087803b15801561088d57600080fd5b505af11580156108a1573d6000803e3d6000fd5b5050505080806108b09061100e565b915050610726565b6001600160a01b03811660009081526004602052604081206060916108dc82610abd565b6001600160401b0381111561090157634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561092a578160200160208202803683370190505b50905060005b61093983610abd565b8110156109875761094a8382610ac7565b82828151811061096a57634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061097f8161100e565b915050610930565b509392505050565b3361099861070a565b6001600160a01b0316146109be5760405162461bcd60e51b81526004016103bc90610f5f565b6001600160a01b038116610a235760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103bc565b610a2c81610a61565b50565b6000818310610a3e5781610a40565b825b90505b92915050565b6000610a408383610ad3565b6000610a408383610aeb565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000610a408383610b35565b6000610a43825490565b6000610a408383610c52565b60009081526001919091016020526040902054151590565b6000610af78383610ad3565b610b2d57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a43565b506000610a43565b60008181526001830160205260408120548015610c48576000610b59600183610fcb565b8554909150600090610b6d90600190610fcb565b9050818114610bee576000866000018281548110610b9b57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080876000018481548110610bcc57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610c0d57634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a43565b6000915050610a43565b6000826000018281548110610c7757634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b80356001600160a01b0381168114610ca157600080fd5b919050565b600060208284031215610cb7578081fd5b610a4082610c8a565b600080600080600060808688031215610cd7578081fd5b610ce086610c8a565b9450610cee60208701610c8a565b93506040860135925060608601356001600160401b0380821115610d10578283fd5b818801915088601f830112610d23578283fd5b813581811115610d31578384fd5b896020828501011115610d42578384fd5b9699959850939650602001949392505050565b60008060408385031215610d67578182fd5b610d7083610c8a565b91506020838101356001600160401b0380821115610d8c578384fd5b818601915086601f830112610d9f578384fd5b813581811115610db157610db161103f565b8060051b9150604051610dc685840182610fe2565b81815284810184860184860187018b1015610ddf578788fd5b8795505b83861015610e01578035825260019590950194908601908601610de3565b5096999098509650505050505050565b60008060408385031215610e23578182fd5b610e2c83610c8a565b946020939093013593505050565b60008060208385031215610e4c578182fd5b82356001600160401b0380821115610e62578384fd5b818501915085601f830112610e75578384fd5b813581811115610e83578485fd5b8660208260051b8501011115610e97578485fd5b60209290920196919550909350505050565b600060208284031215610eba578081fd5b81518015158114610ec9578182fd5b9392505050565b600060208284031215610ee1578081fd5b5035919050565b6001600160a01b039384168152919092166020820152604081019190915260806060820181905260009082015260a00190565b6020808252825182820181905260009190848201906040850190845b81811015610f5357835183529284019291840191600101610f37565b50909695505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610fa757610fa7611029565b500190565b6000816000190483118215151615610fc657610fc6611029565b500290565b600082821015610fdd57610fdd611029565b500390565b601f8201601f191681016001600160401b03811182821017156110075761100761103f565b6040525050565b600060001982141561102257611022611029565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d111561106a57600481823e5160e01c5b90565b600060443d101561107b5790565b6040516003193d81016004833e81513d6001600160401b0380831160248401831017156110aa57505050505090565b82850191508151818111156110c25750505050505090565b843d87010160208285010111156110dc5750505050505090565b6110eb60208286010187610fe2565b50909594505050505056fea264697066735822122074a60afc26355a880231706b634fb0bcff1fa95d64b16f1392275e1082831c7764736f6c63430008040033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000002604e9f68259e609e8744fb67cc410d50fc9aa0f000000000000000000000000aadba140ae5e4c8a9ef0cc86ea3124b446e3e46a0000000000000000000000000000000000000000000000000005ebd312a02aaa00000000000000000000000000000000000000000000000000000000014e2ae0

-----Decoded View---------------
Arg [0] : fish (address): 0x2604e9f68259e609e8744fB67Cc410D50Fc9AA0F
Arg [1] : erc721 (address): 0xaAdBA140Ae5e4c8a9eF0Cc86EA3124b446e3E46A
Arg [2] : rate (uint256): 1666666666666666
Arg [3] : expiration (uint256): 21900000

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000002604e9f68259e609e8744fb67cc410d50fc9aa0f
Arg [1] : 000000000000000000000000aadba140ae5e4c8a9ef0cc86ea3124b446e3e46a
Arg [2] : 0000000000000000000000000000000000000000000000000005ebd312a02aaa
Arg [3] : 00000000000000000000000000000000000000000000000000000000014e2ae0


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ 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.