Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 422 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Earmark Rewards | 20900707 | 8 hrs ago | IN | 0 ETH | 0.00205026 | ||||
Earmark Rewards | 20894639 | 29 hrs ago | IN | 0 ETH | 0.00244326 | ||||
Earmark Rewards | 20889907 | 45 hrs ago | IN | 0 ETH | 0.00233722 | ||||
Earmark Rewards | 20888241 | 2 days ago | IN | 0 ETH | 0.00158979 | ||||
Earmark Rewards | 20877720 | 3 days ago | IN | 0 ETH | 0.00393804 | ||||
Earmark Rewards | 20877207 | 3 days ago | IN | 0 ETH | 0.00254277 | ||||
Earmark Rewards | 20866694 | 5 days ago | IN | 0 ETH | 0.00347503 | ||||
Earmark Rewards | 20866606 | 5 days ago | IN | 0 ETH | 0.00418784 | ||||
Earmark Rewards | 20862343 | 5 days ago | IN | 0 ETH | 0.00388547 | ||||
Earmark Rewards | 20862339 | 5 days ago | IN | 0 ETH | 0.00429936 | ||||
Earmark Rewards | 20853656 | 6 days ago | IN | 0 ETH | 0.00251748 | ||||
Earmark Rewards | 20848676 | 7 days ago | IN | 0 ETH | 0.00297729 | ||||
Earmark Rewards | 20842175 | 8 days ago | IN | 0 ETH | 0.0070072 | ||||
Earmark Rewards | 20838693 | 9 days ago | IN | 0 ETH | 0.00535593 | ||||
Earmark Rewards | 20824937 | 10 days ago | IN | 0 ETH | 0.00796246 | ||||
Earmark Rewards | 20809390 | 13 days ago | IN | 0 ETH | 0.00340375 | ||||
Earmark Rewards | 20796629 | 14 days ago | IN | 0 ETH | 0.00510245 | ||||
Earmark Rewards | 20787514 | 16 days ago | IN | 0 ETH | 0.00349029 | ||||
Earmark Rewards | 20780523 | 17 days ago | IN | 0 ETH | 0.00336316 | ||||
Earmark Rewards | 20770032 | 18 days ago | IN | 0 ETH | 0.00093776 | ||||
Earmark Rewards | 20767069 | 19 days ago | IN | 0 ETH | 0.00105414 | ||||
Earmark Rewards | 20764720 | 19 days ago | IN | 0 ETH | 0.00289782 | ||||
Earmark Rewards | 20760795 | 19 days ago | IN | 0 ETH | 0.00055349 | ||||
Earmark Rewards | 20759965 | 20 days ago | IN | 0 ETH | 0.00084989 | ||||
Earmark Rewards | 20759343 | 20 days ago | IN | 0 ETH | 0.00067034 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
Booster
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "./Interfaces.sol"; import "@openzeppelin/contracts-0.6/math/SafeMath.sol"; import "@openzeppelin/contracts-0.6/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts-0.6/utils/Address.sol"; import "@openzeppelin/contracts-0.6/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts-0.6/utils/ReentrancyGuard.sol"; /** * @title Booster * @author ConvexFinance * @notice Main deposit contract; keeps track of pool info & user deposits; distributes rewards. * @dev They say all paths lead to Rome, and the cvxBooster is no different. This is where it all goes down. * It is responsible for tracking all the pools, it collects rewards from all pools and redirects it. */ contract Booster is ReentrancyGuard { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address public immutable crv; mapping(address => bool) public validVotingContracts; uint256 public lockIncentive = 825; //incentive to crv stakers uint256 public stakerIncentive = 825; //incentive to native token stakers uint256 public earmarkIncentive = 50; //incentive to users who spend gas to make calls uint256 public platformFee = 0; //possible fee to build treasury uint256 public constant MaxFees = 4000; uint256 public constant FEE_DENOMINATOR = 10000; address public owner; address public feeManager; address public poolManager; address public immutable staker; address public immutable minter; address public rewardFactory; address public stashFactory; address public tokenFactory; address public rewardArbitrator; address public voteDelegate; address public voteManager; address public treasury; address public stakerRewards; //cvx rewards address public lockRewards; //cvxCrv rewards(crv) address public bridgeDelegate; mapping(uint256 => uint256) public l2FeesHistory; uint256 immutable epochLength = 1 weeks; mapping(address => FeeDistro) public feeTokens; struct FeeDistro { address distro; address rewards; bool active; } bool public isShutdown; struct PoolInfo { address lptoken; address token; address gauge; address crvRewards; address stash; bool shutdown; } //index(pid) -> pool PoolInfo[] public poolInfo; mapping(address => bool) public gaugeMap; // Reward multiplier for increasing or decreasing AURA rewards per PID uint256 public constant REWARD_MULTIPLIER_DENOMINATOR = 10000; // rewardContract => rewardMultiplier (10000 = 100%) mapping(address => uint256) public getRewardMultipliers; event Deposited(address indexed user, uint256 indexed poolid, uint256 amount); event Withdrawn(address indexed user, uint256 indexed poolid, uint256 amount); event PoolAdded(address lpToken, address gauge, address token, address rewardPool, address stash, uint256 pid); event PoolShutdown(uint256 poolId); event OwnerUpdated(address newOwner); event FeeManagerUpdated(address newFeeManager); event PoolManagerUpdated(address newPoolManager); event FactoriesUpdated(address rewardFactory, address stashFactory, address tokenFactory); event ArbitratorUpdated(address newArbitrator); event VoteDelegateUpdated(address newVoteDelegate); event VoteManagerUpdated(address newVoteManager); event RewardContractsUpdated(address lockRewards, address stakerRewards); event FeesUpdated(uint256 lockIncentive, uint256 stakerIncentive, uint256 earmarkIncentive, uint256 platformFee); event TreasuryUpdated(address newTreasury); event FeeInfoUpdated(address feeDistro, address lockFees, address feeToken); event FeeInfoChanged(address feeDistro, bool active); event UpdateVotingContract(address votingContract, bool active); /** * @dev Constructor doing what constructors do. It is noteworthy that * a lot of basic config is set to 0 - expecting subsequent calls to setFeeInfo etc. * @param _staker VoterProxy (locks the crv and adds to all gauges) * @param _minter CVX token, or the thing that mints it * @param _crv CRV */ constructor( address _staker, address _minter, address _crv ) public { staker = _staker; minter = _minter; crv = _crv; isShutdown = false; owner = msg.sender; voteDelegate = msg.sender; feeManager = msg.sender; poolManager = msg.sender; voteManager = msg.sender; treasury = address(0); emit OwnerUpdated(msg.sender); emit VoteDelegateUpdated(msg.sender); emit FeeManagerUpdated(msg.sender); emit PoolManagerUpdated(msg.sender); } /// SETTER SECTION /// /** * @notice Owner is responsible for setting initial config, updating vote delegate and shutting system */ function setOwner(address _owner) external { require(msg.sender == owner, "!auth"); owner = _owner; emit OwnerUpdated(_owner); } /** * @notice Fee Manager can update the fees (lockIncentive, stakeIncentive, earmarkIncentive, platformFee) */ function setFeeManager(address _feeM) external { require(msg.sender == owner, "!auth"); feeManager = _feeM; emit FeeManagerUpdated(_feeM); } /** * @notice Pool manager is responsible for adding new pools */ function setPoolManager(address _poolM) external { require(msg.sender == poolManager, "!auth"); poolManager = _poolM; emit PoolManagerUpdated(_poolM); } /** * @notice Factories are used when deploying new pools. Only the stash factory is mutable after init */ function setFactories(address _rfactory, address _sfactory, address _tfactory) external { require(msg.sender == owner, "!auth"); //stash factory should be considered more safe to change //updating may be required to handle new types of gauges stashFactory = _sfactory; //reward factory only allow this to be called once even if owner //removes ability to inject malicious staking contracts //token factory can also be immutable if(rewardFactory == address(0)){ rewardFactory = _rfactory; tokenFactory = _tfactory; emit FactoriesUpdated(_rfactory, _sfactory, _tfactory); } else { emit FactoriesUpdated(address(0), _sfactory, address(0)); } } /** * @notice Arbitrator handles tokens that are used as secondary rewards across multiple pools */ function setArbitrator(address _arb) external { require(msg.sender==owner, "!auth"); rewardArbitrator = _arb; emit ArbitratorUpdated(_arb); } /** * @notice Vote Delegate has the rights to cast votes on the VoterProxy via the Booster */ function setVoteDelegate(address _voteDelegate) external { require(msg.sender==owner, "!auth"); voteDelegate = _voteDelegate; emit VoteDelegateUpdated(_voteDelegate); } /** * @notice Vote Manager has the rights to add new voting contracts */ function setVoteManager(address _voteManager) external { require(msg.sender==owner, "!auth"); voteManager = _voteManager; emit VoteManagerUpdated(_voteManager); } /** * @notice Only called once, to set the addresses of cvxCrv (lockRewards) and cvx staking (stakerRewards) */ function setRewardContracts(address _rewards, address _stakerRewards) external { require(msg.sender == owner, "!auth"); //reward contracts are immutable or else the owner //has a means to redeploy and mint cvx via rewardClaimed() if(lockRewards == address(0)){ lockRewards = _rewards; stakerRewards = _stakerRewards; getRewardMultipliers[lockRewards] = REWARD_MULTIPLIER_DENOMINATOR; emit RewardContractsUpdated(_rewards, _stakerRewards); } } /** * @notice Set reward token and claim contract * @dev This creates a secondary (VirtualRewardsPool) rewards contract for the vcxCrv staking contract */ function setFeeInfo(address _feeToken, address _feeDistro) external nonReentrant { require(msg.sender == owner, "!auth"); require(!isShutdown, "shutdown"); require(lockRewards != address(0) && rewardFactory != address(0), "!initialised"); require(_feeToken != address(0) && _feeDistro != address(0), "!addresses"); require(IFeeDistributor(_feeDistro).getTokenTimeCursor(_feeToken) > 0, "!distro"); if(feeTokens[_feeToken].distro == address(0)){ require(!gaugeMap[_feeToken], "!token"); // Distributed directly if(_feeToken == crv){ feeTokens[crv] = FeeDistro({ distro: _feeDistro, rewards: lockRewards, active: true }); emit FeeInfoUpdated(_feeDistro, lockRewards, crv); } else { //create a new reward contract for the new token require(IRewards(lockRewards).extraRewardsLength() < 10, "too many rewards"); address rewards = IRewardFactory(rewardFactory).CreateTokenRewards(_feeToken, lockRewards, address(this)); feeTokens[_feeToken] = FeeDistro({ distro: _feeDistro, rewards: rewards, active: true }); emit FeeInfoUpdated(_feeDistro, rewards, _feeToken); } } else { feeTokens[_feeToken].distro = _feeDistro; emit FeeInfoUpdated(_feeDistro, address(0), _feeToken); } } /** * @notice Allows turning off or on for fee distro */ function updateFeeInfo(address _feeToken, bool _active) external { require(msg.sender==owner, "!auth"); require(feeTokens[_feeToken].distro != address(0), "Fee doesn't exist"); feeTokens[_feeToken].active = _active; emit FeeInfoChanged(_feeToken, _active); } /** * @notice Fee manager can set all the relevant fees * @param _lockFees % for cvxCrv stakers where 1% == 100 * @param _stakerFees % for CVX stakers where 1% == 100 * @param _callerFees % for whoever calls the claim where 1% == 100 * @param _platform % for "treasury" or WETH-LIQ or liqLIT-LIT staking where 1% == 100 */ function setFees(uint256 _lockFees, uint256 _stakerFees, uint256 _callerFees, uint256 _platform) external nonReentrant{ require(msg.sender==feeManager, "!auth"); uint256 total = _lockFees.add(_stakerFees).add(_callerFees).add(_platform); require(total <= MaxFees, ">MaxFees"); require(_lockFees >= 300 && _lockFees <= 3500, "!lockFees"); require(_stakerFees >= 300 && _stakerFees <= 1500, "!stakerFees"); require(_callerFees >= 10 && _callerFees <= 100, "!callerFees"); require(_platform <= 1000, "!platform"); lockIncentive = _lockFees; stakerIncentive = _stakerFees; earmarkIncentive = _callerFees; platformFee = _platform; emit FeesUpdated(_lockFees, _stakerFees, _callerFees, _platform); } /** * @notice Set the address of the treasury (i.e. vlCVX) */ function setTreasury(address _treasury) external { require(msg.sender==feeManager, "!auth"); treasury = _treasury; emit TreasuryUpdated(_treasury); } /** * @dev Set bridge delegate * @param _bridgeDelegate The bridge delegate address */ function setBridgeDelegate(address _bridgeDelegate) external { require(msg.sender == feeManager, "!auth"); bridgeDelegate = _bridgeDelegate; } function setRewardMultiplier(address rewardContract, uint256 multiplier) external { require(msg.sender == feeManager, "!auth"); require(multiplier <= REWARD_MULTIPLIER_DENOMINATOR * 2, "too high"); getRewardMultipliers[rewardContract] = multiplier; } /// END SETTER SECTION /// function poolLength() external view returns (uint256) { return poolInfo.length; } /** * @notice Called by the PoolManager (i.e. PoolManagerProxy) to add a new pool - creates all the required * contracts (DepositToken, RewardPool, Stash) and then adds to the list! */ function addPool(address _lptoken, address _gauge, uint256 _stashVersion) external returns(bool){ require(msg.sender==poolManager && !isShutdown, "!add"); require(_gauge != address(0) && _lptoken != address(0),"!param"); require(feeTokens[_gauge].distro == address(0), "!gauge"); //the next pool's pid uint256 pid = poolInfo.length; //create a tokenized deposit address token = ITokenFactory(tokenFactory).CreateDepositToken(_lptoken); //create a reward contract for crv rewards address newRewardPool = IRewardFactory(rewardFactory).CreateCrvRewards(pid,token,_lptoken); //create a stash to handle extra incentives address stash = IStashFactory(stashFactory).CreateStash(pid,_gauge,staker,_stashVersion); //add the new pool poolInfo.push( PoolInfo({ lptoken: _lptoken, token: token, gauge: _gauge, crvRewards: newRewardPool, stash: stash, shutdown: false }) ); gaugeMap[_gauge] = true; //give stashes access to rewardfactory and voteproxy // voteproxy so it can grab the incentive tokens off the contract after claiming rewards // reward factory so that stashes can make new extra reward contracts if a new incentive is added to the gauge if(stash != address(0)){ poolInfo[pid].stash = stash; IStaker(staker).setStashAccess(stash,true); IRewardFactory(rewardFactory).setAccess(stash,true); } // Init the pool with the default reward multiplier getRewardMultipliers[newRewardPool] = REWARD_MULTIPLIER_DENOMINATOR; emit PoolAdded(_lptoken, _gauge, token, newRewardPool, stash, pid); return true; } /** * @notice Shuts down the pool by withdrawing everything from the gauge to here (can later be * claimed from depositors by using the withdraw fn) and marking it as shut down */ function shutdownPool(uint256 _pid) external nonReentrant returns(bool){ require(msg.sender==poolManager, "!auth"); PoolInfo storage pool = poolInfo[_pid]; //withdraw from gauge try IStaker(staker).withdrawAll(pool.lptoken,pool.gauge){ }catch{} pool.shutdown = true; gaugeMap[pool.gauge] = false; emit PoolShutdown(_pid); return true; } /** * @notice Shuts down the WHOLE SYSTEM by withdrawing all the LP tokens to here and then allowing * for subsequent withdrawal by any depositors. */ function shutdownSystem() external{ require(msg.sender == owner, "!auth"); isShutdown = true; for(uint i=0; i < poolInfo.length; i++){ PoolInfo storage pool = poolInfo[i]; if (pool.shutdown) continue; address token = pool.lptoken; address gauge = pool.gauge; //withdraw from gauge try IStaker(staker).withdrawAll(token,gauge){ pool.shutdown = true; }catch{} } } /** * @notice Deposits an "_amount" to a given gauge (specified by _pid), mints a `DepositToken` * and subsequently stakes that on Convex BaseRewardPool */ function deposit(uint256 _pid, uint256 _amount, bool _stake) public nonReentrant returns(bool){ require(!isShutdown,"shutdown"); PoolInfo storage pool = poolInfo[_pid]; require(pool.shutdown == false, "pool is closed"); //send to proxy to stake address lptoken = pool.lptoken; IERC20(lptoken).safeTransferFrom(msg.sender, staker, _amount); //stake address gauge = pool.gauge; require(gauge != address(0),"!gauge setting"); IStaker(staker).deposit(lptoken,gauge); //some gauges claim rewards when depositing, stash them in a seperate contract until next claim address stash = pool.stash; if(stash != address(0)){ IStash(stash).stashRewards(); } address token = pool.token; if(_stake){ //mint here and send to rewards on user behalf ITokenMinter(token).mint(address(this),_amount); address rewardContract = pool.crvRewards; IERC20(token).safeApprove(rewardContract,0); IERC20(token).safeApprove(rewardContract,_amount); IRewards(rewardContract).stakeFor(msg.sender,_amount); }else{ //add user balance directly ITokenMinter(token).mint(msg.sender,_amount); } emit Deposited(msg.sender, _pid, _amount); return true; } /** * @notice Deposits all a senders balance to a given gauge (specified by _pid), mints a `DepositToken` * and subsequently stakes that on Convex BaseRewardPool */ function depositAll(uint256 _pid, bool _stake) external returns(bool){ address lptoken = poolInfo[_pid].lptoken; uint256 balance = IERC20(lptoken).balanceOf(msg.sender); deposit(_pid,balance,_stake); return true; } /** * @notice Withdraws LP tokens from a given PID (& user). * 1. Burn the cvxLP balance from "_from" (implicit balance check) * 2. If pool !shutdown.. withdraw from gauge * 3. If stash, stash rewards * 4. Transfer out the LP tokens */ function _withdraw(uint256 _pid, uint256 _amount, address _from, address _to) internal nonReentrant { PoolInfo storage pool = poolInfo[_pid]; address lptoken = pool.lptoken; address gauge = pool.gauge; //remove lp balance address token = pool.token; ITokenMinter(token).burn(_from,_amount); //pull from gauge if not shutdown // if shutdown tokens will be in this contract if (!pool.shutdown) { IStaker(staker).withdraw(lptoken,gauge, _amount); } //some gauges claim rewards when withdrawing, stash them in a separate contract until next claim //do not call if shutdown since stashes wont have access address stash = pool.stash; if(stash != address(0) && !isShutdown && !pool.shutdown){ IStash(stash).stashRewards(); } //return lp tokens IERC20(lptoken).safeTransfer(_to, _amount); emit Withdrawn(_to, _pid, _amount); } /** * @notice Withdraw a given amount from a pool (must already been unstaked from the Convex Reward Pool - * BaseRewardPool uses withdrawAndUnwrap to get around this) */ function withdraw(uint256 _pid, uint256 _amount) public returns(bool){ _withdraw(_pid,_amount,msg.sender,msg.sender); return true; } /** * @notice Withdraw all the senders LP tokens from a given gauge */ function withdrawAll(uint256 _pid) public returns(bool){ address token = poolInfo[_pid].token; uint256 userBal = IERC20(token).balanceOf(msg.sender); withdraw(_pid, userBal); return true; } /** * @notice Allows the actual BaseRewardPool to withdraw and send directly to the user */ function withdrawTo(uint256 _pid, uint256 _amount, address _to) external returns(bool){ address rewardContract = poolInfo[_pid].crvRewards; require(msg.sender == rewardContract,"!auth"); _withdraw(_pid,_amount,msg.sender,_to); return true; } /** * @notice set valid vote hash on VoterProxy */ function setVote(bytes32 _hash) external returns(bool){ require(msg.sender == voteDelegate, "!auth"); IStaker(staker).setVote(_hash, false); return true; } /** * @notice Set delegate on snapshot */ function setDelegate(address _delegateContract, address _delegate, bytes32 _space) external{ require(msg.sender == voteDelegate, "!auth"); bytes memory data = abi.encodeWithSelector(bytes4(keccak256("setDelegate(bytes32,address)")), _space, _delegate); IStaker(staker).execute(_delegateContract,uint256(0),data); } /** * @notice Delegate address votes on dao via VoterProxy */ function vote(uint256 _voteId, address _votingAddress, bool _support) external returns(bool){ require(msg.sender == voteDelegate, "!auth"); require(validVotingContracts[_votingAddress], "!voteAddr"); IStaker(staker).vote(_voteId,_votingAddress,_support); return true; } /** * @notice Delegate address votes on gauge weight via VoterProxy */ function voteGaugeWeight(address[] calldata _gauge, uint256[] calldata _weight ) external returns(bool){ require(msg.sender == voteDelegate, "!auth"); for(uint256 i = 0; i < _gauge.length; i++){ IStaker(staker).voteGaugeWeight(_gauge[i],_weight[i]); } return true; } /** * @notice Enables or disables a Timeless on-chain DAO voting contract */ function updateVotingContract(address _votingContract, bool _active) external { require(msg.sender == voteManager, "!auth"); validVotingContracts[_votingContract] = _active; emit UpdateVotingContract(_votingContract, _active); } /** * @notice Allows a stash to claim secondary rewards from a gauge */ function claimRewards(uint256 _pid, address _gauge) external returns(bool){ address stash = poolInfo[_pid].stash; require(msg.sender == stash,"!auth"); IStaker(staker).claimRewards(_gauge); return true; } /** * @notice Tells the Curve gauge to redirect any accrued rewards to the given stash via the VoterProxy */ function setGaugeRedirect(uint256 _pid) external returns(bool){ address stash = poolInfo[_pid].stash; require(msg.sender == stash,"!auth"); address gauge = poolInfo[_pid].gauge; bytes memory data = abi.encodeWithSelector(bytes4(keccak256("set_rewards_receiver(address)")), stash); IStaker(staker).execute(gauge,uint256(0),data); return true; } /** * @notice Basically a hugely pivotal function. * Responsible for collecting the crv from gauge, and then redistributing to the correct place. * Pays the caller a fee to process this. */ function _earmarkRewards(uint256 _pid) internal { PoolInfo storage pool = poolInfo[_pid]; require(pool.shutdown == false, "pool is closed"); address gauge = pool.gauge; // If there is idle CRV in the Booster we need to transfer it out // in order that our accounting doesn't get screwed. uint256 crvBBalBefore = IERC20(crv).balanceOf(address(this)); uint256 crvVBalBefore = IERC20(crv).balanceOf(staker); uint256 crvBalBefore = crvBBalBefore.add(crvVBalBefore); //claim crv IStaker(staker).claimCrv(gauge); //crv balance uint256 crvBalAfter = IERC20(crv).balanceOf(address(this)); uint crvBal = crvBalAfter.sub(crvBalBefore); if(crvBalBefore > 0 && treasury != address(0)) { IERC20(crv).transfer(treasury, crvBalBefore); } //check if there are extra rewards address stash = pool.stash; if(stash != address(0)){ //claim extra rewards IStash(stash).claimRewards(); //process extra rewards IStash(stash).processStash(); } if (crvBal > 0) { // LockIncentive = cvxCrv stakers (currently 10%) uint256 _lockIncentive = crvBal.mul(lockIncentive).div(FEE_DENOMINATOR); // StakerIncentive = cvx stakers (currently 5%) uint256 _stakerIncentive = crvBal.mul(stakerIncentive).div(FEE_DENOMINATOR); // CallIncentive = caller of this contract (currently 1%) uint256 _callIncentive = crvBal.mul(earmarkIncentive).div(FEE_DENOMINATOR); // Treasury = WETH-LIQ or liqLIT-LIT staking if(treasury != address(0) && treasury != address(this) && platformFee > 0){ //only subtract after address condition check uint256 _platform = crvBal.mul(platformFee).div(FEE_DENOMINATOR); crvBal = crvBal.sub(_platform); IERC20(crv).safeTransfer(treasury, _platform); } //remove incentives from balance crvBal = crvBal.sub(_lockIncentive).sub(_callIncentive).sub(_stakerIncentive); //send incentives for calling IERC20(crv).safeTransfer(msg.sender, _callIncentive); //send crv to lp provider reward contract address rewardContract = pool.crvRewards; IERC20(crv).safeTransfer(rewardContract, crvBal); IRewards(rewardContract).queueNewRewards(crvBal); //send lockers' share of crv to reward contract IERC20(crv).safeTransfer(lockRewards, _lockIncentive); IRewards(lockRewards).queueNewRewards(_lockIncentive); //send stakers's share of crv to reward contract IERC20(crv).safeTransfer(stakerRewards, _stakerIncentive); ILocker(stakerRewards).queueNewRewards(crv, _stakerIncentive); } } /** * @notice Basically a hugely pivotal function. * Responsible for collecting the crv from gauge, and then redistributing to the correct place. * Pays the caller a fee to process this. */ function earmarkRewards(uint256 _pid) external nonReentrant returns(bool){ require(!isShutdown,"shutdown"); _earmarkRewards(_pid); return true; } /** * @notice Claim fees from curve distro contract, put in lockers' reward contract. * lockFees is the secondary reward contract that uses the virtual balances from cvxCrv */ function earmarkFees(address _feeToken) external nonReentrant returns(bool){ require(!isShutdown,"shutdown"); FeeDistro memory feeDistro = feeTokens[_feeToken]; require(feeDistro.active, "Inactive distro"); require(!gaugeMap[_feeToken], "Invalid token"); //claim fee rewards uint256 tokenBalanceVBefore = IERC20(_feeToken).balanceOf(staker); uint256 tokenBalanceBBefore = IERC20(_feeToken).balanceOf(address(this)); uint256 tokenBalanceBefore = tokenBalanceBBefore.add(tokenBalanceVBefore); IStaker(staker).claimFees(feeDistro.distro, _feeToken); uint256 tokenBalanceAfter = IERC20(_feeToken).balanceOf(address(this)); uint256 feesClaimed = tokenBalanceAfter.sub(tokenBalanceBefore); //send fee rewards to reward contract IERC20(_feeToken).safeTransfer(feeDistro.rewards, feesClaimed); IRewards(feeDistro.rewards).queueNewRewards(feesClaimed); return true; } /** * @notice Callback from reward contract when crv is received. * @dev Goes off and mints a relative amount of `CVX` based on the distribution schedule. */ function rewardClaimed(uint256 _pid, address _address, uint256 _amount) external returns(bool){ address rewardContract = poolInfo[_pid].crvRewards; require(msg.sender == rewardContract || msg.sender == lockRewards, "!auth"); uint256 mintAmount = _amount.mul(getRewardMultipliers[msg.sender]).div(REWARD_MULTIPLIER_DENOMINATOR); if(mintAmount > 0) { //mint reward tokens ITokenMinter(minter).mint(_address, mintAmount); } return true; } /** * @dev Distribute fees from L2 to L1 reward contracts * @param _amount Amount of fees to distribute */ function distributeL2Fees(uint256 _amount) external nonReentrant { require(msg.sender == bridgeDelegate, "!auth"); // calculate the rewards that were paid based on the incentives that // are being distributed uint256 totalIncentives = lockIncentive.add(stakerIncentive); uint256 totalFarmed = _amount.mul(FEE_DENOMINATOR).div(totalIncentives); uint256 eligibleForMint = totalFarmed.sub(_amount); // Ensure that the total amount of rewards claimed per epoch is less than 70k uint256 epoch = block.timestamp.div(epochLength); l2FeesHistory[epoch] = l2FeesHistory[epoch].add(totalFarmed); require(l2FeesHistory[epoch] <= 70000e18, "Too many L2 Fees"); // Calculate fees for individual reward contracts uint256 _lockIncentive = _amount.mul(lockIncentive).div(totalIncentives); uint256 _stakerIncentive = _amount.sub(_lockIncentive); //send lockers' share of crv to reward contract IERC20(crv).safeTransferFrom(bridgeDelegate, lockRewards, _lockIncentive); IRewards(lockRewards).queueNewRewards(_lockIncentive); //send stakers's share of crv to reward contract IERC20(crv).safeTransferFrom(bridgeDelegate, stakerRewards, _stakerIncentive); ILocker(stakerRewards).queueNewRewards(crv, _stakerIncentive); // Mint CVX to bridge delegate ITokenMinter(minter).mint(bridgeDelegate, eligibleForMint); } }
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; interface ICurveGauge { function deposit(uint256) external; function balanceOf(address) external view returns (uint256); function withdraw(uint256) external; function claim_rewards() external; function reward_tokens(uint256) external view returns(address);//v2 function rewarded_token() external view returns(address);//v1 function lp_token() external view returns(address); } interface ICurveVoteEscrow { function create_lock(uint256, uint256) external; function increase_amount(uint256) external; function increase_unlock_time(uint256) external; function withdraw() external; function smart_wallet_checker() external view returns (address); function commit_smart_wallet_checker(address) external; function apply_smart_wallet_checker() external; } interface IWalletChecker { function check(address) external view returns (bool); function approveWallet(address) external; function dao() external view returns (address); } interface IVoting{ function vote(uint256, bool, bool) external; //voteId, support, executeIfDecided function getVote(uint256) external view returns(bool,bool,uint64,uint64,uint64,uint64,uint256,uint256,uint256,bytes memory); function vote_for_gauge_weights(address,uint256) external; } interface IMinter{ function mint(address) external; } interface IStaker{ function deposit(address, address) external returns (bool); function withdraw(address) external returns (uint256); function withdraw(address, address, uint256) external returns (bool); function withdrawAll(address, address) external returns (bool); function createLock(uint256, uint256) external returns(bool); function increaseAmount(uint256) external returns(bool); function increaseTime(uint256) external returns(bool); function release() external returns(bool); function claimCrv(address) external returns (uint256); function claimRewards(address) external returns(bool); function claimFees(address,address) external returns (uint256); function setStashAccess(address, bool) external returns (bool); function vote(uint256,address,bool) external returns(bool); function voteGaugeWeight(address,uint256) external returns(bool); function balanceOfPool(address) external view returns (uint256); function operator() external view returns (address); function execute(address _to, uint256 _value, bytes calldata _data) external returns (bool, bytes memory); function setVote(bytes32 hash, bool valid) external; function migrate(address to) external; } interface IRewards{ function stake(address, uint256) external; function stakeFor(address, uint256) external; function withdraw(address, uint256) external; function exit(address) external; function getReward(address) external; function queueNewRewards(uint256) external; function notifyRewardAmount(uint256) external; function addExtraReward(address) external; function extraRewardsLength() external view returns (uint256); function stakingToken() external view returns (address); function rewardToken() external view returns(address); function earned(address account) external view returns (uint256); } interface IStash{ function stashRewards() external returns (bool); function processStash() external returns (bool); function claimRewards() external returns (bool); function initialize(uint256 _pid, address _operator, address _staker, address _gauge, address _rewardFactory) external; function setExtraReward(address) external; } interface IFeeDistributor { function claimToken(address user, address token) external returns (uint256); function claimTokens(address user, address[] calldata tokens) external returns (uint256[] memory); function getTokenTimeCursor(address token) external view returns (uint256); } interface ITokenMinter{ function mint(address,uint256) external; function burn(address,uint256) external; } interface IDeposit{ function isShutdown() external view returns(bool); function balanceOf(address _account) external view returns(uint256); function totalSupply() external view returns(uint256); function poolInfo(uint256) external view returns(address,address,address,address,address, bool); function rewardClaimed(uint256,address,uint256) external; function withdrawTo(uint256,uint256,address) external; function claimRewards(uint256,address) external returns(bool); function rewardArbitrator() external returns(address); function setGaugeRedirect(uint256 _pid) external returns(bool); function owner() external returns(address); function deposit(uint256 _pid, uint256 _amount, bool _stake) external returns(bool); } interface ICrvDeposit{ function deposit(uint256, bool) external; function lockIncentive() external view returns(uint256); } interface IRewardFactory{ function setAccess(address,bool) external; function CreateCrvRewards(uint256,address,address) external returns(address); function CreateTokenRewards(address,address,address) external returns(address); function activeRewardCount(address) external view returns(uint256); function addActiveReward(address,uint256) external returns(bool); function removeActiveReward(address,uint256) external returns(bool); } interface IStashFactory{ function CreateStash(uint256,address,address,uint256) external returns(address); function setImplementation(address, address, address) external; } interface ITokenFactory{ function CreateDepositToken(address) external returns(address); } interface IPools{ function addPool(address _lptoken, address _gauge, uint256 _stashVersion) external returns(bool); function forceAddPool(address _lptoken, address _gauge, uint256 _stashVersion) external returns(bool); function shutdownPool(uint256 _pid) external returns(bool); function poolInfo(uint256) external view returns(address,address,address,address,address,bool); function poolLength() external view returns (uint256); function gaugeMap(address) external view returns(bool); function setPoolManager(address _poolM) external; function shutdownSystem() external; function setUsedAddress(address[] memory) external; } interface IVestedEscrow{ function fund(address[] calldata _recipient, uint256[] calldata _amount) external returns(bool); } interface IRewardDeposit { function addReward(address, uint256) external; } interface ILocker { function lock(address _account, uint256 _amount) external; function checkpointEpoch() external; function epochCount() external view returns (uint256); function balanceAtEpochOf(uint256 _epoch, address _user) external view returns (uint256 amount); function totalSupplyAtEpoch(uint256 _epoch) external view returns (uint256 supply); function queueNewRewards(address _rewardsToken, uint256 reward) external; function getReward(address _account, bool _stake) external; function getReward(address _account) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @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) { 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, reverting 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) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * 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, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * 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, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `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.2 <0.8.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); } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for 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.0 <0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor () 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; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_staker","type":"address"},{"internalType":"address","name":"_minter","type":"address"},{"internalType":"address","name":"_crv","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newArbitrator","type":"address"}],"name":"ArbitratorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"poolid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"rewardFactory","type":"address"},{"indexed":false,"internalType":"address","name":"stashFactory","type":"address"},{"indexed":false,"internalType":"address","name":"tokenFactory","type":"address"}],"name":"FactoriesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"feeDistro","type":"address"},{"indexed":false,"internalType":"bool","name":"active","type":"bool"}],"name":"FeeInfoChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"feeDistro","type":"address"},{"indexed":false,"internalType":"address","name":"lockFees","type":"address"},{"indexed":false,"internalType":"address","name":"feeToken","type":"address"}],"name":"FeeInfoUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newFeeManager","type":"address"}],"name":"FeeManagerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lockIncentive","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stakerIncentive","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"earmarkIncentive","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"platformFee","type":"uint256"}],"name":"FeesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"lpToken","type":"address"},{"indexed":false,"internalType":"address","name":"gauge","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"rewardPool","type":"address"},{"indexed":false,"internalType":"address","name":"stash","type":"address"},{"indexed":false,"internalType":"uint256","name":"pid","type":"uint256"}],"name":"PoolAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newPoolManager","type":"address"}],"name":"PoolManagerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"PoolShutdown","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"lockRewards","type":"address"},{"indexed":false,"internalType":"address","name":"stakerRewards","type":"address"}],"name":"RewardContractsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newTreasury","type":"address"}],"name":"TreasuryUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"votingContract","type":"address"},{"indexed":false,"internalType":"bool","name":"active","type":"bool"}],"name":"UpdateVotingContract","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newVoteDelegate","type":"address"}],"name":"VoteDelegateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newVoteManager","type":"address"}],"name":"VoteManagerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"poolid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"FEE_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MaxFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REWARD_MULTIPLIER_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_lptoken","type":"address"},{"internalType":"address","name":"_gauge","type":"address"},{"internalType":"uint256","name":"_stashVersion","type":"uint256"}],"name":"addPool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bridgeDelegate","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_gauge","type":"address"}],"name":"claimRewards","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"crv","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_stake","type":"bool"}],"name":"deposit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"bool","name":"_stake","type":"bool"}],"name":"depositAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"distributeL2Fees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeToken","type":"address"}],"name":"earmarkFees","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"earmarkIncentive","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"earmarkRewards","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"feeTokens","outputs":[{"internalType":"address","name":"distro","type":"address"},{"internalType":"address","name":"rewards","type":"address"},{"internalType":"bool","name":"active","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"gaugeMap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"getRewardMultipliers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isShutdown","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"l2FeesHistory","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockIncentive","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockRewards","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minter","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":"platformFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"address","name":"lptoken","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"gauge","type":"address"},{"internalType":"address","name":"crvRewards","type":"address"},{"internalType":"address","name":"stash","type":"address"},{"internalType":"bool","name":"shutdown","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardArbitrator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"rewardClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardFactory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_arb","type":"address"}],"name":"setArbitrator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_bridgeDelegate","type":"address"}],"name":"setBridgeDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_delegateContract","type":"address"},{"internalType":"address","name":"_delegate","type":"address"},{"internalType":"bytes32","name":"_space","type":"bytes32"}],"name":"setDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rfactory","type":"address"},{"internalType":"address","name":"_sfactory","type":"address"},{"internalType":"address","name":"_tfactory","type":"address"}],"name":"setFactories","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeToken","type":"address"},{"internalType":"address","name":"_feeDistro","type":"address"}],"name":"setFeeInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeM","type":"address"}],"name":"setFeeManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockFees","type":"uint256"},{"internalType":"uint256","name":"_stakerFees","type":"uint256"},{"internalType":"uint256","name":"_callerFees","type":"uint256"},{"internalType":"uint256","name":"_platform","type":"uint256"}],"name":"setFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"setGaugeRedirect","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_poolM","type":"address"}],"name":"setPoolManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewards","type":"address"},{"internalType":"address","name":"_stakerRewards","type":"address"}],"name":"setRewardContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"rewardContract","type":"address"},{"internalType":"uint256","name":"multiplier","type":"uint256"}],"name":"setRewardMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"}],"name":"setVote","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_voteDelegate","type":"address"}],"name":"setVoteDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_voteManager","type":"address"}],"name":"setVoteManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"shutdownPool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"shutdownSystem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"staker","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakerIncentive","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakerRewards","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stashFactory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenFactory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_feeToken","type":"address"},{"internalType":"bool","name":"_active","type":"bool"}],"name":"updateFeeInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_votingContract","type":"address"},{"internalType":"bool","name":"_active","type":"bool"}],"name":"updateVotingContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"validVotingContracts","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_voteId","type":"uint256"},{"internalType":"address","name":"_votingAddress","type":"address"},{"internalType":"bool","name":"_support","type":"bool"}],"name":"vote","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"voteDelegate","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_gauge","type":"address[]"},{"internalType":"uint256[]","name":"_weight","type":"uint256[]"}],"name":"voteGaugeWeight","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"voteManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"withdrawAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"withdrawTo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
61010060405261033960028190556003556032600455600060055562093a8060e0523480156200002e57600080fd5b506040516200580e3803806200580e833981810160405260608110156200005457600080fd5b50805160208083015160409384015160016000556001600160601b0319606085811b821660a05283811b821660c05282901b166080526015805460ff19169055600680546001600160a01b031990811633908117909255600d80548216831790556007805482168317905560088054821683179055600e8054821683179055600f80549091169055855190815294519394919390927f4ffd725fc4a22075e9ec71c59edf9c38cdeb588a91b24fc5b61388c5be41282b928290030190a16040805133815290517f49f087c09fe6698eda82449a671bd8d38e44bed601118018a7cc7f1e0c808df49181900360200190a16040805133815290517fe45f5e140399b0a7e12971ab020724b828fbed8ac408c420884dc7d1bbe506b49181900360200190a16040805133815290517f70a64736553c84939f57deec269299882abbbee8dc4f316eccbc6fce57e4d3cf9181900360200190a150505060805160601c60a05160601c60c05160601c60e0516155786200029660003980610cce525080610f395280610fad528061221f52508061126f52806113e952806116bf52806117375280611ae45280611c9b5280611e395280612dd452806130585280613496528061396a5280613a7c5280613e8252806141745280614311528061463a5280614a885280614b3f525080610db05280610e545280610e9d5280611daa528061257e52806125e752806149fb5280614ab85280614bfb5280614cc95280614f045280614f545280614f92528061502752806150c6528061510b52506155786000f3fe608060405234801561001057600080fd5b50600436106103d05760003560e01c80637303df9a116101ff578063bf86d6901161011a578063dc4c90d3116100ad578063e31c0bf61161007c578063e31c0bf614610af8578063e77772fe14610b88578063f0f4426014610b90578063f85008a214610bb6576103d0565b8063dc4c90d314610b00578063dee5522714610b08578063e032520814610b2e578063e2cdd42a14610b54576103d0565b8063ce726e63116100e9578063ce726e6314610ae0578063cfb9cfba14610ae8578063d0fb020314610af0578063d73792a914610af8576103d0565b8063bf86d690146109d7578063bfad96ba146109df578063cb0d5b5214610a9d578063cc956f3f14610ac3576103d0565b80639123d40411610192578063a0e0c54d11610161578063a0e0c54d14610937578063ab5f19b01461095d578063b0eefabe1461098b578063b67b6df3146109b1576103d0565b80639123d404146108c757806395539a1d146108e4578063958e2d31146109125780639f00332b1461092f576103d0565b80637e29d6c2116101ce5780637e29d6c21461082f5780637e8df27a1461086557806389e77896146108935780638da5cb5b146108bf576103d0565b80637303df9a146107a357806374874323146107ab5780637aef6715146107d15780637bd3b995146107f7576103d0565b806342c1e587116102ef57806361d027b3116102825780636c7f72c4116102515780636c7f72c4146106ee5780636fcba3771461071457806371192b1714610743578063728706ed14610775576103d0565b806361d027b3146106aa57806362d28ac7146106b25780636a4874a1146106ba5780636c7b69cb146106c2576103d0565b806350940618116102be57806350940618146106585780635ebaf1db1461066057806360759fce1461066857806360cafe841461068d576103d0565b806342c1e587146105dc57806343a0d066146105e4578063441a3e701461060f578063472d35b914610632576103d0565b806316605a0d11610367578063376d771a11610336578063376d771a146105795780633a088cd2146105815780633b788da9146105895780633c781cbd146105bf576103d0565b806316605a0d1461050f578063245e4bf01461056157806326232a2e14610569578063354af91914610571576103d0565b8063081e3eda116103a3578063081e3eda1461042857806313af40351461044257806314cd70e4146104685780631526fe27146104ae576103d0565b8063043b684a146103d5578063068eb19e146103f957806306caad9f146104015780630754617214610420575b600080fd5b6103dd610bd3565b604080516001600160a01b039092168252519081900360200190f35b6103dd610be2565b61041e6004803603602081101561041757600080fd5b5035610bf1565b005b6103dd610fab565b610430610fcf565b60408051918252519081900360200190f35b61041e6004803603602081101561045857600080fd5b50356001600160a01b0316610fd5565b61049a6004803603606081101561047e57600080fd5b50803590602081013590604001356001600160a01b0316611070565b604080519115158252519081900360200190f35b6104cb600480360360208110156104c457600080fd5b50356110f4565b604080516001600160a01b0397881681529587166020870152938616858501529185166060850152909316608083015291151560a082015290519081900360c00190f35b6105356004803603602081101561052557600080fd5b50356001600160a01b0316611152565b604080516001600160a01b03948516815292909316602083015215158183015290519081900360600190f35b6103dd611184565b610430611193565b61041e611199565b6103dd61130e565b61043061131d565b61041e6004803603606081101561059f57600080fd5b506001600160a01b03813581169160208101359091169060400135611323565b610430600480360360208110156105d557600080fd5b5035611588565b6103dd61159a565b61049a600480360360608110156105fa57600080fd5b508035906020810135906040013515156115a9565b61049a6004803603604081101561062557600080fd5b5080359060200135611a29565b61041e6004803603602081101561064857600080fd5b50356001600160a01b0316611a41565b610430611adc565b6103dd611ae2565b61049a6004803603604081101561067e57600080fd5b50803590602001351515611b06565b61049a600480360360208110156106a357600080fd5b5035611bb3565b6103dd611d93565b610430611da2565b6103dd611da8565b61049a600480360360408110156106d857600080fd5b50803590602001356001600160a01b0316611dcc565b61049a6004803603602081101561070457600080fd5b50356001600160a01b0316611ed0565b61041e6004803603608081101561072a57600080fd5b5080359060208101359060408101359060600135611ee5565b61049a6004803603606081101561075957600080fd5b508035906001600160a01b036020820135169060400135612172565b61041e6004803603604081101561078b57600080fd5b506001600160a01b03813581169160200135166122b8565b610430612924565b61041e600480360360208110156107c157600080fd5b50356001600160a01b031661292a565b61041e600480360360208110156107e757600080fd5b50356001600160a01b03166129c5565b61041e6004803603606081101561080d57600080fd5b506001600160a01b038135811691602081013582169160409091013516612a60565b61049a6004803603606081101561084557600080fd5b506001600160a01b03813581169160208101359091169060400135612b90565b61041e6004803603604081101561087b57600080fd5b506001600160a01b03813516906020013515156131c2565b61041e600480360360408110156108a957600080fd5b506001600160a01b0381351690602001356132dc565b6103dd613381565b61049a600480360360208110156108dd57600080fd5b5035613390565b61041e600480360360408110156108fa57600080fd5b506001600160a01b0381358116916020013516613637565b61049a6004803603602081101561092857600080fd5b5035613711565b6103dd6137c0565b61049a6004803603602081101561094d57600080fd5b50356001600160a01b03166137cf565b61041e6004803603604081101561097357600080fd5b506001600160a01b0381351690602001351515613c41565b61041e600480360360208110156109a157600080fd5b50356001600160a01b0316613cec565b61041e600480360360208110156109c757600080fd5b50356001600160a01b0316613d87565b61049a613e22565b61049a600480360360408110156109f557600080fd5b810190602081018135600160201b811115610a0f57600080fd5b820183602082011115610a2157600080fd5b803590602001918460208302840111600160201b83111715610a4257600080fd5b919390929091602081019035600160201b811115610a5f57600080fd5b820183602082011115610a7157600080fd5b803590602001918460208302840111600160201b83111715610a9257600080fd5b509092509050613e2b565b61049a60048036036020811015610ab357600080fd5b50356001600160a01b0316613f58565b61049a60048036036020811015610ad957600080fd5b5035613f6d565b6103dd614012565b6103dd614021565b6103dd614030565b61043061403f565b6103dd614045565b61043060048036036020811015610b1e57600080fd5b50356001600160a01b0316614054565b61041e60048036036020811015610b4457600080fd5b50356001600160a01b0316614066565b61049a60048036036060811015610b6a57600080fd5b508035906001600160a01b03602082013516906040013515156140cf565b6103dd6141f3565b61041e60048036036020811015610ba657600080fd5b50356001600160a01b0316614202565b61049a60048036036020811015610bcc57600080fd5b503561429d565b600c546001600160a01b031681565b600a546001600160a01b031681565b60026000541415610c37576040805162461bcd60e51b815260206004820152601f602482015260008051602061547c833981519152604482015290519081900360640190fd5b60026000556012546001600160a01b03163314610c83576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b6000610c9c60035460025461436890919063ffffffff16565b90506000610cb682610cb0856127106143c2565b9061441b565b90506000610cc48285614482565b90506000610cf2427f000000000000000000000000000000000000000000000000000000000000000061441b565b600081815260136020526040902054909150610d0e9084614368565b6000828152601360205260409020819055690ed2b525841adfc000001015610d70576040805162461bcd60e51b815260206004820152601060248201526f546f6f206d616e79204c32204665657360801b604482015290519081900360640190fd5b6000610d8b85610cb0600254896143c290919063ffffffff16565b90506000610d998783614482565b601254601154919250610ddc916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169281169116856144df565b6011546040805163590a41f560e01b81526004810185905290516001600160a01b039092169163590a41f59160248082019260009290919082900301818387803b158015610e2957600080fd5b505af1158015610e3d573d6000803e3d6000fd5b5050601254601054610e8293506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811693509182169116846144df565b601054604080516304d0c2c560e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015260248201859052915191909216916304d0c2c591604480830192600092919082900301818387803b158015610ef757600080fd5b505af1158015610f0b573d6000803e3d6000fd5b5050601254604080516340c10f1960e01b81526001600160a01b0392831660048201526024810189905290517f000000000000000000000000000000000000000000000000000000000000000090921693506340c10f19925060448082019260009290919082900301818387803b158015610f8557600080fd5b505af1158015610f99573d6000803e3d6000fd5b50506001600055505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60165490565b6006546001600160a01b0316331461101c576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b600680546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f4ffd725fc4a22075e9ec71c59edf9c38cdeb588a91b24fc5b61388c5be41282b9181900360200190a150565b6000806016858154811061108057fe5b60009182526020909120600360059092020101546001600160a01b031690503381146110db576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b6110e78585338661453f565b60019150505b9392505050565b6016818154811061110157fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b03938416955091831693908316929081169190811690600160a01b900460ff1686565b601460205260009081526040902080546001909101546001600160a01b0391821691811690600160a01b900460ff1683565b6009546001600160a01b031681565b60055481565b6006546001600160a01b031633146111e0576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b6015805460ff1916600117905560005b60165481101561130b5760006016828154811061120957fe5b906000526020600020906005020190508060040160149054906101000a900460ff16156112365750611303565b80546002820154604080516301395c5960e31b81526001600160a01b0393841660048201819052928416602482018190529151929391927f0000000000000000000000000000000000000000000000000000000000000000909216916309cae2c8916044808201926020929091908290030181600087803b1580156112ba57600080fd5b505af19250505080156112df57506040513d60208110156112da57600080fd5b505160015b6112e8576112ff565b5060048301805460ff60a01b1916600160a01b1790555b5050505b6001016111f0565b50565b6011546001600160a01b031681565b60045481565b600d546001600160a01b0316331461136a576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b6040805160248082018490526001600160a01b03808616604480850191909152845180850382018152606494850186526020810180516001600160e01b03166317b0dca160e31b1781529551635b0e93fb60e11b81528984166004820190815260009582018690526060938201938452825196820196909652815191967f00000000000000000000000000000000000000000000000000000000000000009094169563b61d27f6958b95909489949293909260849091019190808383895b83811015611440578181015183820152602001611428565b50505050905090810190601f16801561146d5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561148e57600080fd5b505af11580156114a2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160409081528110156114cb57600080fd5b815160208301805160405192949293830192919084600160201b8211156114f157600080fd5b90830190602082018581111561150657600080fd5b8251600160201b81118282018810171561151f57600080fd5b82525081516020918201929091019080838360005b8381101561154c578181015183820152602001611534565b50505050905090810190601f1680156115795780820380516001836020036101000a031916815260200191505b50604052505050505050505050565b60136020526000908152604090205481565b600e546001600160a01b031681565b6000600260005414156115f1576040805162461bcd60e51b815260206004820152601f602482015260008051602061547c833981519152604482015290519081900360640190fd5b600260005560155460ff1615611639576040805162461bcd60e51b815260206004820152600860248201526739b43aba3237bbb760c11b604482015290519081900360640190fd5b60006016858154811061164857fe5b600091825260209091206005909102016004810154909150600160a01b900460ff16156116ad576040805162461bcd60e51b815260206004820152600e60248201526d1c1bdbdb081a5cc818db1bdcd95960921b604482015290519081900360640190fd5b80546001600160a01b03166116e481337f0000000000000000000000000000000000000000000000000000000000000000886144df565b60028201546001600160a01b031680611735576040805162461bcd60e51b815260206004820152600e60248201526d2167617567652073657474696e6760901b604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f9609f0883836040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050602060405180830381600087803b1580156117b557600080fd5b505af11580156117c9573d6000803e3d6000fd5b505050506040513d60208110156117df57600080fd5b505060048301546001600160a01b0316801561185d57806001600160a01b031663b87bd4816040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561183057600080fd5b505af1158015611844573d6000803e3d6000fd5b505050506040513d602081101561185a57600080fd5b50505b60018401546001600160a01b0316861561197657604080516340c10f1960e01b8152306004820152602481018a905290516001600160a01b038316916340c10f1991604480830192600092919082900301818387803b1580156118bf57600080fd5b505af11580156118d3573d6000803e3d6000fd5b50505060038601546001600160a01b0390811691506118f69083168260006147f6565b61190a6001600160a01b038316828b6147f6565b604080516305dc812160e31b8152336004820152602481018b905290516001600160a01b03831691632ee4090891604480830192600092919082900301818387803b15801561195857600080fd5b505af115801561196c573d6000803e3d6000fd5b50505050506119dd565b604080516340c10f1960e01b8152336004820152602481018a905290516001600160a01b038316916340c10f1991604480830192600092919082900301818387803b1580156119c457600080fd5b505af11580156119d8573d6000803e3d6000fd5b505050505b6040805189815290518a9133917f73a19dd210f1a7f902193214c0ee91dd35ee5b4d920cba8d519eca65a7b488ca9181900360200190a360019550505050505060016000559392505050565b6000611a378383333361453f565b5060015b92915050565b6006546001600160a01b03163314611a88576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b600780546001600160a01b0383166001600160a01b0319909116811790915560408051918252517fe45f5e140399b0a7e12971ab020724b828fbed8ac408c420884dc7d1bbe506b49181900360200190a150565b60025481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060168481548110611b1657fe5b60009182526020808320600590920290910154604080516370a0823160e01b815233600482015290516001600160a01b03909216945084926370a0823192602480840193829003018186803b158015611b6e57600080fd5b505afa158015611b82573d6000803e3d6000fd5b505050506040513d6020811015611b9857600080fd5b50519050611ba78582866115a9565b50600195945050505050565b600060026000541415611bfb576040805162461bcd60e51b815260206004820152601f602482015260008051602061547c833981519152604482015290519081900360640190fd5b60026000556008546001600160a01b03163314611c47576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b600060168381548110611c5657fe5b60009182526020808320600590920290910180546002820154604080516301395c5960e31b81526001600160a01b0393841660048201529183166024830152519295507f000000000000000000000000000000000000000000000000000000000000000091909116936309cae2c89360448084019491939192918390030190829087803b158015611ce657600080fd5b505af1925050508015611d0b57506040513d6020811015611d0657600080fd5b505160015b611d1457611d16565b505b60048101805460ff60a01b1916600160a01b17905560028101546001600160a01b0316600090815260176020908152604091829020805460ff19169055815185815291517f2ccd633716c6ce12394d1c984ad04b6173d18aedc4f505d1537a94a98a07b6e79281900390910190a160019150506001600055919050565b600f546001600160a01b031681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060168481548110611ddc57fe5b60009182526020909120600460059092020101546001600160a01b03169050338114611e37576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ef5cfb8c846040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050602060405180830381600087803b158015611ea657600080fd5b505af1158015611eba573d6000803e3d6000fd5b505050506040513d6020811015611ba757600080fd5b60016020526000908152604090205460ff1681565b60026000541415611f2b576040805162461bcd60e51b815260206004820152601f602482015260008051602061547c833981519152604482015290519081900360640190fd5b60026000556007546001600160a01b03163314611f77576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b6000611f8f82611f8985818989614368565b90614368565b9050610fa0811115611fd3576040805162461bcd60e51b81526020600482015260086024820152673e4d61784665657360c01b604482015290519081900360640190fd5b61012c8510158015611fe75750610dac8511155b612024576040805162461bcd60e51b8152602060048201526009602482015268216c6f636b4665657360b81b604482015290519081900360640190fd5b61012c841015801561203857506105dc8411155b612077576040805162461bcd60e51b815260206004820152600b60248201526a217374616b65724665657360a81b604482015290519081900360640190fd5b600a8310158015612089575060648311155b6120c8576040805162461bcd60e51b815260206004820152600b60248201526a2163616c6c65724665657360a81b604482015290519081900360640190fd5b6103e882111561210b576040805162461bcd60e51b815260206004820152600960248201526821706c6174666f726d60b81b604482015290519081900360640190fd5b600285905560038490556004839055600582905560408051868152602081018690528082018590526060810184905290517f16e6f67290546b8dd0e587f4b7f67d4f61932ae17ffd8c60d3509dbc05c175fe9181900360800190a150506001600055505050565b6000806016858154811061218257fe5b60009182526020909120600360059092020101546001600160a01b03169050338114806121b957506011546001600160a01b031633145b6121f2576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b336000908152601860205260408120546122159061271090610cb09087906143c2565b90508015611ba7577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340c10f1986836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561229457600080fd5b505af11580156122a8573d6000803e3d6000fd5b5050505050600195945050505050565b600260005414156122fe576040805162461bcd60e51b815260206004820152601f602482015260008051602061547c833981519152604482015290519081900360640190fd5b60026000556006546001600160a01b0316331461234a576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b60155460ff161561238d576040805162461bcd60e51b815260206004820152600860248201526739b43aba3237bbb760c11b604482015290519081900360640190fd5b6011546001600160a01b0316158015906123b157506009546001600160a01b031615155b6123f1576040805162461bcd60e51b815260206004820152600c60248201526b085a5b9a5d1a585b1a5cd95960a21b604482015290519081900360640190fd5b6001600160a01b0382161580159061241157506001600160a01b03811615155b61244f576040805162461bcd60e51b815260206004820152600a6024820152692161646472657373657360b01b604482015290519081900360640190fd5b6000816001600160a01b031663acbc1428846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561249e57600080fd5b505afa1580156124b2573d6000803e3d6000fd5b505050506040513d60208110156124c857600080fd5b505111612506576040805162461bcd60e51b81526020600482015260076024820152662164697374726f60c81b604482015290519081900360640190fd5b6001600160a01b03828116600090815260146020526040902054166128ab576001600160a01b03821660009081526017602052604090205460ff161561257c576040805162461bcd60e51b815260206004820152600660248201526510ba37b5b2b760d11b604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561269f5760408051606080820183526001600160a01b03808516808452601180548316602080870191825260018789018181527f000000000000000000000000000000000000000000000000000000000000000087166000818152601485528b902099518a549089166001600160a01b0319918216178b55945199909201805491511515600160a01b0260ff60a01b199a89169290951691909117989098169290921790965590548651928352909216938101939093528284015291517f125af409731fa78089d37e0f7f166b726398745c97b932f061cf486d6ee4fcc8929181900390910190a16128a6565b6011546040805163355688fd60e21b81529051600a926001600160a01b03169163d55a23f4916004808301926020929190829003018186803b1580156126e457600080fd5b505afa1580156126f8573d6000803e3d6000fd5b505050506040513d602081101561270e57600080fd5b505110612755576040805162461bcd60e51b815260206004820152601060248201526f746f6f206d616e79207265776172647360801b604482015290519081900360640190fd5b60095460115460408051637c6b091760e11b81526001600160a01b03868116600483015292831660248201523060448201529051600093929092169163f8d6122e9160648082019260209290919082900301818787803b1580156127b857600080fd5b505af11580156127cc573d6000803e3d6000fd5b505050506040513d60208110156127e257600080fd5b505160408051606080820183526001600160a01b03808716808452818616602085810182815260018789018181528d87166000818152601486528b902099518a549089166001600160a01b0319918216178b55935199909201805491511515600160a01b0260ff60a01b199a909816919093161797909716949094179093558551918252918101919091528084019290925291519293507f125af409731fa78089d37e0f7f166b726398745c97b932f061cf486d6ee4fcc8929081900390910190a1505b61291b565b6001600160a01b03808316600081815260146020908152604080832080549587166001600160a01b03199096168617905580519485529084019190915282810191909152517f125af409731fa78089d37e0f7f166b726398745c97b932f061cf486d6ee4fcc89181900360600190a15b50506001600055565b610fa081565b6006546001600160a01b03163314612971576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b600d80546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f49f087c09fe6698eda82449a671bd8d38e44bed601118018a7cc7f1e0c808df49181900360200190a150565b6008546001600160a01b03163314612a0c576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b600880546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f70a64736553c84939f57deec269299882abbbee8dc4f316eccbc6fce57e4d3cf9181900360200190a150565b6006546001600160a01b03163314612aa7576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b600a80546001600160a01b0319166001600160a01b038481169190911790915560095416612b4257600980546001600160a01b038086166001600160a01b03199283168117909355600b805485831693168317905560408051938452908516602084015282810191909152517f013ea07699fbd5315b997a706906fb94a81c616771f1052b406707d7bfc6aa279181900360600190a1612b8b565b6040805160008082526001600160a01b03851660208301528183015290517f013ea07699fbd5315b997a706906fb94a81c616771f1052b406707d7bfc6aa279181900360600190a15b505050565b6008546000906001600160a01b031633148015612bb0575060155460ff16155b612bea576040805162461bcd60e51b815260206004808301919091526024820152630858591960e21b604482015290519081900360640190fd5b6001600160a01b03831615801590612c0a57506001600160a01b03841615155b612c44576040805162461bcd60e51b815260206004820152600660248201526521706172616d60d01b604482015290519081900360640190fd5b6001600160a01b038381166000908152601460205260409020541615612c9a576040805162461bcd60e51b815260206004820152600660248201526521676175676560d01b604482015290519081900360640190fd5b601654600b5460408051630452a26760e21b81526001600160a01b0388811660048301529151600093929092169163114a899c9160248082019260209290919082900301818787803b158015612cef57600080fd5b505af1158015612d03573d6000803e3d6000fd5b505050506040513d6020811015612d1957600080fd5b505160095460408051632f7260f160e01b8152600481018690526001600160a01b0380851660248301528a8116604483015291519394506000939190921691632f7260f191606480830192602092919082900301818787803b158015612d7e57600080fd5b505af1158015612d92573d6000803e3d6000fd5b505050506040513d6020811015612da857600080fd5b5051600a5460408051634ce5896f60e11b8152600481018790526001600160a01b038a811660248301527f000000000000000000000000000000000000000000000000000000000000000081166044830152606482018a9052915193945060009391909216916399cb12de91608480830192602092919082900301818787803b158015612e3457600080fd5b505af1158015612e48573d6000803e3d6000fd5b505050506040513d6020811015612e5e57600080fd5b50516040805160c0810182526001600160a01b03808c16825286811660208381019182528c83168486018181528985166060870190815285891660808801818152600060a08a0181815260168054600181810183559184529b516005909c027fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b5124289810180549d8d166001600160a01b03199e8f1617905599517fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b512428a8b018054918d16918e1691909117905595517fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b512428b8a018054918c16918d1691909117905593517fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b512428c89018054918b16918c1691909117905590517fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b512428d909701805493511515600160a01b0260ff60a01b199890991693909916929092179590951695909517909555835260179052929020805460ff191690911790559091501561313757806016858154811061300657fe5b600091825260208083206004600590930201820180546001600160a01b039586166001600160a01b031990911617905560408051637d1cb25960e11b81528686169381019390935260016024840152517f00000000000000000000000000000000000000000000000000000000000000009094169363fa3964b2936044808501948390030190829087803b15801561309d57600080fd5b505af11580156130b1573d6000803e3d6000fd5b505050506040513d60208110156130c757600080fd5b50506009546040805163b84614a560e01b81526001600160a01b038481166004830152600160248301529151919092169163b84614a591604480830192600092919082900301818387803b15801561311e57600080fd5b505af1158015613132573d6000803e3d6000fd5b505050505b6001600160a01b03808316600081815260186020908152604091829020612710905581518c851681528b851691810191909152868416818301526060810192909252918316608082015260a0810186905290517fca1a6de26e4422518df9ab614eefa07fac43e4f4c7d704dbf82e903e582659ca9181900360c00190a1506001979650505050505050565b6006546001600160a01b03163314613209576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b6001600160a01b0382811660009081526014602052604090205416613269576040805162461bcd60e51b815260206004820152601160248201527011995948191bd95cdb89dd08195e1a5cdd607a1b604482015290519081900360640190fd5b6001600160a01b038216600081815260146020908152604091829020600101805460ff60a01b1916600160a01b8615159081029190911790915582519384529083015280517ff1d91b931944e49fd30c1dc6fd08ad8bb25ef1fe12c369b10a4675c4bf3974409281900390910190a15050565b6007546001600160a01b03163314613323576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b614e20811115613365576040805162461bcd60e51b81526020600482015260086024820152670e8dede40d0d2ced60c31b604482015290519081900360640190fd5b6001600160a01b03909116600090815260186020526040902055565b6006546001600160a01b031681565b600080601683815481106133a057fe5b60009182526020909120600460059092020101546001600160a01b031690503381146133fb576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b60006016848154811061340a57fe5b6000918252602080832060026005909302019190910154604080516001600160a01b038781166024808401919091528351808403820181526044938401855295860180516001600160e01b0316635efcc08b60e11b1781529351635b0e93fb60e11b815294821660048601818152918601889052606093860193845286516064870152865190985095967f00000000000000000000000000000000000000000000000000000000000000009092169563b61d27f6958995939489949092608490920191808383895b838110156134ea5781810151838201526020016134d2565b50505050905090810190601f1680156135175780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561353857600080fd5b505af115801561354c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561357557600080fd5b815160208301805160405192949293830192919084600160201b82111561359b57600080fd5b9083019060208201858111156135b057600080fd5b8251600160201b8111828201881017156135c957600080fd5b82525081516020918201929091019080838360005b838110156135f65781810151838201526020016135de565b50505050905090810190601f1680156136235780820380516001836020036101000a031916815260200191505b506040525060019998505050505050505050565b6006546001600160a01b0316331461367e576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b6011546001600160a01b031661370d57601180546001600160a01b038085166001600160a01b03199283168117938490556010805486841694168417905592166000908152601860209081526040918290206127109055815193845283019190915280517f601d75fd094819eb2644514a732ecc4ff7953787e92258e47c118aa83b0311159281900390910190a15b5050565b6000806016838154811061372157fe5b6000918252602080832060016005909302019190910154604080516370a0823160e01b815233600482015290516001600160a01b03909216945084926370a0823192602480840193829003018186803b15801561377d57600080fd5b505afa158015613791573d6000803e3d6000fd5b505050506040513d60208110156137a757600080fd5b505190506137b58482611a29565b506001949350505050565b600d546001600160a01b031681565b600060026000541415613817576040805162461bcd60e51b815260206004820152601f602482015260008051602061547c833981519152604482015290519081900360640190fd5b600260005560155460ff161561385f576040805162461bcd60e51b815260206004820152600860248201526739b43aba3237bbb760c11b604482015290519081900360640190fd5b61386761545b565b506001600160a01b03828116600090815260146020908152604091829020825160608101845281548516815260019091015493841691810191909152600160a01b90920460ff1615159082018190526138f9576040805162461bcd60e51b815260206004820152600f60248201526e496e6163746976652064697374726f60881b604482015290519081900360640190fd5b6001600160a01b03831660009081526017602052604090205460ff1615613957576040805162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b604482015290519081900360640190fd5b6000836001600160a01b03166370a082317f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156139c657600080fd5b505afa1580156139da573d6000803e3d6000fd5b505050506040513d60208110156139f057600080fd5b5051604080516370a0823160e01b815230600482015290519192506000916001600160a01b038716916370a08231916024808301926020929190829003018186803b158015613a3e57600080fd5b505afa158015613a52573d6000803e3d6000fd5b505050506040513d6020811015613a6857600080fd5b505190506000613a788284614368565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632dbfa7358560000151886040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050602060405180830381600087803b158015613afe57600080fd5b505af1158015613b12573d6000803e3d6000fd5b505050506040513d6020811015613b2857600080fd5b5050604080516370a0823160e01b815230600482015290516000916001600160a01b038916916370a0823191602480820192602092909190829003018186803b158015613b7457600080fd5b505afa158015613b88573d6000803e3d6000fd5b505050506040513d6020811015613b9e57600080fd5b505190506000613bae8284614482565b6020870151909150613bcb906001600160a01b038a169083614909565b85602001516001600160a01b031663590a41f5826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015613c1557600080fd5b505af1158015613c29573d6000803e3d6000fd5b50505050600196505050505050506001600055919050565b600e546001600160a01b03163314613c88576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b6001600160a01b038216600081815260016020908152604091829020805460ff191685151590811790915582519384529083015280517fe8d05184577f145210e477ef591d0d8f4537aaa67837c6776fbe5d8db0791d7e9281900390910190a15050565b6006546001600160a01b03163314613d33576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b600c80546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f961c543f04f95b46a6d6af9e463eb4f186ceea8ca52f869ec568c0197080401b9181900360200190a150565b6006546001600160a01b03163314613dce576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b600e80546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f2c019ef49bda9c94cf03b1b57034fc6b92eae3ef71d47a910661a70312f471ac9181900360200190a150565b60155460ff1681565b600d546000906001600160a01b03163314613e75576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b60005b84811015611ba7577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635d7e9bcb878784818110613ebb57fe5b905060200201356001600160a01b0316868685818110613ed757fe5b905060200201356040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015613f2457600080fd5b505af1158015613f38573d6000803e3d6000fd5b505050506040513d6020811015613f4e57600080fd5b5050600101613e78565b60176020526000908152604090205460ff1681565b600060026000541415613fb5576040805162461bcd60e51b815260206004820152601f602482015260008051602061547c833981519152604482015290519081900360640190fd5b600260005560155460ff1615613ffd576040805162461bcd60e51b815260206004820152600860248201526739b43aba3237bbb760c11b604482015290519081900360640190fd5b6140068261495b565b50600180600055919050565b6012546001600160a01b031681565b6010546001600160a01b031681565b6007546001600160a01b031681565b61271081565b6008546001600160a01b031681565b60186020526000908152604090205481565b6007546001600160a01b031633146140ad576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b601280546001600160a01b0319166001600160a01b0392909216919091179055565b600d546000906001600160a01b03163314614119576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b6001600160a01b03831660009081526001602052604090205460ff16614172576040805162461bcd60e51b815260206004820152600960248201526810bb37ba32a0b2323960b91b604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e2cdd42a8585856040518463ffffffff1660e01b815260040180848152602001836001600160a01b0316815260200182151581526020019350505050602060405180830381600087803b158015611ea657600080fd5b600b546001600160a01b031681565b6007546001600160a01b03163314614249576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b600f80546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f7dae230f18360d76a040c81f050aa14eb9d6dc7901b20fc5d855e2a20fe814d19181900360200190a150565b600d546000906001600160a01b031633146142e7576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b604080516307ef625d60e21b81526004810184905260006024820181905291516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692631fbd8974926044808201939182900301818387803b15801561435457600080fd5b505af1158015611ba7573d6000803e3d6000fd5b6000828201838110156110ed576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000826143d157506000611a3b565b828202828482816143de57fe5b04146110ed5760405162461bcd60e51b81526004018080602001828103825260218152602001806154c26021913960400191505060405180910390fd5b6000808211614471576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161447a57fe5b049392505050565b6000828211156144d9576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261453990859061518d565b50505050565b60026000541415614585576040805162461bcd60e51b815260206004820152601f602482015260008051602061547c833981519152604482015290519081900360640190fd5b60026000908155601680548690811061459a57fe5b60009182526020822060059091020180546002820154600183015460408051632770a7eb60e21b81526001600160a01b038a81166004830152602482018c9052915195975093811695928116949116928392639dc29fac9260448084019382900301818387803b15801561460d57600080fd5b505af1158015614621573d6000803e3d6000fd5b505050506004840154600160a01b900460ff166146ed577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d9caed1284848a6040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050602060405180830381600087803b1580156146c057600080fd5b505af11580156146d4573d6000803e3d6000fd5b505050506040513d60208110156146ea57600080fd5b50505b60048401546001600160a01b0316801580159061470d575060155460ff16155b801561472557506004850154600160a01b900460ff16155b1561479257806001600160a01b031663b87bd4816040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561476557600080fd5b505af1158015614779573d6000803e3d6000fd5b505050506040513d602081101561478f57600080fd5b50505b6147a66001600160a01b038516878a614909565b6040805189815290518a916001600160a01b038916917f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc69181900360200190a35050600160005550505050505050565b80158061487c575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561484e57600080fd5b505afa158015614862573d6000803e3d6000fd5b505050506040513d602081101561487857600080fd5b5051155b6148b75760405162461bcd60e51b815260040180806020018281038252603681526020018061550d6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052612b8b90849061518d565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052612b8b90849061518d565b60006016828154811061496a57fe5b600091825260209091206005909102016004810154909150600160a01b900460ff16156149cf576040805162461bcd60e51b815260206004820152600e60248201526d1c1bdbdb081a5cc818db1bdcd95960921b604482015290519081900360640190fd5b6002810154604080516370a0823160e01b815230600482015290516001600160a01b03928316926000927f0000000000000000000000000000000000000000000000000000000000000000909116916370a0823191602480820192602092909190829003018186803b158015614a4457600080fd5b505afa158015614a58573d6000803e3d6000fd5b505050506040513d6020811015614a6e57600080fd5b5051604080516370a0823160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015291519293506000927f0000000000000000000000000000000000000000000000000000000000000000909216916370a0823191602480820192602092909190829003018186803b158015614b0157600080fd5b505afa158015614b15573d6000803e3d6000fd5b505050506040513d6020811015614b2b57600080fd5b505190506000614b3b8383614368565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633fe9bc06856040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050602060405180830381600087803b158015614bac57600080fd5b505af1158015614bc0573d6000803e3d6000fd5b505050506040513d6020811015614bd657600080fd5b5050604080516370a0823160e01b815230600482015290516000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a0823191602480820192602092909190829003018186803b158015614c4257600080fd5b505afa158015614c56573d6000803e3d6000fd5b505050506040513d6020811015614c6c57600080fd5b505190506000614c7c8284614482565b9050600083118015614c985750600f546001600160a01b031615155b15614d4157600f546040805163a9059cbb60e01b81526001600160a01b0392831660048201526024810186905290517f00000000000000000000000000000000000000000000000000000000000000009092169163a9059cbb916044808201926020929091908290030181600087803b158015614d1457600080fd5b505af1158015614d28573d6000803e3d6000fd5b505050506040513d6020811015614d3e57600080fd5b50505b60048701546001600160a01b03168015614e2b57806001600160a01b031663372500ab6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015614d9057600080fd5b505af1158015614da4573d6000803e3d6000fd5b505050506040513d6020811015614dba57600080fd5b50506040805163654580bb60e11b815290516001600160a01b0383169163ca8b01769160048083019260209291908290030181600087803b158015614dfe57600080fd5b505af1158015614e12573d6000803e3d6000fd5b505050506040513d6020811015614e2857600080fd5b50505b8115615182576000614e4e612710610cb0600254866143c290919063ffffffff16565b90506000614e6d612710610cb0600354876143c290919063ffffffff16565b90506000614e8c612710610cb0600454886143c290919063ffffffff16565b600f549091506001600160a01b031615801590614eb45750600f546001600160a01b03163014155b8015614ec257506000600554115b15614f2f576000614ee4612710610cb0600554896143c290919063ffffffff16565b9050614ef08682614482565b600f54909650614f2d906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683614909565b505b614f4582614f3f83818988614482565b90614482565b9450614f7b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383614909565b60038b01546001600160a01b0390811690614fb9907f0000000000000000000000000000000000000000000000000000000000000000168288614909565b806001600160a01b031663590a41f5876040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015614fff57600080fd5b505af1158015615013573d6000803e3d6000fd5b505060115461505192506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811692501686614909565b6011546040805163590a41f560e01b81526004810187905290516001600160a01b039092169163590a41f59160248082019260009290919082900301818387803b15801561509e57600080fd5b505af11580156150b2573d6000803e3d6000fd5b50506010546150f092506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811692501685614909565b601054604080516304d0c2c560e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015260248201879052915191909216916304d0c2c591604480830192600092919082900301818387803b15801561516557600080fd5b505af1158015615179573d6000803e3d6000fd5b50505050505050505b505050505050505050565b60606151e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661523e9092919063ffffffff16565b805190915015612b8b5780806020019051602081101561520157600080fd5b5051612b8b5760405162461bcd60e51b815260040180806020018281038252602a8152602001806154e3602a913960400191505060405180910390fd5b606061524d8484600085615255565b949350505050565b6060824710156152965760405162461bcd60e51b815260040180806020018281038252602681526020018061549c6026913960400191505060405180910390fd5b61529f856153b1565b6152f0576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061532f5780518252601f199092019160209182019101615310565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114615391576040519150601f19603f3d011682016040523d82523d6000602084013e615396565b606091505b50915091506153a68282866153b7565b979650505050505050565b3b151590565b606083156153c65750816110ed565b8251156153d65782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615420578181015183820152602001615408565b50505050905090810190601f16801561544d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b60408051606081018252600080825260208201819052918101919091529056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c00416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212207bf52d96a1890fa0bd7afb97949a253fec76b81f6e6815414b4b607ec6988de364736f6c634300060c003300000000000000000000000037aeb332d6e57112f1bfe36923a7ee670ee9278b000000000000000000000000d82fd4d6d62f89a1e50b1db69ad19932314aa408000000000000000000000000627fee87d0d9d2c55098a06ac805db8f98b158aa
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103d05760003560e01c80637303df9a116101ff578063bf86d6901161011a578063dc4c90d3116100ad578063e31c0bf61161007c578063e31c0bf614610af8578063e77772fe14610b88578063f0f4426014610b90578063f85008a214610bb6576103d0565b8063dc4c90d314610b00578063dee5522714610b08578063e032520814610b2e578063e2cdd42a14610b54576103d0565b8063ce726e63116100e9578063ce726e6314610ae0578063cfb9cfba14610ae8578063d0fb020314610af0578063d73792a914610af8576103d0565b8063bf86d690146109d7578063bfad96ba146109df578063cb0d5b5214610a9d578063cc956f3f14610ac3576103d0565b80639123d40411610192578063a0e0c54d11610161578063a0e0c54d14610937578063ab5f19b01461095d578063b0eefabe1461098b578063b67b6df3146109b1576103d0565b80639123d404146108c757806395539a1d146108e4578063958e2d31146109125780639f00332b1461092f576103d0565b80637e29d6c2116101ce5780637e29d6c21461082f5780637e8df27a1461086557806389e77896146108935780638da5cb5b146108bf576103d0565b80637303df9a146107a357806374874323146107ab5780637aef6715146107d15780637bd3b995146107f7576103d0565b806342c1e587116102ef57806361d027b3116102825780636c7f72c4116102515780636c7f72c4146106ee5780636fcba3771461071457806371192b1714610743578063728706ed14610775576103d0565b806361d027b3146106aa57806362d28ac7146106b25780636a4874a1146106ba5780636c7b69cb146106c2576103d0565b806350940618116102be57806350940618146106585780635ebaf1db1461066057806360759fce1461066857806360cafe841461068d576103d0565b806342c1e587146105dc57806343a0d066146105e4578063441a3e701461060f578063472d35b914610632576103d0565b806316605a0d11610367578063376d771a11610336578063376d771a146105795780633a088cd2146105815780633b788da9146105895780633c781cbd146105bf576103d0565b806316605a0d1461050f578063245e4bf01461056157806326232a2e14610569578063354af91914610571576103d0565b8063081e3eda116103a3578063081e3eda1461042857806313af40351461044257806314cd70e4146104685780631526fe27146104ae576103d0565b8063043b684a146103d5578063068eb19e146103f957806306caad9f146104015780630754617214610420575b600080fd5b6103dd610bd3565b604080516001600160a01b039092168252519081900360200190f35b6103dd610be2565b61041e6004803603602081101561041757600080fd5b5035610bf1565b005b6103dd610fab565b610430610fcf565b60408051918252519081900360200190f35b61041e6004803603602081101561045857600080fd5b50356001600160a01b0316610fd5565b61049a6004803603606081101561047e57600080fd5b50803590602081013590604001356001600160a01b0316611070565b604080519115158252519081900360200190f35b6104cb600480360360208110156104c457600080fd5b50356110f4565b604080516001600160a01b0397881681529587166020870152938616858501529185166060850152909316608083015291151560a082015290519081900360c00190f35b6105356004803603602081101561052557600080fd5b50356001600160a01b0316611152565b604080516001600160a01b03948516815292909316602083015215158183015290519081900360600190f35b6103dd611184565b610430611193565b61041e611199565b6103dd61130e565b61043061131d565b61041e6004803603606081101561059f57600080fd5b506001600160a01b03813581169160208101359091169060400135611323565b610430600480360360208110156105d557600080fd5b5035611588565b6103dd61159a565b61049a600480360360608110156105fa57600080fd5b508035906020810135906040013515156115a9565b61049a6004803603604081101561062557600080fd5b5080359060200135611a29565b61041e6004803603602081101561064857600080fd5b50356001600160a01b0316611a41565b610430611adc565b6103dd611ae2565b61049a6004803603604081101561067e57600080fd5b50803590602001351515611b06565b61049a600480360360208110156106a357600080fd5b5035611bb3565b6103dd611d93565b610430611da2565b6103dd611da8565b61049a600480360360408110156106d857600080fd5b50803590602001356001600160a01b0316611dcc565b61049a6004803603602081101561070457600080fd5b50356001600160a01b0316611ed0565b61041e6004803603608081101561072a57600080fd5b5080359060208101359060408101359060600135611ee5565b61049a6004803603606081101561075957600080fd5b508035906001600160a01b036020820135169060400135612172565b61041e6004803603604081101561078b57600080fd5b506001600160a01b03813581169160200135166122b8565b610430612924565b61041e600480360360208110156107c157600080fd5b50356001600160a01b031661292a565b61041e600480360360208110156107e757600080fd5b50356001600160a01b03166129c5565b61041e6004803603606081101561080d57600080fd5b506001600160a01b038135811691602081013582169160409091013516612a60565b61049a6004803603606081101561084557600080fd5b506001600160a01b03813581169160208101359091169060400135612b90565b61041e6004803603604081101561087b57600080fd5b506001600160a01b03813516906020013515156131c2565b61041e600480360360408110156108a957600080fd5b506001600160a01b0381351690602001356132dc565b6103dd613381565b61049a600480360360208110156108dd57600080fd5b5035613390565b61041e600480360360408110156108fa57600080fd5b506001600160a01b0381358116916020013516613637565b61049a6004803603602081101561092857600080fd5b5035613711565b6103dd6137c0565b61049a6004803603602081101561094d57600080fd5b50356001600160a01b03166137cf565b61041e6004803603604081101561097357600080fd5b506001600160a01b0381351690602001351515613c41565b61041e600480360360208110156109a157600080fd5b50356001600160a01b0316613cec565b61041e600480360360208110156109c757600080fd5b50356001600160a01b0316613d87565b61049a613e22565b61049a600480360360408110156109f557600080fd5b810190602081018135600160201b811115610a0f57600080fd5b820183602082011115610a2157600080fd5b803590602001918460208302840111600160201b83111715610a4257600080fd5b919390929091602081019035600160201b811115610a5f57600080fd5b820183602082011115610a7157600080fd5b803590602001918460208302840111600160201b83111715610a9257600080fd5b509092509050613e2b565b61049a60048036036020811015610ab357600080fd5b50356001600160a01b0316613f58565b61049a60048036036020811015610ad957600080fd5b5035613f6d565b6103dd614012565b6103dd614021565b6103dd614030565b61043061403f565b6103dd614045565b61043060048036036020811015610b1e57600080fd5b50356001600160a01b0316614054565b61041e60048036036020811015610b4457600080fd5b50356001600160a01b0316614066565b61049a60048036036060811015610b6a57600080fd5b508035906001600160a01b03602082013516906040013515156140cf565b6103dd6141f3565b61041e60048036036020811015610ba657600080fd5b50356001600160a01b0316614202565b61049a60048036036020811015610bcc57600080fd5b503561429d565b600c546001600160a01b031681565b600a546001600160a01b031681565b60026000541415610c37576040805162461bcd60e51b815260206004820152601f602482015260008051602061547c833981519152604482015290519081900360640190fd5b60026000556012546001600160a01b03163314610c83576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b6000610c9c60035460025461436890919063ffffffff16565b90506000610cb682610cb0856127106143c2565b9061441b565b90506000610cc48285614482565b90506000610cf2427f0000000000000000000000000000000000000000000000000000000000093a8061441b565b600081815260136020526040902054909150610d0e9084614368565b6000828152601360205260409020819055690ed2b525841adfc000001015610d70576040805162461bcd60e51b815260206004820152601060248201526f546f6f206d616e79204c32204665657360801b604482015290519081900360640190fd5b6000610d8b85610cb0600254896143c290919063ffffffff16565b90506000610d998783614482565b601254601154919250610ddc916001600160a01b037f000000000000000000000000627fee87d0d9d2c55098a06ac805db8f98b158aa81169281169116856144df565b6011546040805163590a41f560e01b81526004810185905290516001600160a01b039092169163590a41f59160248082019260009290919082900301818387803b158015610e2957600080fd5b505af1158015610e3d573d6000803e3d6000fd5b5050601254601054610e8293506001600160a01b037f000000000000000000000000627fee87d0d9d2c55098a06ac805db8f98b158aa811693509182169116846144df565b601054604080516304d0c2c560e01b81526001600160a01b037f000000000000000000000000627fee87d0d9d2c55098a06ac805db8f98b158aa8116600483015260248201859052915191909216916304d0c2c591604480830192600092919082900301818387803b158015610ef757600080fd5b505af1158015610f0b573d6000803e3d6000fd5b5050601254604080516340c10f1960e01b81526001600160a01b0392831660048201526024810189905290517f000000000000000000000000d82fd4d6d62f89a1e50b1db69ad19932314aa40890921693506340c10f19925060448082019260009290919082900301818387803b158015610f8557600080fd5b505af1158015610f99573d6000803e3d6000fd5b50506001600055505050505050505050565b7f000000000000000000000000d82fd4d6d62f89a1e50b1db69ad19932314aa40881565b60165490565b6006546001600160a01b0316331461101c576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b600680546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f4ffd725fc4a22075e9ec71c59edf9c38cdeb588a91b24fc5b61388c5be41282b9181900360200190a150565b6000806016858154811061108057fe5b60009182526020909120600360059092020101546001600160a01b031690503381146110db576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b6110e78585338661453f565b60019150505b9392505050565b6016818154811061110157fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b03938416955091831693908316929081169190811690600160a01b900460ff1686565b601460205260009081526040902080546001909101546001600160a01b0391821691811690600160a01b900460ff1683565b6009546001600160a01b031681565b60055481565b6006546001600160a01b031633146111e0576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b6015805460ff1916600117905560005b60165481101561130b5760006016828154811061120957fe5b906000526020600020906005020190508060040160149054906101000a900460ff16156112365750611303565b80546002820154604080516301395c5960e31b81526001600160a01b0393841660048201819052928416602482018190529151929391927f00000000000000000000000037aeb332d6e57112f1bfe36923a7ee670ee9278b909216916309cae2c8916044808201926020929091908290030181600087803b1580156112ba57600080fd5b505af19250505080156112df57506040513d60208110156112da57600080fd5b505160015b6112e8576112ff565b5060048301805460ff60a01b1916600160a01b1790555b5050505b6001016111f0565b50565b6011546001600160a01b031681565b60045481565b600d546001600160a01b0316331461136a576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b6040805160248082018490526001600160a01b03808616604480850191909152845180850382018152606494850186526020810180516001600160e01b03166317b0dca160e31b1781529551635b0e93fb60e11b81528984166004820190815260009582018690526060938201938452825196820196909652815191967f00000000000000000000000037aeb332d6e57112f1bfe36923a7ee670ee9278b9094169563b61d27f6958b95909489949293909260849091019190808383895b83811015611440578181015183820152602001611428565b50505050905090810190601f16801561146d5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561148e57600080fd5b505af11580156114a2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160409081528110156114cb57600080fd5b815160208301805160405192949293830192919084600160201b8211156114f157600080fd5b90830190602082018581111561150657600080fd5b8251600160201b81118282018810171561151f57600080fd5b82525081516020918201929091019080838360005b8381101561154c578181015183820152602001611534565b50505050905090810190601f1680156115795780820380516001836020036101000a031916815260200191505b50604052505050505050505050565b60136020526000908152604090205481565b600e546001600160a01b031681565b6000600260005414156115f1576040805162461bcd60e51b815260206004820152601f602482015260008051602061547c833981519152604482015290519081900360640190fd5b600260005560155460ff1615611639576040805162461bcd60e51b815260206004820152600860248201526739b43aba3237bbb760c11b604482015290519081900360640190fd5b60006016858154811061164857fe5b600091825260209091206005909102016004810154909150600160a01b900460ff16156116ad576040805162461bcd60e51b815260206004820152600e60248201526d1c1bdbdb081a5cc818db1bdcd95960921b604482015290519081900360640190fd5b80546001600160a01b03166116e481337f00000000000000000000000037aeb332d6e57112f1bfe36923a7ee670ee9278b886144df565b60028201546001600160a01b031680611735576040805162461bcd60e51b815260206004820152600e60248201526d2167617567652073657474696e6760901b604482015290519081900360640190fd5b7f00000000000000000000000037aeb332d6e57112f1bfe36923a7ee670ee9278b6001600160a01b031663f9609f0883836040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050602060405180830381600087803b1580156117b557600080fd5b505af11580156117c9573d6000803e3d6000fd5b505050506040513d60208110156117df57600080fd5b505060048301546001600160a01b0316801561185d57806001600160a01b031663b87bd4816040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561183057600080fd5b505af1158015611844573d6000803e3d6000fd5b505050506040513d602081101561185a57600080fd5b50505b60018401546001600160a01b0316861561197657604080516340c10f1960e01b8152306004820152602481018a905290516001600160a01b038316916340c10f1991604480830192600092919082900301818387803b1580156118bf57600080fd5b505af11580156118d3573d6000803e3d6000fd5b50505060038601546001600160a01b0390811691506118f69083168260006147f6565b61190a6001600160a01b038316828b6147f6565b604080516305dc812160e31b8152336004820152602481018b905290516001600160a01b03831691632ee4090891604480830192600092919082900301818387803b15801561195857600080fd5b505af115801561196c573d6000803e3d6000fd5b50505050506119dd565b604080516340c10f1960e01b8152336004820152602481018a905290516001600160a01b038316916340c10f1991604480830192600092919082900301818387803b1580156119c457600080fd5b505af11580156119d8573d6000803e3d6000fd5b505050505b6040805189815290518a9133917f73a19dd210f1a7f902193214c0ee91dd35ee5b4d920cba8d519eca65a7b488ca9181900360200190a360019550505050505060016000559392505050565b6000611a378383333361453f565b5060015b92915050565b6006546001600160a01b03163314611a88576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b600780546001600160a01b0383166001600160a01b0319909116811790915560408051918252517fe45f5e140399b0a7e12971ab020724b828fbed8ac408c420884dc7d1bbe506b49181900360200190a150565b60025481565b7f00000000000000000000000037aeb332d6e57112f1bfe36923a7ee670ee9278b81565b60008060168481548110611b1657fe5b60009182526020808320600590920290910154604080516370a0823160e01b815233600482015290516001600160a01b03909216945084926370a0823192602480840193829003018186803b158015611b6e57600080fd5b505afa158015611b82573d6000803e3d6000fd5b505050506040513d6020811015611b9857600080fd5b50519050611ba78582866115a9565b50600195945050505050565b600060026000541415611bfb576040805162461bcd60e51b815260206004820152601f602482015260008051602061547c833981519152604482015290519081900360640190fd5b60026000556008546001600160a01b03163314611c47576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b600060168381548110611c5657fe5b60009182526020808320600590920290910180546002820154604080516301395c5960e31b81526001600160a01b0393841660048201529183166024830152519295507f00000000000000000000000037aeb332d6e57112f1bfe36923a7ee670ee9278b91909116936309cae2c89360448084019491939192918390030190829087803b158015611ce657600080fd5b505af1925050508015611d0b57506040513d6020811015611d0657600080fd5b505160015b611d1457611d16565b505b60048101805460ff60a01b1916600160a01b17905560028101546001600160a01b0316600090815260176020908152604091829020805460ff19169055815185815291517f2ccd633716c6ce12394d1c984ad04b6173d18aedc4f505d1537a94a98a07b6e79281900390910190a160019150506001600055919050565b600f546001600160a01b031681565b60035481565b7f000000000000000000000000627fee87d0d9d2c55098a06ac805db8f98b158aa81565b60008060168481548110611ddc57fe5b60009182526020909120600460059092020101546001600160a01b03169050338114611e37576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b7f00000000000000000000000037aeb332d6e57112f1bfe36923a7ee670ee9278b6001600160a01b031663ef5cfb8c846040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050602060405180830381600087803b158015611ea657600080fd5b505af1158015611eba573d6000803e3d6000fd5b505050506040513d6020811015611ba757600080fd5b60016020526000908152604090205460ff1681565b60026000541415611f2b576040805162461bcd60e51b815260206004820152601f602482015260008051602061547c833981519152604482015290519081900360640190fd5b60026000556007546001600160a01b03163314611f77576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b6000611f8f82611f8985818989614368565b90614368565b9050610fa0811115611fd3576040805162461bcd60e51b81526020600482015260086024820152673e4d61784665657360c01b604482015290519081900360640190fd5b61012c8510158015611fe75750610dac8511155b612024576040805162461bcd60e51b8152602060048201526009602482015268216c6f636b4665657360b81b604482015290519081900360640190fd5b61012c841015801561203857506105dc8411155b612077576040805162461bcd60e51b815260206004820152600b60248201526a217374616b65724665657360a81b604482015290519081900360640190fd5b600a8310158015612089575060648311155b6120c8576040805162461bcd60e51b815260206004820152600b60248201526a2163616c6c65724665657360a81b604482015290519081900360640190fd5b6103e882111561210b576040805162461bcd60e51b815260206004820152600960248201526821706c6174666f726d60b81b604482015290519081900360640190fd5b600285905560038490556004839055600582905560408051868152602081018690528082018590526060810184905290517f16e6f67290546b8dd0e587f4b7f67d4f61932ae17ffd8c60d3509dbc05c175fe9181900360800190a150506001600055505050565b6000806016858154811061218257fe5b60009182526020909120600360059092020101546001600160a01b03169050338114806121b957506011546001600160a01b031633145b6121f2576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b336000908152601860205260408120546122159061271090610cb09087906143c2565b90508015611ba7577f000000000000000000000000d82fd4d6d62f89a1e50b1db69ad19932314aa4086001600160a01b03166340c10f1986836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561229457600080fd5b505af11580156122a8573d6000803e3d6000fd5b5050505050600195945050505050565b600260005414156122fe576040805162461bcd60e51b815260206004820152601f602482015260008051602061547c833981519152604482015290519081900360640190fd5b60026000556006546001600160a01b0316331461234a576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b60155460ff161561238d576040805162461bcd60e51b815260206004820152600860248201526739b43aba3237bbb760c11b604482015290519081900360640190fd5b6011546001600160a01b0316158015906123b157506009546001600160a01b031615155b6123f1576040805162461bcd60e51b815260206004820152600c60248201526b085a5b9a5d1a585b1a5cd95960a21b604482015290519081900360640190fd5b6001600160a01b0382161580159061241157506001600160a01b03811615155b61244f576040805162461bcd60e51b815260206004820152600a6024820152692161646472657373657360b01b604482015290519081900360640190fd5b6000816001600160a01b031663acbc1428846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561249e57600080fd5b505afa1580156124b2573d6000803e3d6000fd5b505050506040513d60208110156124c857600080fd5b505111612506576040805162461bcd60e51b81526020600482015260076024820152662164697374726f60c81b604482015290519081900360640190fd5b6001600160a01b03828116600090815260146020526040902054166128ab576001600160a01b03821660009081526017602052604090205460ff161561257c576040805162461bcd60e51b815260206004820152600660248201526510ba37b5b2b760d11b604482015290519081900360640190fd5b7f000000000000000000000000627fee87d0d9d2c55098a06ac805db8f98b158aa6001600160a01b0316826001600160a01b0316141561269f5760408051606080820183526001600160a01b03808516808452601180548316602080870191825260018789018181527f000000000000000000000000627fee87d0d9d2c55098a06ac805db8f98b158aa87166000818152601485528b902099518a549089166001600160a01b0319918216178b55945199909201805491511515600160a01b0260ff60a01b199a89169290951691909117989098169290921790965590548651928352909216938101939093528284015291517f125af409731fa78089d37e0f7f166b726398745c97b932f061cf486d6ee4fcc8929181900390910190a16128a6565b6011546040805163355688fd60e21b81529051600a926001600160a01b03169163d55a23f4916004808301926020929190829003018186803b1580156126e457600080fd5b505afa1580156126f8573d6000803e3d6000fd5b505050506040513d602081101561270e57600080fd5b505110612755576040805162461bcd60e51b815260206004820152601060248201526f746f6f206d616e79207265776172647360801b604482015290519081900360640190fd5b60095460115460408051637c6b091760e11b81526001600160a01b03868116600483015292831660248201523060448201529051600093929092169163f8d6122e9160648082019260209290919082900301818787803b1580156127b857600080fd5b505af11580156127cc573d6000803e3d6000fd5b505050506040513d60208110156127e257600080fd5b505160408051606080820183526001600160a01b03808716808452818616602085810182815260018789018181528d87166000818152601486528b902099518a549089166001600160a01b0319918216178b55935199909201805491511515600160a01b0260ff60a01b199a909816919093161797909716949094179093558551918252918101919091528084019290925291519293507f125af409731fa78089d37e0f7f166b726398745c97b932f061cf486d6ee4fcc8929081900390910190a1505b61291b565b6001600160a01b03808316600081815260146020908152604080832080549587166001600160a01b03199096168617905580519485529084019190915282810191909152517f125af409731fa78089d37e0f7f166b726398745c97b932f061cf486d6ee4fcc89181900360600190a15b50506001600055565b610fa081565b6006546001600160a01b03163314612971576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b600d80546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f49f087c09fe6698eda82449a671bd8d38e44bed601118018a7cc7f1e0c808df49181900360200190a150565b6008546001600160a01b03163314612a0c576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b600880546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f70a64736553c84939f57deec269299882abbbee8dc4f316eccbc6fce57e4d3cf9181900360200190a150565b6006546001600160a01b03163314612aa7576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b600a80546001600160a01b0319166001600160a01b038481169190911790915560095416612b4257600980546001600160a01b038086166001600160a01b03199283168117909355600b805485831693168317905560408051938452908516602084015282810191909152517f013ea07699fbd5315b997a706906fb94a81c616771f1052b406707d7bfc6aa279181900360600190a1612b8b565b6040805160008082526001600160a01b03851660208301528183015290517f013ea07699fbd5315b997a706906fb94a81c616771f1052b406707d7bfc6aa279181900360600190a15b505050565b6008546000906001600160a01b031633148015612bb0575060155460ff16155b612bea576040805162461bcd60e51b815260206004808301919091526024820152630858591960e21b604482015290519081900360640190fd5b6001600160a01b03831615801590612c0a57506001600160a01b03841615155b612c44576040805162461bcd60e51b815260206004820152600660248201526521706172616d60d01b604482015290519081900360640190fd5b6001600160a01b038381166000908152601460205260409020541615612c9a576040805162461bcd60e51b815260206004820152600660248201526521676175676560d01b604482015290519081900360640190fd5b601654600b5460408051630452a26760e21b81526001600160a01b0388811660048301529151600093929092169163114a899c9160248082019260209290919082900301818787803b158015612cef57600080fd5b505af1158015612d03573d6000803e3d6000fd5b505050506040513d6020811015612d1957600080fd5b505160095460408051632f7260f160e01b8152600481018690526001600160a01b0380851660248301528a8116604483015291519394506000939190921691632f7260f191606480830192602092919082900301818787803b158015612d7e57600080fd5b505af1158015612d92573d6000803e3d6000fd5b505050506040513d6020811015612da857600080fd5b5051600a5460408051634ce5896f60e11b8152600481018790526001600160a01b038a811660248301527f00000000000000000000000037aeb332d6e57112f1bfe36923a7ee670ee9278b81166044830152606482018a9052915193945060009391909216916399cb12de91608480830192602092919082900301818787803b158015612e3457600080fd5b505af1158015612e48573d6000803e3d6000fd5b505050506040513d6020811015612e5e57600080fd5b50516040805160c0810182526001600160a01b03808c16825286811660208381019182528c83168486018181528985166060870190815285891660808801818152600060a08a0181815260168054600181810183559184529b516005909c027fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b5124289810180549d8d166001600160a01b03199e8f1617905599517fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b512428a8b018054918d16918e1691909117905595517fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b512428b8a018054918c16918d1691909117905593517fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b512428c89018054918b16918c1691909117905590517fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b512428d909701805493511515600160a01b0260ff60a01b199890991693909916929092179590951695909517909555835260179052929020805460ff191690911790559091501561313757806016858154811061300657fe5b600091825260208083206004600590930201820180546001600160a01b039586166001600160a01b031990911617905560408051637d1cb25960e11b81528686169381019390935260016024840152517f00000000000000000000000037aeb332d6e57112f1bfe36923a7ee670ee9278b9094169363fa3964b2936044808501948390030190829087803b15801561309d57600080fd5b505af11580156130b1573d6000803e3d6000fd5b505050506040513d60208110156130c757600080fd5b50506009546040805163b84614a560e01b81526001600160a01b038481166004830152600160248301529151919092169163b84614a591604480830192600092919082900301818387803b15801561311e57600080fd5b505af1158015613132573d6000803e3d6000fd5b505050505b6001600160a01b03808316600081815260186020908152604091829020612710905581518c851681528b851691810191909152868416818301526060810192909252918316608082015260a0810186905290517fca1a6de26e4422518df9ab614eefa07fac43e4f4c7d704dbf82e903e582659ca9181900360c00190a1506001979650505050505050565b6006546001600160a01b03163314613209576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b6001600160a01b0382811660009081526014602052604090205416613269576040805162461bcd60e51b815260206004820152601160248201527011995948191bd95cdb89dd08195e1a5cdd607a1b604482015290519081900360640190fd5b6001600160a01b038216600081815260146020908152604091829020600101805460ff60a01b1916600160a01b8615159081029190911790915582519384529083015280517ff1d91b931944e49fd30c1dc6fd08ad8bb25ef1fe12c369b10a4675c4bf3974409281900390910190a15050565b6007546001600160a01b03163314613323576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b614e20811115613365576040805162461bcd60e51b81526020600482015260086024820152670e8dede40d0d2ced60c31b604482015290519081900360640190fd5b6001600160a01b03909116600090815260186020526040902055565b6006546001600160a01b031681565b600080601683815481106133a057fe5b60009182526020909120600460059092020101546001600160a01b031690503381146133fb576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b60006016848154811061340a57fe5b6000918252602080832060026005909302019190910154604080516001600160a01b038781166024808401919091528351808403820181526044938401855295860180516001600160e01b0316635efcc08b60e11b1781529351635b0e93fb60e11b815294821660048601818152918601889052606093860193845286516064870152865190985095967f00000000000000000000000037aeb332d6e57112f1bfe36923a7ee670ee9278b9092169563b61d27f6958995939489949092608490920191808383895b838110156134ea5781810151838201526020016134d2565b50505050905090810190601f1680156135175780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561353857600080fd5b505af115801561354c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561357557600080fd5b815160208301805160405192949293830192919084600160201b82111561359b57600080fd5b9083019060208201858111156135b057600080fd5b8251600160201b8111828201881017156135c957600080fd5b82525081516020918201929091019080838360005b838110156135f65781810151838201526020016135de565b50505050905090810190601f1680156136235780820380516001836020036101000a031916815260200191505b506040525060019998505050505050505050565b6006546001600160a01b0316331461367e576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b6011546001600160a01b031661370d57601180546001600160a01b038085166001600160a01b03199283168117938490556010805486841694168417905592166000908152601860209081526040918290206127109055815193845283019190915280517f601d75fd094819eb2644514a732ecc4ff7953787e92258e47c118aa83b0311159281900390910190a15b5050565b6000806016838154811061372157fe5b6000918252602080832060016005909302019190910154604080516370a0823160e01b815233600482015290516001600160a01b03909216945084926370a0823192602480840193829003018186803b15801561377d57600080fd5b505afa158015613791573d6000803e3d6000fd5b505050506040513d60208110156137a757600080fd5b505190506137b58482611a29565b506001949350505050565b600d546001600160a01b031681565b600060026000541415613817576040805162461bcd60e51b815260206004820152601f602482015260008051602061547c833981519152604482015290519081900360640190fd5b600260005560155460ff161561385f576040805162461bcd60e51b815260206004820152600860248201526739b43aba3237bbb760c11b604482015290519081900360640190fd5b61386761545b565b506001600160a01b03828116600090815260146020908152604091829020825160608101845281548516815260019091015493841691810191909152600160a01b90920460ff1615159082018190526138f9576040805162461bcd60e51b815260206004820152600f60248201526e496e6163746976652064697374726f60881b604482015290519081900360640190fd5b6001600160a01b03831660009081526017602052604090205460ff1615613957576040805162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b604482015290519081900360640190fd5b6000836001600160a01b03166370a082317f00000000000000000000000037aeb332d6e57112f1bfe36923a7ee670ee9278b6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156139c657600080fd5b505afa1580156139da573d6000803e3d6000fd5b505050506040513d60208110156139f057600080fd5b5051604080516370a0823160e01b815230600482015290519192506000916001600160a01b038716916370a08231916024808301926020929190829003018186803b158015613a3e57600080fd5b505afa158015613a52573d6000803e3d6000fd5b505050506040513d6020811015613a6857600080fd5b505190506000613a788284614368565b90507f00000000000000000000000037aeb332d6e57112f1bfe36923a7ee670ee9278b6001600160a01b0316632dbfa7358560000151886040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050602060405180830381600087803b158015613afe57600080fd5b505af1158015613b12573d6000803e3d6000fd5b505050506040513d6020811015613b2857600080fd5b5050604080516370a0823160e01b815230600482015290516000916001600160a01b038916916370a0823191602480820192602092909190829003018186803b158015613b7457600080fd5b505afa158015613b88573d6000803e3d6000fd5b505050506040513d6020811015613b9e57600080fd5b505190506000613bae8284614482565b6020870151909150613bcb906001600160a01b038a169083614909565b85602001516001600160a01b031663590a41f5826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015613c1557600080fd5b505af1158015613c29573d6000803e3d6000fd5b50505050600196505050505050506001600055919050565b600e546001600160a01b03163314613c88576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b6001600160a01b038216600081815260016020908152604091829020805460ff191685151590811790915582519384529083015280517fe8d05184577f145210e477ef591d0d8f4537aaa67837c6776fbe5d8db0791d7e9281900390910190a15050565b6006546001600160a01b03163314613d33576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b600c80546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f961c543f04f95b46a6d6af9e463eb4f186ceea8ca52f869ec568c0197080401b9181900360200190a150565b6006546001600160a01b03163314613dce576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b600e80546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f2c019ef49bda9c94cf03b1b57034fc6b92eae3ef71d47a910661a70312f471ac9181900360200190a150565b60155460ff1681565b600d546000906001600160a01b03163314613e75576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b60005b84811015611ba7577f00000000000000000000000037aeb332d6e57112f1bfe36923a7ee670ee9278b6001600160a01b0316635d7e9bcb878784818110613ebb57fe5b905060200201356001600160a01b0316868685818110613ed757fe5b905060200201356040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015613f2457600080fd5b505af1158015613f38573d6000803e3d6000fd5b505050506040513d6020811015613f4e57600080fd5b5050600101613e78565b60176020526000908152604090205460ff1681565b600060026000541415613fb5576040805162461bcd60e51b815260206004820152601f602482015260008051602061547c833981519152604482015290519081900360640190fd5b600260005560155460ff1615613ffd576040805162461bcd60e51b815260206004820152600860248201526739b43aba3237bbb760c11b604482015290519081900360640190fd5b6140068261495b565b50600180600055919050565b6012546001600160a01b031681565b6010546001600160a01b031681565b6007546001600160a01b031681565b61271081565b6008546001600160a01b031681565b60186020526000908152604090205481565b6007546001600160a01b031633146140ad576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b601280546001600160a01b0319166001600160a01b0392909216919091179055565b600d546000906001600160a01b03163314614119576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b6001600160a01b03831660009081526001602052604090205460ff16614172576040805162461bcd60e51b815260206004820152600960248201526810bb37ba32a0b2323960b91b604482015290519081900360640190fd5b7f00000000000000000000000037aeb332d6e57112f1bfe36923a7ee670ee9278b6001600160a01b031663e2cdd42a8585856040518463ffffffff1660e01b815260040180848152602001836001600160a01b0316815260200182151581526020019350505050602060405180830381600087803b158015611ea657600080fd5b600b546001600160a01b031681565b6007546001600160a01b03163314614249576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b600f80546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f7dae230f18360d76a040c81f050aa14eb9d6dc7901b20fc5d855e2a20fe814d19181900360200190a150565b600d546000906001600160a01b031633146142e7576040805162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b604482015290519081900360640190fd5b604080516307ef625d60e21b81526004810184905260006024820181905291516001600160a01b037f00000000000000000000000037aeb332d6e57112f1bfe36923a7ee670ee9278b1692631fbd8974926044808201939182900301818387803b15801561435457600080fd5b505af1158015611ba7573d6000803e3d6000fd5b6000828201838110156110ed576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000826143d157506000611a3b565b828202828482816143de57fe5b04146110ed5760405162461bcd60e51b81526004018080602001828103825260218152602001806154c26021913960400191505060405180910390fd5b6000808211614471576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161447a57fe5b049392505050565b6000828211156144d9576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261453990859061518d565b50505050565b60026000541415614585576040805162461bcd60e51b815260206004820152601f602482015260008051602061547c833981519152604482015290519081900360640190fd5b60026000908155601680548690811061459a57fe5b60009182526020822060059091020180546002820154600183015460408051632770a7eb60e21b81526001600160a01b038a81166004830152602482018c9052915195975093811695928116949116928392639dc29fac9260448084019382900301818387803b15801561460d57600080fd5b505af1158015614621573d6000803e3d6000fd5b505050506004840154600160a01b900460ff166146ed577f00000000000000000000000037aeb332d6e57112f1bfe36923a7ee670ee9278b6001600160a01b031663d9caed1284848a6040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050602060405180830381600087803b1580156146c057600080fd5b505af11580156146d4573d6000803e3d6000fd5b505050506040513d60208110156146ea57600080fd5b50505b60048401546001600160a01b0316801580159061470d575060155460ff16155b801561472557506004850154600160a01b900460ff16155b1561479257806001600160a01b031663b87bd4816040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561476557600080fd5b505af1158015614779573d6000803e3d6000fd5b505050506040513d602081101561478f57600080fd5b50505b6147a66001600160a01b038516878a614909565b6040805189815290518a916001600160a01b038916917f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc69181900360200190a35050600160005550505050505050565b80158061487c575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561484e57600080fd5b505afa158015614862573d6000803e3d6000fd5b505050506040513d602081101561487857600080fd5b5051155b6148b75760405162461bcd60e51b815260040180806020018281038252603681526020018061550d6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052612b8b90849061518d565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052612b8b90849061518d565b60006016828154811061496a57fe5b600091825260209091206005909102016004810154909150600160a01b900460ff16156149cf576040805162461bcd60e51b815260206004820152600e60248201526d1c1bdbdb081a5cc818db1bdcd95960921b604482015290519081900360640190fd5b6002810154604080516370a0823160e01b815230600482015290516001600160a01b03928316926000927f000000000000000000000000627fee87d0d9d2c55098a06ac805db8f98b158aa909116916370a0823191602480820192602092909190829003018186803b158015614a4457600080fd5b505afa158015614a58573d6000803e3d6000fd5b505050506040513d6020811015614a6e57600080fd5b5051604080516370a0823160e01b81526001600160a01b037f00000000000000000000000037aeb332d6e57112f1bfe36923a7ee670ee9278b8116600483015291519293506000927f000000000000000000000000627fee87d0d9d2c55098a06ac805db8f98b158aa909216916370a0823191602480820192602092909190829003018186803b158015614b0157600080fd5b505afa158015614b15573d6000803e3d6000fd5b505050506040513d6020811015614b2b57600080fd5b505190506000614b3b8383614368565b90507f00000000000000000000000037aeb332d6e57112f1bfe36923a7ee670ee9278b6001600160a01b0316633fe9bc06856040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050602060405180830381600087803b158015614bac57600080fd5b505af1158015614bc0573d6000803e3d6000fd5b505050506040513d6020811015614bd657600080fd5b5050604080516370a0823160e01b815230600482015290516000916001600160a01b037f000000000000000000000000627fee87d0d9d2c55098a06ac805db8f98b158aa16916370a0823191602480820192602092909190829003018186803b158015614c4257600080fd5b505afa158015614c56573d6000803e3d6000fd5b505050506040513d6020811015614c6c57600080fd5b505190506000614c7c8284614482565b9050600083118015614c985750600f546001600160a01b031615155b15614d4157600f546040805163a9059cbb60e01b81526001600160a01b0392831660048201526024810186905290517f000000000000000000000000627fee87d0d9d2c55098a06ac805db8f98b158aa9092169163a9059cbb916044808201926020929091908290030181600087803b158015614d1457600080fd5b505af1158015614d28573d6000803e3d6000fd5b505050506040513d6020811015614d3e57600080fd5b50505b60048701546001600160a01b03168015614e2b57806001600160a01b031663372500ab6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015614d9057600080fd5b505af1158015614da4573d6000803e3d6000fd5b505050506040513d6020811015614dba57600080fd5b50506040805163654580bb60e11b815290516001600160a01b0383169163ca8b01769160048083019260209291908290030181600087803b158015614dfe57600080fd5b505af1158015614e12573d6000803e3d6000fd5b505050506040513d6020811015614e2857600080fd5b50505b8115615182576000614e4e612710610cb0600254866143c290919063ffffffff16565b90506000614e6d612710610cb0600354876143c290919063ffffffff16565b90506000614e8c612710610cb0600454886143c290919063ffffffff16565b600f549091506001600160a01b031615801590614eb45750600f546001600160a01b03163014155b8015614ec257506000600554115b15614f2f576000614ee4612710610cb0600554896143c290919063ffffffff16565b9050614ef08682614482565b600f54909650614f2d906001600160a01b037f000000000000000000000000627fee87d0d9d2c55098a06ac805db8f98b158aa8116911683614909565b505b614f4582614f3f83818988614482565b90614482565b9450614f7b6001600160a01b037f000000000000000000000000627fee87d0d9d2c55098a06ac805db8f98b158aa163383614909565b60038b01546001600160a01b0390811690614fb9907f000000000000000000000000627fee87d0d9d2c55098a06ac805db8f98b158aa168288614909565b806001600160a01b031663590a41f5876040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015614fff57600080fd5b505af1158015615013573d6000803e3d6000fd5b505060115461505192506001600160a01b037f000000000000000000000000627fee87d0d9d2c55098a06ac805db8f98b158aa811692501686614909565b6011546040805163590a41f560e01b81526004810187905290516001600160a01b039092169163590a41f59160248082019260009290919082900301818387803b15801561509e57600080fd5b505af11580156150b2573d6000803e3d6000fd5b50506010546150f092506001600160a01b037f000000000000000000000000627fee87d0d9d2c55098a06ac805db8f98b158aa811692501685614909565b601054604080516304d0c2c560e01b81526001600160a01b037f000000000000000000000000627fee87d0d9d2c55098a06ac805db8f98b158aa8116600483015260248201879052915191909216916304d0c2c591604480830192600092919082900301818387803b15801561516557600080fd5b505af1158015615179573d6000803e3d6000fd5b50505050505050505b505050505050505050565b60606151e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661523e9092919063ffffffff16565b805190915015612b8b5780806020019051602081101561520157600080fd5b5051612b8b5760405162461bcd60e51b815260040180806020018281038252602a8152602001806154e3602a913960400191505060405180910390fd5b606061524d8484600085615255565b949350505050565b6060824710156152965760405162461bcd60e51b815260040180806020018281038252602681526020018061549c6026913960400191505060405180910390fd5b61529f856153b1565b6152f0576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061532f5780518252601f199092019160209182019101615310565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114615391576040519150601f19603f3d011682016040523d82523d6000602084013e615396565b606091505b50915091506153a68282866153b7565b979650505050505050565b3b151590565b606083156153c65750816110ed565b8251156153d65782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615420578181015183820152602001615408565b50505050905090810190601f16801561544d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b60408051606081018252600080825260208201819052918101919091529056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c00416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212207bf52d96a1890fa0bd7afb97949a253fec76b81f6e6815414b4b607ec6988de364736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000037aeb332d6e57112f1bfe36923a7ee670ee9278b000000000000000000000000d82fd4d6d62f89a1e50b1db69ad19932314aa408000000000000000000000000627fee87d0d9d2c55098a06ac805db8f98b158aa
-----Decoded View---------------
Arg [0] : _staker (address): 0x37aeB332D6E57112f1BFE36923a7ee670Ee9278b
Arg [1] : _minter (address): 0xD82fd4D6D62f89A1E50b1db69AD19932314aa408
Arg [2] : _crv (address): 0x627fee87d0D9D2c55098A06ac805Db8F98B158Aa
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000037aeb332d6e57112f1bfe36923a7ee670ee9278b
Arg [1] : 000000000000000000000000d82fd4d6d62f89a1e50b1db69ad19932314aa408
Arg [2] : 000000000000000000000000627fee87d0d9d2c55098a06ac805db8f98b158aa
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.