Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
107558344 | 564 days ago | 0 ETH | ||||
107558344 | 564 days ago | 0 ETH | ||||
107557775 | 564 days ago | 0 ETH | ||||
107557775 | 564 days ago | 0 ETH | ||||
107557775 | 564 days ago | 0 ETH | ||||
107557682 | 564 days ago | 0 ETH | ||||
107557682 | 564 days ago | 0 ETH | ||||
107557437 | 564 days ago | 0 ETH | ||||
107557422 | 564 days ago | 0 ETH | ||||
107557422 | 564 days ago | 0 ETH | ||||
107557422 | 564 days ago | 0 ETH | ||||
107557301 | 564 days ago | 0 ETH | ||||
107557301 | 564 days ago | 0 ETH | ||||
107557301 | 564 days ago | 0 ETH | ||||
107557276 | 564 days ago | 0 ETH | ||||
107557276 | 564 days ago | 0 ETH | ||||
107557276 | 564 days ago | 0 ETH | ||||
107557234 | 564 days ago | 0 ETH | ||||
107557234 | 564 days ago | 0 ETH | ||||
107557234 | 564 days ago | 0 ETH | ||||
107557020 | 564 days ago | 0 ETH | ||||
107557020 | 564 days ago | 0 ETH | ||||
107557020 | 564 days ago | 0 ETH | ||||
107557020 | 564 days ago | 0 ETH | ||||
107556916 | 564 days ago | 0 ETH |
Loading...
Loading
Contract Name:
StakingThales
Compiler Version
v0.5.16+commit.9c3226ce
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.5.16; import "openzeppelin-solidity-2.3.0/contracts/token/ERC20/SafeERC20.sol"; import "openzeppelin-solidity-2.3.0/contracts/math/SafeMath.sol"; import "../utils/proxy/ProxyReentrancyGuard.sol"; import "../utils/proxy/ProxyOwned.sol"; import "../utils/proxy/ProxyPausable.sol"; import "@openzeppelin/upgrades-core/contracts/Initializable.sol"; import "../interfaces/IEscrowThales.sol"; import "../interfaces/IStakingThales.sol"; import "../interfaces/ISNXRewards.sol"; import "../interfaces/IThalesRoyale.sol"; import "../interfaces/IPriceFeed.sol"; import "../interfaces/IThalesStakingRewardsPool.sol"; import "../interfaces/IAddressResolver.sol"; import "../interfaces/ISportsAMMLiquidityPool.sol"; import "../interfaces/IThalesAMMLiquidityPool.sol"; import "../interfaces/IParlayAMMLiquidityPool.sol"; import "../interfaces/IThalesAMM.sol"; import "../interfaces/IPositionalMarketManager.sol"; import "../interfaces/IStakingThalesBonusRewardsManager.sol"; /// @title A Staking contract that provides logic for staking and claiming rewards contract StakingThales is IStakingThales, Initializable, ProxyOwned, ProxyReentrancyGuard, ProxyPausable { /* ========== LIBRARIES ========== */ using SafeMath for uint; using SafeERC20 for IERC20; /* ========== STATE VARIABLES ========== */ IEscrowThales public iEscrowThales; IERC20 public stakingToken; IERC20 public feeToken; ISNXRewards public SNXRewards; IThalesRoyale public thalesRoyale; IPriceFeed public priceFeed; uint public periodsOfStaking; uint public lastPeriodTimeStamp; uint public durationPeriod; uint public unstakeDurationPeriod; uint public startTimeStamp; uint public currentPeriodRewards; uint public currentPeriodFees; bool public distributeFeesEnabled; uint public fixedPeriodReward; uint public periodExtraReward; uint public totalSNXRewardsInPeriod; uint public totalSNXFeesInPeriod; bool public claimEnabled; mapping(address => uint) public stakerLifetimeRewardsClaimed; mapping(address => uint) public stakerFeesClaimed; uint private _totalStakedAmount; uint private _totalEscrowedAmount; uint private _totalPendingStakeAmount; uint private _totalUnclaimedRewards; uint private _totalRewardsClaimed; uint private _totalRewardFeesClaimed; mapping(address => uint) public lastUnstakeTime; mapping(address => bool) public unstaking; mapping(address => uint) public unstakingAmount; mapping(address => uint) private _stakedBalances; mapping(address => uint) private _lastRewardsClaimedPeriod; address public thalesAMM; uint constant HUNDRED = 1e18; uint constant AMM_EXTRA_REWARD_PERIODS = 4; struct AMMVolumeEntry { uint amount; uint period; } mapping(address => uint) private lastAMMUpdatePeriod; mapping(address => AMMVolumeEntry[AMM_EXTRA_REWARD_PERIODS]) private stakerAMMVolume; bool public extraRewardsActive; IThalesStakingRewardsPool public ThalesStakingRewardsPool; uint public maxSNXRewardsPercentage; uint public maxAMMVolumeRewardsPercentage; uint public AMMVolumeRewardsMultiplier; uint public maxThalesRoyaleRewardsPercentage; uint constant ONE = 1e18; uint constant ONE_PERCENT = 1e16; uint public SNXVolumeRewardsMultiplier; mapping(address => uint) private _lastStakingPeriod; uint public totalStakedLastPeriodEnd; uint public totalEscrowedLastPeriodEnd; address public exoticBonds; IAddressResolver public addressResolver; address public thalesRangedAMM; address public sportsAMM; mapping(address => uint) private lastThalesAMMUpdatePeriod; mapping(address => AMMVolumeEntry[AMM_EXTRA_REWARD_PERIODS]) private thalesAMMVolume; mapping(address => uint) private lastThalesRangedAMMUpdatePeriod; mapping(address => AMMVolumeEntry[AMM_EXTRA_REWARD_PERIODS]) private thalesRangedAMMVolume; mapping(address => uint) private lastExoticMarketsUpdatePeriod; mapping(address => AMMVolumeEntry[AMM_EXTRA_REWARD_PERIODS]) private exoticMarketsVolume; mapping(address => uint) private lastSportsAMMUpdatePeriod; mapping(address => AMMVolumeEntry[AMM_EXTRA_REWARD_PERIODS]) private sportsAMMVolume; mapping(address => mapping(address => bool)) public canClaimOnBehalf; bool public mergeAccountEnabled; mapping(address => address) public delegatedVolume; mapping(address => bool) public supportedSportVault; mapping(address => bool) public supportedAMMVault; ISportsAMMLiquidityPool public sportsAMMLiquidityPool; IThalesAMMLiquidityPool public thalesAMMLiquidityPool; IStakingThalesBonusRewardsManager public stakingThalesBonusRewardsManager; IParlayAMMLiquidityPool public parlayAMMLiquidityPool; /* ========== CONSTRUCTOR ========== */ function initialize( address _owner, address _iEscrowThales, //THALES address _stakingToken, //THALES address _feeToken, //sUSD uint _durationPeriod, uint _unstakeDurationPeriod, address _ISNXRewards ) public initializer { setOwner(_owner); initNonReentrant(); iEscrowThales = IEscrowThales(_iEscrowThales); stakingToken = IERC20(_stakingToken); feeToken = IERC20(_feeToken); stakingToken.approve(_iEscrowThales, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); durationPeriod = _durationPeriod; unstakeDurationPeriod = _unstakeDurationPeriod; fixedPeriodReward = 70000 * 1e18; periodExtraReward = 21000 * 1e18; SNXRewards = ISNXRewards(_ISNXRewards); } /* ========== VIEWS ========== */ /// @notice Get the total staked amount on the contract /// @return total staked amount function totalStakedAmount() external view returns (uint) { return _totalStakedAmount; } /// @notice Get the staked balance for the account /// @param account to get the staked balance for /// @return the staked balance for the account function stakedBalanceOf(address account) external view returns (uint) { return _stakedBalances[account]; } /// @notice Get the last period of claimed rewards for the account /// @param account to get the last period of claimed rewards for /// @return the last period of claimed rewards for the account function getLastPeriodOfClaimedRewards(address account) external view returns (uint) { return _lastRewardsClaimedPeriod[account]; } /// @notice Get the rewards available for the claim for the account /// @param account to get the rewards available for the claim for /// @return the rewards available for the claim for the account function getRewardsAvailable(address account) external view returns (uint) { return _calculateAvailableRewardsToClaim(account); } /// @notice Get the reward fees available for the claim for the account /// @param account to get the reward fees available for the claim for /// @return the rewards fees available for the claim for the account function getRewardFeesAvailable(address account) external view returns (uint) { return _calculateAvailableFeesToClaim(account); } /// @notice Get the total rewards claimed for the account until now /// @param account to get the total rewards claimed for /// @return the total rewards claimed for the account until now function getAlreadyClaimedRewards(address account) external view returns (uint) { return stakerLifetimeRewardsClaimed[account]; } /// @notice Get the rewards funds available on the rewards pool /// @return the rewards funds available on the rewards pool function getContractRewardFunds() external view returns (uint) { return stakingToken.balanceOf(address(ThalesStakingRewardsPool)); } /// @notice Get the fee funds available on the staking contract /// @return the fee funds available on the staking contract function getContractFeeFunds() external view returns (uint) { return feeToken.balanceOf(address(this)); } /// @notice Set staking parametars /// @param _claimEnabled enable/disable claim rewards /// @param _distributeFeesEnabled enable/disable fees distribution /// @param _durationPeriod duration of the staking period /// @param _unstakeDurationPeriod duration of the unstaking cooldown period /// @param _mergeAccountEnabled enable/disable account merging function setStakingParameters( bool _claimEnabled, bool _distributeFeesEnabled, uint _durationPeriod, uint _unstakeDurationPeriod, bool _mergeAccountEnabled ) external onlyOwner { claimEnabled = _claimEnabled; distributeFeesEnabled = _distributeFeesEnabled; durationPeriod = _durationPeriod; unstakeDurationPeriod = _unstakeDurationPeriod; mergeAccountEnabled = _mergeAccountEnabled; emit StakingParametersChanged( _claimEnabled, _distributeFeesEnabled, _durationPeriod, _unstakeDurationPeriod, _mergeAccountEnabled ); } /// @notice Set staking rewards parameters /// @param _fixedReward amount for weekly base rewards pool /// @param _extraReward amount for weekly bonus rewards pool /// @param _extraRewardsActive enable/disable bonus rewards /// @param _maxSNXRewardsPercentage maximum percentage for SNX rewards /// @param _maxAMMVolumeRewardsPercentage maximum percentage for protocol volume rewards /// @param _maxThalesRoyaleRewardsPercentage maximum percentage for rewards for participation in Thales Royale /// @param _SNXVolumeRewardsMultiplier multiplier for SNX rewards /// @param _AMMVolumeRewardsMultiplier multiplier for protocol volume rewards function setStakingRewardsParameters( uint _fixedReward, uint _extraReward, bool _extraRewardsActive, uint _maxSNXRewardsPercentage, uint _maxAMMVolumeRewardsPercentage, uint _maxThalesRoyaleRewardsPercentage, uint _SNXVolumeRewardsMultiplier, uint _AMMVolumeRewardsMultiplier ) public onlyOwner { fixedPeriodReward = _fixedReward; periodExtraReward = _extraReward; extraRewardsActive = _extraRewardsActive; maxSNXRewardsPercentage = _maxSNXRewardsPercentage; maxAMMVolumeRewardsPercentage = _maxAMMVolumeRewardsPercentage; maxThalesRoyaleRewardsPercentage = _maxThalesRoyaleRewardsPercentage; SNXVolumeRewardsMultiplier = _SNXVolumeRewardsMultiplier; AMMVolumeRewardsMultiplier = _AMMVolumeRewardsMultiplier; emit StakingRewardsParametersChanged( _fixedReward, _extraReward, _extraRewardsActive, _maxSNXRewardsPercentage, _maxAMMVolumeRewardsPercentage, _AMMVolumeRewardsMultiplier, _maxThalesRoyaleRewardsPercentage, _SNXVolumeRewardsMultiplier ); } /// @notice Set contract addresses /// @param _snxRewards address of SNX rewards contract /// @param _thalesAMM address of Thales AMM contract /// @param _thalesRangedAMM address of Thales ranged AMM contract /// @param _sportsAMM address of sport markets AMM contract /// @param _priceFeed address of price feed contract /// @param _thalesStakingRewardsPool address of Thales staking rewards pool /// @param _addressResolver address of address resolver contract /// @param _sportsAMMLiquidityPool address of Sport AMM Liquidity Pool /// @param _thalesAMMLiquidityPool address of thales AMM Liquidity Pool /// @param _stakingThalesBonusRewardsManager manager for TIP-135 gamification systme function setAddresses( address _snxRewards, address _thalesAMM, address _thalesRangedAMM, address _sportsAMM, address _priceFeed, address _thalesStakingRewardsPool, address _addressResolver, address _sportsAMMLiquidityPool, address _thalesAMMLiquidityPool, address _parlayAMMLiquidityPool, address _stakingThalesBonusRewardsManager ) external onlyOwner { SNXRewards = ISNXRewards(_snxRewards); thalesAMM = _thalesAMM; thalesRangedAMM = _thalesRangedAMM; sportsAMM = _sportsAMM; priceFeed = IPriceFeed(_priceFeed); ThalesStakingRewardsPool = IThalesStakingRewardsPool(_thalesStakingRewardsPool); addressResolver = IAddressResolver(_addressResolver); sportsAMMLiquidityPool = ISportsAMMLiquidityPool(_sportsAMMLiquidityPool); thalesAMMLiquidityPool = IThalesAMMLiquidityPool(_thalesAMMLiquidityPool); parlayAMMLiquidityPool = IParlayAMMLiquidityPool(_parlayAMMLiquidityPool); stakingThalesBonusRewardsManager = IStakingThalesBonusRewardsManager(_stakingThalesBonusRewardsManager); emit AddressesChanged( _snxRewards, _thalesAMM, _thalesRangedAMM, _sportsAMM, _priceFeed, _thalesStakingRewardsPool, _addressResolver, _sportsAMMLiquidityPool, _thalesAMMLiquidityPool, _parlayAMMLiquidityPool, _stakingThalesBonusRewardsManager ); } /// @notice Set address of Escrow Thales contract /// @param _escrowThalesContract address of Escrow Thales contract function setEscrow(address _escrowThalesContract) external onlyOwner { if (address(iEscrowThales) != address(0)) { stakingToken.approve(address(iEscrowThales), 0); } iEscrowThales = IEscrowThales(_escrowThalesContract); stakingToken.approve(_escrowThalesContract, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); emit EscrowChanged(_escrowThalesContract); } /// @notice add a sport vault address to count towards gamified staking volume /// @param _sportVault address to set /// @param value to set function setSupportedSportVault(address _sportVault, bool value) external onlyOwner { supportedSportVault[_sportVault] = value; emit SupportedSportVaultSet(_sportVault, value); } /// @notice add a amm vault address to count towards gamified staking volume /// @param _ammVault address to set /// @param value to set function setSupportedAMMVault(address _ammVault, bool value) external onlyOwner { supportedAMMVault[_ammVault] = value; emit SupportedAMMVaultSet(_ammVault, value); } /// @notice Get the address of the SNX rewards contract /// @return the address of the SNX rewards contract function getSNXRewardsAddress() public view returns (address) { if (address(addressResolver) == address(0)) { return address(0); } else { return addressResolver.getAddress("Issuer"); } } /// @notice Get the amount of SNX staked for the account /// @param account to get the amount of SNX staked for /// @return the amount of SNX staked for the account function getSNXStaked(address account) external view returns (uint) { return _getSNXStakedForAccount(account); } /// @notice Get the base reward amount available for the claim for the account /// @param account to get the base reward amount available for the claim for /// @return the base reward amount available for the claim for the account function getBaseReward(address account) public view returns (uint _baseRewards) { if ( !((_lastStakingPeriod[account] == periodsOfStaking) || (_stakedBalances[account] == 0) || (_lastRewardsClaimedPeriod[account] == periodsOfStaking) || (totalStakedLastPeriodEnd == 0)) ) { _baseRewards = _stakedBalances[account] .add(iEscrowThales.getStakedEscrowedBalanceForRewards(account)) .mul(currentPeriodRewards) .div(totalStakedLastPeriodEnd.add(totalEscrowedLastPeriodEnd)); } } /// @notice Get the total protocol volume for the account /// @param account to get the total protocol volume for /// @return the total protocol volume for the account function getAMMVolume(address account) external view returns (uint) { return _getTotalAMMVolume(account); } /// @notice Get the AMM volume for the account /// @param account to get the AMM volume for /// @return the AMM volume for the account function getThalesAMMVolume(address account) external view returns (uint volumeforAccount) { for (uint i = 0; i < AMM_EXTRA_REWARD_PERIODS; i++) { if (periodsOfStaking < thalesAMMVolume[account][i].period.add(AMM_EXTRA_REWARD_PERIODS)) volumeforAccount = volumeforAccount.add(thalesAMMVolume[account][i].amount); } } /// @notice Get the ranged AMM volume for the account /// @param account to get the ranged AMM volume for /// @return the ranged AMM volume for the account function getThalesRangedAMMVolume(address account) external view returns (uint volumeforAccount) { for (uint i = 0; i < AMM_EXTRA_REWARD_PERIODS; i++) { if (periodsOfStaking < thalesRangedAMMVolume[account][i].period.add(AMM_EXTRA_REWARD_PERIODS)) volumeforAccount = volumeforAccount.add(thalesRangedAMMVolume[account][i].amount); } } /// @notice Get the exotic markets volume for the account /// @param account to get exotic markets volume for /// @return the exotic markets volume for the account function getExoticMarketsVolume(address account) external view returns (uint volumeforAccount) { for (uint i = 0; i < AMM_EXTRA_REWARD_PERIODS; i++) { if (periodsOfStaking < exoticMarketsVolume[account][i].period.add(AMM_EXTRA_REWARD_PERIODS)) volumeforAccount = volumeforAccount.add(exoticMarketsVolume[account][i].amount); } } /// @notice Get the sport markets AMM volume for the account /// @param account to get the sport markets AMM volume for /// @return the sport markets AMM volume for the account function getSportsAMMVolume(address account) external view returns (uint volumeforAccount) { for (uint i = 0; i < AMM_EXTRA_REWARD_PERIODS; i++) { if (periodsOfStaking < sportsAMMVolume[account][i].period.add(AMM_EXTRA_REWARD_PERIODS)) volumeforAccount = volumeforAccount.add(sportsAMMVolume[account][i].amount); } } /// @notice Get the percentage of SNX rewards for the account /// @param account to get the percentage of SNX rewards for /// @return the percentage of SNX rewards for the account function getSNXBonusPercentage(address account) public view returns (uint) { uint baseReward = getBaseReward(account); if (baseReward == 0) { return 0; } uint stakedSNX = _getSNXStakedForAccount(account); // SNX staked more than base reward return stakedSNX >= baseReward.mul(SNXVolumeRewardsMultiplier) ? maxSNXRewardsPercentage.mul(ONE_PERCENT) : stakedSNX.mul(maxSNXRewardsPercentage).mul(ONE_PERCENT).div(baseReward.mul(SNXVolumeRewardsMultiplier)); } /// @notice Get the SNX staking bonus rewards for the account /// @param account to get the SNX staking bonus rewards for /// @return the SNX staking bonus rewards for the account function getSNXBonus(address account) public view returns (uint) { uint baseReward = getBaseReward(account); uint SNXBonusPercentage = getSNXBonusPercentage(account); return baseReward.mul(SNXBonusPercentage).div(ONE); } /// @notice Get the percentage of protocol volume rewards for the account /// @param account to get the percentage of protocol volume rewards for /// @return the percentage of protocol volume rewards for the account function getAMMBonusPercentage(address account) public view returns (uint) { uint baseReward = getBaseReward(account); if (baseReward == 0) { return 0; } return _getTotalAMMVolume(account) >= baseReward.mul(AMMVolumeRewardsMultiplier) ? maxAMMVolumeRewardsPercentage.mul(ONE_PERCENT) : _getTotalAMMVolume(account).mul(ONE_PERCENT).mul(maxAMMVolumeRewardsPercentage).div( baseReward.mul(AMMVolumeRewardsMultiplier) ); } /// @notice Get the protocol volume bonus rewards for the account /// @param account to get the protocol volume bonus rewards for /// @return the protocol volume bonus rewards for the account function getAMMBonus(address account) public view returns (uint) { uint baseReward = getBaseReward(account); uint AMMPercentage = getAMMBonusPercentage(account); return baseReward.mul(AMMPercentage).div(ONE); } function getTotalBonusPercentage(address account) public view returns (uint) { uint snxPercentage = getSNXBonusPercentage(account); uint ammPercentage = getAMMBonusPercentage(account); return snxPercentage.add(ammPercentage); } /// @notice Get the total bonus rewards for the account /// @param account to get the total bonus rewards for /// @return the total bonus rewards for the account function getTotalBonus(address account) public view returns (uint) { if ( (address(stakingThalesBonusRewardsManager) != address(0)) && stakingThalesBonusRewardsManager.useNewBonusModel() ) { return periodExtraReward .mul(stakingThalesBonusRewardsManager.getUserRoundBonusShare(account, periodsOfStaking - 1)) .div(ONE); } else { uint baseReward = getBaseReward(account); uint totalBonusPercentage = getTotalBonusPercentage(account); // failsafe require(totalBonusPercentage < ONE, "Bonus Exceeds base rewards"); return baseReward.mul(totalBonusPercentage).div(ONE); } } /// @notice Get the flag that indicates whether the current period can be closed /// @return the flag that indicates whether the current period can be closed function canClosePeriod() external view returns (bool) { return (startTimeStamp > 0 && (block.timestamp >= lastPeriodTimeStamp.add(durationPeriod))); } /// @notice Get the current SNX target ratio /// @return the current SNX target ratio function getSNXTargetRatio() public view returns (uint) { uint hund = 100 * 100 * 1e18; return hund.div(ISNXRewards(getSNXRewardsAddress()).issuanceRatio()); } /// @notice Get the current SNX C-Ratio for the account /// @param account to get the current SNX C-Ratio for /// @return the current SNX C-Ratio for the account function getCRatio(address account) public view returns (uint) { uint debt = ISNXRewards(getSNXRewardsAddress()).debtBalanceOf(account, "sUSD"); if (debt == 0) { return 0; } uint hund = 100 * 100 * 1e18; (uint cRatio, ) = ISNXRewards(getSNXRewardsAddress()).collateralisationRatioAndAnyRatesInvalid(account); return hund.div(cRatio); } /// @notice Get the current SNX rate /// @return the current SNX rate function getSNXRateForCurrency() public view returns (uint) { return priceFeed.rateForCurrency("SNX"); } /// @notice Get the current SNX debt for the account /// @param account to get the current SNX debt for /// @return the current SNX debt for the account function getSNXDebt(address account) public view returns (uint) { return ISNXRewards(getSNXRewardsAddress()).debtBalanceOf(account, "sUSD"); } /* ========== PUBLIC ========== */ /// @notice Start the first staking period function startStakingPeriod() external onlyOwner { require(startTimeStamp == 0, "Staking has already started"); startTimeStamp = block.timestamp; periodsOfStaking = 0; lastPeriodTimeStamp = startTimeStamp; _totalUnclaimedRewards = 0; _totalRewardsClaimed = 0; _totalRewardFeesClaimed = 0; _totalStakedAmount = 0; _totalEscrowedAmount = 0; _totalPendingStakeAmount = 0; emit StakingPeriodStarted(); } /// @notice Close the current staking period function closePeriod() external nonReentrant notPaused { require(startTimeStamp > 0, "Staking period has not started"); require( block.timestamp >= lastPeriodTimeStamp.add(durationPeriod), "A full period has not passed since the last closed period" ); iEscrowThales.updateCurrentPeriod(); lastPeriodTimeStamp = block.timestamp; periodsOfStaking = iEscrowThales.currentVestingPeriod(); _totalEscrowedAmount = iEscrowThales.totalEscrowedRewards().sub( iEscrowThales.totalEscrowBalanceNotIncludedInStaking() ); //Actions taken on every closed period currentPeriodRewards = fixedPeriodReward; _totalUnclaimedRewards = _totalUnclaimedRewards.add(currentPeriodRewards.add(periodExtraReward)); currentPeriodFees = feeToken.balanceOf(address(this)); totalStakedLastPeriodEnd = _totalStakedAmount; totalEscrowedLastPeriodEnd = _totalEscrowedAmount; emit ClosedPeriod(periodsOfStaking, lastPeriodTimeStamp); } /// @notice Stake the amount of staking token to get weekly rewards /// @param amount to stake function stake(uint amount) external nonReentrant notPaused { _stake(amount, msg.sender, msg.sender); emit Staked(msg.sender, amount); } /// @notice Start unstaking cooldown for the amount of staking token /// @param amount to unstake function startUnstake(uint amount) external notPaused { require(amount > 0, "Cannot unstake 0"); require(_stakedBalances[msg.sender] >= amount, "Account doesnt have that much staked"); require(!unstaking[msg.sender], "Account has already triggered unstake cooldown"); if (address(sportsAMMLiquidityPool) != address(0)) { require(!sportsAMMLiquidityPool.isUserLPing(msg.sender), "Cannot unstake while LPing"); } if (address(thalesAMMLiquidityPool) != address(0)) { require(!thalesAMMLiquidityPool.isUserLPing(msg.sender), "Cannot unstake while LPing"); } if (address(parlayAMMLiquidityPool) != address(0)) { require(!parlayAMMLiquidityPool.isUserLPing(msg.sender), "Cannot unstake while LPing"); } if (_calculateAvailableRewardsToClaim(msg.sender) > 0) { _claimReward(msg.sender); } lastUnstakeTime[msg.sender] = block.timestamp; unstaking[msg.sender] = true; _totalStakedAmount = _totalStakedAmount.sub(amount); unstakingAmount[msg.sender] = amount; _stakedBalances[msg.sender] = _stakedBalances[msg.sender].sub(amount); // on full unstake add his escrowed balance to totalEscrowBalanceNotIncludedInStaking if (_stakedBalances[msg.sender] == 0) { if (iEscrowThales.totalAccountEscrowedAmount(msg.sender) > 0) { iEscrowThales.addTotalEscrowBalanceNotIncludedInStaking( iEscrowThales.totalAccountEscrowedAmount(msg.sender) ); } } emit UnstakeCooldown(msg.sender, lastUnstakeTime[msg.sender].add(unstakeDurationPeriod), amount); } /// @notice Cancel unstaking cooldown function cancelUnstake() external notPaused { require(unstaking[msg.sender], "Account is not unstaking"); // on revert full unstake remove his escrowed balance from totalEscrowBalanceNotIncludedInStaking _subtractTotalEscrowBalanceNotIncludedInStaking(msg.sender); if (_calculateAvailableRewardsToClaim(msg.sender) > 0) { _claimReward(msg.sender); } unstaking[msg.sender] = false; _totalStakedAmount = _totalStakedAmount.add(unstakingAmount[msg.sender]); _stakedBalances[msg.sender] = _stakedBalances[msg.sender].add(unstakingAmount[msg.sender]); unstakingAmount[msg.sender] = 0; emit CancelUnstake(msg.sender); } /// @notice Unstake after the cooldown period expired function unstake() external notPaused { require(unstaking[msg.sender], "Account has not triggered unstake cooldown"); require( lastUnstakeTime[msg.sender] < block.timestamp.sub(unstakeDurationPeriod), "Cannot unstake yet, cooldown not expired." ); unstaking[msg.sender] = false; uint unstakeAmount = unstakingAmount[msg.sender]; stakingToken.safeTransfer(msg.sender, unstakeAmount); unstakingAmount[msg.sender] = 0; emit Unstaked(msg.sender, unstakeAmount); } /// @notice Claim the weekly staking rewards function claimReward() public nonReentrant notPaused { _claimReward(msg.sender); } /// @notice Claim the weekly staking rewards on behalf of the account /// @param account to claim on behalf of function claimRewardOnBehalf(address account) public nonReentrant notPaused { require(account != address(0) && account != msg.sender, "Invalid address"); require(canClaimOnBehalf[account][msg.sender], "Cannot claim on behalf"); _claimReward(account); } /// @notice Update the protocol volume for the account /// @param account to update the protocol volume for /// @param amount to add to the existing protocol volume function updateVolume(address account, uint amount) external { require(account != address(0) && amount > 0, "Invalid params"); if (delegatedVolume[account] != address(0)) { account = delegatedVolume[account]; } require( msg.sender == thalesAMM || msg.sender == exoticBonds || msg.sender == thalesRangedAMM || msg.sender == sportsAMM || supportedSportVault[msg.sender] || supportedAMMVault[msg.sender], "Invalid address" ); amount = IPositionalMarketManager(IThalesAMM(sportsAMM).manager()).reverseTransformCollateral(amount); if (lastAMMUpdatePeriod[account] < periodsOfStaking) { stakerAMMVolume[account][periodsOfStaking.mod(AMM_EXTRA_REWARD_PERIODS)].amount = 0; stakerAMMVolume[account][periodsOfStaking.mod(AMM_EXTRA_REWARD_PERIODS)].period = periodsOfStaking; lastAMMUpdatePeriod[account] = periodsOfStaking; } stakerAMMVolume[account][periodsOfStaking.mod(AMM_EXTRA_REWARD_PERIODS)].amount = stakerAMMVolume[account][ periodsOfStaking.mod(AMM_EXTRA_REWARD_PERIODS) ].amount.add(amount); if (msg.sender == thalesAMM || supportedAMMVault[msg.sender]) { if (lastThalesAMMUpdatePeriod[account] < periodsOfStaking) { thalesAMMVolume[account][periodsOfStaking.mod(AMM_EXTRA_REWARD_PERIODS)].amount = 0; thalesAMMVolume[account][periodsOfStaking.mod(AMM_EXTRA_REWARD_PERIODS)].period = periodsOfStaking; lastThalesAMMUpdatePeriod[account] = periodsOfStaking; } thalesAMMVolume[account][periodsOfStaking.mod(AMM_EXTRA_REWARD_PERIODS)].amount = thalesAMMVolume[account][ periodsOfStaking.mod(AMM_EXTRA_REWARD_PERIODS) ].amount.add(amount); } if (msg.sender == thalesRangedAMM) { if (lastThalesRangedAMMUpdatePeriod[account] < periodsOfStaking) { thalesRangedAMMVolume[account][periodsOfStaking.mod(AMM_EXTRA_REWARD_PERIODS)].amount = 0; thalesRangedAMMVolume[account][periodsOfStaking.mod(AMM_EXTRA_REWARD_PERIODS)].period = periodsOfStaking; lastThalesRangedAMMUpdatePeriod[account] = periodsOfStaking; } thalesRangedAMMVolume[account][periodsOfStaking.mod(AMM_EXTRA_REWARD_PERIODS)].amount = thalesRangedAMMVolume[ account ][periodsOfStaking.mod(AMM_EXTRA_REWARD_PERIODS)].amount.add(amount); } if (msg.sender == sportsAMM || supportedSportVault[msg.sender]) { if (lastSportsAMMUpdatePeriod[account] < periodsOfStaking) { sportsAMMVolume[account][periodsOfStaking.mod(AMM_EXTRA_REWARD_PERIODS)].amount = 0; sportsAMMVolume[account][periodsOfStaking.mod(AMM_EXTRA_REWARD_PERIODS)].period = periodsOfStaking; lastSportsAMMUpdatePeriod[account] = periodsOfStaking; } sportsAMMVolume[account][periodsOfStaking.mod(AMM_EXTRA_REWARD_PERIODS)].amount = sportsAMMVolume[account][ periodsOfStaking.mod(AMM_EXTRA_REWARD_PERIODS) ].amount.add(amount); } if (address(stakingThalesBonusRewardsManager) != address(0)) { stakingThalesBonusRewardsManager.storePoints(account, msg.sender, amount, periodsOfStaking); } emit AMMVolumeUpdated(account, amount, msg.sender); } /// @notice Merge account to transfer all staking amounts to another account /// @param destAccount to merge into function mergeAccount(address destAccount) external notPaused { require(mergeAccountEnabled, "Merge account is disabled"); require(destAccount != address(0) && destAccount != msg.sender, "Invalid address"); require( _calculateAvailableRewardsToClaim(msg.sender) == 0 && _calculateAvailableRewardsToClaim(destAccount) == 0, "Cannot merge, claim rewards on both accounts before merging" ); require( !unstaking[msg.sender] && !unstaking[destAccount], "Cannot merge, cancel unstaking on both accounts before merging" ); if (address(sportsAMMLiquidityPool) != address(0)) { require(!sportsAMMLiquidityPool.isUserLPing(msg.sender), "Cannot merge while LPing"); } if (address(thalesAMMLiquidityPool) != address(0)) { require(!thalesAMMLiquidityPool.isUserLPing(msg.sender), "Cannot merge while LPing"); } if (address(parlayAMMLiquidityPool) != address(0)) { require(!parlayAMMLiquidityPool.isUserLPing(msg.sender), "Cannot merge while LPing"); } iEscrowThales.mergeAccount(msg.sender, destAccount); _stakedBalances[destAccount] = _stakedBalances[destAccount].add(_stakedBalances[msg.sender]); stakerLifetimeRewardsClaimed[destAccount] = stakerLifetimeRewardsClaimed[destAccount].add( stakerLifetimeRewardsClaimed[msg.sender] ); stakerFeesClaimed[destAccount] = stakerFeesClaimed[destAccount].add(stakerFeesClaimed[msg.sender]); _lastRewardsClaimedPeriod[destAccount] = periodsOfStaking; _lastStakingPeriod[destAccount] = periodsOfStaking; lastAMMUpdatePeriod[destAccount] = periodsOfStaking; uint stakerAMMVolumeIndex; uint stakerAMMVolumePeriod; for (uint i = 1; i <= AMM_EXTRA_REWARD_PERIODS; i++) { stakerAMMVolumeIndex = periodsOfStaking.add(i).mod(AMM_EXTRA_REWARD_PERIODS); stakerAMMVolumePeriod = periodsOfStaking.sub(AMM_EXTRA_REWARD_PERIODS.sub(i)); if (stakerAMMVolumePeriod != stakerAMMVolume[destAccount][stakerAMMVolumeIndex].period) { stakerAMMVolume[destAccount][stakerAMMVolumeIndex].amount = 0; stakerAMMVolume[destAccount][stakerAMMVolumeIndex].period = stakerAMMVolumePeriod; } if (stakerAMMVolumePeriod == stakerAMMVolume[msg.sender][stakerAMMVolumeIndex].period) { stakerAMMVolume[destAccount][stakerAMMVolumeIndex].amount = stakerAMMVolume[destAccount][ stakerAMMVolumeIndex ].amount.add(stakerAMMVolume[msg.sender][stakerAMMVolumeIndex].amount); } } delete lastUnstakeTime[msg.sender]; delete unstaking[msg.sender]; delete unstakingAmount[msg.sender]; delete _stakedBalances[msg.sender]; delete stakerLifetimeRewardsClaimed[msg.sender]; delete stakerFeesClaimed[msg.sender]; delete _lastRewardsClaimedPeriod[msg.sender]; delete _lastStakingPeriod[msg.sender]; delete lastAMMUpdatePeriod[msg.sender]; delete stakerAMMVolume[msg.sender]; emit AccountMerged(msg.sender, destAccount); } /// @notice Set flag to enable/disable claim on behalf of the msg.sender for the account /// @param account to enable/disable claim on behalf of msg.sender /// @param _canClaimOnBehalf enable/disable claim on behalf of the msg.sender for the account function setCanClaimOnBehalf(address account, bool _canClaimOnBehalf) external notPaused { require(account != address(0) && account != msg.sender, "Invalid address"); canClaimOnBehalf[msg.sender][account] = _canClaimOnBehalf; emit CanClaimOnBehalfChanged(msg.sender, account, _canClaimOnBehalf); } /// @notice delegate your volume to another address /// @param account address to delegate to function delegateVolume(address account) external notPaused { delegatedVolume[msg.sender] = account; emit DelegatedVolume(account); } /* ========== INTERNAL FUNCTIONS ========== */ function _claimReward(address account) internal notPaused { require(claimEnabled, "Claiming is not enabled."); require(startTimeStamp > 0, "Staking period has not started"); //Calculate rewards if (distributeFeesEnabled) { uint availableFeesToClaim = _calculateAvailableFeesToClaim(account); if (availableFeesToClaim > 0) { feeToken.safeTransfer(account, availableFeesToClaim); stakerFeesClaimed[account] = stakerFeesClaimed[account].add(availableFeesToClaim); _totalRewardFeesClaimed = _totalRewardFeesClaimed.add(availableFeesToClaim); emit FeeRewardsClaimed(account, availableFeesToClaim); } } uint availableRewardsToClaim = _calculateAvailableRewardsToClaim(account); if (availableRewardsToClaim > 0) { // Transfer THALES to Escrow contract ThalesStakingRewardsPool.addToEscrow(account, availableRewardsToClaim); // Record the total claimed rewards stakerLifetimeRewardsClaimed[account] = stakerLifetimeRewardsClaimed[account].add(availableRewardsToClaim); _totalRewardsClaimed = _totalRewardsClaimed.add(availableRewardsToClaim); _totalUnclaimedRewards = _totalUnclaimedRewards.sub(availableRewardsToClaim); emit RewardsClaimed( account, availableRewardsToClaim, getBaseReward(account), getSNXBonus(account), getAMMBonus(account) ); } // Update last claiming period _lastRewardsClaimedPeriod[account] = periodsOfStaking; } function _stake( uint amount, address staker, address sender ) internal { require(startTimeStamp > 0, "Staking period has not started"); require(amount > 0, "Cannot stake 0"); require(!unstaking[staker], "The staker is paused from staking due to unstaking"); // Check if there are not claimable rewards from last period. // Claim them, and add new stake if (_calculateAvailableRewardsToClaim(staker) > 0) { _claimReward(staker); } _lastStakingPeriod[staker] = periodsOfStaking; // if just started staking subtract his escrowed balance from totalEscrowBalanceNotIncludedInStaking _subtractTotalEscrowBalanceNotIncludedInStaking(staker); _totalStakedAmount = _totalStakedAmount.add(amount); _stakedBalances[staker] = _stakedBalances[staker].add(amount); stakingToken.safeTransferFrom(sender, address(this), amount); } function _subtractTotalEscrowBalanceNotIncludedInStaking(address account) internal { if (_stakedBalances[account] == 0) { if (iEscrowThales.totalAccountEscrowedAmount(account) > 0) { iEscrowThales.subtractTotalEscrowBalanceNotIncludedInStaking( iEscrowThales.totalAccountEscrowedAmount(account) ); } } } function _calculateAvailableRewardsToClaim(address account) internal view returns (uint) { uint baseReward = getBaseReward(account); if (baseReward == 0) { return 0; } if (!extraRewardsActive) { return baseReward; } else { return baseReward.add(getTotalBonus(account)); } } function _calculateAvailableFeesToClaim(address account) internal view returns (uint) { uint baseReward = getBaseReward(account); if (baseReward == 0) { return 0; } return _stakedBalances[account] .add(iEscrowThales.getStakedEscrowedBalanceForRewards(account)) .mul(currentPeriodFees) .div(totalStakedLastPeriodEnd.add(totalEscrowedLastPeriodEnd)); } function _getSNXStakedForAccount(address account) internal view returns (uint snxStaked) { if (address(addressResolver) != address(0)) { uint cRatio = getCRatio(account); uint targetRatio = getSNXTargetRatio(); uint snxPrice = priceFeed.rateForCurrency("SNX"); uint debt = ISNXRewards(getSNXRewardsAddress()).debtBalanceOf(account, "sUSD"); if (cRatio < targetRatio) { snxStaked = (cRatio.mul(cRatio).mul(debt).mul(1e14)).div(targetRatio.mul(snxPrice)); } else { snxStaked = (targetRatio.mul(debt).mul(1e14)).div(snxPrice); } } } function _getTotalAMMVolume(address account) internal view returns (uint totalAMMforAccount) { if (!(periodsOfStaking >= lastAMMUpdatePeriod[account].add(AMM_EXTRA_REWARD_PERIODS))) { for (uint i = 0; i < AMM_EXTRA_REWARD_PERIODS; i++) { if (periodsOfStaking < stakerAMMVolume[account][i].period.add(AMM_EXTRA_REWARD_PERIODS)) totalAMMforAccount = totalAMMforAccount.add(stakerAMMVolume[account][i].amount); } } } /* ========== EVENTS ========== */ event RewardAdded(uint reward); event Staked(address user, uint amount); event StakedOnBehalf(address user, address staker, uint amount); event ClosedPeriod(uint PeriodOfStaking, uint lastPeriodTimeStamp); event RewardsClaimed(address account, uint unclaimedReward, uint baseRewards, uint snxBonus, uint protocolBonus); event FeeRewardsClaimed(address account, uint unclaimedFees); event UnstakeCooldown(address account, uint cooldownTime, uint amount); event CancelUnstake(address account); event Unstaked(address account, uint unstakeAmount); event StakingParametersChanged( bool claimEnabled, bool distributeFeesEnabled, uint durationPeriod, uint unstakeDurationPeriod, bool mergeAccountEnabled ); event StakingRewardsParametersChanged( uint fixedPeriodReward, uint periodExtraReward, bool extraRewardsActive, uint maxSNXRewardsPercentage, uint maxAMMVolumeRewardsPercentage, uint maxThalesRoyaleRewardsPercentage, uint SNXVolumeRewardsMultiplier, uint AMMVolumeRewardsMultiplier ); event AddressesChanged( address SNXRewards, address thalesAMM, address thalesRangedAMM, address sportsAMM, address priceFeed, address ThalesStakingRewardsPool, address addressResolver, address sportsAMMLiquidityPool, address thalesAMMLiquidityPool, address parlayAMMLiquidityPool, address stakingThalesBonusRewardsManager ); event EscrowChanged(address newEscrow); event StakingPeriodStarted(); event AMMVolumeUpdated(address account, uint amount, address source); event AccountMerged(address srcAccount, address destAccount); event DelegatedVolume(address destAccount); event CanClaimOnBehalfChanged(address sender, address account, bool canClaimOnBehalf); event SupportedAMMVaultSet(address vault, bool value); event SupportedSportVaultSet(address vault, bool value); }
pragma solidity ^0.5.0; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. // A Solidity high level call has three parts: // 1. The target address is checked to verify it contains contract code // 2. The call itself is made, and success asserted // 3. The return value is decoded, which in turn checks the size of the returned data. // solhint-disable-next-line max-line-length require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
pragma solidity ^0.5.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, "SafeMath: division by zero"); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "SafeMath: modulo by zero"); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.5.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.5.16; // 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 pragma solidity ^0.5.16; // Inheritance import "./ProxyOwned.sol"; // Clone of syntetix contract without constructor contract ProxyPausable is ProxyOwned { uint public lastPauseTime; bool public paused; /** * @notice Change the paused state of the contract * @dev Only the contract owner may call this. */ function setPaused(bool _paused) external onlyOwner { // Ensure we're actually changing the state before we do anything if (_paused == paused) { return; } // Set our paused state. paused = _paused; // If applicable, set the last pause time. if (paused) { lastPauseTime = block.timestamp; } // Let everyone know that our pause state has changed. emit PauseChanged(paused); } event PauseChanged(bool isPaused); modifier notPaused { require(!paused, "This action cannot be performed while the contract is paused"); _; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.4.24 <0.7.0; /** * @title Initializable * * @dev Helper contract to support initializer functions. To use it, replace * the constructor with a function that has the `initializer` modifier. * WARNING: Unlike constructors, initializer functions must be manually * invoked. This applies both to deploying an Initializable contract, as well * as extending an Initializable contract via inheritance. * WARNING: When used with inheritance, manual care must be taken to not invoke * a parent initializer twice, or ensure that all initializers are idempotent, * because this is not dealt with automatically as with constructors. */ 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 use in the initializer function of a contract. */ modifier initializer() { require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized"); bool isTopLevelCall = !initializing; if (isTopLevelCall) { initializing = true; initialized = true; } _; if (isTopLevelCall) { initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { // extcodesize checks the size of the code stored in an address, and // address returns the current address. Since the code is still not // deployed when running a constructor, any checks on its code size will // yield zero, making it an effective way to detect if a contract is // under construction or not. address self = address(this); uint256 cs; assembly { cs := extcodesize(self) } return cs == 0; } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; interface IEscrowThales { /* ========== VIEWS / VARIABLES ========== */ function getStakerPeriod(address account, uint index) external view returns (uint); function getStakerAmounts(address account, uint index) external view returns (uint); function totalAccountEscrowedAmount(address account) external view returns (uint); function getStakedEscrowedBalanceForRewards(address account) external view returns (uint); function totalEscrowedRewards() external view returns (uint); function totalEscrowBalanceNotIncludedInStaking() external view returns (uint); function currentVestingPeriod() external view returns (uint); function updateCurrentPeriod() external returns (bool); function claimable(address account) external view returns (uint); function addToEscrow(address account, uint amount) external; function vest(uint amount) external returns (bool); function addTotalEscrowBalanceNotIncludedInStaking(uint amount) external; function subtractTotalEscrowBalanceNotIncludedInStaking(uint amount) external; function mergeAccount(address srcAccount, address destAccount) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; interface IStakingThales { function updateVolume(address account, uint amount) external; /* ========== VIEWS / VARIABLES ========== */ function totalStakedAmount() external view returns (uint); function stakedBalanceOf(address account) external view returns (uint); function currentPeriodRewards() external view returns (uint); function currentPeriodFees() external view returns (uint); function getLastPeriodOfClaimedRewards(address account) external view returns (uint); function getRewardsAvailable(address account) external view returns (uint); function getRewardFeesAvailable(address account) external view returns (uint); function getAlreadyClaimedRewards(address account) external view returns (uint); function getContractRewardFunds() external view returns (uint); function getContractFeeFunds() external view returns (uint); function getAMMVolume(address account) external view returns (uint); }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; interface ISNXRewards { /* ========== VIEWS / VARIABLES ========== */ function collateralisationRatioAndAnyRatesInvalid(address account) external view returns (uint, bool); function debtBalanceOf(address _issuer, bytes32 currencyKey) external view returns (uint); function issuanceRatio() external view returns (uint); function setCRatio(address account, uint _c_ratio) external; function setIssuanceRatio(uint _issuanceRation) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; pragma experimental ABIEncoderV2; import "../interfaces/IPassportPosition.sol"; interface IThalesRoyale { /* ========== VIEWS / VARIABLES ========== */ function getBuyInAmount() external view returns (uint); function season() external view returns (uint); function tokenSeason(uint tokenId) external view returns (uint); function seasonFinished(uint _season) external view returns (bool); function roundInASeason(uint _round) external view returns (uint); function roundResultPerSeason(uint _season, uint round) external view returns (uint); function isTokenAliveInASpecificSeason(uint tokenId, uint _season) external view returns (bool); function hasParticipatedInCurrentOrLastRoyale(address _player) external view returns (bool); function getTokenPositions(uint tokenId) external view returns (IPassportPosition.Position[] memory); }
// 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.5.16; interface IThalesStakingRewardsPool { function addToEscrow(address account, uint amount) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.5.16; interface IAddressResolver { /* ========== VIEWS / VARIABLES ========== */ function getAddress(bytes32 name) external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; interface ISportsAMMLiquidityPool { /* ========== VIEWS / VARIABLES ========== */ function isUserLPing(address user) external view returns (bool isUserInLP); }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; interface IThalesAMMLiquidityPool { /* ========== VIEWS / VARIABLES ========== */ function isUserLPing(address user) external view returns (bool isUserInLP); }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; interface IParlayAMMLiquidityPool { function commitTrade(address market, uint amountToMint) external; function getMarketRound(address market) external view returns (uint _round); function getMarketPool(address market) external view returns (address roundPool); function transferToPool(address market, uint amount) external; function isUserLPing(address user) external view returns (bool isUserInLP); }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; import "./IPriceFeed.sol"; interface IThalesAMM { enum Position { Up, Down } function manager() external view returns (address); function availableToBuyFromAMM(address market, Position position) external view returns (uint); function impliedVolatilityPerAsset(bytes32 oracleKey) external view returns (uint); function buyFromAmmQuote( address market, Position position, uint amount ) external view returns (uint); function buyFromAMM( address market, Position position, uint amount, uint expectedPayout, uint additionalSlippage ) external returns (uint); function availableToSellToAMM(address market, Position position) external view returns (uint); function sellToAmmQuote( address market, Position position, uint amount ) external view returns (uint); function sellToAMM( address market, Position position, uint amount, uint expectedPayout, uint additionalSlippage ) external returns (uint); function isMarketInAMMTrading(address market) external view returns (bool); function price(address market, Position position) external view returns (uint); function buyPriceImpact( address market, Position position, uint amount ) external view returns (int); function sellPriceImpact( address market, Position position, uint amount ) external view returns (int); function priceFeed() external view returns (IPriceFeed); }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; import "../interfaces/IPositionalMarket.sol"; interface IPositionalMarketManager { /* ========== VIEWS / VARIABLES ========== */ function durations() external view returns (uint expiryDuration, uint maxTimeToMaturity); function capitalRequirement() external view returns (uint); function marketCreationEnabled() external view returns (bool); function onlyAMMMintingAndBurning() external view returns (bool); function transformCollateral(uint value) external view returns (uint); function reverseTransformCollateral(uint value) external view returns (uint); function totalDeposited() external view returns (uint); function numActiveMarkets() external view returns (uint); function activeMarkets(uint index, uint pageSize) external view returns (address[] memory); function numMaturedMarkets() external view returns (uint); function maturedMarkets(uint index, uint pageSize) external view returns (address[] memory); function isActiveMarket(address candidate) external view returns (bool); function isKnownMarket(address candidate) external view returns (bool); function getThalesAMM() external view returns (address); /* ========== MUTATIVE FUNCTIONS ========== */ function createMarket( bytes32 oracleKey, uint strikePrice, uint maturity, uint initialMint // initial sUSD to mint options for, ) external returns (IPositionalMarket); function resolveMarket(address market) external; function expireMarkets(address[] calldata market) external; function transferSusdTo( address sender, address receiver, uint amount ) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; interface IStakingThalesBonusRewardsManager { function storePoints( address user, address origin, uint basePoins, uint round ) external; function getUserRoundBonusShare(address user, uint round) external view returns (uint); function useNewBonusModel() external view returns (bool); }
pragma solidity ^0.5.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `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. * * > 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); }
pragma solidity ^0.5.0; /** * @dev Collection of functions related to the address type, */ library Address { /** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * > It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. */ function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; interface IPassportPosition { struct Position { uint round; uint position; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; import "../interfaces/IPositionalMarketManager.sol"; import "../interfaces/IPosition.sol"; import "../interfaces/IPriceFeed.sol"; interface IPositionalMarket { /* ========== TYPES ========== */ enum Phase { Trading, Maturity, Expiry } enum Side { Up, Down } /* ========== VIEWS / VARIABLES ========== */ function getOptions() external view returns (IPosition up, IPosition down); function times() external view returns (uint maturity, uint destructino); function getOracleDetails() external view returns ( bytes32 key, uint strikePrice, uint finalPrice ); function fees() external view returns (uint poolFee, uint creatorFee); function deposited() external view returns (uint); function creator() external view returns (address); function resolved() external view returns (bool); function phase() external view returns (Phase); function oraclePrice() external view returns (uint); function oraclePriceAndTimestamp() external view returns (uint price, uint updatedAt); function canResolve() external view returns (bool); function result() external view returns (Side); function balancesOf(address account) external view returns (uint up, uint down); function totalSupplies() external view returns (uint up, uint down); function getMaximumBurnable(address account) external view returns (uint amount); /* ========== MUTATIVE FUNCTIONS ========== */ function mint(uint value) external; function exerciseOptions() external returns (uint); function burnOptions(uint amount) external; function burnOptionsMaximum() external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; import "./IPositionalMarket.sol"; interface IPosition { /* ========== VIEWS / VARIABLES ========== */ function getBalanceOf(address account) external view returns (uint); function getTotalSupply() external view returns (uint); function exerciseWithAmount(address claimant, uint amount) external; }
{ "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":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"source","type":"address"}],"name":"AMMVolumeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"srcAccount","type":"address"},{"indexed":false,"internalType":"address","name":"destAccount","type":"address"}],"name":"AccountMerged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"SNXRewards","type":"address"},{"indexed":false,"internalType":"address","name":"thalesAMM","type":"address"},{"indexed":false,"internalType":"address","name":"thalesRangedAMM","type":"address"},{"indexed":false,"internalType":"address","name":"sportsAMM","type":"address"},{"indexed":false,"internalType":"address","name":"priceFeed","type":"address"},{"indexed":false,"internalType":"address","name":"ThalesStakingRewardsPool","type":"address"},{"indexed":false,"internalType":"address","name":"addressResolver","type":"address"},{"indexed":false,"internalType":"address","name":"sportsAMMLiquidityPool","type":"address"},{"indexed":false,"internalType":"address","name":"thalesAMMLiquidityPool","type":"address"},{"indexed":false,"internalType":"address","name":"parlayAMMLiquidityPool","type":"address"},{"indexed":false,"internalType":"address","name":"stakingThalesBonusRewardsManager","type":"address"}],"name":"AddressesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"canClaimOnBehalf","type":"bool"}],"name":"CanClaimOnBehalfChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"CancelUnstake","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"PeriodOfStaking","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lastPeriodTimeStamp","type":"uint256"}],"name":"ClosedPeriod","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"destAccount","type":"address"}],"name":"DelegatedVolume","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newEscrow","type":"address"}],"name":"EscrowChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"unclaimedFees","type":"uint256"}],"name":"FeeRewardsClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isPaused","type":"bool"}],"name":"PauseChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"unclaimedReward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"baseRewards","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"snxBonus","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"protocolBonus","type":"uint256"}],"name":"RewardsClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"StakedOnBehalf","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"claimEnabled","type":"bool"},{"indexed":false,"internalType":"bool","name":"distributeFeesEnabled","type":"bool"},{"indexed":false,"internalType":"uint256","name":"durationPeriod","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"unstakeDurationPeriod","type":"uint256"},{"indexed":false,"internalType":"bool","name":"mergeAccountEnabled","type":"bool"}],"name":"StakingParametersChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"StakingPeriodStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fixedPeriodReward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"periodExtraReward","type":"uint256"},{"indexed":false,"internalType":"bool","name":"extraRewardsActive","type":"bool"},{"indexed":false,"internalType":"uint256","name":"maxSNXRewardsPercentage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxAMMVolumeRewardsPercentage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxThalesRoyaleRewardsPercentage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"SNXVolumeRewardsMultiplier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"AMMVolumeRewardsMultiplier","type":"uint256"}],"name":"StakingRewardsParametersChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"bool","name":"value","type":"bool"}],"name":"SupportedAMMVaultSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"bool","name":"value","type":"bool"}],"name":"SupportedSportVaultSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"cooldownTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"UnstakeCooldown","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"unstakeAmount","type":"uint256"}],"name":"Unstaked","type":"event"},{"constant":true,"inputs":[],"name":"AMMVolumeRewardsMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SNXRewards","outputs":[{"internalType":"contract ISNXRewards","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SNXVolumeRewardsMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ThalesStakingRewardsPool","outputs":[{"internalType":"contract IThalesStakingRewardsPool","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"addressResolver","outputs":[{"internalType":"contract IAddressResolver","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"canClaimOnBehalf","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"canClosePeriod","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"cancelUnstake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"claimEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"claimReward","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"claimRewardOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"closePeriod","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"currentPeriodFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"currentPeriodRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"delegateVolume","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"delegatedVolume","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"distributeFeesEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"durationPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"exoticBonds","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"extraRewardsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"feeToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fixedPeriodReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getAMMBonus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getAMMBonusPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getAMMVolume","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getAlreadyClaimedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getBaseReward","outputs":[{"internalType":"uint256","name":"_baseRewards","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getCRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getContractFeeFunds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getContractRewardFunds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getExoticMarketsVolume","outputs":[{"internalType":"uint256","name":"volumeforAccount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getLastPeriodOfClaimedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getRewardFeesAvailable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getRewardsAvailable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getSNXBonus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getSNXBonusPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getSNXDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getSNXRateForCurrency","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getSNXRewardsAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getSNXStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getSNXTargetRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getSportsAMMVolume","outputs":[{"internalType":"uint256","name":"volumeforAccount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getThalesAMMVolume","outputs":[{"internalType":"uint256","name":"volumeforAccount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getThalesRangedAMMVolume","outputs":[{"internalType":"uint256","name":"volumeforAccount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getTotalBonus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getTotalBonusPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"iEscrowThales","outputs":[{"internalType":"contract IEscrowThales","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"initNonReentrant","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_iEscrowThales","type":"address"},{"internalType":"address","name":"_stakingToken","type":"address"},{"internalType":"address","name":"_feeToken","type":"address"},{"internalType":"uint256","name":"_durationPeriod","type":"uint256"},{"internalType":"uint256","name":"_unstakeDurationPeriod","type":"uint256"},{"internalType":"address","name":"_ISNXRewards","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"lastPauseTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastPeriodTimeStamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastUnstakeTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maxAMMVolumeRewardsPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maxSNXRewardsPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maxThalesRoyaleRewardsPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"destAccount","type":"address"}],"name":"mergeAccount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"mergeAccountEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"parlayAMMLiquidityPool","outputs":[{"internalType":"contract IParlayAMMLiquidityPool","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"periodExtraReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"periodsOfStaking","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"priceFeed","outputs":[{"internalType":"contract IPriceFeed","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_snxRewards","type":"address"},{"internalType":"address","name":"_thalesAMM","type":"address"},{"internalType":"address","name":"_thalesRangedAMM","type":"address"},{"internalType":"address","name":"_sportsAMM","type":"address"},{"internalType":"address","name":"_priceFeed","type":"address"},{"internalType":"address","name":"_thalesStakingRewardsPool","type":"address"},{"internalType":"address","name":"_addressResolver","type":"address"},{"internalType":"address","name":"_sportsAMMLiquidityPool","type":"address"},{"internalType":"address","name":"_thalesAMMLiquidityPool","type":"address"},{"internalType":"address","name":"_parlayAMMLiquidityPool","type":"address"},{"internalType":"address","name":"_stakingThalesBonusRewardsManager","type":"address"}],"name":"setAddresses","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"_canClaimOnBehalf","type":"bool"}],"name":"setCanClaimOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_escrowThalesContract","type":"address"}],"name":"setEscrow","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bool","name":"_claimEnabled","type":"bool"},{"internalType":"bool","name":"_distributeFeesEnabled","type":"bool"},{"internalType":"uint256","name":"_durationPeriod","type":"uint256"},{"internalType":"uint256","name":"_unstakeDurationPeriod","type":"uint256"},{"internalType":"bool","name":"_mergeAccountEnabled","type":"bool"}],"name":"setStakingParameters","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_fixedReward","type":"uint256"},{"internalType":"uint256","name":"_extraReward","type":"uint256"},{"internalType":"bool","name":"_extraRewardsActive","type":"bool"},{"internalType":"uint256","name":"_maxSNXRewardsPercentage","type":"uint256"},{"internalType":"uint256","name":"_maxAMMVolumeRewardsPercentage","type":"uint256"},{"internalType":"uint256","name":"_maxThalesRoyaleRewardsPercentage","type":"uint256"},{"internalType":"uint256","name":"_SNXVolumeRewardsMultiplier","type":"uint256"},{"internalType":"uint256","name":"_AMMVolumeRewardsMultiplier","type":"uint256"}],"name":"setStakingRewardsParameters","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_ammVault","type":"address"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setSupportedAMMVault","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_sportVault","type":"address"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setSupportedSportVault","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"sportsAMM","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"sportsAMMLiquidityPool","outputs":[{"internalType":"contract ISportsAMMLiquidityPool","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"stakedBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakerFeesClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakerLifetimeRewardsClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"stakingThalesBonusRewardsManager","outputs":[{"internalType":"contract IStakingThalesBonusRewardsManager","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"startStakingPeriod","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"startTimeStamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"startUnstake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"supportedAMMVault","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"supportedSportVault","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"thalesAMM","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"thalesAMMLiquidityPool","outputs":[{"internalType":"contract IThalesAMMLiquidityPool","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"thalesRangedAMM","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"thalesRoyale","outputs":[{"internalType":"contract IThalesRoyale","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalEscrowedLastPeriodEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSNXFeesInPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSNXRewardsInPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalStakedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalStakedLastPeriodEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"proxyAddress","type":"address"}],"name":"transferOwnershipAtInit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"unstake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"unstakeDurationPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"unstaking","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"unstakingAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"updateVolume","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50615dc080620000216000396000f3fe608060405234801561001057600080fd5b50600436106105ed5760003560e01c806379ba50971161031b578063b9cce86a116101a8578063d66e0677116100f4578063ebc79772116100ad578063faa27d5111610087578063faa27d5114610f49578063faa7b9dd14610f51578063fd143c0b14610f8c578063fe3783d314610fb2576105ed565b8063ebc7977214610f13578063ed778fe814610f1b578063f38d00f014610f41576105ed565b8063d66e067714610ec5578063d78fc29014610ecd578063da42840014610ed5578063e11cd05514610edd578063e81a252614610ee5578063ebaf5b3c14610f0b576105ed565b8063c5335ac611610161578063c99252881161013b578063c992528814610e69578063cb8d751a14610e71578063cf26dbbc14610e97578063d506950a14610e9f576105ed565b8063c5335ac614610e15578063c598694914610e3b578063c731a3d114610e61576105ed565b8063b9cce86a14610d6d578063ba47a5d914610d93578063bbe3aa3714610d9b578063bd45006214610da3578063c10c354614610dc9578063c3b83f5f14610def576105ed565b80639a109bc211610267578063a4ea739611610220578063a7c153a6116101fa578063a7c153a614610d11578063ac8e71ea14610d37578063afac7fb114610d5d578063b88a802f14610d65576105ed565b8063a4ea739614610cc6578063a5ec43cc14610cec578063a694fc3a14610cf4576105ed565b80639a109bc214610c165780639e6b892b14610c3c578063a00159a814610c62578063a0ad222914610c90578063a3c4a50b14610cb6578063a4bce4ac14610cbe576105ed565b80638da5cb5b116102d457806391b4ded9116102ae57806391b4ded914610bd857806393eb2e6614610be057806395910db214610be85780639a09edab14610bf0576105ed565b80638da5cb5b14610ba2578063907bfe1214610baa578063915518dc14610bb2576105ed565b806379ba509714610b365780637a68567714610b3e5780637c17f6fc14610b645780637dbbdea014610b6c57806384854b1914610b745780638a239de814610b7c576105ed565b806347dda6ec1161049957806360962e06116103e557806364c835911161039e57806372f702f31161037857806372f702f314610a84578063741bef1a14610a8c57806378d2b68314610a945780637985c5e414610aba576105ed565b806364c8359114610a0257806366c4c8c714610a285780636dca3b0214610a30576105ed565b806360962e061461095457806361654fae1461097a57806361c01db7146109c457806362139e0e146109ea5780636282719e146109f2578063647846a5146109fa576105ed565b806353a47bb711610452578063567e98f91161042c578063567e98f914610934578063572e36e61461093c5780635c975abb14610944578063608daf891461094c576105ed565b806353a47bb7146108f657806353cf4115146108fe57806356091ad114610906576105ed565b806347dda6ec146108645780634ab179691461088a5780634c4e75df146108925780634ed25b43146108b8578063505b1497146108c0578063507a7328146108ee576105ed565b806320074354116105585780632f3241581161051157806336468b5a116104eb57806336468b5a146108265780633acf4a161461084c5780633faae5341461085457806346bfba301461085c576105ed565b80632f324158146107db578063331e03a8146107e357806334dfb26814610809576105ed565b80632007435414610779578063203d3718146107815780632866ed21146107895780632a1a1e48146107a55780632d287886146107ad5780632def6620146107d3576105ed565b806315da5064116105aa57806315da5064146106d05780631627540c146106d857806316765391146106fe57806316c38b3c1461072457806317433c91146107435780631cb70a9514610771576105ed565b806302c7739b146105f257806305a2ee2a1461062057806305ce342914610644578063080e2b471461064c5780631314f7591461068457806313af4035146106aa575b600080fd5b61061e6004803603604081101561060857600080fd5b506001600160a01b038135169060200135610fba565b005b610628611804565b604080516001600160a01b039092168252519081900360200190f35b610628611813565b6106726004803603602081101561066257600080fd5b50356001600160a01b0316611822565b60408051918252519081900360200190f35b6106726004803603602081101561069a57600080fd5b50356001600160a01b0316611834565b61061e600480360360208110156106c057600080fd5b50356001600160a01b0316611847565b61067261195c565b61061e600480360360208110156106ee57600080fd5b50356001600160a01b0316611962565b6106726004803603602081101561071457600080fd5b50356001600160a01b03166119be565b61061e6004803603602081101561073a57600080fd5b503515156119d9565b61061e6004803603604081101561075957600080fd5b506001600160a01b0381351690602001351515611a53565b610628611abf565b610672611ad3565b610628611ad9565b610791611ae8565b604080519115158252519081900360200190f35b610672611af1565b610672600480360360208110156107c357600080fd5b50356001600160a01b0316611af7565b61061e611b09565b610628611c89565b610672600480360360208110156107f957600080fd5b50356001600160a01b0316611c9d565b61061e6004803603602081101561081f57600080fd5b5035611caf565b6106726004803603602081101561083c57600080fd5b50356001600160a01b03166122c2565b6106286124af565b6106726124be565b610628612549565b6107916004803603602081101561087a57600080fd5b50356001600160a01b0316612558565b61061e61256d565b610672600480360360208110156108a857600080fd5b50356001600160a01b03166126ed565b610672612708565b61061e600480360360408110156108d657600080fd5b506001600160a01b038135169060200135151561270e565b61061e612829565b610628612c4e565b610791612c5d565b61061e6004803603604081101561091c57600080fd5b506001600160a01b0381351690602001351515612c66565b610672612cd2565b610628612cd8565b610791612ce7565b610672612cf0565b6106726004803603602081101561096a57600080fd5b50356001600160a01b0316612cf6565b61061e600480360361010081101561099157600080fd5b50803590602081013590604081013515159060608101359060808101359060a08101359060c08101359060e00135612d95565b61061e600480360360208110156109da57600080fd5b50356001600160a01b0316612e3f565b610672612fb2565b61061e612fb8565b61062861306f565b61067260048036036020811015610a1857600080fd5b50356001600160a01b031661307e565b610628613090565b61061e600480360360e0811015610a4657600080fd5b506001600160a01b03813581169160208101358216916040820135811691606081013582169160808201359160a08101359160c0909101351661309f565b61062861325b565b61062861326a565b61067260048036036020811015610aaa57600080fd5b50356001600160a01b0316613279565b61061e6004803603610160811015610ad157600080fd5b506001600160a01b038135811691602081013582169160408201358116916060810135821691608082013581169160a081013582169160c082013581169160e0810135821691610100820135811691610120810135821691610140909101351661332a565b61061e613484565b61067260048036036020811015610b5457600080fd5b50356001600160a01b0316613540565b61067261354b565b610628613551565b6106726135f3565b61067260048036036020811015610b9257600080fd5b50356001600160a01b0316613682565b61062861369d565b6106726136ac565b61067260048036036020811015610bc857600080fd5b50356001600160a01b03166136b2565b610672613723565b610672613729565b61067261372f565b61067260048036036020811015610c0657600080fd5b50356001600160a01b0316613735565b61067260048036036020811015610c2c57600080fd5b50356001600160a01b0316613740565b61067260048036036020811015610c5257600080fd5b50356001600160a01b031661387a565b61079160048036036040811015610c7857600080fd5b506001600160a01b03813581169160200135166138b1565b61067260048036036020811015610ca657600080fd5b50356001600160a01b03166138d1565b610628613942565b610791613951565b61067260048036036020811015610cdc57600080fd5b50356001600160a01b031661395a565b6106286139f2565b61061e60048036036020811015610d0a57600080fd5b5035613a01565b61067260048036036020811015610d2757600080fd5b50356001600160a01b0316613ad8565b61067260048036036020811015610d4d57600080fd5b50356001600160a01b0316613c26565b610791613c97565b61061e613cc3565b61067260048036036020811015610d8357600080fd5b50356001600160a01b0316613d5d565b610672613d68565b610628613d6e565b61062860048036036020811015610db957600080fd5b50356001600160a01b0316613d7d565b61061e60048036036020811015610ddf57600080fd5b50356001600160a01b0316613d98565b61061e60048036036020811015610e0557600080fd5b50356001600160a01b0316613f21565b61061e60048036036020811015610e2b57600080fd5b50356001600160a01b0316614040565b61067260048036036020811015610e5157600080fd5b50356001600160a01b0316614834565b61079161484d565b610628614856565b61079160048036036020811015610e8757600080fd5b50356001600160a01b0316614865565b61067261487a565b61067260048036036020811015610eb557600080fd5b50356001600160a01b0316614880565b610672614920565b61067261496b565b610672614971565b6106726149c2565b61061e60048036036020811015610efb57600080fd5b50356001600160a01b03166149c8565b610672614a6d565b61061e614a73565b61067260048036036020811015610f3157600080fd5b50356001600160a01b0316614ad6565b610672614b01565b610672614b07565b61061e600480360360a0811015610f6757600080fd5b5080351515906020810135151590604081013590606081013590608001351515614b0d565b61079160048036036020811015610fa257600080fd5b50356001600160a01b0316614ba1565b610672614bb6565b6001600160a01b03821615801590610fd25750600081115b611014576040805162461bcd60e51b815260206004820152600e60248201526d496e76616c696420706172616d7360901b604482015290519081900360640190fd5b6001600160a01b038281166000908152607260205260409020541615611053576001600160a01b03918216600090815260726020526040902054909116905b6058546001600160a01b031633148061107657506064546001600160a01b031633145b8061108b57506066546001600160a01b031633145b806110a057506067546001600160a01b031633145b806110ba57503360009081526073602052604090205460ff165b806110d457503360009081526074602052604090205460ff165b611117576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b606760009054906101000a90046001600160a01b03166001600160a01b031663481c6a756040518163ffffffff1660e01b815260040160206040518083038186803b15801561116557600080fd5b505afa158015611179573d6000803e3d6000fd5b505050506040513d602081101561118f57600080fd5b505160408051630bfec24d60e11b81526004810184905290516001600160a01b03909216916317fd849a91602480820192602092909190829003018186803b1580156111da57600080fd5b505afa1580156111ee573d6000803e3d6000fd5b505050506040513d602081101561120457600080fd5b5051603e546001600160a01b03841660009081526059602052604090205491925011156112c1576001600160a01b0382166000908152605a60205260408120603e5461125790600463ffffffff614bbc16565b6004811061126157fe5b6002020155603e546001600160a01b0383166000908152605a6020526040902061129282600463ffffffff614bbc16565b6004811061129c57fe5b6002020160010155603e546001600160a01b0383166000908152605960205260409020555b6001600160a01b0382166000908152605a60205260409020603e5461130e9183916112f390600463ffffffff614bbc16565b600481106112fd57fe5b60020201549063ffffffff614c2316565b6001600160a01b0383166000908152605a60205260409020603e5461133a90600463ffffffff614bbc16565b6004811061134457fe5b60020201556058546001600160a01b031633148061137157503360009081526074602052604090205460ff165b1561149c57603e546001600160a01b038316600090815260686020526040902054101561142e576001600160a01b0382166000908152606960205260408120603e546113c490600463ffffffff614bbc16565b600481106113ce57fe5b6002020155603e546001600160a01b03831660009081526069602052604090206113ff82600463ffffffff614bbc16565b6004811061140957fe5b6002020160010155603e546001600160a01b0383166000908152606860205260409020555b6001600160a01b0382166000908152606960205260409020603e546114609183916112f390600463ffffffff614bbc16565b6001600160a01b0383166000908152606960205260409020603e5461148c90600463ffffffff614bbc16565b6004811061149657fe5b60020201555b6066546001600160a01b03163314156115d557603e546001600160a01b0383166000908152606a60205260409020541015611567576001600160a01b0382166000908152606b60205260408120603e546114fd90600463ffffffff614bbc16565b6004811061150757fe5b6002020155603e546001600160a01b0383166000908152606b6020526040902061153882600463ffffffff614bbc16565b6004811061154257fe5b6002020160010155603e546001600160a01b0383166000908152606a60205260409020555b6001600160a01b0382166000908152606b60205260409020603e546115999183916112f390600463ffffffff614bbc16565b6001600160a01b0383166000908152606b60205260409020603e546115c590600463ffffffff614bbc16565b600481106115cf57fe5b60020201555b6067546001600160a01b03163314806115fd57503360009081526073602052604090205460ff165b1561172857603e546001600160a01b0383166000908152606e602052604090205410156116ba576001600160a01b0382166000908152606f60205260408120603e5461165090600463ffffffff614bbc16565b6004811061165a57fe5b6002020155603e546001600160a01b0383166000908152606f6020526040902061168b82600463ffffffff614bbc16565b6004811061169557fe5b6002020160010155603e546001600160a01b0383166000908152606e60205260409020555b6001600160a01b0382166000908152606f60205260409020603e546116ec9183916112f390600463ffffffff614bbc16565b6001600160a01b0383166000908152606f60205260409020603e5461171890600463ffffffff614bbc16565b6004811061172257fe5b60020201555b6077546001600160a01b0316156117b857607754603e54604080516352a31c0760e01b81526001600160a01b038681166004830152336024830152604482018690526064820193909352905191909216916352a31c0791608480830192600092919082900301818387803b15801561179f57600080fd5b505af11580156117b3573d6000803e3d6000fd5b505050505b604080516001600160a01b038416815260208101839052338183015290517fb43a20c9abfed93eb48264a3acf807336352ba8cb6ee42c1754b1b1b280a20b99181900360600190a15050565b6065546001600160a01b031681565b6064546001600160a01b031681565b604c6020526000908152604090205481565b600061183f82614c7d565b90505b919050565b6001600160a01b0381166118a2576040805162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b603454600160a01b900460ff16156118eb5760405162461bcd60e51b8152600401808060200182810382526029815260200180615af66029913960400191505060405180910390fd5b6034805460ff60a01b1916600160a01b179055603380546001600160a01b0383166001600160a01b031990911681179091556040805160008152602081019290925280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a150565b60465481565b61196a614d61565b603480546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b6001600160a01b031660009081526056602052604090205490565b6119e1614d61565b60385460ff16151581151514156119f757611a50565b6038805460ff1916821515179081905560ff1615611a1457426037555b6038546040805160ff90921615158252517f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec59181900360200190a15b50565b611a5b614d61565b6001600160a01b038216600081815260736020908152604091829020805460ff191685151590811790915582519384529083015280517fd2a8401466e7483577592b4b5160af1ba59060100f12387853477637096cfb919281900390910190a15050565b605b5461010090046001600160a01b031681565b603f5481565b6066546001600160a01b031681565b604a5460ff1681565b605f5481565b60556020526000908152604090205481565b60385460ff1615611b4b5760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b3360009081526054602052604090205460ff16611b995760405162461bcd60e51b815260040180806020018281038252602a815260200180615b48602a913960400191505060405180910390fd5b604154611bad90429063ffffffff614dac16565b3360009081526053602052604090205410611bf95760405162461bcd60e51b8152600401808060200182810382526029815260200180615b1f6029913960400191505060405180910390fd5b336000818152605460209081526040808320805460ff1916905560559091529020546039549091611c3a916001600160a01b0316908363ffffffff614e0916565b336000818152605560209081526040808320929092558151928352820183905280517f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f759281900390910190a150565b60385461010090046001600160a01b031681565b60536020526000908152604090205481565b60385460ff1615611cf15760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b60008111611d39576040805162461bcd60e51b815260206004820152601060248201526f043616e6e6f7420756e7374616b6520360841b604482015290519081900360640190fd5b33600090815260566020526040902054811115611d875760405162461bcd60e51b8152600401808060200182810382526024815260200180615d036024913960400191505060405180910390fd5b3360009081526054602052604090205460ff1615611dd65760405162461bcd60e51b815260040180806020018281038252602e815260200180615c5b602e913960400191505060405180910390fd5b6075546001600160a01b031615611ead5760755460408051633656b51760e21b815233600482015290516001600160a01b039092169163d95ad45c91602480820192602092909190829003018186803b158015611e3257600080fd5b505afa158015611e46573d6000803e3d6000fd5b505050506040513d6020811015611e5c57600080fd5b505115611ead576040805162461bcd60e51b815260206004820152601a60248201527943616e6e6f7420756e7374616b65207768696c65204c50696e6760301b604482015290519081900360640190fd5b6076546001600160a01b031615611f845760765460408051633656b51760e21b815233600482015290516001600160a01b039092169163d95ad45c91602480820192602092909190829003018186803b158015611f0957600080fd5b505afa158015611f1d573d6000803e3d6000fd5b505050506040513d6020811015611f3357600080fd5b505115611f84576040805162461bcd60e51b815260206004820152601a60248201527943616e6e6f7420756e7374616b65207768696c65204c50696e6760301b604482015290519081900360640190fd5b6078546001600160a01b03161561205b5760785460408051633656b51760e21b815233600482015290516001600160a01b039092169163d95ad45c91602480820192602092909190829003018186803b158015611fe057600080fd5b505afa158015611ff4573d6000803e3d6000fd5b505050506040513d602081101561200a57600080fd5b50511561205b576040805162461bcd60e51b815260206004820152601a60248201527943616e6e6f7420756e7374616b65207768696c65204c50696e6760301b604482015290519081900360640190fd5b600061206633614e60565b11156120755761207533614eaf565b33600090815260536020908152604080832042905560549091529020805460ff19166001179055604d546120af908263ffffffff614dac16565b604d5533600090815260556020908152604080832084905560569091529020546120df908263ffffffff614dac16565b33600090815260566020526040902081905561225157603854604080516334c78ae560e11b8152336004820152905160009261010090046001600160a01b03169163698f15ca916024808301926020929190829003018186803b15801561214557600080fd5b505afa158015612159573d6000803e3d6000fd5b505050506040513d602081101561216f57600080fd5b5051111561225157603854604080516334c78ae560e11b815233600482015290516101009092046001600160a01b031691635817d04291839163698f15ca91602480820192602092909190829003018186803b1580156121ce57600080fd5b505afa1580156121e2573d6000803e3d6000fd5b505050506040513d60208110156121f857600080fd5b5051604080516001600160e01b031960e085901b168152600481019290925251602480830192600092919082900301818387803b15801561223857600080fd5b505af115801561224c573d6000803e3d6000fd5b505050505b604154336000818152605360205260409020547f30797de805f090008d8b19fa0c6f92d0f164789f64d6f7a1b097fbf0b1abac6b92612296919063ffffffff614c2316565b604080516001600160a01b0390931683526020830191909152818101849052519081900360600190a150565b6077546000906001600160a01b0316158015906123555750607760009054906101000a90046001600160a01b03166001600160a01b0316635bd90b486040518163ffffffff1660e01b815260040160206040518083038186803b15801561232857600080fd5b505afa15801561233c573d6000803e3d6000fd5b505050506040513d602081101561235257600080fd5b50515b1561241457607754603e5460408051638d61c38b60e01b81526001600160a01b0386811660048301526000199093016024820152905161240d93670de0b6b3a76400009361240193911691638d61c38b91604480820192602092909190829003018186803b1580156123c657600080fd5b505afa1580156123da573d6000803e3d6000fd5b505050506040513d60208110156123f057600080fd5b50516047549063ffffffff61520016565b9063ffffffff61525916565b9050611842565b600061241f83613740565b9050600061242c84614ad6565b9050670de0b6b3a7640000811061248a576040805162461bcd60e51b815260206004820152601a60248201527f426f6e7573204578636565647320626173652072657761726473000000000000604482015290519081900360640190fd5b6124a6670de0b6b3a7640000612401848463ffffffff61520016565b92505050611842565b6075546001600160a01b031681565b603954605b54604080516370a0823160e01b81526101009092046001600160a01b039081166004840152905160009391909116916370a08231916024808301926020929190829003018186803b15801561251757600080fd5b505afa15801561252b573d6000803e3d6000fd5b505050506040513d602081101561254157600080fd5b505190505b90565b6076546001600160a01b031681565b60736020526000908152604090205460ff1681565b60385460ff16156125af5760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b3360009081526054602052604090205460ff16612613576040805162461bcd60e51b815260206004820152601860248201527f4163636f756e74206973206e6f7420756e7374616b696e670000000000000000604482015290519081900360640190fd5b61261c336152c3565b600061262733614e60565b11156126365761263633614eaf565b336000908152605460209081526040808320805460ff191690556055909152902054604d5461266a9163ffffffff614c2316565b604d55336000908152605560209081526040808320546056909252909120546126989163ffffffff614c2316565b336000818152605660209081526040808320949094556055815283822091909155825191825291517f725ee3b9a70aadcb1e002c94935880d7f515620783a5144c90e39201dc6f92da929181900390910190a1565b6001600160a01b031660009081526057602052604090205490565b60475481565b60385460ff16156127505760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b6001600160a01b0382161580159061277157506001600160a01b0382163314155b6127b4576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b3360008181526070602090815260408083206001600160a01b03871680855290835292819020805486151560ff19909116811790915581519485529184019290925282820152517fc939ba7d9b3e1a4e6505db209888366a551f46a85918944eb89becb92289935b9181900360600190a15050565b603580546001019081905560385460ff16156128765760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b6000604254116128cd576040805162461bcd60e51b815260206004820152601e60248201527f5374616b696e6720706572696f6420686173206e6f7420737461727465640000604482015290519081900360640190fd5b604054603f546128e29163ffffffff614c2316565b4210156129205760405162461bcd60e51b8152600401808060200182810382526039815260200180615bf06039913960400191505060405180910390fd5b603860019054906101000a90046001600160a01b03166001600160a01b031663acfabbe46040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561297057600080fd5b505af1158015612984573d6000803e3d6000fd5b505050506040513d602081101561299a57600080fd5b505042603f5560385460408051635d13850560e01b815290516101009092046001600160a01b031691635d13850591600480820192602092909190829003018186803b1580156129e957600080fd5b505afa1580156129fd573d6000803e3d6000fd5b505050506040513d6020811015612a1357600080fd5b5051603e55603854604080516347d3681760e11b81529051612b109261010090046001600160a01b031691638fa6d02e916004808301926020929190829003018186803b158015612a6357600080fd5b505afa158015612a77573d6000803e3d6000fd5b505050506040513d6020811015612a8d57600080fd5b50516038546040805163b9d1c70b60e01b815290516101009092046001600160a01b03169163b9d1c70b91600480820192602092909190829003018186803b158015612ad857600080fd5b505afa158015612aec573d6000803e3d6000fd5b505050506040513d6020811015612b0257600080fd5b50519063ffffffff614dac16565b604e556046546043819055604754612b4091612b319163ffffffff614c2316565b6050549063ffffffff614c2316565b605055603a54604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015612b8e57600080fd5b505afa158015612ba2573d6000803e3d6000fd5b505050506040513d6020811015612bb857600080fd5b5051604455604d54606255604e54606355603e54603f5460408051928352602083019190915280517f80827f48a8070d07af7887688320aadf44499e3a2751fc41cc965870cf0627d79281900390910190a16035548114611a50576040805162461bcd60e51b815260206004820152601f6024820152600080516020615aa1833981519152604482015290519081900360640190fd5b6034546001600160a01b031681565b60455460ff1681565b612c6e614d61565b6001600160a01b038216600081815260746020908152604091829020805460ff191685151590811790915582519384529083015280517fcf84063977a2a7766d440ee9919a260c5e0add05c19db1f47b31250b89c73e399281900390910190a15050565b604d5490565b6058546001600160a01b031681565b60385460ff1681565b60625481565b6000805b6004811015612d8f576001600160a01b0383166000908152606b60205260409020612d429060049083828110612d2c57fe5b6002020160010154614c2390919063ffffffff16565b603e541015612d87576001600160a01b0383166000908152606b60205260409020612d84908260048110612d7257fe5b6002020154839063ffffffff614c2316565b91505b600101612cfa565b50919050565b612d9d614d61565b60468890556047879055605b805487151560ff199091168117909155605c869055605d859055605f8490556060838155605e839055604080518b8152602081018b9052808201939093529082018790526080820186905260a0820183905260c0820185905260e08201849052517fe6737551f1fd7cc268d29269d9fd1f7599b280ac444d09c5d6a2a56e01abe16d918190036101000190a15050505050505050565b603580546001019081905560385460ff1615612e8c5760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b6001600160a01b03821615801590612ead57506001600160a01b0382163314155b612ef0576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b6001600160a01b038216600090815260706020908152604080832033845290915290205460ff16612f61576040805162461bcd60e51b815260206004820152601660248201527521b0b73737ba1031b630b4b69037b7103132b430b63360511b604482015290519081900360640190fd5b612f6a82614eaf565b6035548114612fae576040805162461bcd60e51b815260206004820152601f6024820152600080516020615aa1833981519152604482015290519081900360640190fd5b5050565b60405481565b612fc0614d61565b60425415613015576040805162461bcd60e51b815260206004820152601b60248201527f5374616b696e672068617320616c726561647920737461727465640000000000604482015290519081900360640190fd5b4260428190556000603e819055603f91909155605081905560518190556052819055604d819055604e819055604f8190556040517f7c01398e484f9a82feaa276906d5d1f84867a0ff5a5bd9a485d4357f58d401839190a1565b603a546001600160a01b031681565b604b6020526000908152604090205481565b6077546001600160a01b031681565b600054610100900460ff16806130b857506130b8615447565b806130c6575060005460ff16155b6131015760405162461bcd60e51b815260040180806020018281038252602e815260200180615bc2602e913960400191505060405180910390fd5b600054610100900460ff1615801561312c576000805460ff1961ff0019909116610100171660011790555b61313588611847565b61313d614a73565b60388054610100600160a81b0319166101006001600160a01b038a811691820292909217909255603980546001600160a01b03199081168a84161791829055603a80549091168984161790556040805163095ea7b360e01b8152600481019490945260001960248501525191169163095ea7b39160448083019260209291908290030181600087803b1580156131d257600080fd5b505af11580156131e6573d6000803e3d6000fd5b505050506040513d60208110156131fc57600080fd5b505060408490556041839055690ed2b525841adfc00000604655690472698b413b43200000604755603b80546001600160a01b0319166001600160a01b0384161790558015613251576000805461ff00191690555b5050505050505050565b6039546001600160a01b031681565b603d546001600160a01b031681565b60008061328583613740565b905080613296576000915050611842565b60006132a18461544d565b90506132b86060548361520090919063ffffffff16565b811015613308576133036132d76060548461520090919063ffffffff16565b612401662386f26fc100006132f7605c548661520090919063ffffffff16565b9063ffffffff61520016565b613322565b605c5461332290662386f26fc1000063ffffffff61520016565b949350505050565b613332614d61565b603b80546001600160a01b03808e166001600160a01b03199283168117909355605880548e83169084168117909155606680548e84169085168117909155606780548e85169086168117909155603d80548e86169087168117909155605b80548e8716610100818102610100600160a81b031990931692909217909255606580548f8916908a168117909155607580548f8a16908b168117909155607680548f8b16908c168117909155607880548f8c16908d168117909155607780549b8f169b909c168b17909b55604080519c8d5260208d01999099528b89019790975260608b019590955260808a019390935260a089019190915260c088019190915260e0870191909152850152610120840192909252610140830152517fb8ef2026b56072e870f28fc4b6881afefdd4c7f2dedf9299256ea411e409de35918190036101600190a15050505050505050505050565b6034546001600160a01b031633146134cd5760405162461bcd60e51b8152600401808060200182810382526035815260200180615ac16035913960400191505060405180910390fd5b603354603454604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160348054603380546001600160a01b03199081166001600160a01b03841617909155169055565b600061183f82614e60565b603e5481565b6065546000906001600160a01b031661356c57506000612546565b606554604080516321f8a72160e01b81526524b9b9bab2b960d11b600482015290516001600160a01b03909216916321f8a72191602480820192602092909190829003018186803b1580156135c057600080fd5b505afa1580156135d4573d6000803e3d6000fd5b505050506040513d60208110156135ea57600080fd5b50519050612546565b600069021e19e0c9bab240000061367c61360b613551565b6001600160a01b031663b410a0346040518163ffffffff1660e01b815260040160206040518083038186803b15801561364357600080fd5b505afa158015613657573d6000803e3d6000fd5b505050506040513d602081101561366d57600080fd5b5051829063ffffffff61525916565b91505090565b6001600160a01b03166000908152604b602052604090205490565b6033546001600160a01b031681565b60495481565b6000805b6004811015612d8f576001600160a01b0383166000908152606d602052604090206136e89060049083828110612d2c57fe5b603e54101561371b576001600160a01b0383166000908152606d60205260409020613718908260048110612d7257fe5b91505b6001016136b6565b60375481565b60415481565b60635481565b600061183f82615601565b603e546001600160a01b0382166000908152606160205260408120549091148061378057506001600160a01b038216600090815260566020526040902054155b806137a45750603e546001600160a01b038316600090815260576020526040902054145b806137af5750606254155b6118425761183f6137cd606354606254614c2390919063ffffffff16565b604354603854604080516317640e0760e01b81526001600160a01b038881166004830152915161240194936132f79361010090910416916317640e07916024808301926020929190829003018186803b15801561382957600080fd5b505afa15801561383d573d6000803e3d6000fd5b505050506040513d602081101561385357600080fd5b50516001600160a01b0388166000908152605660205260409020549063ffffffff614c2316565b60008061388683613740565b9050600061389384613279565b9050613322670de0b6b3a7640000612401848463ffffffff61520016565b607060209081526000928352604080842090915290825290205460ff1681565b6000805b6004811015612d8f576001600160a01b0383166000908152606f602052604090206139079060049083828110612d2c57fe5b603e54101561393a576001600160a01b0383166000908152606f60205260409020613937908260048110612d7257fe5b91505b6001016138d5565b603c546001600160a01b031681565b605b5460ff1681565b60008061396683613740565b905080613977576000915050611842565b605e5461398b90829063ffffffff61520016565b61399484615601565b10156139d1576139cc6139b2605e548361520090919063ffffffff16565b612401605d546132f7662386f26fc100006132f789615601565b6139eb565b605d546139eb90662386f26fc1000063ffffffff61520016565b9392505050565b6078546001600160a01b031681565b603580546001019081905560385460ff1615613a4e5760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b613a598233336156a4565b604080513381526020810184905281517f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d929181900390910190a16035548114612fae576040805162461bcd60e51b815260206004820152601f6024820152600080516020615aa1833981519152604482015290519081900360640190fd5b600080613ae3613551565b6001600160a01b031663d37c4d8b846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200180631cd554d160e21b81525060200191505060206040518083038186803b158015613b4757600080fd5b505afa158015613b5b573d6000803e3d6000fd5b505050506040513d6020811015613b7157600080fd5b5051905080613b84576000915050611842565b69021e19e0c9bab24000006000613b99613551565b6040805163ae3bbbbb60e01b81526001600160a01b038881166004830152825193169263ae3bbbbb92602480840193919291829003018186803b158015613bdf57600080fd5b505afa158015613bf3573d6000803e3d6000fd5b505050506040513d6040811015613c0957600080fd5b50519050613c1d828263ffffffff61525916565b95945050505050565b6000805b6004811015612d8f576001600160a01b0383166000908152606960205260409020613c5c9060049083828110612d2c57fe5b603e541015613c8f576001600160a01b0383166000908152606960205260409020613c8c908260048110612d7257fe5b91505b600101613c2a565b600080604254118015613cbe5750604054603f54613cba9163ffffffff614c2316565b4210155b905090565b603580546001019081905560385460ff1615613d105760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b613d1933614eaf565b6035548114611a50576040805162461bcd60e51b815260206004820152601f6024820152600080516020615aa1833981519152604482015290519081900360640190fd5b600061183f8261544d565b60445481565b603b546001600160a01b031681565b6072602052600090815260409020546001600160a01b031681565b613da0614d61565b60385461010090046001600160a01b031615613e43576039546038546040805163095ea7b360e01b81526101009092046001600160a01b039081166004840152600060248401819052915193169263095ea7b3926044808201936020939283900390910190829087803b158015613e1657600080fd5b505af1158015613e2a573d6000803e3d6000fd5b505050506040513d6020811015613e4057600080fd5b50505b60388054610100600160a81b0319166101006001600160a01b03848116918202929092179092556039546040805163095ea7b360e01b8152600481019490945260001960248501525191169163095ea7b39160448083019260209291908290030181600087803b158015613eb657600080fd5b505af1158015613eca573d6000803e3d6000fd5b505050506040513d6020811015613ee057600080fd5b5050604080516001600160a01b038316815290517feb1a4b1e230d212e1644ea31e3890084e2fa17ddee990e46a46e198e1728c4a09181900360200190a150565b613f29614d61565b6001600160a01b038116613f76576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b603454600160a81b900460ff1615613fcb576040805162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481d1c985b9cd9995c9c9959606a1b604482015290519081900360640190fd5b603380546001600160a01b038084166001600160a01b03199092168217928390556034805460ff60a81b1916600160a81b17905560408051939091168352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a150565b60385460ff16156140825760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b60715460ff166140d9576040805162461bcd60e51b815260206004820152601960248201527f4d65726765206163636f756e742069732064697361626c656400000000000000604482015290519081900360640190fd5b6001600160a01b038116158015906140fa57506001600160a01b0381163314155b61413d576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b61414633614e60565b158015614159575061415781614e60565b155b6141945760405162461bcd60e51b815260040180806020018281038252603b815260200180615d27603b913960400191505060405180910390fd5b3360009081526054602052604090205460ff161580156141cd57506001600160a01b03811660009081526054602052604090205460ff16155b6142085760405162461bcd60e51b815260040180806020018281038252603e815260200180615c89603e913960400191505060405180910390fd5b6075546001600160a01b0316156142dd5760755460408051633656b51760e21b815233600482015290516001600160a01b039092169163d95ad45c91602480820192602092909190829003018186803b15801561426457600080fd5b505afa158015614278573d6000803e3d6000fd5b505050506040513d602081101561428e57600080fd5b5051156142dd576040805162461bcd60e51b815260206004820152601860248201527743616e6e6f74206d65726765207768696c65204c50696e6760401b604482015290519081900360640190fd5b6076546001600160a01b0316156143b25760765460408051633656b51760e21b815233600482015290516001600160a01b039092169163d95ad45c91602480820192602092909190829003018186803b15801561433957600080fd5b505afa15801561434d573d6000803e3d6000fd5b505050506040513d602081101561436357600080fd5b5051156143b2576040805162461bcd60e51b815260206004820152601860248201527743616e6e6f74206d65726765207768696c65204c50696e6760401b604482015290519081900360640190fd5b6078546001600160a01b0316156144875760785460408051633656b51760e21b815233600482015290516001600160a01b039092169163d95ad45c91602480820192602092909190829003018186803b15801561440e57600080fd5b505afa158015614422573d6000803e3d6000fd5b505050506040513d602081101561443857600080fd5b505115614487576040805162461bcd60e51b815260206004820152601860248201527743616e6e6f74206d65726765207768696c65204c50696e6760401b604482015290519081900360640190fd5b60385460408051630282a2ed60e21b81523360048201526001600160a01b038481166024830152915161010090930490911691630a0a8bb49160448082019260009290919082900301818387803b1580156144e157600080fd5b505af11580156144f5573d6000803e3d6000fd5b505033600090815260566020526040808220546001600160a01b03861683529120546145299350915063ffffffff614c2316565b6001600160a01b038216600081815260566020908152604080832094909455338252604b905282812054918152919091205461456a9163ffffffff614c2316565b6001600160a01b0382166000818152604b6020908152604080832094909455338252604c90528281205491815291909120546145ab9163ffffffff614c2316565b6001600160a01b0382166000908152604c6020908152604080832093909355603e5460578252838320819055606182528383208190556059909152918120919091558060015b600481116147715761461f600461461383603e54614c2390919063ffffffff16565b9063ffffffff614bbc16565b925061464461463560048363ffffffff614dac16565b603e549063ffffffff614dac16565b6001600160a01b0385166000908152605a60205260409020909250836004811061466a57fe5b600202016001015482146146d1576001600160a01b0384166000908152605a60205260408120846004811061469b57fe5b60020201556001600160a01b0384166000908152605a60205260409020829084600481106146c557fe5b60020201600101819055505b336000908152605a6020526040902083600481106146eb57fe5b600202016001015482141561476957336000908152605a6020526040902061474090846004811061471857fe5b60020201546001600160a01b0386166000908152605a6020526040902085600481106112fd57fe5b6001600160a01b0385166000908152605a60205260409020846004811061476357fe5b60020201555b6001016145f1565b5033600090815260536020908152604080832083905560548252808320805460ff191690556055825280832083905560568252808320839055604b8252808320839055604c8252808320839055605782528083208390556061825280832083905560598252808320839055605a90915281206147ec91615a68565b604080513381526001600160a01b038516602082015281517fa0fc26d627101bedf9c6cedb33e9eeac3fa2a7d508f89b597134bcee1a12d32c929181900390910190a1505050565b60008061484083613740565b905060006138938461395a565b60715460ff1681565b6067546001600160a01b031681565b60546020526000908152604090205460ff1681565b605c5481565b600061488a613551565b6001600160a01b031663d37c4d8b836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200180631cd554d160e21b81525060200191505060206040518083038186803b1580156148ee57600080fd5b505afa158015614902573d6000803e3d6000fd5b505050506040513d602081101561491857600080fd5b505192915050565b603a54604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561251757600080fd5b605e5481565b603d54604080516315905ec160e31b8152620a69cb60eb1b600482015290516000926001600160a01b03169163ac82f608916024808301926020929190829003018186803b15801561251757600080fd5b60435481565b60385460ff1615614a0a5760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b3360009081526072602090815260409182902080546001600160a01b0319166001600160a01b038516908117909155825190815291517f0c417702befaa0d74611c15e4278a897f344514ffbfbd4ea9a6e9168be46b8da9281900390910190a150565b605d5481565b60365460ff1615614ac1576040805162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604482015290519081900360640190fd5b6036805460ff19166001908117909155603555565b600080614ae283613279565b90506000614aef8461395a565b9050613322828263ffffffff614c2316565b60425481565b60605481565b614b15614d61565b604a805486151560ff199182168117909255604580548715159083168117909155604086815560418690556071805486151594168417905580519384526020840191909152828101869052606083018590526080830191909152517fc3fb08f467537b94d35d16e7ea0c42e3d6ff73af0f2311728cda630fc81bb4f59181900360a00190a15050505050565b60746020526000908152604090205460ff1681565b60485481565b600081614c10576040805162461bcd60e51b815260206004820152601860248201527f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000604482015290519081900360640190fd5b818381614c1957fe5b0690505b92915050565b6000828201838110156139eb576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600080614c8983613740565b905080614c9a576000915050611842565b6139eb614cb4606354606254614c2390919063ffffffff16565b604454603854604080516317640e0760e01b81526001600160a01b038981166004830152915161240194936132f79361010090910416916317640e07916024808301926020929190829003018186803b158015614d1057600080fd5b505afa158015614d24573d6000803e3d6000fd5b505050506040513d6020811015614d3a57600080fd5b50516001600160a01b0389166000908152605660205260409020549063ffffffff614c2316565b6033546001600160a01b03163314614daa5760405162461bcd60e51b815260040180806020018281038252602f815260200180615b72602f913960400191505060405180910390fd5b565b600082821115614e03576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052614e5b90849061584a565b505050565b600080614e6c83613740565b905080614e7d576000915050611842565b605b5460ff16614e8e579050611842565b614ea7614e9a846122c2565b829063ffffffff614c2316565b915050611842565b60385460ff1615614ef15760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b604a5460ff16614f48576040805162461bcd60e51b815260206004820152601860248201527f436c61696d696e67206973206e6f7420656e61626c65642e0000000000000000604482015290519081900360640190fd5b600060425411614f9f576040805162461bcd60e51b815260206004820152601e60248201527f5374616b696e6720706572696f6420686173206e6f7420737461727465640000604482015290519081900360640190fd5b60455460ff1615615079576000614fb582614c7d565b9050801561507757603a54614fda906001600160a01b0316838363ffffffff614e0916565b6001600160a01b0382166000908152604c6020526040902054615003908263ffffffff614c2316565b6001600160a01b0383166000908152604c602052604090205560525461502f908263ffffffff614c2316565b605255604080516001600160a01b03841681526020810183905281517f5b16e1043a283423361eb77682c99aff55948b34296846800a1a7dc9547a89fc929181900390910190a15b505b600061508482614e60565b905080156151e057605b546040805163b01ca88f60e01b81526001600160a01b0385811660048301526024820185905291516101009093049091169163b01ca88f9160448082019260009290919082900301818387803b1580156150e757600080fd5b505af11580156150fb573d6000803e3d6000fd5b5050506001600160a01b0383166000908152604b602052604090205461512891508263ffffffff614c2316565b6001600160a01b0383166000908152604b6020526040902055605154615154908263ffffffff614c2316565b60515560505461516a908263ffffffff614dac16565b6050557f5619b8583bbbb0760d27ac9ff844cec866b333bf7ad0262c2d809ff42f22e5fc828261519982613740565b6151a28661387a565b6151ab87614834565b604080516001600160a01b03909616865260208601949094528484019290925260608401526080830152519081900360a00190a15b50603e546001600160a01b03909116600090815260576020526040902055565b60008261520f57506000614c1d565b8282028284828161521c57fe5b04146139eb5760405162461bcd60e51b8152600401808060200182810382526021815260200180615ba16021913960400191505060405180910390fd5b60008082116152af576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b60008284816152ba57fe5b04949350505050565b6001600160a01b038116600090815260566020526040902054611a5057603854604080516334c78ae560e11b81526001600160a01b038481166004830152915160009361010090049092169163698f15ca91602480820192602092909190829003018186803b15801561533557600080fd5b505afa158015615349573d6000803e3d6000fd5b505050506040513d602081101561535f57600080fd5b50511115611a5057603854604080516334c78ae560e11b81526001600160a01b03848116600483015291516101009093049091169163ad6d15de91839163698f15ca91602480820192602092909190829003018186803b1580156153c257600080fd5b505afa1580156153d6573d6000803e3d6000fd5b505050506040513d60208110156153ec57600080fd5b5051604080516001600160e01b031960e085901b168152600481019290925251602480830192600092919082900301818387803b15801561542c57600080fd5b505af1158015615440573d6000803e3d6000fd5b5050505050565b303b1590565b6065546000906001600160a01b03161561184257600061546c83613ad8565b905060006154786135f3565b603d54604080516315905ec160e31b8152620a69cb60eb1b600482015290519293506000926001600160a01b039092169163ac82f60891602480820192602092909190829003018186803b1580156154cf57600080fd5b505afa1580156154e3573d6000803e3d6000fd5b505050506040513d60208110156154f957600080fd5b505190506000615507613551565b6001600160a01b031663d37c4d8b876040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200180631cd554d160e21b81525060200191505060206040518083038186803b15801561556b57600080fd5b505afa15801561557f573d6000803e3d6000fd5b505050506040513d602081101561559557600080fd5b50519050828410156155d7576155d06155b4848463ffffffff61520016565b612401655af3107a40006132f785818a8063ffffffff61520016565b94506155f8565b6155f582612401655af3107a40006132f7878663ffffffff61520016565b94505b50505050919050565b6001600160a01b03811660009081526059602052604081205461562b90600463ffffffff614c2316565b603e5410156118425760005b6004811015612d8f576001600160a01b0383166000908152605a602052604090206156699060049083828110612d2c57fe5b603e54101561569c576001600160a01b0383166000908152605a60205260409020615699908260048110612d7257fe5b91505b600101615637565b6000604254116156fb576040805162461bcd60e51b815260206004820152601e60248201527f5374616b696e6720706572696f6420686173206e6f7420737461727465640000604482015290519081900360640190fd5b60008311615741576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b6001600160a01b03821660009081526054602052604090205460ff16156157995760405162461bcd60e51b8152600401808060200182810382526032815260200180615c296032913960400191505060405180910390fd5b60006157a483614e60565b11156157b3576157b382614eaf565b603e546001600160a01b0383166000908152606160205260409020556157d8826152c3565b604d546157eb908463ffffffff614c2316565b604d556001600160a01b038216600090815260566020526040902054615817908463ffffffff614c2316565b6001600160a01b03808416600090815260566020526040902091909155603954614e5b911682308663ffffffff615a0816565b61585c826001600160a01b0316615a62565b6158ad576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106158eb5780518252601f1990920191602091820191016158cc565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461594d576040519150601f19603f3d011682016040523d82523d6000602084013e615952565b606091505b5091509150816159a9576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115615a02578080602001905160208110156159c557600080fd5b5051615a025760405162461bcd60e51b815260040180806020018281038252602a815260200180615d62602a913960400191505060405180910390fd5b50505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052615a0290859061584a565b3b151590565b50600080825560018201819055600282018190556003820181905560048201819055600582018190556006820181905560079091015556fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c00596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e657273686970416c726561647920696e697469616c697a65642c20757365206e6f6d696e6174654e65774f776e657243616e6e6f7420756e7374616b65207965742c20636f6f6c646f776e206e6f7420657870697265642e4163636f756e7420686173206e6f742074726967676572656420756e7374616b6520636f6f6c646f776e4f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564412066756c6c20706572696f6420686173206e6f74207061737365642073696e636520746865206c61737420636c6f73656420706572696f64546865207374616b6572206973207061757365642066726f6d207374616b696e672064756520746f20756e7374616b696e674163636f756e742068617320616c72656164792074726967676572656420756e7374616b6520636f6f6c646f776e43616e6e6f74206d657267652c2063616e63656c20756e7374616b696e67206f6e20626f7468206163636f756e7473206265666f7265206d657267696e675468697320616374696f6e2063616e6e6f7420626520706572666f726d6564207768696c652074686520636f6e7472616374206973207061757365644163636f756e7420646f65736e7420686176652074686174206d756368207374616b656443616e6e6f74206d657267652c20636c61696d2072657761726473206f6e20626f7468206163636f756e7473206265666f7265206d657267696e675361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820eec88a66d29323f4f2e6db71785757e2bea2d93688e20c89814ec2243e23d0ba64736f6c63430005100032
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106105ed5760003560e01c806379ba50971161031b578063b9cce86a116101a8578063d66e0677116100f4578063ebc79772116100ad578063faa27d5111610087578063faa27d5114610f49578063faa7b9dd14610f51578063fd143c0b14610f8c578063fe3783d314610fb2576105ed565b8063ebc7977214610f13578063ed778fe814610f1b578063f38d00f014610f41576105ed565b8063d66e067714610ec5578063d78fc29014610ecd578063da42840014610ed5578063e11cd05514610edd578063e81a252614610ee5578063ebaf5b3c14610f0b576105ed565b8063c5335ac611610161578063c99252881161013b578063c992528814610e69578063cb8d751a14610e71578063cf26dbbc14610e97578063d506950a14610e9f576105ed565b8063c5335ac614610e15578063c598694914610e3b578063c731a3d114610e61576105ed565b8063b9cce86a14610d6d578063ba47a5d914610d93578063bbe3aa3714610d9b578063bd45006214610da3578063c10c354614610dc9578063c3b83f5f14610def576105ed565b80639a109bc211610267578063a4ea739611610220578063a7c153a6116101fa578063a7c153a614610d11578063ac8e71ea14610d37578063afac7fb114610d5d578063b88a802f14610d65576105ed565b8063a4ea739614610cc6578063a5ec43cc14610cec578063a694fc3a14610cf4576105ed565b80639a109bc214610c165780639e6b892b14610c3c578063a00159a814610c62578063a0ad222914610c90578063a3c4a50b14610cb6578063a4bce4ac14610cbe576105ed565b80638da5cb5b116102d457806391b4ded9116102ae57806391b4ded914610bd857806393eb2e6614610be057806395910db214610be85780639a09edab14610bf0576105ed565b80638da5cb5b14610ba2578063907bfe1214610baa578063915518dc14610bb2576105ed565b806379ba509714610b365780637a68567714610b3e5780637c17f6fc14610b645780637dbbdea014610b6c57806384854b1914610b745780638a239de814610b7c576105ed565b806347dda6ec1161049957806360962e06116103e557806364c835911161039e57806372f702f31161037857806372f702f314610a84578063741bef1a14610a8c57806378d2b68314610a945780637985c5e414610aba576105ed565b806364c8359114610a0257806366c4c8c714610a285780636dca3b0214610a30576105ed565b806360962e061461095457806361654fae1461097a57806361c01db7146109c457806362139e0e146109ea5780636282719e146109f2578063647846a5146109fa576105ed565b806353a47bb711610452578063567e98f91161042c578063567e98f914610934578063572e36e61461093c5780635c975abb14610944578063608daf891461094c576105ed565b806353a47bb7146108f657806353cf4115146108fe57806356091ad114610906576105ed565b806347dda6ec146108645780634ab179691461088a5780634c4e75df146108925780634ed25b43146108b8578063505b1497146108c0578063507a7328146108ee576105ed565b806320074354116105585780632f3241581161051157806336468b5a116104eb57806336468b5a146108265780633acf4a161461084c5780633faae5341461085457806346bfba301461085c576105ed565b80632f324158146107db578063331e03a8146107e357806334dfb26814610809576105ed565b80632007435414610779578063203d3718146107815780632866ed21146107895780632a1a1e48146107a55780632d287886146107ad5780632def6620146107d3576105ed565b806315da5064116105aa57806315da5064146106d05780631627540c146106d857806316765391146106fe57806316c38b3c1461072457806317433c91146107435780631cb70a9514610771576105ed565b806302c7739b146105f257806305a2ee2a1461062057806305ce342914610644578063080e2b471461064c5780631314f7591461068457806313af4035146106aa575b600080fd5b61061e6004803603604081101561060857600080fd5b506001600160a01b038135169060200135610fba565b005b610628611804565b604080516001600160a01b039092168252519081900360200190f35b610628611813565b6106726004803603602081101561066257600080fd5b50356001600160a01b0316611822565b60408051918252519081900360200190f35b6106726004803603602081101561069a57600080fd5b50356001600160a01b0316611834565b61061e600480360360208110156106c057600080fd5b50356001600160a01b0316611847565b61067261195c565b61061e600480360360208110156106ee57600080fd5b50356001600160a01b0316611962565b6106726004803603602081101561071457600080fd5b50356001600160a01b03166119be565b61061e6004803603602081101561073a57600080fd5b503515156119d9565b61061e6004803603604081101561075957600080fd5b506001600160a01b0381351690602001351515611a53565b610628611abf565b610672611ad3565b610628611ad9565b610791611ae8565b604080519115158252519081900360200190f35b610672611af1565b610672600480360360208110156107c357600080fd5b50356001600160a01b0316611af7565b61061e611b09565b610628611c89565b610672600480360360208110156107f957600080fd5b50356001600160a01b0316611c9d565b61061e6004803603602081101561081f57600080fd5b5035611caf565b6106726004803603602081101561083c57600080fd5b50356001600160a01b03166122c2565b6106286124af565b6106726124be565b610628612549565b6107916004803603602081101561087a57600080fd5b50356001600160a01b0316612558565b61061e61256d565b610672600480360360208110156108a857600080fd5b50356001600160a01b03166126ed565b610672612708565b61061e600480360360408110156108d657600080fd5b506001600160a01b038135169060200135151561270e565b61061e612829565b610628612c4e565b610791612c5d565b61061e6004803603604081101561091c57600080fd5b506001600160a01b0381351690602001351515612c66565b610672612cd2565b610628612cd8565b610791612ce7565b610672612cf0565b6106726004803603602081101561096a57600080fd5b50356001600160a01b0316612cf6565b61061e600480360361010081101561099157600080fd5b50803590602081013590604081013515159060608101359060808101359060a08101359060c08101359060e00135612d95565b61061e600480360360208110156109da57600080fd5b50356001600160a01b0316612e3f565b610672612fb2565b61061e612fb8565b61062861306f565b61067260048036036020811015610a1857600080fd5b50356001600160a01b031661307e565b610628613090565b61061e600480360360e0811015610a4657600080fd5b506001600160a01b03813581169160208101358216916040820135811691606081013582169160808201359160a08101359160c0909101351661309f565b61062861325b565b61062861326a565b61067260048036036020811015610aaa57600080fd5b50356001600160a01b0316613279565b61061e6004803603610160811015610ad157600080fd5b506001600160a01b038135811691602081013582169160408201358116916060810135821691608082013581169160a081013582169160c082013581169160e0810135821691610100820135811691610120810135821691610140909101351661332a565b61061e613484565b61067260048036036020811015610b5457600080fd5b50356001600160a01b0316613540565b61067261354b565b610628613551565b6106726135f3565b61067260048036036020811015610b9257600080fd5b50356001600160a01b0316613682565b61062861369d565b6106726136ac565b61067260048036036020811015610bc857600080fd5b50356001600160a01b03166136b2565b610672613723565b610672613729565b61067261372f565b61067260048036036020811015610c0657600080fd5b50356001600160a01b0316613735565b61067260048036036020811015610c2c57600080fd5b50356001600160a01b0316613740565b61067260048036036020811015610c5257600080fd5b50356001600160a01b031661387a565b61079160048036036040811015610c7857600080fd5b506001600160a01b03813581169160200135166138b1565b61067260048036036020811015610ca657600080fd5b50356001600160a01b03166138d1565b610628613942565b610791613951565b61067260048036036020811015610cdc57600080fd5b50356001600160a01b031661395a565b6106286139f2565b61061e60048036036020811015610d0a57600080fd5b5035613a01565b61067260048036036020811015610d2757600080fd5b50356001600160a01b0316613ad8565b61067260048036036020811015610d4d57600080fd5b50356001600160a01b0316613c26565b610791613c97565b61061e613cc3565b61067260048036036020811015610d8357600080fd5b50356001600160a01b0316613d5d565b610672613d68565b610628613d6e565b61062860048036036020811015610db957600080fd5b50356001600160a01b0316613d7d565b61061e60048036036020811015610ddf57600080fd5b50356001600160a01b0316613d98565b61061e60048036036020811015610e0557600080fd5b50356001600160a01b0316613f21565b61061e60048036036020811015610e2b57600080fd5b50356001600160a01b0316614040565b61067260048036036020811015610e5157600080fd5b50356001600160a01b0316614834565b61079161484d565b610628614856565b61079160048036036020811015610e8757600080fd5b50356001600160a01b0316614865565b61067261487a565b61067260048036036020811015610eb557600080fd5b50356001600160a01b0316614880565b610672614920565b61067261496b565b610672614971565b6106726149c2565b61061e60048036036020811015610efb57600080fd5b50356001600160a01b03166149c8565b610672614a6d565b61061e614a73565b61067260048036036020811015610f3157600080fd5b50356001600160a01b0316614ad6565b610672614b01565b610672614b07565b61061e600480360360a0811015610f6757600080fd5b5080351515906020810135151590604081013590606081013590608001351515614b0d565b61079160048036036020811015610fa257600080fd5b50356001600160a01b0316614ba1565b610672614bb6565b6001600160a01b03821615801590610fd25750600081115b611014576040805162461bcd60e51b815260206004820152600e60248201526d496e76616c696420706172616d7360901b604482015290519081900360640190fd5b6001600160a01b038281166000908152607260205260409020541615611053576001600160a01b03918216600090815260726020526040902054909116905b6058546001600160a01b031633148061107657506064546001600160a01b031633145b8061108b57506066546001600160a01b031633145b806110a057506067546001600160a01b031633145b806110ba57503360009081526073602052604090205460ff165b806110d457503360009081526074602052604090205460ff165b611117576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b606760009054906101000a90046001600160a01b03166001600160a01b031663481c6a756040518163ffffffff1660e01b815260040160206040518083038186803b15801561116557600080fd5b505afa158015611179573d6000803e3d6000fd5b505050506040513d602081101561118f57600080fd5b505160408051630bfec24d60e11b81526004810184905290516001600160a01b03909216916317fd849a91602480820192602092909190829003018186803b1580156111da57600080fd5b505afa1580156111ee573d6000803e3d6000fd5b505050506040513d602081101561120457600080fd5b5051603e546001600160a01b03841660009081526059602052604090205491925011156112c1576001600160a01b0382166000908152605a60205260408120603e5461125790600463ffffffff614bbc16565b6004811061126157fe5b6002020155603e546001600160a01b0383166000908152605a6020526040902061129282600463ffffffff614bbc16565b6004811061129c57fe5b6002020160010155603e546001600160a01b0383166000908152605960205260409020555b6001600160a01b0382166000908152605a60205260409020603e5461130e9183916112f390600463ffffffff614bbc16565b600481106112fd57fe5b60020201549063ffffffff614c2316565b6001600160a01b0383166000908152605a60205260409020603e5461133a90600463ffffffff614bbc16565b6004811061134457fe5b60020201556058546001600160a01b031633148061137157503360009081526074602052604090205460ff165b1561149c57603e546001600160a01b038316600090815260686020526040902054101561142e576001600160a01b0382166000908152606960205260408120603e546113c490600463ffffffff614bbc16565b600481106113ce57fe5b6002020155603e546001600160a01b03831660009081526069602052604090206113ff82600463ffffffff614bbc16565b6004811061140957fe5b6002020160010155603e546001600160a01b0383166000908152606860205260409020555b6001600160a01b0382166000908152606960205260409020603e546114609183916112f390600463ffffffff614bbc16565b6001600160a01b0383166000908152606960205260409020603e5461148c90600463ffffffff614bbc16565b6004811061149657fe5b60020201555b6066546001600160a01b03163314156115d557603e546001600160a01b0383166000908152606a60205260409020541015611567576001600160a01b0382166000908152606b60205260408120603e546114fd90600463ffffffff614bbc16565b6004811061150757fe5b6002020155603e546001600160a01b0383166000908152606b6020526040902061153882600463ffffffff614bbc16565b6004811061154257fe5b6002020160010155603e546001600160a01b0383166000908152606a60205260409020555b6001600160a01b0382166000908152606b60205260409020603e546115999183916112f390600463ffffffff614bbc16565b6001600160a01b0383166000908152606b60205260409020603e546115c590600463ffffffff614bbc16565b600481106115cf57fe5b60020201555b6067546001600160a01b03163314806115fd57503360009081526073602052604090205460ff165b1561172857603e546001600160a01b0383166000908152606e602052604090205410156116ba576001600160a01b0382166000908152606f60205260408120603e5461165090600463ffffffff614bbc16565b6004811061165a57fe5b6002020155603e546001600160a01b0383166000908152606f6020526040902061168b82600463ffffffff614bbc16565b6004811061169557fe5b6002020160010155603e546001600160a01b0383166000908152606e60205260409020555b6001600160a01b0382166000908152606f60205260409020603e546116ec9183916112f390600463ffffffff614bbc16565b6001600160a01b0383166000908152606f60205260409020603e5461171890600463ffffffff614bbc16565b6004811061172257fe5b60020201555b6077546001600160a01b0316156117b857607754603e54604080516352a31c0760e01b81526001600160a01b038681166004830152336024830152604482018690526064820193909352905191909216916352a31c0791608480830192600092919082900301818387803b15801561179f57600080fd5b505af11580156117b3573d6000803e3d6000fd5b505050505b604080516001600160a01b038416815260208101839052338183015290517fb43a20c9abfed93eb48264a3acf807336352ba8cb6ee42c1754b1b1b280a20b99181900360600190a15050565b6065546001600160a01b031681565b6064546001600160a01b031681565b604c6020526000908152604090205481565b600061183f82614c7d565b90505b919050565b6001600160a01b0381166118a2576040805162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b603454600160a01b900460ff16156118eb5760405162461bcd60e51b8152600401808060200182810382526029815260200180615af66029913960400191505060405180910390fd5b6034805460ff60a01b1916600160a01b179055603380546001600160a01b0383166001600160a01b031990911681179091556040805160008152602081019290925280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a150565b60465481565b61196a614d61565b603480546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b6001600160a01b031660009081526056602052604090205490565b6119e1614d61565b60385460ff16151581151514156119f757611a50565b6038805460ff1916821515179081905560ff1615611a1457426037555b6038546040805160ff90921615158252517f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec59181900360200190a15b50565b611a5b614d61565b6001600160a01b038216600081815260736020908152604091829020805460ff191685151590811790915582519384529083015280517fd2a8401466e7483577592b4b5160af1ba59060100f12387853477637096cfb919281900390910190a15050565b605b5461010090046001600160a01b031681565b603f5481565b6066546001600160a01b031681565b604a5460ff1681565b605f5481565b60556020526000908152604090205481565b60385460ff1615611b4b5760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b3360009081526054602052604090205460ff16611b995760405162461bcd60e51b815260040180806020018281038252602a815260200180615b48602a913960400191505060405180910390fd5b604154611bad90429063ffffffff614dac16565b3360009081526053602052604090205410611bf95760405162461bcd60e51b8152600401808060200182810382526029815260200180615b1f6029913960400191505060405180910390fd5b336000818152605460209081526040808320805460ff1916905560559091529020546039549091611c3a916001600160a01b0316908363ffffffff614e0916565b336000818152605560209081526040808320929092558151928352820183905280517f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f759281900390910190a150565b60385461010090046001600160a01b031681565b60536020526000908152604090205481565b60385460ff1615611cf15760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b60008111611d39576040805162461bcd60e51b815260206004820152601060248201526f043616e6e6f7420756e7374616b6520360841b604482015290519081900360640190fd5b33600090815260566020526040902054811115611d875760405162461bcd60e51b8152600401808060200182810382526024815260200180615d036024913960400191505060405180910390fd5b3360009081526054602052604090205460ff1615611dd65760405162461bcd60e51b815260040180806020018281038252602e815260200180615c5b602e913960400191505060405180910390fd5b6075546001600160a01b031615611ead5760755460408051633656b51760e21b815233600482015290516001600160a01b039092169163d95ad45c91602480820192602092909190829003018186803b158015611e3257600080fd5b505afa158015611e46573d6000803e3d6000fd5b505050506040513d6020811015611e5c57600080fd5b505115611ead576040805162461bcd60e51b815260206004820152601a60248201527943616e6e6f7420756e7374616b65207768696c65204c50696e6760301b604482015290519081900360640190fd5b6076546001600160a01b031615611f845760765460408051633656b51760e21b815233600482015290516001600160a01b039092169163d95ad45c91602480820192602092909190829003018186803b158015611f0957600080fd5b505afa158015611f1d573d6000803e3d6000fd5b505050506040513d6020811015611f3357600080fd5b505115611f84576040805162461bcd60e51b815260206004820152601a60248201527943616e6e6f7420756e7374616b65207768696c65204c50696e6760301b604482015290519081900360640190fd5b6078546001600160a01b03161561205b5760785460408051633656b51760e21b815233600482015290516001600160a01b039092169163d95ad45c91602480820192602092909190829003018186803b158015611fe057600080fd5b505afa158015611ff4573d6000803e3d6000fd5b505050506040513d602081101561200a57600080fd5b50511561205b576040805162461bcd60e51b815260206004820152601a60248201527943616e6e6f7420756e7374616b65207768696c65204c50696e6760301b604482015290519081900360640190fd5b600061206633614e60565b11156120755761207533614eaf565b33600090815260536020908152604080832042905560549091529020805460ff19166001179055604d546120af908263ffffffff614dac16565b604d5533600090815260556020908152604080832084905560569091529020546120df908263ffffffff614dac16565b33600090815260566020526040902081905561225157603854604080516334c78ae560e11b8152336004820152905160009261010090046001600160a01b03169163698f15ca916024808301926020929190829003018186803b15801561214557600080fd5b505afa158015612159573d6000803e3d6000fd5b505050506040513d602081101561216f57600080fd5b5051111561225157603854604080516334c78ae560e11b815233600482015290516101009092046001600160a01b031691635817d04291839163698f15ca91602480820192602092909190829003018186803b1580156121ce57600080fd5b505afa1580156121e2573d6000803e3d6000fd5b505050506040513d60208110156121f857600080fd5b5051604080516001600160e01b031960e085901b168152600481019290925251602480830192600092919082900301818387803b15801561223857600080fd5b505af115801561224c573d6000803e3d6000fd5b505050505b604154336000818152605360205260409020547f30797de805f090008d8b19fa0c6f92d0f164789f64d6f7a1b097fbf0b1abac6b92612296919063ffffffff614c2316565b604080516001600160a01b0390931683526020830191909152818101849052519081900360600190a150565b6077546000906001600160a01b0316158015906123555750607760009054906101000a90046001600160a01b03166001600160a01b0316635bd90b486040518163ffffffff1660e01b815260040160206040518083038186803b15801561232857600080fd5b505afa15801561233c573d6000803e3d6000fd5b505050506040513d602081101561235257600080fd5b50515b1561241457607754603e5460408051638d61c38b60e01b81526001600160a01b0386811660048301526000199093016024820152905161240d93670de0b6b3a76400009361240193911691638d61c38b91604480820192602092909190829003018186803b1580156123c657600080fd5b505afa1580156123da573d6000803e3d6000fd5b505050506040513d60208110156123f057600080fd5b50516047549063ffffffff61520016565b9063ffffffff61525916565b9050611842565b600061241f83613740565b9050600061242c84614ad6565b9050670de0b6b3a7640000811061248a576040805162461bcd60e51b815260206004820152601a60248201527f426f6e7573204578636565647320626173652072657761726473000000000000604482015290519081900360640190fd5b6124a6670de0b6b3a7640000612401848463ffffffff61520016565b92505050611842565b6075546001600160a01b031681565b603954605b54604080516370a0823160e01b81526101009092046001600160a01b039081166004840152905160009391909116916370a08231916024808301926020929190829003018186803b15801561251757600080fd5b505afa15801561252b573d6000803e3d6000fd5b505050506040513d602081101561254157600080fd5b505190505b90565b6076546001600160a01b031681565b60736020526000908152604090205460ff1681565b60385460ff16156125af5760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b3360009081526054602052604090205460ff16612613576040805162461bcd60e51b815260206004820152601860248201527f4163636f756e74206973206e6f7420756e7374616b696e670000000000000000604482015290519081900360640190fd5b61261c336152c3565b600061262733614e60565b11156126365761263633614eaf565b336000908152605460209081526040808320805460ff191690556055909152902054604d5461266a9163ffffffff614c2316565b604d55336000908152605560209081526040808320546056909252909120546126989163ffffffff614c2316565b336000818152605660209081526040808320949094556055815283822091909155825191825291517f725ee3b9a70aadcb1e002c94935880d7f515620783a5144c90e39201dc6f92da929181900390910190a1565b6001600160a01b031660009081526057602052604090205490565b60475481565b60385460ff16156127505760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b6001600160a01b0382161580159061277157506001600160a01b0382163314155b6127b4576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b3360008181526070602090815260408083206001600160a01b03871680855290835292819020805486151560ff19909116811790915581519485529184019290925282820152517fc939ba7d9b3e1a4e6505db209888366a551f46a85918944eb89becb92289935b9181900360600190a15050565b603580546001019081905560385460ff16156128765760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b6000604254116128cd576040805162461bcd60e51b815260206004820152601e60248201527f5374616b696e6720706572696f6420686173206e6f7420737461727465640000604482015290519081900360640190fd5b604054603f546128e29163ffffffff614c2316565b4210156129205760405162461bcd60e51b8152600401808060200182810382526039815260200180615bf06039913960400191505060405180910390fd5b603860019054906101000a90046001600160a01b03166001600160a01b031663acfabbe46040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561297057600080fd5b505af1158015612984573d6000803e3d6000fd5b505050506040513d602081101561299a57600080fd5b505042603f5560385460408051635d13850560e01b815290516101009092046001600160a01b031691635d13850591600480820192602092909190829003018186803b1580156129e957600080fd5b505afa1580156129fd573d6000803e3d6000fd5b505050506040513d6020811015612a1357600080fd5b5051603e55603854604080516347d3681760e11b81529051612b109261010090046001600160a01b031691638fa6d02e916004808301926020929190829003018186803b158015612a6357600080fd5b505afa158015612a77573d6000803e3d6000fd5b505050506040513d6020811015612a8d57600080fd5b50516038546040805163b9d1c70b60e01b815290516101009092046001600160a01b03169163b9d1c70b91600480820192602092909190829003018186803b158015612ad857600080fd5b505afa158015612aec573d6000803e3d6000fd5b505050506040513d6020811015612b0257600080fd5b50519063ffffffff614dac16565b604e556046546043819055604754612b4091612b319163ffffffff614c2316565b6050549063ffffffff614c2316565b605055603a54604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015612b8e57600080fd5b505afa158015612ba2573d6000803e3d6000fd5b505050506040513d6020811015612bb857600080fd5b5051604455604d54606255604e54606355603e54603f5460408051928352602083019190915280517f80827f48a8070d07af7887688320aadf44499e3a2751fc41cc965870cf0627d79281900390910190a16035548114611a50576040805162461bcd60e51b815260206004820152601f6024820152600080516020615aa1833981519152604482015290519081900360640190fd5b6034546001600160a01b031681565b60455460ff1681565b612c6e614d61565b6001600160a01b038216600081815260746020908152604091829020805460ff191685151590811790915582519384529083015280517fcf84063977a2a7766d440ee9919a260c5e0add05c19db1f47b31250b89c73e399281900390910190a15050565b604d5490565b6058546001600160a01b031681565b60385460ff1681565b60625481565b6000805b6004811015612d8f576001600160a01b0383166000908152606b60205260409020612d429060049083828110612d2c57fe5b6002020160010154614c2390919063ffffffff16565b603e541015612d87576001600160a01b0383166000908152606b60205260409020612d84908260048110612d7257fe5b6002020154839063ffffffff614c2316565b91505b600101612cfa565b50919050565b612d9d614d61565b60468890556047879055605b805487151560ff199091168117909155605c869055605d859055605f8490556060838155605e839055604080518b8152602081018b9052808201939093529082018790526080820186905260a0820183905260c0820185905260e08201849052517fe6737551f1fd7cc268d29269d9fd1f7599b280ac444d09c5d6a2a56e01abe16d918190036101000190a15050505050505050565b603580546001019081905560385460ff1615612e8c5760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b6001600160a01b03821615801590612ead57506001600160a01b0382163314155b612ef0576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b6001600160a01b038216600090815260706020908152604080832033845290915290205460ff16612f61576040805162461bcd60e51b815260206004820152601660248201527521b0b73737ba1031b630b4b69037b7103132b430b63360511b604482015290519081900360640190fd5b612f6a82614eaf565b6035548114612fae576040805162461bcd60e51b815260206004820152601f6024820152600080516020615aa1833981519152604482015290519081900360640190fd5b5050565b60405481565b612fc0614d61565b60425415613015576040805162461bcd60e51b815260206004820152601b60248201527f5374616b696e672068617320616c726561647920737461727465640000000000604482015290519081900360640190fd5b4260428190556000603e819055603f91909155605081905560518190556052819055604d819055604e819055604f8190556040517f7c01398e484f9a82feaa276906d5d1f84867a0ff5a5bd9a485d4357f58d401839190a1565b603a546001600160a01b031681565b604b6020526000908152604090205481565b6077546001600160a01b031681565b600054610100900460ff16806130b857506130b8615447565b806130c6575060005460ff16155b6131015760405162461bcd60e51b815260040180806020018281038252602e815260200180615bc2602e913960400191505060405180910390fd5b600054610100900460ff1615801561312c576000805460ff1961ff0019909116610100171660011790555b61313588611847565b61313d614a73565b60388054610100600160a81b0319166101006001600160a01b038a811691820292909217909255603980546001600160a01b03199081168a84161791829055603a80549091168984161790556040805163095ea7b360e01b8152600481019490945260001960248501525191169163095ea7b39160448083019260209291908290030181600087803b1580156131d257600080fd5b505af11580156131e6573d6000803e3d6000fd5b505050506040513d60208110156131fc57600080fd5b505060408490556041839055690ed2b525841adfc00000604655690472698b413b43200000604755603b80546001600160a01b0319166001600160a01b0384161790558015613251576000805461ff00191690555b5050505050505050565b6039546001600160a01b031681565b603d546001600160a01b031681565b60008061328583613740565b905080613296576000915050611842565b60006132a18461544d565b90506132b86060548361520090919063ffffffff16565b811015613308576133036132d76060548461520090919063ffffffff16565b612401662386f26fc100006132f7605c548661520090919063ffffffff16565b9063ffffffff61520016565b613322565b605c5461332290662386f26fc1000063ffffffff61520016565b949350505050565b613332614d61565b603b80546001600160a01b03808e166001600160a01b03199283168117909355605880548e83169084168117909155606680548e84169085168117909155606780548e85169086168117909155603d80548e86169087168117909155605b80548e8716610100818102610100600160a81b031990931692909217909255606580548f8916908a168117909155607580548f8a16908b168117909155607680548f8b16908c168117909155607880548f8c16908d168117909155607780549b8f169b909c168b17909b55604080519c8d5260208d01999099528b89019790975260608b019590955260808a019390935260a089019190915260c088019190915260e0870191909152850152610120840192909252610140830152517fb8ef2026b56072e870f28fc4b6881afefdd4c7f2dedf9299256ea411e409de35918190036101600190a15050505050505050505050565b6034546001600160a01b031633146134cd5760405162461bcd60e51b8152600401808060200182810382526035815260200180615ac16035913960400191505060405180910390fd5b603354603454604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160348054603380546001600160a01b03199081166001600160a01b03841617909155169055565b600061183f82614e60565b603e5481565b6065546000906001600160a01b031661356c57506000612546565b606554604080516321f8a72160e01b81526524b9b9bab2b960d11b600482015290516001600160a01b03909216916321f8a72191602480820192602092909190829003018186803b1580156135c057600080fd5b505afa1580156135d4573d6000803e3d6000fd5b505050506040513d60208110156135ea57600080fd5b50519050612546565b600069021e19e0c9bab240000061367c61360b613551565b6001600160a01b031663b410a0346040518163ffffffff1660e01b815260040160206040518083038186803b15801561364357600080fd5b505afa158015613657573d6000803e3d6000fd5b505050506040513d602081101561366d57600080fd5b5051829063ffffffff61525916565b91505090565b6001600160a01b03166000908152604b602052604090205490565b6033546001600160a01b031681565b60495481565b6000805b6004811015612d8f576001600160a01b0383166000908152606d602052604090206136e89060049083828110612d2c57fe5b603e54101561371b576001600160a01b0383166000908152606d60205260409020613718908260048110612d7257fe5b91505b6001016136b6565b60375481565b60415481565b60635481565b600061183f82615601565b603e546001600160a01b0382166000908152606160205260408120549091148061378057506001600160a01b038216600090815260566020526040902054155b806137a45750603e546001600160a01b038316600090815260576020526040902054145b806137af5750606254155b6118425761183f6137cd606354606254614c2390919063ffffffff16565b604354603854604080516317640e0760e01b81526001600160a01b038881166004830152915161240194936132f79361010090910416916317640e07916024808301926020929190829003018186803b15801561382957600080fd5b505afa15801561383d573d6000803e3d6000fd5b505050506040513d602081101561385357600080fd5b50516001600160a01b0388166000908152605660205260409020549063ffffffff614c2316565b60008061388683613740565b9050600061389384613279565b9050613322670de0b6b3a7640000612401848463ffffffff61520016565b607060209081526000928352604080842090915290825290205460ff1681565b6000805b6004811015612d8f576001600160a01b0383166000908152606f602052604090206139079060049083828110612d2c57fe5b603e54101561393a576001600160a01b0383166000908152606f60205260409020613937908260048110612d7257fe5b91505b6001016138d5565b603c546001600160a01b031681565b605b5460ff1681565b60008061396683613740565b905080613977576000915050611842565b605e5461398b90829063ffffffff61520016565b61399484615601565b10156139d1576139cc6139b2605e548361520090919063ffffffff16565b612401605d546132f7662386f26fc100006132f789615601565b6139eb565b605d546139eb90662386f26fc1000063ffffffff61520016565b9392505050565b6078546001600160a01b031681565b603580546001019081905560385460ff1615613a4e5760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b613a598233336156a4565b604080513381526020810184905281517f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d929181900390910190a16035548114612fae576040805162461bcd60e51b815260206004820152601f6024820152600080516020615aa1833981519152604482015290519081900360640190fd5b600080613ae3613551565b6001600160a01b031663d37c4d8b846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200180631cd554d160e21b81525060200191505060206040518083038186803b158015613b4757600080fd5b505afa158015613b5b573d6000803e3d6000fd5b505050506040513d6020811015613b7157600080fd5b5051905080613b84576000915050611842565b69021e19e0c9bab24000006000613b99613551565b6040805163ae3bbbbb60e01b81526001600160a01b038881166004830152825193169263ae3bbbbb92602480840193919291829003018186803b158015613bdf57600080fd5b505afa158015613bf3573d6000803e3d6000fd5b505050506040513d6040811015613c0957600080fd5b50519050613c1d828263ffffffff61525916565b95945050505050565b6000805b6004811015612d8f576001600160a01b0383166000908152606960205260409020613c5c9060049083828110612d2c57fe5b603e541015613c8f576001600160a01b0383166000908152606960205260409020613c8c908260048110612d7257fe5b91505b600101613c2a565b600080604254118015613cbe5750604054603f54613cba9163ffffffff614c2316565b4210155b905090565b603580546001019081905560385460ff1615613d105760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b613d1933614eaf565b6035548114611a50576040805162461bcd60e51b815260206004820152601f6024820152600080516020615aa1833981519152604482015290519081900360640190fd5b600061183f8261544d565b60445481565b603b546001600160a01b031681565b6072602052600090815260409020546001600160a01b031681565b613da0614d61565b60385461010090046001600160a01b031615613e43576039546038546040805163095ea7b360e01b81526101009092046001600160a01b039081166004840152600060248401819052915193169263095ea7b3926044808201936020939283900390910190829087803b158015613e1657600080fd5b505af1158015613e2a573d6000803e3d6000fd5b505050506040513d6020811015613e4057600080fd5b50505b60388054610100600160a81b0319166101006001600160a01b03848116918202929092179092556039546040805163095ea7b360e01b8152600481019490945260001960248501525191169163095ea7b39160448083019260209291908290030181600087803b158015613eb657600080fd5b505af1158015613eca573d6000803e3d6000fd5b505050506040513d6020811015613ee057600080fd5b5050604080516001600160a01b038316815290517feb1a4b1e230d212e1644ea31e3890084e2fa17ddee990e46a46e198e1728c4a09181900360200190a150565b613f29614d61565b6001600160a01b038116613f76576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b603454600160a81b900460ff1615613fcb576040805162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481d1c985b9cd9995c9c9959606a1b604482015290519081900360640190fd5b603380546001600160a01b038084166001600160a01b03199092168217928390556034805460ff60a81b1916600160a81b17905560408051939091168352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a150565b60385460ff16156140825760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b60715460ff166140d9576040805162461bcd60e51b815260206004820152601960248201527f4d65726765206163636f756e742069732064697361626c656400000000000000604482015290519081900360640190fd5b6001600160a01b038116158015906140fa57506001600160a01b0381163314155b61413d576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b61414633614e60565b158015614159575061415781614e60565b155b6141945760405162461bcd60e51b815260040180806020018281038252603b815260200180615d27603b913960400191505060405180910390fd5b3360009081526054602052604090205460ff161580156141cd57506001600160a01b03811660009081526054602052604090205460ff16155b6142085760405162461bcd60e51b815260040180806020018281038252603e815260200180615c89603e913960400191505060405180910390fd5b6075546001600160a01b0316156142dd5760755460408051633656b51760e21b815233600482015290516001600160a01b039092169163d95ad45c91602480820192602092909190829003018186803b15801561426457600080fd5b505afa158015614278573d6000803e3d6000fd5b505050506040513d602081101561428e57600080fd5b5051156142dd576040805162461bcd60e51b815260206004820152601860248201527743616e6e6f74206d65726765207768696c65204c50696e6760401b604482015290519081900360640190fd5b6076546001600160a01b0316156143b25760765460408051633656b51760e21b815233600482015290516001600160a01b039092169163d95ad45c91602480820192602092909190829003018186803b15801561433957600080fd5b505afa15801561434d573d6000803e3d6000fd5b505050506040513d602081101561436357600080fd5b5051156143b2576040805162461bcd60e51b815260206004820152601860248201527743616e6e6f74206d65726765207768696c65204c50696e6760401b604482015290519081900360640190fd5b6078546001600160a01b0316156144875760785460408051633656b51760e21b815233600482015290516001600160a01b039092169163d95ad45c91602480820192602092909190829003018186803b15801561440e57600080fd5b505afa158015614422573d6000803e3d6000fd5b505050506040513d602081101561443857600080fd5b505115614487576040805162461bcd60e51b815260206004820152601860248201527743616e6e6f74206d65726765207768696c65204c50696e6760401b604482015290519081900360640190fd5b60385460408051630282a2ed60e21b81523360048201526001600160a01b038481166024830152915161010090930490911691630a0a8bb49160448082019260009290919082900301818387803b1580156144e157600080fd5b505af11580156144f5573d6000803e3d6000fd5b505033600090815260566020526040808220546001600160a01b03861683529120546145299350915063ffffffff614c2316565b6001600160a01b038216600081815260566020908152604080832094909455338252604b905282812054918152919091205461456a9163ffffffff614c2316565b6001600160a01b0382166000818152604b6020908152604080832094909455338252604c90528281205491815291909120546145ab9163ffffffff614c2316565b6001600160a01b0382166000908152604c6020908152604080832093909355603e5460578252838320819055606182528383208190556059909152918120919091558060015b600481116147715761461f600461461383603e54614c2390919063ffffffff16565b9063ffffffff614bbc16565b925061464461463560048363ffffffff614dac16565b603e549063ffffffff614dac16565b6001600160a01b0385166000908152605a60205260409020909250836004811061466a57fe5b600202016001015482146146d1576001600160a01b0384166000908152605a60205260408120846004811061469b57fe5b60020201556001600160a01b0384166000908152605a60205260409020829084600481106146c557fe5b60020201600101819055505b336000908152605a6020526040902083600481106146eb57fe5b600202016001015482141561476957336000908152605a6020526040902061474090846004811061471857fe5b60020201546001600160a01b0386166000908152605a6020526040902085600481106112fd57fe5b6001600160a01b0385166000908152605a60205260409020846004811061476357fe5b60020201555b6001016145f1565b5033600090815260536020908152604080832083905560548252808320805460ff191690556055825280832083905560568252808320839055604b8252808320839055604c8252808320839055605782528083208390556061825280832083905560598252808320839055605a90915281206147ec91615a68565b604080513381526001600160a01b038516602082015281517fa0fc26d627101bedf9c6cedb33e9eeac3fa2a7d508f89b597134bcee1a12d32c929181900390910190a1505050565b60008061484083613740565b905060006138938461395a565b60715460ff1681565b6067546001600160a01b031681565b60546020526000908152604090205460ff1681565b605c5481565b600061488a613551565b6001600160a01b031663d37c4d8b836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200180631cd554d160e21b81525060200191505060206040518083038186803b1580156148ee57600080fd5b505afa158015614902573d6000803e3d6000fd5b505050506040513d602081101561491857600080fd5b505192915050565b603a54604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561251757600080fd5b605e5481565b603d54604080516315905ec160e31b8152620a69cb60eb1b600482015290516000926001600160a01b03169163ac82f608916024808301926020929190829003018186803b15801561251757600080fd5b60435481565b60385460ff1615614a0a5760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b3360009081526072602090815260409182902080546001600160a01b0319166001600160a01b038516908117909155825190815291517f0c417702befaa0d74611c15e4278a897f344514ffbfbd4ea9a6e9168be46b8da9281900390910190a150565b605d5481565b60365460ff1615614ac1576040805162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604482015290519081900360640190fd5b6036805460ff19166001908117909155603555565b600080614ae283613279565b90506000614aef8461395a565b9050613322828263ffffffff614c2316565b60425481565b60605481565b614b15614d61565b604a805486151560ff199182168117909255604580548715159083168117909155604086815560418690556071805486151594168417905580519384526020840191909152828101869052606083018590526080830191909152517fc3fb08f467537b94d35d16e7ea0c42e3d6ff73af0f2311728cda630fc81bb4f59181900360a00190a15050505050565b60746020526000908152604090205460ff1681565b60485481565b600081614c10576040805162461bcd60e51b815260206004820152601860248201527f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000604482015290519081900360640190fd5b818381614c1957fe5b0690505b92915050565b6000828201838110156139eb576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600080614c8983613740565b905080614c9a576000915050611842565b6139eb614cb4606354606254614c2390919063ffffffff16565b604454603854604080516317640e0760e01b81526001600160a01b038981166004830152915161240194936132f79361010090910416916317640e07916024808301926020929190829003018186803b158015614d1057600080fd5b505afa158015614d24573d6000803e3d6000fd5b505050506040513d6020811015614d3a57600080fd5b50516001600160a01b0389166000908152605660205260409020549063ffffffff614c2316565b6033546001600160a01b03163314614daa5760405162461bcd60e51b815260040180806020018281038252602f815260200180615b72602f913960400191505060405180910390fd5b565b600082821115614e03576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052614e5b90849061584a565b505050565b600080614e6c83613740565b905080614e7d576000915050611842565b605b5460ff16614e8e579050611842565b614ea7614e9a846122c2565b829063ffffffff614c2316565b915050611842565b60385460ff1615614ef15760405162461bcd60e51b815260040180806020018281038252603c815260200180615cc7603c913960400191505060405180910390fd5b604a5460ff16614f48576040805162461bcd60e51b815260206004820152601860248201527f436c61696d696e67206973206e6f7420656e61626c65642e0000000000000000604482015290519081900360640190fd5b600060425411614f9f576040805162461bcd60e51b815260206004820152601e60248201527f5374616b696e6720706572696f6420686173206e6f7420737461727465640000604482015290519081900360640190fd5b60455460ff1615615079576000614fb582614c7d565b9050801561507757603a54614fda906001600160a01b0316838363ffffffff614e0916565b6001600160a01b0382166000908152604c6020526040902054615003908263ffffffff614c2316565b6001600160a01b0383166000908152604c602052604090205560525461502f908263ffffffff614c2316565b605255604080516001600160a01b03841681526020810183905281517f5b16e1043a283423361eb77682c99aff55948b34296846800a1a7dc9547a89fc929181900390910190a15b505b600061508482614e60565b905080156151e057605b546040805163b01ca88f60e01b81526001600160a01b0385811660048301526024820185905291516101009093049091169163b01ca88f9160448082019260009290919082900301818387803b1580156150e757600080fd5b505af11580156150fb573d6000803e3d6000fd5b5050506001600160a01b0383166000908152604b602052604090205461512891508263ffffffff614c2316565b6001600160a01b0383166000908152604b6020526040902055605154615154908263ffffffff614c2316565b60515560505461516a908263ffffffff614dac16565b6050557f5619b8583bbbb0760d27ac9ff844cec866b333bf7ad0262c2d809ff42f22e5fc828261519982613740565b6151a28661387a565b6151ab87614834565b604080516001600160a01b03909616865260208601949094528484019290925260608401526080830152519081900360a00190a15b50603e546001600160a01b03909116600090815260576020526040902055565b60008261520f57506000614c1d565b8282028284828161521c57fe5b04146139eb5760405162461bcd60e51b8152600401808060200182810382526021815260200180615ba16021913960400191505060405180910390fd5b60008082116152af576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b60008284816152ba57fe5b04949350505050565b6001600160a01b038116600090815260566020526040902054611a5057603854604080516334c78ae560e11b81526001600160a01b038481166004830152915160009361010090049092169163698f15ca91602480820192602092909190829003018186803b15801561533557600080fd5b505afa158015615349573d6000803e3d6000fd5b505050506040513d602081101561535f57600080fd5b50511115611a5057603854604080516334c78ae560e11b81526001600160a01b03848116600483015291516101009093049091169163ad6d15de91839163698f15ca91602480820192602092909190829003018186803b1580156153c257600080fd5b505afa1580156153d6573d6000803e3d6000fd5b505050506040513d60208110156153ec57600080fd5b5051604080516001600160e01b031960e085901b168152600481019290925251602480830192600092919082900301818387803b15801561542c57600080fd5b505af1158015615440573d6000803e3d6000fd5b5050505050565b303b1590565b6065546000906001600160a01b03161561184257600061546c83613ad8565b905060006154786135f3565b603d54604080516315905ec160e31b8152620a69cb60eb1b600482015290519293506000926001600160a01b039092169163ac82f60891602480820192602092909190829003018186803b1580156154cf57600080fd5b505afa1580156154e3573d6000803e3d6000fd5b505050506040513d60208110156154f957600080fd5b505190506000615507613551565b6001600160a01b031663d37c4d8b876040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200180631cd554d160e21b81525060200191505060206040518083038186803b15801561556b57600080fd5b505afa15801561557f573d6000803e3d6000fd5b505050506040513d602081101561559557600080fd5b50519050828410156155d7576155d06155b4848463ffffffff61520016565b612401655af3107a40006132f785818a8063ffffffff61520016565b94506155f8565b6155f582612401655af3107a40006132f7878663ffffffff61520016565b94505b50505050919050565b6001600160a01b03811660009081526059602052604081205461562b90600463ffffffff614c2316565b603e5410156118425760005b6004811015612d8f576001600160a01b0383166000908152605a602052604090206156699060049083828110612d2c57fe5b603e54101561569c576001600160a01b0383166000908152605a60205260409020615699908260048110612d7257fe5b91505b600101615637565b6000604254116156fb576040805162461bcd60e51b815260206004820152601e60248201527f5374616b696e6720706572696f6420686173206e6f7420737461727465640000604482015290519081900360640190fd5b60008311615741576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b6001600160a01b03821660009081526054602052604090205460ff16156157995760405162461bcd60e51b8152600401808060200182810382526032815260200180615c296032913960400191505060405180910390fd5b60006157a483614e60565b11156157b3576157b382614eaf565b603e546001600160a01b0383166000908152606160205260409020556157d8826152c3565b604d546157eb908463ffffffff614c2316565b604d556001600160a01b038216600090815260566020526040902054615817908463ffffffff614c2316565b6001600160a01b03808416600090815260566020526040902091909155603954614e5b911682308663ffffffff615a0816565b61585c826001600160a01b0316615a62565b6158ad576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106158eb5780518252601f1990920191602091820191016158cc565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461594d576040519150601f19603f3d011682016040523d82523d6000602084013e615952565b606091505b5091509150816159a9576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115615a02578080602001905160208110156159c557600080fd5b5051615a025760405162461bcd60e51b815260040180806020018281038252602a815260200180615d62602a913960400191505060405180910390fd5b50505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052615a0290859061584a565b3b151590565b50600080825560018201819055600282018190556003820181905560048201819055600582018190556006820181905560079091015556fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c00596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e657273686970416c726561647920696e697469616c697a65642c20757365206e6f6d696e6174654e65774f776e657243616e6e6f7420756e7374616b65207965742c20636f6f6c646f776e206e6f7420657870697265642e4163636f756e7420686173206e6f742074726967676572656420756e7374616b6520636f6f6c646f776e4f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564412066756c6c20706572696f6420686173206e6f74207061737365642073696e636520746865206c61737420636c6f73656420706572696f64546865207374616b6572206973207061757365642066726f6d207374616b696e672064756520746f20756e7374616b696e674163636f756e742068617320616c72656164792074726967676572656420756e7374616b6520636f6f6c646f776e43616e6e6f74206d657267652c2063616e63656c20756e7374616b696e67206f6e20626f7468206163636f756e7473206265666f7265206d657267696e675468697320616374696f6e2063616e6e6f7420626520706572666f726d6564207768696c652074686520636f6e7472616374206973207061757365644163636f756e7420646f65736e7420686176652074686174206d756368207374616b656443616e6e6f74206d657267652c20636c61696d2072657761726473206f6e20626f7468206163636f756e7473206265666f7265206d657267696e675361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820eec88a66d29323f4f2e6db71785757e2bea2d93688e20c89814ec2243e23d0ba64736f6c63430005100032
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.