Contract 0x87CF72190952403527e6C63679e44F4bc023ad99 1

 

Contract Overview

Balance:
0 MATIC

MATIC Value:
$0.00

Token:
 
Txn Hash
Method
Block
From
To
Value [Txn Fee]
0xbcb36c483e3557675cb9e82f214090f1eba3fcd6bf30794df74b8f47647070c3Bid385226442023-01-25 20:52:332 days 19 hrs ago0x0090720fed7fed66ed658118b7b3bb0189d3a495 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.005206818015 46.802437866
0xeb71e73b5edaca96b8a57e48a0585a35644c4d973379b2c38d472c25c115e524Bid385221402023-01-25 20:32:282 days 19 hrs ago0xc9c022fcfebe730710ae93ca9247c5ec9d9236d0 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.005252776198 47.251218426
0x40e9c5bf7fe9a59b9001123fb13ee3f1100d45b25942ab8089143fabea544ab6Bid385214372023-01-25 20:05:262 days 20 hrs ago0xe7967e618010c7561f5acd59ab9790455370e65e IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.011855859254 92.43109494
0x4da417889bdd633f4b9d3b0abe73fd4613f92d4be0475b17b19d6acb55a19e0fBid385191542023-01-25 18:42:262 days 21 hrs ago0xc9c022fcfebe730710ae93ca9247c5ec9d9236d0 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.0094223969 65.201484311
0xbc9e4f537a7f46bf6948bc45179c2939cdf9e978a4b959092d76875fbe5fbdc7Register An Auct...385190672023-01-25 18:38:482 days 21 hrs ago0x2ce6bd653220436eb8f35e146b0dd1a6013e97a7 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.02037173433 60.568151448
0x9621f80a45c10ec0049796609bace136efc04c1e6c66ac503f3a69ff8a0eafd6Claim384376122023-01-23 17:39:304 days 22 hrs ago0x0090720fed7fed66ed658118b7b3bb0189d3a495 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.007249558138 57.240433462
0x21589def0063b3a23edb56c23c02b74c568eebb01b0335eabb36d60a113f088fBid384344842023-01-23 15:48:355 days 25 mins ago0x0090720fed7fed66ed658118b7b3bb0189d3a495 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.009948101656 68.850711867
0xaa7de7acbe9896a2b2397c3df6a88a3141ea4bc3389c7d1769b1b69041c86c0cSet Bidding Allo...383992752023-01-22 18:45:375 days 21 hrs ago0x2ce6bd653220436eb8f35e146b0dd1a6013e97a7 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.001371247137 44.008059886
0x72b9f11518dfd7c216ec5c60e54b696b28491adfbca35097bf1835120461e5e4Mass Registrer E...383992732023-01-22 18:45:335 days 21 hrs ago0x2ce6bd653220436eb8f35e146b0dd1a6013e97a7 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.018698777865 48.552364331
0xf676e6ea0f5c5bc36916ec474b63f845eb6a544842228ac77dc19353946adedbClaim382779432023-01-19 17:04:188 days 23 hrs ago0x4888c0030b743c17c89a8af875155cf75dcfd1e1 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.001822203838 54.970099796
0x98a37300aaffe28b6be7a83ad26caf45bb86379d8d5dbc608414a3b30d015d38Claim382778292023-01-19 17:00:168 days 23 hrs ago0x4888c0030b743c17c89a8af875155cf75dcfd1e1 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.00781429948 61.687779598
0xb4a9a62672ab06fb151523f9a1ee6956e4c31246127f7d5f25c37135e501b943Bid382771352023-01-19 16:35:088 days 23 hrs ago0x4888c0030b743c17c89a8af875155cf75dcfd1e1 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.008215363923 73.829376983
0x1afd956206f8b322d661d4833b5599622666cd127d4b210dd17371c644dd3b32Bid382440812023-01-18 20:41:059 days 19 hrs ago0x0090720fed7fed66ed658118b7b3bb0189d3a495 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.007254922661 56.5558093
0x7f06843f98e3ff144508ca17adbca25c2e213940e36d2deeca5fc8253bbccc6bBid382430392023-01-18 20:04:099 days 20 hrs ago0xe7967e618010c7561f5acd59ab9790455370e65e IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.006419206066 44.416194308
0x0250d112b549b40092cdcda77e97674aba99f541f2e685d317b7b8b706fbe76bSet Bidding Allo...382365062023-01-18 16:09:5410 days 3 mins ago0x2ce6bd653220436eb8f35e146b0dd1a6013e97a7 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.009912206673 318.116970182
0x05a781a67ae533fa0ca5c7ea693359b3e6ae8539090a5351e10e2c606c4165ecMass Registrer E...382365042023-01-18 16:09:5010 days 4 mins ago0x2ce6bd653220436eb8f35e146b0dd1a6013e97a7 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.126594006226 328.708023417
0x3b3c0d1a9148d8e8f3618498cfc4d7e0d73507d06d03328f486e6ae8a3bb083fSet Bidding Allo...380757372023-01-14 17:10:5113 days 23 hrs ago0x2ce6bd653220436eb8f35e146b0dd1a6013e97a7 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.001735264075 55.690621497
0x8eaf8e75e4a8e9b55aa11350020bcce7824bdadc4e0e33adf1a8204110116608Mass Registrer E...380757342023-01-14 17:10:4513 days 23 hrs ago0x2ce6bd653220436eb8f35e146b0dd1a6013e97a7 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.021527666821 55.209621369
0xc81e30337d472d3a0d6496f7c9f7fc42a76c860dbbb65ddf9c95e475fa9bf5aaBid380460342023-01-13 23:58:4814 days 16 hrs ago0xb5e28de7fe51003cc8aac574ae65793c657d6904 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.004440848769 40.975177563
0x957358a8a89e942f9b9190260d410139f7bf5ec0779ae441fc48bfa82d8358dcBid380397792023-01-13 20:21:0414 days 19 hrs ago0x0090720fed7fed66ed658118b7b3bb0189d3a495 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.008480638215 66.110884986
0x615122e88861a5f2b314ae47d736a0b14d81e060f1e13fadb883dc095866bf27Bid380395962023-01-13 20:14:4614 days 19 hrs ago0xe7967e618010c7561f5acd59ab9790455370e65e IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.006866330358 42.483358652
0x0a652c3af4f0b48ccd4e710918f6f0d597f5ecd7ff25f2c4f83e62c7c7f6a7c7Set Bidding Allo...380316482023-01-13 15:41:1615 days 32 mins ago0x2ce6bd653220436eb8f35e146b0dd1a6013e97a7 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.002051454292 65.838258366
0xac10022d415a1e7e870d5cfda9855af117bc622d48e8642b700f9060671d21f1Mass Registrer E...380316462023-01-13 15:41:1215 days 32 mins ago0x2ce6bd653220436eb8f35e146b0dd1a6013e97a7 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.029225392278 68.907334799
0x63652723aca4db5228cb597267c7b6fcd6a574ede5400442a2a8abd45b4253caClaim380030632023-01-12 23:14:1215 days 16 hrs ago0xec3281124d4c2fca8a88e3076c1e7749cfecb7f2 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.0039541263 41.545850282
0xe3408f4d892267505e1dc7e3040a326b8f8a61e400863bcd57a8ed1acc979ff0Claim380030582023-01-12 23:14:0215 days 16 hrs ago0xec3281124d4c2fca8a88e3076c1e7749cfecb7f2 IN  0x87cf72190952403527e6c63679e44f4bc023ad990 MATIC0.005489436384 46.888203159
[ 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 9 : 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 "./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 {
    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) internal 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)) internal eRC1155_tokensIndex; //Contract => TokenID => Amount being auctionned
    mapping(address => mapping(uint256 => uint256)) internal eRC1155_tokensUnderAuction; //Contract => TokenID => Amount being auctionned

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

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

    /// @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(msg.sender == Ownable(_contract).owner(), "Only the owner of a contract can allow/disallow bidding");

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

        if (_tokenKind == bytes4(keccak256("ERC721"))) {
            require(
                msg.sender == Ownable(_contract).owner() || address(this) == IERC721(_contract).ownerOf(_tokenId),
                "registerAnAuctionToken: the specified ERC-721 token cannot be auctionned"
            );

            auctionId = uint256(keccak256(abi.encodePacked(_contract, _tokenId, _tokenKind)));
            auctionMapping[_contract][_tokenId][0] = auctionId;
        } else {
            require(
                msg.sender == Ownable(_contract).owner() ||
                    eRC1155_tokensUnderAuction[_contract][_tokenId] <
                    IERC1155(_contract).balanceOf(address(this), _tokenId),
                "registerAnAuctionToken:  the specified ERC-1155 token cannot be auctionned"
            );

            require(
                _1155Index <= eRC1155_tokensIndex[_contract][_tokenId],
                "The specified _1155Index have not been reached yet for this token"
            );

            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 9 : 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 3 of 9 : 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 4 of 9 : 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 5 of 9 : 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 6 of 9 : 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 7 of 9 : 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 8 of 9 : 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 9 of 9 : Ownable.sol
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.17;

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

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"}],"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"},{"inputs":[],"name":"ERC20Currency","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":"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":"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":"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":"bool","name":"_value","type":"bool"}],"name":"setBiddingAllowed","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620030c6380380620030c6833981016040819052620000349162000068565b60008054336001600160a01b031991821617909155600180549091166001600160a01b03929092169190911790556200009a565b6000602082840312156200007b57600080fd5b81516001600160a01b03811681146200009357600080fd5b9392505050565b61301c80620000aa6000396000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c8063b3cbc3b41161010f578063db145701116100a2578063ef8c55fd11610071578063ef8c55fd146104f5578063f23a6e6114610508578063f5de100014610541578063fc3fc4ed1461058257600080fd5b8063db14570114610493578063dfab114b146104a6578063e07bc69c146104cf578063e65c74a2146104e257600080fd5b8063c340f019116100de578063c340f01914610447578063cb7020e41461045a578063d5a0709d1461046d578063da081c941461048057600080fd5b8063b3cbc3b4146103c6578063b3f78050146103d9578063bc197c81146103ec578063c26e748c1461042757600080fd5b80633f21cf81116101875780638da5cb5b116101565780638da5cb5b1461034c578063919e84f514610377578063930e79f11461038a578063aefa7d981461039d57600080fd5b80633f21cf81146102f357806350d265d41461030657806364efa1fd146103195780636b9a894e1461032c57600080fd5b806314ff5ea3116101c357806314ff5ea314610272578063150b7a02146102955780632ac9bf09146102cd578063379607f5146102e057600080fd5b806303ea66a4146101ea57806304af729c1461021d5780630facebea14610232575b600080fd5b61020a6101f83660046128ed565b60009081526004602052604090205490565b6040519081526020015b60405180910390f35b61023061022b366004612936565b6105a2565b005b6102596102403660046128ed565b6000908152600260208190526040909120015460e01b90565b6040516001600160e01b03199091168152602001610214565b61020a6102803660046128ed565b60009081526002602052604090206001015490565b6102596102a33660046129d0565b7f150b7a023d4804d13e8c85fb27262cb750cf6ba9f9dd3bb30d90f482ceeb4b1f95945050505050565b6102306102db366004612a43565b6105b7565b6102306102ee3660046128ed565b610beb565b61020a6103013660046128ed565b610fe2565b610230610314366004612a7d565b611037565b61020a610327366004612ab6565b61112a565b61020a61033a3660046128ed565b60009081526005602052604090205490565b60005461035f906001600160a01b031681565b6040516001600160a01b039091168152602001610214565b61020a6103853660046128ed565b61115d565b61020a6103983660046128ed565b6111ad565b61035f6103ab3660046128ed565b6000908152600260205260409020546001600160a01b031690565b6102306103d4366004612ae2565b6111fd565b6102306103e7366004612b28565b611243565b6102596103fa366004612b9b565b7fbc197c819b3e337a6f9652dd10becd7eef83032af3b9d958d3d42f669414662198975050505050505050565b61020a6104353660046128ed565b60009081526007602052604090205490565b610230610455366004612c5a565b611747565b61020a6104683660046128ed565b612431565b60015461035f906001600160a01b031681565b61020a61048e3660046128ed565b612481565b61020a6104a13660046128ed565b6124d1565b61035f6104b43660046128ed565b6000908152600660205260409020546001600160a01b031690565b61020a6104dd3660046128ed565b612521565b6102306104f0366004612cc8565b612571565b61020a6105033660046128ed565b612636565b610259610516366004612d19565b7ff23a6e612e1ff4830e658fe43f4e3cb4a5f8170bd5d9e69fb5d7a7fa9e4fdf979695505050505050565b61020a61054f366004612d95565b6001600160a01b038316600090815260036020908152604080832085845282528083208484529091529020549392505050565b6105956105903660046128ed565b612686565b6040516102149190612dca565b6105b184848484600080611747565b50505050565b6000838152600260209081526040808320546001600160a01b03168352600890915290205460ff1661063e5760405162461bcd60e51b815260206004820152602560248201527f6269643a2062696464696e672069732063757272656e746c79206e6f7420616c6044820152641b1bddd95960da1b60648201526084015b60405180910390fd5b6001821161068e5760405162461bcd60e51b815260206004820152601b60248201527f6269643a205f626964416d6f756e742063616e6e6f74206265203000000000006044820152606401610635565b60008381526007602052604090205481146107255760405162461bcd60e51b815260206004820152604b60248201527f6269643a2063757272656e7420686967686573742062696420646f206e6f742060448201527f6d6174636820746865207375626d6974746564207472616e73616374696f6e2060648201526a17da1a59da195cdd109a5960aa1b608482015260a401610635565b4261072f8461115d565b1115801561074457506107418361115d565b15155b6107905760405162461bcd60e51b815260206004820181905260248201527f6269643a2041756374696f6e20686173206e6f742073746172746564207965746044820152606401610635565b4261079a846111ad565b10156107e85760405162461bcd60e51b815260206004820152601e60248201527f6269643a2041756374696f6e2068617320616c726561647920656e64656400006044820152606401610635565b80821161084f5760405162461bcd60e51b815260206004820152602f60248201527f6269643a205f626964416d6f756e74206d75737420626520686967686572207460448201526e1a185b8817da1a59da195cdd109a59608a1b6064820152608401610635565b61085883610fe2565b6108629083612e7f565b61086b84612521565b61087485610fe2565b61087e9190612e96565b6108889083612e7f565b11156108e85760405162461bcd60e51b815260206004820152602960248201527f6269643a205f626964416d6f756e74206d757374206d65657420746865206d696044820152681b9a5b5d5b48189a5960ba1b6064820152608401610635565b6001546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303816000875af115801561093f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109639190612ea9565b5061096d83612431565b6109779042612e96565b610980846111ad565b10156109e65761098f83612431565b6109999042612e96565b6000848152600a6020526040908190208290555184917f2e7f50c8a01968bd8edfe9b3ae46a4d0fa3ce89e533d76245c2684ee9882c0cb916109dd91815260200190565b60405180910390a25b600083815260046020908152604080832054600683528184205460079093529220546001600160a01b03909116908115610a5f57816001600160a01b0316867ffff24e92e1cbce6e08fa0c957732709b2be79be2ce26c732bcfae1cc368356e583604051610a5691815260200190565b60405180910390a35b8215610ad257600086815260056020526040902054610a7f908490612e96565b60008781526005602090815260409182902092909255518481526001600160a01b0384169188917fc6330f2f35039b6e7bcfdeb0c2e959d355b88d8c2292ca4a4c42f514cc958be3910160405180910390a35b604051858152339087907f1cd77ec6c10f614681f30c7aa33ebc645b4d597aaf7039f6210e71d0e15c91819060200160405180910390a3610b1386866127f0565b6000878152600460209081526040808320939093556006815282822080546001600160a01b031916331790556007905220859055610b518382612e96565b15610be3576001546001600160a01b031663a9059cbb83610b728685612e96565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610bbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be19190612ea9565b505b505050505050565b600081815260026020908152604080832080546001909101546001600160a01b03909116808552600890935292205490919060ff16610c7d5760405162461bcd60e51b815260206004820152602860248201527f636c61696d3a20436c61696d696e672069732063757272656e746c79206e6f7460448201526708185b1b1bddd95960c21b6064820152608401610635565b42610c87846111ad565b10610cd45760405162461bcd60e51b815260206004820181905260248201527f636c61696d3a2041756374696f6e20686173206e6f742079657420656e6465646044820152606401610635565b60008381526019602052604090205460ff1615610d475760405162461bcd60e51b815260206004820152602b60248201527f636c61696d3a20746869732061756374696f6e2068617320616c72656479206260448201526a19595b8818db185a5b595960aa1b6064820152608401610635565b6000838152601960209081526040808320805460ff191660019081179091555483546005845282852054600790945291909320546001600160a01b039384169363a9059cbb93921691610d9991612ecd565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610de4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e089190612ea9565b50600083815260026020819052604090912001546346296f5d60e11b60e09190911b6001600160e01b03191601610eb75760008381526006602052604090819020549051632142170760e11b81523060048201526001600160a01b03918216602482015260448101839052908316906342842e0e90606401600060405180830381600087803b158015610e9a57600080fd5b505af1158015610eae573d6000803e3d6000fd5b50505050610fb2565b600083815260026020819052604090912001546301a3112760e61b60e09190911b6001600160e01b03191601610fb25760008381526006602052604090819020549051637921219560e11b81526001600160a01b038085169263f242432a92610f2b92309216908690600190600401612ee0565b600060405180830381600087803b158015610f4557600080fd5b505af1158015610f59573d6000803e3d6000fd5b5050506001600160a01b0383166000908152601b60209081526040808320858452909152902054610f8d9150600190612ecd565b6001600160a01b0383166000908152601b602090815260408083208584529091529020555b60405183907f36c817b01bdbc20b542bcc10ca808780e14aa4c1043a66966a7692de51df511390600090a2505050565b6000818152600c60205260408120541561100957506000908152600c602052604090205490565b506000908152600260209081526040808320546001600160a01b03168352601490915290205490565b919050565b816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015611077573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109b9190612f18565b6001600160a01b0316336001600160a01b0316146110cb5760405162461bcd60e51b815260040161063590612f35565b6001600160a01b038216600081815260086020908152604091829020805460ff191685151590811790915591519182527f0b4ea68d808f372a5097f85b16d5e69e050d94a33668fd980f8876593bb8e571910160405180910390a25050565b6001600160a01b038216600090815260036020908152604080832084845282528083208380529091529020545b92915050565b60008181526009602052604081205415611184575060009081526009602052604090205490565b506000908152600260209081526040808320546001600160a01b03168352601190915290205490565b6000818152600a6020526040812054156111d457506000908152600a602052604090205490565b506000908152600260209081526040808320546001600160a01b03168352601290915290205490565b808210156105b15761123183837f73ad2146b3d3a286642c794379d750360a2d53a3459a11b3e5d6cc900f55f44a876105a2565b8161123b81612f92565b9250506111fd565b816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015611283573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a79190612f18565b6001600160a01b0316336001600160a01b03161461133d5760405162461bcd60e51b815260206004820152604760248201527f4f6e6c7920746865206f776e6572206f66206120636f6e74726163742063616e60448201527f2072656769737465722064656661756c742076616c75657320666f722074686560648201526620746f6b656e7360c81b608482015260a401610635565b604051635e15f0df60e11b81526001600160a01b03838116600483015282169063bc2be1be90602401602060405180830381865afa158015611383573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a79190612fab565b6001600160a01b0383811660008181526011602052604090819020939093559151639067b67760e01b81526004810192909252821690639067b67790602401602060405180830381865afa158015611403573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114279190612fab565b6001600160a01b03838116600081815260126020526040908190209390935591516332dc083960e21b8152600481019290925282169063cb7020e490602401602060405180830381865afa158015611483573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a79190612fab565b6001600160a01b03838116600081815260136020526040908190209390935591516343a648db60e11b8152600481019290925282169063874c91b690602401602060405180830381865afa158015611503573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115279190612fab565b6001600160a01b0383811660008181526014602052604090819020939093559151632ec461c960e01b81526004810192909252821690632ec461c990602401602060405180830381865afa158015611583573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a79190612fab565b6001600160a01b0383811660008181526015602052604090819020939093559151630e798fc760e11b81526004810192909252821690631cf31f8e90602401602060405180830381865afa158015611603573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116279190612fab565b6001600160a01b03838116600081815260166020526040908190209390935591516331a200ad60e21b8152600481019290925282169063c68802b490602401602060405180830381865afa158015611683573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a79190612fab565b6001600160a01b0383811660008181526017602052604090819020939093559151633f18b21d60e21b8152600481019290925282169063fc62c87490602401602060405180830381865afa158015611703573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117279190612fab565b6001600160a01b0390921660009081526018602052604090209190915550565b856001600160a01b0316638da5cb5b6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015611787573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ab9190612f18565b6001600160a01b0316336001600160a01b0316146117db5760405162461bcd60e51b815260040161063590612f35565b8061188d576001600160a01b0386166000818152601a60209081526040808320898452825280832054938352600382528083208984528252808320848452909152902054909250156118885760405162461bcd60e51b815260206004820152603060248201527f5468652061756374696f6e20616c6561647920657869737420666f722074686560448201526f1039b832b1b4b334b2b2103a37b5b2b760811b6064820152608401610635565b611925565b6001600160a01b0386166000908152600360209081526040808320888452825280832085845290915281205490036119255760405162461bcd60e51b815260206004820152603560248201527f5468652061756374696f6e20646f65736e27742065786973742079657420666f60448201527439103a34329039b832b1b4b334b2b2103a37b5b2b760591b6064820152608401610635565b6001600160e01b031984166339d690a360e11b148061195457506001600160e01b0319841663025ceed960e61b145b6119d45760405162461bcd60e51b8152602060048201526044602482018190527f7265676973746572416e41756374696f6e546f6b656e3a204f6e6c7920455243908201527f3131353520616e642045524337323120746f6b656e732061726520737570706f6064820152631c9d195960e21b608482015260a401610635565b604080516060810182526001600160a01b0388168152602081018790526001600160e01b03198616918101829052906000906346296f5d60e11b01611c1057876001600160a01b0316638da5cb5b6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015611a53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a779190612f18565b6001600160a01b0316336001600160a01b03161480611b0f57506040516331a9108f60e11b8152600481018890526001600160a01b03891690636352211e90602401602060405180830381865afa158015611ad6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611afa9190612f18565b6001600160a01b0316306001600160a01b0316145b611b925760405162461bcd60e51b815260206004820152604860248201527f7265676973746572416e41756374696f6e546f6b656e3a20746865207370656360448201527f6966696564204552432d37323120746f6b656e2063616e6e6f7420626520617560648201526718dd1a5bdb9b995960c21b608482015260a401610635565b6040516bffffffffffffffffffffffff1960608a901b166020820152603481018890526001600160e01b03198716605482015260580160408051601f1981840301815291815281516020928301206001600160a01b038b166000908152600384528281208b8252845282812081805290935291208190559050611f6d565b876001600160a01b0316638da5cb5b6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015611c50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c749190612f18565b6001600160a01b0316336001600160a01b03161480611d215750604051627eeac760e11b8152306004820152602481018890526001600160a01b0389169062fdd58e90604401602060405180830381865afa158015611cd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cfb9190612fab565b6001600160a01b0389166000908152601b602090815260408083208b8452909152902054105b611da65760405162461bcd60e51b815260206004820152604a60248201527f7265676973746572416e41756374696f6e546f6b656e3a20207468652073706560448201527f636966696564204552432d3131353520746f6b656e2063616e6e6f7420626520606482015269185d58dd1a5bdb9b995960b21b608482015260a401610635565b6001600160a01b0388166000908152601a602090815260408083208a8452909152902054841115611e495760405162461bcd60e51b815260206004820152604160248201527f54686520737065636966696564205f31313535496e6465782068617665206e6f60448201527f74206265656e20726561636865642079657420666f72207468697320746f6b656064820152603760f91b608482015260a401610635565b6040516bffffffffffffffffffffffff1960608a901b166020820152603481018890526001600160e01b031987166054820152605881018590526078016040516020818303038152906040528051906020012060001c905082611f3e576001600160a01b0388166000908152601a602090815260408083208a8452909152902054611ed5906001612e96565b6001600160a01b0389166000818152601a602090815260408083208c8452825280832094909455918152601b82528281208a82529091522054611f19906001612e96565b6001600160a01b0389166000908152601b602090815260408083208b84529091529020555b6001600160a01b03881660009081526003602090815260408083208a8452825280832087845290915290208190555b600081815260026020818152604092839020855181546001600160a01b0319166001600160a01b039182161782559186015160018201559285015192909101805463ffffffff191660e09390931c9290921790915585161561239f57604051635e15f0df60e11b8152600481018290526001600160a01b0386169063bc2be1be90602401602060405180830381865afa15801561200e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120329190612fab565b600082815260096020526040908190209190915551639067b67760e01b8152600481018290526001600160a01b03861690639067b67790602401602060405180830381865afa158015612089573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120ad9190612fab565b6000828152600a60205260409081902091909155516332dc083960e21b8152600481018290526001600160a01b0386169063cb7020e490602401602060405180830381865afa158015612104573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121289190612fab565b6000828152600b60205260409081902091909155516343a648db60e11b8152600481018290526001600160a01b0386169063874c91b690602401602060405180830381865afa15801561217f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121a39190612fab565b6000828152600c6020526040908190209190915551632ec461c960e01b8152600481018290526001600160a01b03861690632ec461c990602401602060405180830381865afa1580156121fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061221e9190612fab565b6000828152600d6020526040908190209190915551630e798fc760e11b8152600481018290526001600160a01b03861690631cf31f8e90602401602060405180830381865afa158015612275573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122999190612fab565b6000828152600e60205260409081902091909155516331a200ad60e21b8152600481018290526001600160a01b0386169063c68802b490602401602060405180830381865afa1580156122f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123149190612fab565b6000828152600f6020526040908190209190915551633f18b21d60e21b8152600481018290526001600160a01b0386169063fc62c87490602401602060405180830381865afa15801561236b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061238f9190612fab565b6000828152601060205260409020555b6040516001600160e01b0319871681526001600160a01b03891690889083907fb9d707ce49c63f003358ae85d59fc5c7762e8de3ce5a41f6bb0e7fb5e1a4cd859060200160405180910390a4807f13868ce1b50a84aac263efd89923de989e831c1c1184925e076d0db83d2b14536124168361115d565b60405190815260200160405180910390a25050505050505050565b6000818152600b60205260408120541561245857506000908152600b602052604090205490565b506000908152600260209081526040808320546001600160a01b03168352601390915290205490565b600081815260106020526040812054156124a8575060009081526010602052604090205490565b506000908152600260209081526040808320546001600160a01b03168352601890915290205490565b6000818152600f6020526040812054156124f857506000908152600f602052604090205490565b506000908152600260209081526040808320546001600160a01b03168352601790915290205490565b6000818152600d60205260408120541561254857506000908152600d602052604090205490565b506000908152600260209081526040808320546001600160a01b03168352601590915290205490565b61257b8486611243565b6001600160a01b03841663f242432a3330866125978787612ecd565b6040518563ffffffff1660e01b81526004016125b69493929190612ee0565b600060405180830381600087803b1580156125d057600080fd5b505af11580156125e4573d6000803e3d6000fd5b505050505b8082101561262f5761261d84847f973bb64086f173ec8099b7ed3d43da984f4a332e4417a08bc6a286e6402b0586886105a2565b8161262781612f92565b9250506125e9565b5050505050565b6000818152600e60205260408120541561265d57506000908152600e602052604090205490565b506000908152600260209081526040808320546001600160a01b03168352601690915290205490565b6126fc60405180610180016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040805161018081019091526000546001600160a01b0316815260208101612739846000908152600660205260409020546001600160a01b031690565b6001600160a01b0316815260200161275d8460009081526007602052604090205490565b815260200161276b84610fe2565b815260200161277984612481565b815260200161278784612431565b8152602001612795846124d1565b81526020016127a384612636565b81526020016127b184612521565b81526020016127cc8460009081526004602052604090205490565b81526020016127da8461115d565b81526020016127e8846111ad565b905292915050565b6000806127fc84610fe2565b90506000612809856124d1565b905060008261281787612521565b6128219085612e96565b60008881526007602052604090205461283a9190612e7f565b6128449190612fc4565b905080600003612852575060015b60008361285e88612636565b6128689190612e7f565b826128738189612ecd565b61287c8a612481565b6128869088612e7f565b6128909190612e7f565b61289a9190612fc4565b6128a49190612e96565b90506128b08385612e7f565b8111156128c4576128c18385612e7f565b90505b6128ce8480612e7f565b6128d88288612e7f565b6128e29190612fc4565b979650505050505050565b6000602082840312156128ff57600080fd5b5035919050565b6001600160a01b038116811461291b57600080fd5b50565b80356001600160e01b03198116811461103257600080fd5b6000806000806080858703121561294c57600080fd5b843561295781612906565b93506020850135925061296c6040860161291e565b9150606085013561297c81612906565b939692955090935050565b60008083601f84011261299957600080fd5b50813567ffffffffffffffff8111156129b157600080fd5b6020830191508360208285010111156129c957600080fd5b9250929050565b6000806000806000608086880312156129e857600080fd5b85356129f381612906565b94506020860135612a0381612906565b935060408601359250606086013567ffffffffffffffff811115612a2657600080fd5b612a3288828901612987565b969995985093965092949392505050565b600080600060608486031215612a5857600080fd5b505081359360208301359350604090920135919050565b801515811461291b57600080fd5b60008060408385031215612a9057600080fd5b8235612a9b81612906565b91506020830135612aab81612a6f565b809150509250929050565b60008060408385031215612ac957600080fd5b8235612ad481612906565b946020939093013593505050565b60008060008060808587031215612af857600080fd5b8435612b0381612906565b93506020850135612b1381612906565b93969395505050506040820135916060013590565b60008060408385031215612b3b57600080fd5b8235612b4681612906565b91506020830135612aab81612906565b60008083601f840112612b6857600080fd5b50813567ffffffffffffffff811115612b8057600080fd5b6020830191508360208260051b85010111156129c957600080fd5b60008060008060008060008060a0898b031215612bb757600080fd5b8835612bc281612906565b97506020890135612bd281612906565b9650604089013567ffffffffffffffff80821115612bef57600080fd5b612bfb8c838d01612b56565b909850965060608b0135915080821115612c1457600080fd5b612c208c838d01612b56565b909650945060808b0135915080821115612c3957600080fd5b50612c468b828c01612987565b999c989b5096995094979396929594505050565b60008060008060008060c08789031215612c7357600080fd5b8635612c7e81612906565b955060208701359450612c936040880161291e565b93506060870135612ca381612906565b92506080870135915060a0870135612cba81612a6f565b809150509295509295509295565b600080600080600060a08688031215612ce057600080fd5b8535612ceb81612906565b94506020860135612cfb81612906565b94979496505050506040830135926060810135926080909101359150565b60008060008060008060a08789031215612d3257600080fd5b8635612d3d81612906565b95506020870135612d4d81612906565b94506040870135935060608701359250608087013567ffffffffffffffff811115612d7757600080fd5b612d8389828a01612987565b979a9699509497509295939492505050565b600080600060608486031215612daa57600080fd5b8335612db581612906565b95602085013595506040909401359392505050565b81516001600160a01b0316815261018081016020830151612df660208401826001600160a01b03169052565b5060408301516040830152606083015160608301526080830151608083015260a083015160a083015260c083015160c083015260e083015160e083015261010080840151818401525061012080840151818401525061014080840151818401525061016080840151818401525092915050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761115757611157612e69565b8082018082111561115757611157612e69565b600060208284031215612ebb57600080fd5b8151612ec681612a6f565b9392505050565b8181038181111561115757611157612e69565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b600060208284031215612f2a57600080fd5b8151612ec681612906565b60208082526037908201527f4f6e6c7920746865206f776e6572206f66206120636f6e74726163742063616e60408201527f20616c6c6f772f646973616c6c6f772062696464696e67000000000000000000606082015260800190565b600060018201612fa457612fa4612e69565b5060010190565b600060208284031215612fbd57600080fd5b5051919050565b600082612fe157634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220bfcc2712517d7c661d31fc40d7cb3978948666876ed6c490e3ac33cae305d73164736f6c634300081100330000000000000000000000007ceb23fd6bc0add59e62ac25578270cff1b9f619

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

0000000000000000000000007ceb23fd6bc0add59e62ac25578270cff1b9f619

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

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


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.