Contract 0x962eBC7915cF58EbeFAD620d05e7863314Ff155A 1

 

Contract Overview

Balance:
0 MATIC

MATIC Value:
$0.00

Token:
 
Txn Hash
Method
Block
From
To
Value [Txn Fee]
0x7b5263da5fd4256d82439ffc1799ae0a111c6ac3750df484c441790c665b2904Register Or Modi...407900372023-03-26 12:33:5034 mins ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.02196165 150
0xb1e208c81e22c029938891b2e146497f7fa23b1608fffa6a7cefd3c808e5b212Register Or Modi...407900372023-03-26 12:33:5034 mins ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.01285815 150
0x94a4c5bc2bfc9e3a3b6b7ee53706385f69e683c098aae10adc41b381c9ff3bccRegister Or Modi...407862272023-03-26 10:00:323 hrs 7 mins ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.016960000847 101.632963882
0x4450e8687638e36795daae8713e7418279a8fa852641f2c0332cc5a2cfbdd963Register Or Modi...407862272023-03-26 10:00:323 hrs 7 mins ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.005940345105 101.632963882
0x210df84f1c5bfeb77fdf8337b086d03b879904cd53ec74897b44e6cd94cc394bRegister Or Modi...407828492023-03-26 8:00:315 hrs 7 mins ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.013530121 92.411915774
0x25a6362739d185ac8cb5415cf194a98103792f31d64ceff72688b1f7d1ccea9dRegister Or Modi...407796222023-03-26 6:00:337 hrs 7 mins ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.009077241443 105.89285523
0x0e438237e021ebf401d961b2ac1469995a85bdbe343bf32029bca096605b1aaaRegister Or Modi...407796222023-03-26 6:00:337 hrs 7 mins ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.017670870216 105.89285523
0x7d4f1e56d810c4d1c498da1b66d57c40d4107add2dcd8faf41275e1233109249Register Or Modi...407765372023-03-26 4:00:329 hrs 7 mins ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.010859374744 74.17048408
0xc0f8883e7727def7797a231214b179c83e1b8ab17a59996c925debb4e26e9fa3Register Or Modi...407734162023-03-26 2:00:3311 hrs 7 mins ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.01373308746 82.295655196
0x843275910423302e3c91a9d54dc1ca0e65013ef2219039bac628611109666549Register Or Modi...407703712023-03-26 0:00:3513 hrs 7 mins ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.005084427396 86.989125495
0x988009c543b105d0b8b153bdfd5a934aaeb7991600d8eabe72a06fac4124bc00Register Or Modi...407703712023-03-26 0:00:3513 hrs 7 mins ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.012736164852 86.989125495
0xf9b337d934f6308845b0c6d8d785972b63f7b8c9aa98d41fb13c9f45d77e1cc6Register Or Modi...407703712023-03-26 0:00:3513 hrs 7 mins ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.007456794826 86.989125495
0xb36cd2047847a3637d40c3b0bbdaad68828abb5d06867e92fe0ca2088bd5a52cRegister Or Modi...407672092023-03-25 22:00:3115 hrs 7 mins ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.014220954171 85.219201029
0x6a44c4e977cdc3f51158fe66c34a3d3ced63ce80a28772c9603892c7d24af651Register Or Modi...407638912023-03-25 20:00:3117 hrs 7 mins ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.004930707179 84.359136683
0xfd5354fbb5748010aa84dd2c3593e2f7f9f4d6ff8c8a42c4b92ab4fca2722510Register Or Modi...407638912023-03-25 20:00:3117 hrs 7 mins ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.01235110556 84.359136683
0xf53e73460f5d6d05fadb2fde26c4857a91e794b22c853b3fd387483fb873c42eRegister Or Modi...407605992023-03-25 18:00:3219 hrs 7 mins ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.006062964551 70.729045991
0x127177b2f29460990614ca7a325bbfb230a6f9f8c61281f4f01ea715346140c6Register Or Modi...407605992023-03-25 18:00:3219 hrs 7 mins ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.011802909549 70.729045991
0xaae66f1bae320d2e3d1783b3deee302c0f6f1433519d4d8e0b409fb296936398Register Or Modi...407573972023-03-25 16:00:4921 hrs 7 mins ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.02196165 150
0x29a5e6c65b07813a1d7cb29abbfbfcf8d39a0dbf464a005114cf8d1e2aecbb06Register Or Modi...407540972023-03-25 14:00:3323 hrs 7 mins ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.02503125 150
0x711d711815193b8c87d959ef233144a754707a3dfd8ed0863076622b1d94e1faRegister Or Modi...407507232023-03-25 12:00:321 day 1 hr ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.014457503033 98.746016582
0x279322d6b4990abbd3542e364e7723f529cf03ae18b4d99f14b93c0314af292aRegister Or Modi...407507232023-03-25 12:00:321 day 1 hr ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.008464607287 98.746016582
0xae92151495cc7a3a2589bb7f0ab23843f5687c1d7b249572a930adaf893dfa56Register Or Modi...407474192023-03-25 10:02:131 day 3 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.02503125 150
0x955a874c3d03a7b701a367628ef6fa29242054523c66ca86cdaf3008c42d1bb0Register Or Modi...407474192023-03-25 10:02:131 day 3 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.00876735 150
0x395661b2345e4e3a32aae8680441a2645c1bbfb4a83953d55dd0b71f6751cd00Register Or Modi...407440762023-03-25 8:00:331 day 5 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.016483344118 112.582689268
0x63be256ba06d1a155196d970cd9b688ba747bbe99f5e10d0fa85179e87a8f4ccRegister Or Modi...407408012023-03-25 6:00:331 day 7 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x962ebc7915cf58ebefad620d05e7863314ff155a0 MATIC0.015966283242 95.67810183
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GBM

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 15 : GBM.sol
// SPDX-License-Identifier: UNLICENSED
// © Copyright 2021. Patent pending. All rights reserved. Perpetual Altruism Ltd.
pragma solidity ^0.8.17;

/*
.                                                                                                                                          .
.  .cxxo.                 ;dxxo:cdxxdxxxxxo::dxxc.   .ldxxxdxxxxxo' 'oxxxxxxxxxxxl.   .cdxxl.      .ldxxxxxxo::dxxxxxxxxo:cdxxxxxxxxxd:.   .
.  .OMMX;               .dNMMXkONMMMMMMMMXkONMMM0'  ;0WMMMWMMWMWKc'cKWMMMMMMMMMW0;   ,kWMW0;      ;0WMMMMMMXkONMMMMMMMWXkONMMMMMMMMMNx'    .
.  .OMMX;    .,,,.     ;OWMW0kKWMWXXWMMW0k0WMMMM0'.oXMWXdcccccc:''xNMWWKocccccc:.  .cKWMNx.     .oXMMXxcccldKWMWXXWWMW0k0WMWOlcccccc;.     .
.  .OMMX:   ;ONWWk.  .lXWMNOkXWMN0KNWMNOkXWWMMWM0lkWMMW0occcccc,:0WWWNXOlcccccc.  .xNMWKc.     'kWMW0;   .lXWMNKKNWWXxxXWMMXxcccccc:.      .
.  .OMMX: .oXMMMMO. 'kWMWKk0NMMWNNWMWKk0NMW0ONMM0kXMMMMMMMMMMMWOkWMMMMWMMMMMMMWl.:0WMWk'     .cKWMWk'   'kWMMMNNWMW0:'kMMMMMMMMMMMMX;      .
.  .OMMX:,kWMMMMMO,cKWMNOkKWMMMMMMWXOkKWMNx':XMM0ooxxxxxxONMMMNocdxxxxxxx0WMMMXodXMMXo.     .xNMMMW0kxclKWMMMMMMWXx. .cxxxxxxkKWMMWO'      .
.  .OMMN0KWMNNWMMX0NMWXkONMMKx0WMM0okNMMKl. ;XMM0:',,.  'xNMWKc..','.   ,OWMWKk0WMW0;      ;0WMMWWWWXkONMWKxOWMMO;.'''.     .cKWMNx'       .
.  .OMMMMMWKloNMMMMMW0kKWMWO, lNMMXXWMWO,   ;XMM0kKNNk';0WMWk,  lXNNo..lKWMNOkXMMNd.     .oXMMXd:::cdKWMWO, cNMMx.oNNNo    .dNMMXl.        .
.  .OMMMMWO, :NMMWWXkkXWMXo.  lNMMMMMXo.    ;XMM0kNMMXOXMWXo.   oWMWK0KNMWKkONWMWXdllll;;kWMMWKdlllxXMMXo.  cNMWx'dWMW0ollo0WMWO,          .
.  .OMMMXo.  :NMMWKk0WMW0;    lNMMWW0;      ;XMM0kNMMMMMW0;     oWMMMMMMN0kKWMMMMMMMMNOkXWMMMMMMMMMMMW0;    cNMMx'dWMMMMMMMMWXo.           .
.  .:ooo,    .looc;:oooc.     'ooool.       .looc:loooooc.      ,ooooooo:;coooooooooo:;loooooooooooooc.     'loo;.,oooooooooo;             .
.                                                                                                                                          .*/
import "@openzeppelin/contracts/access/AccessControl.sol";
import "./IGBM.sol";
import "./IGBMInitiator.sol";
import "../tokens/IERC20.sol";
import "../tokens/IERC721.sol";
import "../tokens/IERC721TokenReceiver.sol";
import "../tokens/IERC1155.sol";
import "../tokens/IERC1155TokenReceiver.sol";
import "../tokens/Ownable.sol";

/// @title GBM auction contract
/// @dev See GBM.auction on how to use this contract
/// @author Guillaume Gonnaud
contract GBM is IGBM, IERC1155TokenReceiver, IERC721TokenReceiver, AccessControl {
    bytes32 public constant INITIATOR_ROLE = keccak256("INITIATOR_ROLE");
    event Contract_BiddingAllowed(address indexed _contract, bool _biddingAllowed);

    //Struct used to store the representation of an NFT being auctionned
    struct token_representation {
        address contractAddress; // The contract address
        uint256 tokenId; // The ID of the token on the contract
        bytes4 tokenKind; // The ERC name of the token implementation bytes4(keccak256("ERC721")) or bytes4(keccak256("ERC1155"))
    }

    //The address of the auctionner to whom all profits will be sent
    address public override owner;

    //Contract address storing the ERC20 currency used in auctions
    address public override ERC20Currency;

    mapping(uint256 => token_representation) internal tokenMapping; //_auctionID => token_primaryKey
    mapping(address => mapping(uint256 => mapping(uint256 => uint256))) internal auctionMapping; // contractAddress => tokenId => TokenIndex => _auctionID

    mapping(uint256 => uint256) internal auction_dueIncentives; // _auctionID => dueIncentives
    mapping(uint256 => uint256) internal auction_debt; // _auctionID => unsettled debt
    mapping(uint256 => address) public auction_highestBidder; // _auctionID => bidder
    mapping(uint256 => uint256) internal auction_highestBid; // _auctionID => bid

    mapping(address => bool) internal collection_biddingAllowed; // tokencontract => Allow to start/pause ongoing auctions

    //var storing individual auction settings. if != null, they take priority over collection settings
    mapping(uint256 => uint256) internal auction_startTime; // _auctionID => timestamp
    mapping(uint256 => uint256) internal auction_endTime; // _auctionID => timestamp
    mapping(uint256 => uint256) internal auction_hammerTimeDuration; // _auctionID => duration in seconds
    mapping(uint256 => uint256) internal auction_bidDecimals; // _auctionID => bidDecimals
    mapping(uint256 => uint256) internal auction_stepMin; // _auctionID => stepMin
    mapping(uint256 => uint256) internal auction_incMin; // _auctionID => minimal earned incentives
    mapping(uint256 => uint256) internal auction_incMax; // _auctionID => maximal earned incentives
    mapping(uint256 => uint256) internal auction_bidMultiplier; // _auctionID => bid incentive growth multiplier

    //var storing contract wide settings. Those are used if no auctionId specific parameters is initialized
    mapping(address => uint256) internal collection_startTime; // tokencontract => timestamp
    mapping(address => uint256) internal collection_endTime; // tokencontract => timestamp
    mapping(address => uint256) internal collection_hammerTimeDuration; // tokencontract => duration in seconds
    mapping(address => uint256) internal collection_bidDecimals; // tokencontract => bidDecimals
    mapping(address => uint256) internal collection_stepMin; // tokencontract => stepMin
    mapping(address => uint256) internal collection_incMin; // tokencontract => minimal earned incentives
    mapping(address => uint256) internal collection_incMax; // tokencontract => maximal earned incentives
    mapping(address => uint256) internal collection_bidMultiplier; // tokencontract => bid incentive growth multiplier

    mapping(uint256 => bool) internal claimed; // _auctionID => claimed Boolean preventing multiple claim of a token

    mapping(address => mapping(uint256 => uint256)) public eRC1155_tokensIndex; //Contract => TokenID => Amount being auctionned
    mapping(address => mapping(uint256 => uint256)) public eRC1155_tokensUnderAuction; //Contract => TokenID => Amount being auctionned

    constructor(address _ERC20Currency, address _initiator) {
        owner = msg.sender;
        ERC20Currency = _ERC20Currency;

        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _grantRole(INITIATOR_ROLE, msg.sender);
        _grantRole(INITIATOR_ROLE, _initiator);
    }

    /// @notice Place a GBM bid for a GBM auction
    /// @param _auctionID The auction you want to bid on
    /// @param _bidAmount The amount of the ERC20 token the bid is made of. They should be withdrawable by this contract.
    /// @param _highestBid The current higest bid. Throw if incorrect.
    function bid(
        uint256 _auctionID,
        uint256 _bidAmount,
        uint256 _highestBid
    ) external override {
        require(
            collection_biddingAllowed[tokenMapping[_auctionID].contractAddress],
            "bid: bidding is currently not allowed"
        );

        require(_bidAmount > 1, "bid: _bidAmount cannot be 0");
        require(
            _highestBid == auction_highestBid[_auctionID],
            "bid: current highest bid do not match the submitted transaction _highestBid"
        );

        //An auction start time of 0 also indicate the auction has not been created at all
        require(
            getAuctionStartTime(_auctionID) <= block.timestamp && getAuctionStartTime(_auctionID) != 0,
            "bid: Auction has not started yet"
        );
        require(getAuctionEndTime(_auctionID) >= block.timestamp, "bid: Auction has already ended");

        require(_bidAmount > _highestBid, "bid: _bidAmount must be higher than _highestBid");
        require(
            (_highestBid * (getAuctionBidDecimals(_auctionID) + getAuctionStepMin(_auctionID))) <=
                (_bidAmount * getAuctionBidDecimals(_auctionID)),
            "bid: _bidAmount must meet the minimum bid"
        );

        //Transfer the money of the bidder to the GBM smart contract
        IERC20(ERC20Currency).transferFrom(msg.sender, address(this), _bidAmount);

        //Extend the duration time of the auction if we are close to the end
        if (getAuctionEndTime(_auctionID) < block.timestamp + getHammerTimeDuration(_auctionID)) {
            auction_endTime[_auctionID] = block.timestamp + getHammerTimeDuration(_auctionID);
            emit Auction_EndTimeUpdated(_auctionID, auction_endTime[_auctionID]);
        }

        // Saving incentives for later sending
        uint256 duePay = auction_dueIncentives[_auctionID];
        address previousHighestBidder = auction_highestBidder[_auctionID];
        uint256 previousHighestBid = auction_highestBid[_auctionID];

        // Emitting the event sequence
        if (previousHighestBidder != address(0)) {
            emit Auction_BidRemoved(_auctionID, previousHighestBidder, previousHighestBid);
        }

        if (duePay != 0) {
            auction_debt[_auctionID] = auction_debt[_auctionID] + duePay;
            emit Auction_IncentivePaid(_auctionID, previousHighestBidder, duePay);
        }

        emit Auction_BidPlaced(_auctionID, msg.sender, _bidAmount);

        // Calculating incentives for the new bidder
        auction_dueIncentives[_auctionID] = calculateIncentives(_auctionID, _bidAmount);

        //Setting the new bid/bidder as the highest bid/bidder
        auction_highestBidder[_auctionID] = msg.sender;
        auction_highestBid[_auctionID] = _bidAmount;

        if ((previousHighestBid + duePay) != 0) {
            //Refunding the previous bid as well as sending the incentives
            IERC20(ERC20Currency).transfer(previousHighestBidder, (previousHighestBid + duePay));
        }
    }

    /// @notice Attribute a token to the winner of the auction and distribute the proceeds to the owner of this contract.
    /// throw if bidding is disabled or if the auction is not finished.
    /// @param _auctionID The auctionID of the auction to complete
    function claim(uint256 _auctionID) external override {
        address _ca = tokenMapping[_auctionID].contractAddress;
        uint256 _tid = tokenMapping[_auctionID].tokenId;

        require(collection_biddingAllowed[_ca], "claim: Claiming is currently not allowed");
        require(getAuctionEndTime(_auctionID) < block.timestamp, "claim: Auction has not yet ended");

        require(!claimed[_auctionID], "claim: this auction has alredy been claimed");
        claimed[_auctionID] = true;

        //Transfer the proceeds to this smart contract owner
        IERC20(ERC20Currency).transfer(owner, (auction_highestBid[_auctionID] - auction_debt[_auctionID]));

        if (tokenMapping[_auctionID].tokenKind == bytes4(keccak256("ERC721"))) {
            //0x73ad2146
            IERC721(_ca).safeTransferFrom(address(this), auction_highestBidder[_auctionID], _tid);
        } else if (tokenMapping[_auctionID].tokenKind == bytes4(keccak256("ERC1155"))) {
            //0x973bb640
            address winner = auction_highestBidder[_auctionID];
            if (winner != address(0)) {
                IERC1155(_ca).safeTransferFrom(address(this), auction_highestBidder[_auctionID], _tid, 1, "");
            }
            eRC1155_tokensUnderAuction[_ca][_tid] = eRC1155_tokensUnderAuction[_ca][_tid] - 1;
        }

        emit Auction_ItemClaimed(_auctionID);
    }

    /// @notice Register an auction contract default parameters for a GBM auction. To use to save gas
    /// @param _contract The token contract the auctionned token belong to
    /// @param _initiator Set to 0 if you want to use the default value registered for the token contract
    function registerAnAuctionContract(address _contract, address _initiator) public {
        require(
            msg.sender == Ownable(_contract).owner(),
            "Only the owner of a contract can register default values for the tokens"
        );

        collection_startTime[_contract] = IGBMInitiator(_initiator).getStartTime(uint256(uint160(_contract)));
        collection_endTime[_contract] = IGBMInitiator(_initiator).getEndTime(uint256(uint160(_contract)));
        collection_hammerTimeDuration[_contract] = IGBMInitiator(_initiator).getHammerTimeDuration(
            uint256(uint160(_contract))
        );
        collection_bidDecimals[_contract] = IGBMInitiator(_initiator).getBidDecimals(uint256(uint160(_contract)));
        collection_stepMin[_contract] = IGBMInitiator(_initiator).getStepMin(uint256(uint160(_contract)));
        collection_incMin[_contract] = IGBMInitiator(_initiator).getIncMin(uint256(uint160(_contract)));
        collection_incMax[_contract] = IGBMInitiator(_initiator).getIncMax(uint256(uint160(_contract)));
        collection_bidMultiplier[_contract] = IGBMInitiator(_initiator).getBidMultiplier(uint256(uint160(_contract)));
    }

    /// @notice Allow/disallow bidding and claiming for a whole token contract address.
    /// @param _contract The token contract the auctionned token belong to
    /// @param _value True if bidding/claiming should be allowed.
    function setBiddingAllowed(address _contract, bool _value) external {
        require(msg.sender == Ownable(_contract).owner(), "Only the owner of a contract can allow/disallow bidding");
        collection_biddingAllowed[_contract] = _value;
        emit Contract_BiddingAllowed(_contract, _value);
    }

    function registerOrModifyAuctionToken(
        address _contract,
        uint256 _tokenId,
        bytes4 _tokenKind,
        address _initiator
    ) external {
        uint256 maxSlot = eRC1155_tokensIndex[_contract][_tokenId];

        for (uint256 index = 0; index < maxSlot; ) {
            uint256 id = auctionMapping[_contract][_tokenId][index];
            address highBidder = auction_highestBidder[id];
            uint256 endsAt = auction_endTime[id];
            if (highBidder == address(0) && block.timestamp > endsAt) {
                return modifyAnAuctionToken(_contract, _tokenId, _tokenKind, _initiator, index, true);
            }
            ++index;
        }

        registerAnAuctionToken(_contract, _tokenId, _tokenKind, _initiator);
    }

    /// @notice Register an auction token and emit the relevant Auction_Initialized & Auction_StartTimeUpdated events
    /// Throw if the token owner is not the GBM smart contract/supply of auctionned 1155 token is insufficient
    /// @param _contract The token contract the auctionned token belong to
    /// @param _tokenId The token ID of the token being auctionned
    /// @param _tokenKind either bytes4(keccak256("ERC721")) or bytes4(keccak256("ERC1155"))
    /// @param _initiator Set to 0 if you want to use the default value registered for the token contract (if wanting to reset to default,
    /// use an initiator sending back 0 on it's getters)
    function registerAnAuctionToken(
        address _contract,
        uint256 _tokenId,
        bytes4 _tokenKind,
        address _initiator
    ) public {
        modifyAnAuctionToken(_contract, _tokenId, _tokenKind, _initiator, 0, false);
    }

    /// @notice Register an auction token and emit the relevant Auction_Initialized & Auction_StartTimeUpdated events
    /// Throw if the token owner is not the GBM smart contract/supply of auctionned 1155 token is insufficient
    /// @param _contract The token contract the auctionned token belong to
    /// @param _tokenId The token ID of the token being auctionned
    /// @param _tokenKind either bytes4(keccak256("ERC721")) or bytes4(keccak256("ERC1155"))
    /// @param _initiator Set to 0 if you want to use the default value registered for the token contract (if wanting to reset to default,
    /// use an initiator sending back 0 on it's getters)
    /// @param _1155Index Set to 0 if dealing with an ERC-721 or registering new 1155 tokens. otherwise, set to relevant index you want to reinitialize
    /// @param _rewrite Set to true if you want to rewrite the data of an existing auction, false otherwise
    function modifyAnAuctionToken(
        address _contract,
        uint256 _tokenId,
        bytes4 _tokenKind,
        address _initiator,
        uint256 _1155Index,
        bool _rewrite
    ) public {
        require(hasRole(INITIATOR_ROLE, msg.sender), "Caller is not initiator");

        if (!_rewrite) {
            _1155Index = eRC1155_tokensIndex[_contract][_tokenId]; //_1155Index was 0 if creating new auctions
            require(
                auctionMapping[_contract][_tokenId][_1155Index] == 0,
                "The auction aleady exist for the specified token"
            );

            require(
                eRC1155_tokensUnderAuction[_contract][_tokenId] <
                    IERC1155(_contract).balanceOf(address(this), _tokenId),
                "Insufficient balance"
            );
        } else {
            require(
                auctionMapping[_contract][_tokenId][_1155Index] != 0,
                "The auction doesn't exist yet for the specified token"
            );
        }

        //Checking the kind of token being registered
        require(
            _tokenKind == bytes4(keccak256("ERC721")) || _tokenKind == bytes4(keccak256("ERC1155")),
            "registerAnAuctionToken: Only ERC1155 and ERC721 tokens are supported"
        );

        //Building the auction object
        token_representation memory newAuction;
        newAuction.contractAddress = _contract;
        newAuction.tokenId = _tokenId;
        newAuction.tokenKind = _tokenKind;

        uint256 auctionId;

        auctionId = uint256(keccak256(abi.encodePacked(_contract, _tokenId, _tokenKind, _1155Index)));

        if (!_rewrite) {
            eRC1155_tokensIndex[_contract][_tokenId] = eRC1155_tokensIndex[_contract][_tokenId] + 1;
            eRC1155_tokensUnderAuction[_contract][_tokenId] = eRC1155_tokensUnderAuction[_contract][_tokenId] + 1;
        }

        auctionMapping[_contract][_tokenId][_1155Index] = auctionId;

        tokenMapping[auctionId] = newAuction; //_auctionID => token_primaryKey

        if (_initiator != address(0x0)) {
            auction_startTime[auctionId] = IGBMInitiator(_initiator).getStartTime(auctionId);
            auction_endTime[auctionId] = IGBMInitiator(_initiator).getEndTime(auctionId);
            auction_hammerTimeDuration[auctionId] = IGBMInitiator(_initiator).getHammerTimeDuration(auctionId);
            auction_bidDecimals[auctionId] = IGBMInitiator(_initiator).getBidDecimals(auctionId);
            auction_stepMin[auctionId] = IGBMInitiator(_initiator).getStepMin(auctionId);
            auction_incMin[auctionId] = IGBMInitiator(_initiator).getIncMin(auctionId);
            auction_incMax[auctionId] = IGBMInitiator(_initiator).getIncMax(auctionId);
            auction_bidMultiplier[auctionId] = IGBMInitiator(_initiator).getBidMultiplier(auctionId);
        }

        //Event emitted when an auction is being setup
        emit Auction_Initialized(auctionId, _tokenId, _contract, _tokenKind);

        //Event emitted when the start time of an auction changes (due to admin interaction )
        emit Auction_StartTimeUpdated(auctionId, getAuctionStartTime(auctionId));
    }

    function massRegistrerERC721Each(
        address _initiator,
        address _ERC721Contract,
        uint256 _tokenIDStart,
        uint256 _tokenIDEnd
    ) external {
        while (_tokenIDStart < _tokenIDEnd) {
            registerAnAuctionToken(_ERC721Contract, _tokenIDStart, bytes4(keccak256("ERC721")), _initiator);
            _tokenIDStart++;
        }
    }

    function massRegistrerERC1155Each(
        address _initiator,
        address _ERC1155Contract,
        uint256 _tokenID,
        uint256 _indexStart,
        uint256 _indexEnd
    ) external {
        registerAnAuctionContract(_ERC1155Contract, _initiator);

        IERC1155(_ERC1155Contract).safeTransferFrom(msg.sender, address(this), _tokenID, _indexEnd - _indexStart, "");

        while (_indexStart < _indexEnd) {
            registerAnAuctionToken(_ERC1155Contract, _tokenID, bytes4(keccak256("ERC1155")), _initiator);
            _indexStart++;
        }
    }

    struct AuctionInfo {
        address owner;
        address highestBidder;
        uint256 highestBid;
        uint256 bidDecimals;
        uint256 bidMultiplier;
        uint256 hammerTime;
        uint256 incMax;
        uint256 incMin;
        uint256 stepMin;
        uint256 dueIncentives;
        uint256 startTime;
        uint256 endTime;
    }

    function getAuctionInfo(uint256 _auctionID) external view returns (AuctionInfo memory) {
        return
            AuctionInfo({
                owner: owner,
                highestBidder: getAuctionHighestBidder(_auctionID),
                highestBid: getAuctionHighestBid(_auctionID),
                bidDecimals: getAuctionBidDecimals(_auctionID),
                bidMultiplier: getAuctionBidMultiplier(_auctionID),
                hammerTime: getHammerTimeDuration(_auctionID),
                incMax: getAuctionIncMax(_auctionID),
                incMin: getAuctionIncMin(_auctionID),
                stepMin: getAuctionStepMin(_auctionID),
                dueIncentives: getAuctionDueIncentives(_auctionID),
                startTime: getAuctionStartTime(_auctionID),
                endTime: getAuctionEndTime(_auctionID)
            });
    }

    function getAuctionHighestBidder(uint256 _auctionID) public view override returns (address) {
        return auction_highestBidder[_auctionID];
    }

    function getAuctionHighestBid(uint256 _auctionID) public view override returns (uint256) {
        return auction_highestBid[_auctionID];
    }

    function getAuctionDebt(uint256 _auctionID) external view override returns (uint256) {
        return auction_debt[_auctionID];
    }

    function getAuctionDueIncentives(uint256 _auctionID) public view override returns (uint256) {
        return auction_dueIncentives[_auctionID];
    }

    function getAuctionID(address _contract, uint256 _tokenID) external view override returns (uint256) {
        return auctionMapping[_contract][_tokenID][0];
    }

    function getAuctionID(
        address _contract,
        uint256 _tokenID,
        uint256 _tokenIndex
    ) external view override returns (uint256) {
        return auctionMapping[_contract][_tokenID][_tokenIndex];
    }

    function getTokenKind(uint256 _auctionID) external view override returns (bytes4) {
        return tokenMapping[_auctionID].tokenKind;
    }

    function getTokenId(uint256 _auctionID) external view override returns (uint256) {
        return tokenMapping[_auctionID].tokenId;
    }

    function getContractAddress(uint256 _auctionID) external view override returns (address) {
        return tokenMapping[_auctionID].contractAddress;
    }

    function getAuctionStartTime(uint256 _auctionID) public view override returns (uint256) {
        if (auction_startTime[_auctionID] != 0) {
            return auction_startTime[_auctionID];
        } else {
            return collection_startTime[tokenMapping[_auctionID].contractAddress];
        }
    }

    function getAuctionEndTime(uint256 _auctionID) public view override returns (uint256) {
        if (auction_endTime[_auctionID] != 0) {
            return auction_endTime[_auctionID];
        } else {
            return collection_endTime[tokenMapping[_auctionID].contractAddress];
        }
    }

    function getHammerTimeDuration(uint256 _auctionID) public view override returns (uint256) {
        if (auction_hammerTimeDuration[_auctionID] != 0) {
            return auction_hammerTimeDuration[_auctionID];
        } else {
            return collection_hammerTimeDuration[tokenMapping[_auctionID].contractAddress];
        }
    }

    function getAuctionBidDecimals(uint256 _auctionID) public view override returns (uint256) {
        if (auction_bidDecimals[_auctionID] != 0) {
            return auction_bidDecimals[_auctionID];
        } else {
            return collection_bidDecimals[tokenMapping[_auctionID].contractAddress];
        }
    }

    function getAuctionStepMin(uint256 _auctionID) public view override returns (uint256) {
        if (auction_stepMin[_auctionID] != 0) {
            return auction_stepMin[_auctionID];
        } else {
            return collection_stepMin[tokenMapping[_auctionID].contractAddress];
        }
    }

    function getAuctionIncMin(uint256 _auctionID) public view override returns (uint256) {
        if (auction_incMin[_auctionID] != 0) {
            return auction_incMin[_auctionID];
        } else {
            return collection_incMin[tokenMapping[_auctionID].contractAddress];
        }
    }

    function getAuctionIncMax(uint256 _auctionID) public view override returns (uint256) {
        if (auction_incMax[_auctionID] != 0) {
            return auction_incMax[_auctionID];
        } else {
            return collection_incMax[tokenMapping[_auctionID].contractAddress];
        }
    }

    function getAuctionBidMultiplier(uint256 _auctionID) public view override returns (uint256) {
        if (auction_bidMultiplier[_auctionID] != 0) {
            return auction_bidMultiplier[_auctionID];
        } else {
            return collection_bidMultiplier[tokenMapping[_auctionID].contractAddress];
        }
    }

    function onERC721Received(
        address, /* _operator */
        address, /*  _from */
        uint256, /*  _tokenId */
        bytes calldata /* _data */
    ) external pure override returns (bytes4) {
        return bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"));
    }

    function onERC1155Received(
        address, /* _operator */
        address, /* _from */
        uint256, /* _id */
        uint256, /* _value */
        bytes calldata /* _data */
    ) external pure override returns (bytes4) {
        return bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"));
    }

    function onERC1155BatchReceived(
        address, /* _operator */
        address, /* _from */
        uint256[] calldata, /* _ids */
        uint256[] calldata, /* _values */
        bytes calldata /* _data */
    ) external pure override returns (bytes4) {
        return bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"));
    }

    /// @notice Calculating and setting how much payout a bidder will receive if outbid
    /// @dev Only callable internally
    function calculateIncentives(uint256 _auctionID, uint256 _newBidValue) internal view returns (uint256) {
        uint256 bidDecimals = getAuctionBidDecimals(_auctionID);
        uint256 bidIncMax = getAuctionIncMax(_auctionID);

        //Init the baseline bid we need to perform against
        uint256 baseBid = (auction_highestBid[_auctionID] * (bidDecimals + getAuctionStepMin(_auctionID))) /
            bidDecimals;

        //If no bids are present, set a basebid value of 1 to prevent divide by 0 errors
        if (baseBid == 0) {
            baseBid = 1;
        }

        //Ratio of newBid compared to expected minBid
        uint256 decimaledRatio = ((bidDecimals * getAuctionBidMultiplier(_auctionID) * (_newBidValue - baseBid)) /
            baseBid) + getAuctionIncMin(_auctionID) * bidDecimals;

        if (decimaledRatio > (bidDecimals * bidIncMax)) {
            decimaledRatio = bidDecimals * bidIncMax;
        }

        return (_newBidValue * decimaledRatio) / (bidDecimals * bidDecimals);
    }
}

File 2 of 15 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 3 of 15 : IGBM.sol
// SPDX-License-Identifier: UNLICENSED
// © Copyright 2021. Patent pending. All rights reserved. Perpetual Altruism Ltd.
pragma solidity ^0.8.17;

/// @title IGBM GBM auction interface
/// @dev See GBM.auction on how to use this contract
/// @author Guillaume Gonnaud
interface IGBM {
    //Event emitted when an auction is being setup
    event Auction_Initialized(
        uint256 indexed _auctionID,
        uint256 indexed _tokenID,
        address indexed _contractAddress,
        bytes4 _tokenKind
    );

    //Event emitted when the start time of an auction changes (due to admin interaction )
    event Auction_StartTimeUpdated(uint256 indexed _auctionID, uint256 _startTime);

    //Event emitted when the end time of an auction changes (be it due to admin interaction or bid at the end)
    event Auction_EndTimeUpdated(uint256 indexed _auctionID, uint256 _endTime);

    //Event emitted when a Bid is placed
    event Auction_BidPlaced(uint256 indexed _auctionID, address indexed _bidder, uint256 _bidAmount);

    //Event emitted when a bid is removed (due to a new bid displacing it)
    event Auction_BidRemoved(uint256 indexed _auctionID, address indexed _bidder, uint256 _bidAmount);

    //Event emitted when incentives are paid (due to a new bid rewarding the _earner bid)
    event Auction_IncentivePaid(uint256 indexed _auctionID, address indexed _earner, uint256 _incentiveAmount);

    //Event emitted when auction item is transferred to winner
    event Auction_ItemClaimed(uint256 indexed _auctionID);

    function bid(
        uint256 _auctionID,
        uint256 _bidAmount,
        uint256 _highestBid
    ) external;

    function claim(uint256 _auctionID) external;

    function owner() external returns (address);

    function ERC20Currency() external returns (address);

    function getAuctionID(address _contract, uint256 _tokenID) external view returns (uint256);

    function getAuctionID(
        address _contract,
        uint256 _tokenID,
        uint256 _tokenIndex
    ) external view returns (uint256);

    function getTokenId(uint256 _auctionID) external view returns (uint256);

    function getContractAddress(uint256 _auctionID) external view returns (address);

    function getTokenKind(uint256 _auctionID) external view returns (bytes4);

    function getAuctionHighestBidder(uint256 _auctionID) external view returns (address);

    function getAuctionHighestBid(uint256 _auctionID) external view returns (uint256);

    function getAuctionDebt(uint256 _auctionID) external view returns (uint256);

    function getAuctionDueIncentives(uint256 _auctionID) external view returns (uint256);

    function getAuctionStartTime(uint256 _auctionID) external view returns (uint256);

    function getAuctionEndTime(uint256 _auctionID) external view returns (uint256);

    function getHammerTimeDuration(uint256 _auctionID) external view returns (uint256);

    function getAuctionBidDecimals(uint256 _auctionID) external view returns (uint256);

    function getAuctionStepMin(uint256 _auctionID) external view returns (uint256);

    function getAuctionIncMin(uint256 _auctionID) external view returns (uint256);

    function getAuctionIncMax(uint256 _auctionID) external view returns (uint256);

    function getAuctionBidMultiplier(uint256 _auctionID) external view returns (uint256);
}

File 4 of 15 : IGBMInitiator.sol
// SPDX-License-Identifier: UNLICENSED
// © Copyright 2021. Patent pending. All rights reserved. Perpetual Altruism Ltd.
pragma solidity ^0.8.17;

/// @title IGBMInitiator: GBM Auction initiator interface.
/// @dev Will be called when initializing GBM auctions on the main GBM contract.
/// @author Guillaume Gonnaud
interface IGBMInitiator {
    // Auction id either = the contract token address cast as uint256 or
    // auctionId = uint256(keccak256(abi.encodePacked(_contract, _tokenId, _tokenKind)));  <= ERC721
    // auctionId = uint256(keccak256(abi.encodePacked(_contract, _tokenId, _tokenKind, _1155Index))); <= ERC1155

    function getStartTime(uint256 _auctionId) external view returns (uint256);

    function getEndTime(uint256 _auctionId) external view returns (uint256);

    function getHammerTimeDuration(uint256 _auctionId) external view returns (uint256);

    function getBidDecimals(uint256 _auctionId) external view returns (uint256);

    function getStepMin(uint256 _auctionId) external view returns (uint256);

    function getIncMin(uint256 _auctionId) external view returns (uint256);

    function getIncMax(uint256 _auctionId) external view returns (uint256);

    function getBidMultiplier(uint256 _auctionId) external view returns (uint256);
}

File 5 of 15 : IERC20.sol
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.17;

/// @title ERC20 interface
/// @dev https://github.com/ethereum/EIPs/issues/20
interface IERC20 {
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);

    function totalSupply() external view returns (uint256);

    function balanceOf(address who) external view returns (uint256);

    function allowance(address owner, address spender) external view returns (uint256);

    function transfer(address to, uint256 value) external returns (bool);

    function approve(address spender, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);
}

File 6 of 15 : IERC721.sol
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.17;

/// @title ERC-721 Non-Fungible Token Standard
/// @dev See https://eips.ethereum.org/EIPS/eip-721
///  Note: the ERC-165 identifier for this interface is 0x80ac58cd.
/* is ERC165 */
interface IERC721 {
    /// @dev This emits when ownership of any NFT changes by any mechanism.
    ///  This event emits when NFTs are created (`from` == 0) and destroyed
    ///  (`to` == 0). Exception: during contract creation, any number of NFTs
    ///  may be created and assigned without emitting Transfer. At the time of
    ///  any transfer, the approved address for that NFT (if any) is reset to none.
    event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);

    /// @dev This emits when the approved address for an NFT is changed or
    ///  reaffirmed. The zero address indicates there is no approved address.
    ///  When a Transfer event emits, this also indicates that the approved
    ///  address for that NFT (if any) is reset to none.
    event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);

    /// @dev This emits when an operator is enabled or disabled for an owner.
    ///  The operator can manage all NFTs of the owner.
    event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);

    /// @notice Count all NFTs assigned to an owner
    /// @dev NFTs assigned to the zero address are considered invalid, and this
    ///  function throws for queries about the zero address.
    /// @param _owner An address for whom to query the balance
    /// @return The number of NFTs owned by `_owner`, possibly zero
    function balanceOf(address _owner) external view returns (uint256);

    /// @notice Find the owner of an NFT
    /// @dev NFTs assigned to zero address are considered invalid, and queries
    ///  about them do throw.
    /// @param _tokenId The identifier for an NFT
    /// @return The address of the owner of the NFT
    function ownerOf(uint256 _tokenId) external view returns (address);

    /// @notice Transfers the ownership of an NFT from one address to another address
    /// @dev Throws unless `msg.sender` is the current owner, an authorized
    ///  operator, or the approved address for this NFT. Throws if `_from` is
    ///  not the current owner. Throws if `_to` is the zero address. Throws if
    ///  `_tokenId` is not a valid NFT. When transfer is complete, this function
    ///  checks if `_to` is a smart contract (code size > 0). If so, it calls
    ///  `onERC721Received` on `_to` and throws if the return value is not
    ///  `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`.
    /// @param _from The current owner of the NFT
    /// @param _to The new owner
    /// @param _tokenId The NFT to transfer
    /// @param data Additional data with no specified format, sent in call to `_to`
    function safeTransferFrom(
        address _from,
        address _to,
        uint256 _tokenId,
        bytes calldata data
    ) external payable;

    /// @notice Transfers the ownership of an NFT from one address to another address
    /// @dev This works identically to the other function with an extra data parameter,
    ///  except this function just sets data to "".
    /// @param _from The current owner of the NFT
    /// @param _to The new owner
    /// @param _tokenId The NFT to transfer
    function safeTransferFrom(
        address _from,
        address _to,
        uint256 _tokenId
    ) external payable;

    /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE
    ///  TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE
    ///  THEY MAY BE PERMANENTLY LOST
    /// @dev Throws unless `msg.sender` is the current owner, an authorized
    ///  operator, or the approved address for this NFT. Throws if `_from` is
    ///  not the current owner. Throws if `_to` is the zero address. Throws if
    ///  `_tokenId` is not a valid NFT.
    /// @param _from The current owner of the NFT
    /// @param _to The new owner
    /// @param _tokenId The NFT to transfer
    function transferFrom(
        address _from,
        address _to,
        uint256 _tokenId
    ) external payable;

    /// @notice Change or reaffirm the approved address for an NFT
    /// @dev The zero address indicates there is no approved address.
    ///  Throws unless `msg.sender` is the current NFT owner, or an authorized
    ///  operator of the current owner.
    /// @param _approved The new approved NFT controller
    /// @param _tokenId The NFT to approve
    function approve(address _approved, uint256 _tokenId) external payable;

    /// @notice Enable or disable approval for a third party ("operator") to manage
    ///  all of `msg.sender`'s assets
    /// @dev Emits the ApprovalForAll event. The contract MUST allow
    ///  multiple operators per owner.
    /// @param _operator Address to add to the set of authorized operators
    /// @param _approved True if the operator is approved, false to revoke approval
    function setApprovalForAll(address _operator, bool _approved) external;

    /// @notice Get the approved address for a single NFT
    /// @dev Throws if `_tokenId` is not a valid NFT.
    /// @param _tokenId The NFT to find the approved address for
    /// @return The approved address for this NFT, or the zero address if there is none
    function getApproved(uint256 _tokenId) external view returns (address);

    /// @notice Query if an address is an authorized operator for another address
    /// @param _owner The address that owns the NFTs
    /// @param _operator The address that acts on behalf of the owner
    /// @return True if `_operator` is an approved operator for `_owner`, false otherwise
    function isApprovedForAll(address _owner, address _operator) external view returns (bool);
}

File 7 of 15 : IERC721TokenReceiver.sol
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.17;

/// @title IERC721TokenReceiver
/// @dev See https://eips.ethereum.org/EIPS/eip-721. Note: the ERC-165 identifier for this interface is 0x150b7a02.
interface IERC721TokenReceiver {
    /// @notice Handle the receipt of an NFT
    /// @dev The ERC721 smart contract calls this function on the recipient
    ///  after a `transfer`. This function MAY throw to revert and reject the
    ///  transfer. Return of other than the magic value MUST result in the
    ///  transaction being reverted.
    ///  Note: the contract address is always the message sender.
    /// @param _operator The address which called `safeTransferFrom` function
    /// @param _from The address which previously owned the token
    /// @param _tokenId The NFT identifier which is being transferred
    /// @param _data Additional data with no specified format
    /// @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
    ///  unless throwing
    function onERC721Received(
        address _operator,
        address _from,
        uint256 _tokenId,
        bytes calldata _data
    ) external returns (bytes4);
}

File 8 of 15 : IERC1155.sol
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.17;

/// @title ERC-1155 Multi Token Standard
/// @dev ee https://eips.ethereum.org/EIPS/eip-1155
///  The ERC-165 identifier for this interface is 0xd9b67a26.
/* is ERC165 */
interface IERC1155 {
    /**
        @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard).
        The `_operator` argument MUST be the address of an account/contract that is approved to make the transfer (SHOULD be msg.sender).
        The `_from` argument MUST be the address of the holder whose balance is decreased.
        The `_to` argument MUST be the address of the recipient whose balance is increased.
        The `_id` argument MUST be the token type being transferred.
        The `_value` argument MUST be the number of tokens the holder balance is decreased by and match what the recipient balance is increased by.
        When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address).
        When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address).
    */
    event TransferSingle(
        address indexed _operator,
        address indexed _from,
        address indexed _to,
        uint256 _id,
        uint256 _value
    );

    /**
        @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard).
        The `_operator` argument MUST be the address of an account/contract that is approved to make the transfer (SHOULD be msg.sender).
        The `_from` argument MUST be the address of the holder whose balance is decreased.
        The `_to` argument MUST be the address of the recipient whose balance is increased.
        The `_ids` argument MUST be the list of tokens being transferred.
        The `_values` argument MUST be the list of number of tokens (matching the list and order of tokens specified in _ids) the holder balance is decreased by and match what the recipient balance is increased by.
        When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address).
        When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address).
    */
    event TransferBatch(
        address indexed _operator,
        address indexed _from,
        address indexed _to,
        uint256[] _ids,
        uint256[] _values
    );

    /**
        @dev MUST emit when approval for a second party/operator address to manage all tokens for an owner address is enabled or disabled (absence of an event assumes disabled).
    */
    event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);

    /**
        @dev MUST emit when the URI is updated for a token ID.
        URIs are defined in RFC 3986.
        The URI MUST point to a JSON file that conforms to the "ERC-1155 Metadata URI JSON Schema".
    */
    event URI(string _value, uint256 indexed _id);

    /**
        @notice Transfers `_value` amount of an `_id` from the `_from` address to the `_to` address specified (with safety call).
        @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard).
        MUST revert if `_to` is the zero address.
        MUST revert if balance of holder for token `_id` is lower than the `_value` sent.
        MUST revert on any other error.
        MUST emit the `TransferSingle` event to reflect the balance change (see "Safe Transfer Rules" section of the standard).
        After the above conditions are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call `onERC1155Received` on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard).
        @param _from    Source address
        @param _to      Target address
        @param _id      ID of the token type
        @param _value   Transfer amount
        @param _data    Additional data with no specified format, MUST be sent unaltered in call to `onERC1155Received` on `_to`
    */
    function safeTransferFrom(
        address _from,
        address _to,
        uint256 _id,
        uint256 _value,
        bytes calldata _data
    ) external;

    /**
        @notice Transfers `_values` amount(s) of `_ids` from the `_from` address to the `_to` address specified (with safety call).
        @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard).
        MUST revert if `_to` is the zero address.
        MUST revert if length of `_ids` is not the same as length of `_values`.
        MUST revert if any of the balance(s) of the holder(s) for token(s) in `_ids` is lower than the respective amount(s) in `_values` sent to the recipient.
        MUST revert on any other error.
        MUST emit `TransferSingle` or `TransferBatch` event(s) such that all the balance changes are reflected (see "Safe Transfer Rules" section of the standard).
        Balance changes and events MUST follow the ordering of the arrays (_ids[0]/_values[0] before _ids[1]/_values[1], etc).
        After the above conditions for the transfer(s) in the batch are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call the relevant `ERC1155TokenReceiver` hook(s) on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard).
        @param _from    Source address
        @param _to      Target address
        @param _ids     IDs of each token type (order and length must match _values array)
        @param _values  Transfer amounts per token type (order and length must match _ids array)
        @param _data    Additional data with no specified format, MUST be sent unaltered in call to the `ERC1155TokenReceiver` hook(s) on `_to`
    */
    function safeBatchTransferFrom(
        address _from,
        address _to,
        uint256[] calldata _ids,
        uint256[] calldata _values,
        bytes calldata _data
    ) external;

    /**
        @notice Get the balance of an account's tokens.
        @param _owner  The address of the token holder
        @param _id     ID of the token
        @return        The _owner's balance of the token type requested
     */
    function balanceOf(address _owner, uint256 _id) external view returns (uint256);

    /**
        @notice Get the balance of multiple account/token pairs
        @param _owners The addresses of the token holders
        @param _ids    ID of the tokens
        @return        The _owner's balance of the token types requested (i.e. balance for each (owner, id) pair)
     */
    function balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids)
        external
        view
        returns (uint256[] memory);

    /**
        @notice Enable or disable approval for a third party ("operator") to manage all of the caller's tokens.
        @dev MUST emit the ApprovalForAll event on success.
        @param _operator  Address to add to the set of authorized operators
        @param _approved  True if the operator is approved, false to revoke approval
    */
    function setApprovalForAll(address _operator, bool _approved) external;

    /**
        @notice Queries the approval status of an operator for a given owner.
        @param _owner     The owner of the tokens
        @param _operator  Address of authorized operator
        @return           True if the operator is approved, false if not
    */
    function isApprovedForAll(address _owner, address _operator) external view returns (bool);
}

File 9 of 15 : IERC1155TokenReceiver.sol
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.17;

/**
    Note: The ERC-165 identifier for this interface is 0x4e2312e0.
*/
interface IERC1155TokenReceiver {
    /**
        @notice Handle the receipt of a single ERC1155 token type.
        @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeTransferFrom` after the balance has been updated.
        This function MUST return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61) if it accepts the transfer.
        This function MUST revert if it rejects the transfer.
        Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.
        @param _operator  The address which initiated the transfer (i.e. msg.sender)
        @param _from      The address which previously owned the token
        @param _id        The ID of the token being transferred
        @param _value     The amount of tokens being transferred
        @param _data      Additional data with no specified format
        @return           `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
    */
    function onERC1155Received(
        address _operator,
        address _from,
        uint256 _id,
        uint256 _value,
        bytes calldata _data
    ) external returns (bytes4);

    /**
        @notice Handle the receipt of multiple ERC1155 token types.
        @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeBatchTransferFrom` after the balances have been updated.
        This function MUST return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81) if it accepts the transfer(s).
        This function MUST revert if it rejects the transfer(s).
        Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.
        @param _operator  The address which initiated the batch transfer (i.e. msg.sender)
        @param _from      The address which previously owned the token
        @param _ids       An array containing ids of each token being transferred (order and length must match _values array)
        @param _values    An array containing amounts of each token being transferred (order and length must match _ids array)
        @param _data      Additional data with no specified format
        @return           `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
    */
    function onERC1155BatchReceived(
        address _operator,
        address _from,
        uint256[] calldata _ids,
        uint256[] calldata _values,
        bytes calldata _data
    ) external returns (bytes4);
}

File 10 of 15 : Ownable.sol
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.17;

interface Ownable {
    function owner() external returns (address);
}

File 11 of 15 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 12 of 15 : Context.sol
// 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;
    }
}

File 13 of 15 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 14 of 15 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 15 of 15 : 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);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_ERC20Currency","type":"address"},{"internalType":"address","name":"_initiator","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_auctionID","type":"uint256"},{"indexed":true,"internalType":"address","name":"_bidder","type":"address"},{"indexed":false,"internalType":"uint256","name":"_bidAmount","type":"uint256"}],"name":"Auction_BidPlaced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_auctionID","type":"uint256"},{"indexed":true,"internalType":"address","name":"_bidder","type":"address"},{"indexed":false,"internalType":"uint256","name":"_bidAmount","type":"uint256"}],"name":"Auction_BidRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_auctionID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_endTime","type":"uint256"}],"name":"Auction_EndTimeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_auctionID","type":"uint256"},{"indexed":true,"internalType":"address","name":"_earner","type":"address"},{"indexed":false,"internalType":"uint256","name":"_incentiveAmount","type":"uint256"}],"name":"Auction_IncentivePaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_auctionID","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_tokenID","type":"uint256"},{"indexed":true,"internalType":"address","name":"_contractAddress","type":"address"},{"indexed":false,"internalType":"bytes4","name":"_tokenKind","type":"bytes4"}],"name":"Auction_Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_auctionID","type":"uint256"}],"name":"Auction_ItemClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_auctionID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_startTime","type":"uint256"}],"name":"Auction_StartTimeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_contract","type":"address"},{"indexed":false,"internalType":"bool","name":"_biddingAllowed","type":"bool"}],"name":"Contract_BiddingAllowed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ERC20Currency","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INITIATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"auction_highestBidder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionID","type":"uint256"},{"internalType":"uint256","name":"_bidAmount","type":"uint256"},{"internalType":"uint256","name":"_highestBid","type":"uint256"}],"name":"bid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionID","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"eRC1155_tokensIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"eRC1155_tokensUnderAuction","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionID","type":"uint256"}],"name":"getAuctionBidDecimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionID","type":"uint256"}],"name":"getAuctionBidMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionID","type":"uint256"}],"name":"getAuctionDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionID","type":"uint256"}],"name":"getAuctionDueIncentives","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionID","type":"uint256"}],"name":"getAuctionEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionID","type":"uint256"}],"name":"getAuctionHighestBid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionID","type":"uint256"}],"name":"getAuctionHighestBidder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint256","name":"_tokenID","type":"uint256"}],"name":"getAuctionID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint256","name":"_tokenID","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"getAuctionID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionID","type":"uint256"}],"name":"getAuctionIncMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionID","type":"uint256"}],"name":"getAuctionIncMin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionID","type":"uint256"}],"name":"getAuctionInfo","outputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"highestBidder","type":"address"},{"internalType":"uint256","name":"highestBid","type":"uint256"},{"internalType":"uint256","name":"bidDecimals","type":"uint256"},{"internalType":"uint256","name":"bidMultiplier","type":"uint256"},{"internalType":"uint256","name":"hammerTime","type":"uint256"},{"internalType":"uint256","name":"incMax","type":"uint256"},{"internalType":"uint256","name":"incMin","type":"uint256"},{"internalType":"uint256","name":"stepMin","type":"uint256"},{"internalType":"uint256","name":"dueIncentives","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"internalType":"struct GBM.AuctionInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionID","type":"uint256"}],"name":"getAuctionStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionID","type":"uint256"}],"name":"getAuctionStepMin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionID","type":"uint256"}],"name":"getContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionID","type":"uint256"}],"name":"getHammerTimeDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionID","type":"uint256"}],"name":"getTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionID","type":"uint256"}],"name":"getTokenKind","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_initiator","type":"address"},{"internalType":"address","name":"_ERC1155Contract","type":"address"},{"internalType":"uint256","name":"_tokenID","type":"uint256"},{"internalType":"uint256","name":"_indexStart","type":"uint256"},{"internalType":"uint256","name":"_indexEnd","type":"uint256"}],"name":"massRegistrerERC1155Each","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_initiator","type":"address"},{"internalType":"address","name":"_ERC721Contract","type":"address"},{"internalType":"uint256","name":"_tokenIDStart","type":"uint256"},{"internalType":"uint256","name":"_tokenIDEnd","type":"uint256"}],"name":"massRegistrerERC721Each","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes4","name":"_tokenKind","type":"bytes4"},{"internalType":"address","name":"_initiator","type":"address"},{"internalType":"uint256","name":"_1155Index","type":"uint256"},{"internalType":"bool","name":"_rewrite","type":"bool"}],"name":"modifyAnAuctionToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"address","name":"_initiator","type":"address"}],"name":"registerAnAuctionContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes4","name":"_tokenKind","type":"bytes4"},{"internalType":"address","name":"_initiator","type":"address"}],"name":"registerAnAuctionToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes4","name":"_tokenKind","type":"bytes4"},{"internalType":"address","name":"_initiator","type":"address"}],"name":"registerOrModifyAuctionToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"bool","name":"_value","type":"bool"}],"name":"setBiddingAllowed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b506040516200364938038062003649833981016040819052620000349162000168565b60018054336001600160a01b03199182168117909255600280549091166001600160a01b0385161790556200006c90600090620000aa565b620000876000805160206200362983398151915233620000aa565b620000a26000805160206200362983398151915282620000aa565b5050620001a0565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000147576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001063390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b80516001600160a01b03811681146200016357600080fd5b919050565b600080604083850312156200017c57600080fd5b62000187836200014b565b915062000197602084016200014b565b90509250929050565b61347980620001b06000396000f3fe608060405234801561001057600080fd5b50600436106102695760003560e01c8063930e79f111610151578063d5a0709d116100c3578063e65c74a211610087578063e65c74a2146106ba578063ef8c55fd146106cd578063f0300f28146106e0578063f23a6e6114610709578063f5de100014610742578063fc3fc4ed1461078357600080fd5b8063d5a0709d14610645578063da081c9414610658578063db1457011461066b578063dfab114b1461067e578063e07bc69c146106a757600080fd5b8063bc197c8111610115578063bc197c8114610586578063c26e748c146105c1578063c340f019146105e1578063c9796e9d146105f4578063cb7020e41461061f578063d547741f1461063257600080fd5b8063930e79f11461051c578063a217fddf1461052f578063aefa7d9814610537578063b3cbc3b414610560578063b3f780501461057357600080fd5b806336568abe116101ea5780636b9a894e116101ae5780636b9a894e1461046d57806380b2599b1461048d5780638da5cb5b146104b857806390f0e02d146104e3578063919e84f5146104f657806391d148541461050957600080fd5b806336568abe146103e3578063379607f5146103f65780633f21cf811461040957806350d265d41461041c57806364efa1fd1461042f57600080fd5b8063150b7a0211610231578063150b7a021461033b5780631990e97914610373578063248a9ca31461039a5780632ac9bf09146103bd5780632f2ff15d146103d057600080fd5b806301ffc9a71461026e57806303ea66a41461029657806304af729c146102c45780630facebea146102d957806314ff5ea314610318575b600080fd5b61028161027c366004612c77565b6107a3565b60405190151581526020015b60405180910390f35b6102b66102a4366004612c92565b60009081526005602052604090205490565b60405190815260200161028d565b6102d76102d2366004612cc3565b6107da565b005b6102ff6102e7366004612c92565b60009081526003602052604090206002015460e01b90565b6040516001600160e01b0319909116815260200161028d565b6102b6610326366004612c92565b60009081526003602052604090206001015490565b6102ff610349366004612d5d565b7f150b7a023d4804d13e8c85fb27262cb750cf6ba9f9dd3bb30d90f482ceeb4b1f95945050505050565b6102b67f6b8b15f1c11543d8280deaa7c24d12fffba6a357e4428e8c43e4234790186bff81565b6102b66103a8366004612c92565b60009081526020819052604090206001015490565b6102d76103cb366004612dd0565b6107ef565b6102d76103de366004612dfc565b610e23565b6102d76103f1366004612dfc565b610e4e565b6102d7610404366004612c92565b610ecc565b6102b6610417366004612c92565b6112e3565b6102d761042a366004612e3a565b611338565b6102b661043d366004612e68565b6001600160a01b039190911660009081526004602090815260408083209383529281528282208280529052205490565b6102b661047b366004612c92565b60009081526006602052604090205490565b6102b661049b366004612e68565b601b60209081526000928352604080842090915290825290205481565b6001546104cb906001600160a01b031681565b6040516001600160a01b03909116815260200161028d565b6102d76104f1366004612cc3565b611481565b6102b6610504366004612c92565b611545565b610281610517366004612dfc565b611595565b6102b661052a366004612c92565b6115be565b6102b6600081565b6104cb610545366004612c92565b6000908152600360205260409020546001600160a01b031690565b6102d761056e366004612e94565b61160e565b6102d7610581366004612eda565b611654565b6102ff610594366004612f4d565b7fbc197c819b3e337a6f9652dd10becd7eef83032af3b9d958d3d42f669414662198975050505050505050565b6102b66105cf366004612c92565b60009081526008602052604090205490565b6102d76105ef36600461300c565b611b58565b6102b6610602366004612e68565b601c60209081526000928352604080842090915290825290205481565b6102b661062d366004612c92565b612494565b6102d7610640366004612dfc565b6124e4565b6002546104cb906001600160a01b031681565b6102b6610666366004612c92565b61250a565b6102b6610679366004612c92565b61255a565b6104cb61068c366004612c92565b6000908152600760205260409020546001600160a01b031690565b6102b66106b5366004612c92565b6125aa565b6102d76106c836600461307a565b6125fa565b6102b66106db366004612c92565b6126b8565b6104cb6106ee366004612c92565b6007602052600090815260409020546001600160a01b031681565b6102ff6107173660046130cb565b7ff23a6e612e1ff4830e658fe43f4e3cb4a5f8170bd5d9e69fb5d7a7fa9e4fdf979695505050505050565b6102b6610750366004613147565b6001600160a01b038316600090815260046020908152604080832085845282528083208484529091529020549392505050565b610796610791366004612c92565b612708565b60405161028d919061317c565b60006001600160e01b03198216637965db0b60e01b14806107d457506301ffc9a760e01b6001600160e01b03198316145b92915050565b6107e984848484600080611b58565b50505050565b6000838152600360209081526040808320546001600160a01b03168352600990915290205460ff166108765760405162461bcd60e51b815260206004820152602560248201527f6269643a2062696464696e672069732063757272656e746c79206e6f7420616c6044820152641b1bddd95960da1b60648201526084015b60405180910390fd5b600182116108c65760405162461bcd60e51b815260206004820152601b60248201527f6269643a205f626964416d6f756e742063616e6e6f7420626520300000000000604482015260640161086d565b600083815260086020526040902054811461095d5760405162461bcd60e51b815260206004820152604b60248201527f6269643a2063757272656e7420686967686573742062696420646f206e6f742060448201527f6d6174636820746865207375626d6974746564207472616e73616374696f6e2060648201526a17da1a59da195cdd109a5960aa1b608482015260a40161086d565b4261096784611545565b1115801561097c575061097983611545565b15155b6109c85760405162461bcd60e51b815260206004820181905260248201527f6269643a2041756374696f6e20686173206e6f74207374617274656420796574604482015260640161086d565b426109d2846115be565b1015610a205760405162461bcd60e51b815260206004820152601e60248201527f6269643a2041756374696f6e2068617320616c726561647920656e6465640000604482015260640161086d565b808211610a875760405162461bcd60e51b815260206004820152602f60248201527f6269643a205f626964416d6f756e74206d75737420626520686967686572207460448201526e1a185b8817da1a59da195cdd109a59608a1b606482015260840161086d565b610a90836112e3565b610a9a9083613231565b610aa3846125aa565b610aac856112e3565b610ab69190613248565b610ac09083613231565b1115610b205760405162461bcd60e51b815260206004820152602960248201527f6269643a205f626964416d6f756e74206d757374206d65657420746865206d696044820152681b9a5b5d5b48189a5960ba1b606482015260840161086d565b6002546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610b77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9b919061325b565b50610ba583612494565b610baf9042613248565b610bb8846115be565b1015610c1e57610bc783612494565b610bd19042613248565b6000848152600b6020526040908190208290555184917f2e7f50c8a01968bd8edfe9b3ae46a4d0fa3ce89e533d76245c2684ee9882c0cb91610c1591815260200190565b60405180910390a25b600083815260056020908152604080832054600783528184205460089093529220546001600160a01b03909116908115610c9757816001600160a01b0316867ffff24e92e1cbce6e08fa0c957732709b2be79be2ce26c732bcfae1cc368356e583604051610c8e91815260200190565b60405180910390a35b8215610d0a57600086815260066020526040902054610cb7908490613248565b60008781526006602090815260409182902092909255518481526001600160a01b0384169188917fc6330f2f35039b6e7bcfdeb0c2e959d355b88d8c2292ca4a4c42f514cc958be3910160405180910390a35b604051858152339087907f1cd77ec6c10f614681f30c7aa33ebc645b4d597aaf7039f6210e71d0e15c91819060200160405180910390a3610d4b8686612872565b6000878152600560209081526040808320939093556007815282822080546001600160a01b031916331790556008905220859055610d898382613248565b15610e1b576002546001600160a01b031663a9059cbb83610daa8685613248565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610df5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e19919061325b565b505b505050505050565b600082815260208190526040902060010154610e3f813361296f565b610e4983836129d3565b505050565b6001600160a01b0381163314610ebe5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161086d565b610ec88282612a57565b5050565b600081815260036020908152604080832080546001909101546001600160a01b03909116808552600990935292205490919060ff16610f5e5760405162461bcd60e51b815260206004820152602860248201527f636c61696d3a20436c61696d696e672069732063757272656e746c79206e6f7460448201526708185b1b1bddd95960c21b606482015260840161086d565b42610f68846115be565b10610fb55760405162461bcd60e51b815260206004820181905260248201527f636c61696d3a2041756374696f6e20686173206e6f742079657420656e646564604482015260640161086d565b6000838152601a602052604090205460ff16156110285760405162461bcd60e51b815260206004820152602b60248201527f636c61696d3a20746869732061756374696f6e2068617320616c72656479206260448201526a19595b8818db185a5b595960aa1b606482015260840161086d565b6000838152601a60209081526040808320805460ff1916600190811790915560025490546006845282852054600890945291909320546001600160a01b039384169363a9059cbb9392169161107c91613278565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156110c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110eb919061325b565b506000838152600360205260409020600201546346296f5d60e11b60e09190911b6001600160e01b031916016111995760008381526007602052604090819020549051632142170760e11b81523060048201526001600160a01b03918216602482015260448101839052908316906342842e0e90606401600060405180830381600087803b15801561117c57600080fd5b505af1158015611190573d6000803e3d6000fd5b505050506112b3565b6000838152600360205260409020600201546301a3112760e61b60e09190911b6001600160e01b031916016112b3576000838152600760205260409020546001600160a01b0316801561125d5760008481526007602052604090819020549051637921219560e11b81526001600160a01b038086169263f242432a9261122a9230921690879060019060040161328b565b600060405180830381600087803b15801561124457600080fd5b505af1158015611258573d6000803e3d6000fd5b505050505b6001600160a01b0383166000908152601c6020908152604080832085845290915290205461128d90600190613278565b6001600160a01b0384166000908152601c60209081526040808320868452909152902055505b60405183907f36c817b01bdbc20b542bcc10ca808780e14aa4c1043a66966a7692de51df511390600090a2505050565b6000818152600d60205260408120541561130a57506000908152600d602052604090205490565b506000908152600360209081526040808320546001600160a01b03168352601590915290205490565b919050565b816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015611378573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139c91906132c3565b6001600160a01b0316336001600160a01b0316146114225760405162461bcd60e51b815260206004820152603760248201527f4f6e6c7920746865206f776e6572206f66206120636f6e74726163742063616e60448201527f20616c6c6f772f646973616c6c6f772062696464696e67000000000000000000606482015260840161086d565b6001600160a01b038216600081815260096020908152604091829020805460ff191685151590811790915591519182527f0b4ea68d808f372a5097f85b16d5e69e050d94a33668fd980f8876593bb8e571910160405180910390a25050565b6001600160a01b0384166000908152601b60209081526040808320868452909152812054905b81811015611531576001600160a01b03808716600090815260046020908152604080832089845282528083208584528252808320548084526007835281842054600b909352922054919216908115801561150057508042115b1561151e5761151489898989886001611b58565b50505050506107e9565b611527846132e0565b93505050506114a7565b5061153e858585856107da565b5050505050565b6000818152600a60205260408120541561156c57506000908152600a602052604090205490565b506000908152600360209081526040808320546001600160a01b03168352601290915290205490565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000818152600b6020526040812054156115e557506000908152600b602052604090205490565b506000908152600360209081526040808320546001600160a01b03168352601390915290205490565b808210156107e95761164283837f73ad2146b3d3a286642c794379d750360a2d53a3459a11b3e5d6cc900f55f44a876107da565b8161164c816132e0565b92505061160e565b816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015611694573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116b891906132c3565b6001600160a01b0316336001600160a01b03161461174e5760405162461bcd60e51b815260206004820152604760248201527f4f6e6c7920746865206f776e6572206f66206120636f6e74726163742063616e60448201527f2072656769737465722064656661756c742076616c75657320666f722074686560648201526620746f6b656e7360c81b608482015260a40161086d565b604051635e15f0df60e11b81526001600160a01b03838116600483015282169063bc2be1be90602401602060405180830381865afa158015611794573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b891906132f9565b6001600160a01b0383811660008181526012602052604090819020939093559151639067b67760e01b81526004810192909252821690639067b67790602401602060405180830381865afa158015611814573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183891906132f9565b6001600160a01b03838116600081815260136020526040908190209390935591516332dc083960e21b8152600481019290925282169063cb7020e490602401602060405180830381865afa158015611894573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118b891906132f9565b6001600160a01b03838116600081815260146020526040908190209390935591516343a648db60e11b8152600481019290925282169063874c91b690602401602060405180830381865afa158015611914573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061193891906132f9565b6001600160a01b0383811660008181526015602052604090819020939093559151632ec461c960e01b81526004810192909252821690632ec461c990602401602060405180830381865afa158015611994573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b891906132f9565b6001600160a01b0383811660008181526016602052604090819020939093559151630e798fc760e11b81526004810192909252821690631cf31f8e90602401602060405180830381865afa158015611a14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3891906132f9565b6001600160a01b03838116600081815260176020526040908190209390935591516331a200ad60e21b8152600481019290925282169063c68802b490602401602060405180830381865afa158015611a94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab891906132f9565b6001600160a01b0383811660008181526018602052604090819020939093559151633f18b21d60e21b8152600481019290925282169063fc62c87490602401602060405180830381865afa158015611b14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b3891906132f9565b6001600160a01b0390921660009081526019602052604090209190915550565b611b827f6b8b15f1c11543d8280deaa7c24d12fffba6a357e4428e8c43e4234790186bff33611595565b611bce5760405162461bcd60e51b815260206004820152601760248201527f43616c6c6572206973206e6f7420696e69746961746f72000000000000000000604482015260640161086d565b80611d55576001600160a01b0386166000818152601b6020908152604080832089845282528083205493835260048252808320898452825280832084845290915290205490925015611c7b5760405162461bcd60e51b815260206004820152603060248201527f5468652061756374696f6e20616c6561647920657869737420666f722074686560448201526f1039b832b1b4b334b2b2103a37b5b2b760811b606482015260840161086d565b604051627eeac760e11b8152306004820152602481018690526001600160a01b0387169062fdd58e90604401602060405180830381865afa158015611cc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ce891906132f9565b6001600160a01b0387166000908152601c6020908152604080832089845290915290205410611d505760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b604482015260640161086d565b611ded565b6001600160a01b038616600090815260046020908152604080832088845282528083208584529091528120549003611ded5760405162461bcd60e51b815260206004820152603560248201527f5468652061756374696f6e20646f65736e27742065786973742079657420666f60448201527439103a34329039b832b1b4b334b2b2103a37b5b2b760591b606482015260840161086d565b6001600160e01b031984166339d690a360e11b1480611e1c57506001600160e01b0319841663025ceed960e61b145b611e9c5760405162461bcd60e51b8152602060048201526044602482018190527f7265676973746572416e41756374696f6e546f6b656e3a204f6e6c7920455243908201527f3131353520616e642045524337323120746f6b656e732061726520737570706f6064820152631c9d195960e21b608482015260a40161086d565b60408051606080820183526001600160a01b038916825260208083018990526001600160e01b031988168385018190528451928b901b6bffffffffffffffffffffffff191683830152603483018a905260548301526058808301879052845180840390910181526078909201909352805192019190912082611fb0576001600160a01b0388166000908152601b602090815260408083208a8452909152902054611f47906001613248565b6001600160a01b0389166000818152601b602090815260408083208c8452825280832094909455918152601c82528281208a82529091522054611f8b906001613248565b6001600160a01b0389166000908152601c602090815260408083208b84529091529020555b6001600160a01b0388811660009081526004602090815260408083208b8452825280832088845282528083208590558483526003825291829020855181546001600160a01b031916908516178155908501516001820155908401516002909101805463ffffffff191660e09290921c91909117905585161561240257604051635e15f0df60e11b8152600481018290526001600160a01b0386169063bc2be1be90602401602060405180830381865afa158015612071573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061209591906132f9565b6000828152600a6020526040908190209190915551639067b67760e01b8152600481018290526001600160a01b03861690639067b67790602401602060405180830381865afa1580156120ec573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061211091906132f9565b6000828152600b60205260409081902091909155516332dc083960e21b8152600481018290526001600160a01b0386169063cb7020e490602401602060405180830381865afa158015612167573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061218b91906132f9565b6000828152600c60205260409081902091909155516343a648db60e11b8152600481018290526001600160a01b0386169063874c91b690602401602060405180830381865afa1580156121e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061220691906132f9565b6000828152600d6020526040908190209190915551632ec461c960e01b8152600481018290526001600160a01b03861690632ec461c990602401602060405180830381865afa15801561225d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061228191906132f9565b6000828152600e6020526040908190209190915551630e798fc760e11b8152600481018290526001600160a01b03861690631cf31f8e90602401602060405180830381865afa1580156122d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122fc91906132f9565b6000828152600f60205260409081902091909155516331a200ad60e21b8152600481018290526001600160a01b0386169063c68802b490602401602060405180830381865afa158015612353573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061237791906132f9565b600082815260106020526040908190209190915551633f18b21d60e21b8152600481018290526001600160a01b0386169063fc62c87490602401602060405180830381865afa1580156123ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123f291906132f9565b6000828152601160205260409020555b6040516001600160e01b0319871681526001600160a01b03891690889083907fb9d707ce49c63f003358ae85d59fc5c7762e8de3ce5a41f6bb0e7fb5e1a4cd859060200160405180910390a4807f13868ce1b50a84aac263efd89923de989e831c1c1184925e076d0db83d2b145361247983611545565b60405190815260200160405180910390a25050505050505050565b6000818152600c6020526040812054156124bb57506000908152600c602052604090205490565b506000908152600360209081526040808320546001600160a01b03168352601490915290205490565b600082815260208190526040902060010154612500813361296f565b610e498383612a57565b60008181526011602052604081205415612531575060009081526011602052604090205490565b506000908152600360209081526040808320546001600160a01b03168352601990915290205490565b60008181526010602052604081205415612581575060009081526010602052604090205490565b506000908152600360209081526040808320546001600160a01b03168352601890915290205490565b6000818152600e6020526040812054156125d157506000908152600e602052604090205490565b506000908152600360209081526040808320546001600160a01b03168352601690915290205490565b6126048486611654565b6001600160a01b03841663f242432a3330866126208787613278565b6040518563ffffffff1660e01b815260040161263f949392919061328b565b600060405180830381600087803b15801561265957600080fd5b505af115801561266d573d6000803e3d6000fd5b505050505b8082101561153e576126a684847f973bb64086f173ec8099b7ed3d43da984f4a332e4417a08bc6a286e6402b0586886107da565b816126b0816132e0565b925050612672565b6000818152600f6020526040812054156126df57506000908152600f602052604090205490565b506000908152600360209081526040808320546001600160a01b03168352601790915290205490565b61277e60405180610180016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040805161018081019091526001546001600160a01b03168152602081016127bb846000908152600760205260409020546001600160a01b031690565b6001600160a01b031681526020016127df8460009081526008602052604090205490565b81526020016127ed846112e3565b81526020016127fb8461250a565b815260200161280984612494565b81526020016128178461255a565b8152602001612825846126b8565b8152602001612833846125aa565b815260200161284e8460009081526005602052604090205490565b815260200161285c84611545565b815260200161286a846115be565b905292915050565b60008061287e846112e3565b9050600061288b8561255a565b9050600082612899876125aa565b6128a39085613248565b6000888152600860205260409020546128bc9190613231565b6128c69190613312565b9050806000036128d4575060015b6000836128e0886126b8565b6128ea9190613231565b826128f58189613278565b6128fe8a61250a565b6129089088613231565b6129129190613231565b61291c9190613312565b6129269190613248565b90506129328385613231565b811115612946576129438385613231565b90505b6129508480613231565b61295a8288613231565b6129649190613312565b979650505050505050565b6129798282611595565b610ec857612991816001600160a01b03166014612abc565b61299c836020612abc565b6040516020016129ad929190613358565b60408051601f198184030181529082905262461bcd60e51b825261086d916004016133cd565b6129dd8282611595565b610ec8576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055612a133390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b612a618282611595565b15610ec8576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60606000612acb836002613231565b612ad6906002613248565b67ffffffffffffffff811115612aee57612aee613400565b6040519080825280601f01601f191660200182016040528015612b18576020820181803683370190505b509050600360fc1b81600081518110612b3357612b33613416565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612b6257612b62613416565b60200101906001600160f81b031916908160001a9053506000612b86846002613231565b612b91906001613248565b90505b6001811115612c09576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612bc557612bc5613416565b1a60f81b828281518110612bdb57612bdb613416565b60200101906001600160f81b031916908160001a90535060049490941c93612c028161342c565b9050612b94565b508315612c585760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161086d565b9392505050565b80356001600160e01b03198116811461133357600080fd5b600060208284031215612c8957600080fd5b612c5882612c5f565b600060208284031215612ca457600080fd5b5035919050565b6001600160a01b0381168114612cc057600080fd5b50565b60008060008060808587031215612cd957600080fd5b8435612ce481612cab565b935060208501359250612cf960408601612c5f565b91506060850135612d0981612cab565b939692955090935050565b60008083601f840112612d2657600080fd5b50813567ffffffffffffffff811115612d3e57600080fd5b602083019150836020828501011115612d5657600080fd5b9250929050565b600080600080600060808688031215612d7557600080fd5b8535612d8081612cab565b94506020860135612d9081612cab565b935060408601359250606086013567ffffffffffffffff811115612db357600080fd5b612dbf88828901612d14565b969995985093965092949392505050565b600080600060608486031215612de557600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612e0f57600080fd5b823591506020830135612e2181612cab565b809150509250929050565b8015158114612cc057600080fd5b60008060408385031215612e4d57600080fd5b8235612e5881612cab565b91506020830135612e2181612e2c565b60008060408385031215612e7b57600080fd5b8235612e8681612cab565b946020939093013593505050565b60008060008060808587031215612eaa57600080fd5b8435612eb581612cab565b93506020850135612ec581612cab565b93969395505050506040820135916060013590565b60008060408385031215612eed57600080fd5b8235612ef881612cab565b91506020830135612e2181612cab565b60008083601f840112612f1a57600080fd5b50813567ffffffffffffffff811115612f3257600080fd5b6020830191508360208260051b8501011115612d5657600080fd5b60008060008060008060008060a0898b031215612f6957600080fd5b8835612f7481612cab565b97506020890135612f8481612cab565b9650604089013567ffffffffffffffff80821115612fa157600080fd5b612fad8c838d01612f08565b909850965060608b0135915080821115612fc657600080fd5b612fd28c838d01612f08565b909650945060808b0135915080821115612feb57600080fd5b50612ff88b828c01612d14565b999c989b5096995094979396929594505050565b60008060008060008060c0878903121561302557600080fd5b863561303081612cab565b95506020870135945061304560408801612c5f565b9350606087013561305581612cab565b92506080870135915060a087013561306c81612e2c565b809150509295509295509295565b600080600080600060a0868803121561309257600080fd5b853561309d81612cab565b945060208601356130ad81612cab565b94979496505050506040830135926060810135926080909101359150565b60008060008060008060a087890312156130e457600080fd5b86356130ef81612cab565b955060208701356130ff81612cab565b94506040870135935060608701359250608087013567ffffffffffffffff81111561312957600080fd5b61313589828a01612d14565b979a9699509497509295939492505050565b60008060006060848603121561315c57600080fd5b833561316781612cab565b95602085013595506040909401359392505050565b81516001600160a01b03168152610180810160208301516131a860208401826001600160a01b03169052565b5060408301516040830152606083015160608301526080830151608083015260a083015160a083015260c083015160c083015260e083015160e083015261010080840151818401525061012080840151818401525061014080840151818401525061016080840151818401525092915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176107d4576107d461321b565b808201808211156107d4576107d461321b565b60006020828403121561326d57600080fd5b8151612c5881612e2c565b818103818111156107d4576107d461321b565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b6000602082840312156132d557600080fd5b8151612c5881612cab565b6000600182016132f2576132f261321b565b5060010190565b60006020828403121561330b57600080fd5b5051919050565b60008261332f57634e487b7160e01b600052601260045260246000fd5b500490565b60005b8381101561334f578181015183820152602001613337565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613390816017850160208801613334565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516133c1816028840160208801613334565b01602801949350505050565b60208152600082518060208401526133ec816040850160208701613334565b601f01601f19169190910160400192915050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008161343b5761343b61321b565b50600019019056fea2646970667358221220ee73a1f9d39df5fa22ef6bf153f11ecfac507c675846184ddd2480c50167b41a64736f6c634300081100336b8b15f1c11543d8280deaa7c24d12fffba6a357e4428e8c43e4234790186bff0000000000000000000000007ceb23fd6bc0add59e62ac25578270cff1b9f619000000000000000000000000254f33da56f901bb3bab451a3e3afca05628ab49

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

0000000000000000000000007ceb23fd6bc0add59e62ac25578270cff1b9f619000000000000000000000000254f33da56f901bb3bab451a3e3afca05628ab49

-----Decoded View---------------
Arg [0] : _ERC20Currency (address): 0x7ceb23fd6bc0add59e62ac25578270cff1b9f619
Arg [1] : _initiator (address): 0x254f33da56f901bb3bab451a3e3afca05628ab49

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000007ceb23fd6bc0add59e62ac25578270cff1b9f619
Arg [1] : 000000000000000000000000254f33da56f901bb3bab451a3e3afca05628ab49


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.