Contract Overview
Balance:
0 ETH
EtherValue:
$0.00
My Name Tag:
Not Available, login to update
Txn Hash | Method |
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
0x39f85e189155d4f0ccbff7653cd69e5666034f1b226d5675a51cfaa83571fe86 | 0x60806040 | 13260740 | 460 days 6 hrs ago | 0x9841484a4a6c0b61c4eea71376d76453fd05ec9c | IN | Create: ThalesRoyale | 0 ETH | 0.007793612174 |
[ Download CSV Export ]
Contract Name:
ThalesRoyale
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// 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); } /* ========== 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); }
// 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"); } } }
// 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; }
// 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)); } }
// 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); }
// 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; }
// 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); }
// 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); }
// 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; }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; interface IPassportPosition { struct Position { uint round; uint position; } }
// 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"); } }
// 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); }
// 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); } } } }
// 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; }
// 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; }
// 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); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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":[],"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"}]
Contract Creation Code
608060405234801561001057600080fd5b50615566806100206000396000f3fe608060405234801561001057600080fd5b50600436106105195760003560e01c80637af55eb7116102a4578063babd48b811610172578063d9e692d9116100d9578063ea78fec111610092578063ea78fec114610d20578063ebc7977214610d4b578063f7c618c114610d53578063f839bb4c14610d6b578063fb33cf5d14610d7e578063fefc7ae014610d9e57600080fd5b8063d9e692d914610c6f578063dc66cac314610c8f578063df6cbb7814610cba578063e0c964ed14610ccd578063e179811314610ced578063e278fe6f14610d1857600080fd5b8063cbe8ad821161012b578063cbe8ad8214610be2578063ce4b7eeb14610bf5578063cf5941de14610c08578063d165dac214610c33578063d4e562ac14610c3c578063d55476d714610c4f57600080fd5b8063babd48b814610b6a578063bc39cb9a14610b98578063bf96ae6314610bab578063c3b83f5f14610bb3578063c402055f14610bc6578063c50b0fb014610bd957600080fd5b80639e1698a911610216578063a99c6ad1116101cf578063a99c6ad114610ad8578063ad6b2a8b14610aeb578063b6ceb61f14610b1c578063b7479acf14610b24578063b929c12614610b4f578063b94964c414610b6257600080fd5b80639e1698a914610a71578063a105571b14610a91578063a131bdfe14610ab1578063a2e800ad14610aba578063a56d0ba114610ac3578063a7bc2e6614610acb57600080fd5b80638b649b94116102685780638b649b9414610a0a5780638da5cb5b14610a135780639118272614610a2c57806398e303f314610a355780639d1f048e14610a555780639d902a5514610a5e57600080fd5b80637af55eb71461099e5780637ce47b5c146109a65780638193fd08146109d157806386e327f1146109e45780638aee8127146109f757600080fd5b80633d8fb20f116103ec578063635ebf7e116103535780636ed252f81161030c5780636ed252f814610931578063718486911461093a578063724e78da1461094d5780637250272f14610960578063741bef1a1461098357806379ba50971461099657600080fd5b8063635ebf7e146108bf57806363bcbcb5146108d257806366a93433146108e5578063681312f5146108f8578063692c74791461090b5780636e1ed59a1461091e57600080fd5b806353a47bb7116103a557806353a47bb71461085a57806358e270271461086d5780635bc90b52146108765780635c975abb146108895780636169807d1461089457806362536e321461089c57600080fd5b80633d8fb20f146107ad57806342629f9b146107c057806342852535146107c85780634864c959146107eb57806348663e951461081c5780634d3e41191461082f57600080fd5b80631a06db68116104905780632d830cd5116104495780632d830cd5146107085780632df661341461071b5780632e5cb9931461074657806331390e0a1461075957806336a445fb146107795780633c9a25e4146107a457600080fd5b80631a06db68146106555780631ccd03ac146106755780631e05194f1461069557806324f4ec51146106c05780632624e0e8146106c8578063272cc28f146106e857600080fd5b80630bc77f10116104e25780630bc77f10146105b45780630d6ff9c6146105d4578063125b4d59146105e757806313af4035146106075780631627540c1461061a57806318f531c41461062d57600080fd5b8062c8d23a1461051e57806301df199514610533578063037cacd51461054e57806307b16e01146105815780630920eac7146105a1575b600080fd5b61053161052c366004614f8a565b610da6565b005b61053b600181565b6040519081526020015b60405180910390f35b61057161055c366004614f8a565b60786020526000908152604090205460ff1681565b6040519015158152602001610545565b61053b61058f366004614f8a565b607d6020526000908152604090205481565b6105316105af366004614f8a565b610dea565b6105c76105c2366004614f8a565b610e7d565b604051610545919061518b565b6105316105e2366004614f17565b610f03565b61053b6105f5366004614f8a565b60766020526000908152604090205481565b610531610615366004614e3b565b611199565b610531610628366004614e3b565b6112cd565b61064061063b366004615065565b611323565b60408051928352602083019190915201610545565b61053b610663366004614f8a565b60776020526000908152604090205481565b61053b610683366004614f8a565b60906020526000908152604090205481565b61053b6106a3366004615065565b609260209081526000928352604080842090915290825290205481565b61053b600281565b61053b6106d6366004614f8a565b60756020526000908152604090205481565b61053b6106f6366004614f8a565b607c6020526000908152604090205481565b610531610716366004614f8a565b61135f565b61053b610729366004615065565b608260209081526000928352604080842090915290825290205481565b610531610754366004615020565b61139c565b61053b610767366004614f8a565b60896020526000908152604090205481565b61078c610787366004615065565b611665565b6040516001600160a01b039091168152602001610545565b61053b60715481565b6105316107bb366004614e3b565b61169d565b610571611719565b6105716107d6366004614f8a565b60796020526000908152604090205460ff1681565b61053b6107f9366004615086565b608460209081526000938452604080852082529284528284209052825290205481565b606a5461078c906001600160a01b031681565b61053b61083d366004615065565b608560209081526000928352604080842090915290825290205481565b60015461078c906001600160a01b031681565b61053b606e5481565b610531610884366004614f8a565b61177a565b60345460ff16610571565b6105716117b7565b6105716108aa366004614f8a565b607b6020526000908152604090205460ff1681565b6105316108cd366004614e3b565b6117eb565b6105316108e0366004615065565b611a6a565b6105316108f3366004614e73565b611cad565b610531610906366004614f8a565b611df2565b610531610919366004614f8a565b611e2f565b61053161092c366004614e3b565b611e6c565b61053b60725481565b610531610948366004615065565b611ee8565b61053161095b366004614e3b565b612067565b61057161096e366004614f8a565b60956020526000908152604090205460ff1681565b60695461078c906001600160a01b031681565b6105316120bd565b6105716121ba565b61053b6109b4366004615065565b608660209081526000928352604080842090915290825290205481565b6105316109df366004614f8a565b612213565b6105316109f2366004615065565b6124c0565b610531610a05366004614e3b565b6128f1565b61053b606f5481565b60005461078c906201000090046001600160a01b031681565b61053b606d5481565b61053b610a43366004614f8a565b608c6020526000908152604090205481565b61053b60685481565b610531610a6c366004614f8a565b612975565b610a84610a7f366004614f8a565b6129b2565b604051610545919061513e565b61053b610a9f366004614f8a565b607e6020526000908152604090205481565b61053b606b5481565b61053b606c5481565b610531612a1e565b6070546105719060ff1681565b608b5461078c906001600160a01b031681565b61053b610af9366004614fe9565b608760209081526000938452604080852082529284528284209052825290205481565b610531612d6a565b61053b610b32366004615065565b609360209081526000928352604080842090915290825290205481565b610531610b5d366004614f52565b612eea565b610571612f33565b610571610b78366004614fba565b608860209081526000928352604080842090915290825290205460ff1681565b610531610ba6366004614f8a565b612f62565b610531612f9f565b610531610bc1366004614e3b565b61320e565b610531610bd4366004614e3b565b613305565b61053b60745481565b610571610bf0366004614e3b565b613381565b610571610c03366004615065565b613437565b61053b610c16366004615065565b608160209081526000928352604080842090915290825290205481565b61053b60735481565b610571610c4a366004614f8a565b61350d565b61053b610c5d366004614f8a565b608a6020526000908152604090205481565b61053b610c7d366004614f8a565b608e6020526000908152604090205481565b61053b610c9d366004615065565b609160209081526000928352604080842090915290825290205481565b608d5461078c906001600160a01b031681565b610ce0610cdb366004614f8a565b6135f0565b60405161054591906151da565b61053b610cfb366004614fba565b608060209081526000928352604080842090915290825290205481565b610531613651565b61053b610d2e366004615065565b608360209081526000928352604080842090915290825290205481565b610531613c60565b60675461078c9061010090046001600160a01b031681565b61053b610d79366004615065565b613cbe565b61053b610d8c366004614f8a565b607a6020526000908152604090205481565b60735461053b565b610dae613cef565b606d8190556040518181527f2b860533a97dcdf673f1953a047bce112334bde58a00ba9d1f21e5a280c484df906020015b60405180910390a150565b610df2613cef565b6064811115610e485760405162461bcd60e51b815260206004820152601e60248201527f4d75737420626520696e206265747765656e203020616e64203130302025000060448201526064015b60405180910390fd5b606b8190556040518181527f828cf2dd9b497be6f0d31a3dde2fb89c3a68bd9458a7e5cab177a35577ae8b0990602001610ddf565b606060946000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015610ef857838290600052602060002090600202016040518060400160405290816000820154815260200160018201548152505081526020019060010190610eb2565b505050509050919050565b600060745411610f255760405162461bcd60e51b8152600401610e3f906152ee565b606d546074546000908152607a6020526040902054610f449190615415565b4210610f625760405162461bcd60e51b8152600401610e3f90615220565b6073546067546040516370a0823160e01b81523360048201526101009091046001600160a01b0316906370a082319060240160206040518083038186803b158015610fac57600080fd5b505afa158015610fc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe49190614fa2565b10156110025760405162461bcd60e51b8152600401610e3f906152b7565b607354606754604051636eb1769f60e11b81523360048201523060248201526101009091046001600160a01b03169063dd62ed3e9060440160206040518083038186803b15801561105257600080fd5b505afa158015611066573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108a9190614fa2565b10156110a85760405162461bcd60e51b8152600401610e3f906153ee565b608d546001600160a01b03166110d05760405162461bcd60e51b8152600401610e3f90615325565b606c548151146110f25760405162461bcd60e51b8152600401610e3f906153a2565b60005b815181101561118957600182828151811061112057634e487b7160e01b600052603260045260246000fd5b6020026020010151148061115b5750600282828151811061115157634e487b7160e01b600052603260045260246000fd5b6020026020010151145b6111775760405162461bcd60e51b8152600401610e3f90615280565b80611181816154c6565b9150506110f5565b5061119633826000613d69565b50565b6001600160a01b0381166111ef5760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f742062652030000000000000006044820152606401610e3f565b600154600160a01b900460ff161561125b5760405162461bcd60e51b815260206004820152602960248201527f416c726561647920696e697469616c697a65642c20757365206e6f6d696e617460448201526832a732bba7bbb732b960b91b6064820152608401610e3f565b6001805460ff60a01b1916600160a01b179055600080546001600160a01b03831662010000810262010000600160b01b03199092169190911782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9101610ddf565b6112d5613cef565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290602001610ddf565b6094602052816000526040600020818154811061133f57600080fd5b600091825260209091206002909102018054600190910154909250905082565b611367613cef565b606c8190556040518181527f7e150dd869869de072c59e3f29f94d5574d07a69b27de280b3139896e26e5fd190602001610ddf565b816000607454116113bf5760405162461bcd60e51b8152600401610e3f906152ee565b606d546074546000908152607a60205260409020546113de9190615415565b42106113fc5760405162461bcd60e51b8152600401610e3f90615220565b608b546040516331a9108f60e11b81526004810183905233916001600160a01b031690636352211e9060240160206040518083038186803b15801561144057600080fd5b505afa158015611454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114789190614e57565b6001600160a01b0316146114ce5760405162461bcd60e51b815260206004820152601c60248201527f4f776e6572206f662074686520746f6b656e206e6f742076616c6964000000006044820152606401610e3f565b607354606754608b546040516370a0823160e01b81526001600160a01b03918216600482015261010090920416906370a082319060240160206040518083038186803b15801561151d57600080fd5b505afa158015611531573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115559190614fa2565b10156115735760405162461bcd60e51b8152600401610e3f9061535c565b608d546001600160a01b031661159b5760405162461bcd60e51b8152600401610e3f90615325565b606c548251146115bd5760405162461bcd60e51b8152600401610e3f906153a2565b60005b82518110156116545760018382815181106115eb57634e487b7160e01b600052603260045260246000fd5b602002602001015114806116265750600283828151811061161c57634e487b7160e01b600052603260045260246000fd5b6020026020010151145b6116425760405162461bcd60e51b8152600401610e3f90615280565b8061164c816154c6565b9150506115c0565b50611660338385613d69565b505050565b607f602052816000526040600020818154811061168157600080fd5b6000918252602090912001546001600160a01b03169150829050565b6116a5613cef565b6001600160a01b0381166116cb5760405162461bcd60e51b8152600401610e3f90615257565b608b80546001600160a01b0319166001600160a01b0383169081179091556040519081527f6108b47cba05b58722d050a3a97e418ae97c856c7618de2bcc492be667a3f60d90602001610ddf565b60745460009081526078602052604081205460ff16801561174c57506074546000908152607b602052604090205460ff16155b80156117755750606d546074546000908152607a60205260409020546117729190615415565b42115b905090565b611782613cef565b60688190556040518181527f27b0d5e14ef1c5f5ffa1df2ddd834610ed6b755e7730c25a8a55df721f18c48490602001610ddf565b60006117c1612f33565b8015611775575060745460009081526079602052604090205460ff16806117755750506074541590565b60006074541161180d5760405162461bcd60e51b8152600401610e3f906152ee565b606d546074546000908152607a602052604090205461182c9190615415565b421061184a5760405162461bcd60e51b8152600401610e3f90615220565b6073546067546040516370a0823160e01b81523360048201526101009091046001600160a01b0316906370a082319060240160206040518083038186803b15801561189457600080fd5b505afa1580156118a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118cc9190614fa2565b10156118ea5760405162461bcd60e51b8152600401610e3f906152b7565b607354606754604051636eb1769f60e11b81523360048201523060248201526101009091046001600160a01b03169063dd62ed3e9060440160206040518083038186803b15801561193a57600080fd5b505afa15801561194e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119729190614fa2565b10156119905760405162461bcd60e51b8152600401610e3f906153ee565b608d546001600160a01b03166119b85760405162461bcd60e51b8152600401610e3f90615325565b6000606c5467ffffffffffffffff8111156119e357634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611a0c578160200160208202803683370190505b50905060005b8151811015611a5a576000828281518110611a3d57634e487b7160e01b600052603260045260246000fd5b602090810291909101015280611a52816154c6565b915050611a12565b50611a66338383613f6e565b5050565b60008211611aba5760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d757374206265206d6f7265207468656e207a65726f0000006044820152606401610e3f565b607454811015611b0c5760405162461bcd60e51b815260206004820152601860248201527f43616e74207075742066756e647320696e2061207061737400000000000000006044820152606401610e3f565b60008181526079602052604090205460ff1615611b605760405162461bcd60e51b815260206004820152601260248201527114d9585cdbdb881a5cc8199a5b9a5cda195960721b6044820152606401610e3f565b606754604051636eb1769f60e11b8152336004820152306024820152839161010090046001600160a01b03169063dd62ed3e9060440160206040518083038186803b158015611bae57600080fd5b505afa158015611bc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611be69190614fa2565b1015611c045760405162461bcd60e51b8152600401610e3f906153ee565b6067546040516370a0823160e01b8152336004820152839161010090046001600160a01b0316906370a082319060240160206040518083038186803b158015611c4c57600080fd5b505afa158015611c60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c849190614fa2565b1015611ca25760405162461bcd60e51b8152600401610e3f906152b7565b611a663383836140c4565b600054610100900460ff16611cc85760005460ff1615611ccc565b303b155b611d2f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610e3f565b600054610100900460ff16158015611d51576000805461ffff19166101011790555b611d5a8c611199565b611d62613c60565b60688b9055606980546001600160a01b0319166001600160a01b038c81169190911790915560678054610100600160a81b031916610100928c1692909202919091179055606c889055606d879055606e869055606f859055607384905560718390556070805460ff19168315151790558015611de4576000805461ff00191690555b505050505050505050505050565b611dfa613cef565b606f8190556040518181527fa77bc9caf9e1866a037c548f914bf5364f616a25a83e790d7e5eb25b9b1f973d90602001610ddf565b611e37613cef565b60718190556040518181527f42cf2ba9639353bb5b5c8669ab5385086a4d3c43d616b536891ea25dcd3aa6c390602001610ddf565b611e74613cef565b6001600160a01b038116611e9a5760405162461bcd60e51b8152600401610e3f90615257565b608d80546001600160a01b0319166001600160a01b0383169081179091556040519081527f30ac338f7c3584da96e407b0602552dd24d9eb4888779542fe721159f00a800190602001610ddf565b6000828152607960205260409020548290829060ff16611f4a5760405162461bcd60e51b815260206004820152601860248201527f526f79616c65206d7573742062652066696e69736865642100000000000000006044820152606401610e3f565b608d546040516331a9108f60e11b81526004810183905233916001600160a01b031690636352211e9060240160206040518083038186803b158015611f8e57600080fd5b505afa158015611fa2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fc69190614e57565b6001600160a01b03161461200b5760405162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b6044820152606401610e3f565b6120158183613437565b6120565760405162461bcd60e51b8152602060048201526012602482015271546f6b656e206973206e6f7420616c69766560701b6044820152606401610e3f565b612061338585614180565b50505050565b61206f613cef565b606980546001600160a01b0319166001600160a01b0383169081179091556040519081527f1b08d49ba5aac4a37b065dc5e3dcd1dc46473d4dacb793bc25902199734ae9f190602001610ddf565b6001546001600160a01b031633146121355760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b6064820152608401610e3f565b60005460015460408051620100009093046001600160a01b03908116845290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a1600180546000805462010000600160b01b0319166001600160a01b03831662010000021790556001600160a01b0319169055565b6074546000908152607b602052604081205460ff1680156121ed575060745460009081526079602052604090205460ff16155b80156117755750606f546074546000908152607e60205260409020546117729190615415565b806000607454116122365760405162461bcd60e51b8152600401610e3f906152ee565b606d546074546000908152607a60205260409020546122559190615415565b42106122735760405162461bcd60e51b8152600401610e3f90615220565b608b546040516331a9108f60e11b81526004810183905233916001600160a01b031690636352211e9060240160206040518083038186803b1580156122b757600080fd5b505afa1580156122cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122ef9190614e57565b6001600160a01b0316146123455760405162461bcd60e51b815260206004820152601c60248201527f4f776e6572206f662074686520746f6b656e206e6f742076616c6964000000006044820152606401610e3f565b607354606754608b546040516370a0823160e01b81526001600160a01b03918216600482015261010090920416906370a082319060240160206040518083038186803b15801561239457600080fd5b505afa1580156123a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123cc9190614fa2565b10156123ea5760405162461bcd60e51b8152600401610e3f9061535c565b608d546001600160a01b03166124125760405162461bcd60e51b8152600401610e3f90615325565b6000606c5467ffffffffffffffff81111561243d57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015612466578160200160208202803683370190505b50905060005b81518110156124b457600082828151811061249757634e487b7160e01b600052603260045260246000fd5b6020908102919091010152806124ac816154c6565b91505061246c565b50611660338285613d69565b60018114806124cf5750600281145b6124eb5760405162461bcd60e51b8152600401610e3f90615280565b608d546040516331a9108f60e11b8152600481018490526001600160a01b0390911690636352211e9060240160206040518083038186803b15801561252f57600080fd5b505afa158015612543573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125679190614e57565b6001600160a01b0316336001600160a01b0316146125b65760405162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b6044820152606401610e3f565b600082815260906020526040902054607454146126045760405162461bcd60e51b815260206004820152600c60248201526b2bb937b7339039b2b0b9b7b760a11b6044820152606401610e3f565b6074546000908152607b602052604090205460ff166126655760405162461bcd60e51b815260206004820152601b60248201527f436f6d7065746974696f6e206e6f7420737461727465642079657400000000006044820152606401610e3f565b60745460009081526079602052604090205460ff16156126be5760405162461bcd60e51b815260206004820152601460248201527310dbdb5c195d1a5d1a5bdb88199a5b9a5cda195960621b6044820152606401610e3f565b60008281526093602090815260408083206074548452607783528184205484529091529020548114156127235760405162461bcd60e51b815260206004820152600d60248201526c29b0b6b2903837b9b4ba34b7b760991b6044820152606401610e3f565b607454600090815260776020526040902054600114612789576127458261350d565b6127895760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881b9bc81b1bdb99d95c881d985b1a59605a1b6044820152606401610e3f565b606e546074546000908152607e60205260409020546127a89190615415565b42106127f65760405162461bcd60e51b815260206004820152601a60248201527f526f756e6420706f736974696f6e696e672066696e69736865640000000000006044820152606401610e3f565b60008281526093602090815260408083206074548452607783528184205484529091529020546001141561286657607454600090815260846020908152604080832060778352818420548452825280832060018452909152812080549161285c836154af565b91905055506128d2565b6000828152609360209081526040808320607454845260778352818420548452909152902054600214156128d25760745460009081526084602090815260408083206077835281842054845282528083206002845290915281208054916128cc836154af565b91905055505b607454600081815260776020526040902054611a6691339184866143e1565b6128f9613cef565b6001600160a01b03811661291f5760405162461bcd60e51b8152600401610e3f90615257565b60678054610100600160a81b0319166101006001600160a01b038416908102919091179091556040519081527fc69f61e4bef149d13a9bb253756b4b6e0b1c2cd402efb69dfec416c6201d0bf190602001610ddf565b61297d613cef565b606e8190556040518181527fb89d563deee12192bafa00ba8fdf7f63a788a28b71b24f3a10a20a6b0cc10cf490602001610ddf565b6000818152607f6020908152604091829020805483518184028101840190945280845260609392830182828015612a1257602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116129f4575b50505050509050919050565b606d546074546000908152607a6020526040902054612a3d9190615415565b4211612a9b5760405162461bcd60e51b815260206004820152602760248201527f43616e277420737461727420756e74696c207369676e757020706572696f64206044820152666578706972657360c81b6064820152608401610e3f565b6074546000908152608e6020526040902054612b055760405162461bcd60e51b8152602060048201526024808201527f43616e206e6f742073746172742c206e6f20746f6b656e7320696e206120736560448201526330b9b7b760e11b6064820152608401610e3f565b6074546000908152607b602052604090205460ff1615612b595760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e481cdd185c9d1959608a1b6044820152606401610e3f565b60745460009081526078602052604090205460ff16612bb35760405162461bcd60e51b815260206004820152601660248201527514d9585cdbdb881b9bdd081cdd185c9d1959081e595d60521b6044820152606401610e3f565b6069546074546000908152608c6020526040908190205490516315905ec160e31b81526001600160a01b039092169163ac82f60891612bf89160040190815260200190565b60206040518083038186803b158015612c1057600080fd5b505afa158015612c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c489190614fa2565b6072908155607480546000908152607760208181526040808420600190819055955485548552608283528185209383528185205485529282528084209290925583548352607b8152818320805460ff191690951790945582548252607e909352828120429055606f54915481529190912054612cc49190615415565b607480546000908152607d602090815260408083209490945582548252608e80825284832054609283528584206077845286852054855283528584205583548352607580835285842054608a8452868520559354808452908252848320549382529184902054845192835290820192909252918201527fde7ce02c763c724641de72079afa21a2e61b2e7dc3dc5df889e3c225c462b6b3906060015b60405180910390a1565b6000546201000090046001600160a01b0316331480612d8c5750612d8c612f33565b612dfe5760405162461bcd60e51b815260206004820152603c60248201527f4f6e6c79206f776e65722063616e20737461727420736561736f6e206265666f60448201527f7265207061757365206265747765656e2074776f20736561736f6e73000000006064820152608401610e3f565b60745460009081526079602052604090205460ff1680612e1e5750607454155b612e6a5760405162461bcd60e51b815260206004820181905260248201527f50726576696f757320736561736f6e206d7573742062652066696e69736865646044820152606401610e3f565b607454612e78906001615415565b60748181556000918252607a602090815260408084204290558254845260788252808420805460ff1916600117905560685483548552608c90925292839020555490517f896723e255001c5a729d00297f5b642ae4837851f3917c5caeb6c6533881bd0f91612d609190815260200190565b612ef2613cef565b6070805460ff19168215159081179091556040519081527fdb1bc95d8deaf5e2eb3d040301648dfb70dc5f899f8179f0b055161604301af490602001610ddf565b60705460009060ff16801561177557506071546074546000908152607a60205260409020546117729190615415565b612f6a613cef565b60738190556040518181527f035ecfaccb0f010efe9b303e71a63f162cd8edb06495d7cd7ee4b5a2fa79e0aa90602001610ddf565b600060745411612fc15760405162461bcd60e51b8152600401610e3f906152ee565b606d546074546000908152607a6020526040902054612fe09190615415565b4210612ffe5760405162461bcd60e51b8152600401610e3f90615220565b6073546067546040516370a0823160e01b81523360048201526101009091046001600160a01b0316906370a082319060240160206040518083038186803b15801561304857600080fd5b505afa15801561305c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130809190614fa2565b101561309e5760405162461bcd60e51b8152600401610e3f906152b7565b607354606754604051636eb1769f60e11b81523360048201523060248201526101009091046001600160a01b03169063dd62ed3e9060440160206040518083038186803b1580156130ee57600080fd5b505afa158015613102573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131269190614fa2565b10156131445760405162461bcd60e51b8152600401610e3f906153ee565b608d546001600160a01b031661316c5760405162461bcd60e51b8152600401610e3f90615325565b6000606c5467ffffffffffffffff81111561319757634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156131c0578160200160208202803683370190505b50905060005b81518110156111895760008282815181106131f157634e487b7160e01b600052603260045260246000fd5b602090810291909101015280613206816154c6565b9150506131c6565b613216613cef565b6001600160a01b03811661323c5760405162461bcd60e51b8152600401610e3f90615257565b600154600160a81b900460ff161561328c5760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481d1c985b9cd9995c9c9959606a1b6044820152606401610e3f565b600080546001600160a01b038381166201000081810262010000600160b01b031990941693909317938490556001805460ff60a81b1916600160a81b1790556040805193909404909116825260208201527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9101610ddf565b61330d613cef565b6001600160a01b0381166133335760405162461bcd60e51b8152600401610e3f90615257565b606a80546001600160a01b0319166001600160a01b0383169081179091556040519081527fabe8e0bc29b131a37965174dcb67ce5262f7afd4afca1456fdffa107ccc2c62f90602001610ddf565b60006001607454111561340b5760745460009081526080602090815260408083206001600160a01b0386168452909152902054151580613405575060006080600060016074546133d1919061546c565b81526020019081526020016000206000846001600160a01b03166001600160a01b0316815260200190815260200160002054115b92915050565b5060745460009081526080602090815260408083206001600160a01b0390941683529290522054151590565b600082815260906020526040812054821461345457506000613405565b600082815260776020526040902054600110156134ee57600082815260816020908152604080832060779092528220549091906134939060019061546c565b815260200190815260200160002054609360008581526020019081526020016000206000600160776000878152602001908152602001600020546134d7919061546c565b815260200190815260200160002054149050613405565b5060009081526091602090815260408083209383529290522054151590565b6000818152609060205260408120546074541461352c57506000919050565b607454600090815260776020526040902054600110156135ce57607454600090815260816020908152604080832060779092528220549091906135719060019061546c565b8152602001908152602001600020546093600084815260200190815260200160002060006001607760006074548152602001908152602001600020546135b7919061546c565b815260200190815260200160002054149050919050565b5060745460009081526091602090815260408083209383529290522054151590565b6000818152608f6020908152604091829020805483518184028101840190945280845260609392830182828015612a1257602002820191906000526020600020905b8154815260200190600101908083116136325750505050509050919050565b6074546000908152607b602052604090205460ff166136b25760405162461bcd60e51b815260206004820152601b60248201527f436f6d7065746974696f6e206e6f7420737461727465642079657400000000006044820152606401610e3f565b60745460009081526079602052604090205460ff161561370b5760405162461bcd60e51b815260206004820152601460248201527310dbdb5c195d1a5d1a5bdb88199a5b9a5cda195960621b6044820152606401610e3f565b606f546074546000908152607e602052604090205461372a9190615415565b42116137705760405162461bcd60e51b815260206004820152601560248201527410d85b89dd0818db1bdcd9481c9bdd5b99081e595d605a1b6044820152606401610e3f565b6074546000908152607760205260408120549061378e826001615415565b6069546074546000908152608c60205260408082205490516315905ec160e31b81526004810191909152929350916001600160a01b039091169063ac82f6089060240160206040518083038186803b1580156137e957600080fd5b505afa1580156137fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138219190614fa2565b90506000811161387e5760405162461bcd60e51b815260206004820152602260248201527f4f7261636c65205072696365206d757374206265206c6172676572207468616e604482015261020360f41b6064820152608401610e3f565b60725460745460009081526083602090815260408083208784529091529020829055808210156138af5760016138b2565b60025b6074546000908152608160209081526040808320888452909152812091909155818310156138e15760026138e4565b60015b607284905560745460009081526081602090815260408083208984529091528120549192509060021461393c576074546000908152608460209081526040808320898452825280832060018452909152902054613963565b60745460009081526084602090815260408083208984528252808320600284529091529020545b9050606c54851161398e57607454600090815260926020908152604080832088845290915290208190555b60745460009081526092602090815260408083208984529091529020546139b690829061546c565b60745460009081526086602090815260408083208a84529091529020556139dd82866145ba565b8015613a135760748054600090815260776020908152604080832089905560725493548352608282528083208984529091529020555b606c54851180613a24575060018111155b15613b81576074546000908152607960205260408120805460ff1916600117905581613a7657506074546000908152609260209081526040808320898452909152902054613a7181614865565b613a81565b5080613a8181614865565b607480546000908152607c602090815260408083204290559254808352608182528383208b8452825283832054818452608383528484208c8552835284842054828552608684528585208d86528452938590205485519283529282018c90528185015260608101889052608081019290925260a082015260c0810183905290517fe1875519b9a7a18c7b2b7cb4dd3c932ec04552f4aeb2d97869ee88e2e24ac4009181900360e00190a160745460008181526089602090815260409182902054825193845290830184905282820152517f7f923b15cb705db283005f500abb87c8cc2968d2d0801b44bbd5ed9c64205e199181900360600190a150613c58565b607480546000908152607e6020526040808220429055606f5492548252902054613bab9190615415565b607480546000908152607d60209081526040808320949094559154808252608183528382208a8352835283822054818352608384528483208b8452845284832054828452608685528584208c85528552928590205485519283529382018b90529381019390935260608301869052608083015260a082015260c081018290527fe1875519b9a7a18c7b2b7cb4dd3c932ec04552f4aeb2d97869ee88e2e24ac4009060e00160405180910390a15b505050505050565b60675460ff1615613ca95760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610e3f565b6067805460ff19166001908117909155606655565b608f6020528160005260406000208181548110613cda57600080fd5b90600052602060002001600091509150505481565b6000546201000090046001600160a01b03163314613d675760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b6064820152608401610e3f565b565b608d546040516340d097c360e01b81526001600160a01b03858116600483015260009216906340d097c390602401602060405180830381600087803b158015613db157600080fd5b505af1158015613dc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613de99190614fa2565b60748054600083815260906020908152604080832084905592825260918152828220858352815282822042905583548252608f815282822080546001810182559083528183200185905592548152608e9092528120805492935090613e4d836154c6565b909155505060745460009081526080602090815260408083206001600160a01b038816845290915281204290555b8351811015613f0757838181518110613ea457634e487b7160e01b600052603260045260246000fd5b6020026020010151600014613ef557613ef585607454836001613ec79190615415565b878581518110613ee757634e487b7160e01b600052603260045260246000fd5b6020026020010151866143e1565b80613eff816154c6565b915050613e7b565b508115613f1d57613f188483614959565b613f29565b613f29846073546149ef565b7fc4540a50fb7ace4c340742766a40e199ad6e80e36364529749f7a17e96e21a80848260745486604051613f609493929190615107565b60405180910390a150505050565b608d546040516340d097c360e01b81526001600160a01b03848116600483015260009216906340d097c390602401602060405180830381600087803b158015613fb657600080fd5b505af1158015613fca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fee9190614fa2565b60748054600083815260906020908152604080832084905592825260918152828220858352815282822042905583548252608f815282822080546001810182559083528183200185905592548152608e9092528120805492935090614052836154c6565b909155505060745460009081526080602090815260408083206001600160a01b0387168452909152902042905560735461408d9085906149ef565b7fc4540a50fb7ace4c340742766a40e199ad6e80e36364529749f7a17e96e21a80838260745485604051613f609493929190615107565b6000818152607560205260409020546140de908390615415565b600082815260756020908152604080832093909355608a90522054614104908390615415565b6000828152608a60205260409020556067546141309061010090046001600160a01b0316843085614a73565b604080516001600160a01b0385168152602081018390529081018390527f7a5e77cafc1cb775021040156b9537b95c869bfbd7d19b3042d2eb46a65b57e8906060015b60405180910390a1505050565b6000828152607560205260409020546141d05760405162461bcd60e51b815260206004820152601260248201527114995dd85c99081b5d5cdd081899481cd95d60721b6044820152606401610e3f565b60008181526095602052604090205460ff161561422f5760405162461bcd60e51b815260206004820152601860248201527f52657761726420616c726561647920636f6c6c656374656400000000000000006044820152606401610e3f565b600082815260896020526040908190205460675491516370a0823160e01b8152306004820152909161010090046001600160a01b0316906370a082319060240160206040518083038186803b15801561428757600080fd5b505afa15801561429b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142bf9190614fa2565b101561430d5760405162461bcd60e51b815260206004820152601e60248201527f4e6f7420656e6f7567682062616c616e636520666f72207265776172647300006044820152606401610e3f565b6000818152609560209081526040808320805460ff191660011790558483526089825280832054608a90925290912054614347919061546c565b6000838152608a6020908152604080832093909355608990522054606754614380916101009091046001600160a01b0316908590614ade565b6000828152608960209081526040918290205482518581526001600160a01b0387169281019290925291810183905260608101919091527f18323b848841b45209f9d1c48e6219e71d3175a1edd94d812c8f1de08637759d90608001614173565b60008481526087602090815260408083206001600160a01b038916845282528083208684528252808320859055838352609382528083208684528252808320859055838352609490915290205483116144a3576040805180820182528481526020808201859052600084815260949091529190912061446160018661546c565b8154811061447f57634e487b7160e01b600052603260045260246000fd5b600091825260209182902083516002909202019081559101516001909101556144e8565b60008181526094602090815260408083208151808301909252868252818301868152815460018181018455928652939094209151600290930290910191825591519101555b60028214156145285760008481526084602090815260408083208684528252808320858452909152812080549161451e836154c6565b919050555061455b565b600084815260846020908152604080832086845282528083208584529091528120805491614555836154c6565b91905055505b604080516001600160a01b03871681526020810183905290810185905260608101849052608081018390527f56769e0b5cef558268d0f33b035112c34fdeef21a052a93572023d4afab79d2c9060a00160405180910390a15050505050565b6074546000908152608f602090815260408083208054825181850281018501909352808352919290919083018282801561461357602002820191906000526020600020905b8154815260200190600101908083116145ff575b5050505050905060005b815181101561206157836093600084848151811061464b57634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000600186614670919061546c565b81526020019081526020016000205414806146e25750609360008383815181106146aa57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060006001856146cf919061546c565b8152602001908152602001600020546000145b156148535760016093600084848151811061470d57634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000858152602001908152602001600020541415614776576074546000908152608460209081526040808320868452825280832060018452909152812080549161476c836154af565b9190505550614801565b60026093600084848151811061479c57634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020600085815260200190815260200160002054141561480157607454600090815260846020908152604080832086845282528083206002845290915281208054916147fb836154af565b91905055505b60006093600084848151811061482757634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000858152602001908152602001600020819055505b8061485d816154c6565b91505061461d565b60745460009081526079602052604090205460ff166148c65760405162461bcd60e51b815260206004820152601760248201527f526f79616c65206d7573742062652066696e69736865640000000000000000006044820152606401610e3f565b600081116149275760405162461bcd60e51b815260206004820152602860248201527f5468657265206973206e6f20616c69766520706c6179657273206c65667420696044820152676e20526f79616c6560c01b6064820152608401610e3f565b60745460009081526075602052604090205461494490829061542d565b60745460009081526089602052604090205550565b608b54604051633302eb6360e01b81526001600160a01b0384811660048301526024820184905290911690633302eb6390604401600060405180830381600087803b1580156149a757600080fd5b505af11580156149bb573d6000803e3d6000fd5b5050505060735460756000607454815260200190815260200160002060008282546149e69190615415565b90915550505050565b6000806149fb83614b0e565b90925090508015614a2a57606a54606754614a2a916001600160a01b0361010090920482169187911684614a73565b606754614a479061010090046001600160a01b0316853085614a73565b60745460009081526075602052604081208054849290614a68908490615415565b909155505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526120619085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614b51565b6040516001600160a01b03831660248201526044810182905261166090849063a9059cbb60e01b90606401614aa7565b600080600080606b541115614b3a576064606b5485614b2d919061544d565b614b37919061542d565b90505b6000614b46828661546c565b959194509092505050565b6000614ba6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614c239092919063ffffffff16565b8051909150156116605780806020019051810190614bc49190614f6e565b6116605760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610e3f565b6060614c328484600085614c3c565b90505b9392505050565b606082471015614c9d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610e3f565b843b614ceb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610e3f565b600080866001600160a01b03168587604051614d0791906150eb565b60006040518083038185875af1925050503d8060008114614d44576040519150601f19603f3d011682016040523d82523d6000602084013e614d49565b606091505b5091509150614d59828286614d64565b979650505050505050565b60608315614d73575081614c35565b825115614d835782518084602001fd5b8160405162461bcd60e51b8152600401610e3f91906151ed565b600082601f830112614dad578081fd5b8135602067ffffffffffffffff80831115614dca57614dca6154f7565b8260051b604051601f19603f83011681018181108482111715614def57614def6154f7565b60405284815283810192508684018288018501891015614e0d578687fd5b8692505b85831015614e2f578035845292840192600192909201918401614e11565b50979650505050505050565b600060208284031215614e4c578081fd5b8135614c358161550d565b600060208284031215614e68578081fd5b8151614c358161550d565b60008060008060008060008060008060006101608c8e031215614e94578687fd5b8b35614e9f8161550d565b9a5060208c0135995060408c0135614eb68161550d565b985060608c0135614ec68161550d565b975060808c0135965060a08c0135955060c08c0135945060e08c013593506101008c013592506101208c013591506101408c0135614f0381615522565b809150509295989b509295989b9093969950565b600060208284031215614f28578081fd5b813567ffffffffffffffff811115614f3e578182fd5b614f4a84828501614d9d565b949350505050565b600060208284031215614f63578081fd5b8135614c3581615522565b600060208284031215614f7f578081fd5b8151614c3581615522565b600060208284031215614f9b578081fd5b5035919050565b600060208284031215614fb3578081fd5b5051919050565b60008060408385031215614fcc578182fd5b823591506020830135614fde8161550d565b809150509250929050565b600080600060608486031215614ffd578283fd5b83359250602084013561500f8161550d565b929592945050506040919091013590565b60008060408385031215615032578182fd5b82359150602083013567ffffffffffffffff81111561504f578182fd5b61505b85828601614d9d565b9150509250929050565b60008060408385031215615077578182fd5b50508035926020909101359150565b60008060006060848603121561509a578081fd5b505081359360208301359350604090920135919050565b6000815180845260208085019450808401835b838110156150e0578151875295820195908201906001016150c4565b509495945050505050565b600082516150fd818460208701615483565b9190910192915050565b60018060a01b038516815283602082015282604082015260806060820152600061513460808301846150b1565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561517f5783516001600160a01b03168352928401929184019160010161515a565b50909695505050505050565b602080825282518282018190526000919060409081850190868401855b828110156151cd578151805185528601518685015292840192908501906001016151a8565b5091979650505050505050565b602081526000614c3560208301846150b1565b602081526000825180602084015261520c816040850160208701615483565b601f01601f19169190910160400192915050565b6020808252601a908201527f5369676e20757020706572696f64206861732065787069726564000000000000604082015260600190565b6020808252600f908201526e496e76616c6964206164647265737360881b604082015260600190565b6020808252601b908201527f506f736974696f6e2063616e206f6e6c792062652031206f7220320000000000604082015260600190565b60208082526019908201527f4e6f20656e6f756768207355534420666f722062757920696e00000000000000604082015260600190565b60208082526017908201527f496e697469616c697a6520666972737420736561736f6e000000000000000000604082015260600190565b6020808252601d908201527f5468616c6573526f79616c652050617373706f7274206e6f7420736574000000604082015260600190565b60208082526026908201527f4e6f20656e6f7567682073555344206f6e20726f79616c65207061737320636f6040820152651b9d1c9858dd60d21b606082015260800190565b6020808252602c908201527f4e756d626572206f6620706f736974696f6e732065786365656473206e756d6260408201526b6572206f6620726f756e647360a01b606082015260800190565b6020808252600d908201526c27379030b63637bbb0b731b29760991b604082015260600190565b60008219821115615428576154286154e1565b500190565b60008261544857634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615615467576154676154e1565b500290565b60008282101561547e5761547e6154e1565b500390565b60005b8381101561549e578181015183820152602001615486565b838111156120615750506000910152565b6000816154be576154be6154e1565b506000190190565b60006000198214156154da576154da6154e1565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461119657600080fd5b801515811461119657600080fdfea26469706673582212202e7e7a421da1483ddb868fb89d84ea781375b3e4effa7b549e5556a9ae0f5f4f64736f6c63430008040033
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.