GLMR Price: $0.018808 (-0.95%)

Contract

0x87107a68a19c826eDe898aF5aF91F3f5A513BD51

Overview

GLMR Balance

Moonbeam Chain LogoMoonbeam Chain LogoMoonbeam Chain Logo0 GLMR

GLMR Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Finalize Auction...11290672022-05-29 17:53:261342 days ago1653846806IN
0x87107a68...5A513BD51
0 GLMR0.01280215101
Place Bid11287372022-05-29 16:45:001342 days ago1653842700IN
0x87107a68...5A513BD51
10,500 GLMR0.0310288200
Place Bid11274372022-05-29 12:08:541342 days ago1653826134IN
0x87107a68...5A513BD51
10,008 GLMR0.0310288200
Place Bid11231132022-05-28 21:02:181342 days ago1653771738IN
0x87107a68...5A513BD51
10,000 GLMR0.0310288200
Flip Admin11221882022-05-28 17:48:061343 days ago1653760086IN
0x87107a68...5A513BD51
0 GLMR0.00470872102
Place Bid10631172022-05-20 4:03:181351 days ago1653019398IN
0x87107a68...5A513BD51
9,888 GLMR0.0310288200
Place Bid10629872022-05-20 3:36:201351 days ago1653017780IN
0x87107a68...5A513BD51
9,801 GLMR0.0310288200
Place Bid10429752022-05-17 6:12:061354 days ago1652767926IN
0x87107a68...5A513BD51
9,100 GLMR0.031027200
Place Bid10416432022-05-17 1:34:361354 days ago1652751276IN
0x87107a68...5A513BD51
9,009 GLMR0.031027200
Place Bid10399922022-05-16 19:53:421355 days ago1652730822IN
0x87107a68...5A513BD51
8,999 GLMR0.031027200
Place Bid10372862022-05-16 10:32:421355 days ago1652697162IN
0x87107a68...5A513BD51
9,669 GLMR0.0310288200
Place Bid10245022022-05-14 14:25:181357 days ago1652538318IN
0x87107a68...5A513BD51
9,003 GLMR0.0310288200
Place Bid10234192022-05-14 10:40:241357 days ago1652524824IN
0x87107a68...5A513BD51
8,888 GLMR0.0310288200
Place Bid10224022022-05-14 7:05:181357 days ago1652511918IN
0x87107a68...5A513BD51
8,450 GLMR0.0310288200
Place Bid10201372022-05-13 23:16:241357 days ago1652483784IN
0x87107a68...5A513BD51
8,888 GLMR0.031027200
Place Bid10170532022-05-13 12:33:481358 days ago1652445228IN
0x87107a68...5A513BD51
7,898 GLMR0.031027200
Place Bid10137702022-05-13 1:14:361358 days ago1652404476IN
0x87107a68...5A513BD51
8,080 GLMR0.0310288200
Place Bid10094712022-05-12 10:10:541359 days ago1652350254IN
0x87107a68...5A513BD51
7,900 GLMR0.0310288200
Flip Admin10047712022-05-11 17:39:541360 days ago1652290794IN
0x87107a68...5A513BD51
0 GLMR0.00470872102
Flip Admin10042862022-05-11 15:55:481360 days ago1652284548IN
0x87107a68...5A513BD51
0 GLMR0.00470872102
Place Bid10041072022-05-11 15:17:491360 days ago1652282269IN
0x87107a68...5A513BD51
7,888 GLMR0.0310288200
Place Bid10040912022-05-11 15:14:181360 days ago1652282058IN
0x87107a68...5A513BD51
7,888 GLMR0.031027200
Flip Admin10032632022-05-11 12:13:061360 days ago1652271186IN
0x87107a68...5A513BD51
0 GLMR0.00470872102
Place Bid9995562022-05-10 22:57:181360 days ago1652223438IN
0x87107a68...5A513BD51
7,500 GLMR0.0310288200
Place Bid9962812022-05-10 11:14:481361 days ago1652181288IN
0x87107a68...5A513BD51
7,000 GLMR0.0310288200
View all transactions

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
10631172022-05-20 4:03:181351 days ago1653019398
0x87107a68...5A513BD51
9,801 GLMR
10629872022-05-20 3:36:201351 days ago1653017780
0x87107a68...5A513BD51
9,669 GLMR
10429752022-05-17 6:12:061354 days ago1652767926
0x87107a68...5A513BD51
9,009 GLMR
10416432022-05-17 1:34:361354 days ago1652751276
0x87107a68...5A513BD51
8,999 GLMR
10399922022-05-16 19:53:421355 days ago1652730822
0x87107a68...5A513BD51
8,888 GLMR
10372862022-05-16 10:32:421355 days ago1652697162
0x87107a68...5A513BD51
9,003 GLMR
10245022022-05-14 14:25:181357 days ago1652538318
0x87107a68...5A513BD51
8,888 GLMR
10234192022-05-14 10:40:241357 days ago1652524824
0x87107a68...5A513BD51
8,450 GLMR
10224022022-05-14 7:05:181357 days ago1652511918
0x87107a68...5A513BD51
8,080 GLMR
10201372022-05-13 23:16:241357 days ago1652483784
0x87107a68...5A513BD51
7,898 GLMR
10170532022-05-13 12:33:481358 days ago1652445228
0x87107a68...5A513BD51
7,888 GLMR
10137702022-05-13 1:14:361358 days ago1652404476
0x87107a68...5A513BD51
7,900 GLMR
10094712022-05-12 10:10:541359 days ago1652350254
0x87107a68...5A513BD51
7,888 GLMR
10065942022-05-12 0:03:301359 days ago1652313810
0x87107a68...5A513BD51
7,000 GLMR
10041072022-05-11 15:17:491360 days ago1652282269
0x87107a68...5A513BD51
7,500 GLMR
10040912022-05-11 15:14:181360 days ago1652282058
0x87107a68...5A513BD51
7,000 GLMR
9995562022-05-10 22:57:181360 days ago1652223438
0x87107a68...5A513BD51
7,000 GLMR
9962812022-05-10 11:14:481361 days ago1652181288
0x87107a68...5A513BD51
6,000 GLMR
9962762022-05-10 11:13:491361 days ago1652181229
0x87107a68...5A513BD51
6,000 GLMR
9962722022-05-10 11:13:001361 days ago1652181180
0x87107a68...5A513BD51
6,000 GLMR
9941002022-05-10 3:25:481361 days ago1652153148
0x87107a68...5A513BD51
3,700 GLMR
9940992022-05-10 3:25:361361 days ago1652153136
0x87107a68...5A513BD51
4,500 GLMR
9940982022-05-10 3:25:241361 days ago1652153124
0x87107a68...5A513BD51
5,500 GLMR
9940602022-05-10 3:17:061361 days ago1652152626
0x87107a68...5A513BD51
3,200 GLMR
9940552022-05-10 3:16:061361 days ago1652152566
0x87107a68...5A513BD51
3,800 GLMR
View All Internal Transactions
Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PrivateAuction

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
//Custom NFT Marketplace Contract. From your favorite beans around - MoonBeans!

pragma solidity ^0.8.4;
// SPDX-License-Identifier: MIT

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

contract PrivateAuction is IERC721Receiver, ReentrancyGuard, Ownable {

  event BidPlaced(uint256 indexed id, uint256 indexed price, address indexed bidder, uint256 timestamp);
  event BidAccepted(uint256 indexed id, uint256 indexed price, address indexed bidder, uint256 timestamp);
  event BidReturned(uint256 indexed id, uint256 indexed price, address indexed bidder, uint256 timestamp);
  
  struct Offer {
    uint256 price;
    uint256 timestamp;
    bool fundsEscrowed;
    bool accepted;
    address bidder;
  }

  bool public allAuctionsPaused = true;
  mapping(uint256 => bool) public itemAuctionPaused;
  mapping(uint256 => bool) public itemAuctionCompleted;
  mapping(uint256 => Offer[]) public offers;
  mapping(address => bool) public administrators;
  mapping(address => uint256) public escrowed; 
  IERC721 public NFT;

  uint256 private startingBid = 1000 ether;
  uint256 private maxBids = 10;
  address private deadAddress = 0x000000000000000000000000000000000000dEaD;

  modifier onlyAdmins {
    require(administrators[_msgSender()] || owner() == _msgSender(), "Not owner or admin.");
    _;
  }

  // Required in order to receive ERC 721's.
  function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) {
    return this.onERC721Received.selector;
  }

  // Required in order to receive MOVR/ETH.
  receive() external payable { }

  function getAuctionDetails(uint256 itemId) external view returns (Offer[] memory) {
    return offers[itemId];
  }

  function highestBid(uint256 itemId) public view returns (Offer memory) {
    if (offers[itemId].length == 0) {
      return Offer(startingBid, 0, false, false, deadAddress);
    }
    return offers[itemId][offers[itemId].length - 1];
  }

  function secondHighestBid(uint256 itemId) internal view returns (Offer memory) {
    return offers[itemId][offers[itemId].length - 2];
  }

  function highestBidAmount(uint256 itemId) public view returns (uint256) {
    return highestBid(itemId).price;
  }
  
  function placeBid(uint256 itemId) public payable nonReentrant{
    require(!allAuctionsPaused, "Auctions Disabled.");
    require(!itemAuctionPaused[itemId], "Auction Paused.");
    require(!itemAuctionCompleted[itemId], "Auction completed");
    require(msg.value > highestBidAmount(itemId), "Bid too low.");

    // add new offer to array
    offers[itemId].push(Offer(msg.value, block.timestamp, true, false, msg.sender));
    emit BidPlaced(itemId, msg.value, msg.sender, block.timestamp);
     
    // we don't want to hold onto too many bids
    if (offers[itemId].length >= maxBids) {
      for (uint i = 0; i < offers[itemId].length - 1;) {
        offers[itemId][i] = offers[itemId][i + 1];
        unchecked {++i;}
      }
      offers[itemId].pop();
    }

    // if there's at least 2 bids now, refund the second highest bid.
    if (offers[itemId].length > 1) {
      Offer memory secondHighestOffer = secondHighestBid(itemId);
      emit BidReturned(itemId, secondHighestOffer.price, secondHighestOffer.bidder, secondHighestOffer.timestamp);
      (bool success, ) = payable(secondHighestOffer.bidder).call{value: secondHighestOffer.price}("");
      require(success, "Escrow return failed.");
    }
  }

  //ADMINS
  function flipAdmin(address user) external onlyOwner {
    administrators[user] = !administrators[user];
  }

  function flipAllBidding() external onlyAdmins {
    allAuctionsPaused = !allAuctionsPaused;
  }

  function setMaxBids(uint256 newMax) external onlyAdmins {
    maxBids = newMax;
  }

  function flipAuction(uint256 itemId) external onlyAdmins {
    require(!itemAuctionCompleted[itemId], "Auction completed.");
    itemAuctionPaused[itemId] = !itemAuctionPaused[itemId];
  }

  function setStartingBid(uint256 _startingBid) external onlyAdmins {
    startingBid = _startingBid;
  }

  function setNFTContract(address ca) external onlyAdmins {
    NFT = IERC721(ca);
  }

  function withdrawAmount(uint256 amount) internal {
    payable(owner()).transfer(amount);
  }

  function end(uint256 itemId) external onlyAdmins {
    require(itemAuctionCompleted[itemId] == false, "Auction already completed.");
    require(offers[itemId].length >= 1, "No bids made.");

    // Get highest bid and emit event
    itemAuctionPaused[itemId] = true;
    itemAuctionCompleted[itemId] = true;
    Offer memory acceptedOffer = highestBid(itemId);
    emit BidAccepted(itemId, acceptedOffer.price, acceptedOffer.bidder, acceptedOffer.timestamp);

    // Mark as accepted and send funds to owner
    acceptedOffer.accepted = true;
    uint256 acceptedOfferIndex = offers[itemId].length - 1;
    offers[itemId][acceptedOfferIndex] = acceptedOffer;
  }

  function finalizeAuctionAndSendOut(uint256 itemId) external onlyAdmins {
    require(itemAuctionCompleted[itemId] == false, "Auction already completed.");
    require(offers[itemId].length >= 1, "No bids made.");

    // Get highest bid and emit event
    itemAuctionPaused[itemId] = true;
    itemAuctionCompleted[itemId] = true;
    Offer memory acceptedOffer = highestBid(itemId);
    emit BidAccepted(itemId, acceptedOffer.price, acceptedOffer.bidder, acceptedOffer.timestamp);

    // Mark as accepted and send funds to owner
    acceptedOffer.accepted = true;
    uint256 acceptedOfferIndex = offers[itemId].length - 1;
    offers[itemId][acceptedOfferIndex] = acceptedOffer;
    withdrawAmount(acceptedOffer.price);

    // Transfer winner NFT to winner
    NFT.transferFrom(address(this), acceptedOffer.bidder, itemId);
  }


  //EMERGENCY ONLY
  function withdrawAll() external onlyAdmins {
    payable(owner()).transfer(address(this).balance);
  }

  function withdrawTokens(address token) external onlyAdmins {
    IERC20(token).transfer(owner(), IERC20(token).balanceOf(address(this)));
  }

  function withdrawNFT(address _token, uint256 tokenId) external onlyOwner {
    IERC721(_token).transferFrom(address(this), owner(), tokenId);
  }

}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

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() {
        _transferOwnership(_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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        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);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 6 of 8 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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

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

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

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":true,"internalType":"address","name":"bidder","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"BidAccepted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":true,"internalType":"address","name":"bidder","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"BidPlaced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":true,"internalType":"address","name":"bidder","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"BidReturned","type":"event"},{"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":"NFT","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"administrators","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allAuctionsPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"itemId","type":"uint256"}],"name":"end","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"escrowed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"itemId","type":"uint256"}],"name":"finalizeAuctionAndSendOut","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"flipAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipAllBidding","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"itemId","type":"uint256"}],"name":"flipAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"itemId","type":"uint256"}],"name":"getAuctionDetails","outputs":[{"components":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"bool","name":"fundsEscrowed","type":"bool"},{"internalType":"bool","name":"accepted","type":"bool"},{"internalType":"address","name":"bidder","type":"address"}],"internalType":"struct PrivateAuction.Offer[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"itemId","type":"uint256"}],"name":"highestBid","outputs":[{"components":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"bool","name":"fundsEscrowed","type":"bool"},{"internalType":"bool","name":"accepted","type":"bool"},{"internalType":"address","name":"bidder","type":"address"}],"internalType":"struct PrivateAuction.Offer","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"itemId","type":"uint256"}],"name":"highestBidAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"itemAuctionCompleted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"itemAuctionPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"offers","outputs":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"bool","name":"fundsEscrowed","type":"bool"},{"internalType":"bool","name":"accepted","type":"bool"},{"internalType":"address","name":"bidder","type":"address"}],"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":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"itemId","type":"uint256"}],"name":"placeBid","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMax","type":"uint256"}],"name":"setMaxBids","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"ca","type":"address"}],"name":"setNFTContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startingBid","type":"uint256"}],"name":"setStartingBid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"withdrawNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040526001805460ff60a01b1916600160a01b179055683635c9adc5dea00000600855600a600981905580546001600160a01b03191661dead17905534801561004957600080fd5b5060016000556100583361005d565b6100af565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611bfb806100be6000396000f3fe6080604052600436106101855760003560e01c806395a7ca81116100d1578063d01242f91161008a578063f20e5e3511610064578063f20e5e3514610503578063f2b1f30a14610530578063f2fde38b14610551578063f669db831461057157600080fd5b8063d01242f914610488578063d4f8a1a2146104c3578063e8cd4a45146104e357600080fd5b806395a7ca81146103a85780639979ef45146103d8578063a6b11c12146103eb578063a7ccabdf1461040b578063b14c63c51461042b578063c9c306c91461045857600080fd5b80634d03a9a51161013e57806376be15851161011857806376be1585146102fd5780637c0b8de21461033d578063853828b6146103755780638da5cb5b1461038a57600080fd5b80634d03a9a5146102715780636088e93a146102c8578063715018a6146102e857600080fd5b80630556e9b9146101915780630ad24528146101b3578063150b7a02146101d35780631bfe42941461021c5780631d1920411461023c57806349df728c1461025157600080fd5b3661018c57005b600080fd5b34801561019d57600080fd5b506101b16101ac366004611886565b610591565b005b3480156101bf57600080fd5b506101b16101ce366004611886565b6105e3565b3480156101df57600080fd5b506101fe6101ee3660046118d1565b630a85bd0160e11b949350505050565b6040516001600160e01b031990911681526020015b60405180910390f35b34801561022857600080fd5b506101b1610237366004611886565b610825565b34801561024857600080fd5b506101b161086e565b34801561025d57600080fd5b506101b161026c3660046119ad565b6108d3565b34801561027d57600080fd5b5061029161028c3660046119cf565b610a31565b6040805195865260208601949094529115159284019290925290151560608301526001600160a01b0316608082015260a001610213565b3480156102d457600080fd5b506101b16102e33660046119f1565b610a91565b3480156102f457600080fd5b506101b1610b48565b34801561030957600080fd5b5061032d6103183660046119ad565b60056020526000908152604090205460ff1681565b6040519015158152602001610213565b34801561034957600080fd5b5060075461035d906001600160a01b031681565b6040516001600160a01b039091168152602001610213565b34801561038157600080fd5b506101b1610b7e565b34801561039657600080fd5b506001546001600160a01b031661035d565b3480156103b457600080fd5b5061032d6103c3366004611886565b60026020526000908152604090205460ff1681565b6101b16103e6366004611886565b610bfe565b3480156103f757600080fd5b506101b1610406366004611886565b611112565b34801561041757600080fd5b506101b16104263660046119ad565b6113cf565b34801561043757600080fd5b5061044b610446366004611886565b611435565b6040516102139190611a55565b34801561046457600080fd5b5061032d610473366004611886565b60036020526000908152604090205460ff1681565b34801561049457600080fd5b506104b56104a33660046119ad565b60066020526000908152604090205481565b604051908152602001610213565b3480156104cf57600080fd5b506101b16104de3660046119ad565b611547565b3480156104ef57600080fd5b506101b16104fe366004611886565b61159a565b34801561050f57600080fd5b5061052361051e366004611886565b611652565b6040516102139190611a69565b34801561053c57600080fd5b5060015461032d90600160a01b900460ff1681565b34801561055d57600080fd5b506101b161056c3660046119ad565b611709565b34801561057d57600080fd5b506104b561058c366004611886565b6117a1565b3360009081526005602052604090205460ff16806105b957506001546001600160a01b031633145b6105de5760405162461bcd60e51b81526004016105d590611ab7565b60405180910390fd5b600855565b3360009081526005602052604090205460ff168061060b57506001546001600160a01b031633145b6106275760405162461bcd60e51b81526004016105d590611ab7565b60008181526003602052604090205460ff16156106865760405162461bcd60e51b815260206004820152601a60248201527f41756374696f6e20616c726561647920636f6d706c657465642e00000000000060448201526064016105d5565b600081815260046020526040902054600111156106d55760405162461bcd60e51b815260206004820152600d60248201526c2737903134b2399036b0b2329760991b60448201526064016105d5565b60008181526002602090815260408083208054600160ff1991821681179092556003909352908320805490921617905561070e82611435565b905080608001516001600160a01b03168160000151837ffc3d557e46010cdf2a5a80a495f308239f5be888eb5bb151be68d5c369728b24846020015160405161075991815260200190565b60405180910390a4600160608201819052600083815260046020526040812054909161078491611afa565b600084815260046020526040902080549192508391839081106107a9576107a9611b11565b6000918252602091829020835160039092020190815590820151600182015560408201516002909101805460608401516080909401516001600160a01b0316620100000262010000600160b01b03199415156101000261ff00199415159490941661ffff19909216919091179290921792909216179055505050565b3360009081526005602052604090205460ff168061084d57506001546001600160a01b031633145b6108695760405162461bcd60e51b81526004016105d590611ab7565b600955565b3360009081526005602052604090205460ff168061089657506001546001600160a01b031633145b6108b25760405162461bcd60e51b81526004016105d590611ab7565b6001805460ff60a01b198116600160a01b9182900460ff1615909102179055565b3360009081526005602052604090205460ff16806108fb57506001546001600160a01b031633145b6109175760405162461bcd60e51b81526004016105d590611ab7565b806001600160a01b031663a9059cbb6109386001546001600160a01b031690565b6040516370a0823160e01b81523060048201526001600160a01b038516906370a082319060240160206040518083038186803b15801561097757600080fd5b505afa15801561098b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109af9190611b27565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b1580156109f557600080fd5b505af1158015610a09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2d9190611b40565b5050565b60046020528160005260406000208181548110610a4d57600080fd5b600091825260209091206003909102018054600182015460029092015490935090915060ff808216916101008104909116906201000090046001600160a01b031685565b6001546001600160a01b03163314610abb5760405162461bcd60e51b81526004016105d590611b62565b816001600160a01b03166323b872dd30610add6001546001600160a01b031690565b6040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101849052606401600060405180830381600087803b158015610b2c57600080fd5b505af1158015610b40573d6000803e3d6000fd5b505050505050565b6001546001600160a01b03163314610b725760405162461bcd60e51b81526004016105d590611b62565b610b7c60006117b3565b565b3360009081526005602052604090205460ff1680610ba657506001546001600160a01b031633145b610bc25760405162461bcd60e51b81526004016105d590611ab7565b6001546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610bfb573d6000803e3d6000fd5b50565b60026000541415610c515760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105d5565b6002600055600154600160a01b900460ff1615610ca55760405162461bcd60e51b815260206004820152601260248201527120bab1ba34b7b739902234b9b0b13632b21760711b60448201526064016105d5565b60008181526002602052604090205460ff1615610cf65760405162461bcd60e51b815260206004820152600f60248201526e20bab1ba34b7b7102830bab9b2b21760891b60448201526064016105d5565b60008181526003602052604090205460ff1615610d495760405162461bcd60e51b8152602060048201526011602482015270105d58dd1a5bdb8818dbdb5c1b195d1959607a1b60448201526064016105d5565b610d52816117a1565b3411610d8f5760405162461bcd60e51b815260206004820152600c60248201526b2134b2103a37b7903637bb9760a11b60448201526064016105d5565b6000818152600460209081526040808320815160a08101835234808252428286018181526001848701818152606086018a8152336080880181815289548086018b55998d529a909b20965160039098029096019687559151908601555160029094018054935196516001600160a01b0316620100000262010000600160b01b03199715156101000261ff00199615159690961661ffff19909516949094179490941795909516919091179091559051909184917f6f7e354ea3ab5c288aea37fce29c603f9a98a3b040f6d8f32f10e192ec47ff6a91610e719190815260200190565b60405180910390a460095460008281526004602052604090205410610ff45760005b600082815260046020526040902054610eae90600190611afa565b811015610fa2576000828152600460205260409020610ece826001611b97565b81548110610ede57610ede611b11565b9060005260206000209060030201600460008481526020019081526020016000208281548110610f1057610f10611b11565b600091825260209091208254600390920201908155600180830154818301556002928301805493909201805460ff948516151560ff19821681178355845461010090819004909616151590950261ff001990951661ffff19909116179390931780845591546001600160a01b036201000091829004160262010000600160b01b03199092169190911790915501610e93565b506000818152600460205260409020805480610fc057610fc0611baf565b600082815260208120600360001990930192830201818155600181019190915560020180546001600160b01b031916905590555b6000818152600460205260409020546001101561110a57600061101682611805565b905080608001516001600160a01b03168160000151837f549379a15b42002766236f594fea19209f0b6d1e869d78c8dd1d1d84f413cde6846020015160405161106191815260200190565b60405180910390a4608081015181516040516000926001600160a01b031691908381818185875af1925050503d80600081146110b9576040519150601f19603f3d011682016040523d82523d6000602084013e6110be565b606091505b50509050806111075760405162461bcd60e51b815260206004820152601560248201527422b9b1b937bb903932ba3ab937103330b4b632b21760591b60448201526064016105d5565b50505b506001600055565b3360009081526005602052604090205460ff168061113a57506001546001600160a01b031633145b6111565760405162461bcd60e51b81526004016105d590611ab7565b60008181526003602052604090205460ff16156111b55760405162461bcd60e51b815260206004820152601a60248201527f41756374696f6e20616c726561647920636f6d706c657465642e00000000000060448201526064016105d5565b600081815260046020526040902054600111156112045760405162461bcd60e51b815260206004820152600d60248201526c2737903134b2399036b0b2329760991b60448201526064016105d5565b60008181526002602090815260408083208054600160ff1991821681179092556003909352908320805490921617905561123d82611435565b905080608001516001600160a01b03168160000151837ffc3d557e46010cdf2a5a80a495f308239f5be888eb5bb151be68d5c369728b24846020015160405161128891815260200190565b60405180910390a460016060820181905260008381526004602052604081205490916112b391611afa565b600084815260046020526040902080549192508391839081106112d8576112d8611b11565b6000918252602091829020835160039092020190815590820151600182015560408201516002909101805460608401516080909401516001600160a01b0316620100000262010000600160b01b03199415156101000261ff00199415159490941661ffff19909216919091179290921792909216179055815161135a9061184c565b60075460808301516040516323b872dd60e01b81523060048201526001600160a01b039182166024820152604481018690529116906323b872dd90606401600060405180830381600087803b1580156113b257600080fd5b505af11580156113c6573d6000803e3d6000fd5b50505050505050565b3360009081526005602052604090205460ff16806113f757506001546001600160a01b031633145b6114135760405162461bcd60e51b81526004016105d590611ab7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091526000828152600460205260409020546114af5750506040805160a08101825260085481526000602082018190529181018290526060810191909152600a546001600160a01b0316608082015290565b600082815260046020526040902080546114cb90600190611afa565b815481106114db576114db611b11565b60009182526020918290206040805160a0810182526003939093029091018054835260018101549383019390935260029092015460ff808216151593830193909352610100810490921615156060820152620100009091046001600160a01b0316608082015292915050565b6001546001600160a01b031633146115715760405162461bcd60e51b81526004016105d590611b62565b6001600160a01b03166000908152600560205260409020805460ff19811660ff90911615179055565b3360009081526005602052604090205460ff16806115c257506001546001600160a01b031633145b6115de5760405162461bcd60e51b81526004016105d590611ab7565b60008181526003602052604090205460ff16156116325760405162461bcd60e51b815260206004820152601260248201527120bab1ba34b7b71031b7b6b83632ba32b21760711b60448201526064016105d5565b6000908152600260205260409020805460ff19811660ff90911615179055565b606060046000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156116fe5760008481526020908190206040805160a08101825260038602909201805483526001808201548486015260029091015460ff808216151593850193909352610100810490921615156060840152620100009091046001600160a01b031660808301529083529092019101611687565b505050509050919050565b6001546001600160a01b031633146117335760405162461bcd60e51b81526004016105d590611b62565b6001600160a01b0381166117985760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105d5565b610bfb816117b3565b60006117ac82611435565b5192915050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040805160a081018252600080825260208201819052918101829052606081018290526080810191909152600082815260046020526040902080546114cb90600290611afa565b6001546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610a2d573d6000803e3d6000fd5b60006020828403121561189857600080fd5b5035919050565b80356001600160a01b03811681146118b657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156118e757600080fd5b6118f08561189f565b93506118fe6020860161189f565b925060408501359150606085013567ffffffffffffffff8082111561192257600080fd5b818701915087601f83011261193657600080fd5b813581811115611948576119486118bb565b604051601f8201601f19908116603f01168101908382118183101715611970576119706118bb565b816040528281528a602084870101111561198957600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000602082840312156119bf57600080fd5b6119c88261189f565b9392505050565b600080604083850312156119e257600080fd5b50508035926020909101359150565b60008060408385031215611a0457600080fd5b611a0d8361189f565b946020939093013593505050565b80518252602080820151908301526040808201511515908301526060808201511515908301526080908101516001600160a01b0316910152565b60a08101611a638284611a1b565b92915050565b6020808252825182820181905260009190848201906040850190845b81811015611aab57611a98838551611a1b565b9284019260a09290920191600101611a85565b50909695505050505050565b6020808252601390820152722737ba1037bbb732b91037b91030b236b4b71760691b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082821015611b0c57611b0c611ae4565b500390565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611b3957600080fd5b5051919050565b600060208284031215611b5257600080fd5b815180151581146119c857600080fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115611baa57611baa611ae4565b500190565b634e487b7160e01b600052603160045260246000fdfea26469706673582212204bf75c94e5ab1bb3c947eb0c9ed2115268fda57dec67e68cb301f780b89c2f5964736f6c63430008090033

Deployed Bytecode

0x6080604052600436106101855760003560e01c806395a7ca81116100d1578063d01242f91161008a578063f20e5e3511610064578063f20e5e3514610503578063f2b1f30a14610530578063f2fde38b14610551578063f669db831461057157600080fd5b8063d01242f914610488578063d4f8a1a2146104c3578063e8cd4a45146104e357600080fd5b806395a7ca81146103a85780639979ef45146103d8578063a6b11c12146103eb578063a7ccabdf1461040b578063b14c63c51461042b578063c9c306c91461045857600080fd5b80634d03a9a51161013e57806376be15851161011857806376be1585146102fd5780637c0b8de21461033d578063853828b6146103755780638da5cb5b1461038a57600080fd5b80634d03a9a5146102715780636088e93a146102c8578063715018a6146102e857600080fd5b80630556e9b9146101915780630ad24528146101b3578063150b7a02146101d35780631bfe42941461021c5780631d1920411461023c57806349df728c1461025157600080fd5b3661018c57005b600080fd5b34801561019d57600080fd5b506101b16101ac366004611886565b610591565b005b3480156101bf57600080fd5b506101b16101ce366004611886565b6105e3565b3480156101df57600080fd5b506101fe6101ee3660046118d1565b630a85bd0160e11b949350505050565b6040516001600160e01b031990911681526020015b60405180910390f35b34801561022857600080fd5b506101b1610237366004611886565b610825565b34801561024857600080fd5b506101b161086e565b34801561025d57600080fd5b506101b161026c3660046119ad565b6108d3565b34801561027d57600080fd5b5061029161028c3660046119cf565b610a31565b6040805195865260208601949094529115159284019290925290151560608301526001600160a01b0316608082015260a001610213565b3480156102d457600080fd5b506101b16102e33660046119f1565b610a91565b3480156102f457600080fd5b506101b1610b48565b34801561030957600080fd5b5061032d6103183660046119ad565b60056020526000908152604090205460ff1681565b6040519015158152602001610213565b34801561034957600080fd5b5060075461035d906001600160a01b031681565b6040516001600160a01b039091168152602001610213565b34801561038157600080fd5b506101b1610b7e565b34801561039657600080fd5b506001546001600160a01b031661035d565b3480156103b457600080fd5b5061032d6103c3366004611886565b60026020526000908152604090205460ff1681565b6101b16103e6366004611886565b610bfe565b3480156103f757600080fd5b506101b1610406366004611886565b611112565b34801561041757600080fd5b506101b16104263660046119ad565b6113cf565b34801561043757600080fd5b5061044b610446366004611886565b611435565b6040516102139190611a55565b34801561046457600080fd5b5061032d610473366004611886565b60036020526000908152604090205460ff1681565b34801561049457600080fd5b506104b56104a33660046119ad565b60066020526000908152604090205481565b604051908152602001610213565b3480156104cf57600080fd5b506101b16104de3660046119ad565b611547565b3480156104ef57600080fd5b506101b16104fe366004611886565b61159a565b34801561050f57600080fd5b5061052361051e366004611886565b611652565b6040516102139190611a69565b34801561053c57600080fd5b5060015461032d90600160a01b900460ff1681565b34801561055d57600080fd5b506101b161056c3660046119ad565b611709565b34801561057d57600080fd5b506104b561058c366004611886565b6117a1565b3360009081526005602052604090205460ff16806105b957506001546001600160a01b031633145b6105de5760405162461bcd60e51b81526004016105d590611ab7565b60405180910390fd5b600855565b3360009081526005602052604090205460ff168061060b57506001546001600160a01b031633145b6106275760405162461bcd60e51b81526004016105d590611ab7565b60008181526003602052604090205460ff16156106865760405162461bcd60e51b815260206004820152601a60248201527f41756374696f6e20616c726561647920636f6d706c657465642e00000000000060448201526064016105d5565b600081815260046020526040902054600111156106d55760405162461bcd60e51b815260206004820152600d60248201526c2737903134b2399036b0b2329760991b60448201526064016105d5565b60008181526002602090815260408083208054600160ff1991821681179092556003909352908320805490921617905561070e82611435565b905080608001516001600160a01b03168160000151837ffc3d557e46010cdf2a5a80a495f308239f5be888eb5bb151be68d5c369728b24846020015160405161075991815260200190565b60405180910390a4600160608201819052600083815260046020526040812054909161078491611afa565b600084815260046020526040902080549192508391839081106107a9576107a9611b11565b6000918252602091829020835160039092020190815590820151600182015560408201516002909101805460608401516080909401516001600160a01b0316620100000262010000600160b01b03199415156101000261ff00199415159490941661ffff19909216919091179290921792909216179055505050565b3360009081526005602052604090205460ff168061084d57506001546001600160a01b031633145b6108695760405162461bcd60e51b81526004016105d590611ab7565b600955565b3360009081526005602052604090205460ff168061089657506001546001600160a01b031633145b6108b25760405162461bcd60e51b81526004016105d590611ab7565b6001805460ff60a01b198116600160a01b9182900460ff1615909102179055565b3360009081526005602052604090205460ff16806108fb57506001546001600160a01b031633145b6109175760405162461bcd60e51b81526004016105d590611ab7565b806001600160a01b031663a9059cbb6109386001546001600160a01b031690565b6040516370a0823160e01b81523060048201526001600160a01b038516906370a082319060240160206040518083038186803b15801561097757600080fd5b505afa15801561098b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109af9190611b27565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b1580156109f557600080fd5b505af1158015610a09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2d9190611b40565b5050565b60046020528160005260406000208181548110610a4d57600080fd5b600091825260209091206003909102018054600182015460029092015490935090915060ff808216916101008104909116906201000090046001600160a01b031685565b6001546001600160a01b03163314610abb5760405162461bcd60e51b81526004016105d590611b62565b816001600160a01b03166323b872dd30610add6001546001600160a01b031690565b6040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101849052606401600060405180830381600087803b158015610b2c57600080fd5b505af1158015610b40573d6000803e3d6000fd5b505050505050565b6001546001600160a01b03163314610b725760405162461bcd60e51b81526004016105d590611b62565b610b7c60006117b3565b565b3360009081526005602052604090205460ff1680610ba657506001546001600160a01b031633145b610bc25760405162461bcd60e51b81526004016105d590611ab7565b6001546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610bfb573d6000803e3d6000fd5b50565b60026000541415610c515760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105d5565b6002600055600154600160a01b900460ff1615610ca55760405162461bcd60e51b815260206004820152601260248201527120bab1ba34b7b739902234b9b0b13632b21760711b60448201526064016105d5565b60008181526002602052604090205460ff1615610cf65760405162461bcd60e51b815260206004820152600f60248201526e20bab1ba34b7b7102830bab9b2b21760891b60448201526064016105d5565b60008181526003602052604090205460ff1615610d495760405162461bcd60e51b8152602060048201526011602482015270105d58dd1a5bdb8818dbdb5c1b195d1959607a1b60448201526064016105d5565b610d52816117a1565b3411610d8f5760405162461bcd60e51b815260206004820152600c60248201526b2134b2103a37b7903637bb9760a11b60448201526064016105d5565b6000818152600460209081526040808320815160a08101835234808252428286018181526001848701818152606086018a8152336080880181815289548086018b55998d529a909b20965160039098029096019687559151908601555160029094018054935196516001600160a01b0316620100000262010000600160b01b03199715156101000261ff00199615159690961661ffff19909516949094179490941795909516919091179091559051909184917f6f7e354ea3ab5c288aea37fce29c603f9a98a3b040f6d8f32f10e192ec47ff6a91610e719190815260200190565b60405180910390a460095460008281526004602052604090205410610ff45760005b600082815260046020526040902054610eae90600190611afa565b811015610fa2576000828152600460205260409020610ece826001611b97565b81548110610ede57610ede611b11565b9060005260206000209060030201600460008481526020019081526020016000208281548110610f1057610f10611b11565b600091825260209091208254600390920201908155600180830154818301556002928301805493909201805460ff948516151560ff19821681178355845461010090819004909616151590950261ff001990951661ffff19909116179390931780845591546001600160a01b036201000091829004160262010000600160b01b03199092169190911790915501610e93565b506000818152600460205260409020805480610fc057610fc0611baf565b600082815260208120600360001990930192830201818155600181019190915560020180546001600160b01b031916905590555b6000818152600460205260409020546001101561110a57600061101682611805565b905080608001516001600160a01b03168160000151837f549379a15b42002766236f594fea19209f0b6d1e869d78c8dd1d1d84f413cde6846020015160405161106191815260200190565b60405180910390a4608081015181516040516000926001600160a01b031691908381818185875af1925050503d80600081146110b9576040519150601f19603f3d011682016040523d82523d6000602084013e6110be565b606091505b50509050806111075760405162461bcd60e51b815260206004820152601560248201527422b9b1b937bb903932ba3ab937103330b4b632b21760591b60448201526064016105d5565b50505b506001600055565b3360009081526005602052604090205460ff168061113a57506001546001600160a01b031633145b6111565760405162461bcd60e51b81526004016105d590611ab7565b60008181526003602052604090205460ff16156111b55760405162461bcd60e51b815260206004820152601a60248201527f41756374696f6e20616c726561647920636f6d706c657465642e00000000000060448201526064016105d5565b600081815260046020526040902054600111156112045760405162461bcd60e51b815260206004820152600d60248201526c2737903134b2399036b0b2329760991b60448201526064016105d5565b60008181526002602090815260408083208054600160ff1991821681179092556003909352908320805490921617905561123d82611435565b905080608001516001600160a01b03168160000151837ffc3d557e46010cdf2a5a80a495f308239f5be888eb5bb151be68d5c369728b24846020015160405161128891815260200190565b60405180910390a460016060820181905260008381526004602052604081205490916112b391611afa565b600084815260046020526040902080549192508391839081106112d8576112d8611b11565b6000918252602091829020835160039092020190815590820151600182015560408201516002909101805460608401516080909401516001600160a01b0316620100000262010000600160b01b03199415156101000261ff00199415159490941661ffff19909216919091179290921792909216179055815161135a9061184c565b60075460808301516040516323b872dd60e01b81523060048201526001600160a01b039182166024820152604481018690529116906323b872dd90606401600060405180830381600087803b1580156113b257600080fd5b505af11580156113c6573d6000803e3d6000fd5b50505050505050565b3360009081526005602052604090205460ff16806113f757506001546001600160a01b031633145b6114135760405162461bcd60e51b81526004016105d590611ab7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091526000828152600460205260409020546114af5750506040805160a08101825260085481526000602082018190529181018290526060810191909152600a546001600160a01b0316608082015290565b600082815260046020526040902080546114cb90600190611afa565b815481106114db576114db611b11565b60009182526020918290206040805160a0810182526003939093029091018054835260018101549383019390935260029092015460ff808216151593830193909352610100810490921615156060820152620100009091046001600160a01b0316608082015292915050565b6001546001600160a01b031633146115715760405162461bcd60e51b81526004016105d590611b62565b6001600160a01b03166000908152600560205260409020805460ff19811660ff90911615179055565b3360009081526005602052604090205460ff16806115c257506001546001600160a01b031633145b6115de5760405162461bcd60e51b81526004016105d590611ab7565b60008181526003602052604090205460ff16156116325760405162461bcd60e51b815260206004820152601260248201527120bab1ba34b7b71031b7b6b83632ba32b21760711b60448201526064016105d5565b6000908152600260205260409020805460ff19811660ff90911615179055565b606060046000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156116fe5760008481526020908190206040805160a08101825260038602909201805483526001808201548486015260029091015460ff808216151593850193909352610100810490921615156060840152620100009091046001600160a01b031660808301529083529092019101611687565b505050509050919050565b6001546001600160a01b031633146117335760405162461bcd60e51b81526004016105d590611b62565b6001600160a01b0381166117985760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105d5565b610bfb816117b3565b60006117ac82611435565b5192915050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040805160a081018252600080825260208201819052918101829052606081018290526080810191909152600082815260046020526040902080546114cb90600290611afa565b6001546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610a2d573d6000803e3d6000fd5b60006020828403121561189857600080fd5b5035919050565b80356001600160a01b03811681146118b657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156118e757600080fd5b6118f08561189f565b93506118fe6020860161189f565b925060408501359150606085013567ffffffffffffffff8082111561192257600080fd5b818701915087601f83011261193657600080fd5b813581811115611948576119486118bb565b604051601f8201601f19908116603f01168101908382118183101715611970576119706118bb565b816040528281528a602084870101111561198957600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000602082840312156119bf57600080fd5b6119c88261189f565b9392505050565b600080604083850312156119e257600080fd5b50508035926020909101359150565b60008060408385031215611a0457600080fd5b611a0d8361189f565b946020939093013593505050565b80518252602080820151908301526040808201511515908301526060808201511515908301526080908101516001600160a01b0316910152565b60a08101611a638284611a1b565b92915050565b6020808252825182820181905260009190848201906040850190845b81811015611aab57611a98838551611a1b565b9284019260a09290920191600101611a85565b50909695505050505050565b6020808252601390820152722737ba1037bbb732b91037b91030b236b4b71760691b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082821015611b0c57611b0c611ae4565b500390565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611b3957600080fd5b5051919050565b600060208284031215611b5257600080fd5b815180151581146119c857600080fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115611baa57611baa611ae4565b500190565b634e487b7160e01b600052603160045260246000fdfea26469706673582212204bf75c94e5ab1bb3c947eb0c9ed2115268fda57dec67e68cb301f780b89c2f5964736f6c63430008090033

Block Transaction Gas Used Reward
view all blocks collator

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
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.