ETH Price: $3,601.00 (-0.60%)

Contract

0x761716Ca41fC05fA3A58dC036A5C3Fdb95b58446

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ThalesRoyale

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

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

pragma solidity ^0.8.0;

// external
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";

// interfaces
import "../interfaces/IPriceFeed.sol";
import "../interfaces/IThalesRoyalePass.sol";
import "../interfaces/IThalesRoyalePassport.sol";
import "../interfaces/IPassportPosition.sol";

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

contract ThalesRoyale is Initializable, ProxyOwned, PausableUpgradeable, ProxyReentrancyGuard {
    /* ========== LIBRARIES ========== */

    using SafeERC20Upgradeable for IERC20Upgradeable;

    /* ========== CONSTANTS =========== */

    uint public constant DOWN = 1;
    uint public constant UP = 2;

    /* ========== STATE VARIABLES ========== */

    IERC20Upgradeable public rewardToken;
    bytes32 public oracleKey;
    IPriceFeed public priceFeed;

    address public safeBox;
    uint public safeBoxPercentage;

    uint public rounds;
    uint public signUpPeriod;
    uint public roundChoosingLength;
    uint public roundLength;

    bool public nextSeasonStartsAutomatically;
    uint public pauseBetweenSeasonsTime;

    uint public roundTargetPrice;
    uint public buyInAmount;

    /* ========== SEASON VARIABLES ========== */

    uint public season;

    mapping(uint => uint) public rewardPerSeason;
    mapping(uint => uint) public signedUpPlayersCount;
    mapping(uint => uint) public roundInASeason;
    mapping(uint => bool) public seasonStarted;
    mapping(uint => bool) public seasonFinished;
    mapping(uint => uint) public seasonCreationTime;
    mapping(uint => bool) public royaleInSeasonStarted;
    mapping(uint => uint) public royaleSeasonEndTime;
    mapping(uint => uint) public roundInSeasonEndTime;
    mapping(uint => uint) public roundInASeasonStartTime;
    mapping(uint => address[]) public playersPerSeason;
    mapping(uint => mapping(address => uint256)) public playerSignedUpPerSeason;
    mapping(uint => mapping(uint => uint)) public roundResultPerSeason;
    mapping(uint => mapping(uint => uint)) public targetPricePerRoundPerSeason;
    mapping(uint => mapping(uint => uint)) public finalPricePerRoundPerSeason;
    mapping(uint => mapping(uint256 => mapping(uint256 => uint256))) public positionsPerRoundPerSeason;
    mapping(uint => mapping(uint => uint)) public totalPlayersPerRoundPerSeason;
    mapping(uint => mapping(uint => uint)) public eliminatedPerRoundPerSeason;

    mapping(uint => mapping(address => mapping(uint256 => uint256))) public positionInARoundPerSeason;
    mapping(uint => mapping(address => bool)) public rewardCollectedPerSeason;
    mapping(uint => uint) public rewardPerWinnerPerSeason;
    mapping(uint => uint) public unclaimedRewardPerSeason;

    IThalesRoyalePass public royalePass;
    mapping(uint => bytes32) public oracleKeyPerSeason;

    IThalesRoyalePassport public thalesRoyalePassport;

    mapping(uint => uint) public mintedTokensCount;
    mapping(uint => uint[]) public tokensPerSeason;
    mapping(uint => uint) public tokenSeason;
    mapping(uint => mapping(uint => uint256)) public tokensMintedPerSeason;
    mapping(uint => mapping(uint => uint)) public totalTokensPerRoundPerSeason;
    mapping(uint => mapping(uint256 => uint256)) public tokenPositionInARoundPerSeason;
    mapping(uint => IPassportPosition.Position[]) public tokenPositions;
    mapping(uint => bool) public tokenRewardCollectedPerSeason;

    /* ========== CONSTRUCTOR ========== */

    function initialize(
        address _owner,
        bytes32 _oracleKey,
        IPriceFeed _priceFeed,
        address _rewardToken,
        uint _rounds,
        uint _signUpPeriod,
        uint _roundChoosingLength,
        uint _roundLength,
        uint _buyInAmount,
        uint _pauseBetweenSeasonsTime,
        bool _nextSeasonStartsAutomatically
    ) external initializer {
        setOwner(_owner);
        initNonReentrant();
        oracleKey = _oracleKey;
        priceFeed = _priceFeed;
        rewardToken = IERC20Upgradeable(_rewardToken);
        rounds = _rounds;
        signUpPeriod = _signUpPeriod;
        roundChoosingLength = _roundChoosingLength;
        roundLength = _roundLength;
        buyInAmount = _buyInAmount;
        pauseBetweenSeasonsTime = _pauseBetweenSeasonsTime;
        nextSeasonStartsAutomatically = _nextSeasonStartsAutomatically;
    }

    /* ========== GAME ========== */

    function signUp() external playerCanSignUp {
        uint[] memory positions = new uint[](rounds);
        for (uint i = 0; i < positions.length; i++) {
            positions[i] = 0;
        }
        _signUpPlayer(msg.sender, positions, 0);
    }

    function signUpWithPosition(uint[] memory _positions) external playerCanSignUp {
        require(_positions.length == rounds, "Number of positions exceeds number of rounds");
        for (uint i = 0; i < _positions.length; i++) {
            require(_positions[i] == DOWN || _positions[i] == UP, "Position can only be 1 or 2");
        }
        _signUpPlayer(msg.sender, _positions, 0);
    }

    function signUpWithPass(uint passId) external playerCanSignUpWithPass(passId) {
        uint[] memory positions = new uint[](rounds);
        for (uint i = 0; i < positions.length; i++) {
            positions[i] = 0;
        }
        _signUpPlayer(msg.sender, positions, passId);
    }

    function signUpWithPassWithPosition(uint passId, uint[] memory _positions) external playerCanSignUpWithPass(passId) {
        require(_positions.length == rounds, "Number of positions exceeds number of rounds");
        for (uint i = 0; i < _positions.length; i++) {
            require(_positions[i] == DOWN || _positions[i] == UP, "Position can only be 1 or 2");
        }
        _signUpPlayer(msg.sender, _positions, passId);
    }

    function signUpOnBehalf(address player) external playerCanSignUp {
        // don't set positions to winners
        uint[] memory positions = new uint[](rounds);
        for (uint i = 0; i < positions.length; i++) {
            positions[i] = 0;
        }

        // pass id is 0 so it will be sUSD buyin
        _signUpPlayerOnBehalf(msg.sender, player, positions);
    }

    function startRoyaleInASeason() external {
        require(block.timestamp > (seasonCreationTime[season] + signUpPeriod), "Can't start until signup period expires");
        require(mintedTokensCount[season] > 0, "Can not start, no tokens in a season");
        require(!royaleInSeasonStarted[season], "Already started");
        require(seasonStarted[season], "Season not started yet");

        roundTargetPrice = priceFeed.rateForCurrency(oracleKeyPerSeason[season]);
        roundInASeason[season] = 1;
        targetPricePerRoundPerSeason[season][roundInASeason[season]] = roundTargetPrice;
        royaleInSeasonStarted[season] = true;
        roundInASeasonStartTime[season] = block.timestamp;
        roundInSeasonEndTime[season] = roundInASeasonStartTime[season] + roundLength;
        totalTokensPerRoundPerSeason[season][roundInASeason[season]] = mintedTokensCount[season];

        unclaimedRewardPerSeason[season] = rewardPerSeason[season];

        emit RoyaleStarted(season, mintedTokensCount[season], rewardPerSeason[season]);
    }

    function takeAPosition(uint tokenId, uint position) external {
        require(position == DOWN || position == UP, "Position can only be 1 or 2");
        require(msg.sender == thalesRoyalePassport.ownerOf(tokenId), "Not an owner");
        require(season == tokenSeason[tokenId], "Wrong season");
        require(royaleInSeasonStarted[season], "Competition not started yet");
        require(!seasonFinished[season], "Competition finished");

        require(tokenPositionInARoundPerSeason[tokenId][roundInASeason[season]] != position, "Same position");

        if (roundInASeason[season] != 1) {
            require(isTokenAlive(tokenId), "Token no longer valid");
        }

        require(block.timestamp < roundInASeasonStartTime[season] + roundChoosingLength, "Round positioning finished");

        // this block is when sender change positions in a round - first reduce
        if (tokenPositionInARoundPerSeason[tokenId][roundInASeason[season]] == DOWN) {
            positionsPerRoundPerSeason[season][roundInASeason[season]][DOWN]--;
        } else if (tokenPositionInARoundPerSeason[tokenId][roundInASeason[season]] == UP) {
            positionsPerRoundPerSeason[season][roundInASeason[season]][UP]--;
        }

        _putPosition(msg.sender, season, roundInASeason[season], position, tokenId);
    }

    function closeRound() external {
        require(royaleInSeasonStarted[season], "Competition not started yet");
        require(!seasonFinished[season], "Competition finished");
        require(block.timestamp > (roundInASeasonStartTime[season] + roundLength), "Can't close round yet");

        uint currentSeasonRound = roundInASeason[season];
        uint nextRound = currentSeasonRound + 1;

        // getting price
        uint currentPriceFromOracle = priceFeed.rateForCurrency(oracleKeyPerSeason[season]);

        require(currentPriceFromOracle > 0, "Oracle Price must be larger than 0");

        uint stikePrice = roundTargetPrice;

        finalPricePerRoundPerSeason[season][currentSeasonRound] = currentPriceFromOracle;
        roundResultPerSeason[season][currentSeasonRound] = currentPriceFromOracle >= stikePrice ? UP : DOWN;
        uint losingResult = currentPriceFromOracle >= stikePrice ? DOWN : UP;
        roundTargetPrice = currentPriceFromOracle;

        uint winningPositionsPerRound = roundResultPerSeason[season][currentSeasonRound] == UP
            ? positionsPerRoundPerSeason[season][currentSeasonRound][UP]
            : positionsPerRoundPerSeason[season][currentSeasonRound][DOWN];

        if (nextRound <= rounds) {
            // setting total players for next round (round + 1) to be result of position in a previous round
            totalTokensPerRoundPerSeason[season][nextRound] = winningPositionsPerRound;
        }

        // setting eliminated players to be total players - number of winning players
        eliminatedPerRoundPerSeason[season][currentSeasonRound] =
            totalTokensPerRoundPerSeason[season][currentSeasonRound] -
            winningPositionsPerRound;

        _cleanPositions(losingResult, nextRound);

        // if no one is left no need to set values
        if (winningPositionsPerRound > 0) {
            roundInASeason[season] = nextRound;
            targetPricePerRoundPerSeason[season][nextRound] = roundTargetPrice;
        }

        if (nextRound > rounds || winningPositionsPerRound <= 1) {
            seasonFinished[season] = true;

            uint numberOfWinners = 0;

            // in no one is winner pick from lest round
            if (winningPositionsPerRound == 0) {
                numberOfWinners = totalTokensPerRoundPerSeason[season][currentSeasonRound];
                _populateReward(numberOfWinners);
            } else {
                // there is min 1 winner
                numberOfWinners = winningPositionsPerRound;
                _populateReward(numberOfWinners);
            }

            royaleSeasonEndTime[season] = block.timestamp;
            // first close previous round then royale
            emit RoundClosed(
                season,
                currentSeasonRound,
                roundResultPerSeason[season][currentSeasonRound],
                stikePrice,
                finalPricePerRoundPerSeason[season][currentSeasonRound],
                eliminatedPerRoundPerSeason[season][currentSeasonRound],
                numberOfWinners
            );
            emit RoyaleFinished(season, numberOfWinners, rewardPerWinnerPerSeason[season]);
        } else {
            roundInASeasonStartTime[season] = block.timestamp;
            roundInSeasonEndTime[season] = roundInASeasonStartTime[season] + roundLength;
            emit RoundClosed(
                season,
                currentSeasonRound,
                roundResultPerSeason[season][currentSeasonRound],
                stikePrice,
                finalPricePerRoundPerSeason[season][currentSeasonRound],
                eliminatedPerRoundPerSeason[season][currentSeasonRound],
                winningPositionsPerRound
            );
        }
    }

    function startNewSeason() external seasonCanStart {
        season = season + 1;
        seasonCreationTime[season] = block.timestamp;
        seasonStarted[season] = true;
        oracleKeyPerSeason[season] = oracleKey;

        emit NewSeasonStarted(season);
    }

    function claimRewardForSeason(uint _season, uint tokenId) external onlyWinners(_season, tokenId) {
        _claimRewardForSeason(msg.sender, _season, tokenId);
    }

    /* ========== VIEW ========== */

    function canCloseRound() public view returns (bool) {
        return
            royaleInSeasonStarted[season] &&
            !seasonFinished[season] &&
            block.timestamp > (roundInASeasonStartTime[season] + roundLength);
    }

    function canStartRoyale() public view returns (bool) {
        return
            seasonStarted[season] &&
            !royaleInSeasonStarted[season] &&
            block.timestamp > (seasonCreationTime[season] + signUpPeriod);
    }

    function canSeasonBeAutomaticallyStartedAfterSomePeriod() public view returns (bool) {
        return nextSeasonStartsAutomatically && (block.timestamp > seasonCreationTime[season] + pauseBetweenSeasonsTime);
    }

    function canStartNewSeason() public view returns (bool) {
        return canSeasonBeAutomaticallyStartedAfterSomePeriod() && (seasonFinished[season] || season == 0);
    }

    function hasParticipatedInCurrentOrLastRoyale(address _player) external view returns (bool) {
        if (season > 1) {
            return playerSignedUpPerSeason[season][_player] > 0 || playerSignedUpPerSeason[season - 1][_player] > 0;
        } else {
            return playerSignedUpPerSeason[season][_player] > 0;
        }
    }

    function isTokenAliveInASpecificSeason(uint tokenId, uint _season) public view returns (bool) {
        if (_season != tokenSeason[tokenId]) {
            return false;
        }
        if (roundInASeason[_season] > 1) {
            return (tokenPositionInARoundPerSeason[tokenId][roundInASeason[_season] - 1] ==
                roundResultPerSeason[_season][roundInASeason[_season] - 1]);
        } else {
            return tokensMintedPerSeason[_season][tokenId] != 0;
        }
    }

    function isTokenAlive(uint tokenId) public view returns (bool) {
        if (season != tokenSeason[tokenId]) {
            return false;
        }
        if (roundInASeason[season] > 1) {
            return (tokenPositionInARoundPerSeason[tokenId][roundInASeason[season] - 1] ==
                roundResultPerSeason[season][roundInASeason[season] - 1]);
        } else {
            return tokensMintedPerSeason[season][tokenId] != 0;
        }
    }

    function getTokensForSeason(uint _season) public view returns (uint[] memory) {
        return tokensPerSeason[_season];
    }

    function getTokenPositions(uint tokenId) public view returns (IPassportPosition.Position[] memory) {
        return tokenPositions[tokenId];
    }

    // deprecated from passport impl
    function getPlayersForSeason(uint _season) public view returns (address[] memory) {
        return playersPerSeason[_season];
    }

    function getBuyInAmount() public view returns (uint) {
        return buyInAmount;
    }

    /* ========== INTERNALS ========== */

    function _signUpPlayer(
        address _player,
        uint[] memory _positions,
        uint _passId
    ) internal {
        uint tokenId = thalesRoyalePassport.safeMint(_player);
        tokenSeason[tokenId] = season;

        tokensMintedPerSeason[season][tokenId] = block.timestamp;
        tokensPerSeason[season].push(tokenId);
        mintedTokensCount[season]++;

        playerSignedUpPerSeason[season][_player] = block.timestamp;

        for (uint i = 0; i < _positions.length; i++) {
            if (_positions[i] != 0) {
                _putPosition(_player, season, i + 1, _positions[i], tokenId);
            }
        }
        if (_passId != 0) {
            _buyInWithPass(_player, _passId);
        } else {
            _buyIn(_player, buyInAmount);
        }

        emit SignedUpPassport(_player, tokenId, season, _positions);
    }

    function _signUpPlayerOnBehalf(
        address _sender,
        address _player,
        uint[] memory _positions
    ) internal {
        uint tokenId = thalesRoyalePassport.safeMint(_player);
        tokenSeason[tokenId] = season;

        tokensMintedPerSeason[season][tokenId] = block.timestamp;
        tokensPerSeason[season].push(tokenId);
        mintedTokensCount[season]++;

        playerSignedUpPerSeason[season][_player] = block.timestamp;

        // sender buy-in
        _buyIn(_sender, buyInAmount);

        emit SignedUpPassport(_player, tokenId, season, _positions);
    }

    function _putPosition(
        address _player,
        uint _season,
        uint _round,
        uint _position,
        uint _tokenId
    ) internal {
        // set value
        positionInARoundPerSeason[_season][_player][_round] = _position;
        // set token value
        tokenPositionInARoundPerSeason[_tokenId][_round] = _position;

        if (tokenPositions[_tokenId].length >= _round) {
            tokenPositions[_tokenId][_round - 1] = IPassportPosition.Position(_round, _position);
        } else {
            tokenPositions[_tokenId].push(IPassportPosition.Position(_round, _position));
        }

        // add number of positions
        if (_position == UP) {
            positionsPerRoundPerSeason[_season][_round][_position]++;
        } else {
            positionsPerRoundPerSeason[_season][_round][_position]++;
        }

        emit TookAPositionPassport(_player, _tokenId, _season, _round, _position);
    }

    function _populateReward(uint numberOfWinners) internal {
        require(seasonFinished[season], "Royale must be finished");
        require(numberOfWinners > 0, "There is no alive players left in Royale");

        rewardPerWinnerPerSeason[season] = rewardPerSeason[season] / numberOfWinners;
    }

    function _buyIn(address _sender, uint _amount) internal {
        (uint amountBuyIn, uint amountSafeBox) = _calculateSafeBoxOnAmount(_amount);

        if (amountSafeBox > 0) {
            rewardToken.safeTransferFrom(_sender, safeBox, amountSafeBox);
        }

        rewardToken.safeTransferFrom(_sender, address(this), amountBuyIn);
        rewardPerSeason[season] += amountBuyIn;
    }

    function _buyInWithPass(address _player, uint _passId) internal {
        // burning pass
        royalePass.burnWithTransfer(_player, _passId);

        // increase reward
        rewardPerSeason[season] += buyInAmount;
    }

    function _calculateSafeBoxOnAmount(uint _amount) internal view returns (uint, uint) {
        uint amountSafeBox = 0;

        if (safeBoxPercentage > 0) {
            amountSafeBox = (_amount * safeBoxPercentage) / 100;
        }

        uint amountBuyIn = _amount - amountSafeBox;

        return (amountBuyIn, amountSafeBox);
    }

    function _claimRewardForSeason(
        address _winner,
        uint _season,
        uint _tokenId
    ) internal {
        require(rewardPerSeason[_season] > 0, "Reward must be set");
        require(!tokenRewardCollectedPerSeason[_tokenId], "Reward already collected");
        require(rewardToken.balanceOf(address(this)) >= rewardPerWinnerPerSeason[_season], "Not enough balance for rewards");

        // set collected -> true
        tokenRewardCollectedPerSeason[_tokenId] = true;

        unclaimedRewardPerSeason[_season] = unclaimedRewardPerSeason[_season] - rewardPerWinnerPerSeason[_season];

        // transfering rewardPerToken
        rewardToken.safeTransfer(_winner, rewardPerWinnerPerSeason[_season]);

        // emit event
        emit RewardClaimedPassport(_season, _winner, _tokenId, rewardPerWinnerPerSeason[_season]);
    }

    function _putFunds(
        address _from,
        uint _amount,
        uint _season
    ) internal {
        rewardPerSeason[_season] = rewardPerSeason[_season] + _amount;
        unclaimedRewardPerSeason[_season] = unclaimedRewardPerSeason[_season] + _amount;
        rewardToken.safeTransferFrom(_from, address(this), _amount);
        emit PutFunds(_from, _season, _amount);
    }

    function _cleanPositions(uint _losingPosition, uint _nextRound) internal {
        uint[] memory tokens = tokensPerSeason[season];

        for (uint i = 0; i < tokens.length; i++) {
            if (
                tokenPositionInARoundPerSeason[tokens[i]][_nextRound - 1] == _losingPosition ||
                tokenPositionInARoundPerSeason[tokens[i]][_nextRound - 1] == 0
            ) {
                // decrease position count
                if (tokenPositionInARoundPerSeason[tokens[i]][_nextRound] == DOWN) {
                    positionsPerRoundPerSeason[season][_nextRound][DOWN]--;
                } else if (tokenPositionInARoundPerSeason[tokens[i]][_nextRound] == UP) {
                    positionsPerRoundPerSeason[season][_nextRound][UP]--;
                }
                // setting 0 position
                tokenPositionInARoundPerSeason[tokens[i]][_nextRound] = 0;
            }
        }
    }

    /* ========== CONTRACT MANAGEMENT ========== */

    function putFunds(uint _amount, uint _season) external {
        require(_amount > 0, "Amount must be more then zero");
        require(_season >= season, "Cant put funds in a past");
        require(!seasonFinished[_season], "Season is finished");
        require(rewardToken.allowance(msg.sender, address(this)) >= _amount, "No allowance.");
        require(rewardToken.balanceOf(msg.sender) >= _amount, "No enough sUSD for buy in");

        _putFunds(msg.sender, _amount, _season);
    }

    function setNextSeasonStartsAutomatically(bool _nextSeasonStartsAutomatically) external onlyOwner {
        nextSeasonStartsAutomatically = _nextSeasonStartsAutomatically;
        emit NewNextSeasonStartsAutomatically(_nextSeasonStartsAutomatically);
    }

    function setPauseBetweenSeasonsTime(uint _pauseBetweenSeasonsTime) external onlyOwner {
        pauseBetweenSeasonsTime = _pauseBetweenSeasonsTime;
        emit NewPauseBetweenSeasonsTime(_pauseBetweenSeasonsTime);
    }

    function setSignUpPeriod(uint _signUpPeriod) external onlyOwner {
        signUpPeriod = _signUpPeriod;
        emit NewSignUpPeriod(_signUpPeriod);
    }

    function setRoundChoosingLength(uint _roundChoosingLength) external onlyOwner {
        roundChoosingLength = _roundChoosingLength;
        emit NewRoundChoosingLength(_roundChoosingLength);
    }

    function setRoundLength(uint _roundLength) external onlyOwner {
        roundLength = _roundLength;
        emit NewRoundLength(_roundLength);
    }

    function setPriceFeed(IPriceFeed _priceFeed) external onlyOwner {
        priceFeed = _priceFeed;
        emit NewPriceFeed(_priceFeed);
    }

    function setThalesRoyalePassport(IThalesRoyalePassport _thalesRoyalePassport) external onlyOwner {
        require(address(_thalesRoyalePassport) != address(0), "Invalid address");
        thalesRoyalePassport = _thalesRoyalePassport;
        emit NewThalesRoyalePassport(_thalesRoyalePassport);
    }

    function setBuyInAmount(uint _buyInAmount) external onlyOwner {
        buyInAmount = _buyInAmount;
        emit NewBuyInAmount(_buyInAmount);
    }

    function setSafeBoxPercentage(uint _safeBoxPercentage) external onlyOwner {
        require(_safeBoxPercentage <= 100, "Must be in between 0 and 100 %");
        safeBoxPercentage = _safeBoxPercentage;
        emit NewSafeBoxPercentage(_safeBoxPercentage);
    }

    function setSafeBox(address _safeBox) external onlyOwner {
        require(_safeBox != address(0), "Invalid address");
        safeBox = _safeBox;
        emit NewSafeBox(_safeBox);
    }

    function setRoyalePassAddress(address _royalePass) external onlyOwner {
        require(address(_royalePass) != address(0), "Invalid address");
        royalePass = IThalesRoyalePass(_royalePass);
        emit NewThalesRoyalePass(_royalePass);
    }

    function setOracleKey(bytes32 _oracleKey) external onlyOwner {
        oracleKey = _oracleKey;
        emit NewOracleKey(_oracleKey);
    }

    function setRewardToken(address _rewardToken) external onlyOwner {
        require(address(_rewardToken) != address(0), "Invalid address");
        rewardToken = IERC20Upgradeable(_rewardToken);
        emit NewRewardToken(_rewardToken);
    }

    function setNumberOfRounds(uint _rounds) external onlyOwner {
        rounds = _rounds;
        emit NewNumberOfRounds(_rounds);
    }

    function getAllFundsFromRoyalePass(
        address[] memory _players,
        uint[] memory _passIds,
        address _retreiverAddress
    ) external onlyOwner {
        for (uint i = 0; i < _players.length; i++) {
            royalePass.burnWithTransfer(_players[i], _passIds[i]);
        }
        rewardToken.safeTransfer(_retreiverAddress, rewardToken.balanceOf(address(this)));
    }

    /* ========== MODIFIERS ========== */

    modifier playerCanSignUp() {
        require(season > 0, "Initialize first season");
        require(block.timestamp < (seasonCreationTime[season] + signUpPeriod), "Sign up period has expired");
        require(rewardToken.balanceOf(msg.sender) >= buyInAmount, "No enough sUSD for buy in");
        require(rewardToken.allowance(msg.sender, address(this)) >= buyInAmount, "No allowance.");
        require(address(thalesRoyalePassport) != address(0), "ThalesRoyale Passport not set");
        _;
    }

    modifier playerCanSignUpWithPass(uint passId) {
        require(season > 0, "Initialize first season");
        require(block.timestamp < (seasonCreationTime[season] + signUpPeriod), "Sign up period has expired");
        require(royalePass.ownerOf(passId) == msg.sender, "Owner of the token not valid");
        require(rewardToken.balanceOf(address(royalePass)) >= buyInAmount, "No enough sUSD on royale pass contract");
        require(address(thalesRoyalePassport) != address(0), "ThalesRoyale Passport not set");
        _;
    }

    modifier seasonCanStart() {
        require(
            msg.sender == owner || canSeasonBeAutomaticallyStartedAfterSomePeriod(),
            "Only owner can start season before pause between two seasons"
        );
        require(seasonFinished[season] || season == 0, "Previous season must be finished");
        _;
    }

    modifier onlyWinners(uint _season, uint tokenId) {
        require(seasonFinished[_season], "Royale must be finished!");
        require(thalesRoyalePassport.ownerOf(tokenId) == msg.sender, "Not an owner");
        require(isTokenAliveInASpecificSeason(tokenId, _season), "Token is not alive");
        _;
    }

    /* ========== EVENTS ========== */

    event SignedUpPassport(address user, uint tokenId, uint season, uint[] positions);
    event SignedUp(address user, uint season, uint position); //deprecated from passport impl.
    event RoundClosed(
        uint season,
        uint round,
        uint result,
        uint strikePrice,
        uint finalPrice,
        uint numberOfEliminatedPlayers,
        uint numberOfWinningPlayers
    );
    event TookAPosition(address user, uint season, uint round, uint position); //deprecated from passport impl.
    event TookAPositionPassport(address user, uint tokenId, uint season, uint round, uint position);
    event RoyaleStarted(uint season, uint totalTokens, uint totalReward);
    event RoyaleFinished(uint season, uint numberOfWinners, uint rewardPerWinner);
    event RewardClaimedPassport(uint season, address winner, uint tokenId, uint reward);
    event RewardClaimed(uint season, address winner, uint reward); //deprecated from passport impl.
    event NewSeasonStarted(uint season);
    event NewBuyInAmount(uint buyInAmount);
    event NewPriceFeed(IPriceFeed priceFeed);
    event NewThalesRoyalePassport(IThalesRoyalePassport _thalesRoyalePassport);
    event NewRoundLength(uint roundLength);
    event NewRoundChoosingLength(uint roundChoosingLength);
    event NewPauseBetweenSeasonsTime(uint pauseBetweenSeasonsTime);
    event NewSignUpPeriod(uint signUpPeriod);
    event NewNextSeasonStartsAutomatically(bool nextSeasonStartsAutomatically);
    event PutFunds(address from, uint season, uint amount);
    event NewSafeBoxPercentage(uint _safeBoxPercentage);
    event NewSafeBox(address _safeBox);
    event NewThalesRoyalePass(address _royalePass);
    event NewOracleKey(bytes32 _oracleKey);
    event NewRewardToken(address _rewardToken);
    event NewNumberOfRounds(uint _rounds);
}

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

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";
import "../../../utils/AddressUpgradeable.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 SafeERC20Upgradeable {
    using AddressUpgradeable for address;

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

    function safeTransferFrom(
        IERC20Upgradeable 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(
        IERC20Upgradeable 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(
        IERC20Upgradeable 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(
        IERC20Upgradeable 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(IERC20Upgradeable 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 3 of 16 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Context_init_unchained();
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _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);
    }
    uint256[49] private __gap;
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

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

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

File 5 of 16 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Upgradeable {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
        address recipient,
        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 16 : PausableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

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

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

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

    bool private _paused;

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

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

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

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

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

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

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

File 7 of 16 : IPriceFeed.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.16;

interface IPriceFeed {
    // Structs
    struct RateAndUpdatedTime {
        uint216 rate;
        uint40 time;
    }

    // Mutative functions
    function addAggregator(bytes32 currencyKey, address aggregatorAddress) external;

    function removeAggregator(bytes32 currencyKey) external;

    // Views

    function rateForCurrency(bytes32 currencyKey) external view returns (uint);

    function rateAndUpdatedTime(bytes32 currencyKey) external view returns (uint rate, uint time);

    function getRates() external view returns (uint[] memory);

    function getCurrencies() external view returns (bytes32[] memory);
}

File 8 of 16 : IThalesRoyalePass.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol";

interface IThalesRoyalePass is IERC721Upgradeable {
    function burn(uint256 tokenId) external;

    function burnWithTransfer(address player, uint256 tokenId) external;

    function pricePaidForVoucher(uint tokenId) external view returns (uint);
}

File 9 of 16 : IThalesRoyalePassport.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IThalesRoyalePassport {
    function ownerOf(uint256 tokenId) external view returns (address);

    function safeMint(address recipient) external returns (uint tokenId);

    function burn(uint tokenId) external;

    function tokenURI(uint256 tokenId) external view returns (string memory);

    function setPause(bool _state) external;

    function setThalesRoyale(address _thalesRoyaleAddress) external;
}

File 10 of 16 : IPassportPosition.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.16;

interface IPassportPosition {
    struct Position {
        uint round;
        uint position;
    }
}

File 11 of 16 : ProxyReentrancyGuard.sol
// SPDX-License-Identifier: MIT

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 aplied 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.
 */
contract ProxyReentrancyGuard {
    /// @dev counter to allow mutex lock with only one SSTORE operation
    uint256 private _guardCounter;
    bool private _initialized;

    function initNonReentrant() public {
        require(!_initialized, "Already initialized");
        _initialized = true;
        _guardCounter = 1;
    }

    /**
     * @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 make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _guardCounter += 1;
        uint256 localCounter = _guardCounter;
        _;
        require(localCounter == _guardCounter, "ReentrancyGuard: reentrant call");
    }
}

File 12 of 16 : ProxyOwned.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

    modifier onlyOwner {
        _onlyOwner();
        _;
    }

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 15 of 16 : IERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165Upgradeable.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721Upgradeable is IERC165Upgradeable {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

File 16 of 16 : IERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165Upgradeable {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"buyInAmount","type":"uint256"}],"name":"NewBuyInAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"nextSeasonStartsAutomatically","type":"bool"}],"name":"NewNextSeasonStartsAutomatically","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_rounds","type":"uint256"}],"name":"NewNumberOfRounds","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"_oracleKey","type":"bytes32"}],"name":"NewOracleKey","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"pauseBetweenSeasonsTime","type":"uint256"}],"name":"NewPauseBetweenSeasonsTime","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IPriceFeed","name":"priceFeed","type":"address"}],"name":"NewPriceFeed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_rewardToken","type":"address"}],"name":"NewRewardToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"roundChoosingLength","type":"uint256"}],"name":"NewRoundChoosingLength","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"roundLength","type":"uint256"}],"name":"NewRoundLength","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_safeBox","type":"address"}],"name":"NewSafeBox","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_safeBoxPercentage","type":"uint256"}],"name":"NewSafeBoxPercentage","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"}],"name":"NewSeasonStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"signUpPeriod","type":"uint256"}],"name":"NewSignUpPeriod","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_royalePass","type":"address"}],"name":"NewThalesRoyalePass","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IThalesRoyalePassport","name":"_thalesRoyalePassport","type":"address"}],"name":"NewThalesRoyalePassport","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PutFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"},{"indexed":false,"internalType":"address","name":"winner","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"},{"indexed":false,"internalType":"address","name":"winner","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardClaimedPassport","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"round","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"result","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"strikePrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"finalPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"numberOfEliminatedPlayers","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"numberOfWinningPlayers","type":"uint256"}],"name":"RoundClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"numberOfWinners","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardPerWinner","type":"uint256"}],"name":"RoyaleFinished","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalTokens","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalReward","type":"uint256"}],"name":"RoyaleStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"position","type":"uint256"}],"name":"SignedUp","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"positions","type":"uint256[]"}],"name":"SignedUpPassport","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"round","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"position","type":"uint256"}],"name":"TookAPosition","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"round","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"position","type":"uint256"}],"name":"TookAPositionPassport","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DOWN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"buyInAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canCloseRound","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canSeasonBeAutomaticallyStartedAfterSomePeriod","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canStartNewSeason","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canStartRoyale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"claimRewardForSeason","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"closeRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"eliminatedPerRoundPerSeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"finalPricePerRoundPerSeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_players","type":"address[]"},{"internalType":"uint256[]","name":"_passIds","type":"uint256[]"},{"internalType":"address","name":"_retreiverAddress","type":"address"}],"name":"getAllFundsFromRoyalePass","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getBuyInAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"}],"name":"getPlayersForSeason","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenPositions","outputs":[{"components":[{"internalType":"uint256","name":"round","type":"uint256"},{"internalType":"uint256","name":"position","type":"uint256"}],"internalType":"struct IPassportPosition.Position[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"}],"name":"getTokensForSeason","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_player","type":"address"}],"name":"hasParticipatedInCurrentOrLastRoyale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initNonReentrant","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"bytes32","name":"_oracleKey","type":"bytes32"},{"internalType":"contract IPriceFeed","name":"_priceFeed","type":"address"},{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"uint256","name":"_rounds","type":"uint256"},{"internalType":"uint256","name":"_signUpPeriod","type":"uint256"},{"internalType":"uint256","name":"_roundChoosingLength","type":"uint256"},{"internalType":"uint256","name":"_roundLength","type":"uint256"},{"internalType":"uint256","name":"_buyInAmount","type":"uint256"},{"internalType":"uint256","name":"_pauseBetweenSeasonsTime","type":"uint256"},{"internalType":"bool","name":"_nextSeasonStartsAutomatically","type":"bool"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isTokenAlive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"_season","type":"uint256"}],"name":"isTokenAliveInASpecificSeason","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"mintedTokensCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextSeasonStartsAutomatically","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracleKey","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"oracleKeyPerSeason","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseBetweenSeasonsTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"playerSignedUpPerSeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"playersPerSeason","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"positionInARoundPerSeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"positionsPerRoundPerSeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceFeed","outputs":[{"internalType":"contract IPriceFeed","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_season","type":"uint256"}],"name":"putFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"rewardCollectedPerSeason","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardPerSeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardPerWinnerPerSeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"roundChoosingLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"roundInASeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"roundInASeasonStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"roundInSeasonEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"roundLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"roundResultPerSeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"roundTargetPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rounds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"royaleInSeasonStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royalePass","outputs":[{"internalType":"contract IThalesRoyalePass","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"royaleSeasonEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"safeBox","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"safeBoxPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"season","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"seasonCreationTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"seasonFinished","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"seasonStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_buyInAmount","type":"uint256"}],"name":"setBuyInAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_nextSeasonStartsAutomatically","type":"bool"}],"name":"setNextSeasonStartsAutomatically","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rounds","type":"uint256"}],"name":"setNumberOfRounds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_oracleKey","type":"bytes32"}],"name":"setOracleKey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pauseBetweenSeasonsTime","type":"uint256"}],"name":"setPauseBetweenSeasonsTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPriceFeed","name":"_priceFeed","type":"address"}],"name":"setPriceFeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"}],"name":"setRewardToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundChoosingLength","type":"uint256"}],"name":"setRoundChoosingLength","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundLength","type":"uint256"}],"name":"setRoundLength","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royalePass","type":"address"}],"name":"setRoyalePassAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_safeBox","type":"address"}],"name":"setSafeBox","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_safeBoxPercentage","type":"uint256"}],"name":"setSafeBoxPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_signUpPeriod","type":"uint256"}],"name":"setSignUpPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IThalesRoyalePassport","name":"_thalesRoyalePassport","type":"address"}],"name":"setThalesRoyalePassport","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signUp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"player","type":"address"}],"name":"signUpOnBehalf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signUpPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"passId","type":"uint256"}],"name":"signUpWithPass","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"passId","type":"uint256"},{"internalType":"uint256[]","name":"_positions","type":"uint256[]"}],"name":"signUpWithPassWithPosition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_positions","type":"uint256[]"}],"name":"signUpWithPosition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"signedUpPlayersCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startNewSeason","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startRoyaleInASeason","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"position","type":"uint256"}],"name":"takeAPosition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"targetPricePerRoundPerSeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"thalesRoyalePassport","outputs":[{"internalType":"contract IThalesRoyalePassport","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenPositionInARoundPerSeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenPositions","outputs":[{"internalType":"uint256","name":"round","type":"uint256"},{"internalType":"uint256","name":"position","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenRewardCollectedPerSeason","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenSeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokensMintedPerSeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokensPerSeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalPlayersPerRoundPerSeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalTokensPerRoundPerSeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"proxyAddress","type":"address"}],"name":"transferOwnershipAtInit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"unclaimedRewardPerSeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5061581c80620000216000396000f3fe608060405234801561001057600080fd5b50600436106105245760003560e01c80637af55eb7116102af578063babd48b811610172578063d9e692d9116100d9578063ea78fec111610092578063ea78fec114610d3e578063ebc7977214610d69578063f7c618c114610d71578063f839bb4c14610d89578063fb33cf5d14610d9c578063fefc7ae014610dbc57600080fd5b8063d9e692d914610c8d578063dc66cac314610cad578063df6cbb7814610cd8578063e0c964ed14610ceb578063e179811314610d0b578063e278fe6f14610d3657600080fd5b8063cbe8ad821161012b578063cbe8ad8214610c00578063ce4b7eeb14610c13578063cf5941de14610c26578063d165dac214610c51578063d4e562ac14610c5a578063d55476d714610c6d57600080fd5b8063babd48b814610b88578063bc39cb9a14610bb6578063bf96ae6314610bc9578063c3b83f5f14610bd1578063c402055f14610be4578063c50b0fb014610bf757600080fd5b80639e1698a911610216578063a99c6ad1116101cf578063a99c6ad114610af6578063ad6b2a8b14610b09578063b6ceb61f14610b3a578063b7479acf14610b42578063b929c12614610b6d578063b94964c414610b8057600080fd5b80639e1698a914610a8f578063a105571b14610aaf578063a131bdfe14610acf578063a2e800ad14610ad8578063a56d0ba114610ae1578063a7bc2e6614610ae957600080fd5b80638b649b94116102685780638b649b9414610a285780638da5cb5b14610a315780639118272614610a4a57806398e303f314610a535780639d1f048e14610a735780639d902a5514610a7c57600080fd5b80637af55eb7146109a95780637ce47b5c146109b15780637d115a2b146109dc5780638193fd08146109ef57806386e327f114610a025780638aee812714610a1557600080fd5b80633d8fb20f116103f7578063635ebf7e1161035e5780636ed252f8116103175780636ed252f81461093c5780637184869114610945578063724e78da146109585780637250272f1461096b578063741bef1a1461098e57806379ba5097146109a157600080fd5b8063635ebf7e146108ca57806363bcbcb5146108dd57806366a93433146108f0578063681312f514610903578063692c7479146109165780636e1ed59a1461092957600080fd5b806353a47bb7116103b057806353a47bb71461086557806358e27027146108785780635bc90b52146108815780635c975abb146108945780636169807d1461089f57806362536e32146108a757600080fd5b80633d8fb20f146107b857806342629f9b146107cb57806342852535146107d35780634864c959146107f657806348663e95146108275780634d3e41191461083a57600080fd5b80631a06db681161049b5780632d830cd5116104545780632d830cd5146107135780632df66134146107265780632e5cb9931461075157806331390e0a1461076457806336a445fb146107845780633c9a25e4146107af57600080fd5b80631a06db68146106605780631ccd03ac146106805780631e05194f146106a057806324f4ec51146106cb5780632624e0e8146106d3578063272cc28f146106f357600080fd5b80630bc77f10116104ed5780630bc77f10146105bf5780630d6ff9c6146105df578063125b4d59146105f257806313af4035146106125780631627540c1461062557806318f531c41461063857600080fd5b8062c8d23a1461052957806301df19951461053e578063037cacd51461055957806307b16e011461058c5780630920eac7146105ac575b600080fd5b61053c6105373660046151eb565b610dc4565b005b610546600181565b6040519081526020015b60405180910390f35b61057c6105673660046151eb565b60786020526000908152604090205460ff1681565b6040519015158152602001610550565b61054661059a3660046151eb565b607d6020526000908152604090205481565b61053c6105ba3660046151eb565b610e08565b6105d26105cd3660046151eb565b610e9b565b60405161055091906153ec565b61053c6105ed366004615178565b610f21565b6105466106003660046151eb565b60766020526000908152604090205481565b61053c610620366004614fc9565b6111b7565b61053c610633366004614fc9565b6112eb565b61064b6106463660046152c6565b611341565b60408051928352602083019190915201610550565b61054661066e3660046151eb565b60776020526000908152604090205481565b61054661068e3660046151eb565b60906020526000908152604090205481565b6105466106ae3660046152c6565b609260209081526000928352604080842090915290825290205481565b610546600281565b6105466106e13660046151eb565b60756020526000908152604090205481565b6105466107013660046151eb565b607c6020526000908152604090205481565b61053c6107213660046151eb565b61137d565b6105466107343660046152c6565b608260209081526000928352604080842090915290825290205481565b61053c61075f366004615281565b6113ba565b6105466107723660046151eb565b60896020526000908152604090205481565b6107976107923660046152c6565b611683565b6040516001600160a01b039091168152602001610550565b61054660715481565b61053c6107c6366004614fc9565b6116bb565b61057c611737565b61057c6107e13660046151eb565b60796020526000908152604090205460ff1681565b6105466108043660046152e7565b608460209081526000938452604080852082529284528284209052825290205481565b606a54610797906001600160a01b031681565b6105466108483660046152c6565b608560209081526000928352604080842090915290825290205481565b600154610797906001600160a01b031681565b610546606e5481565b61053c61088f3660046151eb565b611798565b60345460ff1661057c565b61057c6117d5565b61057c6108b53660046151eb565b607b6020526000908152604090205460ff1681565b61053c6108d8366004614fc9565b611809565b61053c6108eb3660046152c6565b611a88565b61053c6108fe366004615001565b611ccb565b61053c6109113660046151eb565b611e10565b61053c6109243660046151eb565b611e4d565b61053c610937366004614fc9565b611e8a565b61054660725481565b61053c6109533660046152c6565b611f06565b61053c610966366004614fc9565b612085565b61057c6109793660046151eb565b60956020526000908152604090205460ff1681565b606954610797906001600160a01b031681565b61053c6120db565b61057c6121d8565b6105466109bf3660046152c6565b608660209081526000928352604080842090915290825290205481565b61053c6109ea3660046150a5565b612231565b61053c6109fd3660046151eb565b6123c0565b61053c610a103660046152c6565b61266d565b61053c610a23366004614fc9565b612a9e565b610546606f5481565b600054610797906201000090046001600160a01b031681565b610546606d5481565b610546610a613660046151eb565b608c6020526000908152604090205481565b61054660685481565b61053c610a8a3660046151eb565b612b22565b610aa2610a9d3660046151eb565b612b5f565b604051610550919061539f565b610546610abd3660046151eb565b607e6020526000908152604090205481565b610546606b5481565b610546606c5481565b61053c612bcb565b60705461057c9060ff1681565b608b54610797906001600160a01b031681565b610546610b1736600461524a565b608760209081526000938452604080852082529284528284209052825290205481565b61053c612f17565b610546610b503660046152c6565b609360209081526000928352604080842090915290825290205481565b61053c610b7b3660046151b3565b613097565b61057c6130e0565b61057c610b9636600461521b565b608860209081526000928352604080842090915290825290205460ff1681565b61053c610bc43660046151eb565b61310f565b61053c61314c565b61053c610bdf366004614fc9565b6133bb565b61053c610bf2366004614fc9565b6134b2565b61054660745481565b61057c610c0e366004614fc9565b61352e565b61057c610c213660046152c6565b6135e9565b610546610c343660046152c6565b608160209081526000928352604080842090915290825290205481565b61054660735481565b61057c610c683660046151eb565b6136bf565b610546610c7b3660046151eb565b608a6020526000908152604090205481565b610546610c9b3660046151eb565b608e6020526000908152604090205481565b610546610cbb3660046152c6565b609160209081526000928352604080842090915290825290205481565b608d54610797906001600160a01b031681565b610cfe610cf93660046151eb565b6137a2565b604051610550919061543b565b610546610d1936600461521b565b608060209081526000928352604080842090915290825290205481565b61053c613803565b610546610d4c3660046152c6565b608360209081526000928352604080842090915290825290205481565b61053c613e12565b6067546107979061010090046001600160a01b031681565b610546610d973660046152c6565b613e70565b610546610daa3660046151eb565b607a6020526000908152604090205481565b607354610546565b610dcc613ea1565b606d8190556040518181527f2b860533a97dcdf673f1953a047bce112334bde58a00ba9d1f21e5a280c484df906020015b60405180910390a150565b610e10613ea1565b6064811115610e665760405162461bcd60e51b815260206004820152601e60248201527f4d75737420626520696e206265747765656e203020616e64203130302025000060448201526064015b60405180910390fd5b606b8190556040518181527f828cf2dd9b497be6f0d31a3dde2fb89c3a68bd9458a7e5cab177a35577ae8b0990602001610dfd565b606060946000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015610f1657838290600052602060002090600202016040518060400160405290816000820154815260200160018201548152505081526020019060010190610ed0565b505050509050919050565b600060745411610f435760405162461bcd60e51b8152600401610e5d9061554f565b606d546074546000908152607a6020526040902054610f6291906156cb565b4210610f805760405162461bcd60e51b8152600401610e5d90615481565b6073546067546040516370a0823160e01b81523360048201526101009091046001600160a01b0316906370a082319060240160206040518083038186803b158015610fca57600080fd5b505afa158015610fde573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110029190615203565b10156110205760405162461bcd60e51b8152600401610e5d90615518565b607354606754604051636eb1769f60e11b81523360048201523060248201526101009091046001600160a01b03169063dd62ed3e9060440160206040518083038186803b15801561107057600080fd5b505afa158015611084573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a89190615203565b10156110c65760405162461bcd60e51b8152600401610e5d9061564f565b608d546001600160a01b03166110ee5760405162461bcd60e51b8152600401610e5d90615586565b606c548151146111105760405162461bcd60e51b8152600401610e5d90615603565b60005b81518110156111a757600182828151811061113e57634e487b7160e01b600052603260045260246000fd5b602002602001015114806111795750600282828151811061116f57634e487b7160e01b600052603260045260246000fd5b6020026020010151145b6111955760405162461bcd60e51b8152600401610e5d906154e1565b8061119f8161577c565b915050611113565b506111b433826000613f1b565b50565b6001600160a01b03811661120d5760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f742062652030000000000000006044820152606401610e5d565b600154600160a01b900460ff16156112795760405162461bcd60e51b815260206004820152602960248201527f416c726561647920696e697469616c697a65642c20757365206e6f6d696e617460448201526832a732bba7bbb732b960b91b6064820152608401610e5d565b6001805460ff60a01b1916600160a01b179055600080546001600160a01b03831662010000810262010000600160b01b03199092169190911782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9101610dfd565b6112f3613ea1565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290602001610dfd565b6094602052816000526040600020818154811061135d57600080fd5b600091825260209091206002909102018054600190910154909250905082565b611385613ea1565b606c8190556040518181527f7e150dd869869de072c59e3f29f94d5574d07a69b27de280b3139896e26e5fd190602001610dfd565b816000607454116113dd5760405162461bcd60e51b8152600401610e5d9061554f565b606d546074546000908152607a60205260409020546113fc91906156cb565b421061141a5760405162461bcd60e51b8152600401610e5d90615481565b608b546040516331a9108f60e11b81526004810183905233916001600160a01b031690636352211e9060240160206040518083038186803b15801561145e57600080fd5b505afa158015611472573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114969190614fe5565b6001600160a01b0316146114ec5760405162461bcd60e51b815260206004820152601c60248201527f4f776e6572206f662074686520746f6b656e206e6f742076616c6964000000006044820152606401610e5d565b607354606754608b546040516370a0823160e01b81526001600160a01b03918216600482015261010090920416906370a082319060240160206040518083038186803b15801561153b57600080fd5b505afa15801561154f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115739190615203565b10156115915760405162461bcd60e51b8152600401610e5d906155bd565b608d546001600160a01b03166115b95760405162461bcd60e51b8152600401610e5d90615586565b606c548251146115db5760405162461bcd60e51b8152600401610e5d90615603565b60005b825181101561167257600183828151811061160957634e487b7160e01b600052603260045260246000fd5b602002602001015114806116445750600283828151811061163a57634e487b7160e01b600052603260045260246000fd5b6020026020010151145b6116605760405162461bcd60e51b8152600401610e5d906154e1565b8061166a8161577c565b9150506115de565b5061167e338385613f1b565b505050565b607f602052816000526040600020818154811061169f57600080fd5b6000918252602090912001546001600160a01b03169150829050565b6116c3613ea1565b6001600160a01b0381166116e95760405162461bcd60e51b8152600401610e5d906154b8565b608b80546001600160a01b0319166001600160a01b0383169081179091556040519081527f6108b47cba05b58722d050a3a97e418ae97c856c7618de2bcc492be667a3f60d90602001610dfd565b60745460009081526078602052604081205460ff16801561176a57506074546000908152607b602052604090205460ff16155b80156117935750606d546074546000908152607a602052604090205461179091906156cb565b42115b905090565b6117a0613ea1565b60688190556040518181527f27b0d5e14ef1c5f5ffa1df2ddd834610ed6b755e7730c25a8a55df721f18c48490602001610dfd565b60006117df6130e0565b8015611793575060745460009081526079602052604090205460ff16806117935750506074541590565b60006074541161182b5760405162461bcd60e51b8152600401610e5d9061554f565b606d546074546000908152607a602052604090205461184a91906156cb565b42106118685760405162461bcd60e51b8152600401610e5d90615481565b6073546067546040516370a0823160e01b81523360048201526101009091046001600160a01b0316906370a082319060240160206040518083038186803b1580156118b257600080fd5b505afa1580156118c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ea9190615203565b10156119085760405162461bcd60e51b8152600401610e5d90615518565b607354606754604051636eb1769f60e11b81523360048201523060248201526101009091046001600160a01b03169063dd62ed3e9060440160206040518083038186803b15801561195857600080fd5b505afa15801561196c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119909190615203565b10156119ae5760405162461bcd60e51b8152600401610e5d9061564f565b608d546001600160a01b03166119d65760405162461bcd60e51b8152600401610e5d90615586565b6000606c5467ffffffffffffffff811115611a0157634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611a2a578160200160208202803683370190505b50905060005b8151811015611a78576000828281518110611a5b57634e487b7160e01b600052603260045260246000fd5b602090810291909101015280611a708161577c565b915050611a30565b50611a84338383614120565b5050565b60008211611ad85760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d757374206265206d6f7265207468656e207a65726f0000006044820152606401610e5d565b607454811015611b2a5760405162461bcd60e51b815260206004820152601860248201527f43616e74207075742066756e647320696e2061207061737400000000000000006044820152606401610e5d565b60008181526079602052604090205460ff1615611b7e5760405162461bcd60e51b815260206004820152601260248201527114d9585cdbdb881a5cc8199a5b9a5cda195960721b6044820152606401610e5d565b606754604051636eb1769f60e11b8152336004820152306024820152839161010090046001600160a01b03169063dd62ed3e9060440160206040518083038186803b158015611bcc57600080fd5b505afa158015611be0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c049190615203565b1015611c225760405162461bcd60e51b8152600401610e5d9061564f565b6067546040516370a0823160e01b8152336004820152839161010090046001600160a01b0316906370a082319060240160206040518083038186803b158015611c6a57600080fd5b505afa158015611c7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ca29190615203565b1015611cc05760405162461bcd60e51b8152600401610e5d90615518565b611a84338383614276565b600054610100900460ff16611ce65760005460ff1615611cea565b303b155b611d4d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610e5d565b600054610100900460ff16158015611d6f576000805461ffff19166101011790555b611d788c6111b7565b611d80613e12565b60688b9055606980546001600160a01b0319166001600160a01b038c81169190911790915560678054610100600160a81b031916610100928c1692909202919091179055606c889055606d879055606e869055606f859055607384905560718390556070805460ff19168315151790558015611e02576000805461ff00191690555b505050505050505050505050565b611e18613ea1565b606f8190556040518181527fa77bc9caf9e1866a037c548f914bf5364f616a25a83e790d7e5eb25b9b1f973d90602001610dfd565b611e55613ea1565b60718190556040518181527f42cf2ba9639353bb5b5c8669ab5385086a4d3c43d616b536891ea25dcd3aa6c390602001610dfd565b611e92613ea1565b6001600160a01b038116611eb85760405162461bcd60e51b8152600401610e5d906154b8565b608d80546001600160a01b0319166001600160a01b0383169081179091556040519081527f30ac338f7c3584da96e407b0602552dd24d9eb4888779542fe721159f00a800190602001610dfd565b6000828152607960205260409020548290829060ff16611f685760405162461bcd60e51b815260206004820152601860248201527f526f79616c65206d7573742062652066696e69736865642100000000000000006044820152606401610e5d565b608d546040516331a9108f60e11b81526004810183905233916001600160a01b031690636352211e9060240160206040518083038186803b158015611fac57600080fd5b505afa158015611fc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe49190614fe5565b6001600160a01b0316146120295760405162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b6044820152606401610e5d565b61203381836135e9565b6120745760405162461bcd60e51b8152602060048201526012602482015271546f6b656e206973206e6f7420616c69766560701b6044820152606401610e5d565b61207f338585614332565b50505050565b61208d613ea1565b606980546001600160a01b0319166001600160a01b0383169081179091556040519081527f1b08d49ba5aac4a37b065dc5e3dcd1dc46473d4dacb793bc25902199734ae9f190602001610dfd565b6001546001600160a01b031633146121535760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b6064820152608401610e5d565b60005460015460408051620100009093046001600160a01b03908116845290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a1600180546000805462010000600160b01b0319166001600160a01b03831662010000021790556001600160a01b0319169055565b6074546000908152607b602052604081205460ff16801561220b575060745460009081526079602052604090205460ff16155b80156117935750606f546074546000908152607e602052604090205461179091906156cb565b612239613ea1565b60005b835181101561232257608b5484516001600160a01b0390911690633302eb639086908490811061227c57634e487b7160e01b600052603260045260246000fd5b60200260200101518584815181106122a457634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b81526004016122dd9291906001600160a01b03929092168252602082015260400190565b600060405180830381600087803b1580156122f757600080fd5b505af115801561230b573d6000803e3d6000fd5b50505050808061231a9061577c565b91505061223c565b506067546040516370a0823160e01b815230600482015261167e9183916101009091046001600160a01b0316906370a082319060240160206040518083038186803b15801561237057600080fd5b505afa158015612384573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123a89190615203565b60675461010090046001600160a01b03169190614593565b806000607454116123e35760405162461bcd60e51b8152600401610e5d9061554f565b606d546074546000908152607a602052604090205461240291906156cb565b42106124205760405162461bcd60e51b8152600401610e5d90615481565b608b546040516331a9108f60e11b81526004810183905233916001600160a01b031690636352211e9060240160206040518083038186803b15801561246457600080fd5b505afa158015612478573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061249c9190614fe5565b6001600160a01b0316146124f25760405162461bcd60e51b815260206004820152601c60248201527f4f776e6572206f662074686520746f6b656e206e6f742076616c6964000000006044820152606401610e5d565b607354606754608b546040516370a0823160e01b81526001600160a01b03918216600482015261010090920416906370a082319060240160206040518083038186803b15801561254157600080fd5b505afa158015612555573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125799190615203565b10156125975760405162461bcd60e51b8152600401610e5d906155bd565b608d546001600160a01b03166125bf5760405162461bcd60e51b8152600401610e5d90615586565b6000606c5467ffffffffffffffff8111156125ea57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015612613578160200160208202803683370190505b50905060005b815181101561266157600082828151811061264457634e487b7160e01b600052603260045260246000fd5b6020908102919091010152806126598161577c565b915050612619565b5061167e338285613f1b565b600181148061267c5750600281145b6126985760405162461bcd60e51b8152600401610e5d906154e1565b608d546040516331a9108f60e11b8152600481018490526001600160a01b0390911690636352211e9060240160206040518083038186803b1580156126dc57600080fd5b505afa1580156126f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127149190614fe5565b6001600160a01b0316336001600160a01b0316146127635760405162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b6044820152606401610e5d565b600082815260906020526040902054607454146127b15760405162461bcd60e51b815260206004820152600c60248201526b2bb937b7339039b2b0b9b7b760a11b6044820152606401610e5d565b6074546000908152607b602052604090205460ff166128125760405162461bcd60e51b815260206004820152601b60248201527f436f6d7065746974696f6e206e6f7420737461727465642079657400000000006044820152606401610e5d565b60745460009081526079602052604090205460ff161561286b5760405162461bcd60e51b815260206004820152601460248201527310dbdb5c195d1a5d1a5bdb88199a5b9a5cda195960621b6044820152606401610e5d565b60008281526093602090815260408083206074548452607783528184205484529091529020548114156128d05760405162461bcd60e51b815260206004820152600d60248201526c29b0b6b2903837b9b4ba34b7b760991b6044820152606401610e5d565b607454600090815260776020526040902054600114612936576128f2826136bf565b6129365760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881b9bc81b1bdb99d95c881d985b1a59605a1b6044820152606401610e5d565b606e546074546000908152607e602052604090205461295591906156cb565b42106129a35760405162461bcd60e51b815260206004820152601a60248201527f526f756e6420706f736974696f6e696e672066696e69736865640000000000006044820152606401610e5d565b600082815260936020908152604080832060745484526077835281842054845290915290205460011415612a13576074546000908152608460209081526040808320607783528184205484528252808320600184529091528120805491612a0983615765565b9190505550612a7f565b600082815260936020908152604080832060745484526077835281842054845290915290205460021415612a7f576074546000908152608460209081526040808320607783528184205484528252808320600284529091528120805491612a7983615765565b91905055505b607454600081815260776020526040902054611a8491339184866145f6565b612aa6613ea1565b6001600160a01b038116612acc5760405162461bcd60e51b8152600401610e5d906154b8565b60678054610100600160a81b0319166101006001600160a01b038416908102919091179091556040519081527fc69f61e4bef149d13a9bb253756b4b6e0b1c2cd402efb69dfec416c6201d0bf190602001610dfd565b612b2a613ea1565b606e8190556040518181527fb89d563deee12192bafa00ba8fdf7f63a788a28b71b24f3a10a20a6b0cc10cf490602001610dfd565b6000818152607f6020908152604091829020805483518184028101840190945280845260609392830182828015612bbf57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612ba1575b50505050509050919050565b606d546074546000908152607a6020526040902054612bea91906156cb565b4211612c485760405162461bcd60e51b815260206004820152602760248201527f43616e277420737461727420756e74696c207369676e757020706572696f64206044820152666578706972657360c81b6064820152608401610e5d565b6074546000908152608e6020526040902054612cb25760405162461bcd60e51b8152602060048201526024808201527f43616e206e6f742073746172742c206e6f20746f6b656e7320696e206120736560448201526330b9b7b760e11b6064820152608401610e5d565b6074546000908152607b602052604090205460ff1615612d065760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e481cdd185c9d1959608a1b6044820152606401610e5d565b60745460009081526078602052604090205460ff16612d605760405162461bcd60e51b815260206004820152601660248201527514d9585cdbdb881b9bdd081cdd185c9d1959081e595d60521b6044820152606401610e5d565b6069546074546000908152608c6020526040908190205490516315905ec160e31b81526001600160a01b039092169163ac82f60891612da59160040190815260200190565b60206040518083038186803b158015612dbd57600080fd5b505afa158015612dd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612df59190615203565b6072908155607480546000908152607760208181526040808420600190819055955485548552608283528185209383528185205485529282528084209290925583548352607b8152818320805460ff191690951790945582548252607e909352828120429055606f54915481529190912054612e7191906156cb565b607480546000908152607d602090815260408083209490945582548252608e80825284832054609283528584206077845286852054855283528584205583548352607580835285842054608a8452868520559354808452908252848320549382529184902054845192835290820192909252918201527fde7ce02c763c724641de72079afa21a2e61b2e7dc3dc5df889e3c225c462b6b3906060015b60405180910390a1565b6000546201000090046001600160a01b0316331480612f395750612f396130e0565b612fab5760405162461bcd60e51b815260206004820152603c60248201527f4f6e6c79206f776e65722063616e20737461727420736561736f6e206265666f60448201527f7265207061757365206265747765656e2074776f20736561736f6e73000000006064820152608401610e5d565b60745460009081526079602052604090205460ff1680612fcb5750607454155b6130175760405162461bcd60e51b815260206004820181905260248201527f50726576696f757320736561736f6e206d7573742062652066696e69736865646044820152606401610e5d565b6074546130259060016156cb565b60748181556000918252607a602090815260408084204290558254845260788252808420805460ff1916600117905560685483548552608c90925292839020555490517f896723e255001c5a729d00297f5b642ae4837851f3917c5caeb6c6533881bd0f91612f0d9190815260200190565b61309f613ea1565b6070805460ff19168215159081179091556040519081527fdb1bc95d8deaf5e2eb3d040301648dfb70dc5f899f8179f0b055161604301af490602001610dfd565b60705460009060ff16801561179357506071546074546000908152607a602052604090205461179091906156cb565b613117613ea1565b60738190556040518181527f035ecfaccb0f010efe9b303e71a63f162cd8edb06495d7cd7ee4b5a2fa79e0aa90602001610dfd565b60006074541161316e5760405162461bcd60e51b8152600401610e5d9061554f565b606d546074546000908152607a602052604090205461318d91906156cb565b42106131ab5760405162461bcd60e51b8152600401610e5d90615481565b6073546067546040516370a0823160e01b81523360048201526101009091046001600160a01b0316906370a082319060240160206040518083038186803b1580156131f557600080fd5b505afa158015613209573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061322d9190615203565b101561324b5760405162461bcd60e51b8152600401610e5d90615518565b607354606754604051636eb1769f60e11b81523360048201523060248201526101009091046001600160a01b03169063dd62ed3e9060440160206040518083038186803b15801561329b57600080fd5b505afa1580156132af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132d39190615203565b10156132f15760405162461bcd60e51b8152600401610e5d9061564f565b608d546001600160a01b03166133195760405162461bcd60e51b8152600401610e5d90615586565b6000606c5467ffffffffffffffff81111561334457634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561336d578160200160208202803683370190505b50905060005b81518110156111a757600082828151811061339e57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152806133b38161577c565b915050613373565b6133c3613ea1565b6001600160a01b0381166133e95760405162461bcd60e51b8152600401610e5d906154b8565b600154600160a81b900460ff16156134395760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481d1c985b9cd9995c9c9959606a1b6044820152606401610e5d565b600080546001600160a01b038381166201000081810262010000600160b01b031990941693909317938490556001805460ff60a81b1916600160a81b1790556040805193909404909116825260208201527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9101610dfd565b6134ba613ea1565b6001600160a01b0381166134e05760405162461bcd60e51b8152600401610e5d906154b8565b606a80546001600160a01b0319166001600160a01b0383169081179091556040519081527fabe8e0bc29b131a37965174dcb67ce5262f7afd4afca1456fdffa107ccc2c62f90602001610dfd565b6000600160745411156135b85760745460009081526080602090815260408083206001600160a01b03861684529091529020541515806135b25750600060806000600160745461357e9190615722565b81526020019081526020016000206000846001600160a01b03166001600160a01b0316815260200190815260200160002054115b92915050565b5060745460009081526080602090815260408083206001600160a01b0390941683529290522054151590565b919050565b6000828152609060205260408120548214613606575060006135b2565b600082815260776020526040902054600110156136a0576000828152608160209081526040808320607790925282205490919061364590600190615722565b815260200190815260200160002054609360008581526020019081526020016000206000600160776000878152602001908152602001600020546136899190615722565b8152602001908152602001600020541490506135b2565b5060009081526091602090815260408083209383529290522054151590565b600081815260906020526040812054607454146136de57506000919050565b60745460009081526077602052604090205460011015613780576074546000908152608160209081526040808320607790925282205490919061372390600190615722565b8152602001908152602001600020546093600084815260200190815260200160002060006001607760006074548152602001908152602001600020546137699190615722565b815260200190815260200160002054149050919050565b5060745460009081526091602090815260408083209383529290522054151590565b6000818152608f6020908152604091829020805483518184028101840190945280845260609392830182828015612bbf57602002820191906000526020600020905b8154815260200190600101908083116137e45750505050509050919050565b6074546000908152607b602052604090205460ff166138645760405162461bcd60e51b815260206004820152601b60248201527f436f6d7065746974696f6e206e6f7420737461727465642079657400000000006044820152606401610e5d565b60745460009081526079602052604090205460ff16156138bd5760405162461bcd60e51b815260206004820152601460248201527310dbdb5c195d1a5d1a5bdb88199a5b9a5cda195960621b6044820152606401610e5d565b606f546074546000908152607e60205260409020546138dc91906156cb565b42116139225760405162461bcd60e51b815260206004820152601560248201527410d85b89dd0818db1bdcd9481c9bdd5b99081e595d605a1b6044820152606401610e5d565b607454600090815260776020526040812054906139408260016156cb565b6069546074546000908152608c60205260408082205490516315905ec160e31b81526004810191909152929350916001600160a01b039091169063ac82f6089060240160206040518083038186803b15801561399b57600080fd5b505afa1580156139af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139d39190615203565b905060008111613a305760405162461bcd60e51b815260206004820152602260248201527f4f7261636c65205072696365206d757374206265206c6172676572207468616e604482015261020360f41b6064820152608401610e5d565b6072546074546000908152608360209081526040808320878452909152902082905580821015613a61576001613a64565b60025b607454600090815260816020908152604080832088845290915281209190915581831015613a93576002613a96565b60015b6072849055607454600090815260816020908152604080832089845290915281205491925090600214613aee576074546000908152608460209081526040808320898452825280832060018452909152902054613b15565b60745460009081526084602090815260408083208984528252808320600284529091529020545b9050606c548511613b4057607454600090815260926020908152604080832088845290915290208190555b6074546000908152609260209081526040808320898452909152902054613b68908290615722565b60745460009081526086602090815260408083208a8452909152902055613b8f82866147cf565b8015613bc55760748054600090815260776020908152604080832089905560725493548352608282528083208984529091529020555b606c54851180613bd6575060018111155b15613d33576074546000908152607960205260408120805460ff1916600117905581613c2857506074546000908152609260209081526040808320898452909152902054613c2381614a7a565b613c33565b5080613c3381614a7a565b607480546000908152607c602090815260408083204290559254808352608182528383208b8452825283832054818452608383528484208c8552835284842054828552608684528585208d86528452938590205485519283529282018c90528185015260608101889052608081019290925260a082015260c0810183905290517fe1875519b9a7a18c7b2b7cb4dd3c932ec04552f4aeb2d97869ee88e2e24ac4009181900360e00190a160745460008181526089602090815260409182902054825193845290830184905282820152517f7f923b15cb705db283005f500abb87c8cc2968d2d0801b44bbd5ed9c64205e199181900360600190a150613e0a565b607480546000908152607e6020526040808220429055606f5492548252902054613d5d91906156cb565b607480546000908152607d60209081526040808320949094559154808252608183528382208a8352835283822054818352608384528483208b8452845284832054828452608685528584208c85528552928590205485519283529382018b90529381019390935260608301869052608083015260a082015260c081018290527fe1875519b9a7a18c7b2b7cb4dd3c932ec04552f4aeb2d97869ee88e2e24ac4009060e00160405180910390a15b505050505050565b60675460ff1615613e5b5760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610e5d565b6067805460ff19166001908117909155606655565b608f6020528160005260406000208181548110613e8c57600080fd5b90600052602060002001600091509150505481565b6000546201000090046001600160a01b03163314613f195760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b6064820152608401610e5d565b565b608d546040516340d097c360e01b81526001600160a01b03858116600483015260009216906340d097c390602401602060405180830381600087803b158015613f6357600080fd5b505af1158015613f77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f9b9190615203565b60748054600083815260906020908152604080832084905592825260918152828220858352815282822042905583548252608f815282822080546001810182559083528183200185905592548152608e9092528120805492935090613fff8361577c565b909155505060745460009081526080602090815260408083206001600160a01b038816845290915281204290555b83518110156140b95783818151811061405657634e487b7160e01b600052603260045260246000fd5b60200260200101516000146140a7576140a78560745483600161407991906156cb565b87858151811061409957634e487b7160e01b600052603260045260246000fd5b6020026020010151866145f6565b806140b18161577c565b91505061402d565b5081156140cf576140ca8483614b6e565b6140db565b6140db84607354614c04565b7fc4540a50fb7ace4c340742766a40e199ad6e80e36364529749f7a17e96e21a808482607454866040516141129493929190615368565b60405180910390a150505050565b608d546040516340d097c360e01b81526001600160a01b03848116600483015260009216906340d097c390602401602060405180830381600087803b15801561416857600080fd5b505af115801561417c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141a09190615203565b60748054600083815260906020908152604080832084905592825260918152828220858352815282822042905583548252608f815282822080546001810182559083528183200185905592548152608e90925281208054929350906142048361577c565b909155505060745460009081526080602090815260408083206001600160a01b0387168452909152902042905560735461423f908590614c04565b7fc4540a50fb7ace4c340742766a40e199ad6e80e36364529749f7a17e96e21a808382607454856040516141129493929190615368565b6000818152607560205260409020546142909083906156cb565b600082815260756020908152604080832093909355608a905220546142b69083906156cb565b6000828152608a60205260409020556067546142e29061010090046001600160a01b0316843085614c88565b604080516001600160a01b0385168152602081018390529081018390527f7a5e77cafc1cb775021040156b9537b95c869bfbd7d19b3042d2eb46a65b57e8906060015b60405180910390a1505050565b6000828152607560205260409020546143825760405162461bcd60e51b815260206004820152601260248201527114995dd85c99081b5d5cdd081899481cd95d60721b6044820152606401610e5d565b60008181526095602052604090205460ff16156143e15760405162461bcd60e51b815260206004820152601860248201527f52657761726420616c726561647920636f6c6c656374656400000000000000006044820152606401610e5d565b600082815260896020526040908190205460675491516370a0823160e01b8152306004820152909161010090046001600160a01b0316906370a082319060240160206040518083038186803b15801561443957600080fd5b505afa15801561444d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144719190615203565b10156144bf5760405162461bcd60e51b815260206004820152601e60248201527f4e6f7420656e6f7567682062616c616e636520666f72207265776172647300006044820152606401610e5d565b6000818152609560209081526040808320805460ff191660011790558483526089825280832054608a909252909120546144f99190615722565b6000838152608a6020908152604080832093909355608990522054606754614532916101009091046001600160a01b0316908590614593565b6000828152608960209081526040918290205482518581526001600160a01b0387169281019290925291810183905260608101919091527f18323b848841b45209f9d1c48e6219e71d3175a1edd94d812c8f1de08637759d90608001614325565b6040516001600160a01b03831660248201526044810182905261167e90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614cc0565b60008481526087602090815260408083206001600160a01b038916845282528083208684528252808320859055838352609382528083208684528252808320859055838352609490915290205483116146b85760408051808201825284815260208082018590526000848152609490915291909120614676600186615722565b8154811061469457634e487b7160e01b600052603260045260246000fd5b600091825260209182902083516002909202019081559101516001909101556146fd565b60008181526094602090815260408083208151808301909252868252818301868152815460018181018455928652939094209151600290930290910191825591519101555b600282141561473d576000848152608460209081526040808320868452825280832085845290915281208054916147338361577c565b9190505550614770565b60008481526084602090815260408083208684528252808320858452909152812080549161476a8361577c565b91905055505b604080516001600160a01b03871681526020810183905290810185905260608101849052608081018390527f56769e0b5cef558268d0f33b035112c34fdeef21a052a93572023d4afab79d2c9060a00160405180910390a15050505050565b6074546000908152608f602090815260408083208054825181850281018501909352808352919290919083018282801561482857602002820191906000526020600020905b815481526020019060010190808311614814575b5050505050905060005b815181101561207f57836093600084848151811061486057634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060006001866148859190615722565b81526020019081526020016000205414806148f75750609360008383815181106148bf57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060006001856148e49190615722565b8152602001908152602001600020546000145b15614a685760016093600084848151811061492257634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020600085815260200190815260200160002054141561498b576074546000908152608460209081526040808320868452825280832060018452909152812080549161498183615765565b9190505550614a16565b6002609360008484815181106149b157634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000858152602001908152602001600020541415614a165760745460009081526084602090815260408083208684528252808320600284529091528120805491614a1083615765565b91905055505b600060936000848481518110614a3c57634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000858152602001908152602001600020819055505b80614a728161577c565b915050614832565b60745460009081526079602052604090205460ff16614adb5760405162461bcd60e51b815260206004820152601760248201527f526f79616c65206d7573742062652066696e69736865640000000000000000006044820152606401610e5d565b60008111614b3c5760405162461bcd60e51b815260206004820152602860248201527f5468657265206973206e6f20616c69766520706c6179657273206c65667420696044820152676e20526f79616c6560c01b6064820152608401610e5d565b607454600090815260756020526040902054614b599082906156e3565b60745460009081526089602052604090205550565b608b54604051633302eb6360e01b81526001600160a01b0384811660048301526024820184905290911690633302eb6390604401600060405180830381600087803b158015614bbc57600080fd5b505af1158015614bd0573d6000803e3d6000fd5b505050506073546075600060745481526020019081526020016000206000828254614bfb91906156cb565b90915550505050565b600080614c1083614d92565b90925090508015614c3f57606a54606754614c3f916001600160a01b0361010090920482169187911684614c88565b606754614c5c9061010090046001600160a01b0316853085614c88565b60745460009081526075602052604081208054849290614c7d9084906156cb565b909155505050505050565b6040516001600160a01b038085166024830152831660448201526064810182905261207f9085906323b872dd60e01b906084016145bf565b6000614d15826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614dd59092919063ffffffff16565b80519091501561167e5780806020019051810190614d3391906151cf565b61167e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610e5d565b600080600080606b541115614dbe576064606b5485614db19190615703565b614dbb91906156e3565b90505b6000614dca8286615722565b959194509092505050565b6060614de48484600085614dee565b90505b9392505050565b606082471015614e4f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610e5d565b843b614e9d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610e5d565b600080866001600160a01b03168587604051614eb9919061534c565b60006040518083038185875af1925050503d8060008114614ef6576040519150601f19603f3d011682016040523d82523d6000602084013e614efb565b606091505b5091509150614f0b828286614f16565b979650505050505050565b60608315614f25575081614de7565b825115614f355782518084602001fd5b8160405162461bcd60e51b8152600401610e5d919061544e565b80356135e4816157c3565b600082601f830112614f6a578081fd5b81356020614f7f614f7a836156a7565b615676565b80838252828201915082860187848660051b8901011115614f9e578586fd5b855b85811015614fbc57813584529284019290840190600101614fa0565b5090979650505050505050565b600060208284031215614fda578081fd5b8135614de7816157c3565b600060208284031215614ff6578081fd5b8151614de7816157c3565b60008060008060008060008060008060006101608c8e031215615022578687fd5b8b3561502d816157c3565b9a5060208c0135995060408c0135615044816157c3565b985060608c0135615054816157c3565b975060808c0135965060a08c0135955060c08c0135945060e08c013593506101008c013592506101208c013591506101408c0135615091816157d8565b809150509295989b509295989b9093969950565b6000806000606084860312156150b9578283fd5b833567ffffffffffffffff808211156150d0578485fd5b818601915086601f8301126150e3578485fd5b813560206150f3614f7a836156a7565b8083825282820191508286018b848660051b890101111561511257898afd5b8996505b8487101561513d578035615129816157c3565b835260019690960195918301918301615116565b5097505087013592505080821115615153578384fd5b5061516086828701614f5a565b92505061516f60408501614f4f565b90509250925092565b600060208284031215615189578081fd5b813567ffffffffffffffff81111561519f578182fd5b6151ab84828501614f5a565b949350505050565b6000602082840312156151c4578081fd5b8135614de7816157d8565b6000602082840312156151e0578081fd5b8151614de7816157d8565b6000602082840312156151fc578081fd5b5035919050565b600060208284031215615214578081fd5b5051919050565b6000806040838503121561522d578182fd5b82359150602083013561523f816157c3565b809150509250929050565b60008060006060848603121561525e578081fd5b833592506020840135615270816157c3565b929592945050506040919091013590565b60008060408385031215615293578182fd5b82359150602083013567ffffffffffffffff8111156152b0578182fd5b6152bc85828601614f5a565b9150509250929050565b600080604083850312156152d8578182fd5b50508035926020909101359150565b6000806000606084860312156152fb578081fd5b505081359360208301359350604090920135919050565b6000815180845260208085019450808401835b8381101561534157815187529582019590820190600101615325565b509495945050505050565b6000825161535e818460208701615739565b9190910192915050565b60018060a01b03851681528360208201528260408201526080606082015260006153956080830184615312565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156153e05783516001600160a01b0316835292840192918401916001016153bb565b50909695505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561542e57815180518552860151868501529284019290850190600101615409565b5091979650505050505050565b602081526000614de76020830184615312565b602081526000825180602084015261546d816040850160208701615739565b601f01601f19169190910160400192915050565b6020808252601a908201527f5369676e20757020706572696f64206861732065787069726564000000000000604082015260600190565b6020808252600f908201526e496e76616c6964206164647265737360881b604082015260600190565b6020808252601b908201527f506f736974696f6e2063616e206f6e6c792062652031206f7220320000000000604082015260600190565b60208082526019908201527f4e6f20656e6f756768207355534420666f722062757920696e00000000000000604082015260600190565b60208082526017908201527f496e697469616c697a6520666972737420736561736f6e000000000000000000604082015260600190565b6020808252601d908201527f5468616c6573526f79616c652050617373706f7274206e6f7420736574000000604082015260600190565b60208082526026908201527f4e6f20656e6f7567682073555344206f6e20726f79616c65207061737320636f6040820152651b9d1c9858dd60d21b606082015260800190565b6020808252602c908201527f4e756d626572206f6620706f736974696f6e732065786365656473206e756d6260408201526b6572206f6620726f756e647360a01b606082015260800190565b6020808252600d908201526c27379030b63637bbb0b731b29760991b604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561569f5761569f6157ad565b604052919050565b600067ffffffffffffffff8211156156c1576156c16157ad565b5060051b60200190565b600082198211156156de576156de615797565b500190565b6000826156fe57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561571d5761571d615797565b500290565b60008282101561573457615734615797565b500390565b60005b8381101561575457818101518382015260200161573c565b8381111561207f5750506000910152565b60008161577457615774615797565b506000190190565b600060001982141561579057615790615797565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146111b457600080fd5b80151581146111b457600080fdfea26469706673582212208308009357c3495c88e761e8fdeacb6bd9e0f5592746801ff3db352069cda8ca64736f6c63430008040033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106105245760003560e01c80637af55eb7116102af578063babd48b811610172578063d9e692d9116100d9578063ea78fec111610092578063ea78fec114610d3e578063ebc7977214610d69578063f7c618c114610d71578063f839bb4c14610d89578063fb33cf5d14610d9c578063fefc7ae014610dbc57600080fd5b8063d9e692d914610c8d578063dc66cac314610cad578063df6cbb7814610cd8578063e0c964ed14610ceb578063e179811314610d0b578063e278fe6f14610d3657600080fd5b8063cbe8ad821161012b578063cbe8ad8214610c00578063ce4b7eeb14610c13578063cf5941de14610c26578063d165dac214610c51578063d4e562ac14610c5a578063d55476d714610c6d57600080fd5b8063babd48b814610b88578063bc39cb9a14610bb6578063bf96ae6314610bc9578063c3b83f5f14610bd1578063c402055f14610be4578063c50b0fb014610bf757600080fd5b80639e1698a911610216578063a99c6ad1116101cf578063a99c6ad114610af6578063ad6b2a8b14610b09578063b6ceb61f14610b3a578063b7479acf14610b42578063b929c12614610b6d578063b94964c414610b8057600080fd5b80639e1698a914610a8f578063a105571b14610aaf578063a131bdfe14610acf578063a2e800ad14610ad8578063a56d0ba114610ae1578063a7bc2e6614610ae957600080fd5b80638b649b94116102685780638b649b9414610a285780638da5cb5b14610a315780639118272614610a4a57806398e303f314610a535780639d1f048e14610a735780639d902a5514610a7c57600080fd5b80637af55eb7146109a95780637ce47b5c146109b15780637d115a2b146109dc5780638193fd08146109ef57806386e327f114610a025780638aee812714610a1557600080fd5b80633d8fb20f116103f7578063635ebf7e1161035e5780636ed252f8116103175780636ed252f81461093c5780637184869114610945578063724e78da146109585780637250272f1461096b578063741bef1a1461098e57806379ba5097146109a157600080fd5b8063635ebf7e146108ca57806363bcbcb5146108dd57806366a93433146108f0578063681312f514610903578063692c7479146109165780636e1ed59a1461092957600080fd5b806353a47bb7116103b057806353a47bb71461086557806358e27027146108785780635bc90b52146108815780635c975abb146108945780636169807d1461089f57806362536e32146108a757600080fd5b80633d8fb20f146107b857806342629f9b146107cb57806342852535146107d35780634864c959146107f657806348663e95146108275780634d3e41191461083a57600080fd5b80631a06db681161049b5780632d830cd5116104545780632d830cd5146107135780632df66134146107265780632e5cb9931461075157806331390e0a1461076457806336a445fb146107845780633c9a25e4146107af57600080fd5b80631a06db68146106605780631ccd03ac146106805780631e05194f146106a057806324f4ec51146106cb5780632624e0e8146106d3578063272cc28f146106f357600080fd5b80630bc77f10116104ed5780630bc77f10146105bf5780630d6ff9c6146105df578063125b4d59146105f257806313af4035146106125780631627540c1461062557806318f531c41461063857600080fd5b8062c8d23a1461052957806301df19951461053e578063037cacd51461055957806307b16e011461058c5780630920eac7146105ac575b600080fd5b61053c6105373660046151eb565b610dc4565b005b610546600181565b6040519081526020015b60405180910390f35b61057c6105673660046151eb565b60786020526000908152604090205460ff1681565b6040519015158152602001610550565b61054661059a3660046151eb565b607d6020526000908152604090205481565b61053c6105ba3660046151eb565b610e08565b6105d26105cd3660046151eb565b610e9b565b60405161055091906153ec565b61053c6105ed366004615178565b610f21565b6105466106003660046151eb565b60766020526000908152604090205481565b61053c610620366004614fc9565b6111b7565b61053c610633366004614fc9565b6112eb565b61064b6106463660046152c6565b611341565b60408051928352602083019190915201610550565b61054661066e3660046151eb565b60776020526000908152604090205481565b61054661068e3660046151eb565b60906020526000908152604090205481565b6105466106ae3660046152c6565b609260209081526000928352604080842090915290825290205481565b610546600281565b6105466106e13660046151eb565b60756020526000908152604090205481565b6105466107013660046151eb565b607c6020526000908152604090205481565b61053c6107213660046151eb565b61137d565b6105466107343660046152c6565b608260209081526000928352604080842090915290825290205481565b61053c61075f366004615281565b6113ba565b6105466107723660046151eb565b60896020526000908152604090205481565b6107976107923660046152c6565b611683565b6040516001600160a01b039091168152602001610550565b61054660715481565b61053c6107c6366004614fc9565b6116bb565b61057c611737565b61057c6107e13660046151eb565b60796020526000908152604090205460ff1681565b6105466108043660046152e7565b608460209081526000938452604080852082529284528284209052825290205481565b606a54610797906001600160a01b031681565b6105466108483660046152c6565b608560209081526000928352604080842090915290825290205481565b600154610797906001600160a01b031681565b610546606e5481565b61053c61088f3660046151eb565b611798565b60345460ff1661057c565b61057c6117d5565b61057c6108b53660046151eb565b607b6020526000908152604090205460ff1681565b61053c6108d8366004614fc9565b611809565b61053c6108eb3660046152c6565b611a88565b61053c6108fe366004615001565b611ccb565b61053c6109113660046151eb565b611e10565b61053c6109243660046151eb565b611e4d565b61053c610937366004614fc9565b611e8a565b61054660725481565b61053c6109533660046152c6565b611f06565b61053c610966366004614fc9565b612085565b61057c6109793660046151eb565b60956020526000908152604090205460ff1681565b606954610797906001600160a01b031681565b61053c6120db565b61057c6121d8565b6105466109bf3660046152c6565b608660209081526000928352604080842090915290825290205481565b61053c6109ea3660046150a5565b612231565b61053c6109fd3660046151eb565b6123c0565b61053c610a103660046152c6565b61266d565b61053c610a23366004614fc9565b612a9e565b610546606f5481565b600054610797906201000090046001600160a01b031681565b610546606d5481565b610546610a613660046151eb565b608c6020526000908152604090205481565b61054660685481565b61053c610a8a3660046151eb565b612b22565b610aa2610a9d3660046151eb565b612b5f565b604051610550919061539f565b610546610abd3660046151eb565b607e6020526000908152604090205481565b610546606b5481565b610546606c5481565b61053c612bcb565b60705461057c9060ff1681565b608b54610797906001600160a01b031681565b610546610b1736600461524a565b608760209081526000938452604080852082529284528284209052825290205481565b61053c612f17565b610546610b503660046152c6565b609360209081526000928352604080842090915290825290205481565b61053c610b7b3660046151b3565b613097565b61057c6130e0565b61057c610b9636600461521b565b608860209081526000928352604080842090915290825290205460ff1681565b61053c610bc43660046151eb565b61310f565b61053c61314c565b61053c610bdf366004614fc9565b6133bb565b61053c610bf2366004614fc9565b6134b2565b61054660745481565b61057c610c0e366004614fc9565b61352e565b61057c610c213660046152c6565b6135e9565b610546610c343660046152c6565b608160209081526000928352604080842090915290825290205481565b61054660735481565b61057c610c683660046151eb565b6136bf565b610546610c7b3660046151eb565b608a6020526000908152604090205481565b610546610c9b3660046151eb565b608e6020526000908152604090205481565b610546610cbb3660046152c6565b609160209081526000928352604080842090915290825290205481565b608d54610797906001600160a01b031681565b610cfe610cf93660046151eb565b6137a2565b604051610550919061543b565b610546610d1936600461521b565b608060209081526000928352604080842090915290825290205481565b61053c613803565b610546610d4c3660046152c6565b608360209081526000928352604080842090915290825290205481565b61053c613e12565b6067546107979061010090046001600160a01b031681565b610546610d973660046152c6565b613e70565b610546610daa3660046151eb565b607a6020526000908152604090205481565b607354610546565b610dcc613ea1565b606d8190556040518181527f2b860533a97dcdf673f1953a047bce112334bde58a00ba9d1f21e5a280c484df906020015b60405180910390a150565b610e10613ea1565b6064811115610e665760405162461bcd60e51b815260206004820152601e60248201527f4d75737420626520696e206265747765656e203020616e64203130302025000060448201526064015b60405180910390fd5b606b8190556040518181527f828cf2dd9b497be6f0d31a3dde2fb89c3a68bd9458a7e5cab177a35577ae8b0990602001610dfd565b606060946000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015610f1657838290600052602060002090600202016040518060400160405290816000820154815260200160018201548152505081526020019060010190610ed0565b505050509050919050565b600060745411610f435760405162461bcd60e51b8152600401610e5d9061554f565b606d546074546000908152607a6020526040902054610f6291906156cb565b4210610f805760405162461bcd60e51b8152600401610e5d90615481565b6073546067546040516370a0823160e01b81523360048201526101009091046001600160a01b0316906370a082319060240160206040518083038186803b158015610fca57600080fd5b505afa158015610fde573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110029190615203565b10156110205760405162461bcd60e51b8152600401610e5d90615518565b607354606754604051636eb1769f60e11b81523360048201523060248201526101009091046001600160a01b03169063dd62ed3e9060440160206040518083038186803b15801561107057600080fd5b505afa158015611084573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a89190615203565b10156110c65760405162461bcd60e51b8152600401610e5d9061564f565b608d546001600160a01b03166110ee5760405162461bcd60e51b8152600401610e5d90615586565b606c548151146111105760405162461bcd60e51b8152600401610e5d90615603565b60005b81518110156111a757600182828151811061113e57634e487b7160e01b600052603260045260246000fd5b602002602001015114806111795750600282828151811061116f57634e487b7160e01b600052603260045260246000fd5b6020026020010151145b6111955760405162461bcd60e51b8152600401610e5d906154e1565b8061119f8161577c565b915050611113565b506111b433826000613f1b565b50565b6001600160a01b03811661120d5760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f742062652030000000000000006044820152606401610e5d565b600154600160a01b900460ff16156112795760405162461bcd60e51b815260206004820152602960248201527f416c726561647920696e697469616c697a65642c20757365206e6f6d696e617460448201526832a732bba7bbb732b960b91b6064820152608401610e5d565b6001805460ff60a01b1916600160a01b179055600080546001600160a01b03831662010000810262010000600160b01b03199092169190911782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9101610dfd565b6112f3613ea1565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290602001610dfd565b6094602052816000526040600020818154811061135d57600080fd5b600091825260209091206002909102018054600190910154909250905082565b611385613ea1565b606c8190556040518181527f7e150dd869869de072c59e3f29f94d5574d07a69b27de280b3139896e26e5fd190602001610dfd565b816000607454116113dd5760405162461bcd60e51b8152600401610e5d9061554f565b606d546074546000908152607a60205260409020546113fc91906156cb565b421061141a5760405162461bcd60e51b8152600401610e5d90615481565b608b546040516331a9108f60e11b81526004810183905233916001600160a01b031690636352211e9060240160206040518083038186803b15801561145e57600080fd5b505afa158015611472573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114969190614fe5565b6001600160a01b0316146114ec5760405162461bcd60e51b815260206004820152601c60248201527f4f776e6572206f662074686520746f6b656e206e6f742076616c6964000000006044820152606401610e5d565b607354606754608b546040516370a0823160e01b81526001600160a01b03918216600482015261010090920416906370a082319060240160206040518083038186803b15801561153b57600080fd5b505afa15801561154f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115739190615203565b10156115915760405162461bcd60e51b8152600401610e5d906155bd565b608d546001600160a01b03166115b95760405162461bcd60e51b8152600401610e5d90615586565b606c548251146115db5760405162461bcd60e51b8152600401610e5d90615603565b60005b825181101561167257600183828151811061160957634e487b7160e01b600052603260045260246000fd5b602002602001015114806116445750600283828151811061163a57634e487b7160e01b600052603260045260246000fd5b6020026020010151145b6116605760405162461bcd60e51b8152600401610e5d906154e1565b8061166a8161577c565b9150506115de565b5061167e338385613f1b565b505050565b607f602052816000526040600020818154811061169f57600080fd5b6000918252602090912001546001600160a01b03169150829050565b6116c3613ea1565b6001600160a01b0381166116e95760405162461bcd60e51b8152600401610e5d906154b8565b608b80546001600160a01b0319166001600160a01b0383169081179091556040519081527f6108b47cba05b58722d050a3a97e418ae97c856c7618de2bcc492be667a3f60d90602001610dfd565b60745460009081526078602052604081205460ff16801561176a57506074546000908152607b602052604090205460ff16155b80156117935750606d546074546000908152607a602052604090205461179091906156cb565b42115b905090565b6117a0613ea1565b60688190556040518181527f27b0d5e14ef1c5f5ffa1df2ddd834610ed6b755e7730c25a8a55df721f18c48490602001610dfd565b60006117df6130e0565b8015611793575060745460009081526079602052604090205460ff16806117935750506074541590565b60006074541161182b5760405162461bcd60e51b8152600401610e5d9061554f565b606d546074546000908152607a602052604090205461184a91906156cb565b42106118685760405162461bcd60e51b8152600401610e5d90615481565b6073546067546040516370a0823160e01b81523360048201526101009091046001600160a01b0316906370a082319060240160206040518083038186803b1580156118b257600080fd5b505afa1580156118c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ea9190615203565b10156119085760405162461bcd60e51b8152600401610e5d90615518565b607354606754604051636eb1769f60e11b81523360048201523060248201526101009091046001600160a01b03169063dd62ed3e9060440160206040518083038186803b15801561195857600080fd5b505afa15801561196c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119909190615203565b10156119ae5760405162461bcd60e51b8152600401610e5d9061564f565b608d546001600160a01b03166119d65760405162461bcd60e51b8152600401610e5d90615586565b6000606c5467ffffffffffffffff811115611a0157634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611a2a578160200160208202803683370190505b50905060005b8151811015611a78576000828281518110611a5b57634e487b7160e01b600052603260045260246000fd5b602090810291909101015280611a708161577c565b915050611a30565b50611a84338383614120565b5050565b60008211611ad85760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d757374206265206d6f7265207468656e207a65726f0000006044820152606401610e5d565b607454811015611b2a5760405162461bcd60e51b815260206004820152601860248201527f43616e74207075742066756e647320696e2061207061737400000000000000006044820152606401610e5d565b60008181526079602052604090205460ff1615611b7e5760405162461bcd60e51b815260206004820152601260248201527114d9585cdbdb881a5cc8199a5b9a5cda195960721b6044820152606401610e5d565b606754604051636eb1769f60e11b8152336004820152306024820152839161010090046001600160a01b03169063dd62ed3e9060440160206040518083038186803b158015611bcc57600080fd5b505afa158015611be0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c049190615203565b1015611c225760405162461bcd60e51b8152600401610e5d9061564f565b6067546040516370a0823160e01b8152336004820152839161010090046001600160a01b0316906370a082319060240160206040518083038186803b158015611c6a57600080fd5b505afa158015611c7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ca29190615203565b1015611cc05760405162461bcd60e51b8152600401610e5d90615518565b611a84338383614276565b600054610100900460ff16611ce65760005460ff1615611cea565b303b155b611d4d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610e5d565b600054610100900460ff16158015611d6f576000805461ffff19166101011790555b611d788c6111b7565b611d80613e12565b60688b9055606980546001600160a01b0319166001600160a01b038c81169190911790915560678054610100600160a81b031916610100928c1692909202919091179055606c889055606d879055606e869055606f859055607384905560718390556070805460ff19168315151790558015611e02576000805461ff00191690555b505050505050505050505050565b611e18613ea1565b606f8190556040518181527fa77bc9caf9e1866a037c548f914bf5364f616a25a83e790d7e5eb25b9b1f973d90602001610dfd565b611e55613ea1565b60718190556040518181527f42cf2ba9639353bb5b5c8669ab5385086a4d3c43d616b536891ea25dcd3aa6c390602001610dfd565b611e92613ea1565b6001600160a01b038116611eb85760405162461bcd60e51b8152600401610e5d906154b8565b608d80546001600160a01b0319166001600160a01b0383169081179091556040519081527f30ac338f7c3584da96e407b0602552dd24d9eb4888779542fe721159f00a800190602001610dfd565b6000828152607960205260409020548290829060ff16611f685760405162461bcd60e51b815260206004820152601860248201527f526f79616c65206d7573742062652066696e69736865642100000000000000006044820152606401610e5d565b608d546040516331a9108f60e11b81526004810183905233916001600160a01b031690636352211e9060240160206040518083038186803b158015611fac57600080fd5b505afa158015611fc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe49190614fe5565b6001600160a01b0316146120295760405162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b6044820152606401610e5d565b61203381836135e9565b6120745760405162461bcd60e51b8152602060048201526012602482015271546f6b656e206973206e6f7420616c69766560701b6044820152606401610e5d565b61207f338585614332565b50505050565b61208d613ea1565b606980546001600160a01b0319166001600160a01b0383169081179091556040519081527f1b08d49ba5aac4a37b065dc5e3dcd1dc46473d4dacb793bc25902199734ae9f190602001610dfd565b6001546001600160a01b031633146121535760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b6064820152608401610e5d565b60005460015460408051620100009093046001600160a01b03908116845290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a1600180546000805462010000600160b01b0319166001600160a01b03831662010000021790556001600160a01b0319169055565b6074546000908152607b602052604081205460ff16801561220b575060745460009081526079602052604090205460ff16155b80156117935750606f546074546000908152607e602052604090205461179091906156cb565b612239613ea1565b60005b835181101561232257608b5484516001600160a01b0390911690633302eb639086908490811061227c57634e487b7160e01b600052603260045260246000fd5b60200260200101518584815181106122a457634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b81526004016122dd9291906001600160a01b03929092168252602082015260400190565b600060405180830381600087803b1580156122f757600080fd5b505af115801561230b573d6000803e3d6000fd5b50505050808061231a9061577c565b91505061223c565b506067546040516370a0823160e01b815230600482015261167e9183916101009091046001600160a01b0316906370a082319060240160206040518083038186803b15801561237057600080fd5b505afa158015612384573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123a89190615203565b60675461010090046001600160a01b03169190614593565b806000607454116123e35760405162461bcd60e51b8152600401610e5d9061554f565b606d546074546000908152607a602052604090205461240291906156cb565b42106124205760405162461bcd60e51b8152600401610e5d90615481565b608b546040516331a9108f60e11b81526004810183905233916001600160a01b031690636352211e9060240160206040518083038186803b15801561246457600080fd5b505afa158015612478573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061249c9190614fe5565b6001600160a01b0316146124f25760405162461bcd60e51b815260206004820152601c60248201527f4f776e6572206f662074686520746f6b656e206e6f742076616c6964000000006044820152606401610e5d565b607354606754608b546040516370a0823160e01b81526001600160a01b03918216600482015261010090920416906370a082319060240160206040518083038186803b15801561254157600080fd5b505afa158015612555573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125799190615203565b10156125975760405162461bcd60e51b8152600401610e5d906155bd565b608d546001600160a01b03166125bf5760405162461bcd60e51b8152600401610e5d90615586565b6000606c5467ffffffffffffffff8111156125ea57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015612613578160200160208202803683370190505b50905060005b815181101561266157600082828151811061264457634e487b7160e01b600052603260045260246000fd5b6020908102919091010152806126598161577c565b915050612619565b5061167e338285613f1b565b600181148061267c5750600281145b6126985760405162461bcd60e51b8152600401610e5d906154e1565b608d546040516331a9108f60e11b8152600481018490526001600160a01b0390911690636352211e9060240160206040518083038186803b1580156126dc57600080fd5b505afa1580156126f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127149190614fe5565b6001600160a01b0316336001600160a01b0316146127635760405162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b6044820152606401610e5d565b600082815260906020526040902054607454146127b15760405162461bcd60e51b815260206004820152600c60248201526b2bb937b7339039b2b0b9b7b760a11b6044820152606401610e5d565b6074546000908152607b602052604090205460ff166128125760405162461bcd60e51b815260206004820152601b60248201527f436f6d7065746974696f6e206e6f7420737461727465642079657400000000006044820152606401610e5d565b60745460009081526079602052604090205460ff161561286b5760405162461bcd60e51b815260206004820152601460248201527310dbdb5c195d1a5d1a5bdb88199a5b9a5cda195960621b6044820152606401610e5d565b60008281526093602090815260408083206074548452607783528184205484529091529020548114156128d05760405162461bcd60e51b815260206004820152600d60248201526c29b0b6b2903837b9b4ba34b7b760991b6044820152606401610e5d565b607454600090815260776020526040902054600114612936576128f2826136bf565b6129365760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881b9bc81b1bdb99d95c881d985b1a59605a1b6044820152606401610e5d565b606e546074546000908152607e602052604090205461295591906156cb565b42106129a35760405162461bcd60e51b815260206004820152601a60248201527f526f756e6420706f736974696f6e696e672066696e69736865640000000000006044820152606401610e5d565b600082815260936020908152604080832060745484526077835281842054845290915290205460011415612a13576074546000908152608460209081526040808320607783528184205484528252808320600184529091528120805491612a0983615765565b9190505550612a7f565b600082815260936020908152604080832060745484526077835281842054845290915290205460021415612a7f576074546000908152608460209081526040808320607783528184205484528252808320600284529091528120805491612a7983615765565b91905055505b607454600081815260776020526040902054611a8491339184866145f6565b612aa6613ea1565b6001600160a01b038116612acc5760405162461bcd60e51b8152600401610e5d906154b8565b60678054610100600160a81b0319166101006001600160a01b038416908102919091179091556040519081527fc69f61e4bef149d13a9bb253756b4b6e0b1c2cd402efb69dfec416c6201d0bf190602001610dfd565b612b2a613ea1565b606e8190556040518181527fb89d563deee12192bafa00ba8fdf7f63a788a28b71b24f3a10a20a6b0cc10cf490602001610dfd565b6000818152607f6020908152604091829020805483518184028101840190945280845260609392830182828015612bbf57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612ba1575b50505050509050919050565b606d546074546000908152607a6020526040902054612bea91906156cb565b4211612c485760405162461bcd60e51b815260206004820152602760248201527f43616e277420737461727420756e74696c207369676e757020706572696f64206044820152666578706972657360c81b6064820152608401610e5d565b6074546000908152608e6020526040902054612cb25760405162461bcd60e51b8152602060048201526024808201527f43616e206e6f742073746172742c206e6f20746f6b656e7320696e206120736560448201526330b9b7b760e11b6064820152608401610e5d565b6074546000908152607b602052604090205460ff1615612d065760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e481cdd185c9d1959608a1b6044820152606401610e5d565b60745460009081526078602052604090205460ff16612d605760405162461bcd60e51b815260206004820152601660248201527514d9585cdbdb881b9bdd081cdd185c9d1959081e595d60521b6044820152606401610e5d565b6069546074546000908152608c6020526040908190205490516315905ec160e31b81526001600160a01b039092169163ac82f60891612da59160040190815260200190565b60206040518083038186803b158015612dbd57600080fd5b505afa158015612dd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612df59190615203565b6072908155607480546000908152607760208181526040808420600190819055955485548552608283528185209383528185205485529282528084209290925583548352607b8152818320805460ff191690951790945582548252607e909352828120429055606f54915481529190912054612e7191906156cb565b607480546000908152607d602090815260408083209490945582548252608e80825284832054609283528584206077845286852054855283528584205583548352607580835285842054608a8452868520559354808452908252848320549382529184902054845192835290820192909252918201527fde7ce02c763c724641de72079afa21a2e61b2e7dc3dc5df889e3c225c462b6b3906060015b60405180910390a1565b6000546201000090046001600160a01b0316331480612f395750612f396130e0565b612fab5760405162461bcd60e51b815260206004820152603c60248201527f4f6e6c79206f776e65722063616e20737461727420736561736f6e206265666f60448201527f7265207061757365206265747765656e2074776f20736561736f6e73000000006064820152608401610e5d565b60745460009081526079602052604090205460ff1680612fcb5750607454155b6130175760405162461bcd60e51b815260206004820181905260248201527f50726576696f757320736561736f6e206d7573742062652066696e69736865646044820152606401610e5d565b6074546130259060016156cb565b60748181556000918252607a602090815260408084204290558254845260788252808420805460ff1916600117905560685483548552608c90925292839020555490517f896723e255001c5a729d00297f5b642ae4837851f3917c5caeb6c6533881bd0f91612f0d9190815260200190565b61309f613ea1565b6070805460ff19168215159081179091556040519081527fdb1bc95d8deaf5e2eb3d040301648dfb70dc5f899f8179f0b055161604301af490602001610dfd565b60705460009060ff16801561179357506071546074546000908152607a602052604090205461179091906156cb565b613117613ea1565b60738190556040518181527f035ecfaccb0f010efe9b303e71a63f162cd8edb06495d7cd7ee4b5a2fa79e0aa90602001610dfd565b60006074541161316e5760405162461bcd60e51b8152600401610e5d9061554f565b606d546074546000908152607a602052604090205461318d91906156cb565b42106131ab5760405162461bcd60e51b8152600401610e5d90615481565b6073546067546040516370a0823160e01b81523360048201526101009091046001600160a01b0316906370a082319060240160206040518083038186803b1580156131f557600080fd5b505afa158015613209573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061322d9190615203565b101561324b5760405162461bcd60e51b8152600401610e5d90615518565b607354606754604051636eb1769f60e11b81523360048201523060248201526101009091046001600160a01b03169063dd62ed3e9060440160206040518083038186803b15801561329b57600080fd5b505afa1580156132af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132d39190615203565b10156132f15760405162461bcd60e51b8152600401610e5d9061564f565b608d546001600160a01b03166133195760405162461bcd60e51b8152600401610e5d90615586565b6000606c5467ffffffffffffffff81111561334457634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561336d578160200160208202803683370190505b50905060005b81518110156111a757600082828151811061339e57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152806133b38161577c565b915050613373565b6133c3613ea1565b6001600160a01b0381166133e95760405162461bcd60e51b8152600401610e5d906154b8565b600154600160a81b900460ff16156134395760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481d1c985b9cd9995c9c9959606a1b6044820152606401610e5d565b600080546001600160a01b038381166201000081810262010000600160b01b031990941693909317938490556001805460ff60a81b1916600160a81b1790556040805193909404909116825260208201527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9101610dfd565b6134ba613ea1565b6001600160a01b0381166134e05760405162461bcd60e51b8152600401610e5d906154b8565b606a80546001600160a01b0319166001600160a01b0383169081179091556040519081527fabe8e0bc29b131a37965174dcb67ce5262f7afd4afca1456fdffa107ccc2c62f90602001610dfd565b6000600160745411156135b85760745460009081526080602090815260408083206001600160a01b03861684529091529020541515806135b25750600060806000600160745461357e9190615722565b81526020019081526020016000206000846001600160a01b03166001600160a01b0316815260200190815260200160002054115b92915050565b5060745460009081526080602090815260408083206001600160a01b0390941683529290522054151590565b919050565b6000828152609060205260408120548214613606575060006135b2565b600082815260776020526040902054600110156136a0576000828152608160209081526040808320607790925282205490919061364590600190615722565b815260200190815260200160002054609360008581526020019081526020016000206000600160776000878152602001908152602001600020546136899190615722565b8152602001908152602001600020541490506135b2565b5060009081526091602090815260408083209383529290522054151590565b600081815260906020526040812054607454146136de57506000919050565b60745460009081526077602052604090205460011015613780576074546000908152608160209081526040808320607790925282205490919061372390600190615722565b8152602001908152602001600020546093600084815260200190815260200160002060006001607760006074548152602001908152602001600020546137699190615722565b815260200190815260200160002054149050919050565b5060745460009081526091602090815260408083209383529290522054151590565b6000818152608f6020908152604091829020805483518184028101840190945280845260609392830182828015612bbf57602002820191906000526020600020905b8154815260200190600101908083116137e45750505050509050919050565b6074546000908152607b602052604090205460ff166138645760405162461bcd60e51b815260206004820152601b60248201527f436f6d7065746974696f6e206e6f7420737461727465642079657400000000006044820152606401610e5d565b60745460009081526079602052604090205460ff16156138bd5760405162461bcd60e51b815260206004820152601460248201527310dbdb5c195d1a5d1a5bdb88199a5b9a5cda195960621b6044820152606401610e5d565b606f546074546000908152607e60205260409020546138dc91906156cb565b42116139225760405162461bcd60e51b815260206004820152601560248201527410d85b89dd0818db1bdcd9481c9bdd5b99081e595d605a1b6044820152606401610e5d565b607454600090815260776020526040812054906139408260016156cb565b6069546074546000908152608c60205260408082205490516315905ec160e31b81526004810191909152929350916001600160a01b039091169063ac82f6089060240160206040518083038186803b15801561399b57600080fd5b505afa1580156139af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139d39190615203565b905060008111613a305760405162461bcd60e51b815260206004820152602260248201527f4f7261636c65205072696365206d757374206265206c6172676572207468616e604482015261020360f41b6064820152608401610e5d565b6072546074546000908152608360209081526040808320878452909152902082905580821015613a61576001613a64565b60025b607454600090815260816020908152604080832088845290915281209190915581831015613a93576002613a96565b60015b6072849055607454600090815260816020908152604080832089845290915281205491925090600214613aee576074546000908152608460209081526040808320898452825280832060018452909152902054613b15565b60745460009081526084602090815260408083208984528252808320600284529091529020545b9050606c548511613b4057607454600090815260926020908152604080832088845290915290208190555b6074546000908152609260209081526040808320898452909152902054613b68908290615722565b60745460009081526086602090815260408083208a8452909152902055613b8f82866147cf565b8015613bc55760748054600090815260776020908152604080832089905560725493548352608282528083208984529091529020555b606c54851180613bd6575060018111155b15613d33576074546000908152607960205260408120805460ff1916600117905581613c2857506074546000908152609260209081526040808320898452909152902054613c2381614a7a565b613c33565b5080613c3381614a7a565b607480546000908152607c602090815260408083204290559254808352608182528383208b8452825283832054818452608383528484208c8552835284842054828552608684528585208d86528452938590205485519283529282018c90528185015260608101889052608081019290925260a082015260c0810183905290517fe1875519b9a7a18c7b2b7cb4dd3c932ec04552f4aeb2d97869ee88e2e24ac4009181900360e00190a160745460008181526089602090815260409182902054825193845290830184905282820152517f7f923b15cb705db283005f500abb87c8cc2968d2d0801b44bbd5ed9c64205e199181900360600190a150613e0a565b607480546000908152607e6020526040808220429055606f5492548252902054613d5d91906156cb565b607480546000908152607d60209081526040808320949094559154808252608183528382208a8352835283822054818352608384528483208b8452845284832054828452608685528584208c85528552928590205485519283529382018b90529381019390935260608301869052608083015260a082015260c081018290527fe1875519b9a7a18c7b2b7cb4dd3c932ec04552f4aeb2d97869ee88e2e24ac4009060e00160405180910390a15b505050505050565b60675460ff1615613e5b5760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610e5d565b6067805460ff19166001908117909155606655565b608f6020528160005260406000208181548110613e8c57600080fd5b90600052602060002001600091509150505481565b6000546201000090046001600160a01b03163314613f195760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b6064820152608401610e5d565b565b608d546040516340d097c360e01b81526001600160a01b03858116600483015260009216906340d097c390602401602060405180830381600087803b158015613f6357600080fd5b505af1158015613f77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f9b9190615203565b60748054600083815260906020908152604080832084905592825260918152828220858352815282822042905583548252608f815282822080546001810182559083528183200185905592548152608e9092528120805492935090613fff8361577c565b909155505060745460009081526080602090815260408083206001600160a01b038816845290915281204290555b83518110156140b95783818151811061405657634e487b7160e01b600052603260045260246000fd5b60200260200101516000146140a7576140a78560745483600161407991906156cb565b87858151811061409957634e487b7160e01b600052603260045260246000fd5b6020026020010151866145f6565b806140b18161577c565b91505061402d565b5081156140cf576140ca8483614b6e565b6140db565b6140db84607354614c04565b7fc4540a50fb7ace4c340742766a40e199ad6e80e36364529749f7a17e96e21a808482607454866040516141129493929190615368565b60405180910390a150505050565b608d546040516340d097c360e01b81526001600160a01b03848116600483015260009216906340d097c390602401602060405180830381600087803b15801561416857600080fd5b505af115801561417c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141a09190615203565b60748054600083815260906020908152604080832084905592825260918152828220858352815282822042905583548252608f815282822080546001810182559083528183200185905592548152608e90925281208054929350906142048361577c565b909155505060745460009081526080602090815260408083206001600160a01b0387168452909152902042905560735461423f908590614c04565b7fc4540a50fb7ace4c340742766a40e199ad6e80e36364529749f7a17e96e21a808382607454856040516141129493929190615368565b6000818152607560205260409020546142909083906156cb565b600082815260756020908152604080832093909355608a905220546142b69083906156cb565b6000828152608a60205260409020556067546142e29061010090046001600160a01b0316843085614c88565b604080516001600160a01b0385168152602081018390529081018390527f7a5e77cafc1cb775021040156b9537b95c869bfbd7d19b3042d2eb46a65b57e8906060015b60405180910390a1505050565b6000828152607560205260409020546143825760405162461bcd60e51b815260206004820152601260248201527114995dd85c99081b5d5cdd081899481cd95d60721b6044820152606401610e5d565b60008181526095602052604090205460ff16156143e15760405162461bcd60e51b815260206004820152601860248201527f52657761726420616c726561647920636f6c6c656374656400000000000000006044820152606401610e5d565b600082815260896020526040908190205460675491516370a0823160e01b8152306004820152909161010090046001600160a01b0316906370a082319060240160206040518083038186803b15801561443957600080fd5b505afa15801561444d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144719190615203565b10156144bf5760405162461bcd60e51b815260206004820152601e60248201527f4e6f7420656e6f7567682062616c616e636520666f72207265776172647300006044820152606401610e5d565b6000818152609560209081526040808320805460ff191660011790558483526089825280832054608a909252909120546144f99190615722565b6000838152608a6020908152604080832093909355608990522054606754614532916101009091046001600160a01b0316908590614593565b6000828152608960209081526040918290205482518581526001600160a01b0387169281019290925291810183905260608101919091527f18323b848841b45209f9d1c48e6219e71d3175a1edd94d812c8f1de08637759d90608001614325565b6040516001600160a01b03831660248201526044810182905261167e90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614cc0565b60008481526087602090815260408083206001600160a01b038916845282528083208684528252808320859055838352609382528083208684528252808320859055838352609490915290205483116146b85760408051808201825284815260208082018590526000848152609490915291909120614676600186615722565b8154811061469457634e487b7160e01b600052603260045260246000fd5b600091825260209182902083516002909202019081559101516001909101556146fd565b60008181526094602090815260408083208151808301909252868252818301868152815460018181018455928652939094209151600290930290910191825591519101555b600282141561473d576000848152608460209081526040808320868452825280832085845290915281208054916147338361577c565b9190505550614770565b60008481526084602090815260408083208684528252808320858452909152812080549161476a8361577c565b91905055505b604080516001600160a01b03871681526020810183905290810185905260608101849052608081018390527f56769e0b5cef558268d0f33b035112c34fdeef21a052a93572023d4afab79d2c9060a00160405180910390a15050505050565b6074546000908152608f602090815260408083208054825181850281018501909352808352919290919083018282801561482857602002820191906000526020600020905b815481526020019060010190808311614814575b5050505050905060005b815181101561207f57836093600084848151811061486057634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060006001866148859190615722565b81526020019081526020016000205414806148f75750609360008383815181106148bf57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060006001856148e49190615722565b8152602001908152602001600020546000145b15614a685760016093600084848151811061492257634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020600085815260200190815260200160002054141561498b576074546000908152608460209081526040808320868452825280832060018452909152812080549161498183615765565b9190505550614a16565b6002609360008484815181106149b157634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000858152602001908152602001600020541415614a165760745460009081526084602090815260408083208684528252808320600284529091528120805491614a1083615765565b91905055505b600060936000848481518110614a3c57634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000858152602001908152602001600020819055505b80614a728161577c565b915050614832565b60745460009081526079602052604090205460ff16614adb5760405162461bcd60e51b815260206004820152601760248201527f526f79616c65206d7573742062652066696e69736865640000000000000000006044820152606401610e5d565b60008111614b3c5760405162461bcd60e51b815260206004820152602860248201527f5468657265206973206e6f20616c69766520706c6179657273206c65667420696044820152676e20526f79616c6560c01b6064820152608401610e5d565b607454600090815260756020526040902054614b599082906156e3565b60745460009081526089602052604090205550565b608b54604051633302eb6360e01b81526001600160a01b0384811660048301526024820184905290911690633302eb6390604401600060405180830381600087803b158015614bbc57600080fd5b505af1158015614bd0573d6000803e3d6000fd5b505050506073546075600060745481526020019081526020016000206000828254614bfb91906156cb565b90915550505050565b600080614c1083614d92565b90925090508015614c3f57606a54606754614c3f916001600160a01b0361010090920482169187911684614c88565b606754614c5c9061010090046001600160a01b0316853085614c88565b60745460009081526075602052604081208054849290614c7d9084906156cb565b909155505050505050565b6040516001600160a01b038085166024830152831660448201526064810182905261207f9085906323b872dd60e01b906084016145bf565b6000614d15826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614dd59092919063ffffffff16565b80519091501561167e5780806020019051810190614d3391906151cf565b61167e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610e5d565b600080600080606b541115614dbe576064606b5485614db19190615703565b614dbb91906156e3565b90505b6000614dca8286615722565b959194509092505050565b6060614de48484600085614dee565b90505b9392505050565b606082471015614e4f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610e5d565b843b614e9d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610e5d565b600080866001600160a01b03168587604051614eb9919061534c565b60006040518083038185875af1925050503d8060008114614ef6576040519150601f19603f3d011682016040523d82523d6000602084013e614efb565b606091505b5091509150614f0b828286614f16565b979650505050505050565b60608315614f25575081614de7565b825115614f355782518084602001fd5b8160405162461bcd60e51b8152600401610e5d919061544e565b80356135e4816157c3565b600082601f830112614f6a578081fd5b81356020614f7f614f7a836156a7565b615676565b80838252828201915082860187848660051b8901011115614f9e578586fd5b855b85811015614fbc57813584529284019290840190600101614fa0565b5090979650505050505050565b600060208284031215614fda578081fd5b8135614de7816157c3565b600060208284031215614ff6578081fd5b8151614de7816157c3565b60008060008060008060008060008060006101608c8e031215615022578687fd5b8b3561502d816157c3565b9a5060208c0135995060408c0135615044816157c3565b985060608c0135615054816157c3565b975060808c0135965060a08c0135955060c08c0135945060e08c013593506101008c013592506101208c013591506101408c0135615091816157d8565b809150509295989b509295989b9093969950565b6000806000606084860312156150b9578283fd5b833567ffffffffffffffff808211156150d0578485fd5b818601915086601f8301126150e3578485fd5b813560206150f3614f7a836156a7565b8083825282820191508286018b848660051b890101111561511257898afd5b8996505b8487101561513d578035615129816157c3565b835260019690960195918301918301615116565b5097505087013592505080821115615153578384fd5b5061516086828701614f5a565b92505061516f60408501614f4f565b90509250925092565b600060208284031215615189578081fd5b813567ffffffffffffffff81111561519f578182fd5b6151ab84828501614f5a565b949350505050565b6000602082840312156151c4578081fd5b8135614de7816157d8565b6000602082840312156151e0578081fd5b8151614de7816157d8565b6000602082840312156151fc578081fd5b5035919050565b600060208284031215615214578081fd5b5051919050565b6000806040838503121561522d578182fd5b82359150602083013561523f816157c3565b809150509250929050565b60008060006060848603121561525e578081fd5b833592506020840135615270816157c3565b929592945050506040919091013590565b60008060408385031215615293578182fd5b82359150602083013567ffffffffffffffff8111156152b0578182fd5b6152bc85828601614f5a565b9150509250929050565b600080604083850312156152d8578182fd5b50508035926020909101359150565b6000806000606084860312156152fb578081fd5b505081359360208301359350604090920135919050565b6000815180845260208085019450808401835b8381101561534157815187529582019590820190600101615325565b509495945050505050565b6000825161535e818460208701615739565b9190910192915050565b60018060a01b03851681528360208201528260408201526080606082015260006153956080830184615312565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156153e05783516001600160a01b0316835292840192918401916001016153bb565b50909695505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561542e57815180518552860151868501529284019290850190600101615409565b5091979650505050505050565b602081526000614de76020830184615312565b602081526000825180602084015261546d816040850160208701615739565b601f01601f19169190910160400192915050565b6020808252601a908201527f5369676e20757020706572696f64206861732065787069726564000000000000604082015260600190565b6020808252600f908201526e496e76616c6964206164647265737360881b604082015260600190565b6020808252601b908201527f506f736974696f6e2063616e206f6e6c792062652031206f7220320000000000604082015260600190565b60208082526019908201527f4e6f20656e6f756768207355534420666f722062757920696e00000000000000604082015260600190565b60208082526017908201527f496e697469616c697a6520666972737420736561736f6e000000000000000000604082015260600190565b6020808252601d908201527f5468616c6573526f79616c652050617373706f7274206e6f7420736574000000604082015260600190565b60208082526026908201527f4e6f20656e6f7567682073555344206f6e20726f79616c65207061737320636f6040820152651b9d1c9858dd60d21b606082015260800190565b6020808252602c908201527f4e756d626572206f6620706f736974696f6e732065786365656473206e756d6260408201526b6572206f6620726f756e647360a01b606082015260800190565b6020808252600d908201526c27379030b63637bbb0b731b29760991b604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561569f5761569f6157ad565b604052919050565b600067ffffffffffffffff8211156156c1576156c16157ad565b5060051b60200190565b600082198211156156de576156de615797565b500190565b6000826156fe57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561571d5761571d615797565b500290565b60008282101561573457615734615797565b500390565b60005b8381101561575457818101518382015260200161573c565b8381111561207f5750506000910152565b60008161577457615774615797565b506000190190565b600060001982141561579057615790615797565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146111b457600080fd5b80151581146111b457600080fdfea26469706673582212208308009357c3495c88e761e8fdeacb6bd9e0f5592746801ff3db352069cda8ca64736f6c63430008040033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits

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