APE Price: $0.62 (+3.39%)

Contract

0x40c76F235AA3E0C05d3E77bBCf298fA7A2C313f7

Overview

APE Balance

Apechain LogoApechain LogoApechain Logo0 APE

APE Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Pause107239732025-02-28 21:45:2512 hrs ago1740779125IN
0x40c76F23...7A2C313f7
0 APE0.0009055125.42069
Genesis Lock Rou...107239332025-02-28 21:44:1612 hrs ago1740779056IN
0x40c76F23...7A2C313f7
0 APE0.0009771425.42069
Genesis Start Ro...107237532025-02-28 21:38:2212 hrs ago1740778702IN
0x40c76F23...7A2C313f7
0 APE0.0033075625.42069
Unpause107237362025-02-28 21:37:5112 hrs ago1740778671IN
0x40c76F23...7A2C313f7
0 APE0.0009706825.42069
Pause107237322025-02-28 21:37:1912 hrs ago1740778639IN
0x40c76F23...7A2C313f7
0 APE0.0009055125.42069
Genesis Lock Rou...107231902025-02-28 21:24:5913 hrs ago1740777899IN
0x40c76F23...7A2C313f7
0 APE0.0009771425.42069
Genesis Start Ro...107228312025-02-28 21:19:0313 hrs ago1740777543IN
0x40c76F23...7A2C313f7
0 APE0.0033075625.42069
Unpause107228192025-02-28 21:18:3113 hrs ago1740777511IN
0x40c76F23...7A2C313f7
0 APE0.0009706825.42069
Pause107228072025-02-28 21:18:2213 hrs ago1740777502IN
0x40c76F23...7A2C313f7
0 APE0.0009055125.42069
Genesis Start Ro...107227772025-02-28 21:17:0013 hrs ago1740777420IN
0x40c76F23...7A2C313f7
0 APE0.0037422525.42069
Unpause107227642025-02-28 21:16:4313 hrs ago1740777403IN
0x40c76F23...7A2C313f7
0 APE0.0008995125.42069
Pause107227592025-02-28 21:16:3413 hrs ago1740777394IN
0x40c76F23...7A2C313f7
0 APE0.0009055125.42069

Parent Transaction Hash Block From To
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ApePredictV2

Compiler Version
v0.8.28+commit.7893614a

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 9 : ApePredictV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

/**
 * @title ApePredict
 */
contract ApePredictV2 is Ownable, Pausable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    bool public genesisLockOnce = false;
    bool public genesisStartOnce = false;

    address public adminAddress;
    address public operatorAddress;

    uint256 public bufferSeconds;
    uint256 public intervalSeconds;

    uint256 public minBetAmount;
    uint256 public treasuryFee;
    uint256 public treasuryAmount;

    uint256 public currentEpoch;

    // Store price IDs from the price updater service
    string public lockPriceId;
    string public closePriceId;

    uint256 public constant MAX_TREASURY_FEE = 1000; // 10%

    mapping(uint256 => mapping(address => BetInfo)) public ledger;
    mapping(uint256 => Round) public rounds;
    mapping(address => uint256[]) public userRounds;

    enum Position {
        Bull,
        Bear
    }

    struct Round {
        uint256 epoch;
        uint256 startTimestamp;
        uint256 lockTimestamp;
        uint256 closeTimestamp;
        int256 lockPrice;
        int256 closePrice;
        string lockPriceId;    // Firebase price ID for lock price
        string closePriceId;   // Firebase price ID for close price
        uint256 totalAmount;
        uint256 bullAmount;
        uint256 bearAmount;
        uint256 rewardBaseCalAmount;
        uint256 rewardAmount;
        bool oracleCalled;     // Keep for compatibility
    }

    struct BetInfo {
        Position position;
        uint256 amount;
        bool claimed;
    }

    event BetBear(address indexed sender, uint256 indexed epoch, uint256 amount);
    event BetBull(address indexed sender, uint256 indexed epoch, uint256 amount);
    event Claim(address indexed sender, uint256 indexed epoch, uint256 amount);
    event EndRound(uint256 indexed epoch, string priceId, int256 price);
    event LockRound(uint256 indexed epoch, string priceId, int256 price);
    event NewAdminAddress(address admin);
    event NewBufferAndIntervalSeconds(uint256 bufferSeconds, uint256 intervalSeconds);
    event NewMinBetAmount(uint256 indexed epoch, uint256 minBetAmount);
    event NewTreasuryFee(uint256 indexed epoch, uint256 treasuryFee);
    event NewOperatorAddress(address operator);
    event Pause(uint256 indexed epoch);
    event RewardsCalculated(
        uint256 indexed epoch,
        uint256 rewardBaseCalAmount,
        uint256 rewardAmount,
        uint256 treasuryAmount
    );
    event StartRound(uint256 indexed epoch);
    event TokenRecovery(address indexed token, uint256 amount);
    event TreasuryClaim(uint256 amount);
    event Unpause(uint256 indexed epoch);

    modifier onlyAdmin() {
        require(msg.sender == adminAddress, "Not admin");
        _;
    }

    modifier onlyAdminOrOperator() {
        require(msg.sender == adminAddress || msg.sender == operatorAddress, "Not operator/admin");
        _;
    }

    modifier onlyOperator() {
        require(msg.sender == operatorAddress, "Not operator");
        _;
    }

    modifier notContract() {
        require(!_isContract(msg.sender), "Contract not allowed");
        require(msg.sender == tx.origin, "Proxy contract not allowed");
        _;
    }

    constructor(
        address _adminAddress,
        address _operatorAddress,
        uint256 _intervalSeconds,
        uint256 _bufferSeconds,
        uint256 _minBetAmount,
        uint256 _treasuryFee
    ) {
        require(_treasuryFee <= MAX_TREASURY_FEE, "Treasury fee too high");

        adminAddress = _adminAddress;
        operatorAddress = _operatorAddress;
        intervalSeconds = _intervalSeconds;
        bufferSeconds = _bufferSeconds;
        minBetAmount = _minBetAmount;
        treasuryFee = _treasuryFee;
    }

    function betBear(uint256 epoch) external payable whenNotPaused nonReentrant notContract {
        require(epoch == currentEpoch, "Bet is too early/late");
        require(_bettable(epoch), "Round not bettable");
        require(msg.value >= minBetAmount, "Bet amount must be greater than minBetAmount");
        require(ledger[epoch][msg.sender].amount == 0, "Can only bet once per round");

        uint256 amount = msg.value;
        Round storage round = rounds[epoch];
        round.totalAmount = round.totalAmount + amount;
        round.bearAmount = round.bearAmount + amount;

        BetInfo storage betInfo = ledger[epoch][msg.sender];
        betInfo.position = Position.Bear;
        betInfo.amount = amount;
        userRounds[msg.sender].push(epoch);

        emit BetBear(msg.sender, epoch, amount);
    }

    function betBull(uint256 epoch) external payable whenNotPaused nonReentrant notContract {
        require(epoch == currentEpoch, "Bet is too early/late");
        require(_bettable(epoch), "Round not bettable");
        require(msg.value >= minBetAmount, "Bet amount must be greater than minBetAmount");
        require(ledger[epoch][msg.sender].amount == 0, "Can only bet once per round");

        uint256 amount = msg.value;
        Round storage round = rounds[epoch];
        round.totalAmount = round.totalAmount + amount;
        round.bullAmount = round.bullAmount + amount;

        BetInfo storage betInfo = ledger[epoch][msg.sender];
        betInfo.position = Position.Bull;
        betInfo.amount = amount;
        userRounds[msg.sender].push(epoch);

        emit BetBull(msg.sender, epoch, amount);
    }

    function claim(uint256[] calldata epochs) external nonReentrant notContract {
        uint256 reward; // Initializes reward

        for (uint256 i = 0; i < epochs.length; i++) {
            require(rounds[epochs[i]].startTimestamp != 0, "Round has not started");
            require(block.timestamp > rounds[epochs[i]].closeTimestamp, "Round has not ended");

            uint256 addedReward = 0;

            // Round valid, claim rewards
            if (rounds[epochs[i]].oracleCalled) {
                require(claimable(epochs[i], msg.sender), "Not eligible for claim");
                Round memory round = rounds[epochs[i]];
                addedReward = (ledger[epochs[i]][msg.sender].amount * round.rewardAmount) / round.rewardBaseCalAmount;
            }
            // Round invalid, refund bet amount
            else {
                require(refundable(epochs[i], msg.sender), "Not eligible for refund");
                addedReward = ledger[epochs[i]][msg.sender].amount;
            }

            ledger[epochs[i]][msg.sender].claimed = true;
            reward += addedReward;

            emit Claim(msg.sender, epochs[i], addedReward);
        }

        if (reward > 0) {
            _safeTransferBNB(address(msg.sender), reward);
        }
    }

    function executeRound(
        int256 currentPrice,
        string calldata priceId
    ) external whenNotPaused onlyOperator {
        require(
            genesisStartOnce && genesisLockOnce,
            "Can only run after genesisStartRound and genesisLockRound is triggered"
        );

        // CurrentEpoch refers to previous round (n-1)
        _safeLockRound(currentEpoch, currentPrice, priceId);
        _safeEndRound(currentEpoch - 1, currentPrice, priceId);
        _calculateRewards(currentEpoch - 1);

        // Increment currentEpoch to current round (n)
        currentEpoch = currentEpoch + 1;
        _safeStartRound(currentEpoch);
    }

    function genesisLockRound(
        int256 currentPrice,
        string calldata priceId
    ) external whenNotPaused onlyOperator {
        require(genesisStartOnce, "Can only run after genesisStartRound is triggered");
        require(!genesisLockOnce, "Can only run genesisLockRound once");

        _safeLockRound(currentEpoch, currentPrice, priceId);

        currentEpoch = currentEpoch + 1;
        _startRound(currentEpoch);
        genesisLockOnce = true;
    }

    function genesisStartRound() external whenNotPaused onlyOperator {
        require(!genesisStartOnce, "Can only run genesisStartRound once");

        currentEpoch = currentEpoch + 1;
        _startRound(currentEpoch);
        genesisStartOnce = true;
    }

    function pause() external whenNotPaused onlyAdminOrOperator {
        _pause();

        emit Pause(currentEpoch);
    }

    function unpause() external whenPaused onlyAdminOrOperator {
        genesisStartOnce = false;
        genesisLockOnce = false;
        _unpause();

        emit Unpause(currentEpoch);
    }

    function claimTreasury() external nonReentrant onlyAdmin {
        uint256 currentTreasuryAmount = treasuryAmount;
        treasuryAmount = 0;
        _safeTransferBNB(adminAddress, currentTreasuryAmount);

        emit TreasuryClaim(currentTreasuryAmount);
    }

    function setBufferAndIntervalSeconds(uint256 _bufferSeconds, uint256 _intervalSeconds)
        external
        whenPaused
        onlyAdmin
    {
        require(_bufferSeconds < _intervalSeconds, "bufferSeconds must be inferior to intervalSeconds");
        bufferSeconds = _bufferSeconds;
        intervalSeconds = _intervalSeconds;

        emit NewBufferAndIntervalSeconds(_bufferSeconds, _intervalSeconds);
    }

    function setMinBetAmount(uint256 _minBetAmount) external whenPaused onlyAdmin {
        require(_minBetAmount != 0, "Must be superior to 0");
        minBetAmount = _minBetAmount;

        emit NewMinBetAmount(currentEpoch, minBetAmount);
    }

    function setOperator(address _operatorAddress) external onlyAdmin {
        require(_operatorAddress != address(0), "Cannot be zero address");
        operatorAddress = _operatorAddress;

        emit NewOperatorAddress(_operatorAddress);
    }

    function setTreasuryFee(uint256 _treasuryFee) external whenPaused onlyAdmin {
        require(_treasuryFee <= MAX_TREASURY_FEE, "Treasury fee too high");
        treasuryFee = _treasuryFee;

        emit NewTreasuryFee(currentEpoch, treasuryFee);
    }

    function recoverToken(address _token, uint256 _amount) external onlyOwner {
        IERC20(_token).safeTransfer(address(msg.sender), _amount);

        emit TokenRecovery(_token, _amount);
    }

    function setAdmin(address _adminAddress) external onlyOwner {
        require(_adminAddress != address(0), "Cannot be zero address");
        adminAddress = _adminAddress;

        emit NewAdminAddress(_adminAddress);
    }

    function getUserRounds(
        address user,
        uint256 cursor,
        uint256 size
    )
        external
        view
        returns (
            uint256[] memory,
            BetInfo[] memory,
            uint256
        )
    {
        uint256 length = size;

        if (length > userRounds[user].length - cursor) {
            length = userRounds[user].length - cursor;
        }

        uint256[] memory values = new uint256[](length);
        BetInfo[] memory betInfo = new BetInfo[](length);

        for (uint256 i = 0; i < length; i++) {
            values[i] = userRounds[user][cursor + i];
            betInfo[i] = ledger[values[i]][user];
        }

        return (values, betInfo, cursor + length);
    }

    function getUserRoundsLength(address user) external view returns (uint256) {
        return userRounds[user].length;
    }

    function claimable(uint256 epoch, address user) public view returns (bool) {
        BetInfo memory betInfo = ledger[epoch][user];
        Round memory round = rounds[epoch];
        if (round.lockPrice == round.closePrice) {
            return false;
        }
        return
            round.oracleCalled &&
            betInfo.amount != 0 &&
            !betInfo.claimed &&
            ((round.closePrice > round.lockPrice && betInfo.position == Position.Bull) ||
                (round.closePrice < round.lockPrice && betInfo.position == Position.Bear));
    }

    function refundable(uint256 epoch, address user) public view returns (bool) {
        BetInfo memory betInfo = ledger[epoch][user];
        Round memory round = rounds[epoch];
        return
            !round.oracleCalled &&
            !betInfo.claimed &&
            block.timestamp > round.closeTimestamp + bufferSeconds &&
            betInfo.amount != 0;
    }

    function _calculateRewards(uint256 epoch) internal {
        require(rounds[epoch].rewardBaseCalAmount == 0 && rounds[epoch].rewardAmount == 0, "Rewards calculated");
        Round storage round = rounds[epoch];
        uint256 rewardBaseCalAmount;
        uint256 treasuryAmt;
        uint256 rewardAmount;

        // Bull wins
        if (round.closePrice > round.lockPrice) {
            rewardBaseCalAmount = round.bullAmount;
            treasuryAmt = (round.totalAmount * treasuryFee) / 10000;
            rewardAmount = round.totalAmount - treasuryAmt;
        }
        // Bear wins
        else if (round.closePrice < round.lockPrice) {
            rewardBaseCalAmount = round.bearAmount;
            treasuryAmt = (round.totalAmount * treasuryFee) / 10000;
            rewardAmount = round.totalAmount - treasuryAmt;
        }
        // House wins
        else {
            rewardBaseCalAmount = 0;
            rewardAmount = 0;
            treasuryAmt = round.totalAmount;
        }
        round.rewardBaseCalAmount = rewardBaseCalAmount;
        round.rewardAmount = rewardAmount;

        // Add to treasury
        treasuryAmount += treasuryAmt;

        emit RewardsCalculated(epoch, rewardBaseCalAmount, rewardAmount, treasuryAmt);
    }

    function _safeEndRound(
        uint256 epoch,
        int256 price,
        string calldata priceId
    ) internal {
        require(rounds[epoch].lockTimestamp != 0, "Can only end round after round has locked");
        require(block.timestamp >= rounds[epoch].closeTimestamp, "Can only end round after closeTimestamp");
        require(
            block.timestamp <= rounds[epoch].closeTimestamp + bufferSeconds,
            "Can only end round within bufferSeconds"
        );
        Round storage round = rounds[epoch];
        round.closePrice = price;
        round.closePriceId = priceId;
        round.oracleCalled = true;

        emit EndRound(epoch, priceId, round.closePrice);
    }

    function _safeLockRound(
        uint256 epoch,
        int256 price,
        string calldata priceId
    ) internal {
        require(rounds[epoch].startTimestamp != 0, "Can only lock round after round has started");
        require(block.timestamp >= rounds[epoch].lockTimestamp, "Can only lock round after lockTimestamp");
        require(
            block.timestamp <= rounds[epoch].lockTimestamp + bufferSeconds,
            "Can only lock round within bufferSeconds"
        );
        Round storage round = rounds[epoch];
        round.closeTimestamp = block.timestamp + intervalSeconds;
        round.lockPrice = price;
        round.lockPriceId = priceId;

        emit LockRound(epoch, priceId, round.lockPrice);
    }

    function _safeStartRound(uint256 epoch) internal {
        require(genesisStartOnce, "Can only run after genesisStartRound is triggered");
        require(rounds[epoch - 2].closeTimestamp != 0, "Can only start round after round n-2 has ended");
        require(
            block.timestamp >= rounds[epoch - 2].closeTimestamp,
            "Can only start new round after round n-2 closeTimestamp"
        );
        _startRound(epoch);
    }

    function _safeTransferBNB(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}("");
        require(success, "TransferHelper: BNB_TRANSFER_FAILED");
    }

    function _startRound(uint256 epoch) internal {
        Round storage round = rounds[epoch];
        round.startTimestamp = block.timestamp;
        round.lockTimestamp = block.timestamp + intervalSeconds;
        round.closeTimestamp = block.timestamp + (2 * intervalSeconds);
        round.epoch = epoch;
        round.totalAmount = 0;

        emit StartRound(epoch);
    }

    function _bettable(uint256 epoch) internal view returns (bool) {
        return
            rounds[epoch].startTimestamp != 0 &&
            rounds[epoch].lockTimestamp != 0 &&
            block.timestamp > rounds[epoch].startTimestamp &&
            block.timestamp < rounds[epoch].lockTimestamp;
    }

    function _isContract(address account) internal view returns (bool) {
        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }
}

File 2 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

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

File 3 of 9 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.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 Pausable is Context {
    /**
     * @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.
     */
    constructor() {
        _paused = false;
    }

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

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

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

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        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());
    }
}

File 4 of 9 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == _ENTERED;
    }
}

File 5 of 9 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 6 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

File 7 of 9 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}

File 8 of 9 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @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
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 9 of 9 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_adminAddress","type":"address"},{"internalType":"address","name":"_operatorAddress","type":"address"},{"internalType":"uint256","name":"_intervalSeconds","type":"uint256"},{"internalType":"uint256","name":"_bufferSeconds","type":"uint256"},{"internalType":"uint256","name":"_minBetAmount","type":"uint256"},{"internalType":"uint256","name":"_treasuryFee","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BetBear","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BetBull","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"string","name":"priceId","type":"string"},{"indexed":false,"internalType":"int256","name":"price","type":"int256"}],"name":"EndRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"string","name":"priceId","type":"string"},{"indexed":false,"internalType":"int256","name":"price","type":"int256"}],"name":"LockRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"admin","type":"address"}],"name":"NewAdminAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"bufferSeconds","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"intervalSeconds","type":"uint256"}],"name":"NewBufferAndIntervalSeconds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minBetAmount","type":"uint256"}],"name":"NewMinBetAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"operator","type":"address"}],"name":"NewOperatorAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"treasuryFee","type":"uint256"}],"name":"NewTreasuryFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardBaseCalAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"treasuryAmount","type":"uint256"}],"name":"RewardsCalculated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"StartRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenRecovery","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TreasuryClaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"MAX_TREASURY_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"adminAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"betBear","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"betBull","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"bufferSeconds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"epochs","type":"uint256[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"address","name":"user","type":"address"}],"name":"claimable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"closePriceId","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int256","name":"currentPrice","type":"int256"},{"internalType":"string","name":"priceId","type":"string"}],"name":"executeRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"genesisLockOnce","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int256","name":"currentPrice","type":"int256"},{"internalType":"string","name":"priceId","type":"string"}],"name":"genesisLockRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"genesisStartOnce","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"genesisStartRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"cursor","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"}],"name":"getUserRounds","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"components":[{"internalType":"enum ApePredictV2.Position","name":"position","type":"uint8"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"claimed","type":"bool"}],"internalType":"struct ApePredictV2.BetInfo[]","name":"","type":"tuple[]"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserRoundsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"intervalSeconds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"ledger","outputs":[{"internalType":"enum ApePredictV2.Position","name":"position","type":"uint8"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"claimed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockPriceId","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBetAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorAddress","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":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"address","name":"user","type":"address"}],"name":"refundable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rounds","outputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256","name":"startTimestamp","type":"uint256"},{"internalType":"uint256","name":"lockTimestamp","type":"uint256"},{"internalType":"uint256","name":"closeTimestamp","type":"uint256"},{"internalType":"int256","name":"lockPrice","type":"int256"},{"internalType":"int256","name":"closePrice","type":"int256"},{"internalType":"string","name":"lockPriceId","type":"string"},{"internalType":"string","name":"closePriceId","type":"string"},{"internalType":"uint256","name":"totalAmount","type":"uint256"},{"internalType":"uint256","name":"bullAmount","type":"uint256"},{"internalType":"uint256","name":"bearAmount","type":"uint256"},{"internalType":"uint256","name":"rewardBaseCalAmount","type":"uint256"},{"internalType":"uint256","name":"rewardAmount","type":"uint256"},{"internalType":"bool","name":"oracleCalled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_adminAddress","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bufferSeconds","type":"uint256"},{"internalType":"uint256","name":"_intervalSeconds","type":"uint256"}],"name":"setBufferAndIntervalSeconds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minBetAmount","type":"uint256"}],"name":"setMinBetAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operatorAddress","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_treasuryFee","type":"uint256"}],"name":"setTreasuryFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasuryFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userRounds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60803461016757601f61316438819003918201601f19168301916001600160401b0383118484101761016c5780849260c0946040528339810103126101675761004781610182565b9061005460208201610182565b604082015160608301519160a060808501519401519460005490604051913360018060a01b0382167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a36001600160a81b0319163360ff60a01b19161760005560018055600254916103e8881161012557506001600160b01b031990911660109190911b62010000600160b01b031617600255600380546001600160a01b0319166001600160a01b0392909216919091179055600555600455600655600755604051612fcd90816101978239f35b62461bcd60e51b815260206004820152601560248201527f54726561737572792066656520746f6f206869676800000000000000000000006044820152606490fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036101675756fe6080604052600436101561001257600080fd5b60003560e01c80623bdc7414611f6e5780630f74174f14611f4b578063127effb214611f22578063273867d414611ee85780632f94621c14611e1e578063368acb0914611e005780633f4ba83a14611d3f578063452fd75a14611c875780634f7104fc14611bdf57806352ce7c3a14611afa57806357fb096f146119dc5780635c975abb146119b65780636ba4c138146115ab5780636c18859314611500578063704b6c0214611476578063715018a61461141d5780637285c58b146113b1578063766718081461139357806377e741c7146112e55780637bf41254146112bf5780637d1cd04f146112a15780638456cb59146111df578063890dc766146111075780638c65c81f146110135780638da5cb5b14610fea578063951fd60014610d7d578063a0c7f71c14610d4d578063aa6b873a14610c28578063b29a814014610abf578063b3ab15fb14610a3c578063cc32d17614610a1e578063dd1f7596146109c5578063eaba2361146109a7578063f2b3c8091461098a578063f2fde38b146108c3578063f7fdec281461089d578063fa968eea1461087f578063fc6f9468146108525763fcf701c3146101c857600080fd5b3461084d576101d636612011565b6101de612a00565b6101f360018060a01b03600354163314612252565b60025460ff8160081c169081610842575b50156107c857610218818385600954612a76565b6009546000198101929083116105295782600052600d602052600260406000200154156107715782600052600d602052600360406000200154421061071c5782600052600d602052610275600360406000200154600454906122f3565b42116106c75782600052600d60205260406000209360058501908155600785019467ffffffffffffffff84116106b1576102af8654612065565b601f8111610669575b50600095601f85116001146105dd576103289291600d91867fd786ce19b848612c9c4cc3935f76eb7cbc18c694906b5a4e3107d1d6217d6cc098996000916105d2575b508760011b906000198960031b1c19161790555b01805460ff191660011790555460405193849384612a47565b0390a260095460001981019081116105295780600052600d602052600b6040600020015415806105b9575b1561057f5780600052600d6020527f6dfdfcb09c8804d0058826cd2539f1acfbe3cb887c9be03d928035bce0f1a58d606060406000206000600582015460048301549081811360001461053f57505050600981015490600c6008820154916103cb6127106103c36007548661254c565b0480946126ff565b9182915b85600b82015501556103e3826008546122f3565b60085560405192835260208301526040820152a26009546001810190818111610529578160095561041b60ff60025460081c1661228d565b60001901908082116105295781600052600d602052600360406000200154156104cd576000918252600d602052600360408320015442106104625761045f90612d61565b80f35b60405162461bcd60e51b815260206004820152603760248201527f43616e206f6e6c79207374617274206e657720726f756e64206166746572207260448201527f6f756e64206e2d3220636c6f736554696d657374616d700000000000000000006064820152608490fd5b60405162461bcd60e51b815260206004820152602e60248201527f43616e206f6e6c7920737461727420726f756e6420616674657220726f756e6460448201526d081b8b4c881a185cc8195b99195960921b6064820152608490fd5b634e487b7160e01b600052601160045260246000fd5b121561056e5750600a81015490600c6008820154916105666127106103c36007548661254c565b9182916103cf565b90600080600c6008840154936103cf565b60405162461bcd60e51b815260206004820152601260248201527114995dd85c991cc818d85b18dd5b185d195960721b6044820152606490fd5b5080600052600d602052600c6040600020015415610353565b9050860135386102fb565b8087526020872096601f198616815b8181106106515750917fd786ce19b848612c9c4cc3935f76eb7cbc18c694906b5a4e3107d1d6217d6cc0979861032895949288600d9510610637575b5050600187811b01905561030f565b87013560001960038a901b60f8161c191690553880610628565b868301358a55600190990198602092830192016105ec565b866000526020600020601f860160051c810191602087106106a7575b601f0160051c01905b81811061069b57506102b8565b6000815560010161068e565b9091508190610685565b634e487b7160e01b600052604160045260246000fd5b60405162461bcd60e51b815260206004820152602760248201527f43616e206f6e6c7920656e6420726f756e642077697468696e206275666665726044820152665365636f6e647360c81b6064820152608490fd5b60405162461bcd60e51b815260206004820152602760248201527f43616e206f6e6c7920656e6420726f756e6420616674657220636c6f7365546960448201526606d657374616d760cc1b6064820152608490fd5b60405162461bcd60e51b815260206004820152602960248201527f43616e206f6e6c7920656e6420726f756e6420616674657220726f756e642068604482015268185cc81b1bd8dad95960ba1b6064820152608490fd5b60405162461bcd60e51b815260206004820152604660248201527f43616e206f6e6c792072756e2061667465722067656e6573697353746172745260448201527f6f756e6420616e642067656e657369734c6f636b526f756e642069732074726960648201526519d9d95c995960d21b608482015260a490fd5b60ff91501638610204565b600080fd5b3461084d57600036600319011261084d5760025460405160109190911c6001600160a01b03168152602090f35b3461084d57600036600319011261084d576020600654604051908152f35b3461084d57600036600319011261084d57602060ff60025460081c166040519015158152f35b3461084d57602036600319011261084d576108dc611fe5565b6108e4612ea2565b6001600160a01b0316801561093657600080546001600160a01b03198116831782556001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b3461084d57600036600319011261084d5760206040516103e88152f35b3461084d57600036600319011261084d576020600454604051908152f35b3461084d57604036600319011261084d576109de611fe5565b6001600160a01b03166000908152600e602052604090208054602435919082101561084d57602091610a0f916121ec565b90549060031b1c604051908152f35b3461084d57600036600319011261084d576020600754604051908152f35b3461084d57602036600319011261084d577fc47d127c07bdd56c5ccba00463ce3bd3c1bca71b4670eea6e5d0c02e4aa156e26020610a78611fe5565b610a9060018060a01b0360025460101c16331461221a565b6001600160a01b0316610aa481151561255f565b600380546001600160a01b03191682179055604051908152a1005b3461084d57604036600319011261084d57610ad8611fe5565b60243590610ae4612ea2565b60018060a01b031690604051610b6f602082019163a9059cbb60e01b835233602482015283604482015260448152610b1d6064826120d8565b600080604094855193610b3087866120d8565b602085527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646020860152519082895af1610b68612956565b9086612efa565b8051908115918215610c05575b505015610baf577f14f11966a996e0629572e51064726d2057a80fbd34efc066682c06a71dbb6e989160209151908152a2005b5162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b819250906020918101031261084d5760200151801515810361084d578480610b7c565b602036600319011261084d57600435610c3f612a00565b610c47612900565b610c52333b15612341565b610c5d323314612384565b610c6a60095482146123d0565b610c7b610c7682612e28565b612414565b610c89600654341015612455565b6000818152600c60209081526040808320338452909152902060010154610cb090156124b6565b80600052600d602052600a604060002060088101610ccf3482546122f3565b905501610cdd3482546122f3565b90556000818152600c602090815260408083203384528252808320805460ff19166001908117825534910155600e9091529020610d1b908290612502565b6040513481527f0d8c1fe3e67ab767116a81f122b83c2557a8c2564019cb7c4f83de1aeb1f1f0d60203392a360018055005b3461084d57604036600319011261084d576020610d73610d6b611ffb565b600435612738565b6040519015158152f35b3461084d57606036600319011261084d57610d96611fe5565b6001600160a01b03166000818152600e60205260409020546024359160443591610dc19084906126ff565b8211610fca575b610dd18261270c565b91610ddf60405193846120d8565b808352610deb8161270c565b602084019490601f1901368637610e018261270c565b92610e0f60405194856120d8565b828452601f19610e1e8461270c565b0160005b818110610f9e57505060005b838110610edd57505090610e41916122f3565b604051926060840190606085525180915260808401949060005b818110610ec75750505082840360208401526020808351958681520192016000945b808610610e9257505082935060408301520390f35b90926020606060019260408751610eaa8382516121df565b848101518584015201511515604082015201940195019490610e7d565b8251875260209687019690920191600101610e5b565b81600052600e602052610efe6040600020610ef883866122f3565b906121ec565b90549060031b1c610f0f8288612724565b52610f1a8187612724565b51600052600c6020526040806000206000908482526020522090604051610f40816120bc565b60ff835416926002841015610f8857600260ff91600195845285810154602085015201541615156040820152610f768288612724565b52610f818187612724565b5001610e2e565b634e487b7160e01b600052602160045260246000fd5b602090604051610fad816120bc565b600081526000838201526000604082015282828901015201610e22565b809150600052600e602052610fe4826040600020546126ff565b90610dc8565b3461084d57600036600319011261084d576000546040516001600160a01b039091168152602090f35b3461084d57602036600319011261084d57600435600052600d60205260406000208054600182015491600281015460038201549160048101549260058201549360068301611060906120fa565b9461106d600785016120fa565b600885015496600986015492600a87015494600b88015496600c89015498600d015460ff16996040519d8e809e81526020015260408d015260608c015260808b015260a08a015260c089016101c090526101c089016110cb9161219e565b88810360e08a01526110dc9161219e565b9561010088015261012087015261014086015261016085015261018084015215156101a08301520390f35b3461084d57604036600319011261084d57600435602435611126612ddc565b61113e60018060a01b0360025460101c16331461221a565b8082101561118057816040917fe60149e0431fec12df63dfab5fce2a9cefe9a4d3df5f41cb626f579ae1f2b91a936004558060055582519182526020820152a1005b60405162461bcd60e51b815260206004820152603160248201527f6275666665725365636f6e6473206d75737420626520696e666572696f7220746044820152706f20696e74657276616c5365636f6e647360781b6064820152608490fd5b3461084d57600036600319011261084d576111f8612a00565b6002543360109190911c6001600160a01b031614801561128d575b61121c90612300565b611224612a00565b6000805460ff60a01b1916600160a01b1790556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25890602090a16009547f68b095021b1f40fe513109f513c66692f0b3219aee674a69f4efc57badb8201d600080a2005b506003546001600160a01b03163314611213565b3461084d57600036600319011261084d576020600554604051908152f35b3461084d57604036600319011261084d576020610d736112dd611ffb565b6004356125a4565b3461084d57602036600319011261084d57600435611301612ddc565b61131960018060a01b0360025460101c16331461221a565b6103e8811161135657806007557fb1c4ee38d35556741133da7ff9b6f7ab0fa88d0406133126ff128f635490a857602060095492604051908152a2005b60405162461bcd60e51b81526020600482015260156024820152740a8e4cac2e6eae4f240cccaca40e8dede40d0d2ced605b1b6044820152606490fd5b3461084d57600036600319011261084d576020600954604051908152f35b3461084d57604036600319011261084d57606060406113ce611ffb565b600435600052600c6020528160002060009160018060a01b031682526020522060ff8154169060ff60026001830154920154169061140f60405180946121df565b602083015215156040820152f35b3461084d57600036600319011261084d57611436612ea2565b600080546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461084d57602036600319011261084d577f137b621413925496477d46e5055ac0d56178bdd724ba8bf843afceef18268ba360206114b2611fe5565b6114ba612ea2565b6001600160a01b038116906114d082151561255f565b6002805462010000600160b01b03191660109290921b62010000600160b01b0316919091179055604051908152a1005b3461084d57602036600319011261084d5760043561151c612ddc565b61153460018060a01b0360025460101c16331461221a565b801561156e57806006557f90eb87c560a0213754ceb3a7fa3012f01acab0a35602c1e1995adf69dabc9d50602060095492604051908152a2005b60405162461bcd60e51b815260206004820152601560248201527404d757374206265207375706572696f7220746f203605c1b6044820152606490fd5b3461084d57602036600319011261084d5760043567ffffffffffffffff811161084d573660238201121561084d57806004013567ffffffffffffffff811161084d576024820191602436918360051b01011161084d57611609612900565b611614333b15612341565b61161f323314612384565b6000913390835b83811061164a57848061163a575b60018055005b6116449033612996565b80611634565b61165581858461253c565b35600052600d602052600160406000200154156119795761167781858461253c565b35600052600d60205260036040600020015442111561193e57600061169d82868561253c565b358152600d60205260ff600d604083200154166000146118af57506116cd336116c783878661253c565b35612738565b15611871576116dd81858461253c565b35600052600d60205260406000206117cf604051916116fb8361209f565b8054835260018101546020840152600281015460408401526003810154606084015260048101546080840152600581015460a084015261173d600682016120fa565b60c084015261174e600782016120fa565b60e084015260088101546101008401526009810154610120840152600a810154610140840152600b8101549261016081019384526101a060ff600d600c85015494610180850195865201541615159101526117aa84888761253c565b35600052600c602052600160408060002060009089825260205220015490519061254c565b9051906000821561185d57506001929161181d910480975b6117f284898861253c565b35600052600c60205260026040806000206000908a825260205220018560ff198254161790556122f3565b9561182982878661253c565b35906040519081527f34fcbac0073d7c3d388e51312faf357774904998eeb8fca628b9e6f65ee1cbf760203392a301611626565b634e487b7160e01b81526012600452602490fd5b60405162461bcd60e51b81526020600482015260166024820152754e6f7420656c696769626c6520666f7220636c61696d60501b6044820152606490fd5b906118c5336118bf83888761253c565b356125a4565b156118f95761181d6001604081946118de858a8961253c565b358152600c60205281812088825260205220015480976117e7565b60405162461bcd60e51b815260206004820152601760248201527f4e6f7420656c696769626c6520666f7220726566756e640000000000000000006044820152606490fd5b60405162461bcd60e51b8152602060048201526013602482015272149bdd5b99081a185cc81b9bdd08195b991959606a1b6044820152606490fd5b60405162461bcd60e51b8152602060048201526015602482015274149bdd5b99081a185cc81b9bdd081cdd185c9d1959605a1b6044820152606490fd5b3461084d57600036600319011261084d57602060ff60005460a01c166040519015158152f35b602036600319011261084d576004356119f3612a00565b6119fb612900565b611a06333b15612341565b611a11323314612384565b611a1e60095482146123d0565b611a2a610c7682612e28565b611a38600654341015612455565b6000818152600c60209081526040808320338452909152902060010154611a5f90156124b6565b80600052600d6020526009604060002060088101611a7e3482546122f3565b905501611a8c3482546122f3565b90556000818152600c602090815260408083203384528252808320805460ff1916815534600190910155600e9091529020611ac8908290612502565b6040513481527f438122d8cff518d18388099a5181f0d17a12b4f1b55faedf6e4a6acee0060c1260203392a360018055005b3461084d57600036600319011261084d576040516000600a54611b1c81612065565b8084529060018116908115611bbb5750600114611b5c575b611b5883611b44818503826120d8565b60405191829160208352602083019061219e565b0390f35b600a60009081527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8939250905b808210611ba157509091508101602001611b44611b34565b919260018160209254838588010152019101909291611b89565b60ff191660208086019190915291151560051b84019091019150611b449050611b34565b3461084d57600036600319011261084d576040516000600b54611c0181612065565b8084529060018116908115611bbb5750600114611c2857611b5883611b44818503826120d8565b600b60009081527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9939250905b808210611c6d57509091508101602001611b44611b34565b919260018160209254838588010152019101909291611c55565b3461084d57600036600319011261084d57611ca0612a00565b611cb560018060a01b03600354163314612252565b60ff60025460081c16611cee57600954600181018091116105295780611cdd91600955612d61565b6002805461ff001916610100179055005b60405162461bcd60e51b815260206004820152602360248201527f43616e206f6e6c792072756e2067656e657369735374617274526f756e64206f6044820152626e636560e81b6064820152608490fd5b3461084d57600036600319011261084d57611d58612ddc565b60025433601082901c6001600160a01b0316148015611dec575b611d7b90612300565b61ffff1916600255611d8b612ddc565b60ff60a01b19600054166000557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a16009547faaa520fdd7d2c83061d632fa017b0432407e798818af63ea908589fceda39ab7600080a2005b506003546001600160a01b03163314611d72565b3461084d57600036600319011261084d576020600854604051908152f35b3461084d57611e2c36612011565b90611e35612a00565b611e4a60018060a01b03600354163314612252565b60ff600254611e5d828260081c1661228d565b16611e9857611e6e92600954612a76565b600954600181018091116105295780611e8991600955612d61565b6002805460ff19166001179055005b60405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792072756e2067656e657369734c6f636b526f756e64206f6e604482015261636560f01b6064820152608490fd5b3461084d57602036600319011261084d576001600160a01b03611f09611fe5565b16600052600e6020526020604060002054604051908152f35b3461084d57600036600319011261084d576003546040516001600160a01b039091168152602090f35b3461084d57600036600319011261084d57602060ff600254166040519015158152f35b3461084d57600036600319011261084d57611f87612900565b6002547fb9197c6b8e21274bd1e2d9c956a88af5cfee510f630fab3f046300f88b4223619060209060101c6001600160a01b0316611fc633821461221a565b611fd860085480926000600855612996565b604051908152a160018055005b600435906001600160a01b038216820361084d57565b602435906001600160a01b038216820361084d57565b604060031982011261084d576004359160243567ffffffffffffffff811161084d578260238201121561084d5780600401359267ffffffffffffffff841161084d576024848301011161084d576024019190565b90600182811c92168015612095575b602083101461207f57565b634e487b7160e01b600052602260045260246000fd5b91607f1691612074565b6101c0810190811067ffffffffffffffff8211176106b157604052565b6060810190811067ffffffffffffffff8211176106b157604052565b90601f8019910116810190811067ffffffffffffffff8211176106b157604052565b906040519182600082549261210e84612065565b808452936001811690811561217c5750600114612135575b50612133925003836120d8565b565b90506000929192526020600020906000915b8183106121605750509060206121339282010138612126565b6020919350806001915483858901015201910190918492612147565b90506020925061213394915060ff191682840152151560051b82010138612126565b919082519283825260005b8481106121ca575050826000602080949584010152601f8019910116010190565b806020809284010151828286010152016121a9565b906002821015610f885752565b80548210156122045760005260206000200190600090565b634e487b7160e01b600052603260045260246000fd5b1561222157565b60405162461bcd60e51b81526020600482015260096024820152682737ba1030b236b4b760b91b6044820152606490fd5b1561225957565b60405162461bcd60e51b815260206004820152600c60248201526b2737ba1037b832b930ba37b960a11b6044820152606490fd5b1561229457565b60405162461bcd60e51b815260206004820152603160248201527f43616e206f6e6c792072756e2061667465722067656e657369735374617274526044820152701bdd5b99081a5cc81d1c9a59d9d95c9959607a1b6064820152608490fd5b9190820180921161052957565b1561230757565b60405162461bcd60e51b81526020600482015260126024820152712737ba1037b832b930ba37b917b0b236b4b760711b6044820152606490fd5b1561234857565b60405162461bcd60e51b815260206004820152601460248201527310dbdb9d1c9858dd081b9bdd08185b1b1bddd95960621b6044820152606490fd5b1561238b57565b60405162461bcd60e51b815260206004820152601a60248201527f50726f787920636f6e7472616374206e6f7420616c6c6f7765640000000000006044820152606490fd5b156123d757565b60405162461bcd60e51b815260206004820152601560248201527442657420697320746f6f206561726c792f6c61746560581b6044820152606490fd5b1561241b57565b60405162461bcd60e51b8152602060048201526012602482015271526f756e64206e6f74206265747461626c6560701b6044820152606490fd5b1561245c57565b60405162461bcd60e51b815260206004820152602c60248201527f42657420616d6f756e74206d7573742062652067726561746572207468616e2060448201526b1b5a5b90995d105b5bdd5b9d60a21b6064820152608490fd5b156124bd57565b60405162461bcd60e51b815260206004820152601b60248201527f43616e206f6e6c7920626574206f6e63652070657220726f756e6400000000006044820152606490fd5b8054680100000000000000008110156106b157612524916001820181556121ec565b819291549060031b91821b91600019901b1916179055565b91908110156122045760051b0190565b8181029291811591840414171561052957565b1561256657565b60405162461bcd60e51b815260206004820152601660248201527543616e6e6f74206265207a65726f206164647265737360501b6044820152606490fd5b9060409082600052600c6020528160002060009160018060a01b0316825260205220604051916125d3836120bc565b60ff8254166002811015610f88578352604060ff60026001850154946020870195865201541693019215158352600052600d60205260406000206040519261261a8461209f565b81548452600182015460208501526002820154604085015260ff600d6003840154936060870194855260048101546080880152600581015460a0880152612663600682016120fa565b60c0880152612674600782016120fa565b60e088015260088101546101008801526009810154610120880152600a810154610140880152600b810154610160880152600c81015461018088015201541615936101a08515910152836126f5575b50826126dc575b50816126d4575090565b905051151590565b6126ec91925051600454906122f3565b421190386126ca565b51159250386126c3565b9190820391821161052957565b67ffffffffffffffff81116106b15760051b60200190565b80518210156122045760209160051b010190565b6000818152600c602090815260408083206001600160a01b0390951683529390528290209151612767816120bc565b60ff835416926002841015610f88576101a093825260ff60026001830154926020850193845201541692604083019315158452600052600d602052604060002092604051916127b58361209f565b845483526001850154602084015260028501546040840152600385015460608401526004850154926080810193845260ff600d60058801549760a08401988952612801600682016120fa565b60c0850152612812600782016120fa565b60e085015260088101546101008501526009810154610120850152600a810154610140850152600b810154610160850152600c810154610180850152015416151596879101528251918551918284146128f357876128e8575b50866128de575b5085612881575b505050505090565b1393509091836128ca575b83156128a0575b5050503880808080612879565b519051139150816128b5575b50388080612893565b9050516002811015610f8857600114386128ac565b925081516002811015610f8857159261288c565b5115955038612872565b51151596503861286b565b5050505050505050600090565b600260015414612911576002600155565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b3d15612991573d9067ffffffffffffffff82116106b15760405191612985601f8201601f1916602001846120d8565b82523d6000602084013e565b606090565b600080809381935af16129a7612956565b50156129af57565b60405162461bcd60e51b815260206004820152602360248201527f5472616e7366657248656c7065723a20424e425f5452414e534645525f46414960448201526213115160ea1b6064820152608490fd5b60ff60005460a01c16612a0f57565b60405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606490fd5b9392918060609160209360408852816040890152838801376000828288010152601f8019910116850101930152565b919392909382600052600d60205260016040600020015415612d085782600052600d6020526002604060002001544210612cb35782600052600d602052612ac8600260406000200154600454906122f3565b4211612c5d5782600052600d60205260066040600020612aea600554426122f3565b600382015560048101968755019467ffffffffffffffff83116106b157612b118654612065565b601f8111612c15575b50600095601f8411600114612b8c5790612b7c91847f0a5c2b16fddae922a33bf7defc72fe603b1a099c8f18fd69ad5a416066cc8c25969798600091612b81575b508560011b906000198760031b1c19161790555b5460405193849384612a47565b0390a2565b905084013538612b5b565b80875260208720601f198516885b818110612bfd5750907f0a5c2b16fddae922a33bf7defc72fe603b1a099c8f18fd69ad5a416066cc8c2596979886612b7c95949310612be3575b5050600185811b019055612b6f565b850135600019600388901b60f8161c191690553880612bd4565b858a013583556020998a019960019093019201612b9a565b866000526020600020601f850160051c81019160208610612c53575b601f0160051c01905b818110612c475750612b1a565b60008155600101612c3a565b9091508190612c31565b60405162461bcd60e51b815260206004820152602860248201527f43616e206f6e6c79206c6f636b20726f756e642077697468696e206275666665604482015267725365636f6e647360c01b6064820152608490fd5b60405162461bcd60e51b815260206004820152602760248201527f43616e206f6e6c79206c6f636b20726f756e64206166746572206c6f636b546960448201526606d657374616d760cc1b6064820152608490fd5b60405162461bcd60e51b815260206004820152602b60248201527f43616e206f6e6c79206c6f636b20726f756e6420616674657220726f756e642060448201526a1a185cc81cdd185c9d195960aa1b6064820152608490fd5b80600052600d6020526040600020426001820155612d81600554426122f3565b60028201556005546001600160ff1b038116810361052957600091612dab60089260011b426122f3565b600382015583815501557f939f42374aa9bf1d8d8cd56d8a9110cb040cd8dfeae44080c6fcf2645e51b452600080a2565b60ff60005460a01c1615612dec57565b60405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606490fd5b80600052600d60205260016040600020015415159081612e86575b81612e6a575b81612e52575090565b9050600052600d602052600260406000200154421090565b809150600052600d602052600160406000200154421190612e49565b809150600052600d602052600260406000200154151590612e43565b6000546001600160a01b03163303612eb657565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b91929015612f5c5750815115612f0e575090565b3b15612f175790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b825190915015612f6f5750805190602001fd5b60405162461bcd60e51b815260206004820152908190612f9390602483019061219e565b0390fdfea264697066735822122046a10f7f5246a727c30b214f689b04990c4c922243cfcdbdfcaa2fda46693e7664736f6c634300081c00330000000000000000000000007493fdf8de3b37b92281fe777894c740fcfe3841000000000000000000000000129c15ca41b1367a5e9e675b27db43162995d3ae000000000000000000000000000000000000000000000000000000000000012c000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000258

Deployed Bytecode

0x6080604052600436101561001257600080fd5b60003560e01c80623bdc7414611f6e5780630f74174f14611f4b578063127effb214611f22578063273867d414611ee85780632f94621c14611e1e578063368acb0914611e005780633f4ba83a14611d3f578063452fd75a14611c875780634f7104fc14611bdf57806352ce7c3a14611afa57806357fb096f146119dc5780635c975abb146119b65780636ba4c138146115ab5780636c18859314611500578063704b6c0214611476578063715018a61461141d5780637285c58b146113b1578063766718081461139357806377e741c7146112e55780637bf41254146112bf5780637d1cd04f146112a15780638456cb59146111df578063890dc766146111075780638c65c81f146110135780638da5cb5b14610fea578063951fd60014610d7d578063a0c7f71c14610d4d578063aa6b873a14610c28578063b29a814014610abf578063b3ab15fb14610a3c578063cc32d17614610a1e578063dd1f7596146109c5578063eaba2361146109a7578063f2b3c8091461098a578063f2fde38b146108c3578063f7fdec281461089d578063fa968eea1461087f578063fc6f9468146108525763fcf701c3146101c857600080fd5b3461084d576101d636612011565b6101de612a00565b6101f360018060a01b03600354163314612252565b60025460ff8160081c169081610842575b50156107c857610218818385600954612a76565b6009546000198101929083116105295782600052600d602052600260406000200154156107715782600052600d602052600360406000200154421061071c5782600052600d602052610275600360406000200154600454906122f3565b42116106c75782600052600d60205260406000209360058501908155600785019467ffffffffffffffff84116106b1576102af8654612065565b601f8111610669575b50600095601f85116001146105dd576103289291600d91867fd786ce19b848612c9c4cc3935f76eb7cbc18c694906b5a4e3107d1d6217d6cc098996000916105d2575b508760011b906000198960031b1c19161790555b01805460ff191660011790555460405193849384612a47565b0390a260095460001981019081116105295780600052600d602052600b6040600020015415806105b9575b1561057f5780600052600d6020527f6dfdfcb09c8804d0058826cd2539f1acfbe3cb887c9be03d928035bce0f1a58d606060406000206000600582015460048301549081811360001461053f57505050600981015490600c6008820154916103cb6127106103c36007548661254c565b0480946126ff565b9182915b85600b82015501556103e3826008546122f3565b60085560405192835260208301526040820152a26009546001810190818111610529578160095561041b60ff60025460081c1661228d565b60001901908082116105295781600052600d602052600360406000200154156104cd576000918252600d602052600360408320015442106104625761045f90612d61565b80f35b60405162461bcd60e51b815260206004820152603760248201527f43616e206f6e6c79207374617274206e657720726f756e64206166746572207260448201527f6f756e64206e2d3220636c6f736554696d657374616d700000000000000000006064820152608490fd5b60405162461bcd60e51b815260206004820152602e60248201527f43616e206f6e6c7920737461727420726f756e6420616674657220726f756e6460448201526d081b8b4c881a185cc8195b99195960921b6064820152608490fd5b634e487b7160e01b600052601160045260246000fd5b121561056e5750600a81015490600c6008820154916105666127106103c36007548661254c565b9182916103cf565b90600080600c6008840154936103cf565b60405162461bcd60e51b815260206004820152601260248201527114995dd85c991cc818d85b18dd5b185d195960721b6044820152606490fd5b5080600052600d602052600c6040600020015415610353565b9050860135386102fb565b8087526020872096601f198616815b8181106106515750917fd786ce19b848612c9c4cc3935f76eb7cbc18c694906b5a4e3107d1d6217d6cc0979861032895949288600d9510610637575b5050600187811b01905561030f565b87013560001960038a901b60f8161c191690553880610628565b868301358a55600190990198602092830192016105ec565b866000526020600020601f860160051c810191602087106106a7575b601f0160051c01905b81811061069b57506102b8565b6000815560010161068e565b9091508190610685565b634e487b7160e01b600052604160045260246000fd5b60405162461bcd60e51b815260206004820152602760248201527f43616e206f6e6c7920656e6420726f756e642077697468696e206275666665726044820152665365636f6e647360c81b6064820152608490fd5b60405162461bcd60e51b815260206004820152602760248201527f43616e206f6e6c7920656e6420726f756e6420616674657220636c6f7365546960448201526606d657374616d760cc1b6064820152608490fd5b60405162461bcd60e51b815260206004820152602960248201527f43616e206f6e6c7920656e6420726f756e6420616674657220726f756e642068604482015268185cc81b1bd8dad95960ba1b6064820152608490fd5b60405162461bcd60e51b815260206004820152604660248201527f43616e206f6e6c792072756e2061667465722067656e6573697353746172745260448201527f6f756e6420616e642067656e657369734c6f636b526f756e642069732074726960648201526519d9d95c995960d21b608482015260a490fd5b60ff91501638610204565b600080fd5b3461084d57600036600319011261084d5760025460405160109190911c6001600160a01b03168152602090f35b3461084d57600036600319011261084d576020600654604051908152f35b3461084d57600036600319011261084d57602060ff60025460081c166040519015158152f35b3461084d57602036600319011261084d576108dc611fe5565b6108e4612ea2565b6001600160a01b0316801561093657600080546001600160a01b03198116831782556001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b3461084d57600036600319011261084d5760206040516103e88152f35b3461084d57600036600319011261084d576020600454604051908152f35b3461084d57604036600319011261084d576109de611fe5565b6001600160a01b03166000908152600e602052604090208054602435919082101561084d57602091610a0f916121ec565b90549060031b1c604051908152f35b3461084d57600036600319011261084d576020600754604051908152f35b3461084d57602036600319011261084d577fc47d127c07bdd56c5ccba00463ce3bd3c1bca71b4670eea6e5d0c02e4aa156e26020610a78611fe5565b610a9060018060a01b0360025460101c16331461221a565b6001600160a01b0316610aa481151561255f565b600380546001600160a01b03191682179055604051908152a1005b3461084d57604036600319011261084d57610ad8611fe5565b60243590610ae4612ea2565b60018060a01b031690604051610b6f602082019163a9059cbb60e01b835233602482015283604482015260448152610b1d6064826120d8565b600080604094855193610b3087866120d8565b602085527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646020860152519082895af1610b68612956565b9086612efa565b8051908115918215610c05575b505015610baf577f14f11966a996e0629572e51064726d2057a80fbd34efc066682c06a71dbb6e989160209151908152a2005b5162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b819250906020918101031261084d5760200151801515810361084d578480610b7c565b602036600319011261084d57600435610c3f612a00565b610c47612900565b610c52333b15612341565b610c5d323314612384565b610c6a60095482146123d0565b610c7b610c7682612e28565b612414565b610c89600654341015612455565b6000818152600c60209081526040808320338452909152902060010154610cb090156124b6565b80600052600d602052600a604060002060088101610ccf3482546122f3565b905501610cdd3482546122f3565b90556000818152600c602090815260408083203384528252808320805460ff19166001908117825534910155600e9091529020610d1b908290612502565b6040513481527f0d8c1fe3e67ab767116a81f122b83c2557a8c2564019cb7c4f83de1aeb1f1f0d60203392a360018055005b3461084d57604036600319011261084d576020610d73610d6b611ffb565b600435612738565b6040519015158152f35b3461084d57606036600319011261084d57610d96611fe5565b6001600160a01b03166000818152600e60205260409020546024359160443591610dc19084906126ff565b8211610fca575b610dd18261270c565b91610ddf60405193846120d8565b808352610deb8161270c565b602084019490601f1901368637610e018261270c565b92610e0f60405194856120d8565b828452601f19610e1e8461270c565b0160005b818110610f9e57505060005b838110610edd57505090610e41916122f3565b604051926060840190606085525180915260808401949060005b818110610ec75750505082840360208401526020808351958681520192016000945b808610610e9257505082935060408301520390f35b90926020606060019260408751610eaa8382516121df565b848101518584015201511515604082015201940195019490610e7d565b8251875260209687019690920191600101610e5b565b81600052600e602052610efe6040600020610ef883866122f3565b906121ec565b90549060031b1c610f0f8288612724565b52610f1a8187612724565b51600052600c6020526040806000206000908482526020522090604051610f40816120bc565b60ff835416926002841015610f8857600260ff91600195845285810154602085015201541615156040820152610f768288612724565b52610f818187612724565b5001610e2e565b634e487b7160e01b600052602160045260246000fd5b602090604051610fad816120bc565b600081526000838201526000604082015282828901015201610e22565b809150600052600e602052610fe4826040600020546126ff565b90610dc8565b3461084d57600036600319011261084d576000546040516001600160a01b039091168152602090f35b3461084d57602036600319011261084d57600435600052600d60205260406000208054600182015491600281015460038201549160048101549260058201549360068301611060906120fa565b9461106d600785016120fa565b600885015496600986015492600a87015494600b88015496600c89015498600d015460ff16996040519d8e809e81526020015260408d015260608c015260808b015260a08a015260c089016101c090526101c089016110cb9161219e565b88810360e08a01526110dc9161219e565b9561010088015261012087015261014086015261016085015261018084015215156101a08301520390f35b3461084d57604036600319011261084d57600435602435611126612ddc565b61113e60018060a01b0360025460101c16331461221a565b8082101561118057816040917fe60149e0431fec12df63dfab5fce2a9cefe9a4d3df5f41cb626f579ae1f2b91a936004558060055582519182526020820152a1005b60405162461bcd60e51b815260206004820152603160248201527f6275666665725365636f6e6473206d75737420626520696e666572696f7220746044820152706f20696e74657276616c5365636f6e647360781b6064820152608490fd5b3461084d57600036600319011261084d576111f8612a00565b6002543360109190911c6001600160a01b031614801561128d575b61121c90612300565b611224612a00565b6000805460ff60a01b1916600160a01b1790556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25890602090a16009547f68b095021b1f40fe513109f513c66692f0b3219aee674a69f4efc57badb8201d600080a2005b506003546001600160a01b03163314611213565b3461084d57600036600319011261084d576020600554604051908152f35b3461084d57604036600319011261084d576020610d736112dd611ffb565b6004356125a4565b3461084d57602036600319011261084d57600435611301612ddc565b61131960018060a01b0360025460101c16331461221a565b6103e8811161135657806007557fb1c4ee38d35556741133da7ff9b6f7ab0fa88d0406133126ff128f635490a857602060095492604051908152a2005b60405162461bcd60e51b81526020600482015260156024820152740a8e4cac2e6eae4f240cccaca40e8dede40d0d2ced605b1b6044820152606490fd5b3461084d57600036600319011261084d576020600954604051908152f35b3461084d57604036600319011261084d57606060406113ce611ffb565b600435600052600c6020528160002060009160018060a01b031682526020522060ff8154169060ff60026001830154920154169061140f60405180946121df565b602083015215156040820152f35b3461084d57600036600319011261084d57611436612ea2565b600080546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461084d57602036600319011261084d577f137b621413925496477d46e5055ac0d56178bdd724ba8bf843afceef18268ba360206114b2611fe5565b6114ba612ea2565b6001600160a01b038116906114d082151561255f565b6002805462010000600160b01b03191660109290921b62010000600160b01b0316919091179055604051908152a1005b3461084d57602036600319011261084d5760043561151c612ddc565b61153460018060a01b0360025460101c16331461221a565b801561156e57806006557f90eb87c560a0213754ceb3a7fa3012f01acab0a35602c1e1995adf69dabc9d50602060095492604051908152a2005b60405162461bcd60e51b815260206004820152601560248201527404d757374206265207375706572696f7220746f203605c1b6044820152606490fd5b3461084d57602036600319011261084d5760043567ffffffffffffffff811161084d573660238201121561084d57806004013567ffffffffffffffff811161084d576024820191602436918360051b01011161084d57611609612900565b611614333b15612341565b61161f323314612384565b6000913390835b83811061164a57848061163a575b60018055005b6116449033612996565b80611634565b61165581858461253c565b35600052600d602052600160406000200154156119795761167781858461253c565b35600052600d60205260036040600020015442111561193e57600061169d82868561253c565b358152600d60205260ff600d604083200154166000146118af57506116cd336116c783878661253c565b35612738565b15611871576116dd81858461253c565b35600052600d60205260406000206117cf604051916116fb8361209f565b8054835260018101546020840152600281015460408401526003810154606084015260048101546080840152600581015460a084015261173d600682016120fa565b60c084015261174e600782016120fa565b60e084015260088101546101008401526009810154610120840152600a810154610140840152600b8101549261016081019384526101a060ff600d600c85015494610180850195865201541615159101526117aa84888761253c565b35600052600c602052600160408060002060009089825260205220015490519061254c565b9051906000821561185d57506001929161181d910480975b6117f284898861253c565b35600052600c60205260026040806000206000908a825260205220018560ff198254161790556122f3565b9561182982878661253c565b35906040519081527f34fcbac0073d7c3d388e51312faf357774904998eeb8fca628b9e6f65ee1cbf760203392a301611626565b634e487b7160e01b81526012600452602490fd5b60405162461bcd60e51b81526020600482015260166024820152754e6f7420656c696769626c6520666f7220636c61696d60501b6044820152606490fd5b906118c5336118bf83888761253c565b356125a4565b156118f95761181d6001604081946118de858a8961253c565b358152600c60205281812088825260205220015480976117e7565b60405162461bcd60e51b815260206004820152601760248201527f4e6f7420656c696769626c6520666f7220726566756e640000000000000000006044820152606490fd5b60405162461bcd60e51b8152602060048201526013602482015272149bdd5b99081a185cc81b9bdd08195b991959606a1b6044820152606490fd5b60405162461bcd60e51b8152602060048201526015602482015274149bdd5b99081a185cc81b9bdd081cdd185c9d1959605a1b6044820152606490fd5b3461084d57600036600319011261084d57602060ff60005460a01c166040519015158152f35b602036600319011261084d576004356119f3612a00565b6119fb612900565b611a06333b15612341565b611a11323314612384565b611a1e60095482146123d0565b611a2a610c7682612e28565b611a38600654341015612455565b6000818152600c60209081526040808320338452909152902060010154611a5f90156124b6565b80600052600d6020526009604060002060088101611a7e3482546122f3565b905501611a8c3482546122f3565b90556000818152600c602090815260408083203384528252808320805460ff1916815534600190910155600e9091529020611ac8908290612502565b6040513481527f438122d8cff518d18388099a5181f0d17a12b4f1b55faedf6e4a6acee0060c1260203392a360018055005b3461084d57600036600319011261084d576040516000600a54611b1c81612065565b8084529060018116908115611bbb5750600114611b5c575b611b5883611b44818503826120d8565b60405191829160208352602083019061219e565b0390f35b600a60009081527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8939250905b808210611ba157509091508101602001611b44611b34565b919260018160209254838588010152019101909291611b89565b60ff191660208086019190915291151560051b84019091019150611b449050611b34565b3461084d57600036600319011261084d576040516000600b54611c0181612065565b8084529060018116908115611bbb5750600114611c2857611b5883611b44818503826120d8565b600b60009081527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9939250905b808210611c6d57509091508101602001611b44611b34565b919260018160209254838588010152019101909291611c55565b3461084d57600036600319011261084d57611ca0612a00565b611cb560018060a01b03600354163314612252565b60ff60025460081c16611cee57600954600181018091116105295780611cdd91600955612d61565b6002805461ff001916610100179055005b60405162461bcd60e51b815260206004820152602360248201527f43616e206f6e6c792072756e2067656e657369735374617274526f756e64206f6044820152626e636560e81b6064820152608490fd5b3461084d57600036600319011261084d57611d58612ddc565b60025433601082901c6001600160a01b0316148015611dec575b611d7b90612300565b61ffff1916600255611d8b612ddc565b60ff60a01b19600054166000557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a16009547faaa520fdd7d2c83061d632fa017b0432407e798818af63ea908589fceda39ab7600080a2005b506003546001600160a01b03163314611d72565b3461084d57600036600319011261084d576020600854604051908152f35b3461084d57611e2c36612011565b90611e35612a00565b611e4a60018060a01b03600354163314612252565b60ff600254611e5d828260081c1661228d565b16611e9857611e6e92600954612a76565b600954600181018091116105295780611e8991600955612d61565b6002805460ff19166001179055005b60405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792072756e2067656e657369734c6f636b526f756e64206f6e604482015261636560f01b6064820152608490fd5b3461084d57602036600319011261084d576001600160a01b03611f09611fe5565b16600052600e6020526020604060002054604051908152f35b3461084d57600036600319011261084d576003546040516001600160a01b039091168152602090f35b3461084d57600036600319011261084d57602060ff600254166040519015158152f35b3461084d57600036600319011261084d57611f87612900565b6002547fb9197c6b8e21274bd1e2d9c956a88af5cfee510f630fab3f046300f88b4223619060209060101c6001600160a01b0316611fc633821461221a565b611fd860085480926000600855612996565b604051908152a160018055005b600435906001600160a01b038216820361084d57565b602435906001600160a01b038216820361084d57565b604060031982011261084d576004359160243567ffffffffffffffff811161084d578260238201121561084d5780600401359267ffffffffffffffff841161084d576024848301011161084d576024019190565b90600182811c92168015612095575b602083101461207f57565b634e487b7160e01b600052602260045260246000fd5b91607f1691612074565b6101c0810190811067ffffffffffffffff8211176106b157604052565b6060810190811067ffffffffffffffff8211176106b157604052565b90601f8019910116810190811067ffffffffffffffff8211176106b157604052565b906040519182600082549261210e84612065565b808452936001811690811561217c5750600114612135575b50612133925003836120d8565b565b90506000929192526020600020906000915b8183106121605750509060206121339282010138612126565b6020919350806001915483858901015201910190918492612147565b90506020925061213394915060ff191682840152151560051b82010138612126565b919082519283825260005b8481106121ca575050826000602080949584010152601f8019910116010190565b806020809284010151828286010152016121a9565b906002821015610f885752565b80548210156122045760005260206000200190600090565b634e487b7160e01b600052603260045260246000fd5b1561222157565b60405162461bcd60e51b81526020600482015260096024820152682737ba1030b236b4b760b91b6044820152606490fd5b1561225957565b60405162461bcd60e51b815260206004820152600c60248201526b2737ba1037b832b930ba37b960a11b6044820152606490fd5b1561229457565b60405162461bcd60e51b815260206004820152603160248201527f43616e206f6e6c792072756e2061667465722067656e657369735374617274526044820152701bdd5b99081a5cc81d1c9a59d9d95c9959607a1b6064820152608490fd5b9190820180921161052957565b1561230757565b60405162461bcd60e51b81526020600482015260126024820152712737ba1037b832b930ba37b917b0b236b4b760711b6044820152606490fd5b1561234857565b60405162461bcd60e51b815260206004820152601460248201527310dbdb9d1c9858dd081b9bdd08185b1b1bddd95960621b6044820152606490fd5b1561238b57565b60405162461bcd60e51b815260206004820152601a60248201527f50726f787920636f6e7472616374206e6f7420616c6c6f7765640000000000006044820152606490fd5b156123d757565b60405162461bcd60e51b815260206004820152601560248201527442657420697320746f6f206561726c792f6c61746560581b6044820152606490fd5b1561241b57565b60405162461bcd60e51b8152602060048201526012602482015271526f756e64206e6f74206265747461626c6560701b6044820152606490fd5b1561245c57565b60405162461bcd60e51b815260206004820152602c60248201527f42657420616d6f756e74206d7573742062652067726561746572207468616e2060448201526b1b5a5b90995d105b5bdd5b9d60a21b6064820152608490fd5b156124bd57565b60405162461bcd60e51b815260206004820152601b60248201527f43616e206f6e6c7920626574206f6e63652070657220726f756e6400000000006044820152606490fd5b8054680100000000000000008110156106b157612524916001820181556121ec565b819291549060031b91821b91600019901b1916179055565b91908110156122045760051b0190565b8181029291811591840414171561052957565b1561256657565b60405162461bcd60e51b815260206004820152601660248201527543616e6e6f74206265207a65726f206164647265737360501b6044820152606490fd5b9060409082600052600c6020528160002060009160018060a01b0316825260205220604051916125d3836120bc565b60ff8254166002811015610f88578352604060ff60026001850154946020870195865201541693019215158352600052600d60205260406000206040519261261a8461209f565b81548452600182015460208501526002820154604085015260ff600d6003840154936060870194855260048101546080880152600581015460a0880152612663600682016120fa565b60c0880152612674600782016120fa565b60e088015260088101546101008801526009810154610120880152600a810154610140880152600b810154610160880152600c81015461018088015201541615936101a08515910152836126f5575b50826126dc575b50816126d4575090565b905051151590565b6126ec91925051600454906122f3565b421190386126ca565b51159250386126c3565b9190820391821161052957565b67ffffffffffffffff81116106b15760051b60200190565b80518210156122045760209160051b010190565b6000818152600c602090815260408083206001600160a01b0390951683529390528290209151612767816120bc565b60ff835416926002841015610f88576101a093825260ff60026001830154926020850193845201541692604083019315158452600052600d602052604060002092604051916127b58361209f565b845483526001850154602084015260028501546040840152600385015460608401526004850154926080810193845260ff600d60058801549760a08401988952612801600682016120fa565b60c0850152612812600782016120fa565b60e085015260088101546101008501526009810154610120850152600a810154610140850152600b810154610160850152600c810154610180850152015416151596879101528251918551918284146128f357876128e8575b50866128de575b5085612881575b505050505090565b1393509091836128ca575b83156128a0575b5050503880808080612879565b519051139150816128b5575b50388080612893565b9050516002811015610f8857600114386128ac565b925081516002811015610f8857159261288c565b5115955038612872565b51151596503861286b565b5050505050505050600090565b600260015414612911576002600155565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b3d15612991573d9067ffffffffffffffff82116106b15760405191612985601f8201601f1916602001846120d8565b82523d6000602084013e565b606090565b600080809381935af16129a7612956565b50156129af57565b60405162461bcd60e51b815260206004820152602360248201527f5472616e7366657248656c7065723a20424e425f5452414e534645525f46414960448201526213115160ea1b6064820152608490fd5b60ff60005460a01c16612a0f57565b60405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606490fd5b9392918060609160209360408852816040890152838801376000828288010152601f8019910116850101930152565b919392909382600052600d60205260016040600020015415612d085782600052600d6020526002604060002001544210612cb35782600052600d602052612ac8600260406000200154600454906122f3565b4211612c5d5782600052600d60205260066040600020612aea600554426122f3565b600382015560048101968755019467ffffffffffffffff83116106b157612b118654612065565b601f8111612c15575b50600095601f8411600114612b8c5790612b7c91847f0a5c2b16fddae922a33bf7defc72fe603b1a099c8f18fd69ad5a416066cc8c25969798600091612b81575b508560011b906000198760031b1c19161790555b5460405193849384612a47565b0390a2565b905084013538612b5b565b80875260208720601f198516885b818110612bfd5750907f0a5c2b16fddae922a33bf7defc72fe603b1a099c8f18fd69ad5a416066cc8c2596979886612b7c95949310612be3575b5050600185811b019055612b6f565b850135600019600388901b60f8161c191690553880612bd4565b858a013583556020998a019960019093019201612b9a565b866000526020600020601f850160051c81019160208610612c53575b601f0160051c01905b818110612c475750612b1a565b60008155600101612c3a565b9091508190612c31565b60405162461bcd60e51b815260206004820152602860248201527f43616e206f6e6c79206c6f636b20726f756e642077697468696e206275666665604482015267725365636f6e647360c01b6064820152608490fd5b60405162461bcd60e51b815260206004820152602760248201527f43616e206f6e6c79206c6f636b20726f756e64206166746572206c6f636b546960448201526606d657374616d760cc1b6064820152608490fd5b60405162461bcd60e51b815260206004820152602b60248201527f43616e206f6e6c79206c6f636b20726f756e6420616674657220726f756e642060448201526a1a185cc81cdd185c9d195960aa1b6064820152608490fd5b80600052600d6020526040600020426001820155612d81600554426122f3565b60028201556005546001600160ff1b038116810361052957600091612dab60089260011b426122f3565b600382015583815501557f939f42374aa9bf1d8d8cd56d8a9110cb040cd8dfeae44080c6fcf2645e51b452600080a2565b60ff60005460a01c1615612dec57565b60405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606490fd5b80600052600d60205260016040600020015415159081612e86575b81612e6a575b81612e52575090565b9050600052600d602052600260406000200154421090565b809150600052600d602052600160406000200154421190612e49565b809150600052600d602052600260406000200154151590612e43565b6000546001600160a01b03163303612eb657565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b91929015612f5c5750815115612f0e575090565b3b15612f175790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b825190915015612f6f5750805190602001fd5b60405162461bcd60e51b815260206004820152908190612f9390602483019061219e565b0390fdfea264697066735822122046a10f7f5246a727c30b214f689b04990c4c922243cfcdbdfcaa2fda46693e7664736f6c634300081c0033

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

0000000000000000000000007493fdf8de3b37b92281fe777894c740fcfe3841000000000000000000000000129c15ca41b1367a5e9e675b27db43162995d3ae000000000000000000000000000000000000000000000000000000000000012c000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000258

-----Decoded View---------------
Arg [0] : _adminAddress (address): 0x7493fdF8dE3b37b92281Fe777894c740Fcfe3841
Arg [1] : _operatorAddress (address): 0x129c15ca41B1367A5e9E675b27db43162995d3AE
Arg [2] : _intervalSeconds (uint256): 300
Arg [3] : _bufferSeconds (uint256): 30
Arg [4] : _minBetAmount (uint256): 100000000000000000
Arg [5] : _treasuryFee (uint256): 600

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000007493fdf8de3b37b92281fe777894c740fcfe3841
Arg [1] : 000000000000000000000000129c15ca41b1367a5e9e675b27db43162995d3ae
Arg [2] : 000000000000000000000000000000000000000000000000000000000000012c
Arg [3] : 000000000000000000000000000000000000000000000000000000000000001e
Arg [4] : 000000000000000000000000000000000000000000000000016345785d8a0000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000258


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.