Contract 0xe6D8F879E7A823a78eA0e05F0cDd287d3Fe81B2a

  Note: Our ETH balance display is temporarily unavailable. Please check back later.

Contract Overview

Balance:
Txn Hash Method
Block
From
To
Value
0x2dd0c3837ebe7bde35c65901e972d9dfcf571feda5d5736fe395bbf769fa0e230x60806040167423352023-11-02 8:12:18167 days 5 hrs ago0xd866b2332d4383c1bf719732177e2d9109c99dbc IN  Create: GamesQueue0 ETH0.0000000096060.00001
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GamesQueue

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

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

pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

// internal
import "../../utils/proxy/solidity-0.8.0/ProxyOwned.sol";
import "../../utils/proxy/solidity-0.8.0/ProxyPausable.sol";

/// @title Storage for games (created or resolved), calculation for order-making bot processing
/// @author gruja
contract GamesQueue is Initializable, ProxyOwned, ProxyPausable {
    // create games queue
    mapping(uint => bytes32) public gamesCreateQueue;
    mapping(bytes32 => bool) public existingGamesInCreatedQueue;
    uint public firstCreated;
    uint public lastCreated;
    mapping(bytes32 => uint) private gameStartPerGameId;

    // resolve games queue
    bytes32[] public unproccessedGames;
    mapping(bytes32 => uint) public unproccessedGamesIndex;
    mapping(uint => bytes32) public gamesResolvedQueue;
    mapping(bytes32 => bool) public existingGamesInResolvedQueue;
    uint public firstResolved;
    uint public lastResolved;

    address public consumer;
    mapping(address => bool) public whitelistedAddresses;

    /// @notice public initialize proxy method
    /// @param _owner future owner of a contract
    function initialize(address _owner) public initializer {
        setOwner(_owner);
        firstCreated = 1;
        lastCreated = 0;
        firstResolved = 1;
        lastResolved = 0;
    }

    /// @notice putting game in a crated queue and fill up unprocessed games array
    /// @param data id of a game in byte32
    /// @param startTime game start time
    /// @param sportsId id of a sport (Example: NBA = 4 etc.)
    function enqueueGamesCreated(
        bytes32 data,
        uint startTime,
        uint sportsId
    ) public canExecuteFunction {
        lastCreated += 1;
        gamesCreateQueue[lastCreated] = data;

        existingGamesInCreatedQueue[data] = true;

        emit EnqueueGamesCreated(data, sportsId, lastCreated);
    }

    /// @notice removing first game in a queue from created queue
    /// @return data returns id of a game which is removed
    function dequeueGamesCreated() public canExecuteFunction returns (bytes32 data) {
        require(lastCreated >= firstCreated, "No more elements in a queue");

        data = gamesCreateQueue[firstCreated];

        delete gamesCreateQueue[firstCreated];
        firstCreated += 1;

        emit DequeueGamesCreated(data, firstResolved - 1);
    }

    /// @notice putting game in a resolved queue
    /// @param data id of a game in byte32
    function enqueueGamesResolved(bytes32 data) public canExecuteFunction {
        lastResolved += 1;
        gamesResolvedQueue[lastResolved] = data;
        existingGamesInResolvedQueue[data] = true;

        emit EnqueueGamesResolved(data, lastCreated);
    }

    /// @notice removing first game in a queue from resolved queue
    /// @return data returns id of a game which is removed
    function dequeueGamesResolved() public canExecuteFunction returns (bytes32 data) {
        require(lastResolved >= firstResolved, "No more elements in a queue");

        data = gamesResolvedQueue[firstResolved];

        delete gamesResolvedQueue[firstResolved];
        firstResolved += 1;

        emit DequeueGamesResolved(data, firstResolved - 1);
    }

    /// @notice sets the consumer contract address, which only owner can execute
    /// @param _consumer address of a consumer contract
    function setConsumerAddress(address _consumer) external onlyOwner {
        require(_consumer != address(0), "Invalid address");
        consumer = _consumer;
        emit NewConsumerAddress(_consumer);
    }

    /// @notice adding/removing whitelist address depending on a flag
    /// @param _whitelistAddress address that needed to be whitelisted/ ore removed from WL
    /// @param _flag adding or removing from whitelist (true: add, false: remove)
    function addToWhitelist(address _whitelistAddress, bool _flag) external onlyOwner {
        require(_whitelistAddress != address(0) && whitelistedAddresses[_whitelistAddress] != _flag, "Invalid");
        whitelistedAddresses[_whitelistAddress] = _flag;
        emit AddedIntoWhitelist(_whitelistAddress, _flag);
    }

    modifier canExecuteFunction() {
        require(msg.sender == consumer || whitelistedAddresses[msg.sender], "Only consumer or whitelisted address");
        _;
    }

    event EnqueueGamesCreated(bytes32 _gameId, uint _sportId, uint _index);
    event EnqueueGamesResolved(bytes32 _gameId, uint _index);
    event DequeueGamesCreated(bytes32 _gameId, uint _index);
    event DequeueGamesResolved(bytes32 _gameId, uint _index);
    event NewConsumerAddress(address _consumer);
    event AddedIntoWhitelist(address _whitelistAddress, bool _flag);
}

File 2 of 7 : PausableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    function __Pausable_init() internal onlyInitializing {
        __Context_init_unchained();
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal onlyInitializing {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
    uint256[49] private __gap;
}

File 3 of 7 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

File 4 of 7 : ProxyOwned.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// Clone of syntetix contract without constructor
contract ProxyOwned {
    address public owner;
    address public nominatedOwner;
    bool private _initialized;
    bool private _transferredAtInit;

    function setOwner(address _owner) public {
        require(_owner != address(0), "Owner address cannot be 0");
        require(!_initialized, "Already initialized, use nominateNewOwner");
        _initialized = true;
        owner = _owner;
        emit OwnerChanged(address(0), _owner);
    }

    function nominateNewOwner(address _owner) external onlyOwner {
        nominatedOwner = _owner;
        emit OwnerNominated(_owner);
    }

    function acceptOwnership() external {
        require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership");
        emit OwnerChanged(owner, nominatedOwner);
        owner = nominatedOwner;
        nominatedOwner = address(0);
    }

    function transferOwnershipAtInit(address proxyAddress) external onlyOwner {
        require(proxyAddress != address(0), "Invalid address");
        require(!_transferredAtInit, "Already transferred");
        owner = proxyAddress;
        _transferredAtInit = true;
        emit OwnerChanged(owner, proxyAddress);
    }

    modifier onlyOwner {
        _onlyOwner();
        _;
    }

    function _onlyOwner() private view {
        require(msg.sender == owner, "Only the contract owner may perform this action");
    }

    event OwnerNominated(address newOwner);
    event OwnerChanged(address oldOwner, address newOwner);
}

File 5 of 7 : ProxyPausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// Inheritance
import "./ProxyOwned.sol";

// Clone of syntetix contract without constructor

contract ProxyPausable is ProxyOwned {
    uint public lastPauseTime;
    bool public paused;

    

    /**
     * @notice Change the paused state of the contract
     * @dev Only the contract owner may call this.
     */
    function setPaused(bool _paused) external onlyOwner {
        // Ensure we're actually changing the state before we do anything
        if (_paused == paused) {
            return;
        }

        // Set our paused state.
        paused = _paused;

        // If applicable, set the last pause time.
        if (paused) {
            lastPauseTime = block.timestamp;
        }

        // Let everyone know that our pause state has changed.
        emit PauseChanged(paused);
    }

    event PauseChanged(bool isPaused);

    modifier notPaused {
        require(!paused, "This action cannot be performed while the contract is paused");
        _;
    }
}

File 6 of 7 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

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

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
    uint256[50] private __gap;
}

File 7 of 7 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_whitelistAddress","type":"address"},{"indexed":false,"internalType":"bool","name":"_flag","type":"bool"}],"name":"AddedIntoWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"_gameId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"_index","type":"uint256"}],"name":"DequeueGamesCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"_gameId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"_index","type":"uint256"}],"name":"DequeueGamesResolved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"_gameId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"_sportId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_index","type":"uint256"}],"name":"EnqueueGamesCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"_gameId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"_index","type":"uint256"}],"name":"EnqueueGamesResolved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_consumer","type":"address"}],"name":"NewConsumerAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isPaused","type":"bool"}],"name":"PauseChanged","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_whitelistAddress","type":"address"},{"internalType":"bool","name":"_flag","type":"bool"}],"name":"addToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"consumer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dequeueGamesCreated","outputs":[{"internalType":"bytes32","name":"data","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dequeueGamesResolved","outputs":[{"internalType":"bytes32","name":"data","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"data","type":"bytes32"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"sportsId","type":"uint256"}],"name":"enqueueGamesCreated","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"data","type":"bytes32"}],"name":"enqueueGamesResolved","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"existingGamesInCreatedQueue","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"existingGamesInResolvedQueue","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"firstCreated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"firstResolved","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"gamesCreateQueue","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"gamesResolvedQueue","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastCreated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastPauseTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastResolved","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_consumer","type":"address"}],"name":"setConsumerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"proxyAddress","type":"address"}],"name":"transferOwnershipAtInit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"unproccessedGames","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"unproccessedGamesIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedAddresses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50611068806100206000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c806389daf7eb116100f9578063c04e4d6a11610097578063c4d66de811610071578063c4d66de8146103d2578063dc129963146103e5578063e9c962eb146103f8578063efe2c8a41461040b57600080fd5b8063c04e4d6a1461038c578063c0aa05b11461039f578063c3b83f5f146103bf57600080fd5b806391b4ded9116100d357806391b4ded914610354578063afff5a641461035d578063b4fd729614610366578063bc93233f1461037957600080fd5b806389daf7eb1461032a5780638da5cb5b146103325780638f0ac4531461034b57600080fd5b80634b408497116101665780636295e566116101405780636295e566146102f157806366b6f1a9146102fa57806377d078d71461031a57806379ba50971461032257600080fd5b80634b408497146102b057806353a47bb7146102b95780635c975abb146102e457600080fd5b80631627540c116101a25780631627540c146102445780631666d90f1461025757806316c38b3c1461027a578063394bcfe01461028d57600080fd5b806303aac5d5146101c957806306c933d8146101fc57806313af40351461022f575b600080fd5b6101e96101d7366004610f66565b60046020526000908152604090205481565b6040519081526020015b60405180910390f35b61021f61020a366004610ef9565b60106020526000908152604090205460ff1681565b60405190151581526020016101f3565b61024261023d366004610ef9565b61041e565b005b610242610252366004610ef9565b61055e565b61021f610265366004610f66565b60056020526000908152604090205460ff1681565b610242610288366004610f4c565b6105b4565b61021f61029b366004610f66565b600c6020526000908152604090205460ff1681565b6101e960065481565b6001546102cc906001600160a01b031681565b6040516001600160a01b0390911681526020016101f3565b60035461021f9060ff1681565b6101e9600d5481565b6101e9610308366004610f66565b600a6020526000908152604090205481565b6101e9610627565b610242610742565b6101e961083f565b6000546102cc906201000090046001600160a01b031681565b6101e9600e5481565b6101e960025481565b6101e960075481565b600f546102cc906001600160a01b031681565b610242610387366004610f1a565b61093f565b61024261039a366004610f66565b610a17565b6101e96103ad366004610f66565b600b6020526000908152604090205481565b6102426103cd366004610ef9565b610ad4565b6102426103e0366004610ef9565b610bed565b6101e96103f3366004610f66565b610cc7565b610242610406366004610f7e565b610ce8565b610242610419366004610ef9565b610db5565b6001600160a01b0381166104795760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f7420626520300000000000000060448201526064015b60405180910390fd5b600154600160a01b900460ff16156104e55760405162461bcd60e51b815260206004820152602960248201527f416c726561647920696e697469616c697a65642c20757365206e6f6d696e617460448201526832a732bba7bbb732b960b91b6064820152608401610470565b6001805460ff60a01b1916600160a01b179055600080546001600160a01b03831662010000810262010000600160b01b03199092169190911782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91015b60405180910390a150565b610566610e53565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290602001610553565b6105bc610e53565b60035460ff16151581151514156105d05750565b6003805460ff191682151590811790915560ff16156105ee57426002555b60035460405160ff909116151581527f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec590602001610553565b600f546000906001600160a01b031633148061065257503360009081526010602052604090205460ff165b61066e5760405162461bcd60e51b815260040161047090610fa9565b600d54600e5410156106c25760405162461bcd60e51b815260206004820152601b60248201527f4e6f206d6f726520656c656d656e747320696e206120717565756500000000006044820152606401610470565b50600d80546000908152600b602052604081208054908290558254909260019290916106ef908490610fed565b925050819055507fb94b3cfa603021528c5796946b5e346a9f95d58bf682ab179b731461f723c1a4816001600d546107279190611005565b6040805192835260208301919091520160405180910390a190565b6001546001600160a01b031633146107ba5760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b6064820152608401610470565b60005460015460408051620100009093046001600160a01b03908116845290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a1600180546000805462010000600160b01b0319166001600160a01b03831662010000021790556001600160a01b0319169055565b600f546000906001600160a01b031633148061086a57503360009081526010602052604090205460ff165b6108865760405162461bcd60e51b815260040161047090610fa9565b60065460075410156108da5760405162461bcd60e51b815260206004820152601b60248201527f4e6f206d6f726520656c656d656e747320696e206120717565756500000000006044820152606401610470565b50600680546000908152600460205260408120805490829055825490926001929091610907908490610fed565b925050819055507f9f101f42d2469461d621ef8bbfa4ef14f6a3144364829e8815b3ab3f9b1a42b5816001600d546107279190611005565b610947610e53565b6001600160a01b0382161580159061097e57506001600160a01b03821660009081526010602052604090205460ff16151581151514155b6109b45760405162461bcd60e51b8152602060048201526007602482015266125b9d985b1a5960ca1b6044820152606401610470565b6001600160a01b038216600081815260106020908152604091829020805460ff19168515159081179091558251938452908301527f58d7a3ccc34541e162fcfc87b84be7b78c34d1e1e7f15de6e4dd67d0fe70aecd910160405180910390a15050565b600f546001600160a01b0316331480610a3f57503360009081526010602052604090205460ff165b610a5b5760405162461bcd60e51b815260040161047090610fa9565b6001600e6000828254610a6e9190610fed565b9091555050600e546000908152600b60209081526040808320849055838352600c825291829020805460ff191660011790556007548251848152918201527f9d67e0f509ed4e0d425aa94ee9e682029fc88618bec8261b155fd8dd5ac663a09101610553565b610adc610e53565b6001600160a01b038116610b245760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610470565b600154600160a81b900460ff1615610b745760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481d1c985b9cd9995c9c9959606a1b6044820152606401610470565b600080546001600160a01b038381166201000081810262010000600160b01b031990941693909317938490556001805460ff60a81b1916600160a81b1790556040805193909404909116825260208201527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9101610553565b600054610100900460ff16610c085760005460ff1615610c0c565b303b155b610c6f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610470565b600054610100900460ff16158015610c91576000805461ffff19166101011790555b610c9a8261041e565b6001600681905560006007819055600d91909155600e558015610cc3576000805461ff00191690555b5050565b60098181548110610cd757600080fd5b600091825260209091200154905081565b600f546001600160a01b0316331480610d1057503360009081526010602052604090205460ff165b610d2c5760405162461bcd60e51b815260040161047090610fa9565b600160076000828254610d3f9190610fed565b90915550506007805460009081526004602090815260408083208790558683526005825291829020805460ff1916600117905591548151868152928301849052908201527f125cee844c455389f464f911e498006c82fbb9307b464f52d57a039d7bb47cf59060600160405180910390a1505050565b610dbd610e53565b6001600160a01b038116610e055760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610470565b600f80546001600160a01b0319166001600160a01b0383169081179091556040519081527f5f56489645cc15092ffab877840903cb7715aca3464f50d3e323ed6465777bbb90602001610553565b6000546201000090046001600160a01b03163314610ecb5760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b6064820152608401610470565b565b80356001600160a01b0381168114610ee457600080fd5b919050565b80358015158114610ee457600080fd5b600060208284031215610f0a578081fd5b610f1382610ecd565b9392505050565b60008060408385031215610f2c578081fd5b610f3583610ecd565b9150610f4360208401610ee9565b90509250929050565b600060208284031215610f5d578081fd5b610f1382610ee9565b600060208284031215610f77578081fd5b5035919050565b600080600060608486031215610f92578081fd5b505081359360208301359350604090920135919050565b60208082526024908201527f4f6e6c7920636f6e73756d6572206f722077686974656c6973746564206164646040820152637265737360e01b606082015260800190565b600082198211156110005761100061101c565b500190565b6000828210156110175761101761101c565b500390565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220f7528ac3f101cbd5be4e01b2e540c7cda829501ace5f5f72d83e5c70f1f7308064736f6c63430008040033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101c45760003560e01c806389daf7eb116100f9578063c04e4d6a11610097578063c4d66de811610071578063c4d66de8146103d2578063dc129963146103e5578063e9c962eb146103f8578063efe2c8a41461040b57600080fd5b8063c04e4d6a1461038c578063c0aa05b11461039f578063c3b83f5f146103bf57600080fd5b806391b4ded9116100d357806391b4ded914610354578063afff5a641461035d578063b4fd729614610366578063bc93233f1461037957600080fd5b806389daf7eb1461032a5780638da5cb5b146103325780638f0ac4531461034b57600080fd5b80634b408497116101665780636295e566116101405780636295e566146102f157806366b6f1a9146102fa57806377d078d71461031a57806379ba50971461032257600080fd5b80634b408497146102b057806353a47bb7146102b95780635c975abb146102e457600080fd5b80631627540c116101a25780631627540c146102445780631666d90f1461025757806316c38b3c1461027a578063394bcfe01461028d57600080fd5b806303aac5d5146101c957806306c933d8146101fc57806313af40351461022f575b600080fd5b6101e96101d7366004610f66565b60046020526000908152604090205481565b6040519081526020015b60405180910390f35b61021f61020a366004610ef9565b60106020526000908152604090205460ff1681565b60405190151581526020016101f3565b61024261023d366004610ef9565b61041e565b005b610242610252366004610ef9565b61055e565b61021f610265366004610f66565b60056020526000908152604090205460ff1681565b610242610288366004610f4c565b6105b4565b61021f61029b366004610f66565b600c6020526000908152604090205460ff1681565b6101e960065481565b6001546102cc906001600160a01b031681565b6040516001600160a01b0390911681526020016101f3565b60035461021f9060ff1681565b6101e9600d5481565b6101e9610308366004610f66565b600a6020526000908152604090205481565b6101e9610627565b610242610742565b6101e961083f565b6000546102cc906201000090046001600160a01b031681565b6101e9600e5481565b6101e960025481565b6101e960075481565b600f546102cc906001600160a01b031681565b610242610387366004610f1a565b61093f565b61024261039a366004610f66565b610a17565b6101e96103ad366004610f66565b600b6020526000908152604090205481565b6102426103cd366004610ef9565b610ad4565b6102426103e0366004610ef9565b610bed565b6101e96103f3366004610f66565b610cc7565b610242610406366004610f7e565b610ce8565b610242610419366004610ef9565b610db5565b6001600160a01b0381166104795760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f7420626520300000000000000060448201526064015b60405180910390fd5b600154600160a01b900460ff16156104e55760405162461bcd60e51b815260206004820152602960248201527f416c726561647920696e697469616c697a65642c20757365206e6f6d696e617460448201526832a732bba7bbb732b960b91b6064820152608401610470565b6001805460ff60a01b1916600160a01b179055600080546001600160a01b03831662010000810262010000600160b01b03199092169190911782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91015b60405180910390a150565b610566610e53565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290602001610553565b6105bc610e53565b60035460ff16151581151514156105d05750565b6003805460ff191682151590811790915560ff16156105ee57426002555b60035460405160ff909116151581527f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec590602001610553565b600f546000906001600160a01b031633148061065257503360009081526010602052604090205460ff165b61066e5760405162461bcd60e51b815260040161047090610fa9565b600d54600e5410156106c25760405162461bcd60e51b815260206004820152601b60248201527f4e6f206d6f726520656c656d656e747320696e206120717565756500000000006044820152606401610470565b50600d80546000908152600b602052604081208054908290558254909260019290916106ef908490610fed565b925050819055507fb94b3cfa603021528c5796946b5e346a9f95d58bf682ab179b731461f723c1a4816001600d546107279190611005565b6040805192835260208301919091520160405180910390a190565b6001546001600160a01b031633146107ba5760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b6064820152608401610470565b60005460015460408051620100009093046001600160a01b03908116845290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a1600180546000805462010000600160b01b0319166001600160a01b03831662010000021790556001600160a01b0319169055565b600f546000906001600160a01b031633148061086a57503360009081526010602052604090205460ff165b6108865760405162461bcd60e51b815260040161047090610fa9565b60065460075410156108da5760405162461bcd60e51b815260206004820152601b60248201527f4e6f206d6f726520656c656d656e747320696e206120717565756500000000006044820152606401610470565b50600680546000908152600460205260408120805490829055825490926001929091610907908490610fed565b925050819055507f9f101f42d2469461d621ef8bbfa4ef14f6a3144364829e8815b3ab3f9b1a42b5816001600d546107279190611005565b610947610e53565b6001600160a01b0382161580159061097e57506001600160a01b03821660009081526010602052604090205460ff16151581151514155b6109b45760405162461bcd60e51b8152602060048201526007602482015266125b9d985b1a5960ca1b6044820152606401610470565b6001600160a01b038216600081815260106020908152604091829020805460ff19168515159081179091558251938452908301527f58d7a3ccc34541e162fcfc87b84be7b78c34d1e1e7f15de6e4dd67d0fe70aecd910160405180910390a15050565b600f546001600160a01b0316331480610a3f57503360009081526010602052604090205460ff165b610a5b5760405162461bcd60e51b815260040161047090610fa9565b6001600e6000828254610a6e9190610fed565b9091555050600e546000908152600b60209081526040808320849055838352600c825291829020805460ff191660011790556007548251848152918201527f9d67e0f509ed4e0d425aa94ee9e682029fc88618bec8261b155fd8dd5ac663a09101610553565b610adc610e53565b6001600160a01b038116610b245760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610470565b600154600160a81b900460ff1615610b745760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481d1c985b9cd9995c9c9959606a1b6044820152606401610470565b600080546001600160a01b038381166201000081810262010000600160b01b031990941693909317938490556001805460ff60a81b1916600160a81b1790556040805193909404909116825260208201527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9101610553565b600054610100900460ff16610c085760005460ff1615610c0c565b303b155b610c6f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610470565b600054610100900460ff16158015610c91576000805461ffff19166101011790555b610c9a8261041e565b6001600681905560006007819055600d91909155600e558015610cc3576000805461ff00191690555b5050565b60098181548110610cd757600080fd5b600091825260209091200154905081565b600f546001600160a01b0316331480610d1057503360009081526010602052604090205460ff165b610d2c5760405162461bcd60e51b815260040161047090610fa9565b600160076000828254610d3f9190610fed565b90915550506007805460009081526004602090815260408083208790558683526005825291829020805460ff1916600117905591548151868152928301849052908201527f125cee844c455389f464f911e498006c82fbb9307b464f52d57a039d7bb47cf59060600160405180910390a1505050565b610dbd610e53565b6001600160a01b038116610e055760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610470565b600f80546001600160a01b0319166001600160a01b0383169081179091556040519081527f5f56489645cc15092ffab877840903cb7715aca3464f50d3e323ed6465777bbb90602001610553565b6000546201000090046001600160a01b03163314610ecb5760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b6064820152608401610470565b565b80356001600160a01b0381168114610ee457600080fd5b919050565b80358015158114610ee457600080fd5b600060208284031215610f0a578081fd5b610f1382610ecd565b9392505050565b60008060408385031215610f2c578081fd5b610f3583610ecd565b9150610f4360208401610ee9565b90509250929050565b600060208284031215610f5d578081fd5b610f1382610ee9565b600060208284031215610f77578081fd5b5035919050565b600080600060608486031215610f92578081fd5b505081359360208301359350604090920135919050565b60208082526024908201527f4f6e6c7920636f6e73756d6572206f722077686974656c6973746564206164646040820152637265737360e01b606082015260800190565b600082198211156110005761100061101c565b500190565b6000828210156110175761101761101c565b500390565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220f7528ac3f101cbd5be4e01b2e540c7cda829501ace5f5f72d83e5c70f1f7308064736f6c63430008040033

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading