ETH Price: $3,379.75 (-0.82%)
Gas: 4 Gwei

Contract

0x6477875A989dFdeC22BEC8566211EbD949678B88
 

Overview

ETH Balance

0.049952863 ETH

Eth Value

$168.83 (@ $3,379.75/ETH)
Transaction Hash
Method
Block
From
To
Value
Batch Transfer201979692024-06-29 14:34:599 mins ago1719671699IN
0x6477875A...949678B88
0 ETH0.000846253.66381334
Batch Transfer201977022024-06-29 13:41:111 hr ago1719668471IN
0x6477875A...949678B88
0 ETH0.001319962.63959862
Batch Transfer201975012024-06-29 13:00:111 hr ago1719666011IN
0x6477875A...949678B88
0 ETH0.000520672.98578776
Batch Transfer201974932024-06-29 12:58:351 hr ago1719665915IN
0x6477875A...949678B88
0 ETH0.00079912.78576859
Batch Transfer201974642024-06-29 12:52:471 hr ago1719665567IN
0x6477875A...949678B88
0 ETH0.002573512.74714373
Batch Transfer201974412024-06-29 12:48:111 hr ago1719665291IN
0x6477875A...949678B88
0 ETH0.000313273.0002097
Batch Transfer201974352024-06-29 12:46:591 hr ago1719665219IN
0x6477875A...949678B88
0 ETH0.000567053.18589323
Batch Transfer201974122024-06-29 12:42:232 hrs ago1719664943IN
0x6477875A...949678B88
0 ETH0.000283152.81043253
Batch Transfer201974052024-06-29 12:40:592 hrs ago1719664859IN
0x6477875A...949678B88
0 ETH0.000273682.44413922
Batch Transfer201973972024-06-29 12:39:232 hrs ago1719664763IN
0x6477875A...949678B88
0 ETH0.000477832.29975494
Batch Transfer201973852024-06-29 12:36:592 hrs ago1719664619IN
0x6477875A...949678B88
0 ETH0.000321792.38165229
Batch Transfer201961682024-06-29 8:31:596 hrs ago1719649919IN
0x6477875A...949678B88
0 ETH0.000433333.30636828
Batch Transfer201961602024-06-29 8:30:116 hrs ago1719649811IN
0x6477875A...949678B88
0 ETH0.000944862.94706663
Batch Transfer201960642024-06-29 8:10:596 hrs ago1719648659IN
0x6477875A...949678B88
0 ETH0.000460712.59339811
Batch Transfer201960512024-06-29 8:08:236 hrs ago1719648503IN
0x6477875A...949678B88
0 ETH0.000217722.34907298
Batch Transfer201960472024-06-29 8:07:356 hrs ago1719648455IN
0x6477875A...949678B88
0 ETH0.000253152.32343128
Batch Transfer201959212024-06-29 7:41:597 hrs ago1719646919IN
0x6477875A...949678B88
0 ETH0.000375862.13246585
Batch Transfer201951142024-06-29 4:59:599 hrs ago1719637199IN
0x6477875A...949678B88
0 ETH0.000293941.51032683
Batch Transfer201950992024-06-29 4:56:479 hrs ago1719637007IN
0x6477875A...949678B88
0 ETH0.0001671.52299014
Batch Transfer201950932024-06-29 4:55:359 hrs ago1719636935IN
0x6477875A...949678B88
0 ETH0.000431531.5873314
Batch Transfer201950842024-06-29 4:53:479 hrs ago1719636827IN
0x6477875A...949678B88
0 ETH0.000149631.47531229
Batch Transfer201950752024-06-29 4:51:599 hrs ago1719636719IN
0x6477875A...949678B88
0 ETH0.000197141.55477098
Batch Transfer201950702024-06-29 4:50:599 hrs ago1719636659IN
0x6477875A...949678B88
0 ETH0.000185181.50350175
Batch Transfer201950682024-06-29 4:50:359 hrs ago1719636635IN
0x6477875A...949678B88
0 ETH0.000209971.88451307
Batch Transfer201948932024-06-29 4:15:3510 hrs ago1719634535IN
0x6477875A...949678B88
0 ETH0.004666411.6239254
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To Value
201979692024-06-29 14:34:599 mins ago1719671699
0x6477875A...949678B88
0 ETH
201977022024-06-29 13:41:111 hr ago1719668471
0x6477875A...949678B88
0.00000001 ETH
201975012024-06-29 13:00:111 hr ago1719666011
0x6477875A...949678B88
0 ETH
201974932024-06-29 12:58:351 hr ago1719665915
0x6477875A...949678B88
0.00000001 ETH
201974642024-06-29 12:52:471 hr ago1719665567
0x6477875A...949678B88
0.00000002 ETH
201974412024-06-29 12:48:111 hr ago1719665291
0x6477875A...949678B88
0 ETH
201974352024-06-29 12:46:591 hr ago1719665219
0x6477875A...949678B88
0 ETH
201974122024-06-29 12:42:232 hrs ago1719664943
0x6477875A...949678B88
0 ETH
201974052024-06-29 12:40:592 hrs ago1719664859
0x6477875A...949678B88
0 ETH
201973972024-06-29 12:39:232 hrs ago1719664763
0x6477875A...949678B88
0 ETH
201973852024-06-29 12:36:592 hrs ago1719664619
0x6477875A...949678B88
0 ETH
201961682024-06-29 8:31:596 hrs ago1719649919
0x6477875A...949678B88
0 ETH
201961602024-06-29 8:30:116 hrs ago1719649811
0x6477875A...949678B88
0 ETH
201960642024-06-29 8:10:596 hrs ago1719648659
0x6477875A...949678B88
0 ETH
201960512024-06-29 8:08:236 hrs ago1719648503
0x6477875A...949678B88
0 ETH
201960472024-06-29 8:07:356 hrs ago1719648455
0x6477875A...949678B88
0 ETH
201959212024-06-29 7:41:597 hrs ago1719646919
0x6477875A...949678B88
0 ETH
201951142024-06-29 4:59:599 hrs ago1719637199
0x6477875A...949678B88
0 ETH
201950992024-06-29 4:56:479 hrs ago1719637007
0x6477875A...949678B88
0 ETH
201950932024-06-29 4:55:359 hrs ago1719636935
0x6477875A...949678B88
0 ETH
201950842024-06-29 4:53:479 hrs ago1719636827
0x6477875A...949678B88
0 ETH
201950752024-06-29 4:51:599 hrs ago1719636719
0x6477875A...949678B88
0 ETH
201950702024-06-29 4:50:599 hrs ago1719636659
0x6477875A...949678B88
0 ETH
201950682024-06-29 4:50:359 hrs ago1719636635
0x6477875A...949678B88
0 ETH
201948932024-06-29 4:15:3510 hrs ago1719634535
0x6477875A...949678B88
0.00000009 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Harvest

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 10000 runs

Other Settings:
paris EvmVersion
File 1 of 7 : Harvest.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

//                            _.-^-._    .--.
//                         .-'   _   '-. |__|
//                        /     |_|     \|  |
//                       /               \  |
//                      /|     _____     |\ |
//                       |    |==|==|    |  |
//   |---|---|---|---|---|    |--|--|    |  |
//   |---|---|---|---|---|    |==|==|    |  |
//  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//  ____________  Harvest.art v3 _____________

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "solady/src/auth/Ownable.sol";
import "./IBidTicket.sol";

contract Harvest is Ownable {
    IBidTicket public bidTicket;
    address public theBarn;
    uint256 public defaultPrice = 1 gwei;
    uint256 public maxTokensPerTx = 100;
    uint256 public bidTicketTokenId = 1;

    mapping(address => uint256) private _contractPrices;

    error InvalidTokenContractLength();
    error InvalidParamsLength();
    error MaxTokensPerTxReached();
    error TransferFailed();

    event BatchTransfer(address indexed user, uint256 indexed totalTokens);

    constructor(address theBarn_, address bidTicket_) {
        _initializeOwner(msg.sender);
        theBarn = theBarn_;
        bidTicket = IBidTicket(bidTicket_);
    }

    function batchTransfer(address[] calldata tokenContracts, uint256[] calldata tokenIds, uint256[] calldata counts)
        external
    {
        uint256 length = tokenContracts.length;

        if (length == 0) {
            revert InvalidTokenContractLength();
        }

        if (length != tokenIds.length || length != counts.length) {
            revert InvalidParamsLength();
        }

        uint256 totalTokens;
        uint256 totalPrice;
        uint256 _defaultPrice = defaultPrice;

        for (uint256 i; i < length;) {
            address tokenContract = tokenContracts[i];
            uint256 tokenId = tokenIds[i];
            uint256 count = counts[i];

            if (count == 0) {
                unchecked {
                    ++totalTokens;
                }

                totalPrice += _getPrice(_defaultPrice, tokenContract);
                IERC721(tokenContract).transferFrom(msg.sender, theBarn, tokenId);
            } else {
                totalTokens += count;
                totalPrice += _getPrice(_defaultPrice, tokenContract) * count;
                IERC1155(tokenContract).safeTransferFrom(msg.sender, theBarn, tokenId, count, "");
            }

            unchecked {
                ++i;
            }
        }

        if (totalTokens > maxTokensPerTx) {
            revert MaxTokensPerTxReached();
        }

        bidTicket.mint(msg.sender, bidTicketTokenId, totalTokens);

        (bool sent,) = payable(msg.sender).call{value: totalPrice}("");
        if (!sent) revert TransferFailed();

        emit BatchTransfer(msg.sender, totalTokens);
    }

    function _getPrice(uint256 _defaultPrice, address contractAddress) internal view returns (uint256) {
        if (_contractPrices[contractAddress] > 0) {
            return _contractPrices[contractAddress];
        } else {
            return _defaultPrice;
        }
    }

    function setBarn(address _theBarn) public onlyOwner {
        theBarn = _theBarn;
    }

    function setDefaultPrice(uint256 _defaultPrice) public onlyOwner {
        defaultPrice = _defaultPrice;
    }

    function setMaxTokensPerTx(uint256 _maxTokensPerTx) public onlyOwner {
        maxTokensPerTx = _maxTokensPerTx;
    }

    function setPriceByContract(address contractAddress, uint256 price) public onlyOwner {
        _contractPrices[contractAddress] = price;
    }

    function setBidTicketAddress(address bidTicket_) external onlyOwner {
        bidTicket = IBidTicket(bidTicket_);
    }

    function setBidTicketTokenId(uint256 bidTicketTokenId_) external onlyOwner {
        bidTicketTokenId = bidTicketTokenId_;
    }

    function withdrawBalance() external onlyOwner {
        (bool success,) = payable(msg.sender).call{value: address(this).balance}("");
        if (!success) revert TransferFailed();
    }

    receive() external payable {}

    fallback() external payable {}
}

File 2 of 7 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (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`.
     *
     * 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;

    /**
     * @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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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 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 the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @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);
}

File 3 of 7 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(
        address[] calldata accounts,
        uint256[] calldata ids
    ) external view returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 4 of 7 : Ownable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/// @notice Simple single owner authorization mixin.
/// @author Solady (https://github.com/vectorized/solady/blob/main/src/auth/Ownable.sol)
///
/// @dev Note:
/// This implementation does NOT auto-initialize the owner to `msg.sender`.
/// You MUST call the `_initializeOwner` in the constructor / initializer.
///
/// While the ownable portion follows
/// [EIP-173](https://eips.ethereum.org/EIPS/eip-173) for compatibility,
/// the nomenclature for the 2-step ownership handover may be unique to this codebase.
abstract contract Ownable {
    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                       CUSTOM ERRORS                        */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev The caller is not authorized to call the function.
    error Unauthorized();

    /// @dev The `newOwner` cannot be the zero address.
    error NewOwnerIsZeroAddress();

    /// @dev The `pendingOwner` does not have a valid handover request.
    error NoHandoverRequest();

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                           EVENTS                           */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev The ownership is transferred from `oldOwner` to `newOwner`.
    /// This event is intentionally kept the same as OpenZeppelin's Ownable to be
    /// compatible with indexers and [EIP-173](https://eips.ethereum.org/EIPS/eip-173),
    /// despite it not being as lightweight as a single argument event.
    event OwnershipTransferred(address indexed oldOwner, address indexed newOwner);

    /// @dev An ownership handover to `pendingOwner` has been requested.
    event OwnershipHandoverRequested(address indexed pendingOwner);

    /// @dev The ownership handover to `pendingOwner` has been canceled.
    event OwnershipHandoverCanceled(address indexed pendingOwner);

    /// @dev `keccak256(bytes("OwnershipTransferred(address,address)"))`.
    uint256 private constant _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE =
        0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0;

    /// @dev `keccak256(bytes("OwnershipHandoverRequested(address)"))`.
    uint256 private constant _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE =
        0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d;

    /// @dev `keccak256(bytes("OwnershipHandoverCanceled(address)"))`.
    uint256 private constant _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE =
        0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92;

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                          STORAGE                           */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev The owner slot is given by: `not(_OWNER_SLOT_NOT)`.
    /// It is intentionally chosen to be a high value
    /// to avoid collision with lower slots.
    /// The choice of manual storage layout is to enable compatibility
    /// with both regular and upgradeable contracts.
    uint256 private constant _OWNER_SLOT_NOT = 0x8b78c6d8;

    /// The ownership handover slot of `newOwner` is given by:
    /// ```
    ///     mstore(0x00, or(shl(96, user), _HANDOVER_SLOT_SEED))
    ///     let handoverSlot := keccak256(0x00, 0x20)
    /// ```
    /// It stores the expiry timestamp of the two-step ownership handover.
    uint256 private constant _HANDOVER_SLOT_SEED = 0x389a75e1;

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                     INTERNAL FUNCTIONS                     */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Initializes the owner directly without authorization guard.
    /// This function must be called upon initialization,
    /// regardless of whether the contract is upgradeable or not.
    /// This is to enable generalization to both regular and upgradeable contracts,
    /// and to save gas in case the initial owner is not the caller.
    /// For performance reasons, this function will not check if there
    /// is an existing owner.
    function _initializeOwner(address newOwner) internal virtual {
        /// @solidity memory-safe-assembly
        assembly {
            // Clean the upper 96 bits.
            newOwner := shr(96, shl(96, newOwner))
            // Store the new value.
            sstore(not(_OWNER_SLOT_NOT), newOwner)
            // Emit the {OwnershipTransferred} event.
            log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner)
        }
    }

    /// @dev Sets the owner directly without authorization guard.
    function _setOwner(address newOwner) internal virtual {
        /// @solidity memory-safe-assembly
        assembly {
            let ownerSlot := not(_OWNER_SLOT_NOT)
            // Clean the upper 96 bits.
            newOwner := shr(96, shl(96, newOwner))
            // Emit the {OwnershipTransferred} event.
            log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner)
            // Store the new value.
            sstore(ownerSlot, newOwner)
        }
    }

    /// @dev Throws if the sender is not the owner.
    function _checkOwner() internal view virtual {
        /// @solidity memory-safe-assembly
        assembly {
            // If the caller is not the stored owner, revert.
            if iszero(eq(caller(), sload(not(_OWNER_SLOT_NOT)))) {
                mstore(0x00, 0x82b42900) // `Unauthorized()`.
                revert(0x1c, 0x04)
            }
        }
    }

    /// @dev Returns how long a two-step ownership handover is valid for in seconds.
    /// Override to return a different value if needed.
    /// Made internal to conserve bytecode. Wrap it in a public function if needed.
    function _ownershipHandoverValidFor() internal view virtual returns (uint64) {
        return 48 * 3600;
    }

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                  PUBLIC UPDATE FUNCTIONS                   */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Allows the owner to transfer the ownership to `newOwner`.
    function transferOwnership(address newOwner) public payable virtual onlyOwner {
        /// @solidity memory-safe-assembly
        assembly {
            if iszero(shl(96, newOwner)) {
                mstore(0x00, 0x7448fbae) // `NewOwnerIsZeroAddress()`.
                revert(0x1c, 0x04)
            }
        }
        _setOwner(newOwner);
    }

    /// @dev Allows the owner to renounce their ownership.
    function renounceOwnership() public payable virtual onlyOwner {
        _setOwner(address(0));
    }

    /// @dev Request a two-step ownership handover to the caller.
    /// The request will automatically expire in 48 hours (172800 seconds) by default.
    function requestOwnershipHandover() public payable virtual {
        unchecked {
            uint256 expires = block.timestamp + _ownershipHandoverValidFor();
            /// @solidity memory-safe-assembly
            assembly {
                // Compute and set the handover slot to `expires`.
                mstore(0x0c, _HANDOVER_SLOT_SEED)
                mstore(0x00, caller())
                sstore(keccak256(0x0c, 0x20), expires)
                // Emit the {OwnershipHandoverRequested} event.
                log2(0, 0, _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE, caller())
            }
        }
    }

    /// @dev Cancels the two-step ownership handover to the caller, if any.
    function cancelOwnershipHandover() public payable virtual {
        /// @solidity memory-safe-assembly
        assembly {
            // Compute and set the handover slot to 0.
            mstore(0x0c, _HANDOVER_SLOT_SEED)
            mstore(0x00, caller())
            sstore(keccak256(0x0c, 0x20), 0)
            // Emit the {OwnershipHandoverCanceled} event.
            log2(0, 0, _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE, caller())
        }
    }

    /// @dev Allows the owner to complete the two-step ownership handover to `pendingOwner`.
    /// Reverts if there is no existing ownership handover requested by `pendingOwner`.
    function completeOwnershipHandover(address pendingOwner) public payable virtual onlyOwner {
        /// @solidity memory-safe-assembly
        assembly {
            // Compute and set the handover slot to 0.
            mstore(0x0c, _HANDOVER_SLOT_SEED)
            mstore(0x00, pendingOwner)
            let handoverSlot := keccak256(0x0c, 0x20)
            // If the handover does not exist, or has expired.
            if gt(timestamp(), sload(handoverSlot)) {
                mstore(0x00, 0x6f5e8818) // `NoHandoverRequest()`.
                revert(0x1c, 0x04)
            }
            // Set the handover slot to 0.
            sstore(handoverSlot, 0)
        }
        _setOwner(pendingOwner);
    }

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                   PUBLIC READ FUNCTIONS                    */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Returns the owner of the contract.
    function owner() public view virtual returns (address result) {
        /// @solidity memory-safe-assembly
        assembly {
            result := sload(not(_OWNER_SLOT_NOT))
        }
    }

    /// @dev Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`.
    function ownershipHandoverExpiresAt(address pendingOwner)
        public
        view
        virtual
        returns (uint256 result)
    {
        /// @solidity memory-safe-assembly
        assembly {
            // Compute the handover slot.
            mstore(0x0c, _HANDOVER_SLOT_SEED)
            mstore(0x00, pendingOwner)
            // Load the handover slot.
            result := sload(keccak256(0x0c, 0x20))
        }
    }

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                         MODIFIERS                          */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Marks a function as only callable by the owner.
    modifier onlyOwner() virtual {
        _checkOwner();
        _;
    }
}

File 5 of 7 : IBidTicket.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "ERC1155P/contracts/IERC1155P.sol";

interface IBidTicket is IERC1155P {
    function setURI(uint256 tokenId, string calldata tokenURI) external;

    function mint(address to, uint256 id, uint256 amount) external;
    function mintBatch(address to, uint256[] calldata ids, uint256[] calldata amounts) external;

    function burn(address from, uint256 id, uint256 amount) external;
    function burnBatch(address from, uint256[] calldata ids, uint256[] calldata amounts) external;

    function setHarvestContract(address harvestContract_) external;
    function setAuctionsContract(address auctionsContract_) external;
}

File 6 of 7 : IERC165.sol
// 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);
}

File 7 of 7 : IERC1155P.sol
// SPDX-License-Identifier: MIT
// ERC721P Contracts v1.1

pragma solidity ^0.8.20;

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155P {

    /**
     * Cannot query the balance for the zero address.
     */
    error BalanceQueryForZeroAddress();

    /**
     * Arrays cannot be different lengths.
     */
    error ArrayLengthMismatch();

    /**
     * Cannot burn from the zero address.
     */
    error BurnFromZeroAddress();

    /**
     * Cannot mint to the zero address.
     */
    error MintToZeroAddress();

    /**
     * The quantity of tokens minted must be more than zero.
     */
    error MintZeroQuantity();

    /**
     * The quantity of tokens being burned is greater than account balance.
     */
    error BurnExceedsBalance();

    /**
     * The quantity of tokens being transferred is greater than account balance.
     */
    error TransferExceedsBalance();

    /**
     * The resulting token balance exceeds the maximum storable by ERC1155P
     */
    error ExceedsMaximumBalance();

    /**
     * The caller must own the token or be an approved operator.
     */
    error TransferCallerNotOwnerNorApproved();

    /**
     * Cannot safely transfer to a contract that does not implement the
     * ERC1155Receiver interface.
     */
    error TransferToNonERC1155ReceiverImplementer();

    /**
     * Cannot transfer to the zero address.
     */
    error TransferToZeroAddress();

    /**
     * Exceeds max token ID
     */
    error ExceedsMaximumTokenId();
    
    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);

    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(
        address[] calldata accounts,
        uint256[] calldata ids
    ) external view returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "@openzeppelin/=lib/openzeppelin-contracts/",
    "ERC1155P/=lib/ERC1155P/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts/contracts/",
    "solady/=lib/solady/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 10000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"theBarn_","type":"address"},{"internalType":"address","name":"bidTicket_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidParamsLength","type":"error"},{"inputs":[],"name":"InvalidTokenContractLength","type":"error"},{"inputs":[],"name":"MaxTokensPerTxReached","type":"error"},{"inputs":[],"name":"NewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"NoHandoverRequest","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"totalTokens","type":"uint256"}],"name":"BatchTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address[]","name":"tokenContracts","type":"address[]"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"counts","type":"uint256[]"}],"name":"batchTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bidTicket","outputs":[{"internalType":"contract IBidTicket","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bidTicketTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cancelOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"completeOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"defaultPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokensPerTx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"result","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"ownershipHandoverExpiresAt","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"requestOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_theBarn","type":"address"}],"name":"setBarn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bidTicket_","type":"address"}],"name":"setBidTicketAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"bidTicketTokenId_","type":"uint256"}],"name":"setBidTicketTokenId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_defaultPrice","type":"uint256"}],"name":"setDefaultPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxTokensPerTx","type":"uint256"}],"name":"setMaxTokensPerTx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceByContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"theBarn","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdrawBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080346100ce57601f610d8838819003918201601f19168301916001600160401b038311848410176100d35780849260409485528339810103126100ce57610052602061004b836100e9565b92016100e9565b633b9aca006002556064600355600160045533638b78c6d819553360007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a3600180546001600160a01b039384166001600160a01b03199182161790915560008054929093169116179055604051610c8a90816100fe8239f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036100ce5756fe608080604052600436101561001a575b50361561001857005b005b60003560e01c9081630b45c68b14610a66575080631ef690c41461062657806325692962146105da5780633b342a8514610575578063481eb12b1461055457806354d1f13d1461050c5780635e307a48146104ee5780635fd8c710146104925780636d3c7ec514610471578063715018a6146104105780638da5cb5b146103bd57806395723b991461039f578063b18786f11461036b578063b9bed05e1461034a578063c9f01d83146102fd578063e5f96b7414610298578063e69e04b31461027a578063f04e283e146101d0578063f2fde38b1461013b5763fee81cf414610103573861000f565b346101365760206003193601126101365761011c610ac8565b63389a75e1600c52600052602080600c2054604051908152f35b600080fd5b60206003193601126101365761014f610ac8565b610157610aeb565b8060601b156101c25773ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355005b637448fbae6000526004601cfd5b6020600319360112610136576101e4610ac8565b6101ec610aeb565b63389a75e1600c52806000526020600c20908154421161026c57600073ffffffffffffffffffffffffffffffffffffffff9255167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355005b636f5e88186000526004601cfd5b34610136576000600319360112610136576020600254604051908152f35b346101365760206003193601126101365773ffffffffffffffffffffffffffffffffffffffff6102c6610ac8565b6102ce610aeb565b167fffffffffffffffffffffffff00000000000000000000000000000000000000006000541617600055600080f35b346101365760406003193601126101365773ffffffffffffffffffffffffffffffffffffffff61032b610ac8565b610333610aeb565b166000526005602052602435604060002055600080f35b3461013657602060031936011261013657610363610aeb565b600435600355005b3461013657600060031936011261013657602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b34610136576000600319360112610136576020600454604051908152f35b346101365760006003193601126101365760207fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275473ffffffffffffffffffffffffffffffffffffffff60405191168152f35b600060031936011261013657610424610aeb565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a355005b346101365760206003193601126101365761048a610aeb565b600435600255005b34610136576000600319360112610136576104ab610aeb565b600080808047335af16104bc610bb2565b50156104c457005b60046040517f90b8ec18000000000000000000000000000000000000000000000000000000008152fd5b34610136576000600319360112610136576020600354604051908152f35b60006003193601126101365763389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2005b346101365760206003193601126101365761056d610aeb565b600480359055005b346101365760206003193601126101365773ffffffffffffffffffffffffffffffffffffffff6105a3610ac8565b6105ab610aeb565b167fffffffffffffffffffffffff00000000000000000000000000000000000000006001541617600155600080f35b60006003193601126101365763389a75e1600c52336000526202a30042016020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a2005b346101365760606003193601126101365767ffffffffffffffff60043581811161013657610658903690600401610a97565b60249291923582811161013657610673903690600401610a97565b9390926044359081116101365761068e903690600401610a97565b928015610a3c57858114801590610a32575b610a08576000959495946000966002549260005b8181106107c357888a60035482116107995773ffffffffffffffffffffffffffffffffffffffff6000541690600454823b15610136576000926064849260405195869384927f156e29f600000000000000000000000000000000000000000000000000000000845233600485015260248401528860448401525af191821561078d5760008080938193879661077e575b50335af1610750610bb2565b50156104c457337f6f8b319642e67cd1f14d773b5289e2e9bc1afce60945a4705b94c4c2ce0d347e600080a3005b61078790610b6f565b86610744565b6040513d6000823e3d90fd5b60046040517fbb8eb9c4000000000000000000000000000000000000000000000000000000008152fd5b6107ce818389610b23565b359073ffffffffffffffffffffffffffffffffffffffff82168203610136576107f8818686610b23565b3599610805828b8a610b23565b35806108de5750600161082491019b61081e8489610c1b565b90610b62565b9973ffffffffffffffffffffffffffffffffffffffff600154169073ffffffffffffffffffffffffffffffffffffffff84163b156101365760646000928373ffffffffffffffffffffffffffffffffffffffff60405197889586947f23b872dd00000000000000000000000000000000000000000000000000000000865233600487015260248601526044850152165af191821561078d576001926108cf575b505b019897986106b4565b6108d890610b6f565b8b6108c4565b9290836108ea91610b62565b9b6108f58289610c1b565b9081858102048514821517156109d95784610911920290610b62565b9a73ffffffffffffffffffffffffffffffffffffffff600154169173ffffffffffffffffffffffffffffffffffffffff81163b15610136576000928373ffffffffffffffffffffffffffffffffffffffff60c49360405198899687957ff242432a00000000000000000000000000000000000000000000000000000000875233600488015260248701526044860152606485015260a060848501528260a4850152165af191821561078d576001926109ca575b506108c6565b6109d390610b6f565b8b6109c4565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60046040517ff950c6c4000000000000000000000000000000000000000000000000000000008152fd5b50838114156106a0565b60046040517f34e0ed6b000000000000000000000000000000000000000000000000000000008152fd5b346101365760006003193601126101365760209073ffffffffffffffffffffffffffffffffffffffff600054168152f35b9181601f840112156101365782359167ffffffffffffffff8311610136576020808501948460051b01011161013657565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361013657565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543303610b1557565b6382b429006000526004601cfd5b9190811015610b335760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b919082018092116109d957565b67ffffffffffffffff8111610b8357604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b3d15610c165767ffffffffffffffff903d828111610b8357604051927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f81601f850116011684019084821090821117610b835760405282523d6000602084013e565b606090565b9073ffffffffffffffffffffffffffffffffffffffff16600052600560205260406000205490811515600014610c4f575090565b90509056fea264697066735822122002c63a8bab4744d68f2a8c614dcb1aa02f102a9fd6e23f3c6c534243e4feb12f64736f6c63430008140033000000000000000000000000996e1d4ce3e1e558889832832004b2466153adbe00000000000000000000000062613aa9594d0116b5ca23acd37dddac90c67e5c

Deployed Bytecode

0x608080604052600436101561001a575b50361561001857005b005b60003560e01c9081630b45c68b14610a66575080631ef690c41461062657806325692962146105da5780633b342a8514610575578063481eb12b1461055457806354d1f13d1461050c5780635e307a48146104ee5780635fd8c710146104925780636d3c7ec514610471578063715018a6146104105780638da5cb5b146103bd57806395723b991461039f578063b18786f11461036b578063b9bed05e1461034a578063c9f01d83146102fd578063e5f96b7414610298578063e69e04b31461027a578063f04e283e146101d0578063f2fde38b1461013b5763fee81cf414610103573861000f565b346101365760206003193601126101365761011c610ac8565b63389a75e1600c52600052602080600c2054604051908152f35b600080fd5b60206003193601126101365761014f610ac8565b610157610aeb565b8060601b156101c25773ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355005b637448fbae6000526004601cfd5b6020600319360112610136576101e4610ac8565b6101ec610aeb565b63389a75e1600c52806000526020600c20908154421161026c57600073ffffffffffffffffffffffffffffffffffffffff9255167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355005b636f5e88186000526004601cfd5b34610136576000600319360112610136576020600254604051908152f35b346101365760206003193601126101365773ffffffffffffffffffffffffffffffffffffffff6102c6610ac8565b6102ce610aeb565b167fffffffffffffffffffffffff00000000000000000000000000000000000000006000541617600055600080f35b346101365760406003193601126101365773ffffffffffffffffffffffffffffffffffffffff61032b610ac8565b610333610aeb565b166000526005602052602435604060002055600080f35b3461013657602060031936011261013657610363610aeb565b600435600355005b3461013657600060031936011261013657602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b34610136576000600319360112610136576020600454604051908152f35b346101365760006003193601126101365760207fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275473ffffffffffffffffffffffffffffffffffffffff60405191168152f35b600060031936011261013657610424610aeb565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a355005b346101365760206003193601126101365761048a610aeb565b600435600255005b34610136576000600319360112610136576104ab610aeb565b600080808047335af16104bc610bb2565b50156104c457005b60046040517f90b8ec18000000000000000000000000000000000000000000000000000000008152fd5b34610136576000600319360112610136576020600354604051908152f35b60006003193601126101365763389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2005b346101365760206003193601126101365761056d610aeb565b600480359055005b346101365760206003193601126101365773ffffffffffffffffffffffffffffffffffffffff6105a3610ac8565b6105ab610aeb565b167fffffffffffffffffffffffff00000000000000000000000000000000000000006001541617600155600080f35b60006003193601126101365763389a75e1600c52336000526202a30042016020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a2005b346101365760606003193601126101365767ffffffffffffffff60043581811161013657610658903690600401610a97565b60249291923582811161013657610673903690600401610a97565b9390926044359081116101365761068e903690600401610a97565b928015610a3c57858114801590610a32575b610a08576000959495946000966002549260005b8181106107c357888a60035482116107995773ffffffffffffffffffffffffffffffffffffffff6000541690600454823b15610136576000926064849260405195869384927f156e29f600000000000000000000000000000000000000000000000000000000845233600485015260248401528860448401525af191821561078d5760008080938193879661077e575b50335af1610750610bb2565b50156104c457337f6f8b319642e67cd1f14d773b5289e2e9bc1afce60945a4705b94c4c2ce0d347e600080a3005b61078790610b6f565b86610744565b6040513d6000823e3d90fd5b60046040517fbb8eb9c4000000000000000000000000000000000000000000000000000000008152fd5b6107ce818389610b23565b359073ffffffffffffffffffffffffffffffffffffffff82168203610136576107f8818686610b23565b3599610805828b8a610b23565b35806108de5750600161082491019b61081e8489610c1b565b90610b62565b9973ffffffffffffffffffffffffffffffffffffffff600154169073ffffffffffffffffffffffffffffffffffffffff84163b156101365760646000928373ffffffffffffffffffffffffffffffffffffffff60405197889586947f23b872dd00000000000000000000000000000000000000000000000000000000865233600487015260248601526044850152165af191821561078d576001926108cf575b505b019897986106b4565b6108d890610b6f565b8b6108c4565b9290836108ea91610b62565b9b6108f58289610c1b565b9081858102048514821517156109d95784610911920290610b62565b9a73ffffffffffffffffffffffffffffffffffffffff600154169173ffffffffffffffffffffffffffffffffffffffff81163b15610136576000928373ffffffffffffffffffffffffffffffffffffffff60c49360405198899687957ff242432a00000000000000000000000000000000000000000000000000000000875233600488015260248701526044860152606485015260a060848501528260a4850152165af191821561078d576001926109ca575b506108c6565b6109d390610b6f565b8b6109c4565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60046040517ff950c6c4000000000000000000000000000000000000000000000000000000008152fd5b50838114156106a0565b60046040517f34e0ed6b000000000000000000000000000000000000000000000000000000008152fd5b346101365760006003193601126101365760209073ffffffffffffffffffffffffffffffffffffffff600054168152f35b9181601f840112156101365782359167ffffffffffffffff8311610136576020808501948460051b01011161013657565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361013657565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543303610b1557565b6382b429006000526004601cfd5b9190811015610b335760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b919082018092116109d957565b67ffffffffffffffff8111610b8357604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b3d15610c165767ffffffffffffffff903d828111610b8357604051927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f81601f850116011684019084821090821117610b835760405282523d6000602084013e565b606090565b9073ffffffffffffffffffffffffffffffffffffffff16600052600560205260406000205490811515600014610c4f575090565b90509056fea264697066735822122002c63a8bab4744d68f2a8c614dcb1aa02f102a9fd6e23f3c6c534243e4feb12f64736f6c63430008140033

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

000000000000000000000000996e1d4ce3e1e558889832832004b2466153adbe00000000000000000000000062613aa9594d0116b5ca23acd37dddac90c67e5c

-----Decoded View---------------
Arg [0] : theBarn_ (address): 0x996e1d4ce3e1e558889832832004B2466153adbe
Arg [1] : bidTicket_ (address): 0x62613AA9594D0116b5CA23aCd37dDDAc90c67E5c

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000996e1d4ce3e1e558889832832004b2466153adbe
Arg [1] : 00000000000000000000000062613aa9594d0116b5ca23acd37dddac90c67e5c


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  ]
[ 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.