More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 2,498 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw Locked | 21253004 | 50 days ago | IN | 0 ETH | 0.00408883 | ||||
Sync | 20602358 | 140 days ago | IN | 0 ETH | 0.00013467 | ||||
Sync | 20530664 | 150 days ago | IN | 0 ETH | 0.00020626 | ||||
Sync | 19756490 | 259 days ago | IN | 0 ETH | 0.00059702 | ||||
Withdraw Locked | 19662529 | 272 days ago | IN | 0 ETH | 0.00790505 | ||||
Withdraw Locked | 19637455 | 275 days ago | IN | 0 ETH | 0.00265638 | ||||
Get Reward | 19637453 | 275 days ago | IN | 0 ETH | 0.00358182 | ||||
Sync | 19073515 | 354 days ago | IN | 0 ETH | 0.00098251 | ||||
Sync | 18114228 | 489 days ago | IN | 0 ETH | 0.00434992 | ||||
Withdraw Locked | 16730359 | 683 days ago | IN | 0 ETH | 0.00394065 | ||||
Get Reward | 16730354 | 683 days ago | IN | 0 ETH | 0.00563877 | ||||
Get Reward | 16408754 | 728 days ago | IN | 0 ETH | 0.00635218 | ||||
Get Reward | 16255162 | 750 days ago | IN | 0 ETH | 0.00228653 | ||||
Get Reward | 16248268 | 751 days ago | IN | 0 ETH | 0.00421871 | ||||
Withdraw Locked | 15948110 | 793 days ago | IN | 0 ETH | 0.00705982 | ||||
Get Reward | 15948108 | 793 days ago | IN | 0 ETH | 0.00916899 | ||||
Withdraw Locked | 15800124 | 813 days ago | IN | 0 ETH | 0.00642552 | ||||
Withdraw Locked | 15797427 | 814 days ago | IN | 0 ETH | 0.01294536 | ||||
Withdraw Locked | 15521244 | 853 days ago | IN | 0 ETH | 0.00593371 | ||||
Get Reward | 15380094 | 876 days ago | IN | 0 ETH | 0.00327932 | ||||
Withdraw Locked | 15325710 | 884 days ago | IN | 0 ETH | 0.00202317 | ||||
Get Reward | 15325669 | 884 days ago | IN | 0 ETH | 0.00313769 | ||||
Withdraw Locked | 15294620 | 889 days ago | IN | 0 ETH | 0.00101596 | ||||
Get Reward | 15294616 | 889 days ago | IN | 0 ETH | 0.0014151 | ||||
Withdraw Locked | 15288404 | 890 days ago | IN | 0 ETH | 0.00135456 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
StakingRewardsMultiGauge_FRAX_SUSHI
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 100000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.6.11; pragma experimental ABIEncoderV2; import "../StakingRewardsMultiGauge.sol"; contract StakingRewardsMultiGauge_FRAX_SUSHI is StakingRewardsMultiGauge { constructor ( address _owner, address _stakingToken, address _rewards_distributor_address, string[] memory _rewardSymbols, address[] memory _rewardTokens, address[] memory _rewardManagers, uint256[] memory _rewardRates, address[] memory _gaugeControllers ) StakingRewardsMultiGauge(_owner, _stakingToken, _rewards_distributor_address, _rewardSymbols, _rewardTokens, _rewardManagers, _rewardRates, _gaugeControllers) {} }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.6.11; pragma experimental ABIEncoderV2; // ==================================================================== // | ______ _______ | // | / _____________ __ __ / ____(_____ ____ _____ ________ | // | / /_ / ___/ __ `| |/_/ / /_ / / __ \/ __ `/ __ \/ ___/ _ \ | // | / __/ / / / /_/ _> < / __/ / / / / / /_/ / / / / /__/ __/ | // | /_/ /_/ \__,_/_/|_| /_/ /_/_/ /_/\__,_/_/ /_/\___/\___/ | // | | // ==================================================================== // ===================== StakingRewardsMultiGauge ===================== // ==================================================================== // veFXS-enabled // Multiple tokens with different reward rates can be emitted // Multiple teams can set the reward rates for their token(s) // Those teams can also use a gauge, or an external function with // Apes together strong // Frax Finance: https://github.com/FraxFinance // Primary Author(s) // Travis Moore: https://github.com/FortisFortuna // Reviewer(s) / Contributor(s) // Jason Huan: https://github.com/jasonhuan // Sam Kazemian: https://github.com/samkazemian // Saddle Team: https://github.com/saddle-finance // Fei Team: https://github.com/fei-protocol // Alchemix Team: https://github.com/alchemix-finance // Liquity Team: https://github.com/liquity // Originally inspired by Synthetix.io, but heavily modified by the Frax team // https://raw.githubusercontent.com/Synthetixio/synthetix/develop/contracts/StakingRewards.sol import "../Math/Math.sol"; import "../Math/SafeMath.sol"; import "../ERC20/ERC20.sol"; import "../Curve/IveFXS.sol"; import "../ERC20/SafeERC20.sol"; import '../Uniswap/TransferHelper.sol'; import '../Uniswap/Interfaces/IUniswapV2Pair.sol'; // import '../Misc_AMOs/mstable/IFeederPool.sol'; import "../Curve/IFraxGaugeController.sol"; import "../Curve/IFraxGaugeFXSRewardsDistributor.sol"; import "../Utils/ReentrancyGuard.sol"; // Inheritance import "./Owned.sol"; contract StakingRewardsMultiGauge is Owned, ReentrancyGuard { using SafeMath for uint256; using SafeERC20 for ERC20; /* ========== STATE VARIABLES ========== */ // Instances IveFXS private veFXS = IveFXS(0xc8418aF6358FFddA74e09Ca9CC3Fe03Ca6aDC5b0); // Uniswap V2 IUniswapV2Pair public stakingToken; // // mStable // IFeederPool public stakingToken; IFraxGaugeFXSRewardsDistributor public rewards_distributor; // FRAX address private constant frax_address = 0x853d955aCEf822Db058eb8505911ED77F175b99e; // Constant for various precisions uint256 private constant MULTIPLIER_PRECISION = 1e18; // Time tracking uint256 public periodFinish; uint256 public lastUpdateTime; // Lock time and multiplier settings uint256 public lock_max_multiplier = uint256(3e18); // E18. 1x = e18 uint256 public lock_time_for_max_multiplier = 3 * 365 * 86400; // 3 years uint256 public lock_time_min = 86400; // 1 * 86400 (1 day) // veFXS related uint256 public vefxs_per_frax_for_max_boost = uint256(4e18); // E18. 4e18 means 4 veFXS must be held by the staker per 1 FRAX uint256 public vefxs_max_multiplier = uint256(2e18); // E18. 1x = 1e18 mapping(address => uint256) private _vefxsMultiplierStored; // Reward addresses, gauge addresses, reward rates, and reward managers mapping(address => address) public rewardManagers; // token addr -> manager addr address[] public rewardTokens; address[] public gaugeControllers; uint256[] public rewardRatesManual; string[] public rewardSymbols; mapping(address => uint256) public rewardTokenAddrToIdx; // token addr -> token index // Reward period uint256 public rewardsDuration = 604800; // 7 * 86400 (7 days) // Reward tracking uint256[] private rewardsPerTokenStored; mapping(address => mapping(uint256 => uint256)) private userRewardsPerTokenPaid; // staker addr -> token id -> paid amount mapping(address => mapping(uint256 => uint256)) private rewards; // staker addr -> token id -> reward amount mapping(address => uint256) private lastRewardClaimTime; // staker addr -> timestamp uint256[] private last_gauge_relative_weights; uint256[] private last_gauge_time_totals; // Balance tracking uint256 private _total_liquidity_locked; uint256 private _total_combined_weight; mapping(address => uint256) private _locked_liquidity; mapping(address => uint256) private _combined_weights; // List of valid migrators (set by governance) mapping(address => bool) public valid_migrators; // Stakers set which migrator(s) they want to use mapping(address => mapping(address => bool)) public staker_allowed_migrators; // Uniswap V2 ONLY bool frax_is_token0; // Stake tracking mapping(address => LockedStake[]) private lockedStakes; // Greylisting of bad addresses mapping(address => bool) public greylist; // Administrative booleans bool public stakesUnlocked; // Release locked stakes in case of emergency bool public migrationsOn; // Used for migrations. Prevents new stakes, but allows LP and reward withdrawals bool public withdrawalsPaused; // For emergencies bool public rewardsCollectionPaused; // For emergencies bool public stakingPaused; // For emergencies /* ========== STRUCTS ========== */ struct LockedStake { bytes32 kek_id; uint256 start_timestamp; uint256 liquidity; uint256 ending_timestamp; uint256 lock_multiplier; // 6 decimals of precision. 1x = 1000000 } /* ========== MODIFIERS ========== */ modifier onlyByOwner() { require(msg.sender == owner, "Not the owner"); _; } modifier onlyTknMgrs(address reward_token_address) { require(msg.sender == owner || isTokenManagerFor(msg.sender, reward_token_address), "Not owner or tkn mgr"); _; } modifier isMigrating() { require(migrationsOn == true, "Not in migration"); _; } modifier notStakingPaused() { require(stakingPaused == false, "Staking paused"); _; } modifier updateRewardAndBalance(address account, bool sync_too) { _updateRewardAndBalance(account, sync_too); _; } /* ========== CONSTRUCTOR ========== */ constructor ( address _owner, address _stakingToken, address _rewards_distributor_address, string[] memory _rewardSymbols, address[] memory _rewardTokens, address[] memory _rewardManagers, uint256[] memory _rewardRatesManual, address[] memory _gaugeControllers ) Owned(_owner){ // // mStable // stakingToken = IFeederPool(_stakingToken); // Uniswap V2 stakingToken = IUniswapV2Pair(_stakingToken); rewards_distributor = IFraxGaugeFXSRewardsDistributor(_rewards_distributor_address); rewardTokens = _rewardTokens; gaugeControllers = _gaugeControllers; rewardRatesManual = _rewardRatesManual; rewardSymbols = _rewardSymbols; for (uint256 i = 0; i < _rewardTokens.length; i++){ // For fast token address -> token ID lookups later rewardTokenAddrToIdx[_rewardTokens[i]] = i; // Initialize the stored rewards rewardsPerTokenStored.push(0); // Initialize the reward managers rewardManagers[_rewardTokens[i]] = _rewardManagers[i]; // Push in empty relative weights to initialize the array last_gauge_relative_weights.push(0); // Push in empty time totals to initialize the array last_gauge_time_totals.push(0); } // Uniswap V2 ONLY // Uniswap related. Need to know which token frax is (0 or 1) address token0 = stakingToken.token0(); if (token0 == frax_address) frax_is_token0 = true; else frax_is_token0 = false; // Other booleans stakesUnlocked = false; // Initialization lastUpdateTime = block.timestamp; periodFinish = block.timestamp.add(rewardsDuration); // // Need to call eventually // sync_gauge_weights(true); } /* ========== VIEWS ========== */ // Total locked liquidity tokens function totalLiquidityLocked() external view returns (uint256) { return _total_liquidity_locked; } // Locked liquidity for a given account function lockedLiquidityOf(address account) external view returns (uint256) { return _locked_liquidity[account]; } // Total 'balance' used for calculating the percent of the pool the account owns // Takes into account the locked stake time multiplier function totalCombinedWeight() external view returns (uint256) { return _total_combined_weight; } // Combined weight for a specific account function combinedWeightOf(address account) external view returns (uint256) { return _combined_weights[account]; } function fraxPerLPToken() public view returns (uint256) { // Get the amount of FRAX 'inside' of the lp tokens uint256 frax_per_lp_token; // Uniswap V2 // ============================================ { uint256 total_frax_reserves; (uint256 reserve0, uint256 reserve1, ) = (stakingToken.getReserves()); if (frax_is_token0) total_frax_reserves = reserve0; else total_frax_reserves = reserve1; frax_per_lp_token = total_frax_reserves.mul(1e18).div(stakingToken.totalSupply()); } // // mStable // // ============================================ // { // uint256 total_frax_reserves; // (, IFeederPool.BassetData memory vaultData) = (stakingToken.getBasset(frax_address)); // total_frax_reserves = uint256(vaultData.vaultBalance); // frax_per_lp_token = total_frax_reserves.mul(1e18).div(stakingToken.totalSupply()); // } return frax_per_lp_token; } function userStakedFrax(address account) public view returns (uint256) { return (fraxPerLPToken()).mul(_locked_liquidity[account]).div(1e18); } function minVeFXSForMaxBoost(address account) public view returns (uint256) { return (userStakedFrax(account)).mul(vefxs_per_frax_for_max_boost).div(MULTIPLIER_PRECISION); } function veFXSMultiplier(address account) public view returns (uint256) { // The claimer gets a boost depending on amount of veFXS they have relative to the amount of FRAX 'inside' // of their locked LP tokens uint256 veFXS_needed_for_max_boost = minVeFXSForMaxBoost(account); if (veFXS_needed_for_max_boost > 0){ uint256 user_vefxs_fraction = (veFXS.balanceOf(account)).mul(MULTIPLIER_PRECISION).div(veFXS_needed_for_max_boost); uint256 vefxs_multiplier = ((user_vefxs_fraction).mul(vefxs_max_multiplier)).div(MULTIPLIER_PRECISION); // Cap the boost to the vefxs_max_multiplier if (vefxs_multiplier > vefxs_max_multiplier) vefxs_multiplier = vefxs_max_multiplier; return vefxs_multiplier; } else return 0; // This will happen with the first stake, when user_staked_frax is 0 } // Calculated the combined weight for an account function calcCurCombinedWeight(address account) public view returns ( uint256 old_combined_weight, uint256 new_vefxs_multiplier, uint256 new_combined_weight ) { // Get the old combined weight old_combined_weight = _combined_weights[account]; // Get the veFXS multipliers // For the calculations, use the midpoint (analogous to midpoint Riemann sum) new_vefxs_multiplier = veFXSMultiplier(account); uint256 midpoint_vefxs_multiplier = ((new_vefxs_multiplier).add(_vefxsMultiplierStored[account])).div(2); // Loop through the locked stakes, first by getting the liquidity * lock_multiplier portion new_combined_weight = 0; for (uint256 i = 0; i < lockedStakes[account].length; i++) { LockedStake memory thisStake = lockedStakes[account][i]; uint256 lock_multiplier = thisStake.lock_multiplier; // If the lock is expired if (thisStake.ending_timestamp <= block.timestamp) { // If the lock expired in the time since the last claim, the weight needs to be proportionately averaged this time if (lastRewardClaimTime[account] < thisStake.ending_timestamp){ uint256 time_before_expiry = (thisStake.ending_timestamp).sub(lastRewardClaimTime[account]); uint256 time_after_expiry = (block.timestamp).sub(thisStake.ending_timestamp); // Get the weighted-average lock_multiplier uint256 numerator = ((lock_multiplier).mul(time_before_expiry)).add(((MULTIPLIER_PRECISION).mul(time_after_expiry))); lock_multiplier = numerator.div(time_before_expiry.add(time_after_expiry)); } // Otherwise, it needs to just be 1x else { lock_multiplier = MULTIPLIER_PRECISION; } } uint256 liquidity = thisStake.liquidity; uint256 combined_boosted_amount = liquidity.mul(lock_multiplier.add(midpoint_vefxs_multiplier)).div(MULTIPLIER_PRECISION); new_combined_weight = new_combined_weight.add(combined_boosted_amount); } } // All the locked stakes for a given account function lockedStakesOf(address account) external view returns (LockedStake[] memory) { return lockedStakes[account]; } // All the locked stakes for a given account function getRewardSymbols() external view returns (string[] memory) { return rewardSymbols; } // All the reward tokens function getAllRewardTokens() external view returns (address[] memory) { return rewardTokens; } // Multiplier amount, given the length of the lock function lockMultiplier(uint256 secs) public view returns (uint256) { uint256 lock_multiplier = uint256(MULTIPLIER_PRECISION).add( secs .mul(lock_max_multiplier.sub(MULTIPLIER_PRECISION)) .div(lock_time_for_max_multiplier) ); if (lock_multiplier > lock_max_multiplier) lock_multiplier = lock_max_multiplier; return lock_multiplier; } // Last time the reward was applicable function lastTimeRewardApplicable() internal view returns (uint256) { return Math.min(block.timestamp, periodFinish); } function rewardRates(uint256 token_idx) public view returns (uint256 rwd_rate) { address gauge_controller_address = gaugeControllers[token_idx]; if (gauge_controller_address != address(0)) { rwd_rate = (IFraxGaugeController(gauge_controller_address).global_emission_rate()).mul(last_gauge_relative_weights[token_idx]).div(1e18); } else { rwd_rate = rewardRatesManual[token_idx]; } } // Amount of reward tokens per LP token function rewardsPerToken() public view returns (uint256[] memory newRewardsPerTokenStored) { if (_total_liquidity_locked == 0 || _total_combined_weight == 0) { return rewardsPerTokenStored; } else { newRewardsPerTokenStored = new uint256[](rewardTokens.length); for (uint256 i = 0; i < rewardsPerTokenStored.length; i++){ newRewardsPerTokenStored[i] = rewardsPerTokenStored[i].add( lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRates(i)).mul(1e18).div(_total_combined_weight) ); } return newRewardsPerTokenStored; } } // Amount of reward tokens an account has earned / accrued // Note: In the edge-case of one of the account's stake expiring since the last claim, this will // return a slightly inflated number function earned(address account) public view returns (uint256[] memory new_earned) { uint256[] memory reward_arr = rewardsPerToken(); new_earned = new uint256[](rewardTokens.length); if (_combined_weights[account] == 0){ for (uint256 i = 0; i < rewardTokens.length; i++){ new_earned[i] = 0; } } else { for (uint256 i = 0; i < rewardTokens.length; i++){ new_earned[i] = (_combined_weights[account]) .mul(reward_arr[i].sub(userRewardsPerTokenPaid[account][i])) .div(1e18) .add(rewards[account][i]); } } } // Total reward tokens emitted in the given period function getRewardForDuration() external view returns (uint256[] memory rewards_per_duration_arr) { rewards_per_duration_arr = new uint256[](rewardRatesManual.length); for (uint256 i = 0; i < rewardRatesManual.length; i++){ rewards_per_duration_arr[i] = rewardRates(i).mul(rewardsDuration); } } // See if the caller_addr is a manager for the reward token function isTokenManagerFor(address caller_addr, address reward_token_addr) public view returns (bool){ if (caller_addr == owner) return true; // Contract owner else if (rewardManagers[reward_token_addr] == caller_addr) return true; // Reward manager return false; } /* ========== MUTATIVE FUNCTIONS ========== */ // Staker can allow a migrator function stakerAllowMigrator(address migrator_address) external { require(valid_migrators[migrator_address], "Invalid migrator address"); staker_allowed_migrators[msg.sender][migrator_address] = true; } // Staker can disallow a previously-allowed migrator function stakerDisallowMigrator(address migrator_address) external { // Delete from the mapping delete staker_allowed_migrators[msg.sender][migrator_address]; } function _updateRewardAndBalance(address account, bool sync_too) internal { // Need to retro-adjust some things if the period hasn't been renewed, then start a new one if (sync_too){ sync(); } if (account != address(0)) { // To keep the math correct, the user's combined weight must be recomputed to account for their // ever-changing veFXS balance. ( uint256 old_combined_weight, uint256 new_vefxs_multiplier, uint256 new_combined_weight ) = calcCurCombinedWeight(account); // Calculate the earnings first _syncEarned(account); // Update the user's stored veFXS multipliers _vefxsMultiplierStored[account] = new_vefxs_multiplier; // Update the user's and the global combined weights if (new_combined_weight >= old_combined_weight) { uint256 weight_diff = new_combined_weight.sub(old_combined_weight); _total_combined_weight = _total_combined_weight.add(weight_diff); _combined_weights[account] = old_combined_weight.add(weight_diff); } else { uint256 weight_diff = old_combined_weight.sub(new_combined_weight); _total_combined_weight = _total_combined_weight.sub(weight_diff); _combined_weights[account] = old_combined_weight.sub(weight_diff); } } } function _syncEarned(address account) internal { if (account != address(0)) { // Calculate the earnings uint256[] memory earned_arr = earned(account); // Update the rewards array for (uint256 i = 0; i < earned_arr.length; i++){ rewards[account][i] = earned_arr[i]; } // Update the rewards paid array for (uint256 i = 0; i < earned_arr.length; i++){ userRewardsPerTokenPaid[account][i] = rewardsPerTokenStored[i]; } } } // Two different stake functions are needed because of delegateCall and msg.sender issues function stakeLocked(uint256 liquidity, uint256 secs) nonReentrant public { _stakeLocked(msg.sender, msg.sender, liquidity, secs, block.timestamp); } // If this were not internal, and source_address had an infinite approve, this could be exploitable // (pull funds from source_address and stake for an arbitrary staker_address) function _stakeLocked( address staker_address, address source_address, uint256 liquidity, uint256 secs, uint256 start_timestamp ) internal updateRewardAndBalance(staker_address, true) { require(!stakingPaused, "Staking paused"); require(liquidity > 0, "Must stake more than zero"); require(greylist[staker_address] == false, "Address has been greylisted"); require(secs >= lock_time_min, "Minimum stake time not met"); require(secs <= lock_time_for_max_multiplier,"Trying to lock for too long"); uint256 lock_multiplier = lockMultiplier(secs); bytes32 kek_id = keccak256(abi.encodePacked(staker_address, start_timestamp, liquidity, _locked_liquidity[staker_address])); lockedStakes[staker_address].push(LockedStake( kek_id, start_timestamp, liquidity, start_timestamp.add(secs), lock_multiplier )); // Pull the tokens from the source_address TransferHelper.safeTransferFrom(address(stakingToken), source_address, address(this), liquidity); // Update liquidities _total_liquidity_locked = _total_liquidity_locked.add(liquidity); _locked_liquidity[staker_address] = _locked_liquidity[staker_address].add(liquidity); // Need to call to update the combined weights _updateRewardAndBalance(staker_address, false); // Needed for edge case if the staker only claims once, and after the lock expired if (lastRewardClaimTime[staker_address] == 0) lastRewardClaimTime[staker_address] = block.timestamp; emit StakeLocked(staker_address, liquidity, secs, kek_id, source_address); } // Two different withdrawLocked functions are needed because of delegateCall and msg.sender issues function withdrawLocked(bytes32 kek_id) nonReentrant public { require(withdrawalsPaused == false, "Withdrawals paused"); _withdrawLocked(msg.sender, msg.sender, kek_id); } // No withdrawer == msg.sender check needed since this is only internally callable and the checks are done in the wrapper // functions like withdraw(), migrator_withdraw_unlocked() and migrator_withdraw_locked() function _withdrawLocked(address staker_address, address destination_address, bytes32 kek_id) internal { // Collect rewards first and then update the balances _getReward(staker_address, destination_address); LockedStake memory thisStake; thisStake.liquidity = 0; uint theArrayIndex; for (uint256 i = 0; i < lockedStakes[staker_address].length; i++){ if (kek_id == lockedStakes[staker_address][i].kek_id){ thisStake = lockedStakes[staker_address][i]; theArrayIndex = i; break; } } require(thisStake.kek_id == kek_id, "Stake not found"); require(block.timestamp >= thisStake.ending_timestamp || stakesUnlocked == true || valid_migrators[msg.sender] == true, "Stake is still locked!"); uint256 liquidity = thisStake.liquidity; if (liquidity > 0) { // Update liquidities _total_liquidity_locked = _total_liquidity_locked.sub(liquidity); _locked_liquidity[staker_address] = _locked_liquidity[staker_address].sub(liquidity); // Remove the stake from the array delete lockedStakes[staker_address][theArrayIndex]; // Need to call to update the combined weights _updateRewardAndBalance(staker_address, false); // Give the tokens to the destination_address // Should throw if insufficient balance stakingToken.transfer(destination_address, liquidity); emit WithdrawLocked(staker_address, liquidity, kek_id, destination_address); } } // Two different getReward functions are needed because of delegateCall and msg.sender issues function getReward() external nonReentrant returns (uint256[] memory) { require(rewardsCollectionPaused == false,"Rewards collection paused"); return _getReward(msg.sender, msg.sender); } // No withdrawer == msg.sender check needed since this is only internally callable function _getReward(address rewardee, address destination_address) internal updateRewardAndBalance(rewardee, true) returns (uint256[] memory rewards_before) { // Update the rewards array and distribute rewards rewards_before = new uint256[](rewardTokens.length); for (uint256 i = 0; i < rewardTokens.length; i++){ rewards_before[i] = rewards[rewardee][i]; rewards[rewardee][i] = 0; ERC20(rewardTokens[i]).transfer(destination_address, rewards_before[i]); emit RewardPaid(rewardee, rewards_before[i], rewardTokens[i], destination_address); } lastRewardClaimTime[rewardee] = block.timestamp; } // If the period expired, renew it function retroCatchUp() internal { // Pull in rewards from the rewards distributor rewards_distributor.distributeReward(address(this)); // Ensure the provided reward amount is not more than the balance in the contract. // This keeps the reward rate in the right range, preventing overflows due to // very high values of rewardRate in the earned and rewardsPerToken functions; // Reward + leftover must be less than 2^256 / 10^18 to avoid overflow. uint256 num_periods_elapsed = uint256(block.timestamp.sub(periodFinish)) / rewardsDuration; // Floor division to the nearest period // Make sure there are enough tokens to renew the reward period for (uint256 i = 0; i < rewardTokens.length; i++){ require(rewardRates(i).mul(rewardsDuration).mul(num_periods_elapsed + 1) <= ERC20(rewardTokens[i]).balanceOf(address(this)), string(abi.encodePacked("Not enough reward tokens available: ", rewardTokens[i])) ); } // uint256 old_lastUpdateTime = lastUpdateTime; // uint256 new_lastUpdateTime = block.timestamp; // lastUpdateTime = periodFinish; periodFinish = periodFinish.add((num_periods_elapsed.add(1)).mul(rewardsDuration)); _updateStoredRewardsAndTime(); emit RewardsPeriodRenewed(address(stakingToken)); } function _updateStoredRewardsAndTime() internal { // Get the rewards uint256[] memory rewards_per_token = rewardsPerToken(); // Update the rewardsPerTokenStored for (uint256 i = 0; i < rewardsPerTokenStored.length; i++){ rewardsPerTokenStored[i] = rewards_per_token[i]; } // Update the last stored time lastUpdateTime = lastTimeRewardApplicable(); } function sync_gauge_weights(bool force_update) public { // Loop through the gauge controllers for (uint256 i = 0; i < gaugeControllers.length; i++){ address gauge_controller_address = gaugeControllers[i]; if (gauge_controller_address != address(0)) { if (force_update || (block.timestamp > last_gauge_time_totals[i])){ // Update the gauge_relative_weight last_gauge_relative_weights[i] = IFraxGaugeController(gauge_controller_address).gauge_relative_weight_write(address(this), block.timestamp); last_gauge_time_totals[i] = IFraxGaugeController(gauge_controller_address).time_total(); } } } } function sync() public { // Sync the gauge weight, if applicable sync_gauge_weights(false); if (block.timestamp >= periodFinish) { retroCatchUp(); } else { _updateStoredRewardsAndTime(); } } /* ========== RESTRICTED FUNCTIONS ========== */ // Migrator can stake for someone else (they won't be able to withdraw it back though, only staker_address can). function migrator_stakeLocked_for(address staker_address, uint256 amount, uint256 secs, uint256 start_timestamp) external isMigrating { require(staker_allowed_migrators[staker_address][msg.sender] && valid_migrators[msg.sender], "Mig. invalid or unapproved"); _stakeLocked(staker_address, msg.sender, amount, secs, start_timestamp); } // Used for migrations function migrator_withdraw_locked(address staker_address, bytes32 kek_id) external isMigrating { require(staker_allowed_migrators[staker_address][msg.sender] && valid_migrators[msg.sender], "Mig. invalid or unapproved"); _withdrawLocked(staker_address, msg.sender, kek_id); } // Adds supported migrator address function addMigrator(address migrator_address) external onlyByOwner { valid_migrators[migrator_address] = true; } // Remove a migrator address function removeMigrator(address migrator_address) external onlyByOwner { require(valid_migrators[migrator_address] == true, "Address nonexistant"); // Delete from the mapping delete valid_migrators[migrator_address]; } // Added to support recovering LP Rewards and other mistaken tokens from other systems to be distributed to holders function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyTknMgrs(tokenAddress) { // Check if the desired token is a reward token bool isRewardToken = false; for (uint256 i = 0; i < rewardTokens.length; i++){ if (rewardTokens[i] == tokenAddress) { isRewardToken = true; break; } } // Only the reward managers can take back their reward tokens if (isRewardToken && rewardManagers[tokenAddress] == msg.sender){ ERC20(tokenAddress).transfer(msg.sender, tokenAmount); emit Recovered(msg.sender, tokenAddress, tokenAmount); return; } // Other tokens, like the staking token, airdrops, or accidental deposits, can be withdrawn by the owner else if (!isRewardToken && (msg.sender == owner)){ ERC20(tokenAddress).transfer(msg.sender, tokenAmount); emit Recovered(msg.sender, tokenAddress, tokenAmount); return; } // If none of the above conditions are true else { revert("No valid tokens to recover"); } } function setRewardsDuration(uint256 _rewardsDuration) external onlyByOwner { require(_rewardsDuration >= 86400, "Rewards duration too short"); require( periodFinish == 0 || block.timestamp > periodFinish, "Reward period incomplete" ); rewardsDuration = _rewardsDuration; emit RewardsDurationUpdated(rewardsDuration); } function setMultipliers(uint256 _lock_max_multiplier, uint256 _vefxs_max_multiplier, uint256 _vefxs_per_frax_for_max_boost) external onlyByOwner { require(_lock_max_multiplier >= MULTIPLIER_PRECISION, "Mult must be >= MULTIPLIER_PRECISION"); require(_vefxs_max_multiplier >= 0, "veFXS mul must be >= 0"); require(_vefxs_per_frax_for_max_boost > 0, "veFXS pct max must be >= 0"); lock_max_multiplier = _lock_max_multiplier; vefxs_max_multiplier = _vefxs_max_multiplier; vefxs_per_frax_for_max_boost = _vefxs_per_frax_for_max_boost; emit MaxVeFXSMultiplier(vefxs_max_multiplier); emit LockedStakeMaxMultiplierUpdated(lock_max_multiplier); emit veFXSPerFraxForMaxBoostUpdated(vefxs_per_frax_for_max_boost); } function setLockedStakeTimeForMinAndMaxMultiplier(uint256 _lock_time_for_max_multiplier, uint256 _lock_time_min) external onlyByOwner { require(_lock_time_for_max_multiplier >= 1, "Mul max time must be >= 1"); require(_lock_time_min >= 1, "Mul min time must be >= 1"); lock_time_for_max_multiplier = _lock_time_for_max_multiplier; lock_time_min = _lock_time_min; emit LockedStakeTimeForMaxMultiplier(lock_time_for_max_multiplier); emit LockedStakeMinTime(_lock_time_min); } function greylistAddress(address _address) external onlyByOwner { greylist[_address] = !(greylist[_address]); } function unlockStakes() external onlyByOwner { stakesUnlocked = !stakesUnlocked; } function toggleStaking() external onlyByOwner { stakingPaused = !stakingPaused; } function toggleMigrations() external onlyByOwner { migrationsOn = !migrationsOn; } function toggleWithdrawals() external onlyByOwner { withdrawalsPaused = !withdrawalsPaused; } function toggleRewardsCollection() external onlyByOwner { rewardsCollectionPaused = !rewardsCollectionPaused; } // The owner or the reward token managers can set reward rates function setRewardRate(address reward_token_address, uint256 new_rate, bool sync_too) external onlyTknMgrs(reward_token_address) { rewardRatesManual[rewardTokenAddrToIdx[reward_token_address]] = new_rate; if (sync_too){ sync(); } } // The owner or the reward token managers can set reward rates function setGaugeController(address reward_token_address, address _rewards_distributor_address, address _gauge_controller_address, bool sync_too) external onlyTknMgrs(reward_token_address) { gaugeControllers[rewardTokenAddrToIdx[reward_token_address]] = _gauge_controller_address; rewards_distributor = IFraxGaugeFXSRewardsDistributor(_rewards_distributor_address); if (sync_too){ sync(); } } // The owner or the reward token managers can change managers function changeTokenManager(address reward_token_address, address new_manager_address) external onlyTknMgrs(reward_token_address) { rewardManagers[reward_token_address] = new_manager_address; } /* ========== EVENTS ========== */ event StakeLocked(address indexed user, uint256 amount, uint256 secs, bytes32 kek_id, address source_address); event WithdrawLocked(address indexed user, uint256 amount, bytes32 kek_id, address destination_address); event RewardPaid(address indexed user, uint256 reward, address token_address, address destination_address); event RewardsDurationUpdated(uint256 newDuration); event Recovered(address destination_address, address token, uint256 amount); event RewardsPeriodRenewed(address token); event LockedStakeMaxMultiplierUpdated(uint256 multiplier); event LockedStakeTimeForMaxMultiplier(uint256 secs); event LockedStakeMinTime(uint256 secs); event MaxVeFXSMultiplier(uint256 multiplier); event veFXSPerFraxForMaxBoostUpdated(uint256 scale_factor); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.11; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method) function sqrt(uint y) internal pure returns (uint z) { if (y > 3) { z = y; uint x = y / 2 + 1; while (x < z) { z = x; x = (y / x + x) / 2; } } else if (y != 0) { z = 1; } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.11; /** * @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) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); 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-contracts/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) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message 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. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); 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) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message 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. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.11; import "../Common/Context.sol"; import "./IERC20.sol"; import "../Math/SafeMath.sol"; import "../Utils/Address.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory __name, string memory __symbol) public { _name = __name; _symbol = __symbol; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address.approve(address spender, uint256 amount) */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for `sender`'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for `accounts`'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, "ERC20: burn amount exceeds allowance"); _approve(account, _msgSender(), decreasedAllowance); _burn(account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Destroys `amount` tokens from `account`.`amount` is then deducted * from the caller's allowance. * * See {_burn} and {_approve}. */ function _burnFrom(address account, uint256 amount) internal virtual { _burn(account, amount); _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance")); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of `from`'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of `from`'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:using-hooks.adoc[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.6.11; pragma abicoder v2; interface IveFXS { struct LockedBalance { int128 amount; uint256 end; } function commit_transfer_ownership(address addr) external; function apply_transfer_ownership() external; function commit_smart_wallet_checker(address addr) external; function apply_smart_wallet_checker() external; function toggleEmergencyUnlock() external; function recoverERC20(address token_addr, uint256 amount) external; function get_last_user_slope(address addr) external view returns (int128); function user_point_history__ts(address _addr, uint256 _idx) external view returns (uint256); function locked__end(address _addr) external view returns (uint256); function checkpoint() external; function deposit_for(address _addr, uint256 _value) external; function create_lock(uint256 _value, uint256 _unlock_time) external; function increase_amount(uint256 _value) external; function increase_unlock_time(uint256 _unlock_time) external; function withdraw() external; function balanceOf(address addr) external view returns (uint256); function balanceOf(address addr, uint256 _t) external view returns (uint256); function balanceOfAt(address addr, uint256 _block) external view returns (uint256); function totalSupply() external view returns (uint256); function totalSupply(uint256 t) external view returns (uint256); function totalSupplyAt(uint256 _block) external view returns (uint256); function totalFXSSupply() external view returns (uint256); function totalFXSSupplyAt(uint256 _block) external view returns (uint256); function changeController(address _newController) external; function token() external view returns (address); function supply() external view returns (uint256); function locked(address addr) external view returns (LockedBalance memory); function epoch() external view returns (uint256); function point_history(uint256 arg0) external view returns (int128 bias, int128 slope, uint256 ts, uint256 blk, uint256 fxs_amt); function user_point_history(address arg0, uint256 arg1) external view returns (int128 bias, int128 slope, uint256 ts, uint256 blk, uint256 fxs_amt); function user_point_epoch(address arg0) external view returns (uint256); function slope_changes(uint256 arg0) external view returns (int128); function controller() external view returns (address); function transfersEnabled() external view returns (bool); function emergencyUnlockActive() external view returns (bool); function name() external view returns (string memory); function symbol() external view returns (string memory); function version() external view returns (string memory); function decimals() external view returns (uint256); function future_smart_wallet_checker() external view returns (address); function smart_wallet_checker() external view returns (address); function admin() external view returns (address); function future_admin() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.11; 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 IERC20;` 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)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // 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, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.11; // helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false library TransferHelper { function safeApprove(address token, address to, uint value) internal { // bytes4(keccak256(bytes('approve(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED'); } function safeTransfer(address token, address to, uint value) internal { // bytes4(keccak256(bytes('transfer(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED'); } function safeTransferFrom(address token, address from, address to, uint value) internal { // bytes4(keccak256(bytes('transferFrom(address,address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED'); } function safeTransferETH(address to, uint value) internal { (bool success,) = to.call{value:value}(new bytes(0)); require(success, 'TransferHelper: ETH_TRANSFER_FAILED'); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.11; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.6.11; // https://github.com/swervefi/swerve/edit/master/packages/swerve-contracts/interfaces/IGaugeController.sol interface IFraxGaugeController { struct Point { uint256 bias; uint256 slope; } struct VotedSlope { uint256 slope; uint256 power; uint256 end; } // Public variables function admin() external view returns (address); function future_admin() external view returns (address); function token() external view returns (address); function voting_escrow() external view returns (address); function n_gauge_types() external view returns (int128); function n_gauges() external view returns (int128); function gauge_type_names(int128) external view returns (string memory); function gauges(uint256) external view returns (address); function vote_user_slopes(address, address) external view returns (VotedSlope memory); function vote_user_power(address) external view returns (uint256); function last_user_vote(address, address) external view returns (uint256); function points_weight(address, uint256) external view returns (Point memory); function time_weight(address) external view returns (uint256); function points_sum(int128, uint256) external view returns (Point memory); function time_sum(uint256) external view returns (uint256); function points_total(uint256) external view returns (uint256); function time_total() external view returns (uint256); function points_type_weight(int128, uint256) external view returns (uint256); function time_type_weight(uint256) external view returns (uint256); // Getter functions function gauge_types(address) external view returns (int128); function gauge_relative_weight(address) external view returns (uint256); function gauge_relative_weight(address, uint256) external view returns (uint256); function get_gauge_weight(address) external view returns (uint256); function get_type_weight(int128) external view returns (uint256); function get_total_weight() external view returns (uint256); function get_weights_sum_per_type(int128) external view returns (uint256); // External functions function commit_transfer_ownership(address) external; function apply_transfer_ownership() external; function add_gauge( address, int128, uint256 ) external; function checkpoint() external; function checkpoint_gauge(address) external; function global_emission_rate() external view returns (uint256); function gauge_relative_weight_write(address) external returns (uint256); function gauge_relative_weight_write(address, uint256) external returns (uint256); function add_type(string memory, uint256) external; function change_type_weight(int128, uint256) external; function change_gauge_weight(address, uint256) external; function change_global_emission_rate(uint256) external; function vote_for_gauge_weights(address, uint256) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.6.11; interface IFraxGaugeFXSRewardsDistributor { function acceptOwnership() external; function curator_address() external view returns(address); function currentReward(address gauge_address) external view returns(uint256 reward_amount); function distributeReward(address gauge_address) external returns(uint256 weeks_elapsed, uint256 reward_tally); function distributionsOn() external view returns(bool); function gauge_whitelist(address) external view returns(bool); function is_middleman(address) external view returns(bool); function last_time_gauge_paid(address) external view returns(uint256); function nominateNewOwner(address _owner) external; function nominatedOwner() external view returns(address); function owner() external view returns(address); function recoverERC20(address tokenAddress, uint256 tokenAmount) external; function setCurator(address _new_curator_address) external; function setGaugeController(address _gauge_controller_address) external; function setGaugeState(address _gauge_address, bool _is_middleman, bool _is_active) external; function setTimelock(address _new_timelock) external; function timelock_address() external view returns(address); function toggleDistributions() external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.11; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor () internal { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.6.11; // https://docs.synthetix.io/contracts/Owned contract Owned { address public owner; address public nominatedOwner; constructor (address _owner) public { require(_owner != address(0), "Owner address cannot be 0"); 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); } modifier onlyOwner { 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.6.11; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return payable(msg.sender); } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.11; import "../Common/Context.sol"; import "../Math/SafeMath.sol"; /** * @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. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.11 <0.9.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
{ "optimizer": { "enabled": true, "runs": 100000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_stakingToken","type":"address"},{"internalType":"address","name":"_rewards_distributor_address","type":"address"},{"internalType":"string[]","name":"_rewardSymbols","type":"string[]"},{"internalType":"address[]","name":"_rewardTokens","type":"address[]"},{"internalType":"address[]","name":"_rewardManagers","type":"address[]"},{"internalType":"uint256[]","name":"_rewardRates","type":"uint256[]"},{"internalType":"address[]","name":"_gaugeControllers","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"multiplier","type":"uint256"}],"name":"LockedStakeMaxMultiplierUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"secs","type":"uint256"}],"name":"LockedStakeMinTime","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"secs","type":"uint256"}],"name":"LockedStakeTimeForMaxMultiplier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"multiplier","type":"uint256"}],"name":"MaxVeFXSMultiplier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"destination_address","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"},{"indexed":false,"internalType":"address","name":"token_address","type":"address"},{"indexed":false,"internalType":"address","name":"destination_address","type":"address"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"RewardsDurationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"RewardsPeriodRenewed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"secs","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"kek_id","type":"bytes32"},{"indexed":false,"internalType":"address","name":"source_address","type":"address"}],"name":"StakeLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"kek_id","type":"bytes32"},{"indexed":false,"internalType":"address","name":"destination_address","type":"address"}],"name":"WithdrawLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"scale_factor","type":"uint256"}],"name":"veFXSPerFraxForMaxBoostUpdated","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"migrator_address","type":"address"}],"name":"addMigrator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"calcCurCombinedWeight","outputs":[{"internalType":"uint256","name":"old_combined_weight","type":"uint256"},{"internalType":"uint256","name":"new_vefxs_multiplier","type":"uint256"},{"internalType":"uint256","name":"new_combined_weight","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"reward_token_address","type":"address"},{"internalType":"address","name":"new_manager_address","type":"address"}],"name":"changeTokenManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"combinedWeightOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256[]","name":"new_earned","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fraxPerLPToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"gaugeControllers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllRewardTokens","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReward","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getRewardForDuration","outputs":[{"internalType":"uint256[]","name":"rewards_per_duration_arr","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRewardSymbols","outputs":[{"internalType":"string[]","name":"","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"greylist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"greylistAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"caller_addr","type":"address"},{"internalType":"address","name":"reward_token_addr","type":"address"}],"name":"isTokenManagerFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"secs","type":"uint256"}],"name":"lockMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lock_max_multiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lock_time_for_max_multiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lock_time_min","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"lockedLiquidityOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"lockedStakesOf","outputs":[{"components":[{"internalType":"bytes32","name":"kek_id","type":"bytes32"},{"internalType":"uint256","name":"start_timestamp","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"ending_timestamp","type":"uint256"},{"internalType":"uint256","name":"lock_multiplier","type":"uint256"}],"internalType":"struct StakingRewardsMultiGauge.LockedStake[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migrationsOn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"staker_address","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"secs","type":"uint256"},{"internalType":"uint256","name":"start_timestamp","type":"uint256"}],"name":"migrator_stakeLocked_for","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"staker_address","type":"address"},{"internalType":"bytes32","name":"kek_id","type":"bytes32"}],"name":"migrator_withdraw_locked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"minVeFXSForMaxBoost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"migrator_address","type":"address"}],"name":"removeMigrator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardManagers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"token_idx","type":"uint256"}],"name":"rewardRates","outputs":[{"internalType":"uint256","name":"rwd_rate","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardRatesManual","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardSymbols","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardTokenAddrToIdx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsCollectionPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsPerToken","outputs":[{"internalType":"uint256[]","name":"newRewardsPerTokenStored","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewards_distributor","outputs":[{"internalType":"contract IFraxGaugeFXSRewardsDistributor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"reward_token_address","type":"address"},{"internalType":"address","name":"_rewards_distributor_address","type":"address"},{"internalType":"address","name":"_gauge_controller_address","type":"address"},{"internalType":"bool","name":"sync_too","type":"bool"}],"name":"setGaugeController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lock_time_for_max_multiplier","type":"uint256"},{"internalType":"uint256","name":"_lock_time_min","type":"uint256"}],"name":"setLockedStakeTimeForMinAndMaxMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lock_max_multiplier","type":"uint256"},{"internalType":"uint256","name":"_vefxs_max_multiplier","type":"uint256"},{"internalType":"uint256","name":"_vefxs_per_frax_for_max_boost","type":"uint256"}],"name":"setMultipliers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"reward_token_address","type":"address"},{"internalType":"uint256","name":"new_rate","type":"uint256"},{"internalType":"bool","name":"sync_too","type":"bool"}],"name":"setRewardRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardsDuration","type":"uint256"}],"name":"setRewardsDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"secs","type":"uint256"}],"name":"stakeLocked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"migrator_address","type":"address"}],"name":"stakerAllowMigrator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"migrator_address","type":"address"}],"name":"stakerDisallowMigrator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"staker_allowed_migrators","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakesUnlocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IUniswapV2Pair","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sync","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"force_update","type":"bool"}],"name":"sync_gauge_weights","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleMigrations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleRewardsCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleWithdrawals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalCombinedWeight","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalLiquidityLocked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockStakes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"userStakedFrax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"valid_migrators","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"veFXSMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vefxs_max_multiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vefxs_per_frax_for_max_boost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"kek_id","type":"bytes32"}],"name":"withdrawLocked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawalsPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6080604052600380546001600160a01b03191673c8418af6358ffdda74e09ca9cc3fe03ca6adc5b01790556729a2241af62c00006008556305a39a8060095562015180600a55673782dace9d900000600b55671bc16d674ec80000600c5562093a806014553480156200007157600080fd5b506040516200621a3803806200621a83398101604081905262000094916200091d565b8787878787878787876001600160a01b038116620000f95760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f7420626520300000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b03831690811782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a1506001600255600480546001600160a01b03808a166001600160a01b031992831617909255600580549289169290911691909117905583516200019b90600f906020870190620004ef565b508051620001b1906010906020840190620004ef565b508151620001c790601190602085019062000559565b508451620001dd90601290602088019062000597565b5060005b84518110156200036c5780601360008784815181106200021157634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600090812091909155601580546001810182559082527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475015583518490829081106200028d57634e487b7160e01b600052603260045260246000fd5b6020026020010151600e6000878481518110620002ba57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03908116835290820192909252604001600090812080546001600160a01b031916939092169290921790556019805460018181019092557f944998273e477b495144fb8794c914197f3ccb46be2900f4698fd0ef743c969501829055601a8054918201815582527f057c384a7d1c54f3a1b2e5e67b2617b8224fdfd1ea7234eea573a6ff665ff63e015580620003638162000ae2565b915050620001e1565b506000600460009054906101000a90046001600160a01b03166001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015620003be57600080fd5b505afa158015620003d3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003f9919062000900565b90506001600160a01b03811673853d955acef822db058eb8505911ed77f175b99e141562000434576021805460ff191660011790556200043f565b6021805460ff191690555b6024805460ff191690554260078190556014546200046a919062000485602090811b6200385617901c565b6006555062000b2c9f50505050505050505050505050505050565b60008062000494838562000a8a565b905083811015620004e85760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401620000f0565b9392505050565b82805482825590600052602060002090810192821562000547579160200282015b828111156200054757825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000510565b5062000555929150620005f7565b5090565b82805482825590600052602060002090810192821562000547579160200282015b82811115620005475782518255916020019190600101906200057a565b828054828255906000526020600020908101928215620005e9579160200282015b82811115620005e95782518051620005d89184916020909101906200060e565b5091602001919060010190620005b8565b50620005559291506200068a565b5b80821115620005555760008155600101620005f8565b8280546200061c9062000aa5565b90600052602060002090601f01602090048101928262000640576000855562000547565b82601f106200065b57805160ff191683800117855562000547565b82800160010185558215620005475791820182811115620005475782518255916020019190600101906200057a565b8082111562000555576000620006a18282620006ab565b506001016200068a565b508054620006b99062000aa5565b6000825580601f10620006ca575050565b601f016020900490600052602060002090810190620006ea9190620005f7565b50565b80516001600160a01b03811681146200070557600080fd5b919050565b600082601f8301126200071b578081fd5b81516020620007346200072e8362000a64565b62000a31565b80838252828201915082860187848660051b890101111562000754578586fd5b855b858110156200077d576200076a82620006ed565b8452928401929084019060010162000756565b5090979650505050505050565b6000601f83818401126200079c578182fd5b82516020620007af6200072e8362000a64565b80838252828201915082870188848660051b8a01011115620007cf578687fd5b865b858110156200088e5781516001600160401b0380821115620007f157898afd5b818b0191508b603f8301126200080557898afd5b86820151818111156200081c576200081c62000b16565b6200082f818b01601f1916890162000a31565b915080825260408d8183860101111562000847578b8cfd5b8b5b8281101562000866578481018201518482018b0152890162000849565b8281111562000877578c8a84860101525b5050508552509284019290840190600101620007d1565b509098975050505050505050565b600082601f830112620008ad578081fd5b81516020620008c06200072e8362000a64565b80838252828201915082860187848660051b8901011115620008e0578586fd5b855b858110156200077d57815184529284019290840190600101620008e2565b60006020828403121562000912578081fd5b620004e882620006ed565b600080600080600080600080610100898b0312156200093a578384fd5b6200094589620006ed565b97506200095560208a01620006ed565b96506200096560408a01620006ed565b60608a01519096506001600160401b038082111562000982578586fd5b620009908c838d016200078a565b965060808b0151915080821115620009a6578586fd5b620009b48c838d016200070a565b955060a08b0151915080821115620009ca578485fd5b620009d88c838d016200070a565b945060c08b0151915080821115620009ee578384fd5b620009fc8c838d016200089c565b935060e08b015191508082111562000a12578283fd5b5062000a218b828c016200070a565b9150509295985092959890939650565b604051601f8201601f191681016001600160401b038111828210171562000a5c5762000a5c62000b16565b604052919050565b60006001600160401b0382111562000a805762000a8062000b16565b5060051b60200190565b6000821982111562000aa05762000aa062000b00565b500190565b600181811c9082168062000aba57607f821691505b6020821081141562000adc57634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141562000af95762000af962000b00565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6156de8062000b3c6000396000f3fe608060405234801561001057600080fd5b50600436106104715760003560e01c806379ba509711610250578063cdc82e8011610150578063ebe2b12b116100c8578063f2a8d34911610097578063f77e34d11161007c578063f77e34d114610a61578063fce6fd1314610a74578063fff6cae914610a8657600080fd5b8063f2a8d34914610a45578063f2caeb1e14610a4e57600080fd5b8063ebe2b12b146109fd578063ee89e02f14610a06578063f12f144714610a29578063f288baf614610a3c57600080fd5b8063de1a65511161011f578063e1ba95d211610104578063e1ba95d2146109cf578063e9f2838e146109d7578063eb3c209e146109ea57600080fd5b8063de1a6551146109b4578063e01f62bf146109c757600080fd5b8063cdc82e801461095a578063d239f00314610963578063d42fc9b41461096b578063d9f96e8d1461097e57600080fd5b80639637927f116101e3578063af00f4e2116101b2578063bbb781cc11610197578063bbb781cc14610929578063c8f33c911461093e578063cc1a378f1461094757600080fd5b8063af00f4e21461090d578063b94c4dcb1461092057600080fd5b80639637927f146108b95780639b8c15a8146108c65780639c5303eb146108f2578063a2217bc51461090557600080fd5b80638980f11f1161021f5780638980f11f146108455780638bad86a7146108585780638da5cb5b14610886578063941d9f65146108a657600080fd5b806379ba50971461080f5780637a2ae103146108175780637b31c19a1461082a5780637bb7bed11461083257600080fd5b8063386a9525116103765780635bfd9258116102ee57806369339245116102bd5780636e27cef9116102a25780636e27cef9146107de57806370641a36146107e757806372f702f3146107ef57600080fd5b806369339245146107ab5780636ce46bc3146107cb57600080fd5b80635bfd92581461077357806364f2c0601461077b57806366b237d01461078357806366e9e9b31461079657600080fd5b806349fb388a1161034557806351e3fc171161032a57806351e3fc17146106db57806352732bc8146106ee57806353a47bb71461075357600080fd5b806349fb388a146106a85780634fd2b536146106c857600080fd5b8063386a9525146106595780633b8105b3146106625780633d18b9121461066a57806341a16f3f1461067257600080fd5b80631e090f011161040957806328ef934e116103d857806331ca208c116103bd57806331ca208c146105ec578063323331ca1461060f57806336f89af21461062357600080fd5b806328ef934e146105c65780632c0c2a0a146105d957600080fd5b80631e090f01146105505780631e368980146105705780631f5848de14610590578063231b68dc146105a357600080fd5b806317b18c891161044557806317b18c89146104ea5780631b3e870a146104fd5780631c1f78eb146105105780631c56f33e1461051857600080fd5b80628cc262146104765780630d7bac4f1461049f57806312edb24c146104c05780631627540c146104d5575b600080fd5b6104896104843660046150c0565b610a8e565b60405161049691906154c8565b60405180910390f35b6104b26104ad366004615239565b610cf5565b604051908152602001610496565b6104c8610d4e565b6040516104969190615381565b6104e86104e33660046150c0565b610dbd565b005b6104e86104f83660046152ac565b610ee3565b6104e861050b3660046150c0565b610f69565b6104896110ca565b61052b610526366004615239565b6111b7565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610496565b61056361055e3660046150c0565b6111ee565b604051610496919061545a565b61058361057e366004615239565b6112a2565b6040516104969190615500565b6104e861059e36600461518a565b61134e565b6105b66105b13660046150da565b611463565b6040519015158152602001610496565b6104e86105d43660046151c9565b6114d2565b6104b26105e73660046150c0565b611609565b6105b66105fa3660046150c0565b60236020526000908152604090205460ff1681565b6024546105b6906301000000900460ff1681565b6104b26106313660046150c0565b73ffffffffffffffffffffffffffffffffffffffff166000908152601e602052604090205490565b6104b260145481565b6104e8611714565b6104896117d2565b61052b6106803660046150c0565b600e6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60055461052b9073ffffffffffffffffffffffffffffffffffffffff1681565b6104b26106d63660046150c0565b6118cc565b6104e86106e9366004615239565b6118e9565b6104e86106fc3660046150c0565b3360009081526020808052604080832073ffffffffffffffffffffffffffffffffffffffff9490941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b60015461052b9073ffffffffffffffffffffffffffffffffffffffff1681565b6104b26119df565b601c546104b2565b6104b2610791366004615239565b611b75565b61079e611b96565b60405161049691906153db565b6104b26107b93660046150c0565b60136020526000908152604090205481565b6104e86107d93660046152f0565b611c6f565b6104b2600a5481565b610489611eae565b60045461052b9073ffffffffffffffffffffffffffffffffffffffff1681565b6104e8612074565b6104e861082536600461510c565b6121bf565b6104e8612326565b61052b610840366004615239565b6123e3565b6104e8610853366004615161565b6123f3565b61086b6108663660046150c0565b61274f565b60408051938452602084019290925290820152606001610496565b60005461052b9073ffffffffffffffffffffffffffffffffffffffff1681565b6104e86108b43660046150c0565b6129d4565b6024546105b69060ff1681565b6105b66108d43660046150da565b60208080526000928352604080842090915290825290205460ff1681565b6104e86109003660046150c0565b612aa9565b6104e8612b79565b6104e861091b3660046152ac565b612c34565b6104b260095481565b6024546105b690640100000000900460ff1681565b6104b260075481565b6104e8610955366004615239565b612dff565b6104b260085481565b6104e8612f98565b6104b26109793660046150c0565b613054565b6104b261098c3660046150c0565b73ffffffffffffffffffffffffffffffffffffffff166000908152601d602052604090205490565b6104e86109c23660046150da565b613094565b601b546104b2565b6104e861317b565b6024546105b69062010000900460ff1681565b6104e86109f8366004615161565b61322e565b6104b260065481565b6105b6610a143660046150c0565b601f6020526000908152604090205460ff1681565b6104e8610a373660046150c0565b613367565b6104b2600c5481565b6104b2600b5481565b6104b2610a5c366004615239565b613450565b6104e8610a6f366004615201565b6135a5565b6024546105b690610100900460ff1681565b6104e8613831565b60606000610a9a611eae565b600f5490915067ffffffffffffffff811115610adf577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015610b08578160200160208202803683370190505b5073ffffffffffffffffffffffffffffffffffffffff84166000908152601e6020526040902054909250610ba15760005b600f54811015610b9b576000838281518110610b7e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602090810291909101015280610b9381615632565b915050610b39565b50610cef565b60005b600f54811015610ced5773ffffffffffffffffffffffffffffffffffffffff84166000818152601760209081526040808320858452825280832054938352601682528083208584529091529020548351610c979291610c9191670de0b6b3a764000091610c8b91610c5f9190899089908110610c49577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516138d690919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff8a166000908152601e602052604090205490613918565b906139cd565b90613856565b838281518110610cd0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602090810291909101015280610ce581615632565b915050610ba4565b505b50919050565b600080610d37610d28600954610c8b610d21670de0b6b3a76400006008546138d690919063ffffffff16565b8790613918565b670de0b6b3a764000090613856565b9050600854811115610d4857506008545b92915050565b6060600f805480602002602001604051908101604052809291908181526020018280548015610db357602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610d88575b5050505050905090565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e000000000000000000000000000000000060648201526084015b60405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce22906020015b60405180910390a150565b600280541415610f4f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e60565b60028055610f603380848442613a0f565b50506001600255565b60005473ffffffffffffffffffffffffffffffffffffffff163314610fea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601f602052604090205460ff16151560011461107e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f41646472657373206e6f6e6578697374616e74000000000000000000000000006044820152606401610e60565b73ffffffffffffffffffffffffffffffffffffffff166000908152601f6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b60115460609067ffffffffffffffff81111561110f577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611138578160200160208202803683370190505b50905060005b6011548110156111b35761115d60145461115783613450565b90613918565b828281518110611196577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020908102919091010152806111ab81615632565b91505061113e565b5090565b601081815481106111c757600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b73ffffffffffffffffffffffffffffffffffffffff81166000908152602260209081526040808320805482518185028101850190935280835260609492939192909184015b8282101561129757838290600052602060002090600502016040518060a00160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152505081526020019060010190611233565b505050509050919050565b601281815481106112b257600080fd5b9060005260206000200160009150905080546112cd906155e4565b80601f01602080910402602001604051908101604052809291908181526020018280546112f9906155e4565b80156113465780601f1061131b57610100808354040283529160200191611346565b820191906000526020600020905b81548152906001019060200180831161132957829003601f168201915b505050505081565b600054839073ffffffffffffffffffffffffffffffffffffffff1633148061137b575061137b3382611463565b6113e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f74206f776e6572206f7220746b6e206d67720000000000000000000000006044820152606401610e60565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260136020526040902054601180548592908110611443577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600091825260209091200155811561145d5761145d613831565b50505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8481169116141561148f57506001610d48565b73ffffffffffffffffffffffffffffffffffffffff8281166000908152600e6020526040902054811690841614156114c957506001610d48565b50600092915050565b60245460ff610100909104161515600114611549576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f7420696e206d6967726174696f6e000000000000000000000000000000006044820152606401610e60565b73ffffffffffffffffffffffffffffffffffffffff841660009081526020808052604080832033845290915290205460ff1680156115965750336000908152601f602052604090205460ff165b6115fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4d69672e20696e76616c6964206f7220756e617070726f7665640000000000006044820152606401610e60565b61145d8433858585613a0f565b600080611615836118cc565b905080156114c9576003546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301526000926116d6928592610c8b92670de0b6b3a7640000929116906370a082319060240160206040518083038186803b15801561169e57600080fd5b505afa1580156116b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111579190615294565b905060006116fb670de0b6b3a7640000610c8b600c548561391890919063ffffffff16565b9050600c5481111561170c5750600c545b949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b602480547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff81166401000000009182900460ff1615909102179055565b6060600280541415611840576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e60565b600280556024546301000000900460ff16156118b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f5265776172647320636f6c6c656374696f6e20706175736564000000000000006044820152606401610e60565b6118c23333613f07565b9050600160025590565b6000610d48670de0b6b3a7640000610c8b600b5461115786613054565b600280541415611955576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e60565b6002805560245462010000900460ff16156119cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f5769746864726177616c732070617573656400000000000000000000000000006044820152606401610e60565b6119d73333836142c8565b506001600255565b6000806000806000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611a4f57600080fd5b505afa158015611a63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a879190615251565b506021546dffffffffffffffffffffffffffff92831694509116915060ff1615611ab357819250611ab7565b8092505b611b6c600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b2257600080fd5b505afa158015611b36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5a9190615294565b610c8b85670de0b6b3a7640000613918565b95945050505050565b60118181548110611b8557600080fd5b600091825260209091200154905081565b60606012805480602002602001604051908101604052809291908181526020016000905b82821015611c66578382906000526020600020018054611bd9906155e4565b80601f0160208091040260200160405190810160405280929190818152602001828054611c05906155e4565b8015611c525780601f10611c2757610100808354040283529160200191611c52565b820191906000526020600020905b815481529060010190602001808311611c3557829003601f168201915b505050505081526020019060010190611bba565b50505050905090565b60005473ffffffffffffffffffffffffffffffffffffffff163314611cf0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b670de0b6b3a7640000831015611d87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4d756c74206d757374206265203e3d204d554c5449504c4945525f505245434960448201527f53494f4e000000000000000000000000000000000000000000000000000000006064820152608401610e60565b60008111611df1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f766546585320706374206d6178206d757374206265203e3d20300000000000006044820152606401610e60565b6008839055600c829055600b8190556040518281527fc9d56ccdd6b954d8d74700db074cc667054f8e33c1b8d23e97021d4c588a87619060200160405180910390a17fa1676084a9eea08c6f205b60799323b364a1bd8e10aba89f0fbd94cfbf68b5dd600854604051611e6691815260200190565b60405180910390a17f58c7ececaeb4704a0039e0d22c1b618367f7a7b9a4e191ab9baed34898f63f2e600b54604051611ea191815260200190565b60405180910390a1505050565b6060601b5460001480611ec15750601c54155b15611f1b576015805480602002602001604051908101604052809291908181526020018280548015610db357602002820191906000526020600020905b815481526020019060010190808311611efe575050505050905090565b600f5467ffffffffffffffff811115611f5d577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611f86578160200160208202803683370190505b50905060005b6015548110156111b35761201e611fcb601c54610c8b670de0b6b3a7640000611157611fb787613450565b611157600754611fc5614785565b906138d6565b60158381548110612005577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020015461385690919063ffffffff16565b828281518110612057577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60209081029190910101528061206c81615632565b915050611f8c565b60015473ffffffffffffffffffffffffffffffffffffffff16331461211b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527f2063616e20616363657074206f776e65727368697000000000000000000000006064820152608401610e60565b6000546001546040805173ffffffffffffffffffffffffffffffffffffffff93841681529290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a160018054600080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff841617909155169055565b600054849073ffffffffffffffffffffffffffffffffffffffff163314806121ec57506121ec3382611463565b612252576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f74206f776e6572206f7220746b6e206d67720000000000000000000000006044820152606401610e60565b73ffffffffffffffffffffffffffffffffffffffff85166000908152601360205260409020546010805485929081106122b4577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600091825260209091200180547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff9384161790915560058054909116918616919091179055811561231f5761231f613831565b5050505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146123a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b602480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffff811663010000009182900460ff1615909102179055565b600f81815481106111c757600080fd5b600054829073ffffffffffffffffffffffffffffffffffffffff1633148061242057506124203382611463565b612486576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f74206f776e6572206f7220746b6e206d67720000000000000000000000006044820152606401610e60565b6000805b600f54811015612528578473ffffffffffffffffffffffffffffffffffffffff16600f82815481106124e5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614156125165760019150612528565b8061252081615632565b91505061248a565b5080801561255c575073ffffffffffffffffffffffffffffffffffffffff8481166000908152600e60205260409020541633145b15612665576040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810184905273ffffffffffffffffffffffffffffffffffffffff85169063a9059cbb906044015b602060405180830381600087803b1580156125d057600080fd5b505af11580156125e4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612608919061521d565b506040805133815273ffffffffffffffffffffffffffffffffffffffff861660208201529081018490527ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b6489060600160405180910390a150505050565b8015801561268a575060005473ffffffffffffffffffffffffffffffffffffffff1633145b156126e8576040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810184905273ffffffffffffffffffffffffffffffffffffffff85169063a9059cbb906044016125b6565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4e6f2076616c696420746f6b656e7320746f207265636f7665720000000000006044820152606401610e60565b505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601e6020526040812054908061278084611609565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020526040812054919350906127bc90600290610c8b908690613856565b90506000915060005b73ffffffffffffffffffffffffffffffffffffffff86166000908152602260205260409020548110156129cb5773ffffffffffffffffffffffffffffffffffffffff86166000908152602260205260408120805483908110612850577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600502016040518060a00160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152505090506000816080015190504282606001511161297f57606082015173ffffffffffffffffffffffffffffffffffffffff891660009081526018602052604090205410156129745773ffffffffffffffffffffffffffffffffffffffff88166000908152601860205260408120546060840151612916916138d6565b905060006129318460600151426138d690919063ffffffff16565b9050600061295461294a670de0b6b3a764000084613918565b610c918686613918565b905061296a6129638484613856565b82906139cd565b935050505061297f565b50670de0b6b3a76400005b604082015160006129a6670de0b6b3a7640000610c8b61299f868a613856565b8590613918565b90506129b28782613856565b96505050505080806129c390615632565b9150506127c5565b50509193909250565b60005473ffffffffffffffffffffffffffffffffffffffff163314612a55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b73ffffffffffffffffffffffffffffffffffffffff16600090815260236020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811660ff90911615179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314612b2a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b73ffffffffffffffffffffffffffffffffffffffff166000908152601f6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314612bfa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b602480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff81166101009182900460ff1615909102179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314612cb5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b6001821015612d20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4d756c206d61782074696d65206d757374206265203e3d2031000000000000006044820152606401610e60565b6001811015612d8b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4d756c206d696e2074696d65206d757374206265203e3d2031000000000000006044820152606401610e60565b6009829055600a8190556040518281527f0e3e3fae480c6f92291358a02bc83f04ee1971d5488596bffda7929d57ab470f9060200160405180910390a16040518181527f0534d208d75dfdbfacc1204745dd9b3c4c37e8cfc05eb5e8e3ae538aedb0a9fa9060200160405180910390a15050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612e80576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b62015180811015612eed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f52657761726473206475726174696f6e20746f6f2073686f72740000000000006044820152606401610e60565b6006541580612efd575060065442115b612f63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f52657761726420706572696f6420696e636f6d706c65746500000000000000006044820152606401610e60565b60148190556040518181527ffb46ca5a5e06d4540d6387b930a7c978bce0db5f449ec6b3f5d07c6e1d44f2d390602001610ed8565b60005473ffffffffffffffffffffffffffffffffffffffff163314613019576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b602480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff8116620100009182900460ff1615909102179055565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601d6020526040812054610d4890670de0b6b3a764000090610c8b906111576119df565b600054829073ffffffffffffffffffffffffffffffffffffffff163314806130c157506130c13382611463565b613127576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f74206f776e6572206f7220746b6e206d67720000000000000000000000006044820152606401610e60565b5073ffffffffffffffffffffffffffffffffffffffff9182166000908152600e6020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b60005473ffffffffffffffffffffffffffffffffffffffff1633146131fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b602480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811660ff90911615179055565b60245460ff6101009091041615156001146132a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f7420696e206d6967726174696f6e000000000000000000000000000000006044820152606401610e60565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020808052604080832033845290915290205460ff1680156132f25750336000908152601f602052604090205460ff165b613358576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4d69672e20696e76616c6964206f7220756e617070726f7665640000000000006044820152606401610e60565b6133638233836142c8565b5050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601f602052604090205460ff166133f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f496e76616c6964206d69677261746f72206164647265737300000000000000006044820152606401610e60565b3360009081526020808052604080832073ffffffffffffffffffffffffffffffffffffffff9490941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6000806010838154811061348d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169050801561355857613551670de0b6b3a7640000610c8b60198681548110613500577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001548473ffffffffffffffffffffffffffffffffffffffff16630a3be7576040518163ffffffff1660e01b815260040160206040518083038186803b15801561169e57600080fd5b9150610cef565b60118381548110613592577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200154915050919050565b60005b601054811015613363576000601082815481106135ee577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169050801561381e5782806136675750601a8281548110613659577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020015442115b1561381e576040517f6472eee100000000000000000000000000000000000000000000000000000000815230600482015242602482015273ffffffffffffffffffffffffffffffffffffffff821690636472eee190604401602060405180830381600087803b1580156136d957600080fd5b505af11580156136ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137119190615294565b6019838154811061374b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001819055508073ffffffffffffffffffffffffffffffffffffffff1663513872bd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561379f57600080fd5b505afa1580156137b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137d79190615294565b601a8381548110613811577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000918252602090912001555b508061382981615632565b9150506135a8565b61383b60006135a5565b600654421061384e5761384c614798565b565b61384c614b06565b6000806138638385615513565b9050838110156138cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610e60565b9392505050565b60006138cf83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614bc7565b60008261392757506000610d48565b60006139338385615564565b905082613940858361552b565b146138cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60448201527f77000000000000000000000000000000000000000000000000000000000000006064820152608401610e60565b60006138cf83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614c12565b846001613a1c8282614c5a565b602454640100000000900460ff1615613a91576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f5374616b696e67207061757365640000000000000000000000000000000000006044820152606401610e60565b60008511613afb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4d757374207374616b65206d6f7265207468616e207a65726f000000000000006044820152606401610e60565b73ffffffffffffffffffffffffffffffffffffffff871660009081526023602052604090205460ff1615613b8b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4164647265737320686173206265656e20677265796c697374656400000000006044820152606401610e60565b600a54841015613bf7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4d696e696d756d207374616b652074696d65206e6f74206d65740000000000006044820152606401610e60565b600954841115613c63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f547279696e6720746f206c6f636b20666f7220746f6f206c6f6e6700000000006044820152606401610e60565b6000613c6e85610cf5565b73ffffffffffffffffffffffffffffffffffffffff89166000908152601d602090815260408083205490517fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060608e901b169281019290925260348201889052605482018a9052607482015291925090609401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828252805160209182012073ffffffffffffffffffffffffffffffffffffffff8d1660009081526022835283902060a0850184528185529184018990529183018a90529092509060608101613d61888a613856565b815260209081018590528254600181810185556000948552938290208351600590920201908155908201519281019290925560408101516002830155606081015160038301556080015160049182015554613dd49073ffffffffffffffffffffffffffffffffffffffff1689308a614d7c565b601b54613de19088613856565b601b5573ffffffffffffffffffffffffffffffffffffffff89166000908152601d6020526040902054613e149088613856565b73ffffffffffffffffffffffffffffffffffffffff8a166000908152601d6020526040812091909155613e48908a90614c5a565b73ffffffffffffffffffffffffffffffffffffffff8916600090815260186020526040902054613e9b5773ffffffffffffffffffffffffffffffffffffffff891660009081526018602052604090204290555b604080518881526020810188905290810182905273ffffffffffffffffffffffffffffffffffffffff89811660608301528a16907ff400e72e69ef4402819dfc57eeddc66f5eb69bf405e0e8098b1946ec1ac14a229060800160405180910390a2505050505050505050565b6060826001613f168282614c5a565b600f5467ffffffffffffffff811115613f58577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015613f81578160200160208202803683370190505b50925060005b600f548110156142985773ffffffffffffffffffffffffffffffffffffffff861660009081526017602090815260408083208484529091529020548451859083908110613ffd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60209081029190910181019190915273ffffffffffffffffffffffffffffffffffffffff8716600090815260178252604080822084835290925290812055600f805482908110614076577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb868684815181106140f6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b815260040161413c92919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b602060405180830381600087803b15801561415657600080fd5b505af115801561416a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061418e919061521d565b508573ffffffffffffffffffffffffffffffffffffffff167f1d2f2ca53af5d2f333bd32fdd45f9c52ad8ebe31414f7792912077fcb3876dff858381518110614200577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600f8481548110614242577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600091825260209182902001546040805193845273ffffffffffffffffffffffffffffffffffffffff9182169284019290925289169082015260600160405180910390a28061429081615632565b915050613f87565b50505073ffffffffffffffffffffffffffffffffffffffff90921660009081526018602052604090204290555090565b6142d28383613f07565b506143086040518060a0016040528060008019168152602001600081526020016000815260200160008152602001600081525090565b600060408201819052805b73ffffffffffffffffffffffffffffffffffffffff861660009081526022602052604090205481101561447c5773ffffffffffffffffffffffffffffffffffffffff8616600090815260226020526040902080548290811061439e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600502016000015484141561446a5773ffffffffffffffffffffffffffffffffffffffff86166000908152602260205260409020805482908110614415577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600502016040518060a001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481525050925080915061447c565b8061447481615632565b915050614313565b50815183146144e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f5374616b65206e6f7420666f756e6400000000000000000000000000000000006044820152606401610e60565b816060015142101580614501575060245460ff1615156001145b806145205750336000908152601f602052604090205460ff1615156001145b614586576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f5374616b65206973207374696c6c206c6f636b656421000000000000000000006044820152606401610e60565b6040820151801561477d57601b5461459e90826138d6565b601b5573ffffffffffffffffffffffffffffffffffffffff86166000908152601d60205260409020546145d190826138d6565b73ffffffffffffffffffffffffffffffffffffffff87166000908152601d6020908152604080832093909355602290522080548390811061463b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600091825260208220600590910201818155600181018290556002810182905560038101829055600401819055614673908790614c5a565b600480546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116938201939093526024810184905291169063a9059cbb90604401602060405180830381600087803b1580156146e957600080fd5b505af11580156146fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614721919061521d565b50604080518281526020810186905273ffffffffffffffffffffffffffffffffffffffff878116828401529151918816917f1d9308f6b22a2754a1c622bb30889e8f8f956c83e524d039e9d65d5f052eb9089181900360600190a25b505050505050565b600061479342600654614f12565b905090565b6005546040517f092193ab00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff9091169063092193ab906024016040805180830381600087803b15801561480257600080fd5b505af1158015614816573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061483a91906152cd565b50506000601454614856600654426138d690919063ffffffff16565b614860919061552b565b905060005b600f54811015614a9157600f81815481106148a9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff909116906370a082319060240160206040518083038186803b15801561491b57600080fd5b505afa15801561492f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906149539190615294565b614970614961846001615513565b61115760145461115786613450565b1115600f82815481106149ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020918290200154604080517f4e6f7420656e6f7567682072657761726420746f6b656e7320617661696c6162938101939093527f6c653a20000000000000000000000000000000000000000000000000000000009083015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016604482015260580160405160208183030381529060405290614a7e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e609190615500565b5080614a8981615632565b915050614865565b50601454614ab190614aa890611157846001613856565b60065490613856565b600655614abc614b06565b60045460405173ffffffffffffffffffffffffffffffffffffffff90911681527f6f2b3b3aaf1881d69a5d40565500f93ea73df36e7b6a29bf48b21479a9237fe990602001610ed8565b6000614b10611eae565b905060005b601554811015614bb857818181518110614b58577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160158281548110614b9a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020909120015580614bb081615632565b915050614b15565b50614bc1614785565b60075550565b60008184841115614c05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e609190615500565b506000611b6c84866155a1565b60008183614c4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e609190615500565b506000611b6c848661552b565b8015614c6857614c68613831565b73ffffffffffffffffffffffffffffffffffffffff821615613363576000806000614c928561274f565b925092509250614ca185614f28565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600d60205260409020829055828110614d25576000614cdc82856138d6565b601c54909150614cec9082613856565b601c55614cf98482613856565b73ffffffffffffffffffffffffffffffffffffffff87166000908152601e60205260409020555061231f565b6000614d3184836138d6565b601c54909150614d4190826138d6565b601c55614d4e84826138d6565b73ffffffffffffffffffffffffffffffffffffffff87166000908152601e6020526040902055505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790529151600092839290881691614e1b9190615365565b6000604051808303816000865af19150503d8060008114614e58576040519150601f19603f3d011682016040523d82523d6000602084013e614e5d565b606091505b5091509150818015614e87575080511580614e87575080806020019051810190614e87919061521d565b61477d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f5472616e7366657248656c7065723a205452414e534645525f46524f4d5f464160448201527f494c4544000000000000000000000000000000000000000000000000000000006064820152608401610e60565b6000818310614f2157816138cf565b5090919050565b73ffffffffffffffffffffffffffffffffffffffff811615615076576000614f4f82610a8e565b905060005b8151811015614fe457818181518110614f96577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff85166000908152601783526040808220858352909352919091205580614fdc81615632565b915050614f54565b5060005b815181101561274a576015818154811061502b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff861683526016825260408084208585529092529120558061506e81615632565b915050614fe8565b50565b803573ffffffffffffffffffffffffffffffffffffffff8116811461509d57600080fd5b919050565b80516dffffffffffffffffffffffffffff8116811461509d57600080fd5b6000602082840312156150d1578081fd5b6138cf82615079565b600080604083850312156150ec578081fd5b6150f583615079565b915061510360208401615079565b90509250929050565b60008060008060808587031215615121578182fd5b61512a85615079565b935061513860208601615079565b925061514660408601615079565b915060608501356151568161569a565b939692955090935050565b60008060408385031215615173578182fd5b61517c83615079565b946020939093013593505050565b60008060006060848603121561519e578283fd5b6151a784615079565b92506020840135915060408401356151be8161569a565b809150509250925092565b600080600080608085870312156151de578384fd5b6151e785615079565b966020860135965060408601359560600135945092505050565b600060208284031215615212578081fd5b81356138cf8161569a565b60006020828403121561522e578081fd5b81516138cf8161569a565b60006020828403121561524a578081fd5b5035919050565b600080600060608486031215615265578283fd5b61526e846150a2565b925061527c602085016150a2565b9150604084015163ffffffff811681146151be578182fd5b6000602082840312156152a5578081fd5b5051919050565b600080604083850312156152be578182fd5b50508035926020909101359150565b600080604083850312156152df578182fd5b505080516020909101519092909150565b600080600060608486031215615304578081fd5b505081359360208301359350604090920135919050565b600081518084526153338160208601602086016155b8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600082516153778184602087016155b8565b9190910192915050565b6020808252825182820181905260009190848201906040850190845b818110156153cf57835173ffffffffffffffffffffffffffffffffffffffff168352928401929184019160010161539d565b50909695505050505050565b6000602080830181845280855180835260408601915060408160051b8701019250838701855b8281101561544d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc088860301845261543b85835161531b565b94509285019290850190600101615401565b5092979650505050505050565b602080825282518282018190526000919060409081850190868401855b828110156154bb5781518051855286810151878601528581015186860152606080820151908601526080908101519085015260a09093019290850190600101615477565b5091979650505050505050565b6020808252825182820181905260009190848201906040850190845b818110156153cf578351835292840192918401916001016154e4565b6020815260006138cf602083018461531b565b600082198211156155265761552661566b565b500190565b60008261555f577f4e487b710000000000000000000000000000000000000000000000000000000081526012600452602481fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561559c5761559c61566b565b500290565b6000828210156155b3576155b361566b565b500390565b60005b838110156155d35781810151838201526020016155bb565b8381111561145d5750506000910152565b600181811c908216806155f857607f821691505b60208210811415610cef577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156156645761566461566b565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b801515811461507657600080fdfea2646970667358221220176b235df002baf0dbb0dfeb773c60c2821bf538fb12e76260fe7ba830c986ee64736f6c63430008040033000000000000000000000000ff5b4bcbf765fe363269114e1c765229a29edefd000000000000000000000000e06f8d30ac334c857fc8c380c85969c150f38a6a000000000000000000000000278dc748eda1d8efef1adfb518542612b49fcd34000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000002a00000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000346585300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005535553484900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000003432b6a60d23ca0dfca7761b7ab56459d9c964d00000000000000000000000006b3595068778dd592e39a122f4f5a5cf09c90fe20000000000000000000000000000000000000000000000000000000000000002000000000000000000000000234d953a9404bf9dbc3b526271d440cd2870bcd200000000000000000000000019b3eb3af5d93b77a5619b047de0eed7115a19e7000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000a86cc92e3da00000000000000000000000000000000000000000000000000000a86cc92e3da000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106104715760003560e01c806379ba509711610250578063cdc82e8011610150578063ebe2b12b116100c8578063f2a8d34911610097578063f77e34d11161007c578063f77e34d114610a61578063fce6fd1314610a74578063fff6cae914610a8657600080fd5b8063f2a8d34914610a45578063f2caeb1e14610a4e57600080fd5b8063ebe2b12b146109fd578063ee89e02f14610a06578063f12f144714610a29578063f288baf614610a3c57600080fd5b8063de1a65511161011f578063e1ba95d211610104578063e1ba95d2146109cf578063e9f2838e146109d7578063eb3c209e146109ea57600080fd5b8063de1a6551146109b4578063e01f62bf146109c757600080fd5b8063cdc82e801461095a578063d239f00314610963578063d42fc9b41461096b578063d9f96e8d1461097e57600080fd5b80639637927f116101e3578063af00f4e2116101b2578063bbb781cc11610197578063bbb781cc14610929578063c8f33c911461093e578063cc1a378f1461094757600080fd5b8063af00f4e21461090d578063b94c4dcb1461092057600080fd5b80639637927f146108b95780639b8c15a8146108c65780639c5303eb146108f2578063a2217bc51461090557600080fd5b80638980f11f1161021f5780638980f11f146108455780638bad86a7146108585780638da5cb5b14610886578063941d9f65146108a657600080fd5b806379ba50971461080f5780637a2ae103146108175780637b31c19a1461082a5780637bb7bed11461083257600080fd5b8063386a9525116103765780635bfd9258116102ee57806369339245116102bd5780636e27cef9116102a25780636e27cef9146107de57806370641a36146107e757806372f702f3146107ef57600080fd5b806369339245146107ab5780636ce46bc3146107cb57600080fd5b80635bfd92581461077357806364f2c0601461077b57806366b237d01461078357806366e9e9b31461079657600080fd5b806349fb388a1161034557806351e3fc171161032a57806351e3fc17146106db57806352732bc8146106ee57806353a47bb71461075357600080fd5b806349fb388a146106a85780634fd2b536146106c857600080fd5b8063386a9525146106595780633b8105b3146106625780633d18b9121461066a57806341a16f3f1461067257600080fd5b80631e090f011161040957806328ef934e116103d857806331ca208c116103bd57806331ca208c146105ec578063323331ca1461060f57806336f89af21461062357600080fd5b806328ef934e146105c65780632c0c2a0a146105d957600080fd5b80631e090f01146105505780631e368980146105705780631f5848de14610590578063231b68dc146105a357600080fd5b806317b18c891161044557806317b18c89146104ea5780631b3e870a146104fd5780631c1f78eb146105105780631c56f33e1461051857600080fd5b80628cc262146104765780630d7bac4f1461049f57806312edb24c146104c05780631627540c146104d5575b600080fd5b6104896104843660046150c0565b610a8e565b60405161049691906154c8565b60405180910390f35b6104b26104ad366004615239565b610cf5565b604051908152602001610496565b6104c8610d4e565b6040516104969190615381565b6104e86104e33660046150c0565b610dbd565b005b6104e86104f83660046152ac565b610ee3565b6104e861050b3660046150c0565b610f69565b6104896110ca565b61052b610526366004615239565b6111b7565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610496565b61056361055e3660046150c0565b6111ee565b604051610496919061545a565b61058361057e366004615239565b6112a2565b6040516104969190615500565b6104e861059e36600461518a565b61134e565b6105b66105b13660046150da565b611463565b6040519015158152602001610496565b6104e86105d43660046151c9565b6114d2565b6104b26105e73660046150c0565b611609565b6105b66105fa3660046150c0565b60236020526000908152604090205460ff1681565b6024546105b6906301000000900460ff1681565b6104b26106313660046150c0565b73ffffffffffffffffffffffffffffffffffffffff166000908152601e602052604090205490565b6104b260145481565b6104e8611714565b6104896117d2565b61052b6106803660046150c0565b600e6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60055461052b9073ffffffffffffffffffffffffffffffffffffffff1681565b6104b26106d63660046150c0565b6118cc565b6104e86106e9366004615239565b6118e9565b6104e86106fc3660046150c0565b3360009081526020808052604080832073ffffffffffffffffffffffffffffffffffffffff9490941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b60015461052b9073ffffffffffffffffffffffffffffffffffffffff1681565b6104b26119df565b601c546104b2565b6104b2610791366004615239565b611b75565b61079e611b96565b60405161049691906153db565b6104b26107b93660046150c0565b60136020526000908152604090205481565b6104e86107d93660046152f0565b611c6f565b6104b2600a5481565b610489611eae565b60045461052b9073ffffffffffffffffffffffffffffffffffffffff1681565b6104e8612074565b6104e861082536600461510c565b6121bf565b6104e8612326565b61052b610840366004615239565b6123e3565b6104e8610853366004615161565b6123f3565b61086b6108663660046150c0565b61274f565b60408051938452602084019290925290820152606001610496565b60005461052b9073ffffffffffffffffffffffffffffffffffffffff1681565b6104e86108b43660046150c0565b6129d4565b6024546105b69060ff1681565b6105b66108d43660046150da565b60208080526000928352604080842090915290825290205460ff1681565b6104e86109003660046150c0565b612aa9565b6104e8612b79565b6104e861091b3660046152ac565b612c34565b6104b260095481565b6024546105b690640100000000900460ff1681565b6104b260075481565b6104e8610955366004615239565b612dff565b6104b260085481565b6104e8612f98565b6104b26109793660046150c0565b613054565b6104b261098c3660046150c0565b73ffffffffffffffffffffffffffffffffffffffff166000908152601d602052604090205490565b6104e86109c23660046150da565b613094565b601b546104b2565b6104e861317b565b6024546105b69062010000900460ff1681565b6104e86109f8366004615161565b61322e565b6104b260065481565b6105b6610a143660046150c0565b601f6020526000908152604090205460ff1681565b6104e8610a373660046150c0565b613367565b6104b2600c5481565b6104b2600b5481565b6104b2610a5c366004615239565b613450565b6104e8610a6f366004615201565b6135a5565b6024546105b690610100900460ff1681565b6104e8613831565b60606000610a9a611eae565b600f5490915067ffffffffffffffff811115610adf577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015610b08578160200160208202803683370190505b5073ffffffffffffffffffffffffffffffffffffffff84166000908152601e6020526040902054909250610ba15760005b600f54811015610b9b576000838281518110610b7e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602090810291909101015280610b9381615632565b915050610b39565b50610cef565b60005b600f54811015610ced5773ffffffffffffffffffffffffffffffffffffffff84166000818152601760209081526040808320858452825280832054938352601682528083208584529091529020548351610c979291610c9191670de0b6b3a764000091610c8b91610c5f9190899089908110610c49577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516138d690919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff8a166000908152601e602052604090205490613918565b906139cd565b90613856565b838281518110610cd0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602090810291909101015280610ce581615632565b915050610ba4565b505b50919050565b600080610d37610d28600954610c8b610d21670de0b6b3a76400006008546138d690919063ffffffff16565b8790613918565b670de0b6b3a764000090613856565b9050600854811115610d4857506008545b92915050565b6060600f805480602002602001604051908101604052809291908181526020018280548015610db357602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610d88575b5050505050905090565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e000000000000000000000000000000000060648201526084015b60405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce22906020015b60405180910390a150565b600280541415610f4f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e60565b60028055610f603380848442613a0f565b50506001600255565b60005473ffffffffffffffffffffffffffffffffffffffff163314610fea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601f602052604090205460ff16151560011461107e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f41646472657373206e6f6e6578697374616e74000000000000000000000000006044820152606401610e60565b73ffffffffffffffffffffffffffffffffffffffff166000908152601f6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b60115460609067ffffffffffffffff81111561110f577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611138578160200160208202803683370190505b50905060005b6011548110156111b35761115d60145461115783613450565b90613918565b828281518110611196577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020908102919091010152806111ab81615632565b91505061113e565b5090565b601081815481106111c757600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b73ffffffffffffffffffffffffffffffffffffffff81166000908152602260209081526040808320805482518185028101850190935280835260609492939192909184015b8282101561129757838290600052602060002090600502016040518060a00160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152505081526020019060010190611233565b505050509050919050565b601281815481106112b257600080fd5b9060005260206000200160009150905080546112cd906155e4565b80601f01602080910402602001604051908101604052809291908181526020018280546112f9906155e4565b80156113465780601f1061131b57610100808354040283529160200191611346565b820191906000526020600020905b81548152906001019060200180831161132957829003601f168201915b505050505081565b600054839073ffffffffffffffffffffffffffffffffffffffff1633148061137b575061137b3382611463565b6113e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f74206f776e6572206f7220746b6e206d67720000000000000000000000006044820152606401610e60565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260136020526040902054601180548592908110611443577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600091825260209091200155811561145d5761145d613831565b50505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8481169116141561148f57506001610d48565b73ffffffffffffffffffffffffffffffffffffffff8281166000908152600e6020526040902054811690841614156114c957506001610d48565b50600092915050565b60245460ff610100909104161515600114611549576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f7420696e206d6967726174696f6e000000000000000000000000000000006044820152606401610e60565b73ffffffffffffffffffffffffffffffffffffffff841660009081526020808052604080832033845290915290205460ff1680156115965750336000908152601f602052604090205460ff165b6115fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4d69672e20696e76616c6964206f7220756e617070726f7665640000000000006044820152606401610e60565b61145d8433858585613a0f565b600080611615836118cc565b905080156114c9576003546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301526000926116d6928592610c8b92670de0b6b3a7640000929116906370a082319060240160206040518083038186803b15801561169e57600080fd5b505afa1580156116b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111579190615294565b905060006116fb670de0b6b3a7640000610c8b600c548561391890919063ffffffff16565b9050600c5481111561170c5750600c545b949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b602480547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff81166401000000009182900460ff1615909102179055565b6060600280541415611840576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e60565b600280556024546301000000900460ff16156118b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f5265776172647320636f6c6c656374696f6e20706175736564000000000000006044820152606401610e60565b6118c23333613f07565b9050600160025590565b6000610d48670de0b6b3a7640000610c8b600b5461115786613054565b600280541415611955576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e60565b6002805560245462010000900460ff16156119cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f5769746864726177616c732070617573656400000000000000000000000000006044820152606401610e60565b6119d73333836142c8565b506001600255565b6000806000806000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611a4f57600080fd5b505afa158015611a63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a879190615251565b506021546dffffffffffffffffffffffffffff92831694509116915060ff1615611ab357819250611ab7565b8092505b611b6c600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b2257600080fd5b505afa158015611b36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5a9190615294565b610c8b85670de0b6b3a7640000613918565b95945050505050565b60118181548110611b8557600080fd5b600091825260209091200154905081565b60606012805480602002602001604051908101604052809291908181526020016000905b82821015611c66578382906000526020600020018054611bd9906155e4565b80601f0160208091040260200160405190810160405280929190818152602001828054611c05906155e4565b8015611c525780601f10611c2757610100808354040283529160200191611c52565b820191906000526020600020905b815481529060010190602001808311611c3557829003601f168201915b505050505081526020019060010190611bba565b50505050905090565b60005473ffffffffffffffffffffffffffffffffffffffff163314611cf0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b670de0b6b3a7640000831015611d87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4d756c74206d757374206265203e3d204d554c5449504c4945525f505245434960448201527f53494f4e000000000000000000000000000000000000000000000000000000006064820152608401610e60565b60008111611df1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f766546585320706374206d6178206d757374206265203e3d20300000000000006044820152606401610e60565b6008839055600c829055600b8190556040518281527fc9d56ccdd6b954d8d74700db074cc667054f8e33c1b8d23e97021d4c588a87619060200160405180910390a17fa1676084a9eea08c6f205b60799323b364a1bd8e10aba89f0fbd94cfbf68b5dd600854604051611e6691815260200190565b60405180910390a17f58c7ececaeb4704a0039e0d22c1b618367f7a7b9a4e191ab9baed34898f63f2e600b54604051611ea191815260200190565b60405180910390a1505050565b6060601b5460001480611ec15750601c54155b15611f1b576015805480602002602001604051908101604052809291908181526020018280548015610db357602002820191906000526020600020905b815481526020019060010190808311611efe575050505050905090565b600f5467ffffffffffffffff811115611f5d577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611f86578160200160208202803683370190505b50905060005b6015548110156111b35761201e611fcb601c54610c8b670de0b6b3a7640000611157611fb787613450565b611157600754611fc5614785565b906138d6565b60158381548110612005577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020015461385690919063ffffffff16565b828281518110612057577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60209081029190910101528061206c81615632565b915050611f8c565b60015473ffffffffffffffffffffffffffffffffffffffff16331461211b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527f2063616e20616363657074206f776e65727368697000000000000000000000006064820152608401610e60565b6000546001546040805173ffffffffffffffffffffffffffffffffffffffff93841681529290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a160018054600080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff841617909155169055565b600054849073ffffffffffffffffffffffffffffffffffffffff163314806121ec57506121ec3382611463565b612252576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f74206f776e6572206f7220746b6e206d67720000000000000000000000006044820152606401610e60565b73ffffffffffffffffffffffffffffffffffffffff85166000908152601360205260409020546010805485929081106122b4577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600091825260209091200180547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff9384161790915560058054909116918616919091179055811561231f5761231f613831565b5050505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146123a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b602480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffff811663010000009182900460ff1615909102179055565b600f81815481106111c757600080fd5b600054829073ffffffffffffffffffffffffffffffffffffffff1633148061242057506124203382611463565b612486576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f74206f776e6572206f7220746b6e206d67720000000000000000000000006044820152606401610e60565b6000805b600f54811015612528578473ffffffffffffffffffffffffffffffffffffffff16600f82815481106124e5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614156125165760019150612528565b8061252081615632565b91505061248a565b5080801561255c575073ffffffffffffffffffffffffffffffffffffffff8481166000908152600e60205260409020541633145b15612665576040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810184905273ffffffffffffffffffffffffffffffffffffffff85169063a9059cbb906044015b602060405180830381600087803b1580156125d057600080fd5b505af11580156125e4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612608919061521d565b506040805133815273ffffffffffffffffffffffffffffffffffffffff861660208201529081018490527ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b6489060600160405180910390a150505050565b8015801561268a575060005473ffffffffffffffffffffffffffffffffffffffff1633145b156126e8576040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810184905273ffffffffffffffffffffffffffffffffffffffff85169063a9059cbb906044016125b6565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4e6f2076616c696420746f6b656e7320746f207265636f7665720000000000006044820152606401610e60565b505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601e6020526040812054908061278084611609565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020526040812054919350906127bc90600290610c8b908690613856565b90506000915060005b73ffffffffffffffffffffffffffffffffffffffff86166000908152602260205260409020548110156129cb5773ffffffffffffffffffffffffffffffffffffffff86166000908152602260205260408120805483908110612850577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600502016040518060a00160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152505090506000816080015190504282606001511161297f57606082015173ffffffffffffffffffffffffffffffffffffffff891660009081526018602052604090205410156129745773ffffffffffffffffffffffffffffffffffffffff88166000908152601860205260408120546060840151612916916138d6565b905060006129318460600151426138d690919063ffffffff16565b9050600061295461294a670de0b6b3a764000084613918565b610c918686613918565b905061296a6129638484613856565b82906139cd565b935050505061297f565b50670de0b6b3a76400005b604082015160006129a6670de0b6b3a7640000610c8b61299f868a613856565b8590613918565b90506129b28782613856565b96505050505080806129c390615632565b9150506127c5565b50509193909250565b60005473ffffffffffffffffffffffffffffffffffffffff163314612a55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b73ffffffffffffffffffffffffffffffffffffffff16600090815260236020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811660ff90911615179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314612b2a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b73ffffffffffffffffffffffffffffffffffffffff166000908152601f6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314612bfa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b602480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff81166101009182900460ff1615909102179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314612cb5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b6001821015612d20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4d756c206d61782074696d65206d757374206265203e3d2031000000000000006044820152606401610e60565b6001811015612d8b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4d756c206d696e2074696d65206d757374206265203e3d2031000000000000006044820152606401610e60565b6009829055600a8190556040518281527f0e3e3fae480c6f92291358a02bc83f04ee1971d5488596bffda7929d57ab470f9060200160405180910390a16040518181527f0534d208d75dfdbfacc1204745dd9b3c4c37e8cfc05eb5e8e3ae538aedb0a9fa9060200160405180910390a15050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612e80576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b62015180811015612eed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f52657761726473206475726174696f6e20746f6f2073686f72740000000000006044820152606401610e60565b6006541580612efd575060065442115b612f63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f52657761726420706572696f6420696e636f6d706c65746500000000000000006044820152606401610e60565b60148190556040518181527ffb46ca5a5e06d4540d6387b930a7c978bce0db5f449ec6b3f5d07c6e1d44f2d390602001610ed8565b60005473ffffffffffffffffffffffffffffffffffffffff163314613019576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b602480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff8116620100009182900460ff1615909102179055565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601d6020526040812054610d4890670de0b6b3a764000090610c8b906111576119df565b600054829073ffffffffffffffffffffffffffffffffffffffff163314806130c157506130c13382611463565b613127576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f74206f776e6572206f7220746b6e206d67720000000000000000000000006044820152606401610e60565b5073ffffffffffffffffffffffffffffffffffffffff9182166000908152600e6020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b60005473ffffffffffffffffffffffffffffffffffffffff1633146131fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420746865206f776e6572000000000000000000000000000000000000006044820152606401610e60565b602480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811660ff90911615179055565b60245460ff6101009091041615156001146132a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f7420696e206d6967726174696f6e000000000000000000000000000000006044820152606401610e60565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020808052604080832033845290915290205460ff1680156132f25750336000908152601f602052604090205460ff165b613358576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4d69672e20696e76616c6964206f7220756e617070726f7665640000000000006044820152606401610e60565b6133638233836142c8565b5050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601f602052604090205460ff166133f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f496e76616c6964206d69677261746f72206164647265737300000000000000006044820152606401610e60565b3360009081526020808052604080832073ffffffffffffffffffffffffffffffffffffffff9490941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6000806010838154811061348d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169050801561355857613551670de0b6b3a7640000610c8b60198681548110613500577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001548473ffffffffffffffffffffffffffffffffffffffff16630a3be7576040518163ffffffff1660e01b815260040160206040518083038186803b15801561169e57600080fd5b9150610cef565b60118381548110613592577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200154915050919050565b60005b601054811015613363576000601082815481106135ee577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169050801561381e5782806136675750601a8281548110613659577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020015442115b1561381e576040517f6472eee100000000000000000000000000000000000000000000000000000000815230600482015242602482015273ffffffffffffffffffffffffffffffffffffffff821690636472eee190604401602060405180830381600087803b1580156136d957600080fd5b505af11580156136ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137119190615294565b6019838154811061374b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001819055508073ffffffffffffffffffffffffffffffffffffffff1663513872bd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561379f57600080fd5b505afa1580156137b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137d79190615294565b601a8381548110613811577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000918252602090912001555b508061382981615632565b9150506135a8565b61383b60006135a5565b600654421061384e5761384c614798565b565b61384c614b06565b6000806138638385615513565b9050838110156138cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610e60565b9392505050565b60006138cf83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614bc7565b60008261392757506000610d48565b60006139338385615564565b905082613940858361552b565b146138cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60448201527f77000000000000000000000000000000000000000000000000000000000000006064820152608401610e60565b60006138cf83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614c12565b846001613a1c8282614c5a565b602454640100000000900460ff1615613a91576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f5374616b696e67207061757365640000000000000000000000000000000000006044820152606401610e60565b60008511613afb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4d757374207374616b65206d6f7265207468616e207a65726f000000000000006044820152606401610e60565b73ffffffffffffffffffffffffffffffffffffffff871660009081526023602052604090205460ff1615613b8b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4164647265737320686173206265656e20677265796c697374656400000000006044820152606401610e60565b600a54841015613bf7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4d696e696d756d207374616b652074696d65206e6f74206d65740000000000006044820152606401610e60565b600954841115613c63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f547279696e6720746f206c6f636b20666f7220746f6f206c6f6e6700000000006044820152606401610e60565b6000613c6e85610cf5565b73ffffffffffffffffffffffffffffffffffffffff89166000908152601d602090815260408083205490517fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060608e901b169281019290925260348201889052605482018a9052607482015291925090609401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828252805160209182012073ffffffffffffffffffffffffffffffffffffffff8d1660009081526022835283902060a0850184528185529184018990529183018a90529092509060608101613d61888a613856565b815260209081018590528254600181810185556000948552938290208351600590920201908155908201519281019290925560408101516002830155606081015160038301556080015160049182015554613dd49073ffffffffffffffffffffffffffffffffffffffff1689308a614d7c565b601b54613de19088613856565b601b5573ffffffffffffffffffffffffffffffffffffffff89166000908152601d6020526040902054613e149088613856565b73ffffffffffffffffffffffffffffffffffffffff8a166000908152601d6020526040812091909155613e48908a90614c5a565b73ffffffffffffffffffffffffffffffffffffffff8916600090815260186020526040902054613e9b5773ffffffffffffffffffffffffffffffffffffffff891660009081526018602052604090204290555b604080518881526020810188905290810182905273ffffffffffffffffffffffffffffffffffffffff89811660608301528a16907ff400e72e69ef4402819dfc57eeddc66f5eb69bf405e0e8098b1946ec1ac14a229060800160405180910390a2505050505050505050565b6060826001613f168282614c5a565b600f5467ffffffffffffffff811115613f58577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015613f81578160200160208202803683370190505b50925060005b600f548110156142985773ffffffffffffffffffffffffffffffffffffffff861660009081526017602090815260408083208484529091529020548451859083908110613ffd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60209081029190910181019190915273ffffffffffffffffffffffffffffffffffffffff8716600090815260178252604080822084835290925290812055600f805482908110614076577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb868684815181106140f6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b815260040161413c92919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b602060405180830381600087803b15801561415657600080fd5b505af115801561416a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061418e919061521d565b508573ffffffffffffffffffffffffffffffffffffffff167f1d2f2ca53af5d2f333bd32fdd45f9c52ad8ebe31414f7792912077fcb3876dff858381518110614200577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600f8481548110614242577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600091825260209182902001546040805193845273ffffffffffffffffffffffffffffffffffffffff9182169284019290925289169082015260600160405180910390a28061429081615632565b915050613f87565b50505073ffffffffffffffffffffffffffffffffffffffff90921660009081526018602052604090204290555090565b6142d28383613f07565b506143086040518060a0016040528060008019168152602001600081526020016000815260200160008152602001600081525090565b600060408201819052805b73ffffffffffffffffffffffffffffffffffffffff861660009081526022602052604090205481101561447c5773ffffffffffffffffffffffffffffffffffffffff8616600090815260226020526040902080548290811061439e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600502016000015484141561446a5773ffffffffffffffffffffffffffffffffffffffff86166000908152602260205260409020805482908110614415577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600502016040518060a001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481525050925080915061447c565b8061447481615632565b915050614313565b50815183146144e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f5374616b65206e6f7420666f756e6400000000000000000000000000000000006044820152606401610e60565b816060015142101580614501575060245460ff1615156001145b806145205750336000908152601f602052604090205460ff1615156001145b614586576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f5374616b65206973207374696c6c206c6f636b656421000000000000000000006044820152606401610e60565b6040820151801561477d57601b5461459e90826138d6565b601b5573ffffffffffffffffffffffffffffffffffffffff86166000908152601d60205260409020546145d190826138d6565b73ffffffffffffffffffffffffffffffffffffffff87166000908152601d6020908152604080832093909355602290522080548390811061463b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600091825260208220600590910201818155600181018290556002810182905560038101829055600401819055614673908790614c5a565b600480546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116938201939093526024810184905291169063a9059cbb90604401602060405180830381600087803b1580156146e957600080fd5b505af11580156146fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614721919061521d565b50604080518281526020810186905273ffffffffffffffffffffffffffffffffffffffff878116828401529151918816917f1d9308f6b22a2754a1c622bb30889e8f8f956c83e524d039e9d65d5f052eb9089181900360600190a25b505050505050565b600061479342600654614f12565b905090565b6005546040517f092193ab00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff9091169063092193ab906024016040805180830381600087803b15801561480257600080fd5b505af1158015614816573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061483a91906152cd565b50506000601454614856600654426138d690919063ffffffff16565b614860919061552b565b905060005b600f54811015614a9157600f81815481106148a9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff909116906370a082319060240160206040518083038186803b15801561491b57600080fd5b505afa15801561492f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906149539190615294565b614970614961846001615513565b61115760145461115786613450565b1115600f82815481106149ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020918290200154604080517f4e6f7420656e6f7567682072657761726420746f6b656e7320617661696c6162938101939093527f6c653a20000000000000000000000000000000000000000000000000000000009083015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016604482015260580160405160208183030381529060405290614a7e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e609190615500565b5080614a8981615632565b915050614865565b50601454614ab190614aa890611157846001613856565b60065490613856565b600655614abc614b06565b60045460405173ffffffffffffffffffffffffffffffffffffffff90911681527f6f2b3b3aaf1881d69a5d40565500f93ea73df36e7b6a29bf48b21479a9237fe990602001610ed8565b6000614b10611eae565b905060005b601554811015614bb857818181518110614b58577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160158281548110614b9a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020909120015580614bb081615632565b915050614b15565b50614bc1614785565b60075550565b60008184841115614c05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e609190615500565b506000611b6c84866155a1565b60008183614c4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e609190615500565b506000611b6c848661552b565b8015614c6857614c68613831565b73ffffffffffffffffffffffffffffffffffffffff821615613363576000806000614c928561274f565b925092509250614ca185614f28565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600d60205260409020829055828110614d25576000614cdc82856138d6565b601c54909150614cec9082613856565b601c55614cf98482613856565b73ffffffffffffffffffffffffffffffffffffffff87166000908152601e60205260409020555061231f565b6000614d3184836138d6565b601c54909150614d4190826138d6565b601c55614d4e84826138d6565b73ffffffffffffffffffffffffffffffffffffffff87166000908152601e6020526040902055505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790529151600092839290881691614e1b9190615365565b6000604051808303816000865af19150503d8060008114614e58576040519150601f19603f3d011682016040523d82523d6000602084013e614e5d565b606091505b5091509150818015614e87575080511580614e87575080806020019051810190614e87919061521d565b61477d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f5472616e7366657248656c7065723a205452414e534645525f46524f4d5f464160448201527f494c4544000000000000000000000000000000000000000000000000000000006064820152608401610e60565b6000818310614f2157816138cf565b5090919050565b73ffffffffffffffffffffffffffffffffffffffff811615615076576000614f4f82610a8e565b905060005b8151811015614fe457818181518110614f96577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff85166000908152601783526040808220858352909352919091205580614fdc81615632565b915050614f54565b5060005b815181101561274a576015818154811061502b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff861683526016825260408084208585529092529120558061506e81615632565b915050614fe8565b50565b803573ffffffffffffffffffffffffffffffffffffffff8116811461509d57600080fd5b919050565b80516dffffffffffffffffffffffffffff8116811461509d57600080fd5b6000602082840312156150d1578081fd5b6138cf82615079565b600080604083850312156150ec578081fd5b6150f583615079565b915061510360208401615079565b90509250929050565b60008060008060808587031215615121578182fd5b61512a85615079565b935061513860208601615079565b925061514660408601615079565b915060608501356151568161569a565b939692955090935050565b60008060408385031215615173578182fd5b61517c83615079565b946020939093013593505050565b60008060006060848603121561519e578283fd5b6151a784615079565b92506020840135915060408401356151be8161569a565b809150509250925092565b600080600080608085870312156151de578384fd5b6151e785615079565b966020860135965060408601359560600135945092505050565b600060208284031215615212578081fd5b81356138cf8161569a565b60006020828403121561522e578081fd5b81516138cf8161569a565b60006020828403121561524a578081fd5b5035919050565b600080600060608486031215615265578283fd5b61526e846150a2565b925061527c602085016150a2565b9150604084015163ffffffff811681146151be578182fd5b6000602082840312156152a5578081fd5b5051919050565b600080604083850312156152be578182fd5b50508035926020909101359150565b600080604083850312156152df578182fd5b505080516020909101519092909150565b600080600060608486031215615304578081fd5b505081359360208301359350604090920135919050565b600081518084526153338160208601602086016155b8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600082516153778184602087016155b8565b9190910192915050565b6020808252825182820181905260009190848201906040850190845b818110156153cf57835173ffffffffffffffffffffffffffffffffffffffff168352928401929184019160010161539d565b50909695505050505050565b6000602080830181845280855180835260408601915060408160051b8701019250838701855b8281101561544d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc088860301845261543b85835161531b565b94509285019290850190600101615401565b5092979650505050505050565b602080825282518282018190526000919060409081850190868401855b828110156154bb5781518051855286810151878601528581015186860152606080820151908601526080908101519085015260a09093019290850190600101615477565b5091979650505050505050565b6020808252825182820181905260009190848201906040850190845b818110156153cf578351835292840192918401916001016154e4565b6020815260006138cf602083018461531b565b600082198211156155265761552661566b565b500190565b60008261555f577f4e487b710000000000000000000000000000000000000000000000000000000081526012600452602481fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561559c5761559c61566b565b500290565b6000828210156155b3576155b361566b565b500390565b60005b838110156155d35781810151838201526020016155bb565b8381111561145d5750506000910152565b600181811c908216806155f857607f821691505b60208210811415610cef577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156156645761566461566b565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b801515811461507657600080fdfea2646970667358221220176b235df002baf0dbb0dfeb773c60c2821bf538fb12e76260fe7ba830c986ee64736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000ff5b4bcbf765fe363269114e1c765229a29edefd000000000000000000000000e06f8d30ac334c857fc8c380c85969c150f38a6a000000000000000000000000278dc748eda1d8efef1adfb518542612b49fcd34000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000002a00000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000346585300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005535553484900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000003432b6a60d23ca0dfca7761b7ab56459d9c964d00000000000000000000000006b3595068778dd592e39a122f4f5a5cf09c90fe20000000000000000000000000000000000000000000000000000000000000002000000000000000000000000234d953a9404bf9dbc3b526271d440cd2870bcd200000000000000000000000019b3eb3af5d93b77a5619b047de0eed7115a19e7000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000a86cc92e3da00000000000000000000000000000000000000000000000000000a86cc92e3da000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _owner (address): 0xfF5B4BCbf765FE363269114e1c765229a29eDeFD
Arg [1] : _stakingToken (address): 0xe06F8d30AC334c857Fc8c380C85969C150f38A6A
Arg [2] : _rewards_distributor_address (address): 0x278dC748edA1d8eFEf1aDFB518542612b49Fcd34
Arg [3] : _rewardSymbols (string[]): FXS,SUSHI
Arg [4] : _rewardTokens (address[]): 0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0,0x6B3595068778DD592e39A122f4f5a5cF09C90fE2
Arg [5] : _rewardManagers (address[]): 0x234D953a9404Bf9DbC3b526271d440cD2870bCd2,0x19B3Eb3Af5D93b77a5619b047De0EED7115A19e7
Arg [6] : _rewardRates (uint256[]): 11574074074074,11574074074074
Arg [7] : _gaugeControllers (address[]): 0x0000000000000000000000000000000000000000,0x0000000000000000000000000000000000000000
-----Encoded View---------------
27 Constructor Arguments found :
Arg [0] : 000000000000000000000000ff5b4bcbf765fe363269114e1c765229a29edefd
Arg [1] : 000000000000000000000000e06f8d30ac334c857fc8c380c85969c150f38a6a
Arg [2] : 000000000000000000000000278dc748eda1d8efef1adfb518542612b49fcd34
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [4] : 00000000000000000000000000000000000000000000000000000000000001e0
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000240
Arg [6] : 00000000000000000000000000000000000000000000000000000000000002a0
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000300
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [12] : 4658530000000000000000000000000000000000000000000000000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [14] : 5355534849000000000000000000000000000000000000000000000000000000
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [16] : 0000000000000000000000003432b6a60d23ca0dfca7761b7ab56459d9c964d0
Arg [17] : 0000000000000000000000006b3595068778dd592e39a122f4f5a5cf09c90fe2
Arg [18] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [19] : 000000000000000000000000234d953a9404bf9dbc3b526271d440cd2870bcd2
Arg [20] : 00000000000000000000000019b3eb3af5d93b77a5619b047de0eed7115a19e7
Arg [21] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [22] : 00000000000000000000000000000000000000000000000000000a86cc92e3da
Arg [23] : 00000000000000000000000000000000000000000000000000000a86cc92e3da
Arg [24] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [25] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [26] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.