Polygon Sponsored slots available. Book your slot here!
Overview
POL Balance
0 POL
POL Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
StakingV2Controller
Compiler Version
v0.7.3+commit.9bfce1f6
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; import "@openzeppelin/contracts-upgradeable/token/ERC20/SafeERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol"; import {Constant} from "../common/Constant.sol"; import {ISecurityMatrix} from "../secmatrix/ISecurityMatrix.sol"; import {IStakersPoolV2} from "../pool/IStakersPoolV2.sol"; import {ILPToken} from "../token/ILPToken.sol"; import {IStakingV2Controller} from "./IStakingV2Controller.sol"; import {Math} from "../common/Math.sol"; import {ICapitalPool} from "../pool/ICapitalPool.sol"; import {IExchangeRate} from "../exchange/IExchangeRate.sol"; contract StakingV2Controller is IStakingV2Controller, OwnableUpgradeable, PausableUpgradeable, ReentrancyGuardUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; using SafeMathUpgradeable for uint256; using AddressUpgradeable for address; function initializeStakingV2Controller() public initializer { __Ownable_init(); __Pausable_init(); __ReentrancyGuard_init(); } address public stakersPoolV2; address public feePool; // _token => _lpToken mapping(address => address) public tokenToLPTokenMap; uint256 public mapCounter; // _token => staking info mapping(address => uint256) public minStakeAmtPT; mapping(address => uint256) public minUnstakeAmtPT; mapping(address => uint256) public maxUnstakeAmtPT; mapping(address => uint256) public unstakeLockBlkPT; uint256 public constant G_WITHDRAW_FEE_BASE = 10000; mapping(address => uint256) public withdrawFeePT; address public securityMatrix; address public capitalPool; mapping(address => uint256) public totalStakedCapPT; mapping(address => uint256) public perAccountCapPT; // exchange rate address public exchangeRate; // staking controller signer and nonce flag (signer/nonce -> true/false) mapping(address => bool) public signerFlagMap; mapping(address => mapping(uint256 => bool)) public nonceFlagMap; function setup( address _securityMatrix, address _stakersPoolV2, address _feePool, address _capitalPool, address _exchangeRate ) external onlyOwner { require(_securityMatrix != address(0), "S:1"); require(_stakersPoolV2 != address(0), "S:2"); require(_feePool != address(0), "S:3"); require(_capitalPool != address(0), "S:4"); require(_exchangeRate != address(0), "S:5"); securityMatrix = _securityMatrix; stakersPoolV2 = _stakersPoolV2; feePool = _feePool; capitalPool = _capitalPool; exchangeRate = _exchangeRate; } modifier allowedCaller() { require((ISecurityMatrix(securityMatrix).isAllowdCaller(address(this), _msgSender())) || (_msgSender() == owner()), "allowedCaller"); _; } modifier onlyAllowedToken(address _token) { address lpToken = tokenToLPTokenMap[_token]; require(lpToken != address(0), "onlyAllowedToken"); _; } function setTokenToLPTokenMap(address _token, address _lpToken) external onlyOwner { require(_token != address(0), "STTLPTM:1"); tokenToLPTokenMap[_token] = _lpToken; } function setMapCounter(uint256 _mapCounter) external onlyOwner { mapCounter = _mapCounter; } function setStakeInfo( address _token, uint256 _minStakeAmt, uint256 _minUnstakeAmt, uint256 _maxUnstakeAmt, uint256 _unstakeLockBlk, uint256 _withdrawFee ) external onlyOwner onlyAllowedToken(_token) { require(_token != address(0), "SSI:1"); minStakeAmtPT[_token] = _minStakeAmt; require(_minUnstakeAmt < _maxUnstakeAmt, "SSI:2"); minUnstakeAmtPT[_token] = _minUnstakeAmt; maxUnstakeAmtPT[_token] = _maxUnstakeAmt; unstakeLockBlkPT[_token] = _unstakeLockBlk; withdrawFeePT[_token] = _withdrawFee; } function setStakeCap( address _token, uint256 _totalStakedCapPT, uint256 _perAccountCapPT ) external onlyOwner onlyAllowedToken(_token) { totalStakedCapPT[_token] = _totalStakedCapPT; perAccountCapPT[_token] = _perAccountCapPT; } event SetStakingControllerSignerEvent(address indexed signer, bool enabled); function setStakingControllerSigner(address signer, bool enabled) external onlyOwner { require(signer != address(0), "SSCS: 1"); signerFlagMap[signer] = enabled; emit SetStakingControllerSignerEvent(signer, enabled); } // pause function pauseAll() external onlyOwner whenNotPaused { _pause(); } function unPauseAll() external onlyOwner whenPaused { _unpause(); } event StakeTokensEvent(address indexed _from, address indexed _lpToken, uint256 _deltaAmt, uint256 _balance); event StakeTokensEventV2(address indexed _from, address indexed _token, uint256 _amount, address indexed _lpToken, uint256 _deltaAmt, uint256 _balance); function stakeTokens(uint256 _amount, address _token) external payable override whenNotPaused nonReentrant onlyAllowedToken(_token) { require(minStakeAmtPT[_token] <= _amount, "ST:1"); address lpToken = tokenToLPTokenMap[_token]; IStakersPoolV2(stakersPoolV2).reCalcPoolPT(lpToken); IStakersPoolV2(stakersPoolV2).settlePendingRewards(_msgSender(), lpToken); if (_token == Constant.BCNATIVETOKENADDRESS) { require(_amount <= msg.value, "ST:2"); } else { require(IERC20Upgradeable(_token).balanceOf(_msgSender()) >= _amount, "ST:3"); uint256 allowanceAmt = IERC20Upgradeable(_token).allowance(_msgSender(), address(this)); require(allowanceAmt >= _amount, "ST:4"); IERC20Upgradeable(_token).safeTransferFrom(_msgSender(), address(this), _amount); } // eth/lpeth = constant = _amount/lpTokenAmount uint256 lpTokenAmount = _amount; uint256 stakedTokenAmt = IStakersPoolV2(stakersPoolV2).getStakedAmountPT(_token); if (stakedTokenAmt > 0) { lpTokenAmount = _amount.mul(IERC20Upgradeable(lpToken).totalSupply()).div(stakedTokenAmt); require(lpTokenAmount != 0, "ST:5"); } if (_token == Constant.BCNATIVETOKENADDRESS) { IStakersPoolV2(stakersPoolV2).addStkAmount{value: _amount}(_token, _amount); } else { IERC20Upgradeable(_token).safeTransfer(stakersPoolV2, _amount); IStakersPoolV2(stakersPoolV2).addStkAmount(_token, _amount); } uint256 poolRewardPerLPToken = IStakersPoolV2(stakersPoolV2).getPoolRewardPerLPToken(lpToken); ILPToken(lpToken).mint(_msgSender(), lpTokenAmount, poolRewardPerLPToken); uint256 lpTokenAmtAfterStaked = IERC20Upgradeable(lpToken).balanceOf(_msgSender()); require(stakedTokenAmt.add(_amount) <= totalStakedCapPT[_token], "ST:6"); uint256 tokenAmtAfterStaked = lpTokenAmtAfterStaked.mul(stakedTokenAmt.add(_amount)).div(IERC20Upgradeable(lpToken).totalSupply()); require(tokenAmtAfterStaked <= perAccountCapPT[_token], "ST:7"); emit StakeTokensEventV2(_msgSender(), _token, _amount, lpToken, lpTokenAmount, IERC20Upgradeable(lpToken).balanceOf(_msgSender())); } // propose unstake event ProposeUnstakeEvent(address indexed _from, address indexed _token, uint256 _deltaAmt); event ProposeUnstakeEventV2(address indexed _from, address indexed _token, uint256 _amount, address indexed _lpToken, uint256 _deltaAmt); function proposeUnstake(uint256 _amount, address _token) external override nonReentrant whenNotPaused onlyAllowedToken(_token) { require(minUnstakeAmtPT[_token] <= _amount && maxUnstakeAmtPT[_token] >= _amount, "PU:1"); address lpToken = tokenToLPTokenMap[_token]; // eth/lpeth = constant = _amount/lpTokenAmount require(IStakersPoolV2(stakersPoolV2).getStakedAmountPT(_token) >= _amount, "PU:2"); uint256 proposeUnstakeLP = _amount.mul(IERC20Upgradeable(lpToken).totalSupply()).div(IStakersPoolV2(stakersPoolV2).getStakedAmountPT(_token)); require(proposeUnstakeLP != 0, "PU:3"); ILPToken(lpToken).proposeToBurn(_msgSender(), proposeUnstakeLP, unstakeLockBlkPT[_token]); emit ProposeUnstakeEventV2(_msgSender(), _token, _amount, lpToken, proposeUnstakeLP); } // Withdraw related event WithdrawTokensEvent(address indexed _from, address indexed _token, uint256 _deltaAmt, uint256 _balance); event WithdrawTokensEventV2(address indexed _from, address indexed _token, uint256 _amount, address indexed _lpToken, uint256 _deltaAmt, uint256 _balance); function withdrawTokens( address _caller, address payable _staker, uint256 _amount, address _token, uint256 _nonce, uint256 _deadline, uint8[] memory v, bytes32[] memory r, bytes32[] memory s ) external override nonReentrant whenNotPaused onlyAllowedToken(_token) { bytes32 msgHash = keccak256(abi.encodePacked(address(this), _caller, _staker, _amount, _token, _nonce, _deadline)); bytes32 prefixedHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", msgHash)); address signer = ecrecover(prefixedHash, v[0], r[0], s[0]); require(signerFlagMap[signer], "WTKN:1"); require(!nonceFlagMap[_staker][_nonce], "WTKN:2"); nonceFlagMap[_staker][_nonce] = true; address msgSender = _msgSender(); require(msgSender == _caller || msgSender == _staker, "WTKN:3"); require(block.number < _deadline, "WTKN:4"); _withdrawTokens(_staker, _amount, _token); } function _withdrawTokens( address payable _staker, uint256 _amount, address _token ) private { require(_amount > 0, "WT:1"); address lpToken = tokenToLPTokenMap[_token]; IStakersPoolV2(stakersPoolV2).reCalcPoolPT(lpToken); IStakersPoolV2(stakersPoolV2).settlePendingRewards(_staker, lpToken); // eth/lpeth = constant = _amount/lpTokenAmount uint256 unstakeLP = _amount; require(IStakersPoolV2(stakersPoolV2).getStakedAmountPT(_token) != 0, "WT:2"); unstakeLP = _amount.mul(IERC20Upgradeable(lpToken).totalSupply()).div(IStakersPoolV2(stakersPoolV2).getStakedAmountPT(_token)); require(unstakeLP != 0, "WT:3"); uint256 withdrawAmtAfterFee = _amount.mul(G_WITHDRAW_FEE_BASE.sub(withdrawFeePT[_token])).div(G_WITHDRAW_FEE_BASE); IStakersPoolV2(stakersPoolV2).withdrawTokens(_staker, withdrawAmtAfterFee, _token, feePool, _amount.sub(withdrawAmtAfterFee)); uint256 poolRewardPerLPToken = IStakersPoolV2(stakersPoolV2).getPoolRewardPerLPToken(lpToken); ILPToken(lpToken).burn(_staker, unstakeLP, poolRewardPerLPToken); emit WithdrawTokensEventV2(_staker, _token, _amount, lpToken, unstakeLP, IERC20Upgradeable(lpToken).balanceOf(_staker)); } event UnlockRewardsFromPoolsEvent(address indexed _to, address indexed _token, uint256 _amount); function unlockRewardsFromPoolsByController( address _staker, address _to, address[] memory _tokenList ) external override allowedCaller whenNotPaused nonReentrant returns (uint256) { uint256 delta = _unlockRewardsFromPools(_staker, _to, _tokenList); return delta; } function _unlockRewardsFromPools( address staker, address _to, address[] memory _tokenList ) private returns (uint256) { require(_to != address(0), "_URFP:1"); require(_tokenList.length <= mapCounter, "_URFP:2"); uint256 totalHarvestedAmt = 0; for (uint256 i = 0; i < _tokenList.length; i++) { address token = _tokenList[i]; address lpToken = tokenToLPTokenMap[token]; require(lpToken != address(0), "_URFP:3"); if (IERC20Upgradeable(lpToken).balanceOf(staker) != 0) { IStakersPoolV2(stakersPoolV2).reCalcPoolPT(lpToken); IStakersPoolV2(stakersPoolV2).settlePendingRewards(staker, lpToken); } uint256 harvestedAmt = IStakersPoolV2(stakersPoolV2).harvestRewards(staker, lpToken, _to); totalHarvestedAmt = totalHarvestedAmt.add(harvestedAmt); if (IERC20Upgradeable(lpToken).balanceOf(staker) != 0) { uint256 poolRewardPerLPToken = IStakersPoolV2(stakersPoolV2).getPoolRewardPerLPToken(lpToken); ILPToken(lpToken).mint(staker, 0, poolRewardPerLPToken); } emit UnlockRewardsFromPoolsEvent(staker, token, harvestedAmt); } return totalHarvestedAmt; } function showRewardsFromPools(address[] memory _tokenList) external view override returns (uint256) { return _showRewardsFromPools(_msgSender(), _tokenList); } function showRewardsFromPoolsByStaker(address staker, address[] memory _tokenList) external view override returns (uint256) { return _showRewardsFromPools(staker, _tokenList); } function _showRewardsFromPools(address staker, address[] memory _tokenList) internal view returns (uint256) { require(_tokenList.length <= mapCounter, "SRFP:1"); uint256 totalRewards = 0; for (uint256 i = 0; i < _tokenList.length; i++) { address token = _tokenList[i]; address lpToken = tokenToLPTokenMap[token]; require(lpToken != address(0), "SRFP:2"); uint256 pendingRewards = IStakersPoolV2(stakersPoolV2).showPendingRewards(staker, lpToken); uint256 harvestRewards = IStakersPoolV2(stakersPoolV2).showHarvestRewards(staker, lpToken); totalRewards = totalRewards.add(pendingRewards).add(harvestRewards); } return totalRewards; } function getRebalancedPools( uint256 _weightTotal, uint256 _blockPerYear, uint256 _expectedAPYX10000, address[] memory _tokenInclusionList, address[] memory _tokenExclusionList ) external view returns (uint256[] memory weightList_, uint256 rewardPerBlock_) { require(_weightTotal >= 100000000, "GRBPL:1"); require(_blockPerYear > 0, "GRBPL:2"); require(_expectedAPYX10000 >= 0 && _expectedAPYX10000 <= 10000, "GRBPL:3"); require(_tokenInclusionList.length + _tokenExclusionList.length == mapCounter, "GRBPL:4"); // reward per block per pool uint256[] memory rewardPBPP = new uint256[](_tokenInclusionList.length + _tokenExclusionList.length); uint256[] memory retWeightList = new uint256[](rewardPBPP.length); uint256 rewardPerBlock = 0; uint256 rewardPBPPIndex = 0; uint256 expectedAPYX10000 = _expectedAPYX10000; uint256 weightTotal = _weightTotal; uint256 blockPerYear = _blockPerYear; for (uint256 i = 0; i < _tokenInclusionList.length; i++) { require(tokenToLPTokenMap[_tokenInclusionList[i]] != address(0), "GRBPL:5"); uint256 tvlAmt = IStakersPoolV2(stakersPoolV2).getStakedAmountPT(_tokenInclusionList[i]); uint256 convertReward = IExchangeRate(exchangeRate).getTokenToTokenAmount(_tokenInclusionList[i], IStakersPoolV2(stakersPoolV2).getRewardToken(), tvlAmt); rewardPBPP[rewardPBPPIndex] = expectedAPYX10000.mul(convertReward).div(blockPerYear).div(10000); rewardPerBlock = rewardPerBlock.add(rewardPBPP[rewardPBPPIndex]); rewardPBPPIndex = rewardPBPPIndex.add(1); } for (uint256 i = 0; i < _tokenExclusionList.length; i++) { require(tokenToLPTokenMap[_tokenExclusionList[i]] != address(0), "GRBPL:6"); rewardPBPP[rewardPBPPIndex] = IStakersPoolV2(stakersPoolV2).getRewardPerBlockPerPool(tokenToLPTokenMap[_tokenExclusionList[i]]); rewardPerBlock = rewardPerBlock.add(rewardPBPP[rewardPBPPIndex]); rewardPBPPIndex = rewardPBPPIndex.add(1); } for (uint256 i = 0; i < rewardPBPP.length; i++) { retWeightList[i] = weightTotal.mul(rewardPBPP[i]).div(rewardPerBlock); } return (retWeightList, rewardPerBlock); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC20Upgradeable.sol"; import "../../math/SafeMathUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20Upgradeable { using SafeMathUpgradeable for uint256; using AddressUpgradeable for address; function safeTransfer(IERC20Upgradeable token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20Upgradeable token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20Upgradeable token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // 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(IERC20Upgradeable 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(IERC20Upgradeable 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(IERC20Upgradeable token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // 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 Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT 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 SafeMathUpgradeable { /** * @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.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // 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); } 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 "../utils/ContextUpgradeable.sol"; import "../proxy/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./ContextUpgradeable.sol"; import "../proxy/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal initializer { __Context_init_unchained(); __Pausable_init_unchained(); } function __Pausable_init_unchained() internal initializer { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../proxy/Initializable.sol"; /** * @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 ReentrancyGuardUpgradeable is Initializable { // 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; function __ReentrancyGuard_init() internal initializer { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal initializer { _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; } uint256[49] private __gap; }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; library Constant { // the standard 10**18 Amount Multiplier uint256 public constant MULTIPLIERX10E18 = 10**18; // the valid ETH and DAI addresses (Rinkeby, TBD: Mainnet) address public constant BCNATIVETOKENADDRESS = address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE); // product status enumerations uint256 public constant PRODUCTSTATUS_ENABLED = 1; uint256 public constant PRODUCTSTATUS_DISABLED = 2; // the cover status enumerations uint256 public constant COVERSTATUS_ACTIVE = 0; uint256 public constant COVERSTATUS_EXPIRED = 1; uint256 public constant COVERSTATUS_CLAIMINPROGRESS = 2; uint256 public constant COVERSTATUS_CLAIMDONE = 3; uint256 public constant COVERSTATUS_CANCELLED = 4; // the claim proposal result status enumerations uint256 public constant CLAIMPROPOSALSTATUS_NONE = 0; uint256 public constant CLAIMPROPOSALSTATUS_ACCEPTED = 1; uint256 public constant CLAIMPROPOSALSTATUS_REJECTED = 2; // the claim status enumerations uint256 public constant CLAIMSTATUS_SUBMITTED = 0; uint256 public constant CLAIMSTATUS_INVESTIGATING = 1; uint256 public constant CLAIMSTATUS_PREPAREFORVOTING = 2; uint256 public constant CLAIMSTATUS_VOTING = 3; uint256 public constant CLAIMSTATUS_VOTINGCOMPLETED = 4; uint256 public constant CLAIMSTATUS_ABDISCRETION = 5; uint256 public constant CLAIMSTATUS_COMPLAINING = 6; uint256 public constant CLAIMSTATUS_COMPLAININGCOMPLETED = 7; uint256 public constant CLAIMSTATUS_ACCEPTED = 8; uint256 public constant CLAIMSTATUS_REJECTED = 9; uint256 public constant CLAIMSTATUS_PAYOUTREADY = 10; uint256 public constant CLAIMSTATUS_PAID = 11; uint256 public constant CLAIMSTATUS_ANALYZING = 12; // the voting outcome status enumerations uint256 public constant OUTCOMESTATUS_NONE = 0; uint256 public constant OUTCOMESTATUS_ACCEPTED = 1; uint256 public constant OUTCOMESTATUS_REJECTED = 2; // the referral reward type uint256 public constant REFERRALREWARD_NONE = 0; uint256 public constant REFERRALREWARD_COVER = 1; uint256 public constant REFERRALREWARD_STAKING = 2; // DAO proposal status enumerations uint256 public constant DAOPROPOSALSTATUS_SUBMITTED = 0; uint256 public constant DAOPROPOSALSTATUS_VOTING = 1; uint256 public constant DAOPROPOSALSTATUS_CANCELLED = 2; uint256 public constant DAOPROPOSALSTATUS_COMPLETED = 3; uint256 public constant DAOPROPOSALSTATUS_PASSED = 4; uint256 public constant DAOPROPOSALSTATUS_FAILED = 5; uint256 public constant DAOPROPOSALSTATUS_EXECUTED = 6; // DAO vote choice enumerations uint256 public constant DAOVOTECHOICE_SUPPORT = 0; uint256 public constant DAOVOTECHOICE_AGAINST = 1; uint256 public constant DAOVOTECHOICE_ABSTAINED = 2; }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; interface ISecurityMatrix { function isAllowdCaller(address _callee, address _caller) external view returns (bool); }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; interface IStakersPoolV2 { function addStkAmount(address _token, uint256 _amount) external payable; function withdrawTokens( address payable _to, uint256 _amount, address _token, address _feePool, uint256 _fee ) external; function reCalcPoolPT(address _lpToken) external; function settlePendingRewards(address _account, address _lpToken) external; function harvestRewards( address _account, address _lpToken, address _to ) external returns (uint256); function getPoolRewardPerLPToken(address _lpToken) external view returns (uint256); function getStakedAmountPT(address _token) external view returns (uint256); function showPendingRewards(address _account, address _lpToken) external view returns (uint256); function showHarvestRewards(address _account, address _lpToken) external view returns (uint256); function getRewardToken() external view returns (address); function getRewardPerBlockPerPool(address _lpToken) external view returns (uint256); function claimPayout( address _fromToken, address _paymentToken, uint256 _settleAmtPT, address _claimToSettlementPool, uint256 _claimId, uint256 _fromRate, uint256 _toRate ) external; }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; interface ILPToken { function proposeToBurn( address _account, uint256 _amount, uint256 _blockWeight ) external; function mint( address _account, uint256 _amount, uint256 _poolRewardPerLPToken ) external; function rewardDebtOf(address _account) external view returns (uint256); function burnableAmtOf(address _account) external view returns (uint256); function burn( address _account, uint256 _amount, uint256 _poolRewardPerLPToken ) external; }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; interface IStakingV2Controller { function stakeTokens(uint256 _amount, address _token) external payable; function proposeUnstake(uint256 _amount, address _token) external; function withdrawTokens( address _caller, address payable _staker, uint256 _amount, address _token, uint256 _nonce, uint256 _deadline, uint8[] memory v, bytes32[] memory r, bytes32[] memory s ) external; function unlockRewardsFromPoolsByController( address staker, address _to, address[] memory _tokenList ) external returns (uint256); function showRewardsFromPools(address[] memory _tokenList) external view returns (uint256); function showRewardsFromPoolsByStaker(address staker, address[] memory _tokenList) external view returns (uint256); }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol"; // a library for performing various math operations library Math { using SafeMathUpgradeable for uint256; function max(uint256 x, uint256 y) internal pure returns (uint256) { return x < y ? y : x; } function min(uint256 x, uint256 y) internal pure returns (uint256) { return x < y ? x : y; } // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method) function sqrt(uint256 y) internal pure returns (uint256 z) { if (y > 3) { z = y; uint256 x = y.div(2).add(1); while (x < z) { z = x; x = (y.div(x).add(x)).div(2); } } else if (y != 0) { z = 1; } } // power private function function pow(uint256 _base, uint256 _exponent) internal pure returns (uint256) { if (_exponent == 0) { return 1; } else if (_exponent == 1) { return _base; } else if (_base == 0 && _exponent != 0) { return 0; } else { uint256 z = _base; for (uint256 i = 1; i < _exponent; i++) { z = z.mul(_base); } return z; } } }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; interface ICapitalPool { function canBuyCoverPerProduct( uint256 _productId, uint256 _amount, address _token ) external view returns (bool); function canBuyCover(uint256 _amount, address _token) external view returns (bool); function buyCoverPerProduct( uint256 _productId, uint256 _amount, address _token ) external; function hasTokenInStakersPool(address _token) external view returns (bool); function getCapacityInfo() external view returns (uint256, uint256); function getProductCapacityInfo(uint256[] memory _products) external view returns ( address, uint256[] memory, uint256[] memory ); function getProductCapacityRatio(uint256 _productId) external view returns (uint256); function getBaseToken() external view returns (address); function getCoverAmtPPMaxRatio() external view returns (uint256); function getCoverAmtPPInBaseToken(uint256 _productId) external view returns (uint256); function settlePaymentForClaim( address _token, uint256 _amount, uint256 _claimId ) external; function getStakingPercentageX10000() external view returns (uint256); function getTVLinBaseToken() external view returns (address, uint256); }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; interface IExchangeRate { function getBaseCurrency() external view returns (address); function setBaseCurrency(address _currency) external; function getAllCurrencyArray() external view returns (address[] memory); function addCurrencies( address[] memory _currencies, uint128[] memory _multipliers, uint128[] memory _rates ) external; function removeCurrency(address _currency) external; function getAllCurrencyRates() external view returns (uint256[] memory); function updateAllCurrencies(uint128[] memory _rates) external; function updateCurrency(address _currency, uint128 _rate) external; function getTokenToTokenAmount( address _fromToken, address _toToken, uint256 _amount ) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../proxy/Initializable.sol"; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // solhint-disable-next-line compiler-version pragma solidity >=0.4.24 <0.8.0; import "../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_deltaAmt","type":"uint256"}],"name":"ProposeUnstakeEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"_lpToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"_deltaAmt","type":"uint256"}],"name":"ProposeUnstakeEventV2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"signer","type":"address"},{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"SetStakingControllerSignerEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_lpToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"_deltaAmt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_balance","type":"uint256"}],"name":"StakeTokensEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"_lpToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"_deltaAmt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_balance","type":"uint256"}],"name":"StakeTokensEventV2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"UnlockRewardsFromPoolsEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_deltaAmt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_balance","type":"uint256"}],"name":"WithdrawTokensEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"_lpToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"_deltaAmt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_balance","type":"uint256"}],"name":"WithdrawTokensEventV2","type":"event"},{"inputs":[],"name":"G_WITHDRAW_FEE_BASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"capitalPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exchangeRate","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feePool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_weightTotal","type":"uint256"},{"internalType":"uint256","name":"_blockPerYear","type":"uint256"},{"internalType":"uint256","name":"_expectedAPYX10000","type":"uint256"},{"internalType":"address[]","name":"_tokenInclusionList","type":"address[]"},{"internalType":"address[]","name":"_tokenExclusionList","type":"address[]"}],"name":"getRebalancedPools","outputs":[{"internalType":"uint256[]","name":"weightList_","type":"uint256[]"},{"internalType":"uint256","name":"rewardPerBlock_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initializeStakingV2Controller","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mapCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxUnstakeAmtPT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"minStakeAmtPT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"minUnstakeAmtPT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"nonceFlagMap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"perAccountCapPT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_token","type":"address"}],"name":"proposeUnstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"securityMatrix","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mapCounter","type":"uint256"}],"name":"setMapCounter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_totalStakedCapPT","type":"uint256"},{"internalType":"uint256","name":"_perAccountCapPT","type":"uint256"}],"name":"setStakeCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_minStakeAmt","type":"uint256"},{"internalType":"uint256","name":"_minUnstakeAmt","type":"uint256"},{"internalType":"uint256","name":"_maxUnstakeAmt","type":"uint256"},{"internalType":"uint256","name":"_unstakeLockBlk","type":"uint256"},{"internalType":"uint256","name":"_withdrawFee","type":"uint256"}],"name":"setStakeInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setStakingControllerSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_lpToken","type":"address"}],"name":"setTokenToLPTokenMap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_securityMatrix","type":"address"},{"internalType":"address","name":"_stakersPoolV2","type":"address"},{"internalType":"address","name":"_feePool","type":"address"},{"internalType":"address","name":"_capitalPool","type":"address"},{"internalType":"address","name":"_exchangeRate","type":"address"}],"name":"setup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokenList","type":"address[]"}],"name":"showRewardsFromPools","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"},{"internalType":"address[]","name":"_tokenList","type":"address[]"}],"name":"showRewardsFromPoolsByStaker","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"signerFlagMap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_token","type":"address"}],"name":"stakeTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"stakersPoolV2","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenToLPTokenMap","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"totalStakedCapPT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unPauseAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_staker","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"address[]","name":"_tokenList","type":"address[]"}],"name":"unlockRewardsFromPoolsByController","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"unstakeLockBlkPT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"withdrawFeePT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_caller","type":"address"},{"internalType":"address payable","name":"_staker","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_nonce","type":"uint256"},{"internalType":"uint256","name":"_deadline","type":"uint256"},{"internalType":"uint8[]","name":"v","type":"uint8[]"},{"internalType":"bytes32[]","name":"r","type":"bytes32[]"},{"internalType":"bytes32[]","name":"s","type":"bytes32[]"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50614d2d806100206000396000f3fe60806040526004361061021a5760003560e01c8063929a6ee311610123578063bea4b343116100ab578063ebc278381161006f578063ebc2783814610add578063ed05d4a114610b32578063f2fde38b14610cd0578063f9bdf82f14610d03578063faf295ca14610d185761021a565b8063bea4b3431461094b578063bf766f5c1461097e578063d5c71c37146109b9578063d7269dc314610a80578063dc7894c214610aaa5761021a565b8063ae0b378e116100f2578063ae0b378e146107e9578063ae2e933b14610824578063b4d7902e14610839578063b6b2b376146108f7578063b870029c146109365761021a565b8063929a6ee3146106a257806397dad231146106d5578063a651cd2514610783578063abd915d7146107b65761021a565b8063595c6a67116101a657806369dcf98e1161017557806369dcf98e146105d9578063715018a6146106125780637a5e7bdb146106275780638da5cb5b1461065a57806390323f871461066f5761021a565b8063595c6a671461054d5780635ace4df7146105625780635bfb75081461059b5780635c975abb146105b05761021a565b806331e6cbb4116101ed57806331e6cbb4146102ba5780633a59cfee1461049f5780633ba0b9a9146104d25780634f4133e8146104e757806353482d92146104fc5761021a565b806307c97ffb1461021f5780630bea440d1461023657806324a179941461026257806330144f9614610289575b600080fd5b34801561022b57600080fd5b50610234610d4b565b005b6102346004803603604081101561024c57600080fd5b50803590602001356001600160a01b0316610e07565b34801561026e57600080fd5b5061027761186d565b60408051918252519081900360200190f35b34801561029557600080fd5b5061029e611873565b604080516001600160a01b039092168252519081900360200190f35b3480156102c657600080fd5b5061023460048036036101208110156102de57600080fd5b6001600160a01b03823581169260208101358216926040820135926060830135169160808101359160a0820135919081019060e0810160c0820135600160201b81111561032a57600080fd5b82018360208201111561033c57600080fd5b803590602001918460208302840111600160201b8311171561035d57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156103ac57600080fd5b8201836020820111156103be57600080fd5b803590602001918460208302840111600160201b831117156103df57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561042e57600080fd5b82018360208201111561044057600080fd5b803590602001918460208302840111600160201b8311171561046157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611882945050505050565b3480156104ab57600080fd5b50610277600480360360208110156104c257600080fd5b50356001600160a01b0316611c93565b3480156104de57600080fd5b5061029e611ca5565b3480156104f357600080fd5b50610277611cb4565b34801561050857600080fd5b50610234600480360360c081101561051f57600080fd5b506001600160a01b038135169060208101359060408101359060608101359060808101359060a00135611cba565b34801561055957600080fd5b50610234611e5d565b34801561056e57600080fd5b506102346004803603604081101561058557600080fd5b50803590602001356001600160a01b0316611f14565b3480156105a757600080fd5b5061029e612385565b3480156105bc57600080fd5b506105c5612394565b604080519115158252519081900360200190f35b3480156105e557600080fd5b506105c5600480360360408110156105fc57600080fd5b506001600160a01b03813516906020013561239d565b34801561061e57600080fd5b506102346123bd565b34801561063357600080fd5b506102776004803603602081101561064a57600080fd5b50356001600160a01b0316612469565b34801561066657600080fd5b5061029e61247b565b34801561067b57600080fd5b506102776004803603602081101561069257600080fd5b50356001600160a01b031661248a565b3480156106ae57600080fd5b50610277600480360360208110156106c557600080fd5b50356001600160a01b031661249c565b3480156106e157600080fd5b50610277600480360360208110156106f857600080fd5b810190602081018135600160201b81111561071257600080fd5b82018360208201111561072457600080fd5b803590602001918460208302840111600160201b8311171561074557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506124ae945050505050565b34801561078f57600080fd5b50610277600480360360208110156107a657600080fd5b50356001600160a01b03166124c7565b3480156107c257600080fd5b5061029e600480360360208110156107d957600080fd5b50356001600160a01b03166124d9565b3480156107f557600080fd5b506102346004803603604081101561080c57600080fd5b506001600160a01b03813516906020013515156124f4565b34801561083057600080fd5b5061029e6125fb565b34801561084557600080fd5b506102776004803603604081101561085c57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561088657600080fd5b82018360208201111561089857600080fd5b803590602001918460208302840111600160201b831117156108b957600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061260a945050505050565b34801561090357600080fd5b506102346004803603606081101561091a57600080fd5b506001600160a01b03813516906020810135906040013561261d565b34801561094257600080fd5b5061029e61270b565b34801561095757600080fd5b506105c56004803603602081101561096e57600080fd5b50356001600160a01b031661271a565b34801561098a57600080fd5b50610234600480360360408110156109a157600080fd5b506001600160a01b038135811691602001351661272f565b3480156109c557600080fd5b50610277600480360360608110156109dc57600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b811115610a0f57600080fd5b820183602082011115610a2157600080fd5b803590602001918460208302840111600160201b83111715610a4257600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612806945050505050565b348015610a8c57600080fd5b5061023460048036036020811015610aa357600080fd5b50356129ba565b348015610ab657600080fd5b5061027760048036036020811015610acd57600080fd5b50356001600160a01b0316612a21565b348015610ae957600080fd5b50610234600480360360a0811015610b0057600080fd5b506001600160a01b03813581169160208101358216916040820135811691606081013582169160809091013516612a33565b348015610b3e57600080fd5b50610c75600480360360a0811015610b5557600080fd5b81359160208101359160408201359190810190608081016060820135600160201b811115610b8257600080fd5b820183602082011115610b9457600080fd5b803590602001918460208302840111600160201b83111715610bb557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610c0457600080fd5b820183602082011115610c1657600080fd5b803590602001918460208302840111600160201b83111715610c3757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612c39945050505050565b6040518080602001838152602001828103825284818151815260200191508051906020019060200280838360005b83811015610cbb578181015183820152602001610ca3565b50505050905001935050505060405180910390f35b348015610cdc57600080fd5b5061023460048036036020811015610cf357600080fd5b50356001600160a01b03166132af565b348015610d0f57600080fd5b506102346133b2565b348015610d2457600080fd5b5061027760048036036020811015610d3b57600080fd5b50356001600160a01b031661346c565b610d5361347e565b6001600160a01b0316610d6461247b565b6001600160a01b031614610dad576040805162461bcd60e51b81526020600482018190526024820152600080516020614cae833981519152604482015290519081900360640190fd5b610db5612394565b610dfd576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b610e05613482565b565b610e0f612394565b15610e54576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b60026097541415610e9a576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bf3833981519152604482015290519081900360640190fd5b60026097556001600160a01b03808216600090815260cb602052604090205482911680610f01576040805162461bcd60e51b815260206004820152601060248201526f37b7363ca0b63637bbb2b22a37b5b2b760811b604482015290519081900360640190fd5b6001600160a01b038316600090815260cd6020526040902054841015610f57576040805162461bcd60e51b8152602060048083019190915260248201526353543a3160e01b604482015290519081900360640190fd5b6001600160a01b03808416600090815260cb60205260408082205460c954825163411c050960e11b8152918516600483018190529251929416926382380a129260248084019382900301818387803b158015610fb257600080fd5b505af1158015610fc6573d6000803e3d6000fd5b505060c9546001600160a01b0316915063d21df2309050610fe561347e565b836040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050600060405180830381600087803b15801561103557600080fd5b505af1158015611049573d6000803e3d6000fd5b505050506001600160a01b03841673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156110b557348511156110b0576040805162461bcd60e51b8152602060048083019190915260248201526329aa1d1960e11b604482015290519081900360640190fd5b611264565b84846001600160a01b03166370a082316110cd61347e565b6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561110a57600080fd5b505afa15801561111e573d6000803e3d6000fd5b505050506040513d602081101561113457600080fd5b50511015611172576040805162461bcd60e51b8152602060048083019190915260248201526353543a3360e01b604482015290519081900360640190fd5b6000846001600160a01b031663dd62ed3e61118b61347e565b306040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b1580156111d957600080fd5b505afa1580156111ed573d6000803e3d6000fd5b505050506040513d602081101561120357600080fd5b5051905085811015611245576040805162461bcd60e51b8152602060048083019190915260248201526314d50e8d60e21b604482015290519081900360640190fd5b61126261125061347e565b6001600160a01b038716903089613522565b505b60c9546040805162d0331760e71b81526001600160a01b0387811660048301529151889360009316916368198b80916024808301926020929190829003018186803b1580156112b257600080fd5b505afa1580156112c6573d6000803e3d6000fd5b505050506040513d60208110156112dc57600080fd5b50519050801561139c5761135f81611359856001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561132657600080fd5b505afa15801561133a573d6000803e3d6000fd5b505050506040513d602081101561135057600080fd5b50518a90613582565b906135db565b91508161139c576040805162461bcd60e51b8152602060048083019190915260248201526353543a3560e01b604482015290519081900360640190fd5b6001600160a01b03861673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156114375760c95460408051631e27076960e31b81526001600160a01b038981166004830152602482018b90529151919092169163f1383b48918a9160448082019260009290919082900301818588803b15801561141957600080fd5b505af115801561142d573d6000803e3d6000fd5b50505050506114bf565b60c954611451906001600160a01b03888116911689613642565b60c95460408051631e27076960e31b81526001600160a01b038981166004830152602482018b90529151919092169163f1383b4891604480830192600092919082900301818387803b1580156114a657600080fd5b505af11580156114ba573d6000803e3d6000fd5b505050505b60c95460408051638385310960e01b81526001600160a01b03868116600483015291516000939290921691638385310991602480820192602092909190829003018186803b15801561151057600080fd5b505afa158015611524573d6000803e3d6000fd5b505050506040513d602081101561153a57600080fd5b505190506001600160a01b03841663156e29f661155561347e565b85846040518463ffffffff1660e01b815260040180846001600160a01b031681526020018381526020018281526020019350505050600060405180830381600087803b1580156115a457600080fd5b505af11580156115b8573d6000803e3d6000fd5b505050506000846001600160a01b03166370a082316115d561347e565b6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561161257600080fd5b505afa158015611626573d6000803e3d6000fd5b505050506040513d602081101561163c57600080fd5b50516001600160a01b038916600090815260d46020526040902054909150611664848b613699565b11156116a0576040805162461bcd60e51b8152602060048083019190915260248201526329aa1d1b60e11b604482015290519081900360640190fd5b600061171e866001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116de57600080fd5b505afa1580156116f2573d6000803e3d6000fd5b505050506040513d602081101561170857600080fd5b5051611359611717878e613699565b8590613582565b6001600160a01b038a16600090815260d56020526040902054909150811115611777576040805162461bcd60e51b8152602060048083019190915260248201526353543a3760e01b604482015290519081900360640190fd5b856001600160a01b0316896001600160a01b031661179361347e565b6001600160a01b03167f56b979e9b46a67281f3dbc5530b6ff33209f39d56a6d7b737a978eae0c2768948d898b6001600160a01b03166370a082316117d661347e565b6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561181357600080fd5b505afa158015611827573d6000803e3d6000fd5b505050506040513d602081101561183d57600080fd5b505160408051938452602084019290925282820152519081900360600190a4505060016097555050505050505050565b61271081565b60c9546001600160a01b031681565b600260975414156118c8576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bf3833981519152604482015290519081900360640190fd5b60026097556118d5612394565b1561191a576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6001600160a01b03808716600090815260cb60205260409020548791168061197c576040805162461bcd60e51b815260206004820152601060248201526f37b7363ca0b63637bbb2b22a37b5b2b760811b604482015290519081900360640190fd5b6040805130606090811b6020808401919091526bffffffffffffffffffffffff198f831b811660348501528e831b81166048850152605c84018e9052918c901b909116607c830152609082018a905260b08083018a90528351808403909101815260d0830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060f084015261010c8084018290528451808503909101815261012c9093019093528151910120865160009060019083908a908490611a4457fe5b602002602001015189600081518110611a5957fe5b602002602001015189600081518110611a6e57fe5b602002602001015160405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611aca573d6000803e3d6000fd5b505060408051601f1901516001600160a01b038116600090815260d7602052919091205490925060ff169050611b30576040805162461bcd60e51b815260206004820152600660248201526557544b4e3a3160d01b604482015290519081900360640190fd5b6001600160a01b038d16600090815260d8602090815260408083208d845290915290205460ff1615611b92576040805162461bcd60e51b81526020600482015260066024820152652baa25a71d1960d11b604482015290519081900360640190fd5b6001600160a01b038d16600090815260d8602090815260408083208d84529091528120805460ff19166001179055611bc861347e565b90508e6001600160a01b0316816001600160a01b03161480611bfb57508d6001600160a01b0316816001600160a01b0316145b611c35576040805162461bcd60e51b815260206004820152600660248201526557544b4e3a3360d01b604482015290519081900360640190fd5b894310611c72576040805162461bcd60e51b815260206004820152600660248201526515d512d38e8d60d21b604482015290519081900360640190fd5b611c7d8e8e8e6136f3565b5050600160975550505050505050505050505050565b60cf6020526000908152604090205481565b60d6546001600160a01b031681565b60cc5481565b611cc261347e565b6001600160a01b0316611cd361247b565b6001600160a01b031614611d1c576040805162461bcd60e51b81526020600482018190526024820152600080516020614cae833981519152604482015290519081900360640190fd5b6001600160a01b03808716600090815260cb602052604090205487911680611d7e576040805162461bcd60e51b815260206004820152601060248201526f37b7363ca0b63637bbb2b22a37b5b2b760811b604482015290519081900360640190fd5b6001600160a01b038816611dc1576040805162461bcd60e51b81526020600482015260056024820152645353493a3160d81b604482015290519081900360640190fd5b6001600160a01b038816600090815260cd60205260409020879055848610611e18576040805162461bcd60e51b815260206004820152600560248201526429a9a49d1960d91b604482015290519081900360640190fd5b50506001600160a01b03909516600090815260ce602090815260408083209590955560cf81528482209390935560d083528381209190915560d1909152209190915550565b611e6561347e565b6001600160a01b0316611e7661247b565b6001600160a01b031614611ebf576040805162461bcd60e51b81526020600482018190526024820152600080516020614cae833981519152604482015290519081900360640190fd5b611ec7612394565b15611f0c576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610e05613cb2565b60026097541415611f5a576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bf3833981519152604482015290519081900360640190fd5b6002609755611f67612394565b15611fac576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6001600160a01b03808216600090815260cb60205260409020548291168061200e576040805162461bcd60e51b815260206004820152601060248201526f37b7363ca0b63637bbb2b22a37b5b2b760811b604482015290519081900360640190fd5b6001600160a01b038316600090815260ce6020526040902054841080159061204e57506001600160a01b038316600090815260cf60205260409020548411155b612088576040805162461bcd60e51b8152602060048083019190915260248201526350553a3160e01b604482015290519081900360640190fd5b6001600160a01b03808416600081815260cb60209081526040918290205460c954835162d0331760e71b8152600481019590955292519085169489949316926368198b80926024808301939192829003018186803b1580156120e957600080fd5b505afa1580156120fd573d6000803e3d6000fd5b505050506040513d602081101561211357600080fd5b50511015612151576040805162461bcd60e51b81526020600480830191909152602482015263282a9d1960e11b604482015290519081900360640190fd5b60c9546040805162d0331760e71b81526001600160a01b03878116600483015291516000936122459316916368198b80916024808301926020929190829003018186803b1580156121a157600080fd5b505afa1580156121b5573d6000803e3d6000fd5b505050506040513d60208110156121cb57600080fd5b5051604080516318160ddd60e01b81529051611359916001600160a01b038716916318160ddd91600480820192602092909190829003018186803b15801561221257600080fd5b505afa158015612226573d6000803e3d6000fd5b505050506040513d602081101561223c57600080fd5b50518990613582565b905080612282576040805162461bcd60e51b8152602060048083019190915260248201526350553a3360e01b604482015290519081900360640190fd5b816001600160a01b03166387c1900961229961347e565b6001600160a01b03808916600090815260d060205260408082205481516001600160e01b031960e088901b168152949093166004850152602484018790526044840192909252905160648084019382900301818387803b1580156122fc57600080fd5b505af1158015612310573d6000803e3d6000fd5b50505050816001600160a01b0316856001600160a01b031661233061347e565b6001600160a01b03167f88f5e7447128c2ba9b5cc2f585138f64ffa16636d5c8f51b8beba06e9daac37c8985604051808381526020018281526020019250505060405180910390a45050600160975550505050565b60d3546001600160a01b031681565b60655460ff1690565b60d860209081526000928352604080842090915290825290205460ff1681565b6123c561347e565b6001600160a01b03166123d661247b565b6001600160a01b03161461241f576040805162461bcd60e51b81526020600482018190526024820152600080516020614cae833981519152604482015290519081900360640190fd5b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b60cd6020526000908152604090205481565b6033546001600160a01b031690565b60d46020526000908152604090205481565b60ce6020526000908152604090205481565b60006124c16124bb61347e565b83613d35565b92915050565b60d56020526000908152604090205481565b60cb602052600090815260409020546001600160a01b031681565b6124fc61347e565b6001600160a01b031661250d61247b565b6001600160a01b031614612556576040805162461bcd60e51b81526020600482018190526024820152600080516020614cae833981519152604482015290519081900360640190fd5b6001600160a01b03821661259b576040805162461bcd60e51b8152602060048201526007602482015266535343533a203160c81b604482015290519081900360640190fd5b6001600160a01b038216600081815260d76020908152604091829020805460ff1916851515908117909155825190815291517fa222be676a22a832fb7f47c0bac54bb3431e55330eb3085af1d76f64e9f1e2689281900390910190a25050565b60ca546001600160a01b031681565b60006126168383613d35565b9392505050565b61262561347e565b6001600160a01b031661263661247b565b6001600160a01b03161461267f576040805162461bcd60e51b81526020600482018190526024820152600080516020614cae833981519152604482015290519081900360640190fd5b6001600160a01b03808416600090815260cb6020526040902054849116806126e1576040805162461bcd60e51b815260206004820152601060248201526f37b7363ca0b63637bbb2b22a37b5b2b760811b604482015290519081900360640190fd5b50506001600160a01b03909216600090815260d4602090815260408083209390935560d590522055565b60d2546001600160a01b031681565b60d76020526000908152604090205460ff1681565b61273761347e565b6001600160a01b031661274861247b565b6001600160a01b031614612791576040805162461bcd60e51b81526020600482018190526024820152600080516020614cae833981519152604482015290519081900360640190fd5b6001600160a01b0382166127d8576040805162461bcd60e51b81526020600482015260096024820152685354544c50544d3a3160b81b604482015290519081900360640190fd5b6001600160a01b03918216600090815260cb6020526040902080546001600160a01b03191691909216179055565b60d2546000906001600160a01b0316632a1450ea3061282361347e565b6040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561287057600080fd5b505afa158015612884573d6000803e3d6000fd5b505050506040513d602081101561289a57600080fd5b5051806128c657506128aa61247b565b6001600160a01b03166128bb61347e565b6001600160a01b0316145b612907576040805162461bcd60e51b815260206004820152600d60248201526c30b63637bbb2b221b0b63632b960991b604482015290519081900360640190fd5b61290f612394565b15612954576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002609754141561299a576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bf3833981519152604482015290519081900360640190fd5b600260975560006129ac858585613f35565b600160975595945050505050565b6129c261347e565b6001600160a01b03166129d361247b565b6001600160a01b031614612a1c576040805162461bcd60e51b81526020600482018190526024820152600080516020614cae833981519152604482015290519081900360640190fd5b60cc55565b60d06020526000908152604090205481565b612a3b61347e565b6001600160a01b0316612a4c61247b565b6001600160a01b031614612a95576040805162461bcd60e51b81526020600482018190526024820152600080516020614cae833981519152604482015290519081900360640190fd5b6001600160a01b038516612ad6576040805162461bcd60e51b8152602060048201526003602482015262533a3160e81b604482015290519081900360640190fd5b6001600160a01b038416612b17576040805162461bcd60e51b8152602060048201526003602482015262299d1960e91b604482015290519081900360640190fd5b6001600160a01b038316612b58576040805162461bcd60e51b8152602060048201526003602482015262533a3360e81b604482015290519081900360640190fd5b6001600160a01b038216612b99576040805162461bcd60e51b815260206004820152600360248201526214ce8d60ea1b604482015290519081900360640190fd5b6001600160a01b038116612bda576040805162461bcd60e51b8152602060048201526003602482015262533a3560e81b604482015290519081900360640190fd5b60d280546001600160a01b03199081166001600160a01b039788161790915560c9805482169587169590951790945560ca805485169386169390931790925560d38054841691851691909117905560d680549092169216919091179055565b606060006305f5e100871015612c80576040805162461bcd60e51b8152602060048201526007602482015266475242504c3a3160c81b604482015290519081900360640190fd5b60008611612cbf576040805162461bcd60e51b815260206004820152600760248201526623a92128261d1960c91b604482015290519081900360640190fd5b612710851115612d00576040805162461bcd60e51b8152602060048201526007602482015266475242504c3a3360c81b604482015290519081900360640190fd5b60cc54835185510114612d44576040805162461bcd60e51b815260206004820152600760248201526611d49094130e8d60ca1b604482015290519081900360640190fd5b6060835185510167ffffffffffffffff81118015612d6157600080fd5b50604051908082528060200260200182016040528015612d8b578160200160208202803683370190505b5090506060815167ffffffffffffffff81118015612da857600080fd5b50604051908082528060200260200182016040528015612dd2578160200160208202803683370190505b509050600080888b8b835b8b518110156130ac5760006001600160a01b031660cb60008e8481518110612e0157fe5b6020908102919091018101516001600160a01b0390811683529082019290925260400160002054161415612e66576040805162461bcd60e51b8152602060048201526007602482015266475242504c3a3560c81b604482015290519081900360640190fd5b60c9548c516000916001600160a01b0316906368198b80908f9085908110612e8a57fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612ecf57600080fd5b505afa158015612ee3573d6000803e3d6000fd5b505050506040513d6020811015612ef957600080fd5b81019080805190602001909291905050509050600060d660009054906101000a90046001600160a01b03166001600160a01b0316636947ac658f8581518110612f3e57fe5b602002602001015160c960009054906101000a90046001600160a01b03166001600160a01b03166369940d796040518163ffffffff1660e01b815260040160206040518083038186803b158015612f9457600080fd5b505afa158015612fa8573d6000803e3d6000fd5b505050506040513d6020811015612fbe57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201869052516064808301926020929190829003018186803b15801561301557600080fd5b505afa158015613029573d6000803e3d6000fd5b505050506040513d602081101561303f57600080fd5b5051905061305561271061135986818a86613582565b8a888151811061306157fe5b6020026020010181815250506130938a888151811061307c57fe5b60200260200101518961369990919063ffffffff16565b97506130a0876001613699565b96505050600101612ddd565b5060005b8a518110156132445760006001600160a01b031660cb60008d84815181106130d457fe5b6020908102919091018101516001600160a01b0390811683529082019290925260400160002054161415613139576040805162461bcd60e51b815260206004820152600760248201526623a92128261d1b60c91b604482015290519081900360640190fd5b60c9548b516001600160a01b039091169063fb25e5b99060cb906000908f908690811061316257fe5b6020908102919091018101516001600160a01b0390811683528282019390935260409182016000205482516001600160e01b031960e087901b168152931660048401529051602480840193829003018186803b1580156131c157600080fd5b505afa1580156131d5573d6000803e3d6000fd5b505050506040513d60208110156131eb57600080fd5b505188518990879081106131fb57fe5b60200260200101818152505061322d88868151811061321657fe5b60200260200101518761369990919063ffffffff16565b955061323a856001613699565b94506001016130b0565b5060005b875181101561329a5761327b866113598a848151811061326457fe5b60200260200101518661358290919063ffffffff16565b87828151811061328757fe5b6020908102919091010152600101613248565b50949d939c50929a5050505050505050505050565b6132b761347e565b6001600160a01b03166132c861247b565b6001600160a01b031614613311576040805162461bcd60e51b81526020600482018190526024820152600080516020614cae833981519152604482015290519081900360640190fd5b6001600160a01b0381166133565760405162461bcd60e51b8152600401808060200182810382526026815260200180614c136026913960400191505060405180910390fd5b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16806133cb57506133cb6143fd565b806133d9575060005460ff16155b6134145760405162461bcd60e51b815260040180806020018281038252602e815260200180614c5f602e913960400191505060405180910390fd5b600054610100900460ff1615801561343f576000805460ff1961ff0019909116610100171660011790555b61344761440e565b61344f6144ab565b613457614548565b8015613469576000805461ff00191690555b50565b60d16020526000908152604090205481565b3390565b61348a612394565b6134d2576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61350561347e565b604080516001600160a01b039092168252519081900360200190a1565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261357c9085906145dd565b50505050565b600082613591575060006124c1565b8282028284828161359e57fe5b04146126165760405162461bcd60e51b8152600401808060200182810382526021815260200180614c8d6021913960400191505060405180910390fd5b6000808211613631576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161363a57fe5b049392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526136949084906145dd565b505050565b600082820183811015612616576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008211613731576040805162461bcd60e51b8152602060048083019190915260248201526357543a3160e01b604482015290519081900360640190fd5b6001600160a01b03808216600090815260cb60205260408082205460c954825163411c050960e11b8152918516600483018190529251929416926382380a129260248084019382900301818387803b15801561378c57600080fd5b505af11580156137a0573d6000803e3d6000fd5b505060c95460408051630d21df2360e41b81526001600160a01b0389811660048301528681166024830152915191909216935063d21df2309250604480830192600092919082900301818387803b1580156137fa57600080fd5b505af115801561380e573d6000803e3d6000fd5b505060c9546040805162d0331760e71b81526001600160a01b03878116600483015291518895509190921692506368198b8091602480820192602092909190829003018186803b15801561386157600080fd5b505afa158015613875573d6000803e3d6000fd5b505050506040513d602081101561388b57600080fd5b50516138c7576040805162461bcd60e51b815260206004808301919091526024820152632baa1d1960e11b604482015290519081900360640190fd5b60c9546040805162d0331760e71b81526001600160a01b03868116600483015291516139bc9392909216916368198b8091602480820192602092909190829003018186803b15801561391857600080fd5b505afa15801561392c573d6000803e3d6000fd5b505050506040513d602081101561394257600080fd5b5051604080516318160ddd60e01b81529051611359916001600160a01b038716916318160ddd91600480820192602092909190829003018186803b15801561398957600080fd5b505afa15801561399d573d6000803e3d6000fd5b505050506040513d60208110156139b357600080fd5b50518790613582565b9050806139f9576040805162461bcd60e51b8152602060048083019190915260248201526357543a3360e01b604482015290519081900360640190fd5b6001600160a01b038316600090815260d16020526040812054613a30906127109061135990613a2990839061468e565b8890613582565b60c95460ca549192506001600160a01b039081169163f4e6ae329189918591899116613a5c8b8461468e565b6040518663ffffffff1660e01b815260040180866001600160a01b03168152602001858152602001846001600160a01b03168152602001836001600160a01b0316815260200182815260200195505050505050600060405180830381600087803b158015613ac957600080fd5b505af1158015613add573d6000803e3d6000fd5b505060c95460408051638385310960e01b81526001600160a01b038881166004830152915160009550919092169250638385310991602480820192602092909190829003018186803b158015613b3257600080fd5b505afa158015613b46573d6000803e3d6000fd5b505050506040513d6020811015613b5c57600080fd5b505160408051637a94c56560e11b81526001600160a01b038a81166004830152602482018790526044820184905291519293509086169163f5298aca9160648082019260009290919082900301818387803b158015613bba57600080fd5b505af1158015613bce573d6000803e3d6000fd5b50505050836001600160a01b0316856001600160a01b0316886001600160a01b03167f446008ad6434fd480b7f9ec90b91fd0700c2562020d7e62bb2310462901296ce8987896001600160a01b03166370a082318e6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015613c6057600080fd5b505afa158015613c74573d6000803e3d6000fd5b505050506040513d6020811015613c8a57600080fd5b505160408051938452602084019290925282820152519081900360600190a450505050505050565b613cba612394565b15613cff576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861350561347e565b600060cc5482511115613d78576040805162461bcd60e51b8152602060048201526006602482015265535246503a3160d01b604482015290519081900360640190fd5b6000805b8351811015613f2d576000848281518110613d9357fe5b6020908102919091018101516001600160a01b03808216600090815260cb9093526040909220549092501680613df9576040805162461bcd60e51b815260206004820152600660248201526529a923281d1960d11b604482015290519081900360640190fd5b60c9546040805163118e19b760e11b81526001600160a01b038a8116600483015284811660248301529151600093929092169163231c336e91604480820192602092909190829003018186803b158015613e5257600080fd5b505afa158015613e66573d6000803e3d6000fd5b505050506040513d6020811015613e7c57600080fd5b505160c95460408051630402d22560e01b81526001600160a01b038c81166004830152868116602483015291519394506000939190921691630402d225916044808301926020929190829003018186803b158015613ed957600080fd5b505afa158015613eed573d6000803e3d6000fd5b505050506040513d6020811015613f0357600080fd5b50519050613f1b81613f158885613699565b90613699565b95505060019093019250613d7c915050565b509392505050565b60006001600160a01b038316613f7c576040805162461bcd60e51b81526020600482015260076024820152665f555246503a3160c81b604482015290519081900360640190fd5b60cc5482511115613fbe576040805162461bcd60e51b81526020600482015260076024820152662faaa923281d1960c91b604482015290519081900360640190fd5b6000805b83518110156143f4576000848281518110613fd957fe5b6020908102919091018101516001600160a01b03808216600090815260cb9093526040909220549092501680614040576040805162461bcd60e51b81526020600482015260076024820152665f555246503a3360c81b604482015290519081900360640190fd5b806001600160a01b03166370a08231896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561408d57600080fd5b505afa1580156140a1573d6000803e3d6000fd5b505050506040513d60208110156140b757600080fd5b5051156141935760c9546040805163411c050960e11b81526001600160a01b038481166004830152915191909216916382380a1291602480830192600092919082900301818387803b15801561410c57600080fd5b505af1158015614120573d6000803e3d6000fd5b505060c95460408051630d21df2360e41b81526001600160a01b038d811660048301528681166024830152915191909216935063d21df2309250604480830192600092919082900301818387803b15801561417a57600080fd5b505af115801561418e573d6000803e3d6000fd5b505050505b60c95460408051639e9df5d760e01b81526001600160a01b038b8116600483015284811660248301528a8116604483015291516000939290921691639e9df5d79160648082019260209290919082900301818787803b1580156141f557600080fd5b505af1158015614209573d6000803e3d6000fd5b505050506040513d602081101561421f57600080fd5b5051905061422d8582613699565b9450816001600160a01b03166370a082318a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561427c57600080fd5b505afa158015614290573d6000803e3d6000fd5b505050506040513d60208110156142a657600080fd5b50511561439e5760c95460408051638385310960e01b81526001600160a01b03858116600483015291516000939290921691638385310991602480820192602092909190829003018186803b1580156142fe57600080fd5b505afa158015614312573d6000803e3d6000fd5b505050506040513d602081101561432857600080fd5b505160408051630ab714fb60e11b81526001600160a01b038d8116600483015260006024830181905260448301859052925193945086169263156e29f69260648084019391929182900301818387803b15801561438457600080fd5b505af1158015614398573d6000803e3d6000fd5b50505050505b826001600160a01b0316896001600160a01b03167ffd23f4e95e7c61bcc50c97b29c0573e8ea5176be3f3ce3282fe8fb122e967767836040518082815260200191505060405180910390a3505050600101613fc2565b50949350505050565b6000614408306146eb565b15905090565b600054610100900460ff168061442757506144276143fd565b80614435575060005460ff16155b6144705760405162461bcd60e51b815260040180806020018281038252602e815260200180614c5f602e913960400191505060405180910390fd5b600054610100900460ff1615801561449b576000805460ff1961ff0019909116610100171660011790555b6144a36146f1565b613457614791565b600054610100900460ff16806144c457506144c46143fd565b806144d2575060005460ff16155b61450d5760405162461bcd60e51b815260040180806020018281038252602e815260200180614c5f602e913960400191505060405180910390fd5b600054610100900460ff16158015614538576000805460ff1961ff0019909116610100171660011790555b6145406146f1565b61345761488a565b600054610100900460ff168061456157506145616143fd565b8061456f575060005460ff16155b6145aa5760405162461bcd60e51b815260040180806020018281038252602e815260200180614c5f602e913960400191505060405180910390fd5b600054610100900460ff161580156145d5576000805460ff1961ff0019909116610100171660011790555b613457614935565b6060614632826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166149db9092919063ffffffff16565b8051909150156136945780806020019051602081101561465157600080fd5b50516136945760405162461bcd60e51b815260040180806020018281038252602a815260200180614cce602a913960400191505060405180910390fd5b6000828211156146e5576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b3b151590565b600054610100900460ff168061470a575061470a6143fd565b80614718575060005460ff16155b6147535760405162461bcd60e51b815260040180806020018281038252602e815260200180614c5f602e913960400191505060405180910390fd5b600054610100900460ff16158015613457576000805460ff1961ff0019909116610100171660011790558015613469576000805461ff001916905550565b600054610100900460ff16806147aa57506147aa6143fd565b806147b8575060005460ff16155b6147f35760405162461bcd60e51b815260040180806020018281038252602e815260200180614c5f602e913960400191505060405180910390fd5b600054610100900460ff1615801561481e576000805460ff1961ff0019909116610100171660011790555b600061482861347e565b603380546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015613469576000805461ff001916905550565b600054610100900460ff16806148a357506148a36143fd565b806148b1575060005460ff16155b6148ec5760405162461bcd60e51b815260040180806020018281038252602e815260200180614c5f602e913960400191505060405180910390fd5b600054610100900460ff16158015614917576000805460ff1961ff0019909116610100171660011790555b6065805460ff191690558015613469576000805461ff001916905550565b600054610100900460ff168061494e575061494e6143fd565b8061495c575060005460ff16155b6149975760405162461bcd60e51b815260040180806020018281038252602e815260200180614c5f602e913960400191505060405180910390fd5b600054610100900460ff161580156149c2576000805460ff1961ff0019909116610100171660011790555b60016097558015613469576000805461ff001916905550565b60606149ea84846000856149f2565b949350505050565b606082471015614a335760405162461bcd60e51b8152600401808060200182810382526026815260200180614c396026913960400191505060405180910390fd5b614a3c856146eb565b614a8d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310614acc5780518252601f199092019160209182019101614aad565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614b2e576040519150601f19603f3d011682016040523d82523d6000602084013e614b33565b606091505b5091509150614b43828286614b4e565b979650505050505050565b60608315614b5d575081612616565b825115614b6d5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614bb7578181015183820152602001614b9f565b50505050905090810190601f168015614be45780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212207a8e04dab53bf8ff8cca81801624d7719ee18c854875979c1e12fd56bbed50ca64736f6c63430007030033
Deployed Bytecode
0x60806040526004361061021a5760003560e01c8063929a6ee311610123578063bea4b343116100ab578063ebc278381161006f578063ebc2783814610add578063ed05d4a114610b32578063f2fde38b14610cd0578063f9bdf82f14610d03578063faf295ca14610d185761021a565b8063bea4b3431461094b578063bf766f5c1461097e578063d5c71c37146109b9578063d7269dc314610a80578063dc7894c214610aaa5761021a565b8063ae0b378e116100f2578063ae0b378e146107e9578063ae2e933b14610824578063b4d7902e14610839578063b6b2b376146108f7578063b870029c146109365761021a565b8063929a6ee3146106a257806397dad231146106d5578063a651cd2514610783578063abd915d7146107b65761021a565b8063595c6a67116101a657806369dcf98e1161017557806369dcf98e146105d9578063715018a6146106125780637a5e7bdb146106275780638da5cb5b1461065a57806390323f871461066f5761021a565b8063595c6a671461054d5780635ace4df7146105625780635bfb75081461059b5780635c975abb146105b05761021a565b806331e6cbb4116101ed57806331e6cbb4146102ba5780633a59cfee1461049f5780633ba0b9a9146104d25780634f4133e8146104e757806353482d92146104fc5761021a565b806307c97ffb1461021f5780630bea440d1461023657806324a179941461026257806330144f9614610289575b600080fd5b34801561022b57600080fd5b50610234610d4b565b005b6102346004803603604081101561024c57600080fd5b50803590602001356001600160a01b0316610e07565b34801561026e57600080fd5b5061027761186d565b60408051918252519081900360200190f35b34801561029557600080fd5b5061029e611873565b604080516001600160a01b039092168252519081900360200190f35b3480156102c657600080fd5b5061023460048036036101208110156102de57600080fd5b6001600160a01b03823581169260208101358216926040820135926060830135169160808101359160a0820135919081019060e0810160c0820135600160201b81111561032a57600080fd5b82018360208201111561033c57600080fd5b803590602001918460208302840111600160201b8311171561035d57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156103ac57600080fd5b8201836020820111156103be57600080fd5b803590602001918460208302840111600160201b831117156103df57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561042e57600080fd5b82018360208201111561044057600080fd5b803590602001918460208302840111600160201b8311171561046157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611882945050505050565b3480156104ab57600080fd5b50610277600480360360208110156104c257600080fd5b50356001600160a01b0316611c93565b3480156104de57600080fd5b5061029e611ca5565b3480156104f357600080fd5b50610277611cb4565b34801561050857600080fd5b50610234600480360360c081101561051f57600080fd5b506001600160a01b038135169060208101359060408101359060608101359060808101359060a00135611cba565b34801561055957600080fd5b50610234611e5d565b34801561056e57600080fd5b506102346004803603604081101561058557600080fd5b50803590602001356001600160a01b0316611f14565b3480156105a757600080fd5b5061029e612385565b3480156105bc57600080fd5b506105c5612394565b604080519115158252519081900360200190f35b3480156105e557600080fd5b506105c5600480360360408110156105fc57600080fd5b506001600160a01b03813516906020013561239d565b34801561061e57600080fd5b506102346123bd565b34801561063357600080fd5b506102776004803603602081101561064a57600080fd5b50356001600160a01b0316612469565b34801561066657600080fd5b5061029e61247b565b34801561067b57600080fd5b506102776004803603602081101561069257600080fd5b50356001600160a01b031661248a565b3480156106ae57600080fd5b50610277600480360360208110156106c557600080fd5b50356001600160a01b031661249c565b3480156106e157600080fd5b50610277600480360360208110156106f857600080fd5b810190602081018135600160201b81111561071257600080fd5b82018360208201111561072457600080fd5b803590602001918460208302840111600160201b8311171561074557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506124ae945050505050565b34801561078f57600080fd5b50610277600480360360208110156107a657600080fd5b50356001600160a01b03166124c7565b3480156107c257600080fd5b5061029e600480360360208110156107d957600080fd5b50356001600160a01b03166124d9565b3480156107f557600080fd5b506102346004803603604081101561080c57600080fd5b506001600160a01b03813516906020013515156124f4565b34801561083057600080fd5b5061029e6125fb565b34801561084557600080fd5b506102776004803603604081101561085c57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561088657600080fd5b82018360208201111561089857600080fd5b803590602001918460208302840111600160201b831117156108b957600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061260a945050505050565b34801561090357600080fd5b506102346004803603606081101561091a57600080fd5b506001600160a01b03813516906020810135906040013561261d565b34801561094257600080fd5b5061029e61270b565b34801561095757600080fd5b506105c56004803603602081101561096e57600080fd5b50356001600160a01b031661271a565b34801561098a57600080fd5b50610234600480360360408110156109a157600080fd5b506001600160a01b038135811691602001351661272f565b3480156109c557600080fd5b50610277600480360360608110156109dc57600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b811115610a0f57600080fd5b820183602082011115610a2157600080fd5b803590602001918460208302840111600160201b83111715610a4257600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612806945050505050565b348015610a8c57600080fd5b5061023460048036036020811015610aa357600080fd5b50356129ba565b348015610ab657600080fd5b5061027760048036036020811015610acd57600080fd5b50356001600160a01b0316612a21565b348015610ae957600080fd5b50610234600480360360a0811015610b0057600080fd5b506001600160a01b03813581169160208101358216916040820135811691606081013582169160809091013516612a33565b348015610b3e57600080fd5b50610c75600480360360a0811015610b5557600080fd5b81359160208101359160408201359190810190608081016060820135600160201b811115610b8257600080fd5b820183602082011115610b9457600080fd5b803590602001918460208302840111600160201b83111715610bb557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610c0457600080fd5b820183602082011115610c1657600080fd5b803590602001918460208302840111600160201b83111715610c3757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612c39945050505050565b6040518080602001838152602001828103825284818151815260200191508051906020019060200280838360005b83811015610cbb578181015183820152602001610ca3565b50505050905001935050505060405180910390f35b348015610cdc57600080fd5b5061023460048036036020811015610cf357600080fd5b50356001600160a01b03166132af565b348015610d0f57600080fd5b506102346133b2565b348015610d2457600080fd5b5061027760048036036020811015610d3b57600080fd5b50356001600160a01b031661346c565b610d5361347e565b6001600160a01b0316610d6461247b565b6001600160a01b031614610dad576040805162461bcd60e51b81526020600482018190526024820152600080516020614cae833981519152604482015290519081900360640190fd5b610db5612394565b610dfd576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b610e05613482565b565b610e0f612394565b15610e54576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b60026097541415610e9a576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bf3833981519152604482015290519081900360640190fd5b60026097556001600160a01b03808216600090815260cb602052604090205482911680610f01576040805162461bcd60e51b815260206004820152601060248201526f37b7363ca0b63637bbb2b22a37b5b2b760811b604482015290519081900360640190fd5b6001600160a01b038316600090815260cd6020526040902054841015610f57576040805162461bcd60e51b8152602060048083019190915260248201526353543a3160e01b604482015290519081900360640190fd5b6001600160a01b03808416600090815260cb60205260408082205460c954825163411c050960e11b8152918516600483018190529251929416926382380a129260248084019382900301818387803b158015610fb257600080fd5b505af1158015610fc6573d6000803e3d6000fd5b505060c9546001600160a01b0316915063d21df2309050610fe561347e565b836040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050600060405180830381600087803b15801561103557600080fd5b505af1158015611049573d6000803e3d6000fd5b505050506001600160a01b03841673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156110b557348511156110b0576040805162461bcd60e51b8152602060048083019190915260248201526329aa1d1960e11b604482015290519081900360640190fd5b611264565b84846001600160a01b03166370a082316110cd61347e565b6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561110a57600080fd5b505afa15801561111e573d6000803e3d6000fd5b505050506040513d602081101561113457600080fd5b50511015611172576040805162461bcd60e51b8152602060048083019190915260248201526353543a3360e01b604482015290519081900360640190fd5b6000846001600160a01b031663dd62ed3e61118b61347e565b306040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b1580156111d957600080fd5b505afa1580156111ed573d6000803e3d6000fd5b505050506040513d602081101561120357600080fd5b5051905085811015611245576040805162461bcd60e51b8152602060048083019190915260248201526314d50e8d60e21b604482015290519081900360640190fd5b61126261125061347e565b6001600160a01b038716903089613522565b505b60c9546040805162d0331760e71b81526001600160a01b0387811660048301529151889360009316916368198b80916024808301926020929190829003018186803b1580156112b257600080fd5b505afa1580156112c6573d6000803e3d6000fd5b505050506040513d60208110156112dc57600080fd5b50519050801561139c5761135f81611359856001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561132657600080fd5b505afa15801561133a573d6000803e3d6000fd5b505050506040513d602081101561135057600080fd5b50518a90613582565b906135db565b91508161139c576040805162461bcd60e51b8152602060048083019190915260248201526353543a3560e01b604482015290519081900360640190fd5b6001600160a01b03861673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156114375760c95460408051631e27076960e31b81526001600160a01b038981166004830152602482018b90529151919092169163f1383b48918a9160448082019260009290919082900301818588803b15801561141957600080fd5b505af115801561142d573d6000803e3d6000fd5b50505050506114bf565b60c954611451906001600160a01b03888116911689613642565b60c95460408051631e27076960e31b81526001600160a01b038981166004830152602482018b90529151919092169163f1383b4891604480830192600092919082900301818387803b1580156114a657600080fd5b505af11580156114ba573d6000803e3d6000fd5b505050505b60c95460408051638385310960e01b81526001600160a01b03868116600483015291516000939290921691638385310991602480820192602092909190829003018186803b15801561151057600080fd5b505afa158015611524573d6000803e3d6000fd5b505050506040513d602081101561153a57600080fd5b505190506001600160a01b03841663156e29f661155561347e565b85846040518463ffffffff1660e01b815260040180846001600160a01b031681526020018381526020018281526020019350505050600060405180830381600087803b1580156115a457600080fd5b505af11580156115b8573d6000803e3d6000fd5b505050506000846001600160a01b03166370a082316115d561347e565b6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561161257600080fd5b505afa158015611626573d6000803e3d6000fd5b505050506040513d602081101561163c57600080fd5b50516001600160a01b038916600090815260d46020526040902054909150611664848b613699565b11156116a0576040805162461bcd60e51b8152602060048083019190915260248201526329aa1d1b60e11b604482015290519081900360640190fd5b600061171e866001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116de57600080fd5b505afa1580156116f2573d6000803e3d6000fd5b505050506040513d602081101561170857600080fd5b5051611359611717878e613699565b8590613582565b6001600160a01b038a16600090815260d56020526040902054909150811115611777576040805162461bcd60e51b8152602060048083019190915260248201526353543a3760e01b604482015290519081900360640190fd5b856001600160a01b0316896001600160a01b031661179361347e565b6001600160a01b03167f56b979e9b46a67281f3dbc5530b6ff33209f39d56a6d7b737a978eae0c2768948d898b6001600160a01b03166370a082316117d661347e565b6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561181357600080fd5b505afa158015611827573d6000803e3d6000fd5b505050506040513d602081101561183d57600080fd5b505160408051938452602084019290925282820152519081900360600190a4505060016097555050505050505050565b61271081565b60c9546001600160a01b031681565b600260975414156118c8576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bf3833981519152604482015290519081900360640190fd5b60026097556118d5612394565b1561191a576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6001600160a01b03808716600090815260cb60205260409020548791168061197c576040805162461bcd60e51b815260206004820152601060248201526f37b7363ca0b63637bbb2b22a37b5b2b760811b604482015290519081900360640190fd5b6040805130606090811b6020808401919091526bffffffffffffffffffffffff198f831b811660348501528e831b81166048850152605c84018e9052918c901b909116607c830152609082018a905260b08083018a90528351808403909101815260d0830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060f084015261010c8084018290528451808503909101815261012c9093019093528151910120865160009060019083908a908490611a4457fe5b602002602001015189600081518110611a5957fe5b602002602001015189600081518110611a6e57fe5b602002602001015160405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611aca573d6000803e3d6000fd5b505060408051601f1901516001600160a01b038116600090815260d7602052919091205490925060ff169050611b30576040805162461bcd60e51b815260206004820152600660248201526557544b4e3a3160d01b604482015290519081900360640190fd5b6001600160a01b038d16600090815260d8602090815260408083208d845290915290205460ff1615611b92576040805162461bcd60e51b81526020600482015260066024820152652baa25a71d1960d11b604482015290519081900360640190fd5b6001600160a01b038d16600090815260d8602090815260408083208d84529091528120805460ff19166001179055611bc861347e565b90508e6001600160a01b0316816001600160a01b03161480611bfb57508d6001600160a01b0316816001600160a01b0316145b611c35576040805162461bcd60e51b815260206004820152600660248201526557544b4e3a3360d01b604482015290519081900360640190fd5b894310611c72576040805162461bcd60e51b815260206004820152600660248201526515d512d38e8d60d21b604482015290519081900360640190fd5b611c7d8e8e8e6136f3565b5050600160975550505050505050505050505050565b60cf6020526000908152604090205481565b60d6546001600160a01b031681565b60cc5481565b611cc261347e565b6001600160a01b0316611cd361247b565b6001600160a01b031614611d1c576040805162461bcd60e51b81526020600482018190526024820152600080516020614cae833981519152604482015290519081900360640190fd5b6001600160a01b03808716600090815260cb602052604090205487911680611d7e576040805162461bcd60e51b815260206004820152601060248201526f37b7363ca0b63637bbb2b22a37b5b2b760811b604482015290519081900360640190fd5b6001600160a01b038816611dc1576040805162461bcd60e51b81526020600482015260056024820152645353493a3160d81b604482015290519081900360640190fd5b6001600160a01b038816600090815260cd60205260409020879055848610611e18576040805162461bcd60e51b815260206004820152600560248201526429a9a49d1960d91b604482015290519081900360640190fd5b50506001600160a01b03909516600090815260ce602090815260408083209590955560cf81528482209390935560d083528381209190915560d1909152209190915550565b611e6561347e565b6001600160a01b0316611e7661247b565b6001600160a01b031614611ebf576040805162461bcd60e51b81526020600482018190526024820152600080516020614cae833981519152604482015290519081900360640190fd5b611ec7612394565b15611f0c576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610e05613cb2565b60026097541415611f5a576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bf3833981519152604482015290519081900360640190fd5b6002609755611f67612394565b15611fac576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6001600160a01b03808216600090815260cb60205260409020548291168061200e576040805162461bcd60e51b815260206004820152601060248201526f37b7363ca0b63637bbb2b22a37b5b2b760811b604482015290519081900360640190fd5b6001600160a01b038316600090815260ce6020526040902054841080159061204e57506001600160a01b038316600090815260cf60205260409020548411155b612088576040805162461bcd60e51b8152602060048083019190915260248201526350553a3160e01b604482015290519081900360640190fd5b6001600160a01b03808416600081815260cb60209081526040918290205460c954835162d0331760e71b8152600481019590955292519085169489949316926368198b80926024808301939192829003018186803b1580156120e957600080fd5b505afa1580156120fd573d6000803e3d6000fd5b505050506040513d602081101561211357600080fd5b50511015612151576040805162461bcd60e51b81526020600480830191909152602482015263282a9d1960e11b604482015290519081900360640190fd5b60c9546040805162d0331760e71b81526001600160a01b03878116600483015291516000936122459316916368198b80916024808301926020929190829003018186803b1580156121a157600080fd5b505afa1580156121b5573d6000803e3d6000fd5b505050506040513d60208110156121cb57600080fd5b5051604080516318160ddd60e01b81529051611359916001600160a01b038716916318160ddd91600480820192602092909190829003018186803b15801561221257600080fd5b505afa158015612226573d6000803e3d6000fd5b505050506040513d602081101561223c57600080fd5b50518990613582565b905080612282576040805162461bcd60e51b8152602060048083019190915260248201526350553a3360e01b604482015290519081900360640190fd5b816001600160a01b03166387c1900961229961347e565b6001600160a01b03808916600090815260d060205260408082205481516001600160e01b031960e088901b168152949093166004850152602484018790526044840192909252905160648084019382900301818387803b1580156122fc57600080fd5b505af1158015612310573d6000803e3d6000fd5b50505050816001600160a01b0316856001600160a01b031661233061347e565b6001600160a01b03167f88f5e7447128c2ba9b5cc2f585138f64ffa16636d5c8f51b8beba06e9daac37c8985604051808381526020018281526020019250505060405180910390a45050600160975550505050565b60d3546001600160a01b031681565b60655460ff1690565b60d860209081526000928352604080842090915290825290205460ff1681565b6123c561347e565b6001600160a01b03166123d661247b565b6001600160a01b03161461241f576040805162461bcd60e51b81526020600482018190526024820152600080516020614cae833981519152604482015290519081900360640190fd5b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b60cd6020526000908152604090205481565b6033546001600160a01b031690565b60d46020526000908152604090205481565b60ce6020526000908152604090205481565b60006124c16124bb61347e565b83613d35565b92915050565b60d56020526000908152604090205481565b60cb602052600090815260409020546001600160a01b031681565b6124fc61347e565b6001600160a01b031661250d61247b565b6001600160a01b031614612556576040805162461bcd60e51b81526020600482018190526024820152600080516020614cae833981519152604482015290519081900360640190fd5b6001600160a01b03821661259b576040805162461bcd60e51b8152602060048201526007602482015266535343533a203160c81b604482015290519081900360640190fd5b6001600160a01b038216600081815260d76020908152604091829020805460ff1916851515908117909155825190815291517fa222be676a22a832fb7f47c0bac54bb3431e55330eb3085af1d76f64e9f1e2689281900390910190a25050565b60ca546001600160a01b031681565b60006126168383613d35565b9392505050565b61262561347e565b6001600160a01b031661263661247b565b6001600160a01b03161461267f576040805162461bcd60e51b81526020600482018190526024820152600080516020614cae833981519152604482015290519081900360640190fd5b6001600160a01b03808416600090815260cb6020526040902054849116806126e1576040805162461bcd60e51b815260206004820152601060248201526f37b7363ca0b63637bbb2b22a37b5b2b760811b604482015290519081900360640190fd5b50506001600160a01b03909216600090815260d4602090815260408083209390935560d590522055565b60d2546001600160a01b031681565b60d76020526000908152604090205460ff1681565b61273761347e565b6001600160a01b031661274861247b565b6001600160a01b031614612791576040805162461bcd60e51b81526020600482018190526024820152600080516020614cae833981519152604482015290519081900360640190fd5b6001600160a01b0382166127d8576040805162461bcd60e51b81526020600482015260096024820152685354544c50544d3a3160b81b604482015290519081900360640190fd5b6001600160a01b03918216600090815260cb6020526040902080546001600160a01b03191691909216179055565b60d2546000906001600160a01b0316632a1450ea3061282361347e565b6040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561287057600080fd5b505afa158015612884573d6000803e3d6000fd5b505050506040513d602081101561289a57600080fd5b5051806128c657506128aa61247b565b6001600160a01b03166128bb61347e565b6001600160a01b0316145b612907576040805162461bcd60e51b815260206004820152600d60248201526c30b63637bbb2b221b0b63632b960991b604482015290519081900360640190fd5b61290f612394565b15612954576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002609754141561299a576040805162461bcd60e51b815260206004820152601f6024820152600080516020614bf3833981519152604482015290519081900360640190fd5b600260975560006129ac858585613f35565b600160975595945050505050565b6129c261347e565b6001600160a01b03166129d361247b565b6001600160a01b031614612a1c576040805162461bcd60e51b81526020600482018190526024820152600080516020614cae833981519152604482015290519081900360640190fd5b60cc55565b60d06020526000908152604090205481565b612a3b61347e565b6001600160a01b0316612a4c61247b565b6001600160a01b031614612a95576040805162461bcd60e51b81526020600482018190526024820152600080516020614cae833981519152604482015290519081900360640190fd5b6001600160a01b038516612ad6576040805162461bcd60e51b8152602060048201526003602482015262533a3160e81b604482015290519081900360640190fd5b6001600160a01b038416612b17576040805162461bcd60e51b8152602060048201526003602482015262299d1960e91b604482015290519081900360640190fd5b6001600160a01b038316612b58576040805162461bcd60e51b8152602060048201526003602482015262533a3360e81b604482015290519081900360640190fd5b6001600160a01b038216612b99576040805162461bcd60e51b815260206004820152600360248201526214ce8d60ea1b604482015290519081900360640190fd5b6001600160a01b038116612bda576040805162461bcd60e51b8152602060048201526003602482015262533a3560e81b604482015290519081900360640190fd5b60d280546001600160a01b03199081166001600160a01b039788161790915560c9805482169587169590951790945560ca805485169386169390931790925560d38054841691851691909117905560d680549092169216919091179055565b606060006305f5e100871015612c80576040805162461bcd60e51b8152602060048201526007602482015266475242504c3a3160c81b604482015290519081900360640190fd5b60008611612cbf576040805162461bcd60e51b815260206004820152600760248201526623a92128261d1960c91b604482015290519081900360640190fd5b612710851115612d00576040805162461bcd60e51b8152602060048201526007602482015266475242504c3a3360c81b604482015290519081900360640190fd5b60cc54835185510114612d44576040805162461bcd60e51b815260206004820152600760248201526611d49094130e8d60ca1b604482015290519081900360640190fd5b6060835185510167ffffffffffffffff81118015612d6157600080fd5b50604051908082528060200260200182016040528015612d8b578160200160208202803683370190505b5090506060815167ffffffffffffffff81118015612da857600080fd5b50604051908082528060200260200182016040528015612dd2578160200160208202803683370190505b509050600080888b8b835b8b518110156130ac5760006001600160a01b031660cb60008e8481518110612e0157fe5b6020908102919091018101516001600160a01b0390811683529082019290925260400160002054161415612e66576040805162461bcd60e51b8152602060048201526007602482015266475242504c3a3560c81b604482015290519081900360640190fd5b60c9548c516000916001600160a01b0316906368198b80908f9085908110612e8a57fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612ecf57600080fd5b505afa158015612ee3573d6000803e3d6000fd5b505050506040513d6020811015612ef957600080fd5b81019080805190602001909291905050509050600060d660009054906101000a90046001600160a01b03166001600160a01b0316636947ac658f8581518110612f3e57fe5b602002602001015160c960009054906101000a90046001600160a01b03166001600160a01b03166369940d796040518163ffffffff1660e01b815260040160206040518083038186803b158015612f9457600080fd5b505afa158015612fa8573d6000803e3d6000fd5b505050506040513d6020811015612fbe57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201869052516064808301926020929190829003018186803b15801561301557600080fd5b505afa158015613029573d6000803e3d6000fd5b505050506040513d602081101561303f57600080fd5b5051905061305561271061135986818a86613582565b8a888151811061306157fe5b6020026020010181815250506130938a888151811061307c57fe5b60200260200101518961369990919063ffffffff16565b97506130a0876001613699565b96505050600101612ddd565b5060005b8a518110156132445760006001600160a01b031660cb60008d84815181106130d457fe5b6020908102919091018101516001600160a01b0390811683529082019290925260400160002054161415613139576040805162461bcd60e51b815260206004820152600760248201526623a92128261d1b60c91b604482015290519081900360640190fd5b60c9548b516001600160a01b039091169063fb25e5b99060cb906000908f908690811061316257fe5b6020908102919091018101516001600160a01b0390811683528282019390935260409182016000205482516001600160e01b031960e087901b168152931660048401529051602480840193829003018186803b1580156131c157600080fd5b505afa1580156131d5573d6000803e3d6000fd5b505050506040513d60208110156131eb57600080fd5b505188518990879081106131fb57fe5b60200260200101818152505061322d88868151811061321657fe5b60200260200101518761369990919063ffffffff16565b955061323a856001613699565b94506001016130b0565b5060005b875181101561329a5761327b866113598a848151811061326457fe5b60200260200101518661358290919063ffffffff16565b87828151811061328757fe5b6020908102919091010152600101613248565b50949d939c50929a5050505050505050505050565b6132b761347e565b6001600160a01b03166132c861247b565b6001600160a01b031614613311576040805162461bcd60e51b81526020600482018190526024820152600080516020614cae833981519152604482015290519081900360640190fd5b6001600160a01b0381166133565760405162461bcd60e51b8152600401808060200182810382526026815260200180614c136026913960400191505060405180910390fd5b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16806133cb57506133cb6143fd565b806133d9575060005460ff16155b6134145760405162461bcd60e51b815260040180806020018281038252602e815260200180614c5f602e913960400191505060405180910390fd5b600054610100900460ff1615801561343f576000805460ff1961ff0019909116610100171660011790555b61344761440e565b61344f6144ab565b613457614548565b8015613469576000805461ff00191690555b50565b60d16020526000908152604090205481565b3390565b61348a612394565b6134d2576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61350561347e565b604080516001600160a01b039092168252519081900360200190a1565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261357c9085906145dd565b50505050565b600082613591575060006124c1565b8282028284828161359e57fe5b04146126165760405162461bcd60e51b8152600401808060200182810382526021815260200180614c8d6021913960400191505060405180910390fd5b6000808211613631576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161363a57fe5b049392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526136949084906145dd565b505050565b600082820183811015612616576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008211613731576040805162461bcd60e51b8152602060048083019190915260248201526357543a3160e01b604482015290519081900360640190fd5b6001600160a01b03808216600090815260cb60205260408082205460c954825163411c050960e11b8152918516600483018190529251929416926382380a129260248084019382900301818387803b15801561378c57600080fd5b505af11580156137a0573d6000803e3d6000fd5b505060c95460408051630d21df2360e41b81526001600160a01b0389811660048301528681166024830152915191909216935063d21df2309250604480830192600092919082900301818387803b1580156137fa57600080fd5b505af115801561380e573d6000803e3d6000fd5b505060c9546040805162d0331760e71b81526001600160a01b03878116600483015291518895509190921692506368198b8091602480820192602092909190829003018186803b15801561386157600080fd5b505afa158015613875573d6000803e3d6000fd5b505050506040513d602081101561388b57600080fd5b50516138c7576040805162461bcd60e51b815260206004808301919091526024820152632baa1d1960e11b604482015290519081900360640190fd5b60c9546040805162d0331760e71b81526001600160a01b03868116600483015291516139bc9392909216916368198b8091602480820192602092909190829003018186803b15801561391857600080fd5b505afa15801561392c573d6000803e3d6000fd5b505050506040513d602081101561394257600080fd5b5051604080516318160ddd60e01b81529051611359916001600160a01b038716916318160ddd91600480820192602092909190829003018186803b15801561398957600080fd5b505afa15801561399d573d6000803e3d6000fd5b505050506040513d60208110156139b357600080fd5b50518790613582565b9050806139f9576040805162461bcd60e51b8152602060048083019190915260248201526357543a3360e01b604482015290519081900360640190fd5b6001600160a01b038316600090815260d16020526040812054613a30906127109061135990613a2990839061468e565b8890613582565b60c95460ca549192506001600160a01b039081169163f4e6ae329189918591899116613a5c8b8461468e565b6040518663ffffffff1660e01b815260040180866001600160a01b03168152602001858152602001846001600160a01b03168152602001836001600160a01b0316815260200182815260200195505050505050600060405180830381600087803b158015613ac957600080fd5b505af1158015613add573d6000803e3d6000fd5b505060c95460408051638385310960e01b81526001600160a01b038881166004830152915160009550919092169250638385310991602480820192602092909190829003018186803b158015613b3257600080fd5b505afa158015613b46573d6000803e3d6000fd5b505050506040513d6020811015613b5c57600080fd5b505160408051637a94c56560e11b81526001600160a01b038a81166004830152602482018790526044820184905291519293509086169163f5298aca9160648082019260009290919082900301818387803b158015613bba57600080fd5b505af1158015613bce573d6000803e3d6000fd5b50505050836001600160a01b0316856001600160a01b0316886001600160a01b03167f446008ad6434fd480b7f9ec90b91fd0700c2562020d7e62bb2310462901296ce8987896001600160a01b03166370a082318e6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015613c6057600080fd5b505afa158015613c74573d6000803e3d6000fd5b505050506040513d6020811015613c8a57600080fd5b505160408051938452602084019290925282820152519081900360600190a450505050505050565b613cba612394565b15613cff576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861350561347e565b600060cc5482511115613d78576040805162461bcd60e51b8152602060048201526006602482015265535246503a3160d01b604482015290519081900360640190fd5b6000805b8351811015613f2d576000848281518110613d9357fe5b6020908102919091018101516001600160a01b03808216600090815260cb9093526040909220549092501680613df9576040805162461bcd60e51b815260206004820152600660248201526529a923281d1960d11b604482015290519081900360640190fd5b60c9546040805163118e19b760e11b81526001600160a01b038a8116600483015284811660248301529151600093929092169163231c336e91604480820192602092909190829003018186803b158015613e5257600080fd5b505afa158015613e66573d6000803e3d6000fd5b505050506040513d6020811015613e7c57600080fd5b505160c95460408051630402d22560e01b81526001600160a01b038c81166004830152868116602483015291519394506000939190921691630402d225916044808301926020929190829003018186803b158015613ed957600080fd5b505afa158015613eed573d6000803e3d6000fd5b505050506040513d6020811015613f0357600080fd5b50519050613f1b81613f158885613699565b90613699565b95505060019093019250613d7c915050565b509392505050565b60006001600160a01b038316613f7c576040805162461bcd60e51b81526020600482015260076024820152665f555246503a3160c81b604482015290519081900360640190fd5b60cc5482511115613fbe576040805162461bcd60e51b81526020600482015260076024820152662faaa923281d1960c91b604482015290519081900360640190fd5b6000805b83518110156143f4576000848281518110613fd957fe5b6020908102919091018101516001600160a01b03808216600090815260cb9093526040909220549092501680614040576040805162461bcd60e51b81526020600482015260076024820152665f555246503a3360c81b604482015290519081900360640190fd5b806001600160a01b03166370a08231896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561408d57600080fd5b505afa1580156140a1573d6000803e3d6000fd5b505050506040513d60208110156140b757600080fd5b5051156141935760c9546040805163411c050960e11b81526001600160a01b038481166004830152915191909216916382380a1291602480830192600092919082900301818387803b15801561410c57600080fd5b505af1158015614120573d6000803e3d6000fd5b505060c95460408051630d21df2360e41b81526001600160a01b038d811660048301528681166024830152915191909216935063d21df2309250604480830192600092919082900301818387803b15801561417a57600080fd5b505af115801561418e573d6000803e3d6000fd5b505050505b60c95460408051639e9df5d760e01b81526001600160a01b038b8116600483015284811660248301528a8116604483015291516000939290921691639e9df5d79160648082019260209290919082900301818787803b1580156141f557600080fd5b505af1158015614209573d6000803e3d6000fd5b505050506040513d602081101561421f57600080fd5b5051905061422d8582613699565b9450816001600160a01b03166370a082318a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561427c57600080fd5b505afa158015614290573d6000803e3d6000fd5b505050506040513d60208110156142a657600080fd5b50511561439e5760c95460408051638385310960e01b81526001600160a01b03858116600483015291516000939290921691638385310991602480820192602092909190829003018186803b1580156142fe57600080fd5b505afa158015614312573d6000803e3d6000fd5b505050506040513d602081101561432857600080fd5b505160408051630ab714fb60e11b81526001600160a01b038d8116600483015260006024830181905260448301859052925193945086169263156e29f69260648084019391929182900301818387803b15801561438457600080fd5b505af1158015614398573d6000803e3d6000fd5b50505050505b826001600160a01b0316896001600160a01b03167ffd23f4e95e7c61bcc50c97b29c0573e8ea5176be3f3ce3282fe8fb122e967767836040518082815260200191505060405180910390a3505050600101613fc2565b50949350505050565b6000614408306146eb565b15905090565b600054610100900460ff168061442757506144276143fd565b80614435575060005460ff16155b6144705760405162461bcd60e51b815260040180806020018281038252602e815260200180614c5f602e913960400191505060405180910390fd5b600054610100900460ff1615801561449b576000805460ff1961ff0019909116610100171660011790555b6144a36146f1565b613457614791565b600054610100900460ff16806144c457506144c46143fd565b806144d2575060005460ff16155b61450d5760405162461bcd60e51b815260040180806020018281038252602e815260200180614c5f602e913960400191505060405180910390fd5b600054610100900460ff16158015614538576000805460ff1961ff0019909116610100171660011790555b6145406146f1565b61345761488a565b600054610100900460ff168061456157506145616143fd565b8061456f575060005460ff16155b6145aa5760405162461bcd60e51b815260040180806020018281038252602e815260200180614c5f602e913960400191505060405180910390fd5b600054610100900460ff161580156145d5576000805460ff1961ff0019909116610100171660011790555b613457614935565b6060614632826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166149db9092919063ffffffff16565b8051909150156136945780806020019051602081101561465157600080fd5b50516136945760405162461bcd60e51b815260040180806020018281038252602a815260200180614cce602a913960400191505060405180910390fd5b6000828211156146e5576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b3b151590565b600054610100900460ff168061470a575061470a6143fd565b80614718575060005460ff16155b6147535760405162461bcd60e51b815260040180806020018281038252602e815260200180614c5f602e913960400191505060405180910390fd5b600054610100900460ff16158015613457576000805460ff1961ff0019909116610100171660011790558015613469576000805461ff001916905550565b600054610100900460ff16806147aa57506147aa6143fd565b806147b8575060005460ff16155b6147f35760405162461bcd60e51b815260040180806020018281038252602e815260200180614c5f602e913960400191505060405180910390fd5b600054610100900460ff1615801561481e576000805460ff1961ff0019909116610100171660011790555b600061482861347e565b603380546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015613469576000805461ff001916905550565b600054610100900460ff16806148a357506148a36143fd565b806148b1575060005460ff16155b6148ec5760405162461bcd60e51b815260040180806020018281038252602e815260200180614c5f602e913960400191505060405180910390fd5b600054610100900460ff16158015614917576000805460ff1961ff0019909116610100171660011790555b6065805460ff191690558015613469576000805461ff001916905550565b600054610100900460ff168061494e575061494e6143fd565b8061495c575060005460ff16155b6149975760405162461bcd60e51b815260040180806020018281038252602e815260200180614c5f602e913960400191505060405180910390fd5b600054610100900460ff161580156149c2576000805460ff1961ff0019909116610100171660011790555b60016097558015613469576000805461ff001916905550565b60606149ea84846000856149f2565b949350505050565b606082471015614a335760405162461bcd60e51b8152600401808060200182810382526026815260200180614c396026913960400191505060405180910390fd5b614a3c856146eb565b614a8d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310614acc5780518252601f199092019160209182019101614aad565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614b2e576040519150601f19603f3d011682016040523d82523d6000602084013e614b33565b606091505b5091509150614b43828286614b4e565b979650505050505050565b60608315614b5d575081612616565b825115614b6d5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614bb7578181015183820152602001614b9f565b50505050905090810190601f168015614be45780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212207a8e04dab53bf8ff8cca81801624d7719ee18c854875979c1e12fd56bbed50ca64736f6c63430007030033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.