Source Code
Latest 25 from a total of 729 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Harvest | 28301598 | 16 hrs ago | IN | 0 ETH | 0.00005941 | ||||
| Harvest | 28268112 | 38 hrs ago | IN | 0 ETH | 0.00006017 | ||||
| Harvest | 28233807 | 2 days ago | IN | 0 ETH | 0.00006039 | ||||
| Harvest | 28197857 | 3 days ago | IN | 0 ETH | 0.00005881 | ||||
| Harvest | 28159500 | 4 days ago | IN | 0 ETH | 0.00005738 | ||||
| Harvest | 28121528 | 5 days ago | IN | 0 ETH | 0.00006068 | ||||
| Harvest | 28083471 | 6 days ago | IN | 0 ETH | 0.0000531 | ||||
| Harvest | 28045147 | 6 days ago | IN | 0 ETH | 0.00005303 | ||||
| Harvest | 28006674 | 7 days ago | IN | 0 ETH | 0.00004883 | ||||
| Harvest | 27968132 | 8 days ago | IN | 0 ETH | 0.00005028 | ||||
| Harvest | 27929999 | 9 days ago | IN | 0 ETH | 0.00005066 | ||||
| Harvest | 27891660 | 10 days ago | IN | 0 ETH | 0.00005097 | ||||
| Harvest | 27853142 | 11 days ago | IN | 0 ETH | 0.00005069 | ||||
| Harvest | 27814620 | 12 days ago | IN | 0 ETH | 0.00005083 | ||||
| Harvest | 27776083 | 13 days ago | IN | 0 ETH | 0.00005069 | ||||
| Harvest | 27737579 | 14 days ago | IN | 0 ETH | 0.00005039 | ||||
| Harvest | 27699263 | 15 days ago | IN | 0 ETH | 0.00004877 | ||||
| Harvest | 27660753 | 15 days ago | IN | 0 ETH | 0.00005095 | ||||
| Harvest | 27622283 | 16 days ago | IN | 0 ETH | 0.00005076 | ||||
| Harvest | 27583875 | 17 days ago | IN | 0 ETH | 0.00005133 | ||||
| Harvest | 27545313 | 18 days ago | IN | 0 ETH | 0.00004954 | ||||
| Harvest | 27507520 | 19 days ago | IN | 0 ETH | 0.0000506 | ||||
| Harvest | 27470180 | 20 days ago | IN | 0 ETH | 0.00004972 | ||||
| Harvest | 27433535 | 21 days ago | IN | 0 ETH | 0.00005029 | ||||
| Harvest | 27398900 | 22 days ago | IN | 0 ETH | 0.00004954 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 28301678 | 16 hrs ago | 0 ETH | ||||
| 28301678 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH | ||||
| 28301598 | 16 hrs ago | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
StrategyLynexSolidly
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin-4/contracts/token/ERC20/utils/SafeERC20.sol";
import "../../interfaces/common/ISolidlyPair.sol";
import "../../interfaces/common/ISolidlyRouter.sol";
import "../../interfaces/common/IRewardPool.sol";
import "../../interfaces/common/IERC20Extended.sol";
import "../Common/StratFeeManagerInitializable.sol";
import "../../utils/GasFeeThrottler.sol";
import "../../utils/AlgebraUtils.sol";
interface IGammaUniProxy {
function getDepositAmount(address pos, address token, uint _deposit) external view returns (uint amountStart, uint amountEnd);
function deposit(uint deposit0, uint deposit1, address to, address pos, uint[4] memory minIn) external returns (uint shares);
}
interface IAlgebraPool {
function pool() external view returns(address);
function globalState() external view returns(uint);
}
interface IAlgebraQuoter {
function quoteExactInput(bytes memory path, uint amountIn) external returns (uint amountOut, uint16[] memory fees);
}
interface IHypervisor {
function whitelistedAddress() external view returns (address uniProxy);
}
interface IFlashPool {
function swap(uint256 amount0, uint256 amount1, address to, bytes calldata data) external;
}
interface IOptionsToken {
function exercise(uint256 amount, uint256 maxPaymentAmount, address to, uint256 deadline) external;
function getDiscountedPrice(uint256 amount) external view returns (uint256);
}
interface IPairFactory {
function stableFee() external view returns (uint256);
}
contract StrategyLynexSolidly is StratFeeManagerInitializable {
using SafeERC20 for IERC20;
// Tokens used
address public constant native = 0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f;
address public constant output = 0x1a51b19CE03dbE0Cb44C1528E34a7EDD7771E9Af;
address public constant otoken = 0x63349BA5E1F71252eCD56E8F950D1A518B400b60;
address public constant paymentToken = 0x176211869cA2b568f2A7D4EE941E073a821EE1ff;
address public constant flashPool = 0xa4477d98e519D4c1d66aEf4EfDF7cBEb84f4f778;
address public constant algebraRouter = 0x3921e8cb45B17fC029A0a6dE958330ca4e583390;
address public constant pairFactory = 0xBc7695Fd00E3b32D08124b7a4287493aEE99f9ee;
address public want;
address public lpToken0;
address public lpToken1;
// Third party contracts
address public rewardPool;
IAlgebraQuoter public constant quoter = IAlgebraQuoter(0x851d97Fd7823E44193d227682e32234ef8CaC83e);
bool public stable;
bool public useNative;
bool public harvestOnDeposit;
bool private flashOn;
bool private useSolidlyFor0;
bool private useSolidlyFor1;
uint256 public lastHarvest;
ISolidlyRouter.Routes[] public nativeToLp0Route;
ISolidlyRouter.Routes[] public nativeToLp1Route;
bytes public outputToPaymentPath;
bytes public paymentToNativePath;
bytes public nativeToPayment;
bytes public nativeToLp0Path;
bytes public nativeToLp1Path;
event StratHarvest(address indexed harvester, uint256 wantHarvested, uint256 tvl);
event Deposit(uint256 tvl);
event Withdraw(uint256 tvl);
event ChargedFees(uint256 callFees, uint256 beefyFees, uint256 strategistFees);
function initialize(
address _want,
address _rewardPool,
bool _useNative,
bool[] calldata _useSolidly,
ISolidlyRouter.Routes[] calldata _nativeToLp0Route,
ISolidlyRouter.Routes[] calldata _nativeToLp1Route,
bytes[] calldata _paths,
CommonAddresses calldata _commonAddresses
) public initializer {
__StratFeeManager_init(_commonAddresses);
want = _want;
rewardPool = _rewardPool;
useSolidlyFor0 = _useSolidly[0];
useSolidlyFor1 = _useSolidly[1];
useNative = _useNative;
lpToken0 = ISolidlyPair(want).token0();
lpToken1 = ISolidlyPair(want).token1();
stable = ISolidlyPair(want).stable();
if (!useSolidlyFor0) setNativeToLp0(_paths[0]);
else {
for (uint i; i < _nativeToLp0Route.length; ++i) {
nativeToLp0Route.push(_nativeToLp0Route[i]);
}
}
if (!useSolidlyFor1) setNativeToLp1(_paths[1]);
else {
for (uint i; i < _nativeToLp1Route.length; ++i) {
nativeToLp1Route.push(_nativeToLp1Route[i]);
}
}
address[] memory outputToPaymentRoute = new address[](2);
outputToPaymentRoute[0] = output;
outputToPaymentRoute[1] = paymentToken;
address[] memory paymentToNativeRoute = new address[](2);
paymentToNativeRoute[0] = paymentToken;
paymentToNativeRoute[1] = native;
address[] memory nativeToPaymentRoute = new address[](2);
nativeToPaymentRoute[0] = native;
nativeToPaymentRoute[1] = paymentToken;
outputToPaymentPath = AlgebraUtils.routeToPath(outputToPaymentRoute);
paymentToNativePath = AlgebraUtils.routeToPath(paymentToNativeRoute);
nativeToPayment = AlgebraUtils.routeToPath(nativeToPaymentRoute);
harvestOnDeposit = true;
withdrawalFee = 0;
_giveAllowances();
}
// puts the funds to work
function deposit() public whenNotPaused {
uint256 wantBal = IERC20(want).balanceOf(address(this));
if (wantBal > 0) {
IRewardPool(rewardPool).deposit(wantBal);
emit Deposit(balanceOf());
}
}
function withdraw(uint256 _amount) external {
require(msg.sender == vault, "!vault");
uint256 wantBal = IERC20(want).balanceOf(address(this));
if (wantBal < _amount) {
IRewardPool(rewardPool).withdraw(_amount - wantBal);
wantBal = IERC20(want).balanceOf(address(this));
}
if (wantBal > _amount) {
wantBal = _amount;
}
if (tx.origin != owner() && !paused()) {
uint256 withdrawalFeeAmount = wantBal * withdrawalFee / WITHDRAWAL_MAX;
wantBal = wantBal - withdrawalFeeAmount;
}
IERC20(want).safeTransfer(vault, wantBal);
emit Withdraw(balanceOf());
}
function beforeDeposit() external virtual override {
if (harvestOnDeposit) {
require(msg.sender == vault, "!vault");
_harvest(tx.origin);
}
}
function harvest() external virtual {
_harvest(tx.origin);
}
function harvest(address callFeeRecipient) external virtual {
_harvest(callFeeRecipient);
}
// compounds earnings and charges performance fee
function _harvest(address callFeeRecipient) internal whenNotPaused {
IRewardPool(rewardPool).getReward();
uint256 outputBal = IERC20(otoken).balanceOf(address(this));
if (outputBal > 0) {
flashExercise(outputBal);
chargeFees(callFeeRecipient);
addLiquidity();
uint256 wantHarvested = balanceOfWant();
deposit();
lastHarvest = block.timestamp;
emit StratHarvest(msg.sender, wantHarvested, balanceOf());
}
}
function hook(address sender, uint256 amount0, uint256, bytes memory) external {
require(sender == address(this), "wrong sender");
require(msg.sender == flashPool, "!flashPool");
require(flashOn, "!flashOn");
uint256 oTokenBal = IERC20(otoken).balanceOf(address(this));
IOptionsToken(otoken).exercise(oTokenBal, amount0, address(this), block.timestamp);
uint256 outputTokenBal = IERC20(output).balanceOf(address(this));
AlgebraUtils.swap(algebraRouter, outputToPaymentPath, outputTokenBal);
uint256 debt = amount0 + getTotalFlashFee(amount0);
IERC20(paymentToken).safeTransfer(flashPool, debt);
uint256 paymentTokenBal = IERC20(paymentToken).balanceOf(address(this));
AlgebraUtils.swap(algebraRouter, paymentToNativePath, paymentTokenBal);
flashOn = false;
}
function getTotalFlashFee(uint256 _paymentTokenNeeded) private view returns (uint256) {
uint256 stableFee = IPairFactory(pairFactory).stableFee();
return _paymentTokenNeeded * stableFee / (10000 - stableFee);
}
function flashExercise(uint256 _amount) internal {
uint256 amountNeeded = IOptionsToken(otoken).getDiscountedPrice(_amount);
flashOn = true;
IFlashPool(flashPool).swap(amountNeeded, 0, address(this), "Beefy");
}
// performance fees
function chargeFees(address callFeeRecipient) internal {
IFeeConfig.FeeCategory memory fees = getFees();
uint256 nativeBal = IERC20(native).balanceOf(address(this)) * fees.total / DIVISOR;
uint256 callFeeAmount = nativeBal * fees.call / DIVISOR;
IERC20(native).safeTransfer(callFeeRecipient, callFeeAmount);
uint256 beefyFeeAmount = nativeBal * fees.beefy / DIVISOR;
IERC20(native).safeTransfer(beefyFeeRecipient, beefyFeeAmount);
uint256 strategistFeeAmount = nativeBal * fees.strategist / DIVISOR;
IERC20(native).safeTransfer(strategist, strategistFeeAmount);
emit ChargedFees(callFeeAmount, beefyFeeAmount, strategistFeeAmount);
}
// Adds liquidity to AMM and gets more LP tokens.
function addLiquidity() internal {
uint256 nativeBal = IERC20(native).balanceOf(address(this));
if (!useNative) {
AlgebraUtils.swap(algebraRouter, nativeToPayment, nativeBal);
nativeBal = IERC20(paymentToken).balanceOf(address(this));
}
uint256 lp0Amt = nativeBal / 2;
uint256 lp1Amt = nativeBal - lp0Amt;
address swapToken = useNative ? native : paymentToken;
if (stable) {
uint256 lp0Decimals = 10**IERC20Extended(lpToken0).decimals();
uint256 lp1Decimals = 10**IERC20Extended(lpToken1).decimals();
uint256 out0;
uint256 out1;
if (lpToken0 != swapToken) {
if (useSolidlyFor0) out0 = ISolidlyRouter(unirouter).getAmountsOut(lp0Amt, nativeToLp0Route)[nativeToLp0Route.length];
else (out0,) = quoter.quoteExactInput(nativeToLp0Path, lp0Amt);
} else out0 = lp0Amt;
if (lpToken1 != swapToken) {
if (useSolidlyFor1) out1 = ISolidlyRouter(unirouter).getAmountsOut(lp1Amt, nativeToLp1Route)[nativeToLp1Route.length];
else (out1,) = quoter.quoteExactInput(nativeToLp1Path, lp1Amt);
} else out1 = lp1Amt;
out0 = out0 * 1e18 / lp0Decimals;
out1 = out1 * 1e18 / lp1Decimals;
(uint256 amountA, uint256 amountB,) = ISolidlyRouter(unirouter).quoteAddLiquidity(lpToken0, lpToken1, stable, out0, out1);
amountA = amountA * 1e18 / lp0Decimals;
amountB = amountB * 1e18 / lp1Decimals;
uint256 ratio = out0 * 1e18 / out1 * amountB / amountA;
lp0Amt = nativeBal * 1e18 / (ratio + 1e18);
lp1Amt = nativeBal - lp0Amt;
}
if (lpToken0 != swapToken) {
if (useSolidlyFor0) ISolidlyRouter(unirouter).swapExactTokensForTokens(lp0Amt, 0, nativeToLp0Route, address(this), block.timestamp);
else AlgebraUtils.swap(algebraRouter, nativeToLp0Path, lp0Amt);
}
if (lpToken1 != swapToken) {
if (useSolidlyFor1) ISolidlyRouter(unirouter).swapExactTokensForTokens(lp1Amt, 0, nativeToLp1Route, address(this), block.timestamp);
else AlgebraUtils.swap(algebraRouter, nativeToLp1Path, lp1Amt);
}
uint256 lp0Bal = IERC20(lpToken0).balanceOf(address(this));
uint256 lp1Bal = IERC20(lpToken1).balanceOf(address(this));
ISolidlyRouter(unirouter).addLiquidity(lpToken0, lpToken1, stable, lp0Bal, lp1Bal, 1, 1, address(this), block.timestamp);
}
// calculate the total underlaying 'want' held by the strat.
function balanceOf() public view returns (uint256) {
return balanceOfWant() + balanceOfPool();
}
// it calculates how much 'want' this contract holds.
function balanceOfWant() public view returns (uint256) {
return IERC20(want).balanceOf(address(this));
}
// it calculates how much 'want' the strategy has working in the farm.
function balanceOfPool() public view returns (uint256) {
return IRewardPool(rewardPool).balanceOf(address(this));
}
// returns rewards unharvested
function rewardsAvailable() public pure returns (uint256) {
return 0;
}
// native reward amount for calling harvest
function callReward() public pure returns (uint256) {
return 0;
}
function setHarvestOnDeposit(bool _harvestOnDeposit) external onlyManager {
harvestOnDeposit = _harvestOnDeposit;
if (harvestOnDeposit) {
setWithdrawalFee(0);
} else {
setWithdrawalFee(10);
}
}
// called as part of strat migration. Sends all the available funds back to the vault.
function retireStrat() external {
require(msg.sender == vault, "!vault");
if (balanceOfPool() > 0) {
if (IRewardPool(rewardPool).emergency()) IRewardPool(rewardPool).emergencyWithdraw();
else IRewardPool(rewardPool).withdraw(balanceOfPool());
}
uint256 wantBal = IERC20(want).balanceOf(address(this));
IERC20(want).transfer(vault, wantBal);
}
// pauses deposits and withdraws all funds from third party systems.
function panic() public onlyManager {
pause();
if (IRewardPool(rewardPool).emergency()) IRewardPool(rewardPool).emergencyWithdraw();
else IRewardPool(rewardPool).withdraw(balanceOfPool());
}
function pause() public onlyManager {
_pause();
_removeAllowances();
}
function unpause() external onlyManager {
_unpause();
_giveAllowances();
deposit();
}
function _giveAllowances() internal {
IERC20(want).approve(rewardPool, type(uint).max);
IERC20(output).approve(algebraRouter, type(uint).max);
IERC20(native).approve(unirouter, type(uint).max);
IERC20(native).approve(algebraRouter, type(uint).max);
IERC20(paymentToken).approve(algebraRouter, type(uint).max);
IERC20(paymentToken).approve(unirouter, type(uint).max);
IERC20(paymentToken).approve(otoken, type(uint).max);
IERC20(lpToken0).approve(unirouter, 0);
IERC20(lpToken0).approve(unirouter, type(uint).max);
IERC20(lpToken1).approve(unirouter, 0);
IERC20(lpToken1).approve(unirouter, type(uint).max);
}
function _removeAllowances() internal {
IERC20(want).approve(rewardPool, 0);
IERC20(output).approve(algebraRouter, 0);
IERC20(native).approve(unirouter, 0);
IERC20(native).approve(algebraRouter, 0);
IERC20(paymentToken).approve(algebraRouter, 0);
IERC20(paymentToken).approve(unirouter, 0);
IERC20(paymentToken).approve(otoken, 0);
IERC20(lpToken0).approve(unirouter, 0);
IERC20(lpToken1).approve(unirouter, 0);
}
function setNativeToLp0(bytes calldata _nativeToLp0Path) public onlyOwner {
if (_nativeToLp0Path.length > 0) {
address[] memory route = AlgebraUtils.pathToRoute(_nativeToLp0Path);
require(route[0] == native, "!native");
require(route[route.length - 1] == lpToken0, "!lp0");
}
nativeToLp0Path = _nativeToLp0Path;
}
function setNativeToLp1(bytes calldata _nativeToLp1Path) public onlyOwner {
if (_nativeToLp1Path.length > 0) {
address[] memory route = AlgebraUtils.pathToRoute(_nativeToLp1Path);
require(route[0] == native, "!native");
require(route[route.length - 1] == lpToken1, "!lp1");
}
nativeToLp1Path = _nativeToLp1Path;
}
function nativeToLp0() external view returns (address[] memory) {
return AlgebraUtils.pathToRoute(nativeToLp0Path);
}
function nativeToLp1() external view returns (address[] memory) {
return AlgebraUtils.pathToRoute(nativeToLp1Path);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from,
address to,
uint256 amount
) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init() internal onlyInitializing {
__Ownable_init_unchained();
}
function __Ownable_init_unchained() internal onlyInitializing {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
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 proxied contracts do not make use of 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.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```solidity
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
*
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
* constructor.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_initialized = 1;
if (isTopLevelCall) {
_initializing = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: setting the version to 255 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_initialized = version;
_initializing = true;
_;
_initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized != type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint8) {
return _initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _initializing;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
function __Pausable_init() internal onlyInitializing {
__Pausable_init_unchained();
}
function __Pausable_init_unchained() internal onlyInitializing {
_paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
require(!paused(), "Pausable: paused");
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
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());
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @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
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 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://consensys.net/diligence/blog/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.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "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");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, 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) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// 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
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract ContextUpgradeable is Initializable {
function __Context_init() internal onlyInitializing {
}
function __Context_init_unchained() internal onlyInitializing {
}
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IERC20Extended {
function symbol() external view returns (string memory);
function decimals() external view returns (uint);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IFeeConfig {
struct FeeCategory {
uint256 total;
uint256 beefy;
uint256 call;
uint256 strategist;
string label;
bool active;
}
struct AllFees {
FeeCategory performance;
uint256 deposit;
uint256 withdraw;
}
function getFees(address strategy) external view returns (FeeCategory memory);
function stratFeeId(address strategy) external view returns (uint256);
function setStratFeeId(uint256 feeId) external;
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
interface IRewardPool {
function deposit(uint256 amount) external;
function stake(uint256 amount) external;
function withdraw(uint256 amount) external;
function earned(address account) external view returns (uint256);
function getReward() external;
function getReward(address account) external;
function balanceOf(address account) external view returns (uint256);
function stakingToken() external view returns (address);
function rewardsToken() external view returns (address);
function emergency() external view returns (bool);
function emergencyWithdraw() external;
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
interface ISolidlyPair {
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function burn(address to) external returns (uint amount0, uint amount1);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function stable() external view returns (bool);
function getAmountOut(uint256 amountIn, address tokenIn) external view returns (uint256);
function quote(address tokenIn, uint256 amountIn, uint256 granularity) external returns (uint256 amountOut);
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
pragma experimental ABIEncoderV2;
interface ISolidlyRouter {
// Routes
struct Routes {
address from;
address to;
bool stable;
}
struct Route {
address from;
address to;
bool stable;
address factory;
}
function addLiquidity(
address tokenA,
address tokenB,
bool stable,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
bool stable,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
bool stable,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
bool stable,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokensSimple(
uint amountIn,
uint amountOutMin,
address tokenFrom,
address tokenTo,
bool stable,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
Routes[] memory route,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
Route[] memory route,
address to,
uint deadline
) external returns (uint[] memory amounts);
function getAmountOut(uint amountIn, address tokenIn, address tokenOut) external view returns (uint amount, bool stable);
function getAmountsOut(uint amountIn, Routes[] memory routes) external view returns (uint[] memory amounts);
function getAmountsOut(uint amountIn, Route[] memory routes) external view returns (uint[] memory amounts);
function quoteAddLiquidity(
address tokenA,
address tokenB,
bool stable,
uint amountADesired,
uint amountBDesired
) external view returns (uint amountA, uint amountB, uint liquidity);
function quoteAddLiquidity(
address tokenA,
address tokenB,
bool stable,
address _factory,
uint amountADesired,
uint amountBDesired
) external view returns (uint amountA, uint amountB, uint liquidity);
function defaultFactory() external view returns (address);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IUniswapRouterV3WithDeadline {
struct ExactInputSingleParams {
address tokenIn;
address tokenOut;
uint24 fee;
address recipient;
uint256 deadline;
uint256 amountIn;
uint256 amountOutMinimum;
uint160 sqrtPriceLimitX96;
}
/// @notice Swaps `amountIn` of one token for as much as possible of another token
/// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata
/// @return amountOut The amount of the received token
function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);
struct ExactInputParams {
bytes path;
address recipient;
uint256 deadline;
uint256 amountIn;
uint256 amountOutMinimum;
}
/// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path
/// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata
/// @return amountOut The amount of the received token
function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut);
struct ExactOutputSingleParams {
address tokenIn;
address tokenOut;
uint24 fee;
address recipient;
uint256 deadline;
uint256 amountOut;
uint256 amountInMaximum;
uint160 sqrtPriceLimitX96;
}
/// @notice Swaps as little as possible of one token for `amountOut` of another token
/// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata
/// @return amountIn The amount of the input token
function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn);
struct ExactOutputParams {
bytes path;
address recipient;
uint256 deadline;
uint256 amountOut;
uint256 amountInMaximum;
}
/// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed)
/// @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata
/// @return amountIn The amount of the input token
function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "../../interfaces/common/IFeeConfig.sol";
contract StratFeeManagerInitializable is OwnableUpgradeable, PausableUpgradeable {
struct CommonAddresses {
address vault;
address unirouter;
address keeper;
address strategist;
address beefyFeeRecipient;
address beefyFeeConfig;
}
// common addresses for the strategy
address public vault;
address public unirouter;
address public keeper;
address public strategist;
address public beefyFeeRecipient;
IFeeConfig public beefyFeeConfig;
uint256 constant DIVISOR = 1 ether;
uint256 constant public WITHDRAWAL_FEE_CAP = 50;
uint256 constant public WITHDRAWAL_MAX = 10000;
uint256 internal withdrawalFee;
event SetStratFeeId(uint256 feeId);
event SetWithdrawalFee(uint256 withdrawalFee);
event SetVault(address vault);
event SetUnirouter(address unirouter);
event SetKeeper(address keeper);
event SetStrategist(address strategist);
event SetBeefyFeeRecipient(address beefyFeeRecipient);
event SetBeefyFeeConfig(address beefyFeeConfig);
function __StratFeeManager_init(CommonAddresses calldata _commonAddresses) internal onlyInitializing {
__Ownable_init();
__Pausable_init();
vault = _commonAddresses.vault;
unirouter = _commonAddresses.unirouter;
keeper = _commonAddresses.keeper;
strategist = _commonAddresses.strategist;
beefyFeeRecipient = _commonAddresses.beefyFeeRecipient;
beefyFeeConfig = IFeeConfig(_commonAddresses.beefyFeeConfig);
withdrawalFee = 10;
}
// checks that caller is either owner or keeper.
modifier onlyManager() {
_checkManager();
_;
}
function _checkManager() internal view {
require(msg.sender == owner() || msg.sender == keeper, "!manager");
}
// fetch fees from config contract
function getFees() internal view returns (IFeeConfig.FeeCategory memory) {
return beefyFeeConfig.getFees(address(this));
}
// fetch fees from config contract and dynamic deposit/withdraw fees
function getAllFees() external view returns (IFeeConfig.AllFees memory) {
return IFeeConfig.AllFees(getFees(), depositFee(), withdrawFee());
}
function getStratFeeId() external view returns (uint256) {
return beefyFeeConfig.stratFeeId(address(this));
}
function setStratFeeId(uint256 _feeId) external onlyManager {
beefyFeeConfig.setStratFeeId(_feeId);
emit SetStratFeeId(_feeId);
}
// adjust withdrawal fee
function setWithdrawalFee(uint256 _fee) public onlyManager {
require(_fee <= WITHDRAWAL_FEE_CAP, "!cap");
withdrawalFee = _fee;
emit SetWithdrawalFee(_fee);
}
// set new vault (only for strategy upgrades)
function setVault(address _vault) external onlyOwner {
vault = _vault;
emit SetVault(_vault);
}
// set new unirouter
function setUnirouter(address _unirouter) external onlyOwner {
unirouter = _unirouter;
emit SetUnirouter(_unirouter);
}
// set new keeper to manage strat
function setKeeper(address _keeper) external onlyManager {
keeper = _keeper;
emit SetKeeper(_keeper);
}
// set new strategist address to receive strat fees
function setStrategist(address _strategist) external {
require(msg.sender == strategist, "!strategist");
strategist = _strategist;
emit SetStrategist(_strategist);
}
// set new beefy fee address to receive beefy fees
function setBeefyFeeRecipient(address _beefyFeeRecipient) external onlyOwner {
beefyFeeRecipient = _beefyFeeRecipient;
emit SetBeefyFeeRecipient(_beefyFeeRecipient);
}
// set new fee config address to fetch fees
function setBeefyFeeConfig(address _beefyFeeConfig) external onlyOwner {
beefyFeeConfig = IFeeConfig(_beefyFeeConfig);
emit SetBeefyFeeConfig(_beefyFeeConfig);
}
function depositFee() public virtual view returns (uint256) {
return 0;
}
function withdrawFee() public virtual view returns (uint256) {
return paused() ? 0 : withdrawalFee;
}
function beforeDeposit() external virtual {}
}// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.0;
import './BytesLib.sol';
/// @title Functions for manipulating path data for multihop swaps
/// @dev Credit to Uniswap Labs under GPL-2.0-or-later license:
/// https://github.com/Uniswap/v3-periphery
library Path {
using BytesLib for bytes;
/// @dev The length of the bytes encoded address
uint256 private constant ADDR_SIZE = 20;
/// @dev The length of the bytes encoded fee
uint256 private constant FEE_SIZE = 3;
/// @dev The offset of a single token address and pool fee
uint256 private constant NEXT_OFFSET = ADDR_SIZE;
/// @dev The offset of an encoded pool key
uint256 private constant POP_OFFSET = NEXT_OFFSET + ADDR_SIZE;
/// @dev The minimum length of an encoding that contains 2 or more pools
uint256 private constant MULTIPLE_POOLS_MIN_LENGTH = POP_OFFSET + NEXT_OFFSET;
/// @notice Returns true iff the path contains two or more pools
/// @param path The encoded swap path
/// @return True if path contains two or more pools, otherwise false
function hasMultiplePools(bytes memory path) internal pure returns (bool) {
return path.length >= MULTIPLE_POOLS_MIN_LENGTH;
}
/// @notice Returns the number of pools in the path
/// @param path The encoded swap path
/// @return The number of pools in the path
function numPools(bytes memory path) internal pure returns (uint256) {
// Ignore the first token address. From then on every fee and token offset indicates a pool.
return ((path.length - ADDR_SIZE) / NEXT_OFFSET);
}
/// @notice Decodes the first pool in path
/// @param path The bytes encoded swap path
/// @return tokenA The first token of the given pool
/// @return tokenB The second token of the given pool
function decodeFirstPool(bytes memory path) internal pure returns (address tokenA, address tokenB) {
tokenA = path.toAddress(0);
tokenB = path.toAddress(NEXT_OFFSET);
}
/// @notice Gets the segment corresponding to the first pool in the path
/// @param path The bytes encoded swap path
/// @return The segment containing all data necessary to target the first pool in the path
function getFirstPool(bytes memory path) internal pure returns (bytes memory) {
return path.slice(0, POP_OFFSET);
}
/// @notice Skips a token + fee element from the buffer and returns the remainder
/// @param path The swap path
/// @return The remaining token + fee elements in the path
function skipToken(bytes memory path) internal pure returns (bytes memory) {
return path.slice(NEXT_OFFSET, path.length - NEXT_OFFSET);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import './AlgebraPath.sol';
import "../interfaces/common/IUniswapRouterV3WithDeadline.sol";
library AlgebraUtils {
using Path for bytes;
// Swap along an encoded path using known amountIn
function swap(
address _router,
bytes memory _path,
uint256 _amountIn
) internal returns (uint256 amountOut) {
IUniswapRouterV3WithDeadline.ExactInputParams memory params = IUniswapRouterV3WithDeadline.ExactInputParams({
path: _path,
recipient: address(this),
deadline: block.timestamp,
amountIn: _amountIn,
amountOutMinimum: 0
});
return IUniswapRouterV3WithDeadline(_router).exactInput(params);
}
// Convert encoded path to token route
function pathToRoute(bytes memory _path) internal pure returns (address[] memory) {
uint256 numPools = _path.numPools();
address[] memory route = new address[](numPools + 1);
for (uint256 i; i < numPools; i++) {
(address tokenA, address tokenB) = _path.decodeFirstPool();
route[i] = tokenA;
route[i + 1] = tokenB;
_path = _path.skipToken();
}
return route;
}
// Convert token route to encoded path
// uint24 type for fees so path is packed tightly
function routeToPath(address[] memory _route) internal pure returns (bytes memory path) {
path = abi.encodePacked(_route[0]);
for (uint256 i = 1; i < _route.length; i++) {
path = abi.encodePacked(path, _route[i]);
}
}
}// SPDX-License-Identifier: Unlicense /* * @title Solidity Bytes Arrays Utils * @author Gonçalo Sá <[email protected]> * * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity. * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage. */ pragma solidity >=0.8.0 <0.9.0; library BytesLib { function concat( bytes memory _preBytes, bytes memory _postBytes ) internal pure returns (bytes memory) { bytes memory tempBytes; assembly { // Get a location of some free memory and store it in tempBytes as // Solidity does for memory variables. tempBytes := mload(0x40) // Store the length of the first bytes array at the beginning of // the memory for tempBytes. let length := mload(_preBytes) mstore(tempBytes, length) // Maintain a memory counter for the current write location in the // temp bytes array by adding the 32 bytes for the array length to // the starting location. let mc := add(tempBytes, 0x20) // Stop copying when the memory counter reaches the length of the // first bytes array. let end := add(mc, length) for { // Initialize a copy counter to the start of the _preBytes data, // 32 bytes into its memory. let cc := add(_preBytes, 0x20) } lt(mc, end) { // Increase both counters by 32 bytes each iteration. mc := add(mc, 0x20) cc := add(cc, 0x20) } { // Write the _preBytes data into the tempBytes memory 32 bytes // at a time. mstore(mc, mload(cc)) } // Add the length of _postBytes to the current length of tempBytes // and store it as the new length in the first 32 bytes of the // tempBytes memory. length := mload(_postBytes) mstore(tempBytes, add(length, mload(tempBytes))) // Move the memory counter back from a multiple of 0x20 to the // actual end of the _preBytes data. mc := end // Stop copying when the memory counter reaches the new combined // length of the arrays. end := add(mc, length) for { let cc := add(_postBytes, 0x20) } lt(mc, end) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { mstore(mc, mload(cc)) } // Update the free-memory pointer by padding our last write location // to 32 bytes: add 31 bytes to the end of tempBytes to move to the // next 32 byte block, then round down to the nearest multiple of // 32. If the sum of the length of the two arrays is zero then add // one before rounding down to leave a blank 32 bytes (the length block with 0). mstore(0x40, and( add(add(end, iszero(add(length, mload(_preBytes)))), 31), not(31) // Round down to the nearest 32 bytes. )) } return tempBytes; } function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal { assembly { // Read the first 32 bytes of _preBytes storage, which is the length // of the array. (We don't need to use the offset into the slot // because arrays use the entire slot.) let fslot := sload(_preBytes.slot) // Arrays of 31 bytes or less have an even value in their slot, // while longer arrays have an odd value. The actual length is // the slot divided by two for odd values, and the lowest order // byte divided by two for even values. // If the slot is even, bitwise and the slot with 255 and divide by // two to get the length. If the slot is odd, bitwise and the slot // with -1 and divide by two. let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2) let mlength := mload(_postBytes) let newlength := add(slength, mlength) // slength can contain both the length and contents of the array // if length < 32 bytes so let's prepare for that // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage switch add(lt(slength, 32), lt(newlength, 32)) case 2 { // Since the new array still fits in the slot, we just need to // update the contents of the slot. // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length sstore( _preBytes.slot, // all the modifications to the slot are inside this // next block add( // we can just add to the slot contents because the // bytes we want to change are the LSBs fslot, add( mul( div( // load the bytes from memory mload(add(_postBytes, 0x20)), // zero all bytes to the right exp(0x100, sub(32, mlength)) ), // and now shift left the number of bytes to // leave space for the length in the slot exp(0x100, sub(32, newlength)) ), // increase length by the double of the memory // bytes length mul(mlength, 2) ) ) ) } case 1 { // The stored value fits in the slot, but the combined value // will exceed it. // get the keccak hash to get the contents of the array mstore(0x0, _preBytes.slot) let sc := add(keccak256(0x0, 0x20), div(slength, 32)) // save new length sstore(_preBytes.slot, add(mul(newlength, 2), 1)) // The contents of the _postBytes array start 32 bytes into // the structure. Our first read should obtain the `submod` // bytes that can fit into the unused space in the last word // of the stored array. To get this, we read 32 bytes starting // from `submod`, so the data we read overlaps with the array // contents by `submod` bytes. Masking the lowest-order // `submod` bytes allows us to add that value directly to the // stored value. let submod := sub(32, slength) let mc := add(_postBytes, submod) let end := add(_postBytes, mlength) let mask := sub(exp(0x100, submod), 1) sstore( sc, add( and( fslot, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00 ), and(mload(mc), mask) ) ) for { mc := add(mc, 0x20) sc := add(sc, 1) } lt(mc, end) { sc := add(sc, 1) mc := add(mc, 0x20) } { sstore(sc, mload(mc)) } mask := exp(0x100, sub(mc, end)) sstore(sc, mul(div(mload(mc), mask), mask)) } default { // get the keccak hash to get the contents of the array mstore(0x0, _preBytes.slot) // Start copying to the last used word of the stored array. let sc := add(keccak256(0x0, 0x20), div(slength, 32)) // save new length sstore(_preBytes.slot, add(mul(newlength, 2), 1)) // Copy over the first `submod` bytes of the new data as in // case 1 above. let slengthmod := mod(slength, 32) let mlengthmod := mod(mlength, 32) let submod := sub(32, slengthmod) let mc := add(_postBytes, submod) let end := add(_postBytes, mlength) let mask := sub(exp(0x100, submod), 1) sstore(sc, add(sload(sc), and(mload(mc), mask))) for { sc := add(sc, 1) mc := add(mc, 0x20) } lt(mc, end) { sc := add(sc, 1) mc := add(mc, 0x20) } { sstore(sc, mload(mc)) } mask := exp(0x100, sub(mc, end)) sstore(sc, mul(div(mload(mc), mask), mask)) } } } function slice( bytes memory _bytes, uint256 _start, uint256 _length ) internal pure returns (bytes memory) { require(_length + 31 >= _length, "slice_overflow"); require(_bytes.length >= _start + _length, "slice_outOfBounds"); bytes memory tempBytes; assembly { switch iszero(_length) case 0 { // Get a location of some free memory and store it in tempBytes as // Solidity does for memory variables. tempBytes := mload(0x40) // The first word of the slice result is potentially a partial // word read from the original array. To read it, we calculate // the length of that partial word and start copying that many // bytes into the array. The first word we copy will start with // data we don't care about, but the last `lengthmod` bytes will // land at the beginning of the contents of the new array. When // we're done copying, we overwrite the full first word with // the actual length of the slice. let lengthmod := and(_length, 31) // The multiplication in the next line is necessary // because when slicing multiples of 32 bytes (lengthmod == 0) // the following copy loop was copying the origin's length // and then ending prematurely not copying everything it should. let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod))) let end := add(mc, _length) for { // The multiplication in the next line has the same exact purpose // as the one above. let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start) } lt(mc, end) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { mstore(mc, mload(cc)) } mstore(tempBytes, _length) //update free-memory pointer //allocating the array padded to 32 bytes like the compiler does now mstore(0x40, and(add(mc, 31), not(31))) } //if we want a zero-length slice let's just return a zero-length array default { tempBytes := mload(0x40) //zero out the 32 bytes slice we are about to return //we need to do it because Solidity does not garbage collect mstore(tempBytes, 0) mstore(0x40, add(tempBytes, 0x20)) } } return tempBytes; } function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) { require(_bytes.length >= _start + 20, "toAddress_outOfBounds"); address tempAddress; assembly { tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000) } return tempAddress; } function toUint8(bytes memory _bytes, uint256 _start) internal pure returns (uint8) { require(_bytes.length >= _start + 1 , "toUint8_outOfBounds"); uint8 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x1), _start)) } return tempUint; } function toUint16(bytes memory _bytes, uint256 _start) internal pure returns (uint16) { require(_bytes.length >= _start + 2, "toUint16_outOfBounds"); uint16 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x2), _start)) } return tempUint; } function toUint24(bytes memory _bytes, uint256 _start) internal pure returns (uint24) { require(_start + 3 >= _start, 'toUint24_overflow'); require(_bytes.length >= _start + 3, 'toUint24_outOfBounds'); uint24 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x3), _start)) } return tempUint; } function toUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32) { require(_bytes.length >= _start + 4, "toUint32_outOfBounds"); uint32 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x4), _start)) } return tempUint; } function toUint64(bytes memory _bytes, uint256 _start) internal pure returns (uint64) { require(_bytes.length >= _start + 8, "toUint64_outOfBounds"); uint64 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x8), _start)) } return tempUint; } function toUint96(bytes memory _bytes, uint256 _start) internal pure returns (uint96) { require(_bytes.length >= _start + 12, "toUint96_outOfBounds"); uint96 tempUint; assembly { tempUint := mload(add(add(_bytes, 0xc), _start)) } return tempUint; } function toUint128(bytes memory _bytes, uint256 _start) internal pure returns (uint128) { require(_bytes.length >= _start + 16, "toUint128_outOfBounds"); uint128 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x10), _start)) } return tempUint; } function toUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256) { require(_bytes.length >= _start + 32, "toUint256_outOfBounds"); uint256 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x20), _start)) } return tempUint; } function toBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32) { require(_bytes.length >= _start + 32, "toBytes32_outOfBounds"); bytes32 tempBytes32; assembly { tempBytes32 := mload(add(add(_bytes, 0x20), _start)) } return tempBytes32; } function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) { bool success = true; assembly { let length := mload(_preBytes) // if lengths don't match the arrays are not equal switch eq(length, mload(_postBytes)) case 1 { // cb is a circuit breaker in the for loop since there's // no said feature for inline assembly loops // cb = 1 - don't breaker // cb = 0 - break let cb := 1 let mc := add(_preBytes, 0x20) let end := add(mc, length) for { let cc := add(_postBytes, 0x20) // the next line is the loop condition: // while(uint256(mc < end) + cb == 2) } eq(add(lt(mc, end), cb), 2) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { // if any of these checks fails then arrays are not equal if iszero(eq(mload(mc), mload(cc))) { // unsuccess: success := 0 cb := 0 } } } default { // unsuccess: success := 0 } } return success; } function equalStorage( bytes storage _preBytes, bytes memory _postBytes ) internal view returns (bool) { bool success = true; assembly { // we know _preBytes_offset is 0 let fslot := sload(_preBytes.slot) // Decode the length of the stored array like in concatStorage(). let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2) let mlength := mload(_postBytes) // if lengths don't match the arrays are not equal switch eq(slength, mlength) case 1 { // slength can contain both the length and contents of the array // if length < 32 bytes so let's prepare for that // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage if iszero(iszero(slength)) { switch lt(slength, 32) case 1 { // blank the last byte which is the length fslot := mul(div(fslot, 0x100), 0x100) if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) { // unsuccess: success := 0 } } default { // cb is a circuit breaker in the for loop since there's // no said feature for inline assembly loops // cb = 1 - don't breaker // cb = 0 - break let cb := 1 // get the keccak hash to get the contents of the array mstore(0x0, _preBytes.slot) let sc := keccak256(0x0, 0x20) let mc := add(_postBytes, 0x20) let end := add(mc, mlength) // the next line is the loop condition: // while(uint256(mc < end) + cb == 2) for {} eq(add(lt(mc, end), cb), 2) { sc := add(sc, 1) mc := add(mc, 0x20) } { if iszero(eq(sload(sc), mload(mc))) { // unsuccess: success := 0 cb := 0 } } } } } default { // unsuccess: success := 0 } } return success; } }
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin-4/contracts/utils/Address.sol";
import "./IGasPrice.sol";
contract GasFeeThrottler {
bool public shouldGasThrottle = true;
address public gasprice = address(0xA43509661141F254F54D9A326E8Ec851A0b95307);
modifier gasThrottle() {
if (shouldGasThrottle && Address.isContract(gasprice)) {
require(tx.gasprice <= IGasPrice(gasprice).maxGasPrice(), "gas is too high!");
}
_;
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
interface IGasPrice {
function maxGasPrice() external returns (uint);
}{
"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
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"callFees","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"beefyFees","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"strategistFees","type":"uint256"}],"name":"ChargedFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tvl","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"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":false,"internalType":"address","name":"beefyFeeConfig","type":"address"}],"name":"SetBeefyFeeConfig","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"beefyFeeRecipient","type":"address"}],"name":"SetBeefyFeeRecipient","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"keeper","type":"address"}],"name":"SetKeeper","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"feeId","type":"uint256"}],"name":"SetStratFeeId","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"strategist","type":"address"}],"name":"SetStrategist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"unirouter","type":"address"}],"name":"SetUnirouter","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"vault","type":"address"}],"name":"SetVault","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"withdrawalFee","type":"uint256"}],"name":"SetWithdrawalFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"harvester","type":"address"},{"indexed":false,"internalType":"uint256","name":"wantHarvested","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tvl","type":"uint256"}],"name":"StratHarvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tvl","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"WITHDRAWAL_FEE_CAP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAWAL_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"algebraRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOfPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOfWant","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beefyFeeConfig","outputs":[{"internalType":"contract IFeeConfig","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beefyFeeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beforeDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"callReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flashPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllFees","outputs":[{"components":[{"components":[{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"beefy","type":"uint256"},{"internalType":"uint256","name":"call","type":"uint256"},{"internalType":"uint256","name":"strategist","type":"uint256"},{"internalType":"string","name":"label","type":"string"},{"internalType":"bool","name":"active","type":"bool"}],"internalType":"struct IFeeConfig.FeeCategory","name":"performance","type":"tuple"},{"internalType":"uint256","name":"deposit","type":"uint256"},{"internalType":"uint256","name":"withdraw","type":"uint256"}],"internalType":"struct IFeeConfig.AllFees","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStratFeeId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"callFeeRecipient","type":"address"}],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvestOnDeposit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"hook","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_want","type":"address"},{"internalType":"address","name":"_rewardPool","type":"address"},{"internalType":"bool","name":"_useNative","type":"bool"},{"internalType":"bool[]","name":"_useSolidly","type":"bool[]"},{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"stable","type":"bool"}],"internalType":"struct ISolidlyRouter.Routes[]","name":"_nativeToLp0Route","type":"tuple[]"},{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"stable","type":"bool"}],"internalType":"struct ISolidlyRouter.Routes[]","name":"_nativeToLp1Route","type":"tuple[]"},{"internalType":"bytes[]","name":"_paths","type":"bytes[]"},{"components":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"unirouter","type":"address"},{"internalType":"address","name":"keeper","type":"address"},{"internalType":"address","name":"strategist","type":"address"},{"internalType":"address","name":"beefyFeeRecipient","type":"address"},{"internalType":"address","name":"beefyFeeConfig","type":"address"}],"internalType":"struct StratFeeManagerInitializable.CommonAddresses","name":"_commonAddresses","type":"tuple"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"keeper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastHarvest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpToken0","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpToken1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"native","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nativeToLp0","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nativeToLp0Path","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nativeToLp0Route","outputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"stable","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nativeToLp1","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nativeToLp1Path","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nativeToLp1Route","outputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"stable","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nativeToPayment","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"otoken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"output","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"outputToPaymentPath","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pairFactory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"panic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paymentToNativePath","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paymentToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quoter","outputs":[{"internalType":"contract IAlgebraQuoter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"retireStrat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsAvailable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_beefyFeeConfig","type":"address"}],"name":"setBeefyFeeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_beefyFeeRecipient","type":"address"}],"name":"setBeefyFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_harvestOnDeposit","type":"bool"}],"name":"setHarvestOnDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_keeper","type":"address"}],"name":"setKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_nativeToLp0Path","type":"bytes"}],"name":"setNativeToLp0","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_nativeToLp1Path","type":"bytes"}],"name":"setNativeToLp1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feeId","type":"uint256"}],"name":"setStratFeeId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_unirouter","type":"address"}],"name":"setUnirouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setWithdrawalFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unirouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"useNative","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"want","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b50615a5b80620000216000396000f3fe608060405234801561001057600080fd5b50600436106103fc5760003560e01c80638da5cb5b11610215578063d92f3d7311610125578063ea82eb9e116100b8578063f20eaeb811610087578063f20eaeb814610832578063f2fde38b1461084d578063fb61778714610860578063fbfa77cf14610868578063fd063fde1461087b57600080fd5b8063ea82eb9e14610806578063ec6282691461080e578063edfdab8f14610821578063f1a392da1461082957600080fd5b8063e14f870d116100f4578063e14f870d146107d0578063e270dbf3146107eb578063e7a7250a146105c7578063e941fa78146107fe57600080fd5b8063d92f3d7314610772578063dc4987cc14610785578063dc593d3c146107c0578063dfbdc437146107c857600080fd5b8063aced1661116101a8578063c1a3d44c11610177578063c1a3d44c1461072c578063c6bbd5a714610734578063c7b9d5301461074f578063d0e30db014610762578063d2027ab31461076a57600080fd5b8063aced1661146106d6578063ae8ecf58146106e9578063b20feaaf14610704578063bb4f50561461071957600080fd5b8063a68833e5116101e4578063a68833e51461067a578063a6a87f5c1461068d578063aa7f0ceb146106a8578063ac1e5025146106c357600080fd5b80638da5cb5b146106435780638e1454591461065457806397fd323d146105c75780639a7bff791461066757600080fd5b80634700d305116103105780636817031b116102a3578063748747e611610272578063748747e6146105f95780638456cb591461060c578063877562b6146106145780638912cb8b146106275780638cfc02501461063b57600080fd5b80636817031b146105ce5780636a62522b146105e1578063715018a6146105e9578063722713f7146105f157600080fd5b80635c975abb116102df5780635c975abb146105965780635ee167c0146105a157806366666aa9146105b457806367a52793146105c757600080fd5b80634700d3051461056a5780634746fb551461057257806354518b1a14610585578063573fef0a1461058e57600080fd5b806322be3de1116103935780633013ce29116103625780633013ce291461051d57806337bdd204146105325780633e55f932146105475780633f4ba83a1461055a5780634641257d1461056257600080fd5b806322be3de1146104bf578063257ae0de146104e357806328857588146104f65780632e1a7d4d1461050a57600080fd5b806311b0b42d116103cf57806311b0b42d146104575780631aaca2f1146104845780631f1fcd51146104995780631fe4a686146104ac57600080fd5b80630e5c011e146104015780630e8fbb5a14610416578063106fdbd014610429578063115880861461043c575b600080fd5b61041461040f366004614b53565b61088e565b005b610414610424366004614b89565b61089a565b610414610437366004614b53565b6108dd565b61044461093a565b6040519081526020015b60405180910390f35b61046c6000805160206159e683398151915281565b6040516001600160a01b03909116815260200161044e565b61048c6109ad565b60405161044e9190614bf6565b609e5461046c906001600160a01b031681565b609a5461046c906001600160a01b031681565b60a1546104d390600160a01b900460ff1681565b604051901515815260200161044e565b60985461046c906001600160a01b031681565b60a1546104d390600160a81b900460ff1681565b610414610518366004614c09565b610a3b565b61046c600080516020615a0683398151915281565b61053a610c75565b60405161044e9190614c22565b610414610555366004614c09565b610d0a565b610414610da1565b610414610dc3565b610414610dcc565b609c5461046c906001600160a01b031681565b61044461271081565b610414610f13565b60655460ff166104d3565b609f5461046c906001600160a01b031681565b60a15461046c906001600160a01b031681565b6000610444565b6104146105dc366004614b53565b610f4f565b61048c610fa5565b610414610fb2565b610444610fc4565b610414610607366004614b53565b610fe0565b610414611036565b60a05461046c906001600160a01b031681565b60a1546104d390600160b01b900460ff1681565b61044461104e565b6033546001600160a01b031661046c565b609b5461046c906001600160a01b031681565b610414610675366004614d04565b61107f565b610414610688366004614b53565b611460565b61046c733921e8cb45b17fc029a0a6de958330ca4e58339081565b61046c73a4477d98e519d4c1d66aef4efdf7cbeb84f4f77881565b6104146106d1366004614c09565b6114b6565b60995461046c906001600160a01b031681565b61046c7363349ba5e1f71252ecd56e8f950d1a518b400b6081565b61070c61152d565b60405161044e9190614da9565b610414610727366004614e26565b611563565b6104446116b1565b61046c73851d97fd7823e44193d227682e32234ef8cac83e81565b61041461075d366004614b53565b6116e2565b610414611778565b61048c61188a565b610414610780366004614b53565b611897565b610798610793366004614c09565b6118ed565b604080516001600160a01b03948516815293909216602084015215159082015260600161044e565b61048c611933565b610444603281565b61046c73bc7695fd00e3b32d08124b7a4287493aee99f9ee81565b6107986107f9366004614c09565b611940565b610444611950565b61053a61196f565b61041461081c366004614f38565b611981565b61048c6120a9565b61044460a25481565b61046c731a51b19ce03dbe0cb44c1528e34a7edd7771e9af81565b61041461085b366004614b53565b6120b6565b61041461212c565b60975461046c906001600160a01b031681565b610414610889366004614e26565b6123a5565b610897816124ee565b50565b6108a2612656565b60a1805460ff60b01b1916600160b01b8315158102919091179182905560ff910416156108d35761089760006114b6565b610897600a6114b6565b6108e56126b0565b609c80546001600160a01b0319166001600160a01b0383169081179091556040519081527f91e28ce4210d103c13c5174847e463b836900f8dc63e9d9b42a4255169d19529906020015b60405180910390a150565b60a1546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a08231906024015b602060405180830381865afa158015610984573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a89190615055565b905090565b60a580546109ba9061506e565b80601f01602080910402602001604051908101604052809291908181526020018280546109e69061506e565b8015610a335780601f10610a0857610100808354040283529160200191610a33565b820191906000526020600020905b815481529060010190602001808311610a1657829003601f168201915b505050505081565b6097546001600160a01b03163314610a6e5760405162461bcd60e51b8152600401610a65906150a2565b60405180910390fd5b609e546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adb9190615055565b905081811015610bbf5760a1546001600160a01b0316632e1a7d4d610b0083856150d8565b6040518263ffffffff1660e01b8152600401610b1e91815260200190565b600060405180830381600087803b158015610b3857600080fd5b505af1158015610b4c573d6000803e3d6000fd5b5050609e546040516370a0823160e01b81523060048201526001600160a01b0390911692506370a082319150602401602060405180830381865afa158015610b98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbc9190615055565b90505b81811115610bca5750805b6033546001600160a01b03163214801590610be8575060655460ff16155b15610c1a576000612710609d5483610c0091906150eb565b610c0a9190615102565b9050610c1681836150d8565b9150505b609754609e54610c37916001600160a01b0391821691168361270a565b7f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d610c60610fc4565b60405190815260200160405180910390a15050565b60606109a860a98054610c879061506e565b80601f0160208091040260200160405190810160405280929190818152602001828054610cb39061506e565b8015610d005780601f10610cd557610100808354040283529160200191610d00565b820191906000526020600020905b815481529060010190602001808311610ce357829003601f168201915b5050505050612760565b610d12612656565b609c54604051631f2afc9960e11b8152600481018390526001600160a01b0390911690633e55f93290602401600060405180830381600087803b158015610d5857600080fd5b505af1158015610d6c573d6000803e3d6000fd5b505050507f9163810ee1e29168d4ce900e48a333fb8fbd3fd070d2bef67f6d4db0846a469f8160405161092f91815260200190565b610da9612656565b610db161286a565b610db96128bc565b610dc1611778565b565b610dc1326124ee565b610dd4612656565b610ddc611036565b60a160009054906101000a90046001600160a01b03166001600160a01b031663caa6fea46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e53919061512f565b15610ec25760a160009054906101000a90046001600160a01b03166001600160a01b031663db2e21bc6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610ea857600080fd5b505af1158015610ebc573d6000803e3d6000fd5b50505050565b60a1546001600160a01b0316632e1a7d4d610edb61093a565b6040518263ffffffff1660e01b8152600401610ef991815260200190565b600060405180830381600087803b158015610ea857600080fd5b60a154600160b01b900460ff1615610dc1576097546001600160a01b03163314610dc35760405162461bcd60e51b8152600401610a65906150a2565b610f576126b0565b609780546001600160a01b0319166001600160a01b0383169081179091556040519081527fd459c7242e23d490831b5676a611c4342d899d28f342d89ae80793e56a930f309060200161092f565b60a880546109ba9061506e565b610fba6126b0565b610dc16000612e67565b6000610fce61093a565b610fd66116b1565b6109a8919061514c565b610fe8612656565b609980546001600160a01b0319166001600160a01b0383169081179091556040519081527fefb5cfa1a8690c124332ab93324539c5c9c4be03f28aeb8be86f2d8a0c9fb99b9060200161092f565b61103e612656565b611046612eb9565b610dc1612ef6565b609c54604051636788231160e11b81523060048201526000916001600160a01b03169063cf10462290602401610967565b6001600160a01b03841630146110c65760405162461bcd60e51b815260206004820152600c60248201526b3bb937b7339039b2b73232b960a11b6044820152606401610a65565b3373a4477d98e519d4c1d66aef4efdf7cbeb84f4f778146111165760405162461bcd60e51b815260206004820152600a60248201526908599b185cda141bdbdb60b21b6044820152606401610a65565b60a154600160b81b900460ff1661115a5760405162461bcd60e51b815260206004820152600860248201526710b33630b9b427b760c11b6044820152606401610a65565b6040516370a0823160e01b81523060048201526000907363349ba5e1f71252ecd56e8f950d1a518b400b60906370a0823190602401602060405180830381865afa1580156111ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d09190615055565b6040516350ea861d60e11b815260048101829052602481018690523060448201524260648201529091507363349ba5e1f71252ecd56e8f950d1a518b400b609063a1d50c3a90608401600060405180830381600087803b15801561123357600080fd5b505af1158015611247573d6000803e3d6000fd5b50506040516370a0823160e01b815230600482015260009250731a51b19ce03dbe0cb44c1528e34a7edd7771e9af91506370a0823190602401602060405180830381865afa15801561129d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c19190615055565b905061136c733921e8cb45b17fc029a0a6de958330ca4e58339060a580546112e89061506e565b80601f01602080910402602001604051908101604052809291908181526020018280546113149061506e565b80156113615780601f1061133657610100808354040283529160200191611361565b820191906000526020600020905b81548152906001019060200180831161134457829003601f168201915b50505050508361335f565b50600061137886613400565b611382908761514c565b90506113b1600080516020615a0683398151915273a4477d98e519d4c1d66aef4efdf7cbeb84f4f7788361270a565b6040516370a0823160e01b8152306004820152600090600080516020615a06833981519152906370a0823190602401602060405180830381865afa1580156113fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114219190615055565b9050611448733921e8cb45b17fc029a0a6de958330ca4e58339060a680546112e89061506e565b505060a1805460ff60b81b1916905550505050505050565b6114686126b0565b609b80546001600160a01b0319166001600160a01b0383169081179091556040519081527f8041329bf7057543a2c2ff4e4071d1d488a31f82ed44e169b5cd2f04f5e3ac859060200161092f565b6114be612656565b60328111156114f85760405162461bcd60e51b8152600401610a65906020808252600490820152630216361760e41b604082015260600190565b609d8190556040518181527f3aa4413905e8f015896ec5880bdde24088ccb19b578f9fcf6800354d5320d4af9060200161092f565b611535614ad4565b604051806060016040528061154861349b565b81526020016000815260200161155c611950565b9052919050565b61156b6126b0565b801561169f5760006115b283838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061276092505050565b90506000805160206159e68339815191526001600160a01b0316816000815181106115df576115df61515f565b60200260200101516001600160a01b0316146116275760405162461bcd60e51b8152602060048201526007602482015266216e617469766560c81b6044820152606401610a65565b609f5481516001600160a01b03909116908290611646906001906150d8565b815181106116565761165661515f565b60200260200101516001600160a01b03161461169d5760405162461bcd60e51b8152600401610a65906020808252600490820152630216c70360e41b604082015260600190565b505b60a86116ac8284836151bb565b505050565b609e546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401610967565b609a546001600160a01b0316331461172a5760405162461bcd60e51b815260206004820152600b60248201526a085cdd1c985d1959da5cdd60aa1b6044820152606401610a65565b609a80546001600160a01b0319166001600160a01b0383169081179091556040519081527f46d58e3fa07bf19b1d27240f0e286b27e9f7c1b0d88933333fe833b60eec54129060200161092f565b611780613546565b609e546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156117c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ed9190615055565b905080156108975760a15460405163b6b55f2560e01b8152600481018390526001600160a01b039091169063b6b55f2590602401600060405180830381600087803b15801561183b57600080fd5b505af115801561184f573d6000803e3d6000fd5b505050507f4d6ce1e535dbade1c23defba91e23b8f791ce5edc0cc320257a2b364e4e3842661187c610fc4565b60405190815260200161092f565b60a780546109ba9061506e565b61189f6126b0565b609880546001600160a01b0319166001600160a01b0383169081179091556040519081527f5ca6e64c4522e68e154aa9372f2c5969cd37d9640e59f66953dc472f54ee86fa9060200161092f565b60a481815481106118fd57600080fd5b6000918252602090912060029091020180546001909101546001600160a01b03918216925090811690600160a01b900460ff1683565b60a680546109ba9061506e565b60a381815481106118fd57600080fd5b600061195e60655460ff1690565b6119695750609d5490565b50600090565b60606109a860a88054610c879061506e565b600054610100900460ff16158080156119a15750600054600160ff909116105b806119bb5750303b1580156119bb575060005460ff166001145b611a1e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610a65565b6000805460ff191660011790558015611a41576000805461ff0019166101001790555b611a4a8261358c565b8c609e60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508b60a160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555089896000818110611aab57611aab61515f565b9050602002016020810190611ac09190614b89565b60a18054911515600160c01b0260ff60c01b1990921691909117905589896001818110611aef57611aef61515f565b9050602002016020810190611b049190614b89565b60a1805464ff000000ff60a81b1916600160c81b9215159290920260ff60a81b191691909117600160a81b8d151502179055609e5460408051630dfe168160e01b815290516001600160a01b0390921691630dfe1681916004808201926020929091908290030181865afa158015611b80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ba4919061527b565b609f80546001600160a01b0319166001600160a01b03928316179055609e546040805163d21220a760e01b81529051919092169163d21220a79160048083019260209291908290030181865afa158015611c02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c26919061527b565b60a080546001600160a01b0319166001600160a01b03928316179055609e54604080516322be3de160e01b8152905191909216916322be3de19160048083019260209291908290030181865afa158015611c84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ca8919061512f565b60a18054911515600160a01b0260ff60a01b199092169190911790819055600160c01b900460ff16611d0157611cfc84846000818110611cea57611cea61515f565b90506020028101906107279190615298565b611d63565b60005b87811015611d615760a3898983818110611d2057611d2061515f565b835460018101855560009485526020909420606090910292909201926002029091019050611d4e82826152fe565b505080611d5a9061535b565b9050611d04565b505b60a154600160c81b900460ff16611da157611d9c84846001818110611d8a57611d8a61515f565b90506020028101906108899190615298565b611e03565b60005b85811015611e015760a4878783818110611dc057611dc061515f565b835460018101855560009485526020909420606090910292909201926002029091019050611dee82826152fe565b505080611dfa9061535b565b9050611da4565b505b604080516002808252606082018352600092602083019080368337019050509050731a51b19ce03dbe0cb44c1528e34a7edd7771e9af81600081518110611e4c57611e4c61515f565b60200260200101906001600160a01b031690816001600160a01b031681525050600080516020615a0683398151915281600181518110611e8e57611e8e61515f565b6001600160a01b03929092166020928302919091018201526040805160028082526060820183526000939192909183019080368337019050509050600080516020615a0683398151915281600081518110611eeb57611eeb61515f565b60200260200101906001600160a01b031690816001600160a01b0316815250506000805160206159e683398151915281600181518110611f2d57611f2d61515f565b6001600160a01b039290921660209283029190910182015260408051600280825260608201835260009391929091830190803683370190505090506000805160206159e683398151915281600081518110611f8a57611f8a61515f565b60200260200101906001600160a01b031690816001600160a01b031681525050600080516020615a0683398151915281600181518110611fcc57611fcc61515f565b60200260200101906001600160a01b031690816001600160a01b031681525050611ff5836136e8565b60a5906120029082615374565b5061200c826136e8565b60a6906120199082615374565b50612023816136e8565b60a7906120309082615374565b5060a1805460ff60b01b1916600160b01b1790556000609d556120516128bc565b505050801561209a576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050505050505050565b60a980546109ba9061506e565b6120be6126b0565b6001600160a01b0381166121235760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a65565b61089781612e67565b6097546001600160a01b031633146121565760405162461bcd60e51b8152600401610a65906150a2565b600061216061093a565b11156122b95760a160009054906101000a90046001600160a01b03166001600160a01b031663caa6fea46040518163ffffffff1660e01b8152600401602060405180830381865afa1580156121b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121dd919061512f565b1561224f5760a160009054906101000a90046001600160a01b03166001600160a01b031663db2e21bc6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561223257600080fd5b505af1158015612246573d6000803e3d6000fd5b505050506122b9565b60a1546001600160a01b0316632e1a7d4d61226861093a565b6040518263ffffffff1660e01b815260040161228691815260200190565b600060405180830381600087803b1580156122a057600080fd5b505af11580156122b4573d6000803e3d6000fd5b505050505b609e546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612302573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123269190615055565b609e5460975460405163a9059cbb60e01b81529293506001600160a01b039182169263a9059cbb9261235e9216908590600401615433565b6020604051808303816000875af115801561237d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123a1919061512f565b5050565b6123ad6126b0565b80156124e15760006123f483838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061276092505050565b90506000805160206159e68339815191526001600160a01b0316816000815181106124215761242161515f565b60200260200101516001600160a01b0316146124695760405162461bcd60e51b8152602060048201526007602482015266216e617469766560c81b6044820152606401610a65565b60a05481516001600160a01b03909116908290612488906001906150d8565b815181106124985761249861515f565b60200260200101516001600160a01b0316146124df5760405162461bcd60e51b8152600401610a6590602080825260049082015263216c703160e01b604082015260600190565b505b60a96116ac8284836151bb565b6124f6613546565b60a160009054906101000a90046001600160a01b03166001600160a01b0316633d18b9126040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561254657600080fd5b505af115801561255a573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092507363349ba5e1f71252ecd56e8f950d1a518b400b6091506370a0823190602401602060405180830381865afa1580156125b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125d49190615055565b905080156123a1576125e5816137a1565b6125ee826138c0565b6125f6613a85565b60006126006116b1565b905061260a611778565b4260a255337f9bc239f1724cacfb88cb1d66a2dc437467699b68a8c90d7b63110cf4b6f9241082612639610fc4565b6040805192835260208301919091520160405180910390a2505050565b6033546001600160a01b031633148061267957506099546001600160a01b031633145b610dc15760405162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b6044820152606401610a65565b6033546001600160a01b03163314610dc15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a65565b6116ac8363a9059cbb60e01b8484604051602401612729929190615433565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526145a7565b6060600061276d83614679565b9050600061277c82600161514c565b6001600160401b0381111561279357612793614c6f565b6040519080825280602002602001820160405280156127bc578160200160208202803683370190505b50905060005b82811015612862576000806127d68761469a565b91509150818484815181106127ed576127ed61515f565b6001600160a01b0390921660209283029190910190910152808461281285600161514c565b815181106128225761282261515f565b60200260200101906001600160a01b031690816001600160a01b03168152505061284b876146bb565b96505050808061285a9061535b565b9150506127c2565b509392505050565b6128726146d7565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b609e5460a15460405163095ea7b360e01b81526001600160a01b039283169263095ea7b3926128f49291169060001990600401615433565b6020604051808303816000875af1158015612913573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612937919061512f565b5060405163095ea7b360e01b8152731a51b19ce03dbe0cb44c1528e34a7edd7771e9af9063095ea7b39061298790733921e8cb45b17fc029a0a6de958330ca4e5833909060001990600401615433565b6020604051808303816000875af11580156129a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ca919061512f565b5060985460405163095ea7b360e01b81526000805160206159e68339815191529163095ea7b391612a0b916001600160a01b03169060001990600401615433565b6020604051808303816000875af1158015612a2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a4e919061512f565b5060405163095ea7b360e01b81526000805160206159e68339815191529063095ea7b390612a9890733921e8cb45b17fc029a0a6de958330ca4e5833909060001990600401615433565b6020604051808303816000875af1158015612ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612adb919061512f565b5060405163095ea7b360e01b8152600080516020615a068339815191529063095ea7b390612b2590733921e8cb45b17fc029a0a6de958330ca4e5833909060001990600401615433565b6020604051808303816000875af1158015612b44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b68919061512f565b5060985460405163095ea7b360e01b8152600080516020615a068339815191529163095ea7b391612ba9916001600160a01b03169060001990600401615433565b6020604051808303816000875af1158015612bc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bec919061512f565b5060405163095ea7b360e01b8152600080516020615a068339815191529063095ea7b390612c36907363349ba5e1f71252ecd56e8f950d1a518b400b609060001990600401615433565b6020604051808303816000875af1158015612c55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c79919061512f565b50609f5460985460405163095ea7b360e01b81526001600160a01b039283169263095ea7b392612cb192911690600090600401615433565b6020604051808303816000875af1158015612cd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cf4919061512f565b50609f5460985460405163095ea7b360e01b81526001600160a01b039283169263095ea7b392612d2d9291169060001990600401615433565b6020604051808303816000875af1158015612d4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d70919061512f565b5060a05460985460405163095ea7b360e01b81526001600160a01b039283169263095ea7b392612da892911690600090600401615433565b6020604051808303816000875af1158015612dc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612deb919061512f565b5060a05460985460405163095ea7b360e01b81526001600160a01b039283169263095ea7b392612e249291169060001990600401615433565b6020604051808303816000875af1158015612e43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610897919061512f565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612ec1613546565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861289f3390565b609e5460a15460405163095ea7b360e01b81526001600160a01b039283169263095ea7b392612f2d92911690600090600401615433565b6020604051808303816000875af1158015612f4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f70919061512f565b5060405163095ea7b360e01b8152731a51b19ce03dbe0cb44c1528e34a7edd7771e9af9063095ea7b390612fbf90733921e8cb45b17fc029a0a6de958330ca4e58339090600090600401615433565b6020604051808303816000875af1158015612fde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613002919061512f565b5060985460405163095ea7b360e01b81526000805160206159e68339815191529163095ea7b391613042916001600160a01b031690600090600401615433565b6020604051808303816000875af1158015613061573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613085919061512f565b5060405163095ea7b360e01b81526000805160206159e68339815191529063095ea7b3906130ce90733921e8cb45b17fc029a0a6de958330ca4e58339090600090600401615433565b6020604051808303816000875af11580156130ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613111919061512f565b5060405163095ea7b360e01b8152600080516020615a068339815191529063095ea7b39061315a90733921e8cb45b17fc029a0a6de958330ca4e58339090600090600401615433565b6020604051808303816000875af1158015613179573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061319d919061512f565b5060985460405163095ea7b360e01b8152600080516020615a068339815191529163095ea7b3916131dd916001600160a01b031690600090600401615433565b6020604051808303816000875af11580156131fc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613220919061512f565b5060405163095ea7b360e01b8152600080516020615a068339815191529063095ea7b390613269907363349ba5e1f71252ecd56e8f950d1a518b400b6090600090600401615433565b6020604051808303816000875af1158015613288573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132ac919061512f565b50609f5460985460405163095ea7b360e01b81526001600160a01b039283169263095ea7b3926132e492911690600090600401615433565b6020604051808303816000875af1158015613303573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613327919061512f565b5060a05460985460405163095ea7b360e01b81526001600160a01b039283169263095ea7b392612e2492911690600090600401615433565b6040805160a081018252838152306020820152428183015260608101839052600060808201819052915163c04b8d5960e01b81526001600160a01b0386169063c04b8d59906133b290849060040161544c565b6020604051808303816000875af11580156133d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133f59190615055565b9150505b9392505050565b60008073bc7695fd00e3b32d08124b7a4287493aee99f9ee6001600160a01b03166340bbd7756040518163ffffffff1660e01b8152600401602060405180830381865afa158015613455573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134799190615055565b9050613487816127106150d8565b61349182856150eb565b6133f99190615102565b6134d66040518060c0016040528060008152602001600081526020016000815260200160008152602001606081526020016000151581525090565b609c54604051639af608c960e01b81523060048201526001600160a01b0390911690639af608c990602401600060405180830381865afa15801561351e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109a891908101906154a4565b60655460ff1615610dc15760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610a65565b600054610100900460ff166135b35760405162461bcd60e51b8152600401610a6590615581565b6135bb614720565b6135c361474f565b6135d06020820182614b53565b609780546001600160a01b0319166001600160a01b03929092169190911790556136006040820160208301614b53565b609880546001600160a01b0319166001600160a01b03929092169190911790556136306060820160408301614b53565b609980546001600160a01b0319166001600160a01b03929092169190911790556136606080820160608301614b53565b609a80546001600160a01b0319166001600160a01b039290921691909117905561369060a0820160808301614b53565b609b80546001600160a01b0319166001600160a01b03929092169190911790556136c060c0820160a08301614b53565b609c80546001600160a01b0319166001600160a01b039290921691909117905550600a609d55565b6060816000815181106136fd576136fd61515f565b602002602001015160405160200161372d919060609190911b6bffffffffffffffffffffffff1916815260140190565b60408051601f19818403018152919052905060015b825181101561379b578183828151811061375e5761375e61515f565b60200260200101516040516020016137779291906155cc565b604051602081830303815290604052915080806137939061535b565b915050613742565b50919050565b6040516319ce656f60e11b8152600481018290526000907363349ba5e1f71252ecd56e8f950d1a518b400b609063339ccade90602401602060405180830381865afa1580156137f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138189190615055565b60a1805460ff60b81b1916600160b81b17905560405163022c0d9f60e01b81526004810182905260006024820152306044820152608060648201526005608482015264426565667960d81b60a482015290915073a4477d98e519d4c1d66aef4efdf7cbeb84f4f7789063022c0d9f9060c401600060405180830381600087803b1580156138a457600080fd5b505af11580156138b8573d6000803e3d6000fd5b505050505050565b60006138ca61349b565b80516040516370a0823160e01b8152306004820152919250600091670de0b6b3a764000091906000805160206159e6833981519152906370a0823190602401602060405180830381865afa158015613926573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061394a9190615055565b61395491906150eb565b61395e9190615102565b90506000670de0b6b3a764000083604001518361397b91906150eb565b6139859190615102565b90506139a06000805160206159e6833981519152858361270a565b6000670de0b6b3a76400008460200151846139bb91906150eb565b6139c59190615102565b609b549091506139ee906000805160206159e6833981519152906001600160a01b03168361270a565b6000670de0b6b3a7640000856060015185613a0991906150eb565b613a139190615102565b609a54909150613a3c906000805160206159e6833981519152906001600160a01b03168361270a565b60408051848152602081018490529081018290527fd255b592c7f268a73e534da5219a60ff911b4cf6daae21c7d20527dd657bd99a9060600160405180910390a1505050505050565b6040516370a0823160e01b81523060048201526000906000805160206159e6833981519152906370a0823190602401602060405180830381865afa158015613ad1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613af59190615055565b60a154909150600160a81b900460ff16613b9f57613b2e733921e8cb45b17fc029a0a6de958330ca4e58339060a780546112e89061506e565b506040516370a0823160e01b8152306004820152600080516020615a06833981519152906370a0823190602401602060405180830381865afa158015613b78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b9c9190615055565b90505b6000613bac600283615102565b90506000613bba82846150d8565b60a154909150600090600160a81b900460ff16613be557600080516020615a06833981519152613bf5565b6000805160206159e68339815191525b60a154909150600160a01b900460ff161561414e57609f546040805163313ce56760e01b815290516000926001600160a01b03169163313ce5679160048083019260209291908290030181865afa158015613c54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c789190615055565b613c8390600a6156e7565b9050600060a060009054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015613cda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cfe9190615055565b613d0990600a6156e7565b609f5490915060009081906001600160a01b03868116911614613e5b5760a154600160c01b900460ff1615613dd2576098546040516326207f2d60e21b81526001600160a01b0390911690639881fcb490613d6b908a9060a39060040161575d565b600060405180830381865afa158015613d88573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052613db09190810190615799565b60a35481518110613dc357613dc361515f565b60200260200101519150613e5f565b60405163cdca175360e01b815273851d97fd7823e44193d227682e32234ef8cac83e9063cdca175390613e0c9060a8908b9060040161581e565b6000604051808303816000875af1158015613e2b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052613e5391908101906158b2565b509150613e5f565b8691505b60a0546001600160a01b03868116911614613fa95760a154600160c81b900460ff1615613f20576098546040516326207f2d60e21b81526001600160a01b0390911690639881fcb490613eb990899060a49060040161575d565b600060405180830381865afa158015613ed6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052613efe9190810190615799565b60a45481518110613f1157613f1161515f565b60200260200101519050613fac565b60405163cdca175360e01b815273851d97fd7823e44193d227682e32234ef8cac83e9063cdca175390613f5a9060a9908a9060040161581e565b6000604051808303816000875af1158015613f79573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052613fa191908101906158b2565b509050613fac565b50845b83613fbf83670de0b6b3a76400006150eb565b613fc99190615102565b915082613fde82670de0b6b3a76400006150eb565b613fe89190615102565b609854609f5460a05460a1546040516326283ecf60e21b81526001600160a01b0393841660048201529183166024830152600160a01b900460ff16151560448201526064810186905260848101849052929350600092839291909116906398a0fb3c9060a401606060405180830381865afa15801561406b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061408f919061595f565b509092509050856140a883670de0b6b3a76400006150eb565b6140b29190615102565b9150846140c782670de0b6b3a76400006150eb565b6140d19190615102565b905060008282856140ea88670de0b6b3a76400006150eb565b6140f49190615102565b6140fe91906150eb565b6141089190615102565b905061411c81670de0b6b3a764000061514c565b61412e8c670de0b6b3a76400006150eb565b6141389190615102565b99506141448a8c6150d8565b9850505050505050505b609f546001600160a01b038281169116146142a75760a154600160c01b900460ff16156141fc57609854604051631e82ecdb60e31b81526001600160a01b039091169063f41766d8906141af90869060009060a3903090429060040161598d565b6000604051808303816000875af11580156141ce573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526141f69190810190615799565b506142a7565b6142a5733921e8cb45b17fc029a0a6de958330ca4e58339060a880546142219061506e565b80601f016020809104026020016040519081016040528092919081815260200182805461424d9061506e565b801561429a5780601f1061426f5761010080835404028352916020019161429a565b820191906000526020600020905b81548152906001019060200180831161427d57829003601f168201915b50505050508561335f565b505b60a0546001600160a01b038281169116146144005760a154600160c81b900460ff161561435557609854604051631e82ecdb60e31b81526001600160a01b039091169063f41766d89061430890859060009060a4903090429060040161598d565b6000604051808303816000875af1158015614327573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261434f9190810190615799565b50614400565b6143fe733921e8cb45b17fc029a0a6de958330ca4e58339060a9805461437a9061506e565b80601f01602080910402602001604051908101604052809291908181526020018280546143a69061506e565b80156143f35780601f106143c8576101008083540402835291602001916143f3565b820191906000526020600020905b8154815290600101906020018083116143d657829003601f168201915b50505050508461335f565b505b609f546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015614449573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061446d9190615055565b60a0546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156144bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144df9190615055565b609854609f5460a05460a154604051635a47ddc360e01b81526001600160a01b0393841660048201529183166024830152600160a01b900460ff16151560448201526064810186905260848101849052600160a4820181905260c48201523060e4820152426101048201529293501690635a47ddc390610124016060604051808303816000875af1158015614578573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061459c919061595f565b505050505050505050565b60006145fc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661477e9092919063ffffffff16565b8051909150156116ac578080602001905181019061461a919061512f565b6116ac5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a65565b6000601480835161468a91906150d8565b6146949190615102565b92915050565b6000806146a78382614795565b91506146b4836014614795565b9050915091565b606061469460148084516146cf91906150d8565b8491906147fa565b60655460ff16610dc15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a65565b600054610100900460ff166147475760405162461bcd60e51b8152600401610a6590615581565b610dc1614907565b600054610100900460ff166147765760405162461bcd60e51b8152600401610a6590615581565b610dc1614937565b606061478d848460008561496a565b949350505050565b60006147a282601461514c565b835110156147ea5760405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b6044820152606401610a65565b500160200151600160601b900490565b60608161480881601f61514c565b10156148475760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610a65565b614851828461514c565b845110156148955760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610a65565b6060821580156148b457604051915060008252602082016040526148fe565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156148ed5780518352602092830192016148d5565b5050858452601f01601f1916604052505b50949350505050565b600054610100900460ff1661492e5760405162461bcd60e51b8152600401610a6590615581565b610dc133612e67565b600054610100900460ff1661495e5760405162461bcd60e51b8152600401610a6590615581565b6065805460ff19169055565b6060824710156149cb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a65565b6001600160a01b0385163b614a225760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a65565b600080866001600160a01b03168587604051614a3e91906159c9565b60006040518083038185875af1925050503d8060008114614a7b576040519150601f19603f3d011682016040523d82523d6000602084013e614a80565b606091505b5091509150614a90828286614a9b565b979650505050505050565b60608315614aaa5750816133f9565b825115614aba5782518084602001fd5b8160405162461bcd60e51b8152600401610a659190614bf6565b6040518060600160405280614b1a6040518060c0016040528060008152602001600081526020016000815260200160008152602001606081526020016000151581525090565b815260200160008152602001600081525090565b6001600160a01b038116811461089757600080fd5b8035614b4e81614b2e565b919050565b600060208284031215614b6557600080fd5b81356133f981614b2e565b801515811461089757600080fd5b8035614b4e81614b70565b600060208284031215614b9b57600080fd5b81356133f981614b70565b60005b83811015614bc1578181015183820152602001614ba9565b50506000910152565b60008151808452614be2816020860160208601614ba6565b601f01601f19169290920160200192915050565b6020815260006133f96020830184614bca565b600060208284031215614c1b57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b81811015614c635783516001600160a01b031683529284019291840191600101614c3e565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b60405160c081016001600160401b0381118282101715614ca757614ca7614c6f565b60405290565b604051601f8201601f191681016001600160401b0381118282101715614cd557614cd5614c6f565b604052919050565b60006001600160401b03821115614cf657614cf6614c6f565b50601f01601f191660200190565b60008060008060808587031215614d1a57600080fd5b8435614d2581614b2e565b9350602085013592506040850135915060608501356001600160401b03811115614d4e57600080fd5b8501601f81018713614d5f57600080fd5b8035614d72614d6d82614cdd565b614cad565b818152886020838501011115614d8757600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b60208152600082516060602084015280516080840152602081015160a0840152604081015160c0840152606081015160e0840152608081015160c0610100850152614df8610140850182614bca565b905060a082015115156101208501526020850151604085015260408501516060850152809250505092915050565b60008060208385031215614e3957600080fd5b82356001600160401b0380821115614e5057600080fd5b818501915085601f830112614e6457600080fd5b813581811115614e7357600080fd5b866020828501011115614e8557600080fd5b60209290920196919550909350505050565b60008083601f840112614ea957600080fd5b5081356001600160401b03811115614ec057600080fd5b6020830191508360208260051b8501011115614edb57600080fd5b9250929050565b60008083601f840112614ef457600080fd5b5081356001600160401b03811115614f0b57600080fd5b602083019150836020606083028501011115614edb57600080fd5b600060c0828403121561379b57600080fd5b6000806000806000806000806000806000806101a08d8f031215614f5b57600080fd5b614f648d614b43565b9b50614f7260208e01614b43565b9a50614f8060408e01614b7e565b99506001600160401b0360608e01351115614f9a57600080fd5b614faa8e60608f01358f01614e97565b90995097506001600160401b0360808e01351115614fc757600080fd5b614fd78e60808f01358f01614ee2565b90975095506001600160401b0360a08e01351115614ff457600080fd5b6150048e60a08f01358f01614ee2565b90955093506001600160401b0360c08e0135111561502157600080fd5b6150318e60c08f01358f01614e97565b90935091506150438e60e08f01614f26565b90509295989b509295989b509295989b565b60006020828403121561506757600080fd5b5051919050565b600181811c9082168061508257607f821691505b60208210810361379b57634e487b7160e01b600052602260045260246000fd5b602080825260069082015265085d985d5b1d60d21b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115614694576146946150c2565b8082028115828204841417614694576146946150c2565b60008261511f57634e487b7160e01b600052601260045260246000fd5b500490565b8051614b4e81614b70565b60006020828403121561514157600080fd5b81516133f981614b70565b80820180821115614694576146946150c2565b634e487b7160e01b600052603260045260246000fd5b601f8211156116ac57600081815260208120601f850160051c8101602086101561519c5750805b601f850160051c820191505b818110156138b8578281556001016151a8565b6001600160401b038311156151d2576151d2614c6f565b6151e6836151e0835461506e565b83615175565b6000601f84116001811461521a57600085156152025750838201355b600019600387901b1c1916600186901b178355615274565b600083815260209020601f19861690835b8281101561524b578685013582556020948501946001909201910161522b565b50868210156152685760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60006020828403121561528d57600080fd5b81516133f981614b2e565b6000808335601e198436030181126152af57600080fd5b8301803591506001600160401b038211156152c957600080fd5b602001915036819003821315614edb57600080fd5b80546001600160a01b0319166001600160a01b0392909216919091179055565b813561530981614b2e565b61531381836152de565b5060018101602083013561532681614b2e565b61533081836152de565b50604083013561533f81614b70565b815460ff60a01b191690151560a01b60ff60a01b161790555050565b60006001820161536d5761536d6150c2565b5060010190565b81516001600160401b0381111561538d5761538d614c6f565b6153a18161539b845461506e565b84615175565b602080601f8311600181146153d657600084156153be5750858301515b600019600386901b1c1916600185901b1785556138b8565b600085815260208120601f198616915b82811015615405578886015182559484019460019091019084016153e6565b50858210156154235787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b03929092168252602082015260400190565b602081526000825160a0602084015261546860c0840182614bca565b905060018060a01b0360208501511660408401526040840151606084015260608401516080840152608084015160a08401528091505092915050565b600060208083850312156154b757600080fd5b82516001600160401b03808211156154ce57600080fd5b9084019060c082870312156154e257600080fd5b6154ea614c85565b825181528383015184820152604083015160408201526060830151606082015260808301518281111561551c57600080fd5b83019150601f8201871361552f57600080fd5b815161553d614d6d82614cdd565b818152888683860101111561555157600080fd5b61556082878301888701614ba6565b60808301525061557260a08401615124565b60a08201529695505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600083516155de818460208801614ba6565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b600181815b8085111561563e578160001904821115615624576156246150c2565b8085161561563157918102915b93841c9390800290615608565b509250929050565b60008261565557506001614694565b8161566257506000614694565b816001811461567857600281146156825761569e565b6001915050614694565b60ff841115615693576156936150c2565b50506001821b614694565b5060208310610133831016604e8410600b84101617156156c1575081810a614694565b6156cb8383615603565b80600019048211156156df576156df6150c2565b029392505050565b60006133f98383615646565b6000815480845260208085019450836000528060002060005b838110156157525781546001600160a01b039081168852600183810154918216858a015260a09190911c60ff16151560408901526060909701966002909201910161570c565b509495945050505050565b82815260406020820152600061478d60408301846156f3565b60006001600160401b0382111561578f5761578f614c6f565b5060051b60200190565b600060208083850312156157ac57600080fd5b82516001600160401b038111156157c257600080fd5b8301601f810185136157d357600080fd5b80516157e1614d6d82615776565b81815260059190911b8201830190838101908783111561580057600080fd5b928401925b82841015614a9057835182529284019290840190615805565b6040815260008084546158308161506e565b8060408601526060600180841660008114615852576001811461586c5761589d565b60ff1985168884015283151560051b88018301955061589d565b8960005260208060002060005b868110156158945781548b8201870152908401908201615879565b8a018501975050505b50505050506020929092019290925292915050565b600080604083850312156158c557600080fd5b825191506020808401516001600160401b038111156158e357600080fd5b8401601f810186136158f457600080fd5b8051615902614d6d82615776565b81815260059190911b8201830190838101908883111561592157600080fd5b928401925b8284101561595057835161ffff811681146159415760008081fd5b82529284019290840190615926565b80955050505050509250929050565b60008060006060848603121561597457600080fd5b8351925060208401519150604084015190509250925092565b85815284602082015260a0604082015260006159ac60a08301866156f3565b6001600160a01b0394909416606083015250608001529392505050565b600082516159db818460208701614ba6565b919091019291505056fe000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f000000000000000000000000176211869ca2b568f2a7d4ee941e073a821ee1ffa2646970667358221220abb188f443f614df753f2e3760863706d35cfab12f703b13352193ebc8943f1564736f6c63430008130033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103fc5760003560e01c80638da5cb5b11610215578063d92f3d7311610125578063ea82eb9e116100b8578063f20eaeb811610087578063f20eaeb814610832578063f2fde38b1461084d578063fb61778714610860578063fbfa77cf14610868578063fd063fde1461087b57600080fd5b8063ea82eb9e14610806578063ec6282691461080e578063edfdab8f14610821578063f1a392da1461082957600080fd5b8063e14f870d116100f4578063e14f870d146107d0578063e270dbf3146107eb578063e7a7250a146105c7578063e941fa78146107fe57600080fd5b8063d92f3d7314610772578063dc4987cc14610785578063dc593d3c146107c0578063dfbdc437146107c857600080fd5b8063aced1661116101a8578063c1a3d44c11610177578063c1a3d44c1461072c578063c6bbd5a714610734578063c7b9d5301461074f578063d0e30db014610762578063d2027ab31461076a57600080fd5b8063aced1661146106d6578063ae8ecf58146106e9578063b20feaaf14610704578063bb4f50561461071957600080fd5b8063a68833e5116101e4578063a68833e51461067a578063a6a87f5c1461068d578063aa7f0ceb146106a8578063ac1e5025146106c357600080fd5b80638da5cb5b146106435780638e1454591461065457806397fd323d146105c75780639a7bff791461066757600080fd5b80634700d305116103105780636817031b116102a3578063748747e611610272578063748747e6146105f95780638456cb591461060c578063877562b6146106145780638912cb8b146106275780638cfc02501461063b57600080fd5b80636817031b146105ce5780636a62522b146105e1578063715018a6146105e9578063722713f7146105f157600080fd5b80635c975abb116102df5780635c975abb146105965780635ee167c0146105a157806366666aa9146105b457806367a52793146105c757600080fd5b80634700d3051461056a5780634746fb551461057257806354518b1a14610585578063573fef0a1461058e57600080fd5b806322be3de1116103935780633013ce29116103625780633013ce291461051d57806337bdd204146105325780633e55f932146105475780633f4ba83a1461055a5780634641257d1461056257600080fd5b806322be3de1146104bf578063257ae0de146104e357806328857588146104f65780632e1a7d4d1461050a57600080fd5b806311b0b42d116103cf57806311b0b42d146104575780631aaca2f1146104845780631f1fcd51146104995780631fe4a686146104ac57600080fd5b80630e5c011e146104015780630e8fbb5a14610416578063106fdbd014610429578063115880861461043c575b600080fd5b61041461040f366004614b53565b61088e565b005b610414610424366004614b89565b61089a565b610414610437366004614b53565b6108dd565b61044461093a565b6040519081526020015b60405180910390f35b61046c6000805160206159e683398151915281565b6040516001600160a01b03909116815260200161044e565b61048c6109ad565b60405161044e9190614bf6565b609e5461046c906001600160a01b031681565b609a5461046c906001600160a01b031681565b60a1546104d390600160a01b900460ff1681565b604051901515815260200161044e565b60985461046c906001600160a01b031681565b60a1546104d390600160a81b900460ff1681565b610414610518366004614c09565b610a3b565b61046c600080516020615a0683398151915281565b61053a610c75565b60405161044e9190614c22565b610414610555366004614c09565b610d0a565b610414610da1565b610414610dc3565b610414610dcc565b609c5461046c906001600160a01b031681565b61044461271081565b610414610f13565b60655460ff166104d3565b609f5461046c906001600160a01b031681565b60a15461046c906001600160a01b031681565b6000610444565b6104146105dc366004614b53565b610f4f565b61048c610fa5565b610414610fb2565b610444610fc4565b610414610607366004614b53565b610fe0565b610414611036565b60a05461046c906001600160a01b031681565b60a1546104d390600160b01b900460ff1681565b61044461104e565b6033546001600160a01b031661046c565b609b5461046c906001600160a01b031681565b610414610675366004614d04565b61107f565b610414610688366004614b53565b611460565b61046c733921e8cb45b17fc029a0a6de958330ca4e58339081565b61046c73a4477d98e519d4c1d66aef4efdf7cbeb84f4f77881565b6104146106d1366004614c09565b6114b6565b60995461046c906001600160a01b031681565b61046c7363349ba5e1f71252ecd56e8f950d1a518b400b6081565b61070c61152d565b60405161044e9190614da9565b610414610727366004614e26565b611563565b6104446116b1565b61046c73851d97fd7823e44193d227682e32234ef8cac83e81565b61041461075d366004614b53565b6116e2565b610414611778565b61048c61188a565b610414610780366004614b53565b611897565b610798610793366004614c09565b6118ed565b604080516001600160a01b03948516815293909216602084015215159082015260600161044e565b61048c611933565b610444603281565b61046c73bc7695fd00e3b32d08124b7a4287493aee99f9ee81565b6107986107f9366004614c09565b611940565b610444611950565b61053a61196f565b61041461081c366004614f38565b611981565b61048c6120a9565b61044460a25481565b61046c731a51b19ce03dbe0cb44c1528e34a7edd7771e9af81565b61041461085b366004614b53565b6120b6565b61041461212c565b60975461046c906001600160a01b031681565b610414610889366004614e26565b6123a5565b610897816124ee565b50565b6108a2612656565b60a1805460ff60b01b1916600160b01b8315158102919091179182905560ff910416156108d35761089760006114b6565b610897600a6114b6565b6108e56126b0565b609c80546001600160a01b0319166001600160a01b0383169081179091556040519081527f91e28ce4210d103c13c5174847e463b836900f8dc63e9d9b42a4255169d19529906020015b60405180910390a150565b60a1546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a08231906024015b602060405180830381865afa158015610984573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a89190615055565b905090565b60a580546109ba9061506e565b80601f01602080910402602001604051908101604052809291908181526020018280546109e69061506e565b8015610a335780601f10610a0857610100808354040283529160200191610a33565b820191906000526020600020905b815481529060010190602001808311610a1657829003601f168201915b505050505081565b6097546001600160a01b03163314610a6e5760405162461bcd60e51b8152600401610a65906150a2565b60405180910390fd5b609e546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adb9190615055565b905081811015610bbf5760a1546001600160a01b0316632e1a7d4d610b0083856150d8565b6040518263ffffffff1660e01b8152600401610b1e91815260200190565b600060405180830381600087803b158015610b3857600080fd5b505af1158015610b4c573d6000803e3d6000fd5b5050609e546040516370a0823160e01b81523060048201526001600160a01b0390911692506370a082319150602401602060405180830381865afa158015610b98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbc9190615055565b90505b81811115610bca5750805b6033546001600160a01b03163214801590610be8575060655460ff16155b15610c1a576000612710609d5483610c0091906150eb565b610c0a9190615102565b9050610c1681836150d8565b9150505b609754609e54610c37916001600160a01b0391821691168361270a565b7f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d610c60610fc4565b60405190815260200160405180910390a15050565b60606109a860a98054610c879061506e565b80601f0160208091040260200160405190810160405280929190818152602001828054610cb39061506e565b8015610d005780601f10610cd557610100808354040283529160200191610d00565b820191906000526020600020905b815481529060010190602001808311610ce357829003601f168201915b5050505050612760565b610d12612656565b609c54604051631f2afc9960e11b8152600481018390526001600160a01b0390911690633e55f93290602401600060405180830381600087803b158015610d5857600080fd5b505af1158015610d6c573d6000803e3d6000fd5b505050507f9163810ee1e29168d4ce900e48a333fb8fbd3fd070d2bef67f6d4db0846a469f8160405161092f91815260200190565b610da9612656565b610db161286a565b610db96128bc565b610dc1611778565b565b610dc1326124ee565b610dd4612656565b610ddc611036565b60a160009054906101000a90046001600160a01b03166001600160a01b031663caa6fea46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e53919061512f565b15610ec25760a160009054906101000a90046001600160a01b03166001600160a01b031663db2e21bc6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610ea857600080fd5b505af1158015610ebc573d6000803e3d6000fd5b50505050565b60a1546001600160a01b0316632e1a7d4d610edb61093a565b6040518263ffffffff1660e01b8152600401610ef991815260200190565b600060405180830381600087803b158015610ea857600080fd5b60a154600160b01b900460ff1615610dc1576097546001600160a01b03163314610dc35760405162461bcd60e51b8152600401610a65906150a2565b610f576126b0565b609780546001600160a01b0319166001600160a01b0383169081179091556040519081527fd459c7242e23d490831b5676a611c4342d899d28f342d89ae80793e56a930f309060200161092f565b60a880546109ba9061506e565b610fba6126b0565b610dc16000612e67565b6000610fce61093a565b610fd66116b1565b6109a8919061514c565b610fe8612656565b609980546001600160a01b0319166001600160a01b0383169081179091556040519081527fefb5cfa1a8690c124332ab93324539c5c9c4be03f28aeb8be86f2d8a0c9fb99b9060200161092f565b61103e612656565b611046612eb9565b610dc1612ef6565b609c54604051636788231160e11b81523060048201526000916001600160a01b03169063cf10462290602401610967565b6001600160a01b03841630146110c65760405162461bcd60e51b815260206004820152600c60248201526b3bb937b7339039b2b73232b960a11b6044820152606401610a65565b3373a4477d98e519d4c1d66aef4efdf7cbeb84f4f778146111165760405162461bcd60e51b815260206004820152600a60248201526908599b185cda141bdbdb60b21b6044820152606401610a65565b60a154600160b81b900460ff1661115a5760405162461bcd60e51b815260206004820152600860248201526710b33630b9b427b760c11b6044820152606401610a65565b6040516370a0823160e01b81523060048201526000907363349ba5e1f71252ecd56e8f950d1a518b400b60906370a0823190602401602060405180830381865afa1580156111ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d09190615055565b6040516350ea861d60e11b815260048101829052602481018690523060448201524260648201529091507363349ba5e1f71252ecd56e8f950d1a518b400b609063a1d50c3a90608401600060405180830381600087803b15801561123357600080fd5b505af1158015611247573d6000803e3d6000fd5b50506040516370a0823160e01b815230600482015260009250731a51b19ce03dbe0cb44c1528e34a7edd7771e9af91506370a0823190602401602060405180830381865afa15801561129d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c19190615055565b905061136c733921e8cb45b17fc029a0a6de958330ca4e58339060a580546112e89061506e565b80601f01602080910402602001604051908101604052809291908181526020018280546113149061506e565b80156113615780601f1061133657610100808354040283529160200191611361565b820191906000526020600020905b81548152906001019060200180831161134457829003601f168201915b50505050508361335f565b50600061137886613400565b611382908761514c565b90506113b1600080516020615a0683398151915273a4477d98e519d4c1d66aef4efdf7cbeb84f4f7788361270a565b6040516370a0823160e01b8152306004820152600090600080516020615a06833981519152906370a0823190602401602060405180830381865afa1580156113fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114219190615055565b9050611448733921e8cb45b17fc029a0a6de958330ca4e58339060a680546112e89061506e565b505060a1805460ff60b81b1916905550505050505050565b6114686126b0565b609b80546001600160a01b0319166001600160a01b0383169081179091556040519081527f8041329bf7057543a2c2ff4e4071d1d488a31f82ed44e169b5cd2f04f5e3ac859060200161092f565b6114be612656565b60328111156114f85760405162461bcd60e51b8152600401610a65906020808252600490820152630216361760e41b604082015260600190565b609d8190556040518181527f3aa4413905e8f015896ec5880bdde24088ccb19b578f9fcf6800354d5320d4af9060200161092f565b611535614ad4565b604051806060016040528061154861349b565b81526020016000815260200161155c611950565b9052919050565b61156b6126b0565b801561169f5760006115b283838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061276092505050565b90506000805160206159e68339815191526001600160a01b0316816000815181106115df576115df61515f565b60200260200101516001600160a01b0316146116275760405162461bcd60e51b8152602060048201526007602482015266216e617469766560c81b6044820152606401610a65565b609f5481516001600160a01b03909116908290611646906001906150d8565b815181106116565761165661515f565b60200260200101516001600160a01b03161461169d5760405162461bcd60e51b8152600401610a65906020808252600490820152630216c70360e41b604082015260600190565b505b60a86116ac8284836151bb565b505050565b609e546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401610967565b609a546001600160a01b0316331461172a5760405162461bcd60e51b815260206004820152600b60248201526a085cdd1c985d1959da5cdd60aa1b6044820152606401610a65565b609a80546001600160a01b0319166001600160a01b0383169081179091556040519081527f46d58e3fa07bf19b1d27240f0e286b27e9f7c1b0d88933333fe833b60eec54129060200161092f565b611780613546565b609e546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156117c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ed9190615055565b905080156108975760a15460405163b6b55f2560e01b8152600481018390526001600160a01b039091169063b6b55f2590602401600060405180830381600087803b15801561183b57600080fd5b505af115801561184f573d6000803e3d6000fd5b505050507f4d6ce1e535dbade1c23defba91e23b8f791ce5edc0cc320257a2b364e4e3842661187c610fc4565b60405190815260200161092f565b60a780546109ba9061506e565b61189f6126b0565b609880546001600160a01b0319166001600160a01b0383169081179091556040519081527f5ca6e64c4522e68e154aa9372f2c5969cd37d9640e59f66953dc472f54ee86fa9060200161092f565b60a481815481106118fd57600080fd5b6000918252602090912060029091020180546001909101546001600160a01b03918216925090811690600160a01b900460ff1683565b60a680546109ba9061506e565b60a381815481106118fd57600080fd5b600061195e60655460ff1690565b6119695750609d5490565b50600090565b60606109a860a88054610c879061506e565b600054610100900460ff16158080156119a15750600054600160ff909116105b806119bb5750303b1580156119bb575060005460ff166001145b611a1e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610a65565b6000805460ff191660011790558015611a41576000805461ff0019166101001790555b611a4a8261358c565b8c609e60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508b60a160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555089896000818110611aab57611aab61515f565b9050602002016020810190611ac09190614b89565b60a18054911515600160c01b0260ff60c01b1990921691909117905589896001818110611aef57611aef61515f565b9050602002016020810190611b049190614b89565b60a1805464ff000000ff60a81b1916600160c81b9215159290920260ff60a81b191691909117600160a81b8d151502179055609e5460408051630dfe168160e01b815290516001600160a01b0390921691630dfe1681916004808201926020929091908290030181865afa158015611b80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ba4919061527b565b609f80546001600160a01b0319166001600160a01b03928316179055609e546040805163d21220a760e01b81529051919092169163d21220a79160048083019260209291908290030181865afa158015611c02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c26919061527b565b60a080546001600160a01b0319166001600160a01b03928316179055609e54604080516322be3de160e01b8152905191909216916322be3de19160048083019260209291908290030181865afa158015611c84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ca8919061512f565b60a18054911515600160a01b0260ff60a01b199092169190911790819055600160c01b900460ff16611d0157611cfc84846000818110611cea57611cea61515f565b90506020028101906107279190615298565b611d63565b60005b87811015611d615760a3898983818110611d2057611d2061515f565b835460018101855560009485526020909420606090910292909201926002029091019050611d4e82826152fe565b505080611d5a9061535b565b9050611d04565b505b60a154600160c81b900460ff16611da157611d9c84846001818110611d8a57611d8a61515f565b90506020028101906108899190615298565b611e03565b60005b85811015611e015760a4878783818110611dc057611dc061515f565b835460018101855560009485526020909420606090910292909201926002029091019050611dee82826152fe565b505080611dfa9061535b565b9050611da4565b505b604080516002808252606082018352600092602083019080368337019050509050731a51b19ce03dbe0cb44c1528e34a7edd7771e9af81600081518110611e4c57611e4c61515f565b60200260200101906001600160a01b031690816001600160a01b031681525050600080516020615a0683398151915281600181518110611e8e57611e8e61515f565b6001600160a01b03929092166020928302919091018201526040805160028082526060820183526000939192909183019080368337019050509050600080516020615a0683398151915281600081518110611eeb57611eeb61515f565b60200260200101906001600160a01b031690816001600160a01b0316815250506000805160206159e683398151915281600181518110611f2d57611f2d61515f565b6001600160a01b039290921660209283029190910182015260408051600280825260608201835260009391929091830190803683370190505090506000805160206159e683398151915281600081518110611f8a57611f8a61515f565b60200260200101906001600160a01b031690816001600160a01b031681525050600080516020615a0683398151915281600181518110611fcc57611fcc61515f565b60200260200101906001600160a01b031690816001600160a01b031681525050611ff5836136e8565b60a5906120029082615374565b5061200c826136e8565b60a6906120199082615374565b50612023816136e8565b60a7906120309082615374565b5060a1805460ff60b01b1916600160b01b1790556000609d556120516128bc565b505050801561209a576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050505050505050565b60a980546109ba9061506e565b6120be6126b0565b6001600160a01b0381166121235760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a65565b61089781612e67565b6097546001600160a01b031633146121565760405162461bcd60e51b8152600401610a65906150a2565b600061216061093a565b11156122b95760a160009054906101000a90046001600160a01b03166001600160a01b031663caa6fea46040518163ffffffff1660e01b8152600401602060405180830381865afa1580156121b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121dd919061512f565b1561224f5760a160009054906101000a90046001600160a01b03166001600160a01b031663db2e21bc6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561223257600080fd5b505af1158015612246573d6000803e3d6000fd5b505050506122b9565b60a1546001600160a01b0316632e1a7d4d61226861093a565b6040518263ffffffff1660e01b815260040161228691815260200190565b600060405180830381600087803b1580156122a057600080fd5b505af11580156122b4573d6000803e3d6000fd5b505050505b609e546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612302573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123269190615055565b609e5460975460405163a9059cbb60e01b81529293506001600160a01b039182169263a9059cbb9261235e9216908590600401615433565b6020604051808303816000875af115801561237d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123a1919061512f565b5050565b6123ad6126b0565b80156124e15760006123f483838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061276092505050565b90506000805160206159e68339815191526001600160a01b0316816000815181106124215761242161515f565b60200260200101516001600160a01b0316146124695760405162461bcd60e51b8152602060048201526007602482015266216e617469766560c81b6044820152606401610a65565b60a05481516001600160a01b03909116908290612488906001906150d8565b815181106124985761249861515f565b60200260200101516001600160a01b0316146124df5760405162461bcd60e51b8152600401610a6590602080825260049082015263216c703160e01b604082015260600190565b505b60a96116ac8284836151bb565b6124f6613546565b60a160009054906101000a90046001600160a01b03166001600160a01b0316633d18b9126040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561254657600080fd5b505af115801561255a573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092507363349ba5e1f71252ecd56e8f950d1a518b400b6091506370a0823190602401602060405180830381865afa1580156125b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125d49190615055565b905080156123a1576125e5816137a1565b6125ee826138c0565b6125f6613a85565b60006126006116b1565b905061260a611778565b4260a255337f9bc239f1724cacfb88cb1d66a2dc437467699b68a8c90d7b63110cf4b6f9241082612639610fc4565b6040805192835260208301919091520160405180910390a2505050565b6033546001600160a01b031633148061267957506099546001600160a01b031633145b610dc15760405162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b6044820152606401610a65565b6033546001600160a01b03163314610dc15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a65565b6116ac8363a9059cbb60e01b8484604051602401612729929190615433565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526145a7565b6060600061276d83614679565b9050600061277c82600161514c565b6001600160401b0381111561279357612793614c6f565b6040519080825280602002602001820160405280156127bc578160200160208202803683370190505b50905060005b82811015612862576000806127d68761469a565b91509150818484815181106127ed576127ed61515f565b6001600160a01b0390921660209283029190910190910152808461281285600161514c565b815181106128225761282261515f565b60200260200101906001600160a01b031690816001600160a01b03168152505061284b876146bb565b96505050808061285a9061535b565b9150506127c2565b509392505050565b6128726146d7565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b609e5460a15460405163095ea7b360e01b81526001600160a01b039283169263095ea7b3926128f49291169060001990600401615433565b6020604051808303816000875af1158015612913573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612937919061512f565b5060405163095ea7b360e01b8152731a51b19ce03dbe0cb44c1528e34a7edd7771e9af9063095ea7b39061298790733921e8cb45b17fc029a0a6de958330ca4e5833909060001990600401615433565b6020604051808303816000875af11580156129a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ca919061512f565b5060985460405163095ea7b360e01b81526000805160206159e68339815191529163095ea7b391612a0b916001600160a01b03169060001990600401615433565b6020604051808303816000875af1158015612a2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a4e919061512f565b5060405163095ea7b360e01b81526000805160206159e68339815191529063095ea7b390612a9890733921e8cb45b17fc029a0a6de958330ca4e5833909060001990600401615433565b6020604051808303816000875af1158015612ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612adb919061512f565b5060405163095ea7b360e01b8152600080516020615a068339815191529063095ea7b390612b2590733921e8cb45b17fc029a0a6de958330ca4e5833909060001990600401615433565b6020604051808303816000875af1158015612b44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b68919061512f565b5060985460405163095ea7b360e01b8152600080516020615a068339815191529163095ea7b391612ba9916001600160a01b03169060001990600401615433565b6020604051808303816000875af1158015612bc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bec919061512f565b5060405163095ea7b360e01b8152600080516020615a068339815191529063095ea7b390612c36907363349ba5e1f71252ecd56e8f950d1a518b400b609060001990600401615433565b6020604051808303816000875af1158015612c55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c79919061512f565b50609f5460985460405163095ea7b360e01b81526001600160a01b039283169263095ea7b392612cb192911690600090600401615433565b6020604051808303816000875af1158015612cd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cf4919061512f565b50609f5460985460405163095ea7b360e01b81526001600160a01b039283169263095ea7b392612d2d9291169060001990600401615433565b6020604051808303816000875af1158015612d4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d70919061512f565b5060a05460985460405163095ea7b360e01b81526001600160a01b039283169263095ea7b392612da892911690600090600401615433565b6020604051808303816000875af1158015612dc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612deb919061512f565b5060a05460985460405163095ea7b360e01b81526001600160a01b039283169263095ea7b392612e249291169060001990600401615433565b6020604051808303816000875af1158015612e43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610897919061512f565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612ec1613546565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861289f3390565b609e5460a15460405163095ea7b360e01b81526001600160a01b039283169263095ea7b392612f2d92911690600090600401615433565b6020604051808303816000875af1158015612f4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f70919061512f565b5060405163095ea7b360e01b8152731a51b19ce03dbe0cb44c1528e34a7edd7771e9af9063095ea7b390612fbf90733921e8cb45b17fc029a0a6de958330ca4e58339090600090600401615433565b6020604051808303816000875af1158015612fde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613002919061512f565b5060985460405163095ea7b360e01b81526000805160206159e68339815191529163095ea7b391613042916001600160a01b031690600090600401615433565b6020604051808303816000875af1158015613061573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613085919061512f565b5060405163095ea7b360e01b81526000805160206159e68339815191529063095ea7b3906130ce90733921e8cb45b17fc029a0a6de958330ca4e58339090600090600401615433565b6020604051808303816000875af11580156130ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613111919061512f565b5060405163095ea7b360e01b8152600080516020615a068339815191529063095ea7b39061315a90733921e8cb45b17fc029a0a6de958330ca4e58339090600090600401615433565b6020604051808303816000875af1158015613179573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061319d919061512f565b5060985460405163095ea7b360e01b8152600080516020615a068339815191529163095ea7b3916131dd916001600160a01b031690600090600401615433565b6020604051808303816000875af11580156131fc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613220919061512f565b5060405163095ea7b360e01b8152600080516020615a068339815191529063095ea7b390613269907363349ba5e1f71252ecd56e8f950d1a518b400b6090600090600401615433565b6020604051808303816000875af1158015613288573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132ac919061512f565b50609f5460985460405163095ea7b360e01b81526001600160a01b039283169263095ea7b3926132e492911690600090600401615433565b6020604051808303816000875af1158015613303573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613327919061512f565b5060a05460985460405163095ea7b360e01b81526001600160a01b039283169263095ea7b392612e2492911690600090600401615433565b6040805160a081018252838152306020820152428183015260608101839052600060808201819052915163c04b8d5960e01b81526001600160a01b0386169063c04b8d59906133b290849060040161544c565b6020604051808303816000875af11580156133d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133f59190615055565b9150505b9392505050565b60008073bc7695fd00e3b32d08124b7a4287493aee99f9ee6001600160a01b03166340bbd7756040518163ffffffff1660e01b8152600401602060405180830381865afa158015613455573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134799190615055565b9050613487816127106150d8565b61349182856150eb565b6133f99190615102565b6134d66040518060c0016040528060008152602001600081526020016000815260200160008152602001606081526020016000151581525090565b609c54604051639af608c960e01b81523060048201526001600160a01b0390911690639af608c990602401600060405180830381865afa15801561351e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109a891908101906154a4565b60655460ff1615610dc15760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610a65565b600054610100900460ff166135b35760405162461bcd60e51b8152600401610a6590615581565b6135bb614720565b6135c361474f565b6135d06020820182614b53565b609780546001600160a01b0319166001600160a01b03929092169190911790556136006040820160208301614b53565b609880546001600160a01b0319166001600160a01b03929092169190911790556136306060820160408301614b53565b609980546001600160a01b0319166001600160a01b03929092169190911790556136606080820160608301614b53565b609a80546001600160a01b0319166001600160a01b039290921691909117905561369060a0820160808301614b53565b609b80546001600160a01b0319166001600160a01b03929092169190911790556136c060c0820160a08301614b53565b609c80546001600160a01b0319166001600160a01b039290921691909117905550600a609d55565b6060816000815181106136fd576136fd61515f565b602002602001015160405160200161372d919060609190911b6bffffffffffffffffffffffff1916815260140190565b60408051601f19818403018152919052905060015b825181101561379b578183828151811061375e5761375e61515f565b60200260200101516040516020016137779291906155cc565b604051602081830303815290604052915080806137939061535b565b915050613742565b50919050565b6040516319ce656f60e11b8152600481018290526000907363349ba5e1f71252ecd56e8f950d1a518b400b609063339ccade90602401602060405180830381865afa1580156137f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138189190615055565b60a1805460ff60b81b1916600160b81b17905560405163022c0d9f60e01b81526004810182905260006024820152306044820152608060648201526005608482015264426565667960d81b60a482015290915073a4477d98e519d4c1d66aef4efdf7cbeb84f4f7789063022c0d9f9060c401600060405180830381600087803b1580156138a457600080fd5b505af11580156138b8573d6000803e3d6000fd5b505050505050565b60006138ca61349b565b80516040516370a0823160e01b8152306004820152919250600091670de0b6b3a764000091906000805160206159e6833981519152906370a0823190602401602060405180830381865afa158015613926573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061394a9190615055565b61395491906150eb565b61395e9190615102565b90506000670de0b6b3a764000083604001518361397b91906150eb565b6139859190615102565b90506139a06000805160206159e6833981519152858361270a565b6000670de0b6b3a76400008460200151846139bb91906150eb565b6139c59190615102565b609b549091506139ee906000805160206159e6833981519152906001600160a01b03168361270a565b6000670de0b6b3a7640000856060015185613a0991906150eb565b613a139190615102565b609a54909150613a3c906000805160206159e6833981519152906001600160a01b03168361270a565b60408051848152602081018490529081018290527fd255b592c7f268a73e534da5219a60ff911b4cf6daae21c7d20527dd657bd99a9060600160405180910390a1505050505050565b6040516370a0823160e01b81523060048201526000906000805160206159e6833981519152906370a0823190602401602060405180830381865afa158015613ad1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613af59190615055565b60a154909150600160a81b900460ff16613b9f57613b2e733921e8cb45b17fc029a0a6de958330ca4e58339060a780546112e89061506e565b506040516370a0823160e01b8152306004820152600080516020615a06833981519152906370a0823190602401602060405180830381865afa158015613b78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b9c9190615055565b90505b6000613bac600283615102565b90506000613bba82846150d8565b60a154909150600090600160a81b900460ff16613be557600080516020615a06833981519152613bf5565b6000805160206159e68339815191525b60a154909150600160a01b900460ff161561414e57609f546040805163313ce56760e01b815290516000926001600160a01b03169163313ce5679160048083019260209291908290030181865afa158015613c54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c789190615055565b613c8390600a6156e7565b9050600060a060009054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015613cda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cfe9190615055565b613d0990600a6156e7565b609f5490915060009081906001600160a01b03868116911614613e5b5760a154600160c01b900460ff1615613dd2576098546040516326207f2d60e21b81526001600160a01b0390911690639881fcb490613d6b908a9060a39060040161575d565b600060405180830381865afa158015613d88573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052613db09190810190615799565b60a35481518110613dc357613dc361515f565b60200260200101519150613e5f565b60405163cdca175360e01b815273851d97fd7823e44193d227682e32234ef8cac83e9063cdca175390613e0c9060a8908b9060040161581e565b6000604051808303816000875af1158015613e2b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052613e5391908101906158b2565b509150613e5f565b8691505b60a0546001600160a01b03868116911614613fa95760a154600160c81b900460ff1615613f20576098546040516326207f2d60e21b81526001600160a01b0390911690639881fcb490613eb990899060a49060040161575d565b600060405180830381865afa158015613ed6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052613efe9190810190615799565b60a45481518110613f1157613f1161515f565b60200260200101519050613fac565b60405163cdca175360e01b815273851d97fd7823e44193d227682e32234ef8cac83e9063cdca175390613f5a9060a9908a9060040161581e565b6000604051808303816000875af1158015613f79573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052613fa191908101906158b2565b509050613fac565b50845b83613fbf83670de0b6b3a76400006150eb565b613fc99190615102565b915082613fde82670de0b6b3a76400006150eb565b613fe89190615102565b609854609f5460a05460a1546040516326283ecf60e21b81526001600160a01b0393841660048201529183166024830152600160a01b900460ff16151560448201526064810186905260848101849052929350600092839291909116906398a0fb3c9060a401606060405180830381865afa15801561406b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061408f919061595f565b509092509050856140a883670de0b6b3a76400006150eb565b6140b29190615102565b9150846140c782670de0b6b3a76400006150eb565b6140d19190615102565b905060008282856140ea88670de0b6b3a76400006150eb565b6140f49190615102565b6140fe91906150eb565b6141089190615102565b905061411c81670de0b6b3a764000061514c565b61412e8c670de0b6b3a76400006150eb565b6141389190615102565b99506141448a8c6150d8565b9850505050505050505b609f546001600160a01b038281169116146142a75760a154600160c01b900460ff16156141fc57609854604051631e82ecdb60e31b81526001600160a01b039091169063f41766d8906141af90869060009060a3903090429060040161598d565b6000604051808303816000875af11580156141ce573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526141f69190810190615799565b506142a7565b6142a5733921e8cb45b17fc029a0a6de958330ca4e58339060a880546142219061506e565b80601f016020809104026020016040519081016040528092919081815260200182805461424d9061506e565b801561429a5780601f1061426f5761010080835404028352916020019161429a565b820191906000526020600020905b81548152906001019060200180831161427d57829003601f168201915b50505050508561335f565b505b60a0546001600160a01b038281169116146144005760a154600160c81b900460ff161561435557609854604051631e82ecdb60e31b81526001600160a01b039091169063f41766d89061430890859060009060a4903090429060040161598d565b6000604051808303816000875af1158015614327573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261434f9190810190615799565b50614400565b6143fe733921e8cb45b17fc029a0a6de958330ca4e58339060a9805461437a9061506e565b80601f01602080910402602001604051908101604052809291908181526020018280546143a69061506e565b80156143f35780601f106143c8576101008083540402835291602001916143f3565b820191906000526020600020905b8154815290600101906020018083116143d657829003601f168201915b50505050508461335f565b505b609f546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015614449573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061446d9190615055565b60a0546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156144bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144df9190615055565b609854609f5460a05460a154604051635a47ddc360e01b81526001600160a01b0393841660048201529183166024830152600160a01b900460ff16151560448201526064810186905260848101849052600160a4820181905260c48201523060e4820152426101048201529293501690635a47ddc390610124016060604051808303816000875af1158015614578573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061459c919061595f565b505050505050505050565b60006145fc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661477e9092919063ffffffff16565b8051909150156116ac578080602001905181019061461a919061512f565b6116ac5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a65565b6000601480835161468a91906150d8565b6146949190615102565b92915050565b6000806146a78382614795565b91506146b4836014614795565b9050915091565b606061469460148084516146cf91906150d8565b8491906147fa565b60655460ff16610dc15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a65565b600054610100900460ff166147475760405162461bcd60e51b8152600401610a6590615581565b610dc1614907565b600054610100900460ff166147765760405162461bcd60e51b8152600401610a6590615581565b610dc1614937565b606061478d848460008561496a565b949350505050565b60006147a282601461514c565b835110156147ea5760405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b6044820152606401610a65565b500160200151600160601b900490565b60608161480881601f61514c565b10156148475760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610a65565b614851828461514c565b845110156148955760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610a65565b6060821580156148b457604051915060008252602082016040526148fe565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156148ed5780518352602092830192016148d5565b5050858452601f01601f1916604052505b50949350505050565b600054610100900460ff1661492e5760405162461bcd60e51b8152600401610a6590615581565b610dc133612e67565b600054610100900460ff1661495e5760405162461bcd60e51b8152600401610a6590615581565b6065805460ff19169055565b6060824710156149cb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a65565b6001600160a01b0385163b614a225760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a65565b600080866001600160a01b03168587604051614a3e91906159c9565b60006040518083038185875af1925050503d8060008114614a7b576040519150601f19603f3d011682016040523d82523d6000602084013e614a80565b606091505b5091509150614a90828286614a9b565b979650505050505050565b60608315614aaa5750816133f9565b825115614aba5782518084602001fd5b8160405162461bcd60e51b8152600401610a659190614bf6565b6040518060600160405280614b1a6040518060c0016040528060008152602001600081526020016000815260200160008152602001606081526020016000151581525090565b815260200160008152602001600081525090565b6001600160a01b038116811461089757600080fd5b8035614b4e81614b2e565b919050565b600060208284031215614b6557600080fd5b81356133f981614b2e565b801515811461089757600080fd5b8035614b4e81614b70565b600060208284031215614b9b57600080fd5b81356133f981614b70565b60005b83811015614bc1578181015183820152602001614ba9565b50506000910152565b60008151808452614be2816020860160208601614ba6565b601f01601f19169290920160200192915050565b6020815260006133f96020830184614bca565b600060208284031215614c1b57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b81811015614c635783516001600160a01b031683529284019291840191600101614c3e565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b60405160c081016001600160401b0381118282101715614ca757614ca7614c6f565b60405290565b604051601f8201601f191681016001600160401b0381118282101715614cd557614cd5614c6f565b604052919050565b60006001600160401b03821115614cf657614cf6614c6f565b50601f01601f191660200190565b60008060008060808587031215614d1a57600080fd5b8435614d2581614b2e565b9350602085013592506040850135915060608501356001600160401b03811115614d4e57600080fd5b8501601f81018713614d5f57600080fd5b8035614d72614d6d82614cdd565b614cad565b818152886020838501011115614d8757600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b60208152600082516060602084015280516080840152602081015160a0840152604081015160c0840152606081015160e0840152608081015160c0610100850152614df8610140850182614bca565b905060a082015115156101208501526020850151604085015260408501516060850152809250505092915050565b60008060208385031215614e3957600080fd5b82356001600160401b0380821115614e5057600080fd5b818501915085601f830112614e6457600080fd5b813581811115614e7357600080fd5b866020828501011115614e8557600080fd5b60209290920196919550909350505050565b60008083601f840112614ea957600080fd5b5081356001600160401b03811115614ec057600080fd5b6020830191508360208260051b8501011115614edb57600080fd5b9250929050565b60008083601f840112614ef457600080fd5b5081356001600160401b03811115614f0b57600080fd5b602083019150836020606083028501011115614edb57600080fd5b600060c0828403121561379b57600080fd5b6000806000806000806000806000806000806101a08d8f031215614f5b57600080fd5b614f648d614b43565b9b50614f7260208e01614b43565b9a50614f8060408e01614b7e565b99506001600160401b0360608e01351115614f9a57600080fd5b614faa8e60608f01358f01614e97565b90995097506001600160401b0360808e01351115614fc757600080fd5b614fd78e60808f01358f01614ee2565b90975095506001600160401b0360a08e01351115614ff457600080fd5b6150048e60a08f01358f01614ee2565b90955093506001600160401b0360c08e0135111561502157600080fd5b6150318e60c08f01358f01614e97565b90935091506150438e60e08f01614f26565b90509295989b509295989b509295989b565b60006020828403121561506757600080fd5b5051919050565b600181811c9082168061508257607f821691505b60208210810361379b57634e487b7160e01b600052602260045260246000fd5b602080825260069082015265085d985d5b1d60d21b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115614694576146946150c2565b8082028115828204841417614694576146946150c2565b60008261511f57634e487b7160e01b600052601260045260246000fd5b500490565b8051614b4e81614b70565b60006020828403121561514157600080fd5b81516133f981614b70565b80820180821115614694576146946150c2565b634e487b7160e01b600052603260045260246000fd5b601f8211156116ac57600081815260208120601f850160051c8101602086101561519c5750805b601f850160051c820191505b818110156138b8578281556001016151a8565b6001600160401b038311156151d2576151d2614c6f565b6151e6836151e0835461506e565b83615175565b6000601f84116001811461521a57600085156152025750838201355b600019600387901b1c1916600186901b178355615274565b600083815260209020601f19861690835b8281101561524b578685013582556020948501946001909201910161522b565b50868210156152685760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60006020828403121561528d57600080fd5b81516133f981614b2e565b6000808335601e198436030181126152af57600080fd5b8301803591506001600160401b038211156152c957600080fd5b602001915036819003821315614edb57600080fd5b80546001600160a01b0319166001600160a01b0392909216919091179055565b813561530981614b2e565b61531381836152de565b5060018101602083013561532681614b2e565b61533081836152de565b50604083013561533f81614b70565b815460ff60a01b191690151560a01b60ff60a01b161790555050565b60006001820161536d5761536d6150c2565b5060010190565b81516001600160401b0381111561538d5761538d614c6f565b6153a18161539b845461506e565b84615175565b602080601f8311600181146153d657600084156153be5750858301515b600019600386901b1c1916600185901b1785556138b8565b600085815260208120601f198616915b82811015615405578886015182559484019460019091019084016153e6565b50858210156154235787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b03929092168252602082015260400190565b602081526000825160a0602084015261546860c0840182614bca565b905060018060a01b0360208501511660408401526040840151606084015260608401516080840152608084015160a08401528091505092915050565b600060208083850312156154b757600080fd5b82516001600160401b03808211156154ce57600080fd5b9084019060c082870312156154e257600080fd5b6154ea614c85565b825181528383015184820152604083015160408201526060830151606082015260808301518281111561551c57600080fd5b83019150601f8201871361552f57600080fd5b815161553d614d6d82614cdd565b818152888683860101111561555157600080fd5b61556082878301888701614ba6565b60808301525061557260a08401615124565b60a08201529695505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600083516155de818460208801614ba6565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b600181815b8085111561563e578160001904821115615624576156246150c2565b8085161561563157918102915b93841c9390800290615608565b509250929050565b60008261565557506001614694565b8161566257506000614694565b816001811461567857600281146156825761569e565b6001915050614694565b60ff841115615693576156936150c2565b50506001821b614694565b5060208310610133831016604e8410600b84101617156156c1575081810a614694565b6156cb8383615603565b80600019048211156156df576156df6150c2565b029392505050565b60006133f98383615646565b6000815480845260208085019450836000528060002060005b838110156157525781546001600160a01b039081168852600183810154918216858a015260a09190911c60ff16151560408901526060909701966002909201910161570c565b509495945050505050565b82815260406020820152600061478d60408301846156f3565b60006001600160401b0382111561578f5761578f614c6f565b5060051b60200190565b600060208083850312156157ac57600080fd5b82516001600160401b038111156157c257600080fd5b8301601f810185136157d357600080fd5b80516157e1614d6d82615776565b81815260059190911b8201830190838101908783111561580057600080fd5b928401925b82841015614a9057835182529284019290840190615805565b6040815260008084546158308161506e565b8060408601526060600180841660008114615852576001811461586c5761589d565b60ff1985168884015283151560051b88018301955061589d565b8960005260208060002060005b868110156158945781548b8201870152908401908201615879565b8a018501975050505b50505050506020929092019290925292915050565b600080604083850312156158c557600080fd5b825191506020808401516001600160401b038111156158e357600080fd5b8401601f810186136158f457600080fd5b8051615902614d6d82615776565b81815260059190911b8201830190838101908883111561592157600080fd5b928401925b8284101561595057835161ffff811681146159415760008081fd5b82529284019290840190615926565b80955050505050509250929050565b60008060006060848603121561597457600080fd5b8351925060208401519150604084015190509250925092565b85815284602082015260a0604082015260006159ac60a08301866156f3565b6001600160a01b0394909416606083015250608001529392505050565b600082516159db818460208701614ba6565b919091019291505056fe000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f000000000000000000000000176211869ca2b568f2a7d4ee941e073a821ee1ffa2646970667358221220abb188f443f614df753f2e3760863706d35cfab12f703b13352193ebc8943f1564736f6c63430008130033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.