Contract 0x2D0fd558fE73915322184Dcf99C20c5Eba86A1f3 1

 

Contract Overview

Balance:
2,610.982830773693444901 FTM

FTM Value:
$1,157.97 (@ $0.44/FTM)
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xe4678303cd1e2ca7dcb0629088bb28eff88a3384d02d92f400f91d1c85882124Bet Bull586831942023-03-30 3:07:5313 hrs 56 mins ago0x335696b23ec6fce2ee8e4d4c6078ef55bb87357a IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f31 FTM0.417304682035
0x4574bf4d5db6516c297af839bd94ea7d3576eefd073ef2a0fa41a831638d6d71Bet Bull586831062023-03-30 3:06:0513 hrs 58 mins ago0x335696b23ec6fce2ee8e4d4c6078ef55bb87357a IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f31 FTM0.005717937591
0x64d68a69330ef6e445ff44b91a51ca4e0209899a270572e247769841a78e6bebBet Bear586350462023-03-29 10:56:131 day 6 hrs ago0x4a557b58d5e5242424906de2a54c724f80d21cc9 IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f32.290777735155378 FTM0.005457683981
0x47a9672d1f99e6ae1e1eb1e9e3a917d7af7a3f45e0fa00a54987a6a626982842Claim585996142023-03-28 22:35:511 day 18 hrs ago0xceeea878833b218d4e16a9220140e94c3a93a0a0 IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f30 FTM0.00526030887
0xc26b1e2962f02bf5f06701c1b0b30a58aaa65b73941707633051e3be20c6acd2Bet Bear585992372023-03-28 22:30:091 day 18 hrs ago0x6f89f659704828353532c1af4e37201832e2fd5d IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f30.398447406755961 FTM0.004751467747
0xeeedcde2906919d8e19822e91327182d6e9e04143d350cdd46b5dd5307d247d9Bet Bear585988792023-03-28 22:23:581 day 18 hrs ago0xceeea878833b218d4e16a9220140e94c3a93a0a0 IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f30.8 FTM0.004275181785
0xfdc0a832d2dfd59a71b341f551e904ca2bb8fb2b4eb4e4174999077c88eee9aeBet Bull585986772023-03-28 22:20:301 day 18 hrs ago0xceeea878833b218d4e16a9220140e94c3a93a0a0 IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f30.435253859896687 FTM0.003745193804
0x15162b106028bacfd523ad6feba8baf59a223b172fc5df4416d3b4222d7c01dbBet Bull585931792023-03-28 20:35:591 day 20 hrs ago0xed68f9767b5662524802d34038ff408689afde8f IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f30.1474351499745 FTM0.005346408163
0x4b43990cde675791062e002ecdadc868141ee07f6a0af5a2f8cace26e9e6afd2Bet Bull585640562023-03-28 11:30:182 days 5 hrs ago0x7eb47041cad1775d80cdc0739df0f375dcd4201f IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f31 FTM0.004734308919
0xdedac3d7641cf0e0632c75d38acffb131efd192ce41f1687ce5f610637b494a9Bet Bull585506552023-03-28 7:18:152 days 9 hrs ago0x7a88a1376fa85a0010e9ccd2ca660b1cb780e9a6 IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f30.2 FTM0.003101572193
0xf4a16373117f04187a44a9e7c69bb90fa0f88779ecb3c55beb57f3ccda9567b9Bet Bull585490372023-03-28 6:44:162 days 10 hrs ago0x7a88a1376fa85a0010e9ccd2ca660b1cb780e9a6 IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f30.1 FTM0.003540695274
0xb06595657b7c61da91729b293121a97b59c6a938004e18eb66d4c13299f8c07dBet Bull585447612023-03-28 5:06:512 days 11 hrs ago0x47ccf6401a40132be15a32d6ebfc056af3b5c50b IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f30.1 FTM0.004129328931
0x3c98ff2f8668a019268a1d12bda453b2a5d9709640da9fd6e9dc1853a8f3534cBet Bull585367402023-03-28 2:18:542 days 14 hrs ago0x52f3ab86cb61aacfa8588f1ef87c71d7ba8d2f15 IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f31 FTM0.004145268093
0x26b1c4406b26ad0449787e9afa93ebf03169c3ae042193db735e701a7b0ce4b4Bet Bear584961282023-03-27 13:54:223 days 3 hrs ago0x7e2faaee4b1a6d62cae10d3d2294a1e690fd2164 IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f30.108424473580685 FTM0.00462153233
0xc3a53c96064ed48a4106341e5af3494b0e60c49b00dd964293afa33f1870b71aBet Bear584954182023-03-27 13:39:143 days 3 hrs ago0x7e2faaee4b1a6d62cae10d3d2294a1e690fd2164 IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f30.413093979781333 FTM0.004515899966
0x552b7be1a12b83f7cbf969d99e5c382120843f3a8af56c31dcf02302102fef31Bet Bull584952592023-03-27 13:35:513 days 3 hrs ago0x7e2faaee4b1a6d62cae10d3d2294a1e690fd2164 IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f30.204066777531601 FTM0.003768450673
0x5cc24f775b8f89f5f1feafa109062b38774c1ebb4def4c6aeb81517c0569f8a2Bet Bull584951172023-03-27 13:32:123 days 3 hrs ago0x7e2faaee4b1a6d62cae10d3d2294a1e690fd2164 IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f30.102264776956612 FTM0.004235690843
0xd8797abfe0f90ebbd90f45db1c18fe777764e07acc668669542049b848c5283eBet Bull584857252023-03-27 9:51:173 days 7 hrs ago0xc6fda9f22bcf28434773c7bb754a932a53fba9ce IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f31 FTM0.003877916721
0xf501dbec24d5eca756db627595e3e15c0d60a5c172c7c4af7eb42c34af6b0961Bet Bear584811982023-03-27 8:33:503 days 8 hrs ago0x645a809dd93086e4ff63c9e280b413c6386342b8 IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f32.461911118884727 FTM0.004959887426
0x5a83f93fad1a225d2ef58db305eba4207e96edf5d85147af2f8ec64179b0a9d7Bet Bear584810682023-03-27 8:31:493 days 8 hrs ago0x645a809dd93086e4ff63c9e280b413c6386342b8 IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f31.642928888146175 FTM0.004964426669
0xed7a0ba0e688c66dd1edb208de2d3e3e86f732821dc6b486ce6798439aceeec4Bet Bull584805902023-03-27 8:24:433 days 8 hrs ago0x645a809dd93086e4ff63c9e280b413c6386342b8 IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f31.878680093716924 FTM0.004906485953
0x49de03142e2a78bafbb98c5220a3fa1a542ea82bfb09a96f33d84c0c491132c2Bet Bear584425112023-03-26 20:30:593 days 20 hrs ago0xe56c5c10ae079b83c21fd5eade486257af171c85 IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f30.1 FTM0.004803917683
0x8947f3727838410df5efe985b407944bc018b98815658854dc9c4c7e440fa5f4Bet Bull584277462023-03-26 15:45:014 days 1 hr ago0xbb9186142d0ecfb38c63fcc411533104bee9bda2 IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f30.1 FTM0.004417520612
0x85f043793addcaf71e560c658d38d53b7ff4a163bbdcf3fd3d344e0b170a8246Bet Bear584261692023-03-26 15:20:414 days 1 hr ago0xbb9186142d0ecfb38c63fcc411533104bee9bda2 IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f30.5 FTM0.005402553423
0x5d359d948645b06599a4dc96c68a2b286b5a47a5113de5d76ca9dbaab3953efbBet Bear584244272023-03-26 14:51:454 days 2 hrs ago0xbb9186142d0ecfb38c63fcc411533104bee9bda2 IN  0x2d0fd558fe73915322184dcf99c20c5eba86a1f30.5 FTM0.0140591619
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x47a9672d1f99e6ae1e1eb1e9e3a917d7af7a3f45e0fa00a54987a6a626982842585996142023-03-28 22:35:511 day 18 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30xb0da7d4a43ea078a4024b0370c8c87e29fc619600.011858437055008198 FTM
0x47a9672d1f99e6ae1e1eb1e9e3a917d7af7a3f45e0fa00a54987a6a626982842585996142023-03-28 22:35:511 day 18 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30xceeea878833b218d4e16a9220140e94c3a93a0a01.173985268445811511 FTM
0x476d570bf3afd6a5e9f644f3c8afe71b1c3d775ad29f1117e27c58ff0bc937d3583070312023-03-24 22:05:485 days 18 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30x16f53d797690fd9a3ee0679c27f4ed7cabdc7ba60.4752 FTM
0x75841dc086fe35b4da76a55f48b0b67025757c8cf6329a3642cb7e00573d0c92582313682023-03-23 21:28:186 days 19 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30x9da42fbf6735de4e2297ee90f598ddd754dcc9510.448296720610357792 FTM
0x77ca07baaad942a72d268c6d349cb2d586c56e67085e38d292d97919039ec37a582226702023-03-23 18:51:336 days 22 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30xfcecfbba2c49df42a8cbe054e342395632e7e4a62.8512 FTM
0x00a1910f02f18f104df5885dba12af7b5dae3d6774c42c0d8b9975a4a299d31b581103332023-03-22 6:31:208 days 10 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30x3bbb81d4f3e67dd5df672028e725959a552c279b0.481809726042264909 FTM
0xa77c7205c64b3a21ed937c12fe0c5b8da39d6a6e8b4f2e434e0d41dd466766dd581093332023-03-22 6:01:148 days 11 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30x51c4066c1a5768741bb9f0b36e3140293938eb7525.6608 FTM
0x2feae417d2d9ad7894964873bb026d9961efe607e8310480755612801d3fffbf580888452023-03-21 23:22:068 days 17 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30x51c4066c1a5768741bb9f0b36e3140293938eb753.3264 FTM
0xa3ba7b1fec9cede7cbd287206af79e20102d9ee0c861af676f295c4b72c403cf580888162023-03-21 23:21:228 days 17 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30x31e07e1c36d10ad25d8e03e064a5ba4d034828264.752 FTM
0x49f251e9b8b2c541468980825cc966043d7102614e63a055ce4b21b5f762d4f3580723052023-03-21 17:55:448 days 23 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30xb5139ecb4c76cdcf4d9b54352f9553907e60648d0.9504 FTM
0x58c94ae8ec0367e131d2e89aaa6744e0eb2ceb6590b80d05e8af7e4e67f205e1579279672023-03-19 17:18:0210 days 23 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30x1b8c7dae94606c361f7099d1c0d0803130842eaa0.76032 FTM
0xe9fd56217960d96e8e9beb35d83efa342faf7d0c15a4580fa60d05a1ee9020ad579209192023-03-19 14:40:2111 days 2 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30x38ad00deb2601f336ab4f95f7f3b5ba85b0ac43b0.9504 FTM
0x16bf5ab90302ddc270fc93e837dd735de02b5ad023e29e04a08bb84b9e09235c577918022023-03-17 18:42:2412 days 22 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30x2a559b2c3b416aaf26a01f96d5a4c19d5851c40d5.89248 FTM
0x37b335ad1b5133b6bfec91bbc61a7a75c82701731c4dbc3707db043b81717a4e576599772023-03-15 22:40:2914 days 18 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30x2a559b2c3b416aaf26a01f96d5a4c19d5851c40d39.53664 FTM
0xda0de52a8bcadb5682975da44c979e067c49baeeff9ea736a7cbe3f8263762b2576564802023-03-15 21:28:2614 days 19 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30x90625535340087a90ee8a25fcefdb82a83afe6d95.89248 FTM
0xb2168270d42f3f35ee05c8d5a7cfd0e1d0444b96338d6d92ed36ffd0386b93ad576560212023-03-15 21:18:0714 days 19 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30x90625535340087a90ee8a25fcefdb82a83afe6d94.94208 FTM
0x8698e21e879097bc041c31dd2918cd97c45feba0746ad91edb8473d4b3fb29ea576553192023-03-15 21:02:1114 days 20 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30x90625535340087a90ee8a25fcefdb82a83afe6d92.8512 FTM
0xda5fa0a7093d2a03c9353cc6bb7b529ff1b8e374ae8f21a16732dbacfaa8e006576314332023-03-15 13:08:0215 days 3 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30x99c6c72fc68d0c3de527e72e133f8375c41a66aa4.752 FTM
0xfda39aa8a30e1514b742218f20a0b198327987efa1202d1b8605da91c6a78a3b575484122023-03-14 4:41:5316 days 12 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30x1b8c7dae94606c361f7099d1c0d0803130842eaa0.09504 FTM
0x1e5fbb7770a5043f1366f1a7e3d4884abaeb404a31ceef3f44c6fa3caf425885575481002023-03-14 4:28:4916 days 12 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30x1b8c7dae94606c361f7099d1c0d0803130842eaa0.09504 FTM
0x76ba05a55179a36b7e92046760e9c1429030391943f99a15941991d2ff75ca04575427742023-03-14 0:55:4716 days 16 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30x8ef9e131dc534cf385f93e57a4bab2de4bc349b30.001370750375820562 FTM
0x76ba05a55179a36b7e92046760e9c1429030391943f99a15941991d2ff75ca04575427742023-03-14 0:55:4716 days 16 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30x46d5a574af440681c30f291b704156712bf940860.135704287206235612 FTM
0xc53515c8b7b680fdb4ba195d9959d1faecdc7efff0217bd37bd0a6299a932b39575354712023-03-13 21:38:1116 days 19 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30x5b0194bc1cae1d4522638c095abafc36705048d80.9504 FTM
0x7d6ab4b8e410ec44b9d14fe4194e29c4bd9a44036fab0083069596e57cd7f90d575349042023-03-13 21:26:5216 days 19 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30x041ce1df87f26fdf053c8b47b5dd3d13bce316400.4752 FTM
0x8183a3698bcb3599b752d238424d71023869bf4691f4a08289ae05e9c529228c574930662023-03-13 5:48:1817 days 11 hrs ago 0x2d0fd558fe73915322184dcf99c20c5eba86a1f30xcf0f28fd19c237a7d85336115c691e4574d72ca00.168489531535038872 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Predict

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 10 : Predict.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2;

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

import {AggregatorV3Interface} from "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";

import {IWigoGalaxy} from "./interfaces/IWigoGalaxy.sol";

/**
 * @title PREDICT - Fantom Prediction Market
 */
contract Predict is Ownable, Pausable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    IWigoGalaxy public galaxy;

    AggregatorV3Interface public oracle;

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

    address public adminAddress; // address of the admin
    address public treasuryAddress; // address of the treasury

    address public keeperAddress; // address of the keeper
    address public executorAddress; // address of the executor

    uint256 public bufferSeconds; // number of seconds for valid execution of a prediction round
    uint256 public intervalSeconds; // interval in seconds between two prediction rounds

    uint256 public minBetAmount; // minimum betting amount (denominated in wei)
    uint256 public treasuryAmount; // treasury amount that was not claimed

    uint256 public treasuryFee; // treasury rate (e.g. 200 = 2%, 150 = 1.50%)
    uint256 public referrerFee; // referrer rate (e.g. 250 = 2.5%, 150 = 1.50%)

    uint256 public currentEpoch; // current epoch for prediction round

    uint256 public oracleUpdateAllowance; // seconds

    uint256 public constant MAX_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;
        uint256 lockOracleId;
        uint256 closeOracleId;
        uint256 totalAmount;
        uint256 bullAmount;
        uint256 bearAmount;
        uint256 rewardBaseCalAmount;
        uint256 rewardAmount;
        bool oracleCalled;
    }

    struct BetInfo {
        Position position;
        uint256 amount;
        bool claimed; // default false
    }

    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,
        uint256 refAmount,
        uint256 treasuryAmount
    );
    event EndRound(
        uint256 indexed epoch,
        uint256 indexed roundId,
        int256 price
    );
    event LockRound(
        uint256 indexed epoch,
        uint256 indexed roundId,
        int256 price
    );

    event NewAdminAddress(address admin);
    event NewTreasuryAddress(address treasury);
    event NewWigoGalaxyAddress(address galaxy);

    event NewKeeperAddress(address keeper);
    event NewExecutorAddress(address executor);

    event NewBufferAndIntervalSeconds(
        uint256 bufferSeconds,
        uint256 intervalSeconds
    );
    event NewMinBetAmount(uint256 indexed epoch, uint256 minBetAmount);
    event NewFee(
        uint256 indexed epoch,
        uint256 treasuryFee,
        uint256 referrerFee
    );

    event NewOracle(address oracle);
    event NewOracleUpdateAllowance(uint256 oracleUpdateAllowance);

    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 onlyAdminOrKeeper() {
        require(
            msg.sender == adminAddress || msg.sender == keeperAddress,
            "Not admin/keeper"
        );
        _;
    }

    modifier onlyKeeperOrExecutor() {
        require(
            msg.sender == keeperAddress || msg.sender == executorAddress,
            "Not keeper/executor"
        );
        _;
    }

    modifier onlyAdminOrTreasury() {
        require(
            msg.sender == adminAddress || msg.sender == treasuryAddress,
            "Not admin/treasury"
        );
        _;
    }

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

    /**
     * @notice Constructor
     * @param _oracleAddress: oracle address
     * @param _adminAddress: admin address
     * @param _executorAddress: executor address
     * @param _treasuryAddress: treasury address
     * @param _wigoGalaxyAddress: WigoGalaxy address
     * @param _intervalSeconds: number of time within an interval
     * @param _bufferSeconds: buffer of time for resolution of price
     * @param _minBetAmount: minimum bet amounts (in wei)
     * @param _oracleUpdateAllowance: oracle update allowance
     * @param _treasuryFee: treasury fee (1000 = 10%)
     * @param _referrerFee: referrer fee (250 = 2.5%)
     */
    constructor(
        address _oracleAddress,
        address _adminAddress,
        address _executorAddress,
        address _treasuryAddress,
        address _wigoGalaxyAddress,
        uint256 _intervalSeconds,
        uint256 _bufferSeconds,
        uint256 _minBetAmount,
        uint256 _oracleUpdateAllowance,
        uint256 _treasuryFee,
        uint256 _referrerFee
    ) {
        require(
            _treasuryFee + _referrerFee <= MAX_FEE,
            "treasuryFee + referrerFee too high"
        );
        require(
            _wigoGalaxyAddress != address(0),
            "Operations: WigoGalaxy address cannot be zero"
        );

        oracle = AggregatorV3Interface(_oracleAddress);
        adminAddress = _adminAddress;
        executorAddress = _executorAddress;
        treasuryAddress = _treasuryAddress;
        galaxy = IWigoGalaxy(_wigoGalaxyAddress);
        intervalSeconds = _intervalSeconds;
        bufferSeconds = _bufferSeconds;
        minBetAmount = _minBetAmount;
        oracleUpdateAllowance = _oracleUpdateAllowance;
        treasuryFee = _treasuryFee;
        referrerFee = _referrerFee;
    }

    /**
     * @notice Bet bear position
     * @param epoch: epoch
     */
    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"
        );

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

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

    /**
     * @notice Bet bull position
     * @param epoch: epoch
     */
    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"
        );

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

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

    /**
     * @notice Claim reward for an array of epochs
     * @param epochs: array of epochs
     */
    function claim(uint256[] calldata epochs)
        external
        nonReentrant
        notContract
    {
        require(
            galaxy.getResidentStatus(msg.sender),
            "You need to have a profile on WigoGalaxy to claim your rewards or refund."
        );

        (address refAddress, bool refIsActive, ) = galaxy.getReferralData(
            msg.sender
        );

        uint256 userReward; // Initializes userReward
        uint256 refReward; // Initializes refReward

        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 addedUserReward = 0;
            uint256 addedRefReward = 0;
            uint256 treasuryAmt = 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]];

                uint256 totalReward = (ledger[epochs[i]][msg.sender].amount *
                    round.rewardAmount) / round.rewardBaseCalAmount;

                addedUserReward = (totalReward * (10000 - referrerFee)) / 10000;

                if (refIsActive && refAddress != address(0)) {
                    // User has a referrer
                    addedRefReward = totalReward - addedUserReward;
                } else {
                    // User has not a referrer.
                    treasuryAmt = totalReward - addedUserReward;
                }
            }
            // Round invalid, refund bet amount
            else {
                require(
                    refundable(epochs[i], msg.sender),
                    "Not eligible for refund"
                );
                addedUserReward = ledger[epochs[i]][msg.sender].amount;
            }

            ledger[epochs[i]][msg.sender].claimed = true;
            userReward += addedUserReward;
            refReward += addedRefReward;
            treasuryAmount += treasuryAmt;

            emit Claim(
                msg.sender,
                epochs[i],
                addedUserReward,
                addedRefReward,
                treasuryAmt
            );
        }

        if (userReward > 0) {
            _safeTransferFTM(address(msg.sender), userReward);
        }
        if (refReward > 0) {
            _safeTransferFTM(address(refAddress), refReward);
        }
    }

    /**
     * @notice Start the next round n, lock price for round n-1, end round n-2
     * @dev Callable by keeper or executor
     */
    function executeRound() external whenNotPaused onlyKeeperOrExecutor {
        require(
            genesisStartOnce && genesisLockOnce,
            "Can only run after genesisStartRound and genesisLockRound is triggered"
        );

        (uint80 currentRoundId, int256 currentPrice) = _getPriceFromOracle();

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

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

    /**
     * @notice Lock genesis round
     * @dev Callable by admin or keeper
     */
    function genesisLockRound() external whenNotPaused onlyAdminOrKeeper {
        require(
            genesisStartOnce,
            "Can only run after genesisStartRound is triggered"
        );
        require(!genesisLockOnce, "Can only run genesisLockRound once");

        (uint80 currentRoundId, int256 currentPrice) = _getPriceFromOracle();

        _safeLockRound(currentEpoch, currentRoundId, currentPrice);

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

    /**
     * @notice Start genesis round
     * @dev Callable by admin or keeper
     */
    function genesisStartRound() external whenNotPaused onlyAdminOrKeeper {
        require(!genesisStartOnce, "Can only run genesisStartRound once");

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

    /**
     * @notice called by the admin to pause, triggers stopped state
     * @dev Callable by admin or keeper
     */
    function pause() external whenNotPaused onlyAdminOrKeeper {
        _pause();

        emit Pause(currentEpoch);
    }

    /**
     * @notice Claim all rewards in treasury
     * @dev Callable by admin
     */
    function claimTreasury() external nonReentrant onlyAdminOrTreasury {
        uint256 currentTreasuryAmount = treasuryAmount;
        treasuryAmount = 0;
        _safeTransferFTM(treasuryAddress, currentTreasuryAmount);

        emit TreasuryClaim(currentTreasuryAmount);
    }

    /**
     * @notice called by the admin to unpause, returns to normal state
     * Reset genesis state. Once paused, the rounds would need to be kickstarted by genesis
     * @dev Callable by admin or keeper
     */
    function unpause() external whenPaused onlyAdminOrKeeper {
        genesisStartOnce = false;
        genesisLockOnce = false;
        _unpause();

        emit Unpause(currentEpoch);
    }

    /**
     * @notice Set buffer and interval (in seconds)
     * @dev Callable by admin
     */
    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);
    }

    /**
     * @notice Set minBetAmount
     * @dev Callable by admin
     */
    function setMinBetAmount(uint256 _minBetAmount)
        external
        whenPaused
        onlyAdmin
    {
        require(_minBetAmount != 0, "Must be superior to 0");
        minBetAmount = _minBetAmount;

        emit NewMinBetAmount(currentEpoch, minBetAmount);
    }

    /**
     * @notice Set executor address
     * @dev Callable by admin
     */
    function setExecutor(address _executorAddress) external onlyAdmin {
        require(_executorAddress != address(0), "Cannot be zero address");
        executorAddress = _executorAddress;

        emit NewExecutorAddress(_executorAddress);
    }

    /**
     * @notice Set keeper address
     * @dev Callable by admin
     */
    function setKeeper(address _keeperAddress) external onlyAdmin {
        require(_keeperAddress != address(0), "Cannot be zero address");
        keeperAddress = _keeperAddress;

        emit NewKeeperAddress(_keeperAddress);
    }

    /**
     * @notice Set Oracle address
     * @dev Callable by admin
     */
    function setOracle(address _oracle) external whenPaused onlyAdmin {
        require(_oracle != address(0), "Cannot be zero address");
        oracle = AggregatorV3Interface(_oracle);

        // Dummy check to make sure the interface implements this function properly
        oracle.latestRoundData();

        emit NewOracle(_oracle);
    }

    /**
     * @notice Set WigoGalaxy address
     * @dev Callable by admin
     */
    function setWigoGalaxy(address _wigoGalaxy) external whenPaused onlyAdmin {
        require(
            _wigoGalaxy != address(0),
            "Operations: WigoGalaxy address cannot be zero"
        );
        galaxy = IWigoGalaxy(_wigoGalaxy);

        emit NewWigoGalaxyAddress(_wigoGalaxy);
    }

    /**
     * @notice Set oracle update allowance
     * @dev Callable by admin
     */
    function setOracleUpdateAllowance(uint256 _oracleUpdateAllowance)
        external
        whenPaused
        onlyAdmin
    {
        oracleUpdateAllowance = _oracleUpdateAllowance;

        emit NewOracleUpdateAllowance(_oracleUpdateAllowance);
    }

    /**
     * @notice Set treasury fee and referrer fee
     * @dev Callable by admin
     */
    function setFee(uint256 _treasuryFee, uint256 _referrerFee)
        external
        whenPaused
        onlyAdmin
    {
        require(
            _treasuryFee + _referrerFee <= MAX_FEE,
            "treasuryFee + referrerFee too high"
        );
        treasuryFee = _treasuryFee;
        referrerFee = _referrerFee;

        emit NewFee(currentEpoch, _treasuryFee, _referrerFee);
    }

    /**
     * @notice Set treasury address
     * @dev Callable by owner
     */
    function setTreasuryAddress(address _treasuryAddress) external onlyOwner {
        require(_treasuryAddress != address(0), "Cannot be zero address");
        treasuryAddress = _treasuryAddress;

        emit NewTreasuryAddress(_treasuryAddress);
    }

    /**
     * @notice It allows the owner to recover tokens sent to the contract by mistake
     * @param _token: token address
     * @param _amount: token amount
     * @dev Callable by owner
     */
    function recoverToken(address _token, uint256 _amount) external onlyOwner {
        IERC20(_token).safeTransfer(address(msg.sender), _amount);

        emit TokenRecovery(_token, _amount);
    }

    /**
     * @notice Set admin address
     * @dev Callable by owner
     */
    function setAdmin(address _adminAddress) external onlyOwner {
        require(_adminAddress != address(0), "Cannot be zero address");
        adminAddress = _adminAddress;

        emit NewAdminAddress(_adminAddress);
    }

    /**
     * @notice Returns round epochs and bet information for a user that has participated
     * @param user: user address
     * @param cursor: cursor
     * @param size: size
     */
    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);
    }

    /**
     * @notice Returns round epochs length
     * @param user: user address
     */
    function getUserRoundsLength(address user) external view returns (uint256) {
        return userRounds[user].length;
    }

    /**
     * @notice Get the claimable stats of specific epoch and user account
     * @param epoch: epoch
     * @param user: user address
     */
    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));
    }

    /**
     * @notice Get the refundable stats of specific epoch and user account
     * @param epoch: epoch
     * @param user: user address
     */
    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;
    }

    /**
     * @notice Calculate rewards for round
     * @param epoch: epoch
     */
    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;
            //no winner , house win
            if (rewardBaseCalAmount == 0) {
                treasuryAmt = round.totalAmount;
            } else {
                treasuryAmt = (round.totalAmount * treasuryFee) / 10000;
            }
            rewardAmount = round.totalAmount - treasuryAmt;
        }
        // Bear wins
        else if (round.closePrice < round.lockPrice) {
            rewardBaseCalAmount = round.bearAmount;
            //no winner , house win
            if (rewardBaseCalAmount == 0) {
                treasuryAmt = round.totalAmount;
            } else {
                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
        );
    }

    /**
     * @notice End round
     * @param epoch: epoch
     * @param roundId: roundId
     * @param price: price of the round
     */
    function _safeEndRound(
        uint256 epoch,
        uint256 roundId,
        int256 price
    ) 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];
        require(
            !round.oracleCalled,
            "Oracle has already been called for this round"
        );
        round.closePrice = price;
        round.closeOracleId = roundId;
        round.oracleCalled = true;

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

    /**
     * @notice Lock round
     * @param epoch: epoch
     * @param roundId: roundId
     * @param price: price of the round
     */
    function _safeLockRound(
        uint256 epoch,
        uint256 roundId,
        int256 price
    ) 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.lockOracleId = roundId;

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

    /**
     * @notice Start round
     * Previous round n-2 must end
     * @param epoch: epoch
     */
    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);
    }

    /**
     * @notice Transfer FTM in a safe way
     * @param to: address to transfer FTM to
     * @param value: FTM amount to transfer (in wei)
     */
    function _safeTransferFTM(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}("");
        require(success, "TransferHelper: FTM_TRANSFER_FAILED");
    }

    /**
     * @notice Start round
     * Previous round n-2 must end
     * @param epoch: epoch
     */
    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);
    }

    /**
     * @notice Determine if a round is valid for receiving bets
     * Round must have started and locked
     * Current timestamp must be within startTimestamp and closeTimestamp
     */
    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;
    }

    /**
     * @notice Get latest recorded price from oracle
     * If it falls below allowed buffer or has not updated, it would be invalid.
     */
    function _getPriceFromOracle() internal view returns (uint80, int256) {
        uint256 leastAllowedTimestamp = block.timestamp + oracleUpdateAllowance;
        (uint80 roundId, int256 price, , uint256 timestamp, ) = oracle
            .latestRoundData();
        require(
            timestamp <= leastAllowedTimestamp,
            "Oracle update exceeded max timestamp allowance"
        );
        require(
            block.timestamp <= timestamp + (2 * oracleUpdateAllowance),
            "Oracle update price is not valid"
        );
        return (roundId, price);
    }

    /**
     * @notice Returns true if `account` is a contract.
     * @param account: account address
     */
    function _isContract(address account) internal view returns (bool) {
        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

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

File 3 of 10 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

File 6 of 10 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.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;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

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

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    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");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @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");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 7 of 10 : AggregatorV3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorV3Interface {
  function decimals() external view returns (uint8);

  function description() external view returns (string memory);

  function version() external view returns (uint256);

  // getRoundData and latestRoundData should both raise "No data present"
  // if they do not have data to report, instead of returning unset values
  // which could be misinterpreted as actual reported values.
  function getRoundData(uint80 _roundId)
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

  function latestRoundData()
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );
}

File 8 of 10 : IWigoGalaxy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IWigoGalaxy {
    function getResidentStatus(address _residentAddress)
        external
        view
        returns (bool);

    function getReferralData(address _residentAddress)
        external
        view
        returns (
            address,
            bool,
            uint256
        );

    function hasRegistered(address _residentAddress)
        external
        view
        returns (bool);
}

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

pragma solidity ^0.8.0;

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

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

File 10 of 10 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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
     * ====
     *
     * [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://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

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

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

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

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

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

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

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

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

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

    /**
     * @dev 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) {
        require(isContract(target), "Address: delegate call to non-contract");

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_oracleAddress","type":"address"},{"internalType":"address","name":"_adminAddress","type":"address"},{"internalType":"address","name":"_executorAddress","type":"address"},{"internalType":"address","name":"_treasuryAddress","type":"address"},{"internalType":"address","name":"_wigoGalaxyAddress","type":"address"},{"internalType":"uint256","name":"_intervalSeconds","type":"uint256"},{"internalType":"uint256","name":"_bufferSeconds","type":"uint256"},{"internalType":"uint256","name":"_minBetAmount","type":"uint256"},{"internalType":"uint256","name":"_oracleUpdateAllowance","type":"uint256"},{"internalType":"uint256","name":"_treasuryFee","type":"uint256"},{"internalType":"uint256","name":"_referrerFee","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"},{"indexed":false,"internalType":"uint256","name":"refAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"treasuryAmount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":false,"internalType":"int256","name":"price","type":"int256"}],"name":"EndRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"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":false,"internalType":"address","name":"executor","type":"address"}],"name":"NewExecutorAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"treasuryFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"referrerFee","type":"uint256"}],"name":"NewFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"keeper","type":"address"}],"name":"NewKeeperAddress","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":"oracle","type":"address"}],"name":"NewOracle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oracleUpdateAllowance","type":"uint256"}],"name":"NewOracleUpdateAllowance","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"treasury","type":"address"}],"name":"NewTreasuryAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"galaxy","type":"address"}],"name":"NewWigoGalaxyAddress","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_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":"currentEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"executeRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"executorAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"galaxy","outputs":[{"internalType":"contract IWigoGalaxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"genesisLockOnce","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"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 Predict.Position","name":"position","type":"uint8"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"claimed","type":"bool"}],"internalType":"struct Predict.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":[],"name":"keeperAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"ledger","outputs":[{"internalType":"enum Predict.Position","name":"position","type":"uint8"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"claimed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBetAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracle","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracleUpdateAllowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"referrerFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"uint256","name":"lockOracleId","type":"uint256"},{"internalType":"uint256","name":"closeOracleId","type":"uint256"},{"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":"address","name":"_executorAddress","type":"address"}],"name":"setExecutor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_treasuryFee","type":"uint256"},{"internalType":"uint256","name":"_referrerFee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_keeperAddress","type":"address"}],"name":"setKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minBetAmount","type":"uint256"}],"name":"setMinBetAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oracle","type":"address"}],"name":"setOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_oracleUpdateAllowance","type":"uint256"}],"name":"setOracleUpdateAllowance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryAddress","type":"address"}],"name":"setTreasuryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wigoGalaxy","type":"address"}],"name":"setWigoGalaxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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"}]

60806040526003805461ffff60a01b191690553480156200001f57600080fd5b50604051620061aa380380620061aa833981016040819052620000429162000229565b6200004d33620001bc565b6000805460ff60a01b19169055600180556103e86200006d8284620002d5565b1115620000cc5760405162461bcd60e51b815260206004820152602260248201527f7472656173757279466565202b20726566657272657246656520746f6f2068696044820152610ced60f31b60648201526084015b60405180910390fd5b6001600160a01b0387166200013a5760405162461bcd60e51b815260206004820152602d60248201527f4f7065726174696f6e733a205769676f47616c6178792061646472657373206360448201526c616e6e6f74206265207a65726f60981b6064820152608401620000c3565b600380546001600160a01b03199081166001600160a01b039d8e16179091556004805482169b8d169b909b17909a55600780548b16998c1699909917909855600580548a16978b1697909717909655600280549098169490981693909317909555600955600893909355600a92909255600f92909255600c55600d55620002fa565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200022457600080fd5b919050565b60008060008060008060008060008060006101608c8e0312156200024b578687fd5b620002568c6200020c565b9a506200026660208d016200020c565b99506200027660408d016200020c565b98506200028660608d016200020c565b97506200029660808d016200020c565b965060a08c0151955060c08c0151945060e08c015193506101008c015192506101208c015191506101408c015190509295989b509295989b9093969950565b60008219821115620002f557634e487b7160e01b81526011600452602481fd5b500190565b615ea0806200030a6000396000f3fe6080604052600436106103115760003560e01c80637bf412541161019a578063b67a85bd116100e1578063dd1f75961161008a578063f7fdec2811610064578063f7fdec28146109f9578063fa968eea14610a2c578063fc6f946814610a4257600080fd5b8063dd1f7596146109a3578063eaba2361146109c3578063f2fde38b146109d957600080fd5b8063cc32d176116100bb578063cc32d17614610958578063cf2f50391461096e578063d9d55eac1461098e57600080fd5b8063b67a85bd146108e8578063bc063e1a14610915578063c5f956af1461092b57600080fd5b80638da5cb5b11610143578063a8e9a5391161011d578063a8e9a53914610888578063aa6b873a146108b5578063b29a8140146108c857600080fd5b80638da5cb5b1461080e578063951fd60014610839578063a0c7f71c1461086857600080fd5b80638456cb59116101745780638456cb59146106e4578063890dc766146106f95780638c65c81f1461071957600080fd5b80637bf41254146106815780637d1cd04f146106a15780637dc0d1d0146106b757600080fd5b8063605540111161025e578063715018a61161020757806376671808116101e157806376671808146106365780637adbf9731461064c5780637b3205f51461066c57600080fd5b8063715018a6146105a65780637285c58b146105bb578063748747e61461061657600080fd5b80636c188593116102385780636c188593146105505780636e88a7bd14610570578063704b6c021461058657600080fd5b806360554011146104fa5780636605bfda146105105780636ba4c1381461053057600080fd5b80633f4ba83a116102c057806352f7c9881161029a57806352f7c9881461049757806357fb096f146104b75780635c975abb146104ca57600080fd5b80633f4ba83a1461041b5780634377486414610430578063452fd75a1461048257600080fd5b80631c3c0ea8116102f15780631c3c0ea814610394578063273867d4146103b4578063368acb091461040557600080fd5b8062167452146103165780623bdc74146103385780630f74174f1461034d575b600080fd5b34801561032257600080fd5b506103366103313660046159a4565b610a6f565b005b34801561034457600080fd5b50610336610c96565b34801561035957600080fd5b5060035461037f9074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020015b60405180910390f35b3480156103a057600080fd5b506103366103af3660046159a4565b610e11565b3480156103c057600080fd5b506103f76103cf3660046159a4565b73ffffffffffffffffffffffffffffffffffffffff1660009081526012602052604090205490565b60405190815260200161038b565b34801561041157600080fd5b506103f7600b5481565b34801561042757600080fd5b50610336610f82565b34801561043c57600080fd5b5060025461045d9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161038b565b34801561048e57600080fd5b50610336611107565b3480156104a357600080fd5b506103366104b2366004615b2d565b611339565b6103366104c5366004615ae6565b611524565b3480156104d657600080fd5b5060005474010000000000000000000000000000000000000000900460ff1661037f565b34801561050657600080fd5b506103f7600f5481565b34801561051c57600080fd5b5061033661052b3660046159a4565b6119b8565b34801561053c57600080fd5b5061033661054b366004615a5c565b611b29565b34801561055c57600080fd5b5061033661056b366004615ae6565b61260b565b34801561057c57600080fd5b506103f7600d5481565b34801561059257600080fd5b506103366105a13660046159a4565b6127b5565b3480156105b257600080fd5b50610336612926565b3480156105c757600080fd5b506106076105d6366004615afe565b601060209081526000928352604080842090915290825290208054600182015460029092015460ff91821692911683565b60405161038b93929190615c96565b34801561062257600080fd5b506103366106313660046159a4565b6129b3565b34801561064257600080fd5b506103f7600e5481565b34801561065857600080fd5b506103366106673660046159a4565b612b24565b34801561067857600080fd5b50610336612dbd565b34801561068d57600080fd5b5061037f61069c366004615afe565b613060565b3480156106ad57600080fd5b506103f760095481565b3480156106c357600080fd5b5060035461045d9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156106f057600080fd5b5061033661322b565b34801561070557600080fd5b50610336610714366004615b2d565b613389565b34801561072557600080fd5b506107a4610734366004615ae6565b601160205260009081526040902080546001820154600283015460038401546004850154600586015460068701546007880154600889015460098a0154600a8b0154600b8c0154600c8d0154600d909d01549b9c9a9b999a98999798969795969495939492939192909160ff168e565b604080519e8f5260208f019d909d529b8d019a909a5260608c019890985260808b019690965260a08a019490945260c089019290925260e088015261010087015261012086015261014085015261016084015261018083015215156101a08201526101c00161038b565b34801561081a57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661045d565b34801561084557600080fd5b50610859610854366004615a28565b613564565b60405161038b93929190615bf4565b34801561087457600080fd5b5061037f610883366004615afe565b613945565b34801561089457600080fd5b5060075461045d9073ffffffffffffffffffffffffffffffffffffffff1681565b6103366108c3366004615ae6565b613bb6565b3480156108d457600080fd5b506103366108e33660046159fd565b61403f565b3480156108f457600080fd5b5060065461045d9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561092157600080fd5b506103f76103e881565b34801561093757600080fd5b5060055461045d9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561096457600080fd5b506103f7600c5481565b34801561097a57600080fd5b50610336610989366004615ae6565b614129565b34801561099a57600080fd5b50610336614263565b3480156109af57600080fd5b506103f76109be3660046159fd565b614568565b3480156109cf57600080fd5b506103f760085481565b3480156109e557600080fd5b506103366109f43660046159a4565b614599565b348015610a0557600080fd5b5060035461037f907501000000000000000000000000000000000000000000900460ff1681565b348015610a3857600080fd5b506103f7600a5481565b348015610a4e57600080fd5b5060045461045d9073ffffffffffffffffffffffffffffffffffffffff1681565b60005474010000000000000000000000000000000000000000900460ff16610af8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064015b60405180910390fd5b60045473ffffffffffffffffffffffffffffffffffffffff163314610b79576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e00000000000000000000000000000000000000000000006044820152606401610aef565b73ffffffffffffffffffffffffffffffffffffffff8116610c1c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4f7065726174696f6e733a205769676f47616c6178792061646472657373206360448201527f616e6e6f74206265207a65726f000000000000000000000000000000000000006064820152608401610aef565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f360d2d6d8efaf9c060942d519f3117620ed52929bcee888996411d71038802a5906020015b60405180910390a150565b60026001541415610d03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610aef565b600260015560045473ffffffffffffffffffffffffffffffffffffffff16331480610d45575060055473ffffffffffffffffffffffffffffffffffffffff1633145b610dab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4e6f742061646d696e2f747265617375727900000000000000000000000000006044820152606401610aef565b600b80546000909155600554610dd79073ffffffffffffffffffffffffffffffffffffffff16826146c9565b6040518181527fb9197c6b8e21274bd1e2d9c956a88af5cfee510f630fab3f046300f88b4223619060200160405180910390a15060018055565b60045473ffffffffffffffffffffffffffffffffffffffff163314610e92576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e00000000000000000000000000000000000000000000006044820152606401610aef565b73ffffffffffffffffffffffffffffffffffffffff8116610f0f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f43616e6e6f74206265207a65726f2061646472657373000000000000000000006044820152606401610aef565b600780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f68f3edfcb7a20b55ac9261ad77597af06d302f5c204000e5e832d89d64d642a990602001610c8b565b60005474010000000000000000000000000000000000000000900460ff16611006576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610aef565b60045473ffffffffffffffffffffffffffffffffffffffff16331480611043575060065473ffffffffffffffffffffffffffffffffffffffff1633145b6110a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f742061646d696e2f6b6565706572000000000000000000000000000000006044820152606401610aef565b600380547fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff1690556110d96147be565b600e546040517faaa520fdd7d2c83061d632fa017b0432407e798818af63ea908589fceda39ab790600090a2565b60005474010000000000000000000000000000000000000000900460ff161561118c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610aef565b60045473ffffffffffffffffffffffffffffffffffffffff163314806111c9575060065473ffffffffffffffffffffffffffffffffffffffff1633145b61122f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f742061646d696e2f6b6565706572000000000000000000000000000000006044820152606401610aef565b6003547501000000000000000000000000000000000000000000900460ff16156112db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f43616e206f6e6c792072756e2067656e657369735374617274526f756e64206f60448201527f6e636500000000000000000000000000000000000000000000000000000000006064820152608401610aef565b600e546112e9906001615d0b565b600e8190556112f7906148b7565b600380547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff167501000000000000000000000000000000000000000000179055565b60005474010000000000000000000000000000000000000000900460ff166113bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610aef565b60045473ffffffffffffffffffffffffffffffffffffffff16331461143e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e00000000000000000000000000000000000000000000006044820152606401610aef565b6103e861144b8284615d0b565b11156114d9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f7472656173757279466565202b20726566657272657246656520746f6f20686960448201527f67680000000000000000000000000000000000000000000000000000000000006064820152608401610aef565b600c829055600d819055600e5460408051848152602081018490527fcfca96e0fef3432146913b2a5a2268a55d3f475fe057e7ffde1082b77693f4f391015b60405180910390a25050565b60005474010000000000000000000000000000000000000000900460ff16156115a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610aef565b60026001541415611616576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610aef565b6002600155333b15611684576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f436f6e7472616374206e6f7420616c6c6f7765640000000000000000000000006044820152606401610aef565b3332146116ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f50726f787920636f6e7472616374206e6f7420616c6c6f7765640000000000006044820152606401610aef565b600e548114611758576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f42657420697320746f6f206561726c792f6c61746500000000000000000000006044820152606401610aef565b61176181614935565b6117c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f526f756e64206e6f74206265747461626c6500000000000000000000000000006044820152606401610aef565b600a54341015611859576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f42657420616d6f756e74206d7573742062652067726561746572207468616e2060448201527f6d696e426574416d6f756e7400000000000000000000000000000000000000006064820152608401610aef565b6000818152601060209081526040808320338452909152902060010154156118dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616e206f6e6c7920626574206f6e63652070657220726f756e6400000000006044820152606401610aef565b600081815260116020526040902060088101543491906118fe908390615d0b565b60088201556009810154611913908390615d0b565b600982015560008381526010602090815260408083203380855290835281842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016815560018082018890556012855283862080549182018155865294849020909401879055905185815286927f438122d8cff518d18388099a5181f0d17a12b4f1b55faedf6e4a6acee0060c1291015b60405180910390a35050600180555050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611a39576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610aef565b73ffffffffffffffffffffffffffffffffffffffff8116611ab6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f43616e6e6f74206265207a65726f2061646472657373000000000000000000006044820152606401610aef565b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f8b4531436af204a864adc47c345e10cb5c4df79165aa0cb85fc45ac5b551517b90602001610c8b565b60026001541415611b96576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610aef565b6002600155333b15611c04576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f436f6e7472616374206e6f7420616c6c6f7765640000000000000000000000006044820152606401610aef565b333214611c6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f50726f787920636f6e7472616374206e6f7420616c6c6f7765640000000000006044820152606401610aef565b6002546040517f559239c000000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091169063559239c09060240160206040518083038186803b158015611cd657600080fd5b505afa158015611cea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0e9190615acc565b611dc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604960248201527f596f75206e65656420746f206861766520612070726f66696c65206f6e20576960448201527f676f47616c61787920746f20636c61696d20796f75722072657761726473206f60648201527f7220726566756e642e0000000000000000000000000000000000000000000000608482015260a401610aef565b6002546040517fa3674633000000000000000000000000000000000000000000000000000000008152336004820152600091829173ffffffffffffffffffffffffffffffffffffffff9091169063a36746339060240160606040518083038186803b158015611e2e57600080fd5b505afa158015611e42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6691906159c0565b509150915060008060005b858110156125de5760116000888884818110611eb6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9050602002013581526020019081526020016000206001015460001415611f39576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f526f756e6420686173206e6f74207374617274656400000000000000000000006044820152606401610aef565b60116000888884818110611f76577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201358152602001908152602001600020600301544211611ff7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f526f756e6420686173206e6f7420656e646564000000000000000000000000006044820152606401610aef565b6000806000601160008b8b87818110612039577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60209081029290920135835250810191909152604001600020600d015460ff1615612338576120a78a8a8681811061209a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9050602002013533613945565b61210d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4e6f7420656c696769626c6520666f7220636c61696d000000000000000000006044820152606401610aef565b6000601160008c8c8881811061214c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201358152602001908152602001600020604051806101c001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d820160009054906101000a900460ff16151515158152505090506000816101600151826101800151601060008f8f8b818110612257577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020135815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101546122b79190615d5c565b6122c19190615d23565b9050612710600d546127106122d69190615d99565b6122e09083615d5c565b6122ea9190615d23565b945088801561230e575073ffffffffffffffffffffffffffffffffffffffff8a1615155b156123245761231d8582615d99565b9350612331565b61232e8582615d99565b92505b505061247d565b6123818a8a86818110612374577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9050602002013533613060565b6123e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e6f7420656c696769626c6520666f7220726566756e640000000000000000006044820152606401610aef565b601060008b8b87818110612424577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020135815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015492505b6001601060008c8c888181106124bc577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602090810292909201358352508181019290925260409081016000908120338252909252902060020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905561251c8387615d0b565b95506125288286615d0b565b945080600b600082825461253c9190615d0b565b909155508a9050898581811061257b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60408051878152602081810188905291810186905291029290920135913391507f68e1caf97c4c29c1ac46024e9590f80b7a1f690d393703879cf66eea4e1e84219060600160405180910390a350505080806125d690615de0565b915050611e71565b5081156125ef576125ef33836146c9565b80156125ff576125ff84826146c9565b50506001805550505050565b60005474010000000000000000000000000000000000000000900460ff1661268f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610aef565b60045473ffffffffffffffffffffffffffffffffffffffff163314612710576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e00000000000000000000000000000000000000000000006044820152606401610aef565b80612777576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4d757374206265207375706572696f7220746f203000000000000000000000006044820152606401610aef565b600a819055600e546040518281527f90eb87c560a0213754ceb3a7fa3012f01acab0a35602c1e1995adf69dabc9d509060200160405180910390a250565b60005473ffffffffffffffffffffffffffffffffffffffff163314612836576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610aef565b73ffffffffffffffffffffffffffffffffffffffff81166128b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f43616e6e6f74206265207a65726f2061646472657373000000000000000000006044820152606401610aef565b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f137b621413925496477d46e5055ac0d56178bdd724ba8bf843afceef18268ba390602001610c8b565b60005473ffffffffffffffffffffffffffffffffffffffff1633146129a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610aef565b6129b160006149a0565b565b60045473ffffffffffffffffffffffffffffffffffffffff163314612a34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e00000000000000000000000000000000000000000000006044820152606401610aef565b73ffffffffffffffffffffffffffffffffffffffff8116612ab1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f43616e6e6f74206265207a65726f2061646472657373000000000000000000006044820152606401610aef565b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f08e852e92293423835a76ae180bcdffded8a537e30eccf6ffeda77be7297cc4390602001610c8b565b60005474010000000000000000000000000000000000000000900460ff16612ba8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610aef565b60045473ffffffffffffffffffffffffffffffffffffffff163314612c29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e00000000000000000000000000000000000000000000006044820152606401610aef565b73ffffffffffffffffffffffffffffffffffffffff8116612ca6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f43616e6e6f74206265207a65726f2061646472657373000000000000000000006044820152606401610aef565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117909155604080517ffeaf968c000000000000000000000000000000000000000000000000000000008152905163feaf968c9160048082019260a092909190829003018186803b158015612d3857600080fd5b505afa158015612d4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d709190615b4e565b505060405173ffffffffffffffffffffffffffffffffffffffff851681527fb3eacd0e351fafdfefdec84e1cd19679b38dbcd63ea7c2c24da17fd2bc3b3c0e93506020019150610c8b9050565b60005474010000000000000000000000000000000000000000900460ff1615612e42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610aef565b60065473ffffffffffffffffffffffffffffffffffffffff16331480612e7f575060075473ffffffffffffffffffffffffffffffffffffffff1633145b612ee5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4e6f74206b65657065722f6578656375746f72000000000000000000000000006044820152606401610aef565b6003547501000000000000000000000000000000000000000000900460ff168015612f2a575060035474010000000000000000000000000000000000000000900460ff165b612fdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604660248201527f43616e206f6e6c792072756e2061667465722067656e6573697353746172745260448201527f6f756e6420616e642067656e657369734c6f636b526f756e642069732074726960648201527f6767657265640000000000000000000000000000000000000000000000000000608482015260a401610aef565b600080612fe7614a15565b91509150613004600e548369ffffffffffffffffffff1683614bf3565b6130296001600e546130169190615d99565b8369ffffffffffffffffffff1683614e4c565b6130406001600e5461303b9190615d99565b61514d565b600e5461304e906001615d0b565b600e81905561305c906152fd565b5050565b600082815260106020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152808220815160608101909252805483929190829060ff1660018111156130dc577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6001811115613114577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b815260018281015460208084019190915260029384015460ff908116151560409485015260008a81526011835284902084516101c08101865281548152938101549284019290925293810154928201929092526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c820154610180820152600d909101549091161580156101a0830181905292935090916131f557508160400151155b80156132115750600854816060015161320e9190615d0b565b42115b80156132205750602082015115155b925050505b92915050565b60005474010000000000000000000000000000000000000000900460ff16156132b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610aef565b60045473ffffffffffffffffffffffffffffffffffffffff163314806132ed575060065473ffffffffffffffffffffffffffffffffffffffff1633145b613353576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f742061646d696e2f6b6565706572000000000000000000000000000000006044820152606401610aef565b61335b615512565b600e546040517f68b095021b1f40fe513109f513c66692f0b3219aee674a69f4efc57badb8201d90600090a2565b60005474010000000000000000000000000000000000000000900460ff1661340d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610aef565b60045473ffffffffffffffffffffffffffffffffffffffff16331461348e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e00000000000000000000000000000000000000000000006044820152606401610aef565b80821061351d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f6275666665725365636f6e6473206d75737420626520696e666572696f72207460448201527f6f20696e74657276616c5365636f6e64730000000000000000000000000000006064820152608401610aef565b6008829055600981905560408051838152602081018390527fe60149e0431fec12df63dfab5fce2a9cefe9a4d3df5f41cb626f579ae1f2b91a910160405180910390a15050565b73ffffffffffffffffffffffffffffffffffffffff83166000908152601260205260408120546060918291849061359c908790615d99565b8111156135d75773ffffffffffffffffffffffffffffffffffffffff87166000908152601260205260409020546135d4908790615d99565b90505b60008167ffffffffffffffff811115613619577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015613642578160200160208202803683370190505b50905060008267ffffffffffffffff811115613687577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156136f057816020015b60408051606081018252600080825260208083018290529282015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816136a55790505b50905060005b838110156139265773ffffffffffffffffffffffffffffffffffffffff8a16600090815260126020526040902061372d828b615d0b565b81548110613764577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001548382815181106137a8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001018181525050601060008483815181106137f1577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020908102919091018101518252818101929092526040908101600090812073ffffffffffffffffffffffffffffffffffffffff8e168252909252908190208151606081019092528054829060ff166001811115613878577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60018111156138b0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81526001820154602082015260029091015460ff1615156040909101528251839083908110613908577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010181905250808061391e90615de0565b9150506136f6565b508181613933858b615d0b565b95509550955050505093509350939050565b600082815260106020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152808220815160608101909252805483929190829060ff1660018111156139c1577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60018111156139f9577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b815260018281015460208084019190915260029384015460ff908116151560409485015260008a81526011835284902084516101c081018652815481529381015492840192909252938101549282019290925260038201546060820152600482015460808201819052600583015460a08301819052600684015460c0840152600784015460e084015260088401546101008401526009840154610120840152600a840154610140840152600b840154610160840152600c840154610180840152600d9093015490931615156101a08201529293501415613ade57600092505050613225565b806101a001518015613af35750602082015115155b8015613b0157508160400151155b8015613220575080608001518160a00151138015613b585750600082516001811115613b56577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b145b80613220575080608001518160a001511280156132205750600182516001811115613bac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1495945050505050565b60005474010000000000000000000000000000000000000000900460ff1615613c3b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610aef565b60026001541415613ca8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610aef565b6002600155333b15613d16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f436f6e7472616374206e6f7420616c6c6f7765640000000000000000000000006044820152606401610aef565b333214613d7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f50726f787920636f6e7472616374206e6f7420616c6c6f7765640000000000006044820152606401610aef565b600e548114613dea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f42657420697320746f6f206561726c792f6c61746500000000000000000000006044820152606401610aef565b613df381614935565b613e59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f526f756e64206e6f74206265747461626c6500000000000000000000000000006044820152606401610aef565b600a54341015613eeb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f42657420616d6f756e74206d7573742062652067726561746572207468616e2060448201527f6d696e426574416d6f756e7400000000000000000000000000000000000000006064820152608401610aef565b600081815260106020908152604080832033845290915290206001015415613f6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616e206f6e6c7920626574206f6e63652070657220726f756e6400000000006044820152606401610aef565b60008181526011602052604090206008810154349190613f90908390615d0b565b6008820155600a810154613fa5908390615d0b565b600a82015560008381526010602090815260408083203380855290835281842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811782558082018890556012855283862080549182018155865294849020909401879055905185815286927f0d8c1fe3e67ab767116a81f122b83c2557a8c2564019cb7c4f83de1aeb1f1f0d91016119a6565b60005473ffffffffffffffffffffffffffffffffffffffff1633146140c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610aef565b6140e173ffffffffffffffffffffffffffffffffffffffff831633836155fe565b8173ffffffffffffffffffffffffffffffffffffffff167f14f11966a996e0629572e51064726d2057a80fbd34efc066682c06a71dbb6e988260405161151891815260200190565b60005474010000000000000000000000000000000000000000900460ff166141ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610aef565b60045473ffffffffffffffffffffffffffffffffffffffff16331461422e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e00000000000000000000000000000000000000000000006044820152606401610aef565b600f8190556040518181527f93ccaceac092ffb842c46b8718667a13a80e9058dcd0bd403d0b47215b30da0790602001610c8b565b60005474010000000000000000000000000000000000000000900460ff16156142e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610aef565b60045473ffffffffffffffffffffffffffffffffffffffff16331480614325575060065473ffffffffffffffffffffffffffffffffffffffff1633145b61438b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f742061646d696e2f6b6565706572000000000000000000000000000000006044820152606401610aef565b6003547501000000000000000000000000000000000000000000900460ff16614436576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f43616e206f6e6c792072756e2061667465722067656e6573697353746172745260448201527f6f756e64206973207472696767657265640000000000000000000000000000006064820152608401610aef565b60035474010000000000000000000000000000000000000000900460ff16156144e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f43616e206f6e6c792072756e2067656e657369734c6f636b526f756e64206f6e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610aef565b6000806144ec614a15565b91509150614509600e548369ffffffffffffffffffff1683614bf3565b600e54614517906001615d0b565b600e819055614525906148b7565b5050600380547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b6012602052816000526040600020818154811061458457600080fd5b90600052602060002001600091509150505481565b60005473ffffffffffffffffffffffffffffffffffffffff16331461461a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610aef565b73ffffffffffffffffffffffffffffffffffffffff81166146bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610aef565b6146c6816149a0565b50565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114614723576040519150601f19603f3d011682016040523d82523d6000602084013e614728565b606091505b50509050806147b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5472616e7366657248656c7065723a2046544d5f5452414e534645525f46414960448201527f4c454400000000000000000000000000000000000000000000000000000000006064820152608401610aef565b505050565b60005474010000000000000000000000000000000000000000900460ff16614842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610aef565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b600081815260116020526040902042600182018190556009546148d991615d0b565b6002808301919091556009546148ee91615d5c565b6148f89042615d0b565b600382015581815560006008820181905560405183917f939f42374aa9bf1d8d8cd56d8a9110cb040cd8dfeae44080c6fcf2645e51b45291a25050565b60008181526011602052604081206001015415801590614965575060008281526011602052604090206002015415155b8015614981575060008281526011602052604090206001015442115b8015613225575050600090815260116020526040902060020154421090565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806000600f5442614a289190615d0b565b90506000806000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b158015614a9757600080fd5b505afa158015614aab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614acf9190615b4e565b509350509250925083811115614b67576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f4f7261636c6520757064617465206578636565646564206d61782074696d657360448201527f74616d7020616c6c6f77616e63650000000000000000000000000000000000006064820152608401610aef565b600f54614b75906002615d5c565b614b7f9082615d0b565b421115614be8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f7261636c6520757064617465207072696365206973206e6f742076616c69646044820152606401610aef565b509094909350915050565b600083815260116020526040902060010154614c91576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f43616e206f6e6c79206c6f636b20726f756e6420616674657220726f756e642060448201527f68617320737461727465640000000000000000000000000000000000000000006064820152608401610aef565b600083815260116020526040902060020154421015614d32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f43616e206f6e6c79206c6f636b20726f756e64206166746572206c6f636b546960448201527f6d657374616d70000000000000000000000000000000000000000000000000006064820152608401610aef565b600854600084815260116020526040902060020154614d519190615d0b565b421115614de0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f43616e206f6e6c79206c6f636b20726f756e642077697468696e20627566666560448201527f725365636f6e64730000000000000000000000000000000000000000000000006064820152608401610aef565b6000838152601160205260409020600954614dfb9042615d0b565b60038201556004810182905560068101839055604051828152839085907f482e76a65b448a42deef26e99e58fb20c85e26f075defff8df6aa80459b39006906020015b60405180910390a350505050565b600083815260116020526040902060020154614eea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f43616e206f6e6c7920656e6420726f756e6420616674657220726f756e64206860448201527f6173206c6f636b656400000000000000000000000000000000000000000000006064820152608401610aef565b600083815260116020526040902060030154421015614f8b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f43616e206f6e6c7920656e6420726f756e6420616674657220636c6f7365546960448201527f6d657374616d70000000000000000000000000000000000000000000000000006064820152608401610aef565b600854600084815260116020526040902060030154614faa9190615d0b565b421115615039576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f43616e206f6e6c7920656e6420726f756e642077697468696e2062756666657260448201527f5365636f6e6473000000000000000000000000000000000000000000000000006064820152608401610aef565b6000838152601160205260409020600d81015460ff16156150dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4f7261636c652068617320616c7265616479206265656e2063616c6c6564206660448201527f6f72207468697320726f756e64000000000000000000000000000000000000006064820152608401610aef565b6005810182905560078101839055600d810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055604051839085907fb6ff1fe915db84788cbbbc017f0d2bef9485fad9fd0bd8ce9340fde0d8410dd890614e3e9086815260200190565b6000818152601160205260409020600b015415801561517b57506000818152601160205260409020600c0154155b6151e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f526577617264732063616c63756c6174656400000000000000000000000000006044820152606401610aef565b60008181526011602052604081206004810154600582015491929182918291131561525757600984015492508261521e5783600801549150615240565b612710600c5485600801546152339190615d5c565b61523d9190615d23565b91505b8184600801546152509190615d99565b905061528c565b83600401548460050154121561527f57600a84015492508261521e5783600801549150615240565b5050506008810154600090815b600b808501849055600c850182905580548391906000906152ae908490615d0b565b9091555050604080518481526020810183905290810183905285907f6dfdfcb09c8804d0058826cd2539f1acfbe3cb887c9be03d928035bce0f1a58d9060600160405180910390a25050505050565b6003547501000000000000000000000000000000000000000000900460ff166153a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f43616e206f6e6c792072756e2061667465722067656e6573697353746172745260448201527f6f756e64206973207472696767657265640000000000000000000000000000006064820152608401610aef565b601160006153b7600284615d99565b81526020019081526020016000206003015460001415615459576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f43616e206f6e6c7920737461727420726f756e6420616674657220726f756e6460448201527f206e2d322068617320656e6465640000000000000000000000000000000000006064820152608401610aef565b60116000615468600284615d99565b815260200190815260200160002060030154421015615509576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f43616e206f6e6c79207374617274206e657720726f756e64206166746572207260448201527f6f756e64206e2d3220636c6f736554696d657374616d700000000000000000006064820152608401610aef565b6146c6816148b7565b60005474010000000000000000000000000000000000000000900460ff1615615597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610aef565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861488d3390565b6040805173ffffffffffffffffffffffffffffffffffffffff848116602483015260448083018590528351808403909101815260649092018352602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564908401526147b9928692916000916156c9918516908490615773565b8051909150156147b957808060200190518101906156e79190615acc565b6147b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610aef565b6060615782848460008561578c565b90505b9392505050565b60608247101561581e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610aef565b73ffffffffffffffffffffffffffffffffffffffff85163b61589c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610aef565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516158c59190615bd8565b60006040518083038185875af1925050503d8060008114615902576040519150601f19603f3d011682016040523d82523d6000602084013e615907565b606091505b5091509150615917828286615922565b979650505050505050565b60608315615931575081615785565b8251156159415782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aef9190615cba565b8051801515811461598557600080fd5b919050565b805169ffffffffffffffffffff8116811461598557600080fd5b6000602082840312156159b5578081fd5b813561578581615e48565b6000806000606084860312156159d4578182fd5b83516159df81615e48565b92506159ed60208501615975565b9150604084015190509250925092565b60008060408385031215615a0f578182fd5b8235615a1a81615e48565b946020939093013593505050565b600080600060608486031215615a3c578283fd5b8335615a4781615e48565b95602085013595506040909401359392505050565b60008060208385031215615a6e578182fd5b823567ffffffffffffffff80821115615a85578384fd5b818501915085601f830112615a98578384fd5b813581811115615aa6578485fd5b8660208260051b8501011115615aba578485fd5b60209290920196919550909350505050565b600060208284031215615add578081fd5b61578582615975565b600060208284031215615af7578081fd5b5035919050565b60008060408385031215615b10578182fd5b823591506020830135615b2281615e48565b809150509250929050565b60008060408385031215615b3f578182fd5b50508035926020909101359150565b600080600080600060a08688031215615b65578081fd5b615b6e8661598a565b9450602086015193506040860151925060608601519150615b916080870161598a565b90509295509295909350565b60028110615bd4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b60008251615bea818460208701615db0565b9190910192915050565b60608082528451828201819052600091906020906080850190828901855b82811015615c2e57815184529284019290840190600101615c12565b50505084810382860152865180825287830191830190855b81811015615c7f578351615c5b848251615b9d565b80860151848701526040908101511515908401529284019291850191600101615c46565b505080945050505050826040830152949350505050565b60608101615ca48286615b9d565b8360208301528215156040830152949350505050565b6020815260008251806020840152615cd9816040850160208701615db0565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008219821115615d1e57615d1e615e19565b500190565b600082615d57577f4e487b710000000000000000000000000000000000000000000000000000000081526012600452602481fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615615d9457615d94615e19565b500290565b600082821015615dab57615dab615e19565b500390565b60005b83811015615dcb578181015183820152602001615db3565b83811115615dda576000848401525b50505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615e1257615e12615e19565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff811681146146c657600080fdfea264697066735822122032fa554fd2dfeb4986d53a6e573708a12dee011f78f6d951119e5644587a524b64736f6c63430008040033000000000000000000000000f4766552d15ae4d256ad41b6cf2933482b0680dc00000000000000000000000061e468f685392948504da7a49463fd508ec1e2cd0000000000000000000000006ede1597c05a0ca77031cba43ab887ccf24cd7e800000000000000000000000053dce346b09a521d7dd277872f136cf4b98ea326000000000000000000000000e63f6ab514167a7f28dd81d332a5e9f00819b9aa0000000000000000000000000000000000000000000000000000000000000384000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000038d7ea4c68000000000000000000000000000000000000000000000000000000000000000012c00000000000000000000000000000000000000000000000000000000000001900000000000000000000000000000000000000000000000000000000000000064

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

000000000000000000000000f4766552d15ae4d256ad41b6cf2933482b0680dc00000000000000000000000061e468f685392948504da7a49463fd508ec1e2cd0000000000000000000000006ede1597c05a0ca77031cba43ab887ccf24cd7e800000000000000000000000053dce346b09a521d7dd277872f136cf4b98ea326000000000000000000000000e63f6ab514167a7f28dd81d332a5e9f00819b9aa0000000000000000000000000000000000000000000000000000000000000384000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000038d7ea4c68000000000000000000000000000000000000000000000000000000000000000012c00000000000000000000000000000000000000000000000000000000000001900000000000000000000000000000000000000000000000000000000000000064

-----Decoded View---------------
Arg [0] : _oracleAddress (address): 0xf4766552d15ae4d256ad41b6cf2933482b0680dc
Arg [1] : _adminAddress (address): 0x61e468f685392948504da7a49463fd508ec1e2cd
Arg [2] : _executorAddress (address): 0x6ede1597c05a0ca77031cba43ab887ccf24cd7e8
Arg [3] : _treasuryAddress (address): 0x53dce346b09a521d7dd277872f136cf4b98ea326
Arg [4] : _wigoGalaxyAddress (address): 0xe63f6ab514167a7f28dd81d332a5e9f00819b9aa
Arg [5] : _intervalSeconds (uint256): 900
Arg [6] : _bufferSeconds (uint256): 60
Arg [7] : _minBetAmount (uint256): 1000000000000000
Arg [8] : _oracleUpdateAllowance (uint256): 300
Arg [9] : _treasuryFee (uint256): 400
Arg [10] : _referrerFee (uint256): 100

-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 000000000000000000000000f4766552d15ae4d256ad41b6cf2933482b0680dc
Arg [1] : 00000000000000000000000061e468f685392948504da7a49463fd508ec1e2cd
Arg [2] : 0000000000000000000000006ede1597c05a0ca77031cba43ab887ccf24cd7e8
Arg [3] : 00000000000000000000000053dce346b09a521d7dd277872f136cf4b98ea326
Arg [4] : 000000000000000000000000e63f6ab514167a7f28dd81d332a5e9f00819b9aa
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000384
Arg [6] : 000000000000000000000000000000000000000000000000000000000000003c
Arg [7] : 00000000000000000000000000000000000000000000000000038d7ea4c68000
Arg [8] : 000000000000000000000000000000000000000000000000000000000000012c
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000190
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000064


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.