- Contract name:
- PancakeStableSwapThreePoolDeployer
- Optimization enabled
- true
- Compiler version
- v0.8.10+commit.fc410830
- Optimization runs
- 100
- EVM Version
- default
- Verified at
- 2024-07-20T04:19:11.524820Z
contracts/PancakeStableSwapThreePoolDeployer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
import "./openzeppelin/access/Ownable.sol";
import "./PancakeStableSwapThreePool.sol";
contract PancakeStableSwapThreePoolDeployer is Ownable {
uint256 public constant N_COINS = 3;
/**
* @notice constructor
*/
constructor() {}
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(
address tokenA,
address tokenB,
address tokenC
) internal pure returns (address, address, address) {
require(tokenA != tokenB && tokenA != tokenC && tokenB != tokenC, "IDENTICAL_ADDRESSES");
address tmp;
if (tokenA > tokenB) {
tmp = tokenA;
tokenA = tokenB;
tokenB = tmp;
}
if (tokenB > tokenC) {
tmp = tokenB;
tokenB = tokenC;
tokenC = tmp;
if (tokenA > tokenB) {
tmp = tokenA;
tokenA = tokenB;
tokenB = tmp;
}
}
return (tokenA, tokenB, tokenC);
}
/**
* @notice createSwapPair
* @param _tokenA: Addresses of ERC20 conracts .
* @param _tokenB: Addresses of ERC20 conracts .
* @param _tokenC: Addresses of ERC20 conracts .
* @param _A: Amplification coefficient multiplied by n * (n - 1)
* @param _fee: Fee to charge for exchanges
* @param _admin_fee: Admin fee
* @param _admin: Admin
* @param _LP: LP
*/
function createSwapPair(
address _tokenA,
address _tokenB,
address _tokenC,
uint256 _A,
uint256 _fee,
uint256 _admin_fee,
address _admin,
address _LP
) external onlyOwner returns (address) {
require(_tokenA != address(0) && _tokenB != address(0) && _tokenA != _tokenB, "Illegal token");
(address t0, address t1, address t2) = sortTokens(_tokenA, _tokenB, _tokenC);
address[N_COINS] memory coins = [t0, t1, t2];
// create swap contract
bytes memory bytecode = type(PancakeStableSwapThreePool).creationCode;
bytes32 salt = keccak256(abi.encodePacked(t0, t1, t2, msg.sender, block.timestamp, block.chainid));
address swapContract;
assembly {
swapContract := create2(0, add(bytecode, 32), mload(bytecode), salt)
}
PancakeStableSwapThreePool(swapContract).initialize(coins, _A, _fee, _admin_fee, _admin, _LP);
return swapContract;
}
}
contracts/PancakeStableSwapThreePool.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
import "./openzeppelin/access/Ownable.sol";
import "./openzeppelin/token/ERC20/utils/SafeERC20.sol";
import "./openzeppelin/token/ERC20/extensions/IERC20Metadata.sol";
import "./openzeppelin/security/ReentrancyGuard.sol";
import "./interfaces/IPancakeStableSwapLP.sol";
contract PancakeStableSwapThreePool is Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
uint256 public constant N_COINS = 3;
uint256 public constant MAX_DECIMAL = 18;
uint256 public constant FEE_DENOMINATOR = 1e10;
uint256 public constant PRECISION = 1e18;
uint256[N_COINS] public PRECISION_MUL;
uint256[N_COINS] public RATES;
uint256 public constant MAX_ADMIN_FEE = 1e10;
uint256 public constant MAX_FEE = 5e9;
uint256 public constant MAX_A = 1e6;
uint256 public constant MAX_A_CHANGE = 10;
uint256 public constant MIN_BNB_GAS = 2300;
uint256 public constant MAX_BNB_GAS = 23000;
uint256 public constant ADMIN_ACTIONS_DELAY = 3 days;
uint256 public constant MIN_RAMP_TIME = 1 days;
address[N_COINS] public coins;
uint256[N_COINS] public balances;
uint256 public fee; // fee * 1e10.
uint256 public admin_fee; // admin_fee * 1e10.
uint256 public bnb_gas = 4029; // transfer bnb gas.
IPancakeStableSwapLP public token;
address constant BNB_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
bool support_BNB;
uint256 public initial_A;
uint256 public future_A;
uint256 public initial_A_time;
uint256 public future_A_time;
uint256 public admin_actions_deadline;
uint256 public future_fee;
uint256 public future_admin_fee;
uint256 public kill_deadline;
uint256 public constant KILL_DEADLINE_DT = 2 * 30 days;
bool public is_killed;
address public immutable STABLESWAP_FACTORY;
bool public isInitialized;
event TokenExchange(
address indexed buyer,
uint256 sold_id,
uint256 tokens_sold,
uint256 bought_id,
uint256 tokens_bought
);
event AddLiquidity(
address indexed provider,
uint256[N_COINS] token_amounts,
uint256[N_COINS] fees,
uint256 invariant,
uint256 token_supply
);
event RemoveLiquidity(
address indexed provider,
uint256[N_COINS] token_amounts,
uint256[N_COINS] fees,
uint256 token_supply
);
event RemoveLiquidityOne(address indexed provider, uint256 index, uint256 token_amount, uint256 coin_amount);
event RemoveLiquidityImbalance(
address indexed provider,
uint256[N_COINS] token_amounts,
uint256[N_COINS] fees,
uint256 invariant,
uint256 token_supply
);
event CommitNewFee(uint256 indexed deadline, uint256 fee, uint256 admin_fee);
event NewFee(uint256 fee, uint256 admin_fee);
event RampA(uint256 old_A, uint256 new_A, uint256 initial_time, uint256 future_time);
event StopRampA(uint256 A, uint256 t);
event SetBNBGas(uint256 bnb_gas);
event RevertParameters();
event DonateAdminFees();
event Kill();
event Unkill();
/**
* @notice constructor
*/
constructor() {
STABLESWAP_FACTORY = msg.sender;
}
/**
* @notice initialize
* @param _coins: Addresses of ERC20 conracts of coins (c-tokens) involved
* @param _A: Amplification coefficient multiplied by n * (n - 1)
* @param _fee: Fee to charge for exchanges
* @param _admin_fee: Admin fee
* @param _owner: Owner
* @param _LP: LP address
*/
function initialize(
address[N_COINS] memory _coins,
uint256 _A,
uint256 _fee,
uint256 _admin_fee,
address _owner,
address _LP
) external {
require(!isInitialized, "Operations: Already initialized");
require(msg.sender == STABLESWAP_FACTORY, "Operations: Not factory");
require(_A <= MAX_A, "_A exceeds maximum");
require(_fee <= MAX_FEE, "_fee exceeds maximum");
require(_admin_fee <= MAX_ADMIN_FEE, "_admin_fee exceeds maximum");
isInitialized = true;
for (uint256 i = 0; i < N_COINS; i++) {
require(_coins[i] != address(0), "ZERO Address");
uint256 coinDecimal;
if (_coins[i] == BNB_ADDRESS) {
coinDecimal = 18;
support_BNB = true;
} else {
coinDecimal = IERC20Metadata(_coins[i]).decimals();
}
require(coinDecimal <= MAX_DECIMAL, "The maximum decimal cannot exceed 18");
//set PRECISION_MUL and RATES
PRECISION_MUL[i] = 10 ** (MAX_DECIMAL - coinDecimal);
RATES[i] = PRECISION * PRECISION_MUL[i];
}
coins = _coins;
initial_A = _A;
future_A = _A;
fee = _fee;
admin_fee = _admin_fee;
kill_deadline = block.timestamp + KILL_DEADLINE_DT;
token = IPancakeStableSwapLP(_LP);
transferOwnership(_owner);
}
function get_A() internal view returns (uint256) {
//Handle ramping A up or down
uint256 t1 = future_A_time;
uint256 A1 = future_A;
if (block.timestamp < t1) {
uint256 A0 = initial_A;
uint256 t0 = initial_A_time;
// Expressions in uint256 cannot have negative numbers, thus "if"
if (A1 > A0) {
return A0 + ((A1 - A0) * (block.timestamp - t0)) / (t1 - t0);
} else {
return A0 - ((A0 - A1) * (block.timestamp - t0)) / (t1 - t0);
}
} else {
// when t1 == 0 or block.timestamp >= t1
return A1;
}
}
function A() external view returns (uint256) {
return get_A();
}
function _xp() internal view returns (uint256[N_COINS] memory result) {
result = RATES;
for (uint256 i = 0; i < N_COINS; i++) {
result[i] = (result[i] * balances[i]) / PRECISION;
}
}
function _xp_mem(uint256[N_COINS] memory _balances) internal view returns (uint256[N_COINS] memory result) {
result = RATES;
for (uint256 i = 0; i < N_COINS; i++) {
result[i] = (result[i] * _balances[i]) / PRECISION;
}
}
function get_D(uint256[N_COINS] memory xp, uint256 amp) internal pure returns (uint256) {
uint256 S;
for (uint256 i = 0; i < N_COINS; i++) {
S += xp[i];
}
if (S == 0) {
return 0;
}
uint256 Dprev;
uint256 D = S;
uint256 Ann = amp * N_COINS;
for (uint256 j = 0; j < 255; j++) {
uint256 D_P = D;
for (uint256 k = 0; k < N_COINS; k++) {
D_P = (D_P * D) / (xp[k] * N_COINS); // If division by 0, this will be borked: only withdrawal will work. And that is good
}
Dprev = D;
D = ((Ann * S + D_P * N_COINS) * D) / ((Ann - 1) * D + (N_COINS + 1) * D_P);
// Equality with the precision of 1
if (D > Dprev) {
if (D - Dprev <= 1) {
break;
}
} else {
if (Dprev - D <= 1) {
break;
}
}
}
return D;
}
function get_D_mem(uint256[N_COINS] memory _balances, uint256 amp) internal view returns (uint256) {
return get_D(_xp_mem(_balances), amp);
}
function get_virtual_price() external view returns (uint256) {
/**
Returns portfolio virtual price (for calculating profit)
scaled up by 1e18
*/
uint256 D = get_D(_xp(), get_A());
/**
D is in the units similar to DAI (e.g. converted to precision 1e18)
When balanced, D = n * x_u - total virtual value of the portfolio
*/
uint256 token_supply = token.totalSupply();
return (D * PRECISION) / token_supply;
}
function calc_token_amount(uint256[N_COINS] memory amounts, bool deposit) external view returns (uint256) {
/**
Simplified method to calculate addition or reduction in token supply at
deposit or withdrawal without taking fees into account (but looking at
slippage).
Needed to prevent front-running, not for precise calculations!
*/
uint256[N_COINS] memory _balances = balances;
uint256 amp = get_A();
uint256 D0 = get_D_mem(_balances, amp);
for (uint256 i = 0; i < N_COINS; i++) {
if (deposit) {
_balances[i] += amounts[i];
} else {
_balances[i] -= amounts[i];
}
}
uint256 D1 = get_D_mem(_balances, amp);
uint256 token_amount = token.totalSupply();
uint256 difference;
if (deposit) {
difference = D1 - D0;
} else {
difference = D0 - D1;
}
return (difference * token_amount) / D0;
}
function add_liquidity(uint256[N_COINS] memory amounts, uint256 min_mint_amount) external payable nonReentrant {
//Amounts is amounts of c-tokens
require(!is_killed, "Killed");
if (!support_BNB) {
require(msg.value == 0, "Inconsistent quantity"); // Avoid sending BNB by mistake.
}
uint256[N_COINS] memory fees;
uint256 _fee = (fee * N_COINS) / (4 * (N_COINS - 1));
uint256 _admin_fee = admin_fee;
uint256 amp = get_A();
uint256 token_supply = token.totalSupply();
//Initial invariant
uint256 D0;
uint256[N_COINS] memory old_balances = balances;
if (token_supply > 0) {
D0 = get_D_mem(old_balances, amp);
}
uint256[N_COINS] memory new_balances = [old_balances[0], old_balances[1], old_balances[2]];
for (uint256 i = 0; i < N_COINS; i++) {
if (token_supply == 0) {
require(amounts[i] > 0, "Initial deposit requires all coins");
}
// balances store amounts of c-tokens
new_balances[i] = old_balances[i] + amounts[i];
}
// Invariant after change
uint256 D1 = get_D_mem(new_balances, amp);
require(D1 > D0, "D1 must be greater than D0");
// We need to recalculate the invariant accounting for fees
// to calculate fair user's share
uint256 D2 = D1;
if (token_supply > 0) {
// Only account for fees if we are not the first to deposit
for (uint256 i = 0; i < N_COINS; i++) {
uint256 ideal_balance = (D1 * old_balances[i]) / D0;
uint256 difference;
if (ideal_balance > new_balances[i]) {
difference = ideal_balance - new_balances[i];
} else {
difference = new_balances[i] - ideal_balance;
}
fees[i] = (_fee * difference) / FEE_DENOMINATOR;
balances[i] = new_balances[i] - ((fees[i] * _admin_fee) / FEE_DENOMINATOR);
new_balances[i] -= fees[i];
}
D2 = get_D_mem(new_balances, amp);
} else {
balances = new_balances;
}
// Calculate, how much pool tokens to mint
uint256 mint_amount;
if (token_supply == 0) {
mint_amount = D1; // Take the dust if there was any
} else {
mint_amount = (token_supply * (D2 - D0)) / D0;
}
require(mint_amount >= min_mint_amount, "Slippage screwed you");
// Take coins from the sender
for (uint256 i = 0; i < N_COINS; i++) {
uint256 amount = amounts[i];
address coin = coins[i];
transfer_in(coin, amount);
}
// Mint pool tokens
token.mint(msg.sender, mint_amount);
emit AddLiquidity(msg.sender, amounts, fees, D1, token_supply + mint_amount);
}
function get_y(uint256 i, uint256 j, uint256 x, uint256[N_COINS] memory xp_) internal view returns (uint256) {
// x in the input is converted to the same price/precision
require((i != j) && (i < N_COINS) && (j < N_COINS), "Illegal parameter");
uint256 amp = get_A();
uint256 D = get_D(xp_, amp);
uint256 c = D;
uint256 S_;
uint256 Ann = amp * N_COINS;
uint256 _x;
for (uint256 k = 0; k < N_COINS; k++) {
if (k == i) {
_x = x;
} else if (k != j) {
_x = xp_[k];
} else {
continue;
}
S_ += _x;
c = (c * D) / (_x * N_COINS);
}
c = (c * D) / (Ann * N_COINS);
uint256 b = S_ + D / Ann; // - D
uint256 y_prev;
uint256 y = D;
for (uint256 m = 0; m < 255; m++) {
y_prev = y;
y = (y * y + c) / (2 * y + b - D);
// Equality with the precision of 1
if (y > y_prev) {
if (y - y_prev <= 1) {
break;
}
} else {
if (y_prev - y <= 1) {
break;
}
}
}
return y;
}
function get_dy(uint256 i, uint256 j, uint256 dx) external view returns (uint256) {
// dx and dy in c-units
uint256[N_COINS] memory rates = RATES;
uint256[N_COINS] memory xp = _xp();
uint256 x = xp[i] + ((dx * rates[i]) / PRECISION);
uint256 y = get_y(i, j, x, xp);
uint256 dy = ((xp[j] - y - 1) * PRECISION) / rates[j];
uint256 _fee = (fee * dy) / FEE_DENOMINATOR;
return dy - _fee;
}
function get_dy_underlying(uint256 i, uint256 j, uint256 dx) external view returns (uint256) {
// dx and dy in underlying units
uint256[N_COINS] memory xp = _xp();
uint256[N_COINS] memory precisions = PRECISION_MUL;
uint256 x = xp[i] + dx * precisions[i];
uint256 y = get_y(i, j, x, xp);
uint256 dy = (xp[j] - y - 1) / precisions[j];
uint256 _fee = (fee * dy) / FEE_DENOMINATOR;
return dy - _fee;
}
function exchange(uint256 i, uint256 j, uint256 dx, uint256 min_dy) external payable nonReentrant {
require(!is_killed, "Killed");
if (!support_BNB) {
require(msg.value == 0, "Inconsistent quantity"); // Avoid sending BNB by mistake.
}
uint256[N_COINS] memory old_balances = balances;
uint256[N_COINS] memory xp = _xp_mem(old_balances);
uint256 x = xp[i] + (dx * RATES[i]) / PRECISION;
uint256 y = get_y(i, j, x, xp);
uint256 dy = xp[j] - y - 1; // -1 just in case there were some rounding errors
uint256 dy_fee = (dy * fee) / FEE_DENOMINATOR;
// Convert all to real units
dy = ((dy - dy_fee) * PRECISION) / RATES[j];
require(dy >= min_dy, "Exchange resulted in fewer coins than expected");
uint256 dy_admin_fee = (dy_fee * admin_fee) / FEE_DENOMINATOR;
dy_admin_fee = (dy_admin_fee * PRECISION) / RATES[j];
// Change balances exactly in same way as we change actual ERC20 coin amounts
balances[i] = old_balances[i] + dx;
// When rounding errors happen, we undercharge admin fee in favor of LP
balances[j] = old_balances[j] - dy - dy_admin_fee;
address iAddress = coins[i];
if (iAddress == BNB_ADDRESS) {
require(dx == msg.value, "Inconsistent quantity");
} else {
IERC20(iAddress).safeTransferFrom(msg.sender, address(this), dx);
}
address jAddress = coins[j];
transfer_out(jAddress, dy);
emit TokenExchange(msg.sender, i, dx, j, dy);
}
function remove_liquidity(uint256 _amount, uint256[N_COINS] memory min_amounts) external nonReentrant {
uint256 total_supply = token.totalSupply();
uint256[N_COINS] memory amounts;
uint256[N_COINS] memory fees; //Fees are unused but we've got them historically in event
for (uint256 i = 0; i < N_COINS; i++) {
uint256 value = (balances[i] * _amount) / total_supply;
require(value >= min_amounts[i], "Withdrawal resulted in fewer coins than expected");
balances[i] -= value;
amounts[i] = value;
transfer_out(coins[i], value);
}
token.burnFrom(msg.sender, _amount); // dev: insufficient funds
emit RemoveLiquidity(msg.sender, amounts, fees, total_supply - _amount);
}
function remove_liquidity_imbalance(
uint256[N_COINS] memory amounts,
uint256 max_burn_amount
) external nonReentrant {
require(!is_killed, "Killed");
uint256 token_supply = token.totalSupply();
require(token_supply > 0, "dev: zero total supply");
uint256 _fee = (fee * N_COINS) / (4 * (N_COINS - 1));
uint256 _admin_fee = admin_fee;
uint256 amp = get_A();
uint256[N_COINS] memory old_balances = balances;
uint256[N_COINS] memory new_balances = [old_balances[0], old_balances[1], old_balances[2]];
uint256 D0 = get_D_mem(old_balances, amp);
for (uint256 i = 0; i < N_COINS; i++) {
new_balances[i] -= amounts[i];
}
uint256 D1 = get_D_mem(new_balances, amp);
uint256[N_COINS] memory fees;
for (uint256 i = 0; i < N_COINS; i++) {
uint256 ideal_balance = (D1 * old_balances[i]) / D0;
uint256 difference;
if (ideal_balance > new_balances[i]) {
difference = ideal_balance - new_balances[i];
} else {
difference = new_balances[i] - ideal_balance;
}
fees[i] = (_fee * difference) / FEE_DENOMINATOR;
balances[i] = new_balances[i] - ((fees[i] * _admin_fee) / FEE_DENOMINATOR);
new_balances[i] -= fees[i];
}
uint256 D2 = get_D_mem(new_balances, amp);
uint256 token_amount = ((D0 - D2) * token_supply) / D0;
require(token_amount > 0, "token_amount must be greater than 0");
token_amount += 1; // In case of rounding errors - make it unfavorable for the "attacker"
require(token_amount <= max_burn_amount, "Slippage screwed you");
token.burnFrom(msg.sender, token_amount); // dev: insufficient funds
for (uint256 i = 0; i < N_COINS; i++) {
if (amounts[i] > 0) {
transfer_out(coins[i], amounts[i]);
}
}
token_supply -= token_amount;
emit RemoveLiquidityImbalance(msg.sender, amounts, fees, D1, token_supply);
}
function get_y_D(uint256 A_, uint256 i, uint256[N_COINS] memory xp, uint256 D) internal pure returns (uint256) {
/**
Calculate x[i] if one reduces D from being calculated for xp to D
Done by solving quadratic equation iteratively.
x_1**2 + x1 * (sum' - (A*n**n - 1) * D / (A * n**n)) = D ** (n + 1) / (n ** (2 * n) * prod' * A)
x_1**2 + b*x_1 = c
x_1 = (x_1**2 + c) / (2*x_1 + b)
*/
// x in the input is converted to the same price/precision
require(i < N_COINS, "dev: i above N_COINS");
uint256 c = D;
uint256 S_;
uint256 Ann = A_ * N_COINS;
uint256 _x;
for (uint256 k = 0; k < N_COINS; k++) {
if (k != i) {
_x = xp[k];
} else {
continue;
}
S_ += _x;
c = (c * D) / (_x * N_COINS);
}
c = (c * D) / (Ann * N_COINS);
uint256 b = S_ + D / Ann;
uint256 y_prev;
uint256 y = D;
for (uint256 k = 0; k < 255; k++) {
y_prev = y;
y = (y * y + c) / (2 * y + b - D);
// Equality with the precision of 1
if (y > y_prev) {
if (y - y_prev <= 1) {
break;
}
} else {
if (y_prev - y <= 1) {
break;
}
}
}
return y;
}
function _calc_withdraw_one_coin(uint256 _token_amount, uint256 i) internal view returns (uint256, uint256) {
// First, need to calculate
// * Get current D
// * Solve Eqn against y_i for D - _token_amount
uint256 amp = get_A();
uint256 _fee = (fee * N_COINS) / (4 * (N_COINS - 1));
uint256[N_COINS] memory precisions = PRECISION_MUL;
uint256 total_supply = token.totalSupply();
uint256[N_COINS] memory xp = _xp();
uint256 D0 = get_D(xp, amp);
uint256 D1 = D0 - (_token_amount * D0) / total_supply;
uint256[N_COINS] memory xp_reduced = xp;
uint256 new_y = get_y_D(amp, i, xp, D1);
uint256 dy_0 = (xp[i] - new_y) / precisions[i]; // w/o fees
for (uint256 k = 0; k < N_COINS; k++) {
uint256 dx_expected;
if (k == i) {
dx_expected = (xp[k] * D1) / D0 - new_y;
} else {
dx_expected = xp[k] - (xp[k] * D1) / D0;
}
xp_reduced[k] -= (_fee * dx_expected) / FEE_DENOMINATOR;
}
uint256 dy = xp_reduced[i] - get_y_D(amp, i, xp_reduced, D1);
dy = (dy - 1) / precisions[i]; // Withdraw less to account for rounding errors
return (dy, dy_0 - dy);
}
function calc_withdraw_one_coin(uint256 _token_amount, uint256 i) external view returns (uint256) {
(uint256 dy, ) = _calc_withdraw_one_coin(_token_amount, i);
return dy;
}
function remove_liquidity_one_coin(uint256 _token_amount, uint256 i, uint256 min_amount) external nonReentrant {
// Remove _amount of liquidity all in a form of coin i
require(!is_killed, "Killed");
(uint256 dy, uint256 dy_fee) = _calc_withdraw_one_coin(_token_amount, i);
require(dy >= min_amount, "Not enough coins removed");
balances[i] -= (dy + (dy_fee * admin_fee) / FEE_DENOMINATOR);
token.burnFrom(msg.sender, _token_amount); // dev: insufficient funds
transfer_out(coins[i], dy);
emit RemoveLiquidityOne(msg.sender, i, _token_amount, dy);
}
function transfer_out(address coin_address, uint256 value) internal {
if (coin_address == BNB_ADDRESS) {
_safeTransferBNB(msg.sender, value);
} else {
IERC20(coin_address).safeTransfer(msg.sender, value);
}
}
function transfer_in(address coin_address, uint256 value) internal {
if (coin_address == BNB_ADDRESS) {
require(value == msg.value, "Inconsistent quantity");
} else {
IERC20(coin_address).safeTransferFrom(msg.sender, address(this), value);
}
}
function _safeTransferBNB(address to, uint256 value) internal {
(bool success, ) = to.call{gas: bnb_gas, value: value}("");
require(success, "BNB transfer failed");
}
// Admin functions
function set_bnb_gas(uint256 _bnb_gas) external onlyOwner {
require(_bnb_gas >= MIN_BNB_GAS && _bnb_gas <= MAX_BNB_GAS, "Illegal gas");
bnb_gas = _bnb_gas;
emit SetBNBGas(_bnb_gas);
}
function ramp_A(uint256 _future_A, uint256 _future_time) external onlyOwner {
require(block.timestamp >= initial_A_time + MIN_RAMP_TIME, "dev : too early");
require(_future_time >= block.timestamp + MIN_RAMP_TIME, "dev: insufficient time");
uint256 _initial_A = get_A();
require(_future_A > 0 && _future_A < MAX_A, "_future_A must be between 0 and MAX_A");
require(
(_future_A >= _initial_A && _future_A <= _initial_A * MAX_A_CHANGE) ||
(_future_A < _initial_A && _future_A * MAX_A_CHANGE >= _initial_A),
"Illegal parameter _future_A"
);
initial_A = _initial_A;
future_A = _future_A;
initial_A_time = block.timestamp;
future_A_time = _future_time;
emit RampA(_initial_A, _future_A, block.timestamp, _future_time);
}
function stop_rampget_A() external onlyOwner {
uint256 current_A = get_A();
initial_A = current_A;
future_A = current_A;
initial_A_time = block.timestamp;
future_A_time = block.timestamp;
// now (block.timestamp < t1) is always False, so we return saved A
emit StopRampA(current_A, block.timestamp);
}
function commit_new_fee(uint256 new_fee, uint256 new_admin_fee) external onlyOwner {
require(admin_actions_deadline == 0, "admin_actions_deadline must be 0"); // dev: active action
require(new_fee <= MAX_FEE, "dev: fee exceeds maximum");
require(new_admin_fee <= MAX_ADMIN_FEE, "dev: admin fee exceeds maximum");
admin_actions_deadline = block.timestamp + ADMIN_ACTIONS_DELAY;
future_fee = new_fee;
future_admin_fee = new_admin_fee;
emit CommitNewFee(admin_actions_deadline, new_fee, new_admin_fee);
}
function apply_new_fee() external onlyOwner {
require(block.timestamp >= admin_actions_deadline, "dev: insufficient time");
require(admin_actions_deadline != 0, "admin_actions_deadline should not be 0");
admin_actions_deadline = 0;
fee = future_fee;
admin_fee = future_admin_fee;
emit NewFee(fee, admin_fee);
}
function revert_new_parameters() external onlyOwner {
admin_actions_deadline = 0;
emit RevertParameters();
}
function admin_balances(uint256 i) external view returns (uint256) {
if (coins[i] == BNB_ADDRESS) {
return address(this).balance - balances[i];
} else {
return IERC20(coins[i]).balanceOf(address(this)) - balances[i];
}
}
function withdraw_admin_fees() external onlyOwner {
for (uint256 i = 0; i < N_COINS; i++) {
uint256 value;
if (coins[i] == BNB_ADDRESS) {
value = address(this).balance - balances[i];
} else {
value = IERC20(coins[i]).balanceOf(address(this)) - balances[i];
}
if (value > 0) {
transfer_out(coins[i], value);
}
}
}
function donate_admin_fees() external onlyOwner {
for (uint256 i = 0; i < N_COINS; i++) {
if (coins[i] == BNB_ADDRESS) {
balances[i] = address(this).balance;
} else {
balances[i] = IERC20(coins[i]).balanceOf(address(this));
}
}
emit DonateAdminFees();
}
function kill_me() external onlyOwner {
require(kill_deadline > block.timestamp, "Exceeded deadline");
is_killed = true;
emit Kill();
}
function unkill_me() external onlyOwner {
is_killed = false;
emit Unkill();
}
}
contracts/interfaces/IPancakeStableSwapLP.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
interface IPancakeStableSwapLP {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
function mint(address _to, uint256 _amount) external;
function burnFrom(address _to, uint256 _amount) external;
function setMinter(address _newMinter) external;
}
contracts/openzeppelin/access/Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.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 Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_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);
}
}
contracts/openzeppelin/security/ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}
contracts/openzeppelin/token/ERC20/IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `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);
/**
* @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);
}
contracts/openzeppelin/token/ERC20/extensions/IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
contracts/openzeppelin/token/ERC20/utils/SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.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));
}
}
/**
* @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");
}
}
}
contracts/openzeppelin/utils/Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
contracts/openzeppelin/utils/Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @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 Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
Compiler Settings
{"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"],"":["ast"]}},"optimizer":{"runs":100,"enabled":true},"libraries":{}}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"N_COINS","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"createSwapPair","inputs":[{"type":"address","name":"_tokenA","internalType":"address"},{"type":"address","name":"_tokenB","internalType":"address"},{"type":"address","name":"_tokenC","internalType":"address"},{"type":"uint256","name":"_A","internalType":"uint256"},{"type":"uint256","name":"_fee","internalType":"uint256"},{"type":"uint256","name":"_admin_fee","internalType":"uint256"},{"type":"address","name":"_admin","internalType":"address"},{"type":"address","name":"_LP","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]}]
Contract Creation Code
0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6150d98061007e6000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063293577501461005c5780634cedbfc714610077578063715018a6146100a25780638da5cb5b146100ac578063f2fde38b146100bd575b600080fd5b610064600381565b6040519081526020015b60405180910390f35b61008a61008536600461054a565b6100d0565b6040516001600160a01b03909116815260200161006e565b6100aa6102ff565b005b6000546001600160a01b031661008a565b6100aa6100cb3660046105cc565b610335565b600080546001600160a01b031633146101045760405162461bcd60e51b81526004016100fb906105ee565b60405180910390fd5b6001600160a01b0389161580159061012457506001600160a01b03881615155b80156101425750876001600160a01b0316896001600160a01b031614155b61017e5760405162461bcd60e51b815260206004820152600d60248201526c24b63632b3b0b6103a37b5b2b760991b60448201526064016100fb565b600080600061018e8c8c8c6103d0565b92509250925060006040518060600160405280856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b031681525090506000604051806020016101fb90610521565b601f1982820381018352601f9091011660408190526bffffffffffffffffffffffff19606088811b8216602084015287811b8216603484015286811b8216604884015233901b16605c82015242607082015246609082015290915060009060b0016040516020818303038152906040528051906020012090506000818351602085016000f59050806001600160a01b0316634eac4835858f8f8f8f8f6040518763ffffffff1660e01b81526004016102b896959493929190610623565b600060405180830381600087803b1580156102d257600080fd5b505af11580156102e6573d6000803e3d6000fd5b5092995050505050505050505098975050505050505050565b6000546001600160a01b031633146103295760405162461bcd60e51b81526004016100fb906105ee565b61033360006104d1565b565b6000546001600160a01b0316331461035f5760405162461bcd60e51b81526004016100fb906105ee565b6001600160a01b0381166103c45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016100fb565b6103cd816104d1565b50565b6000806000846001600160a01b0316866001600160a01b0316141580156104095750836001600160a01b0316866001600160a01b031614155b80156104275750836001600160a01b0316856001600160a01b031614155b6104695760405162461bcd60e51b81526020600482015260136024820152724944454e544943414c5f41444452455353455360681b60448201526064016100fb565b6000856001600160a01b0316876001600160a01b0316111561048b5750939493845b846001600160a01b0316866001600160a01b031611156104c45750929392836001600160a01b0380871690881611156104c45750939493845b5094959394509192915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b614a178061068d83390190565b80356001600160a01b038116811461054557600080fd5b919050565b600080600080600080600080610100898b03121561056757600080fd5b6105708961052e565b975061057e60208a0161052e565b965061058c60408a0161052e565b9550606089013594506080890135935060a089013592506105af60c08a0161052e565b91506105bd60e08a0161052e565b90509295985092959890939650565b6000602082840312156105de57600080fd5b6105e78261052e565b9392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6101008101818860005b60038110156106555781516001600160a01b031683526020928301929091019060010161062d565b5050506060820196909652608081019490945260a08401929092526001600160a01b0390811660c08401521660e09091015291905056fe60a0604052610fbd6010553480156200001757600080fd5b50620000233362000031565b600180553360805262000081565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b608051614973620000a4600039600081816106da01526115fc01526149736000f3fe6080604052600436106103015760003560e01c80637dafa36411610191578063ca8ca154116100e2578063ecb586a511610090578063ecb586a514610837578063edfb780114610857578063f1dc3cc91461086e578063f2fde38b1461088e578063f3de0362146107a6578063f446c1d0146108ae578063fc0c546a146108c3578063fee3f7f9146108e357600080fd5b8063ca8ca15414610791578063d73792a9146107a6578063ddca3f43146107bf578063e2e7d264146107d5578063e3698853146107f5578063e38244621461080a578063e5d9e9031461082057600080fd5b8063a6b0a7181161013f578063a6b0a718146106c8578063aaf5eb68146106fc578063ab5ac06114610718578063b4b577ad1461072d578063bb7b8b8014610743578063bc063e1a14610758578063c66106571461077157600080fd5b80637dafa364146105f657806385f11d1e146106165780638da5cb5b146106365780639a1d6ed3146106585780639c868ac01461066e5780639fdaea0c14610688578063a139c370146106a857600080fd5b80634488ddf0116102565780635409491a116102045780635409491a1461052d578063556d6e9f1461054357806358680d0b146105635780635b41b908146105795780635b5a14671461058c57806362203d74146105ac5780636d4366b7146105cc578063715018a6146105e157600080fd5b80634488ddf01461047a5780634515cef3146104905780634903b0d1146104a35780634eac4835146104c35780634f12fe97146104e35780634fb08c5e146104f8578063524c39011461051857600080fd5b80633046f972116102b35780633046f972146103b457806330c54085146103c95780633883e119146103de578063392e53cd146103fe578063396984151461042d5780633c157e6414610444578063405e28f81461046457600080fd5b806306e9481c1461030657806314052288146103305780632081066c14610346578063226840fb1461035c57806325d2edf01461037357806329357750146103895780632a4268961461039e575b600080fd5b34801561031257600080fd5b5061031d6201518081565b6040519081526020015b60405180910390f35b34801561033c57600080fd5b5061031d60155481565b34801561035257600080fd5b5061031d60145481565b34801561036857600080fd5b506103716108f9565b005b34801561037f57600080fd5b5061031d6159d881565b34801561039557600080fd5b5061031d600381565b3480156103aa57600080fd5b5061031d60195481565b3480156103c057600080fd5b50610371610961565b3480156103d557600080fd5b506103716109c5565b3480156103ea57600080fd5b5061031d6103f9366004614307565b610b49565b34801561040a57600080fd5b50601a5461041d90610100900460ff1681565b6040519015158152602001610327565b34801561043957600080fd5b5061031d620f424081565b34801561045057600080fd5b5061037161045f36600461433f565b610d10565b34801561047057600080fd5b5061031d60165481565b34801561048657600080fd5b5061031d60105481565b61037161049e366004614361565b610f1b565b3480156104af57600080fd5b5061031d6104be36600461438c565b611582565b3480156104cf57600080fd5b506103716104de3660046143bc565b611599565b3480156104ef57600080fd5b506103716119d2565b34801561050457600080fd5b5061031d61051336600461433f565b611ad7565b34801561052457600080fd5b50610371611aed565b34801561053957600080fd5b5061031d60125481565b34801561054f57600080fd5b5061031d61055e36600461445c565b611c53565b34801561056f57600080fd5b5061031d60175481565b610371610587366004614488565b611d9f565b34801561059857600080fd5b506103716105a736600461433f565b612170565b3480156105b857600080fd5b5061031d6105c736600461438c565b6122ed565b3480156105d857600080fd5b5061031d601281565b3480156105ed57600080fd5b506103716122fd565b34801561060257600080fd5b5061031d61061136600461438c565b612338565b34801561062257600080fd5b5061031d61063136600461445c565b612348565b34801561064257600080fd5b5061064b612426565b60405161032791906144ba565b34801561066457600080fd5b5061031d6108fc81565b34801561067a57600080fd5b50601a5461041d9060ff1681565b34801561069457600080fd5b506103716106a3366004614361565b612435565b3480156106b457600080fd5b506103716106c336600461438c565b612a0f565b3480156106d457600080fd5b5061064b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561070857600080fd5b5061031d670de0b6b3a764000081565b34801561072457600080fd5b5061031d600a81565b34801561073957600080fd5b5061031d60135481565b34801561074f57600080fd5b5061031d612ac8565b34801561076457600080fd5b5061031d64012a05f20081565b34801561077d57600080fd5b5061064b61078c36600461438c565b612b84565b34801561079d57600080fd5b50610371612ba4565b3480156107b257600080fd5b5061031d6402540be40081565b3480156107cb57600080fd5b5061031d600e5481565b3480156107e157600080fd5b5061031d6107f036600461438c565b612c2c565b34801561080157600080fd5b50610371612d2d565b34801561081657600080fd5b5061031d60185481565b34801561082c57600080fd5b5061031d6203f48081565b34801561084357600080fd5b506103716108523660046144ce565b612dd9565b34801561086357600080fd5b5061031d624f1a0081565b34801561087a57600080fd5b5061037161088936600461445c565b61305e565b34801561089a57600080fd5b506103716108a93660046144fb565b613220565b3480156108ba57600080fd5b5061031d6132bd565b3480156108cf57600080fd5b5060115461064b906001600160a01b031681565b3480156108ef57600080fd5b5061031d600f5481565b33610902612426565b6001600160a01b0316146109315760405162461bcd60e51b815260040161092890614516565b60405180910390fd5b600060168190556040517f1b4883af197c705114490f8d84f9ce30bef6a6199f7b7b649e845577cf0769a19190a1565b3361096a612426565b6001600160a01b0316146109905760405162461bcd60e51b815260040161092890614516565b601a805460ff191690556040517f061284ffa2814ace135f62907c78a7cff0f070efe7e6a0a42740ea1da2c8bdc890600090a1565b336109ce612426565b6001600160a01b0316146109f45760405162461bcd60e51b815260040161092890614516565b60005b6003811015610b4657600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60088360038110610a2a57610a2a61454b565b01546001600160a01b03161415610a6157600b8260038110610a4e57610a4e61454b565b0154610a5a9047614577565b9050610b06565b600b8260038110610a7457610a7461454b565b015460088360038110610a8957610a8961454b565b01546040516370a0823160e01b81526001600160a01b03909116906370a0823190610ab89030906004016144ba565b602060405180830381865afa158015610ad5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af9919061458e565b610b039190614577565b90505b8015610b3357610b3360088360038110610b2257610b2261454b565b01546001600160a01b0316826132cc565b5080610b3e816145a7565b9150506109f7565b50565b604080516060810191829052600091829190600b9060039082845b815481526020019060010190808311610b6457505050505090506000610b88613313565b90506000610b9683836133b4565b905060005b6003811015610c3c578515610bec57868160038110610bbc57610bbc61454b565b6020020151848260038110610bd357610bd361454b565b60200201818151610be491906145c2565b905250610c2a565b868160038110610bfe57610bfe61454b565b6020020151848260038110610c1557610c1561454b565b60200201818151610c269190614577565b9052505b80610c34816145a7565b915050610b9b565b506000610c4984846133b4565b90506000601160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ca0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc4919061458e565b905060008715610cdf57610cd88484614577565b9050610cec565b610ce98385614577565b90505b83610cf783836145da565b610d0191906145f9565b96505050505050505b92915050565b33610d19612426565b6001600160a01b031614610d3f5760405162461bcd60e51b815260040161092890614516565b62015180601454610d5091906145c2565b421015610d915760405162461bcd60e51b815260206004820152600f60248201526e646576203a20746f6f206561726c7960881b6044820152606401610928565b610d9e62015180426145c2565b811015610dbd5760405162461bcd60e51b81526004016109289061461b565b6000610dc7613313565b9050600083118015610ddb5750620f424083105b610e355760405162461bcd60e51b815260206004820152602560248201527f5f6675747572655f41206d757374206265206265747765656e203020616e64206044820152644d41585f4160d81b6064820152608401610928565b808310158015610e4f5750610e4b600a826145da565b8311155b80610e6e57508083108015610e6e575080610e6b600a856145da565b10155b610eba5760405162461bcd60e51b815260206004820152601b60248201527f496c6c6567616c20706172616d65746572205f6675747572655f4100000000006044820152606401610928565b60128190556013839055426014819055601583905560408051838152602081018690528082019290925260608201849052517fa2b71ec6df949300b59aab36b55e189697b750119dd349fcfa8c0f779e83c2549181900360800190a1505050565b60026001541415610f3e5760405162461bcd60e51b81526004016109289061464b565b6002600155601a5460ff1615610f665760405162461bcd60e51b815260040161092890614682565b601154600160a01b900460ff16610f95573415610f955760405162461bcd60e51b8152600401610928906146a2565b610f9d6141bd565b6000610fab60016003614577565b610fb69060046145da565b6003600e54610fc591906145da565b610fcf91906145f9565b600f549091506000610fdf613313565b90506000601160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611036573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105a919061458e565b6040805160608101918290529192506000918291600b9060039082845b815481526020019060010190808311611077575050505050905060008311156110a7576110a481856133b4565b91505b60006040518060600160405280836000600381106110c7576110c761454b565b60200201518152602001836001600381106110e4576110e461454b565b60200201518152602001836002600381106111015761110161454b565b60200201519052905060005b60038110156111ed578461118c5760008b826003811061112f5761112f61454b565b60200201511161118c5760405162461bcd60e51b815260206004820152602260248201527f496e697469616c206465706f73697420726571756972657320616c6c20636f696044820152616e7360f01b6064820152608401610928565b8a816003811061119e5761119e61454b565b60200201518382600381106111b5576111b561454b565b60200201516111c491906145c2565b8282600381106111d6576111d661454b565b6020020152806111e5816145a7565b91505061110d565b5060006111fa82876133b4565b905083811161124b5760405162461bcd60e51b815260206004820152601a60248201527f4431206d7573742062652067726561746572207468616e2044300000000000006044820152606401610928565b8085156113f95760005b60038110156113e7576000868683600381106112735761127361454b565b602002015161128290866145da565b61128c91906145f9565b905060008583600381106112a2576112a261454b565b60200201518211156112d6578583600381106112c0576112c061454b565b60200201516112cf9083614577565b90506112fb565b818684600381106112e9576112e961454b565b60200201516112f89190614577565b90505b6402540be40061130b828e6145da565b61131591906145f9565b8d84600381106113275761132761454b565b60200201526402540be4008b8e85600381106113455761134561454b565b602002015161135491906145da565b61135e91906145f9565b8684600381106113705761137061454b565b602002015161137f9190614577565b600b84600381106113925761139261454b565b01558c83600381106113a6576113a661454b565b60200201518684600381106113bd576113bd61454b565b602002018181516113ce9190614577565b9052508291506113df9050816145a7565b915050611255565b506113f283886133b4565b9050611408565b611406600b8460036141db565b505b600086611416575081611438565b856114218184614577565b61142b90896145da565b61143591906145f9565b90505b8b8110156114585760405162461bcd60e51b8152600401610928906146d1565b60005b60038110156114c05760008e82600381106114785761147861454b565b602002015190506000600883600381106114945761149461454b565b01546001600160a01b031690506114ab81836133c8565b505080806114b8906145a7565b91505061145b565b506011546040516340c10f1960e01b81526001600160a01b03909116906340c10f19906114f390339085906004016146ff565b600060405180830381600087803b15801561150d57600080fd5b505af1158015611521573d6000803e3d6000fd5b503392507f423f6495a08fc652425cf4ed0d1f9e37e571d9b9529b1c1c23cce780b2e7df0d91508f90508d86611557868d6145c2565b604051611567949392919061473b565b60405180910390a25050600180555050505050505050505050565b600b816003811061159257600080fd5b0154905081565b601a54610100900460ff16156115f15760405162461bcd60e51b815260206004820152601f60248201527f4f7065726174696f6e733a20416c726561647920696e697469616c697a6564006044820152606401610928565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146116635760405162461bcd60e51b81526020600482015260176024820152764f7065726174696f6e733a204e6f7420666163746f727960481b6044820152606401610928565b620f42408511156116ab5760405162461bcd60e51b81526020600482015260126024820152715f412065786365656473206d6178696d756d60701b6044820152606401610928565b64012a05f2008411156116f75760405162461bcd60e51b81526020600482015260146024820152735f6665652065786365656473206d6178696d756d60601b6044820152606401610928565b6402540be40083111561174c5760405162461bcd60e51b815260206004820152601a60248201527f5f61646d696e5f6665652065786365656473206d6178696d756d0000000000006044820152606401610928565b601a805461ff00191661010017905560005b600381101561197357600087826003811061177b5761177b61454b565b60200201516001600160a01b031614156117c65760405162461bcd60e51b815260206004820152600c60248201526b5a45524f204164647265737360a01b6044820152606401610928565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8883600381106117ef576117ef61454b565b60200201516001600160a01b0316141561181e57506011805460ff60a01b1916600160a01b179055601261189c565b8782600381106118305761183061454b565b60200201516001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611872573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118969190614769565b60ff1690505b60128111156118f95760405162461bcd60e51b8152602060048201526024808201527f546865206d6178696d756d20646563696d616c2063616e6e6f742065786365656044820152630c84062760e31b6064820152608401610928565b611904816012614577565b61190f90600a614870565b600283600381106119225761192261454b565b0155600282600381106119375761193761454b565b015461194b90670de0b6b3a76400006145da565b6005836003811061195e5761195e61454b565b0155508061196b816145a7565b91505061175e565b506119816008876003614215565b5060128590556013859055600e849055600f8390556119a3624f1a00426145c2565b601955601180546001600160a01b0319166001600160a01b0383161790556119ca82613220565b505050505050565b336119db612426565b6001600160a01b031614611a015760405162461bcd60e51b815260040161092890614516565b601654421015611a235760405162461bcd60e51b81526004016109289061461b565b601654611a815760405162461bcd60e51b815260206004820152602660248201527f61646d696e5f616374696f6e735f646561646c696e652073686f756c64206e6f60448201526507420626520360d41b6064820152608401610928565b6000601655601754600e819055601854600f8190556040517fbe12859b636aed607d5230b2cc2711f68d70e51060e6cca1f575ef5d2fcc95d192611acd92908252602082015260400190565b60405180910390a1565b600080611ae48484613421565b50949350505050565b33611af6612426565b6001600160a01b031614611b1c5760405162461bcd60e51b815260040161092890614516565b60005b6003811015611c275773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60088260038110611b5057611b5061454b565b01546001600160a01b03161415611b7c5747600b8260038110611b7557611b7561454b565b0155611c15565b60088160038110611b8f57611b8f61454b565b01546040516370a0823160e01b81526001600160a01b03909116906370a0823190611bbe9030906004016144ba565b602060405180830381865afa158015611bdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bff919061458e565b600b8260038110611c1257611c1261454b565b01555b80611c1f816145a7565b915050611b1f565b506040517f2c7203581ca666b8c5094c11c03f0b19b3750234a9d281bcbc88a260bcb006de90600090a1565b60408051606081019182905260009182919060059060039082845b815481526020019060010190808311611c6e57505050505090506000611c92613723565b90506000670de0b6b3a7640000838860038110611cb157611cb161454b565b6020020151611cc090876145da565b611cca91906145f9565b828860038110611cdc57611cdc61454b565b6020020151611ceb91906145c2565b90506000611cfb888884866137dd565b90506000848860038110611d1157611d1161454b565b6020020151670de0b6b3a7640000600184878c60038110611d3457611d3461454b565b6020020151611d439190614577565b611d4d9190614577565b611d5791906145da565b611d6191906145f9565b905060006402540be40082600e54611d7991906145da565b611d8391906145f9565b9050611d8f8183614577565b96505050505050505b9392505050565b60026001541415611dc25760405162461bcd60e51b81526004016109289061464b565b6002600155601a5460ff1615611dea5760405162461bcd60e51b815260040161092890614682565b601154600160a01b900460ff16611e19573415611e195760405162461bcd60e51b8152600401610928906146a2565b604080516060810191829052600091600b9060039082845b815481526020019060010190808311611e3157505050505090506000611e56826139d9565b90506000670de0b6b3a764000060058860038110611e7657611e7661454b565b0154611e8290876145da565b611e8c91906145f9565b828860038110611e9e57611e9e61454b565b6020020151611ead91906145c2565b90506000611ebd888884866137dd565b90506000600182858a60038110611ed657611ed661454b565b6020020151611ee59190614577565b611eef9190614577565b905060006402540be400600e5483611f0791906145da565b611f1191906145f9565b905060058960038110611f2657611f2661454b565b0154670de0b6b3a7640000611f3b8385614577565b611f4591906145da565b611f4f91906145f9565b915086821015611fb85760405162461bcd60e51b815260206004820152602e60248201527f45786368616e676520726573756c74656420696e20666577657220636f696e7360448201526d081d1a185b88195e1c1958dd195960921b6064820152608401610928565b60006402540be400600f5483611fce91906145da565b611fd891906145f9565b905060058a60038110611fed57611fed61454b565b0154612001670de0b6b3a7640000836145da565b61200b91906145f9565b905088878c600381106120205761202061454b565b602002015161202f91906145c2565b600b8c600381106120425761204261454b565b01558083888c600381106120585761205861454b565b60200201516120679190614577565b6120719190614577565b600b8b600381106120845761208461454b565b0155600060088c6003811061209b5761209b61454b565b01546001600160a01b0316905073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8114156120e857348a146120e35760405162461bcd60e51b8152600401610928906146a2565b6120fd565b6120fd6001600160a01b03821633308d613a97565b600060088c600381106121125761211261454b565b01546001600160a01b0316905061212981866132cc565b604080518e8152602081018d90529081018d90526060810186905233907fb2e76ae99761dc136e598d4a629bb347eccb9532a5f8bbd72e18467c3c34cc9890608001611567565b33612179612426565b6001600160a01b03161461219f5760405162461bcd60e51b815260040161092890614516565b601654156121ef5760405162461bcd60e51b815260206004820181905260248201527f61646d696e5f616374696f6e735f646561646c696e65206d75737420626520306044820152606401610928565b64012a05f20082111561223f5760405162461bcd60e51b81526020600482015260186024820152776465763a206665652065786365656473206d6178696d756d60401b6044820152606401610928565b6402540be4008111156122945760405162461bcd60e51b815260206004820152601e60248201527f6465763a2061646d696e206665652065786365656473206d6178696d756d00006044820152606401610928565b6122a16203f480426145c2565b60168190556017839055601882905560408051848152602081018490527f351fc5da2fbf480f2225debf3664a4bc90fa9923743aad58b4603f648e931fe0910160405180910390a25050565b6005816003811061159257600080fd5b33612306612426565b6001600160a01b03161461232c5760405162461bcd60e51b815260040161092890614516565b6123366000613b08565b565b6002816003811061159257600080fd5b600080612353613723565b6040805160608101918290529192506000919060029060039082845b81548152602001906001019080831161236f5750505050509050600081876003811061239d5761239d61454b565b60200201516123ac90866145da565b8388600381106123be576123be61454b565b60200201516123cd91906145c2565b905060006123dd888884876137dd565b905060008388600381106123f3576123f361454b565b6020020151600183878b6003811061240d5761240d61454b565b602002015161241c9190614577565b611d579190614577565b6000546001600160a01b031690565b600260015414156124585760405162461bcd60e51b81526004016109289061464b565b6002600155601a5460ff16156124805760405162461bcd60e51b815260040161092890614682565b601154604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa1580156124ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ee919061458e565b9050600081116125395760405162461bcd60e51b81526020600482015260166024820152756465763a207a65726f20746f74616c20737570706c7960501b6044820152606401610928565b600061254760016003614577565b6125529060046145da565b6003600e5461256191906145da565b61256b91906145f9565b600f54909150600061257b613313565b60408051606081019182905291925060009190600b9060039082845b815481526020019060010190808311612597575050505050905060006040518060600160405280836000600381106125d1576125d161454b565b60200201518152602001836001600381106125ee576125ee61454b565b602002015181526020018360026003811061260b5761260b61454b565b602002015190529050600061262083856133b4565b905060005b600381101561267d578981600381106126405761264061454b565b60200201518382600381106126575761265761454b565b602002018181516126689190614577565b90525080612675816145a7565b915050612625565b50600061268a83866133b4565b90506126946141bd565b60005b6003811015612829576000848783600381106126b5576126b561454b565b60200201516126c490866145da565b6126ce91906145f9565b905060008683600381106126e4576126e461454b565b6020020151821115612718578683600381106127025761270261454b565b60200201516127119083614577565b905061273d565b8187846003811061272b5761272b61454b565b602002015161273a9190614577565b90505b6402540be40061274d828d6145da565b61275791906145f9565b8484600381106127695761276961454b565b60200201526402540be4008a8585600381106127875761278761454b565b602002015161279691906145da565b6127a091906145f9565b8784600381106127b2576127b261454b565b60200201516127c19190614577565b600b84600381106127d4576127d461454b565b01558383600381106127e8576127e861454b565b60200201518784600381106127ff576127ff61454b565b602002018181516128109190614577565b9052508291506128219050816145a7565b915050612697565b50600061283685886133b4565b90506000848b6128468483614577565b61285091906145da565b61285a91906145f9565b9050600081116128b85760405162461bcd60e51b815260206004820152602360248201527f746f6b656e5f616d6f756e74206d75737420626520677265617465722074686160448201526206e20360ec1b6064820152608401610928565b6128c36001826145c2565b90508b8111156128e55760405162461bcd60e51b8152600401610928906146d1565b60115460405163079cc67960e41b81526001600160a01b03909116906379cc67909061291790339085906004016146ff565b600060405180830381600087803b15801561293157600080fd5b505af1158015612945573d6000803e3d6000fd5b5050505060005b60038110156129c35760008e82600381106129695761296961454b565b602002015111156129b1576129b16008826003811061298a5761298a61454b565b01546001600160a01b03168f83600381106129a7576129a761454b565b60200201516132cc565b806129bb816145a7565b91505061294c565b506129ce818c614577565b9a50336001600160a01b03167f173599dbf9c6ca6f7c3b590df07ae98a45d74ff54065505141e7de6c46a624c28e85878f604051611567949392919061473b565b33612a18612426565b6001600160a01b031614612a3e5760405162461bcd60e51b815260040161092890614516565b6108fc8110158015612a5257506159d88111155b612a8c5760405162461bcd60e51b815260206004820152600b60248201526a496c6c6567616c2067617360a81b6044820152606401610928565b60108190556040518181527f320c5e7159406866d39a81979ca1c22276b644dfcfd52ee1f335ee467ad0ec67906020015b60405180910390a150565b600080612ae3612ad6613723565b612ade613313565b613b58565b90506000601160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b5e919061458e565b905080612b73670de0b6b3a7640000846145da565b612b7d91906145f9565b9250505090565b60088160038110612b9457600080fd5b01546001600160a01b0316905081565b33612bad612426565b6001600160a01b031614612bd35760405162461bcd60e51b815260040161092890614516565b6000612bdd613313565b6012819055601381905542601481905560158190556040519192507f46e22fb3709ad289f62ce63d469248536dbc78d82b84a3d7e74ad606dc20193891612abd91848252602082015260400190565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60088360038110612c5657612c5661454b565b01546001600160a01b03161415612c8657600b8260038110612c7a57612c7a61454b565b0154610d0a9047614577565b600b8260038110612c9957612c9961454b565b015460088360038110612cae57612cae61454b565b01546040516370a0823160e01b81526001600160a01b03909116906370a0823190612cdd9030906004016144ba565b602060405180830381865afa158015612cfa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d1e919061458e565b610d0a9190614577565b919050565b33612d36612426565b6001600160a01b031614612d5c5760405162461bcd60e51b815260040161092890614516565b4260195411612da15760405162461bcd60e51b8152602060048201526011602482015270457863656564656420646561646c696e6560781b6044820152606401610928565b601a805460ff191660011790556040517fbe26733c2bf6ff3ea5ba8cfe744422bd49052ff9ed5685c9e81e6f9321dbaddd90600090a1565b60026001541415612dfc5760405162461bcd60e51b81526004016109289061464b565b6002600155601154604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015612e4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e6f919061458e565b9050612e796141bd565b612e816141bd565b60005b6003811015612fa65760008487600b8460038110612ea457612ea461454b565b0154612eb091906145da565b612eba91906145f9565b9050858260038110612ece57612ece61454b565b6020020151811015612f3b5760405162461bcd60e51b815260206004820152603060248201527f5769746864726177616c20726573756c74656420696e20666577657220636f6960448201526f1b9cc81d1a185b88195e1c1958dd195960821b6064820152608401610928565b80600b8360038110612f4f57612f4f61454b565b016000828254612f5f9190614577565b90915550819050848360038110612f7857612f7861454b565b6020020152612f9360088360038110610b2257610b2261454b565b5080612f9e816145a7565b915050612e84565b5060115460405163079cc67960e41b81526001600160a01b03909116906379cc679090612fd990339089906004016146ff565b600060405180830381600087803b158015612ff357600080fd5b505af1158015613007573d6000803e3d6000fd5b503392507fa49d4cf02656aebf8c771f5a8585638a2a15ee6c97cf7205d4208ed7c1df252d91508490508361303c8988614577565b60405161304b9392919061487c565b60405180910390a2505060018055505050565b600260015414156130815760405162461bcd60e51b81526004016109289061464b565b6002600155601a5460ff16156130a95760405162461bcd60e51b815260040161092890614682565b6000806130b68585613421565b91509150828210156131055760405162461bcd60e51b8152602060048201526018602482015277139bdd08195b9bdd59da0818dbda5b9cc81c995b5bdd995960421b6044820152606401610928565b6402540be400600f548261311991906145da565b61312391906145f9565b61312d90836145c2565b600b85600381106131405761314061454b565b0160008282546131509190614577565b909155505060115460405163079cc67960e41b81526001600160a01b03909116906379cc67909061318790339089906004016146ff565b600060405180830381600087803b1580156131a157600080fd5b505af11580156131b5573d6000803e3d6000fd5b505050506131e0600885600381106131cf576131cf61454b565b01546001600160a01b0316836132cc565b604080518581526020810187905290810183905233907f5ad056f2e28a8cec232015406b843668c1e36cda598127ec3b8c59b8c72773a09060600161304b565b33613229612426565b6001600160a01b03161461324f5760405162461bcd60e51b815260040161092890614516565b6001600160a01b0381166132b45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610928565b610b4681613b08565b60006132c7613313565b905090565b6001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156132ff576132fb3382613cee565b5050565b6132fb6001600160a01b0383163383613d90565b6015546013546000919042821115610d0a57601254601454818311156133785761333d8185614577565b6133478242614577565b6133518486614577565b61335b91906145da565b61336591906145f9565b61336f90836145c2565b94505050505090565b6133828185614577565b61338c8242614577565b6133968585614577565b6133a091906145da565b6133aa91906145f9565b61336f9083614577565b6000611d986133c2846139d9565b83613b58565b6001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141561340c573481146132fb5760405162461bcd60e51b8152600401610928906146a2565b6132fb6001600160a01b038316333084613a97565b600080600061342e613313565b9050600061343e60016003614577565b6134499060046145da565b6003600e5461345891906145da565b61346291906145f9565b6040805160608101918290529192506000919060029060039082845b81548152602001906001019080831161347e57505050505090506000601160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156134ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613511919061458e565b9050600061351d613723565b9050600061352b8287613b58565b905060008361353a838d6145da565b61354491906145f9565b61354e9083614577565b905082600061355f898d8486613daf565b90506000878d600381106135755761357561454b565b602002015182878f6003811061358d5761358d61454b565b602002015161359c9190614577565b6135a691906145f9565b905060005b60038110156136a25760008e8214156135fd578387878a85600381106135d3576135d361454b565b60200201516135e291906145da565b6135ec91906145f9565b6135f69190614577565b905061364e565b86868984600381106136115761361161454b565b602002015161362091906145da565b61362a91906145f9565b88836003811061363c5761363c61454b565b602002015161364b9190614577565b90505b6402540be40061365e828d6145da565b61366891906145f9565b85836003811061367a5761367a61454b565b6020020181815161368b9190614577565b90525081905061369a816145a7565b9150506135ab565b5060006136b18b8f8688613daf565b848f600381106136c3576136c361454b565b60200201516136d29190614577565b9050888e600381106136e6576136e661454b565b60200201516136f6600183614577565b61370091906145f9565b90508061370d8184614577565b9c509c5050505050505050505050509250929050565b61372b6141bd565b6040805160608101918290529060059060039082845b815481526020019060010190808311613741575050505050905060005b60038110156137d957670de0b6b3a7640000600b82600381106137835761378361454b565b01548383600381106137975761379761454b565b60200201516137a691906145da565b6137b091906145f9565b8282600381106137c2576137c261454b565b6020020152806137d1816145a7565b91505061375e565b5090565b60008385141580156137ef5750600385105b80156137fb5750600384105b61383b5760405162461bcd60e51b815260206004820152601160248201527024b63632b3b0b6103830b930b6b2ba32b960791b6044820152606401610928565b6000613845613313565b905060006138538483613b58565b9050806000806138646003866145da565b90506000805b60038110156138ed578b811415613883578991506138ad565b8a81146138a85788816003811061389c5761389c61454b565b602002015191506138ad565b6138db565b6138b782856145c2565b93506138c46003836145da565b6138ce87876145da565b6138d891906145f9565b94505b806138e5816145a7565b91505061386a565b506138f96003836145da565b61390386866145da565b61390d91906145f9565b9350600061391b83876145f9565b61392590856145c2565b9050600086815b60ff8110156139c757819250888483600261394791906145da565b61395191906145c2565b61395b9190614577565b8861396684806145da565b61397091906145c2565b61397a91906145f9565b91508282111561399f5760016139908484614577565b1161399a576139c7565b6139b5565b60016139ab8385614577565b116139b5576139c7565b806139bf816145a7565b91505061392c565b509d9c50505050505050505050505050565b6139e16141bd565b6040805160608101918290529060059060039082845b8154815260200190600101908083116139f7575050505050905060005b6003811015613a9157670de0b6b3a7640000838260038110613a3857613a3861454b565b6020020151838360038110613a4f57613a4f61454b565b6020020151613a5e91906145da565b613a6891906145f9565b828260038110613a7a57613a7a61454b565b602002015280613a89816145a7565b915050613a14565b50919050565b6040516001600160a01b0380851660248301528316604482015260648101829052613b029085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613f6a565b50505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060005b6003811015613b9c57848160038110613b7957613b7961454b565b6020020151613b8890836145c2565b915080613b94816145a7565b915050613b5e565b5080613bac576000915050610d0a565b60008181613bbb6003876145da565b905060005b60ff811015613ce2578260005b6003811015613c215760038a8260038110613bea57613bea61454b565b6020020151613bf991906145da565b613c0386846145da565b613c0d91906145f9565b915080613c19816145a7565b915050613bcd565b508394508060036001613c3491906145c2565b613c3e91906145da565b84613c4a600186614577565b613c5491906145da565b613c5e91906145c2565b84613c6a6003846145da565b613c7489876145da565b613c7e91906145c2565b613c8891906145da565b613c9291906145f9565b935084841115613cb8576001613ca88686614577565b11613cb35750613ce2565b613ccf565b6001613cc48587614577565b11613ccf5750613ce2565b5080613cda816145a7565b915050613bc0565b50909695505050505050565b6000826001600160a01b031660105483604051600060405180830381858888f193505050503d8060008114613d3f576040519150601f19603f3d011682016040523d82523d6000602084013e613d44565b606091505b5050905080613d8b5760405162461bcd60e51b8152602060048201526013602482015272109390881d1c985b9cd9995c8819985a5b1959606a1b6044820152606401610928565b505050565b613d8b8363a9059cbb60e01b8484604051602401613acb9291906146ff565b600060038410613df85760405162461bcd60e51b81526020600482015260146024820152736465763a20692061626f7665204e5f434f494e5360601b6044820152606401610928565b81600080613e076003896145da565b90506000805b6003811015613e8057888114613e3b57878160038110613e2f57613e2f61454b565b60200201519150613e40565b613e6e565b613e4a82856145c2565b9350613e576003836145da565b613e6188876145da565b613e6b91906145f9565b94505b80613e78816145a7565b915050613e0d565b50613e8c6003836145da565b613e9687866145da565b613ea091906145f9565b93506000613eae83886145f9565b613eb890856145c2565b9050600087815b60ff811015613f5a578192508984836002613eda91906145da565b613ee491906145c2565b613eee9190614577565b88613ef984806145da565b613f0391906145c2565b613f0d91906145f9565b915082821115613f32576001613f238484614577565b11613f2d57613f5a565b613f48565b6001613f3e8385614577565b11613f4857613f5a565b80613f52816145a7565b915050613ebf565b509b9a5050505050505050505050565b6000613fbf826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661403c9092919063ffffffff16565b805190915015613d8b5780806020019051810190613fdd91906148a5565b613d8b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610928565b606061404b8484600085614053565b949350505050565b6060824710156140b45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610928565b6001600160a01b0385163b61410b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610928565b600080866001600160a01b0316858760405161412791906148ee565b60006040518083038185875af1925050503d8060008114614164576040519150601f19603f3d011682016040523d82523d6000602084013e614169565b606091505b5091509150614179828286614184565b979650505050505050565b60608315614193575081611d98565b8251156141a35782518084602001fd5b8160405162461bcd60e51b8152600401610928919061490a565b60405180606001604052806003906020820280368337509192915050565b8260038101928215614209579160200282015b828111156142095782518255916020019190600101906141ee565b506137d992915061425d565b8260038101928215614209579160200282015b8281111561420957825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614228565b5b808211156137d9576000815560010161425e565b6040516060810167ffffffffffffffff811182821017156142a357634e487b7160e01b600052604160045260246000fd5b60405290565b600082601f8301126142ba57600080fd5b6142c2614272565b8060608401858111156142d457600080fd5b845b818110156142ee5780358452602093840193016142d6565b509095945050505050565b8015158114610b4657600080fd5b6000806080838503121561431a57600080fd5b61432484846142a9565b91506060830135614334816142f9565b809150509250929050565b6000806040838503121561435257600080fd5b50508035926020909101359150565b6000806080838503121561437457600080fd5b61437e84846142a9565b946060939093013593505050565b60006020828403121561439e57600080fd5b5035919050565b80356001600160a01b0381168114612d2857600080fd5b60008060008060008061010087890312156143d657600080fd5b87601f8801126143e557600080fd5b6143ed614272565b80606089018a8111156143ff57600080fd5b895b8181101561442057614412816143a5565b845260209384019301614401565b50909750359550506080870135935060a0870135925061444260c088016143a5565b915061445060e088016143a5565b90509295509295509295565b60008060006060848603121561447157600080fd5b505081359360208301359350604090920135919050565b6000806000806080858703121561449e57600080fd5b5050823594602084013594506040840135936060013592509050565b6001600160a01b0391909116815260200190565b600080608083850312156144e157600080fd5b823591506144f284602085016142a9565b90509250929050565b60006020828403121561450d57600080fd5b611d98826143a5565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008282101561458957614589614561565b500390565b6000602082840312156145a057600080fd5b5051919050565b60006000198214156145bb576145bb614561565b5060010190565b600082198211156145d5576145d5614561565b500190565b60008160001904831182151516156145f4576145f4614561565b500290565b60008261461657634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601690820152756465763a20696e73756666696369656e742074696d6560501b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526006908201526512da5b1b195960d21b604082015260600190565b602080825260159082015274496e636f6e73697374656e74207175616e7469747960581b604082015260600190565b602080825260149082015273536c697070616765207363726577656420796f7560601b604082015260600190565b6001600160a01b03929092168252602082015260400190565b8060005b6003811015613b0257815184526020938401939091019060010161471c565b610100810161474a8287614718565b6147576060830186614718565b60c082019390935260e0015292915050565b60006020828403121561477b57600080fd5b815160ff81168114611d9857600080fd5b600181815b808511156147c75781600019048211156147ad576147ad614561565b808516156147ba57918102915b93841c9390800290614791565b509250929050565b6000826147de57506001610d0a565b816147eb57506000610d0a565b8160018114614801576002811461480b57614827565b6001915050610d0a565b60ff84111561481c5761481c614561565b50506001821b610d0a565b5060208310610133831016604e8410600b841016171561484a575081810a610d0a565b614854838361478c565b806000190482111561486857614868614561565b029392505050565b6000611d9883836147cf565b60e0810161488a8286614718565b6148976060830185614718565b8260c0830152949350505050565b6000602082840312156148b757600080fd5b8151611d98816142f9565b60005b838110156148dd5781810151838201526020016148c5565b83811115613b025750506000910152565b600082516149008184602087016148c2565b9190910192915050565b60208152600082518060208401526149298160408501602087016148c2565b601f01601f1916919091016040019291505056fea2646970667358221220406a9fc5f0c005fc8f81d0281a5af6ee338e435fc15e5dd07272311582cf83ac64736f6c634300080a0033a2646970667358221220871e5b5929f2188aaac72a8c3a1f938b4e3456e4a50173b420cc941552bcd13f64736f6c634300080a0033
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063293577501461005c5780634cedbfc714610077578063715018a6146100a25780638da5cb5b146100ac578063f2fde38b146100bd575b600080fd5b610064600381565b6040519081526020015b60405180910390f35b61008a61008536600461054a565b6100d0565b6040516001600160a01b03909116815260200161006e565b6100aa6102ff565b005b6000546001600160a01b031661008a565b6100aa6100cb3660046105cc565b610335565b600080546001600160a01b031633146101045760405162461bcd60e51b81526004016100fb906105ee565b60405180910390fd5b6001600160a01b0389161580159061012457506001600160a01b03881615155b80156101425750876001600160a01b0316896001600160a01b031614155b61017e5760405162461bcd60e51b815260206004820152600d60248201526c24b63632b3b0b6103a37b5b2b760991b60448201526064016100fb565b600080600061018e8c8c8c6103d0565b92509250925060006040518060600160405280856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b031681525090506000604051806020016101fb90610521565b601f1982820381018352601f9091011660408190526bffffffffffffffffffffffff19606088811b8216602084015287811b8216603484015286811b8216604884015233901b16605c82015242607082015246609082015290915060009060b0016040516020818303038152906040528051906020012090506000818351602085016000f59050806001600160a01b0316634eac4835858f8f8f8f8f6040518763ffffffff1660e01b81526004016102b896959493929190610623565b600060405180830381600087803b1580156102d257600080fd5b505af11580156102e6573d6000803e3d6000fd5b5092995050505050505050505098975050505050505050565b6000546001600160a01b031633146103295760405162461bcd60e51b81526004016100fb906105ee565b61033360006104d1565b565b6000546001600160a01b0316331461035f5760405162461bcd60e51b81526004016100fb906105ee565b6001600160a01b0381166103c45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016100fb565b6103cd816104d1565b50565b6000806000846001600160a01b0316866001600160a01b0316141580156104095750836001600160a01b0316866001600160a01b031614155b80156104275750836001600160a01b0316856001600160a01b031614155b6104695760405162461bcd60e51b81526020600482015260136024820152724944454e544943414c5f41444452455353455360681b60448201526064016100fb565b6000856001600160a01b0316876001600160a01b0316111561048b5750939493845b846001600160a01b0316866001600160a01b031611156104c45750929392836001600160a01b0380871690881611156104c45750939493845b5094959394509192915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b614a178061068d83390190565b80356001600160a01b038116811461054557600080fd5b919050565b600080600080600080600080610100898b03121561056757600080fd5b6105708961052e565b975061057e60208a0161052e565b965061058c60408a0161052e565b9550606089013594506080890135935060a089013592506105af60c08a0161052e565b91506105bd60e08a0161052e565b90509295985092959890939650565b6000602082840312156105de57600080fd5b6105e78261052e565b9392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6101008101818860005b60038110156106555781516001600160a01b031683526020928301929091019060010161062d565b5050506060820196909652608081019490945260a08401929092526001600160a01b0390811660c08401521660e09091015291905056fe60a0604052610fbd6010553480156200001757600080fd5b50620000233362000031565b600180553360805262000081565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b608051614973620000a4600039600081816106da01526115fc01526149736000f3fe6080604052600436106103015760003560e01c80637dafa36411610191578063ca8ca154116100e2578063ecb586a511610090578063ecb586a514610837578063edfb780114610857578063f1dc3cc91461086e578063f2fde38b1461088e578063f3de0362146107a6578063f446c1d0146108ae578063fc0c546a146108c3578063fee3f7f9146108e357600080fd5b8063ca8ca15414610791578063d73792a9146107a6578063ddca3f43146107bf578063e2e7d264146107d5578063e3698853146107f5578063e38244621461080a578063e5d9e9031461082057600080fd5b8063a6b0a7181161013f578063a6b0a718146106c8578063aaf5eb68146106fc578063ab5ac06114610718578063b4b577ad1461072d578063bb7b8b8014610743578063bc063e1a14610758578063c66106571461077157600080fd5b80637dafa364146105f657806385f11d1e146106165780638da5cb5b146106365780639a1d6ed3146106585780639c868ac01461066e5780639fdaea0c14610688578063a139c370146106a857600080fd5b80634488ddf0116102565780635409491a116102045780635409491a1461052d578063556d6e9f1461054357806358680d0b146105635780635b41b908146105795780635b5a14671461058c57806362203d74146105ac5780636d4366b7146105cc578063715018a6146105e157600080fd5b80634488ddf01461047a5780634515cef3146104905780634903b0d1146104a35780634eac4835146104c35780634f12fe97146104e35780634fb08c5e146104f8578063524c39011461051857600080fd5b80633046f972116102b35780633046f972146103b457806330c54085146103c95780633883e119146103de578063392e53cd146103fe578063396984151461042d5780633c157e6414610444578063405e28f81461046457600080fd5b806306e9481c1461030657806314052288146103305780632081066c14610346578063226840fb1461035c57806325d2edf01461037357806329357750146103895780632a4268961461039e575b600080fd5b34801561031257600080fd5b5061031d6201518081565b6040519081526020015b60405180910390f35b34801561033c57600080fd5b5061031d60155481565b34801561035257600080fd5b5061031d60145481565b34801561036857600080fd5b506103716108f9565b005b34801561037f57600080fd5b5061031d6159d881565b34801561039557600080fd5b5061031d600381565b3480156103aa57600080fd5b5061031d60195481565b3480156103c057600080fd5b50610371610961565b3480156103d557600080fd5b506103716109c5565b3480156103ea57600080fd5b5061031d6103f9366004614307565b610b49565b34801561040a57600080fd5b50601a5461041d90610100900460ff1681565b6040519015158152602001610327565b34801561043957600080fd5b5061031d620f424081565b34801561045057600080fd5b5061037161045f36600461433f565b610d10565b34801561047057600080fd5b5061031d60165481565b34801561048657600080fd5b5061031d60105481565b61037161049e366004614361565b610f1b565b3480156104af57600080fd5b5061031d6104be36600461438c565b611582565b3480156104cf57600080fd5b506103716104de3660046143bc565b611599565b3480156104ef57600080fd5b506103716119d2565b34801561050457600080fd5b5061031d61051336600461433f565b611ad7565b34801561052457600080fd5b50610371611aed565b34801561053957600080fd5b5061031d60125481565b34801561054f57600080fd5b5061031d61055e36600461445c565b611c53565b34801561056f57600080fd5b5061031d60175481565b610371610587366004614488565b611d9f565b34801561059857600080fd5b506103716105a736600461433f565b612170565b3480156105b857600080fd5b5061031d6105c736600461438c565b6122ed565b3480156105d857600080fd5b5061031d601281565b3480156105ed57600080fd5b506103716122fd565b34801561060257600080fd5b5061031d61061136600461438c565b612338565b34801561062257600080fd5b5061031d61063136600461445c565b612348565b34801561064257600080fd5b5061064b612426565b60405161032791906144ba565b34801561066457600080fd5b5061031d6108fc81565b34801561067a57600080fd5b50601a5461041d9060ff1681565b34801561069457600080fd5b506103716106a3366004614361565b612435565b3480156106b457600080fd5b506103716106c336600461438c565b612a0f565b3480156106d457600080fd5b5061064b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561070857600080fd5b5061031d670de0b6b3a764000081565b34801561072457600080fd5b5061031d600a81565b34801561073957600080fd5b5061031d60135481565b34801561074f57600080fd5b5061031d612ac8565b34801561076457600080fd5b5061031d64012a05f20081565b34801561077d57600080fd5b5061064b61078c36600461438c565b612b84565b34801561079d57600080fd5b50610371612ba4565b3480156107b257600080fd5b5061031d6402540be40081565b3480156107cb57600080fd5b5061031d600e5481565b3480156107e157600080fd5b5061031d6107f036600461438c565b612c2c565b34801561080157600080fd5b50610371612d2d565b34801561081657600080fd5b5061031d60185481565b34801561082c57600080fd5b5061031d6203f48081565b34801561084357600080fd5b506103716108523660046144ce565b612dd9565b34801561086357600080fd5b5061031d624f1a0081565b34801561087a57600080fd5b5061037161088936600461445c565b61305e565b34801561089a57600080fd5b506103716108a93660046144fb565b613220565b3480156108ba57600080fd5b5061031d6132bd565b3480156108cf57600080fd5b5060115461064b906001600160a01b031681565b3480156108ef57600080fd5b5061031d600f5481565b33610902612426565b6001600160a01b0316146109315760405162461bcd60e51b815260040161092890614516565b60405180910390fd5b600060168190556040517f1b4883af197c705114490f8d84f9ce30bef6a6199f7b7b649e845577cf0769a19190a1565b3361096a612426565b6001600160a01b0316146109905760405162461bcd60e51b815260040161092890614516565b601a805460ff191690556040517f061284ffa2814ace135f62907c78a7cff0f070efe7e6a0a42740ea1da2c8bdc890600090a1565b336109ce612426565b6001600160a01b0316146109f45760405162461bcd60e51b815260040161092890614516565b60005b6003811015610b4657600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60088360038110610a2a57610a2a61454b565b01546001600160a01b03161415610a6157600b8260038110610a4e57610a4e61454b565b0154610a5a9047614577565b9050610b06565b600b8260038110610a7457610a7461454b565b015460088360038110610a8957610a8961454b565b01546040516370a0823160e01b81526001600160a01b03909116906370a0823190610ab89030906004016144ba565b602060405180830381865afa158015610ad5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af9919061458e565b610b039190614577565b90505b8015610b3357610b3360088360038110610b2257610b2261454b565b01546001600160a01b0316826132cc565b5080610b3e816145a7565b9150506109f7565b50565b604080516060810191829052600091829190600b9060039082845b815481526020019060010190808311610b6457505050505090506000610b88613313565b90506000610b9683836133b4565b905060005b6003811015610c3c578515610bec57868160038110610bbc57610bbc61454b565b6020020151848260038110610bd357610bd361454b565b60200201818151610be491906145c2565b905250610c2a565b868160038110610bfe57610bfe61454b565b6020020151848260038110610c1557610c1561454b565b60200201818151610c269190614577565b9052505b80610c34816145a7565b915050610b9b565b506000610c4984846133b4565b90506000601160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ca0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc4919061458e565b905060008715610cdf57610cd88484614577565b9050610cec565b610ce98385614577565b90505b83610cf783836145da565b610d0191906145f9565b96505050505050505b92915050565b33610d19612426565b6001600160a01b031614610d3f5760405162461bcd60e51b815260040161092890614516565b62015180601454610d5091906145c2565b421015610d915760405162461bcd60e51b815260206004820152600f60248201526e646576203a20746f6f206561726c7960881b6044820152606401610928565b610d9e62015180426145c2565b811015610dbd5760405162461bcd60e51b81526004016109289061461b565b6000610dc7613313565b9050600083118015610ddb5750620f424083105b610e355760405162461bcd60e51b815260206004820152602560248201527f5f6675747572655f41206d757374206265206265747765656e203020616e64206044820152644d41585f4160d81b6064820152608401610928565b808310158015610e4f5750610e4b600a826145da565b8311155b80610e6e57508083108015610e6e575080610e6b600a856145da565b10155b610eba5760405162461bcd60e51b815260206004820152601b60248201527f496c6c6567616c20706172616d65746572205f6675747572655f4100000000006044820152606401610928565b60128190556013839055426014819055601583905560408051838152602081018690528082019290925260608201849052517fa2b71ec6df949300b59aab36b55e189697b750119dd349fcfa8c0f779e83c2549181900360800190a1505050565b60026001541415610f3e5760405162461bcd60e51b81526004016109289061464b565b6002600155601a5460ff1615610f665760405162461bcd60e51b815260040161092890614682565b601154600160a01b900460ff16610f95573415610f955760405162461bcd60e51b8152600401610928906146a2565b610f9d6141bd565b6000610fab60016003614577565b610fb69060046145da565b6003600e54610fc591906145da565b610fcf91906145f9565b600f549091506000610fdf613313565b90506000601160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611036573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105a919061458e565b6040805160608101918290529192506000918291600b9060039082845b815481526020019060010190808311611077575050505050905060008311156110a7576110a481856133b4565b91505b60006040518060600160405280836000600381106110c7576110c761454b565b60200201518152602001836001600381106110e4576110e461454b565b60200201518152602001836002600381106111015761110161454b565b60200201519052905060005b60038110156111ed578461118c5760008b826003811061112f5761112f61454b565b60200201511161118c5760405162461bcd60e51b815260206004820152602260248201527f496e697469616c206465706f73697420726571756972657320616c6c20636f696044820152616e7360f01b6064820152608401610928565b8a816003811061119e5761119e61454b565b60200201518382600381106111b5576111b561454b565b60200201516111c491906145c2565b8282600381106111d6576111d661454b565b6020020152806111e5816145a7565b91505061110d565b5060006111fa82876133b4565b905083811161124b5760405162461bcd60e51b815260206004820152601a60248201527f4431206d7573742062652067726561746572207468616e2044300000000000006044820152606401610928565b8085156113f95760005b60038110156113e7576000868683600381106112735761127361454b565b602002015161128290866145da565b61128c91906145f9565b905060008583600381106112a2576112a261454b565b60200201518211156112d6578583600381106112c0576112c061454b565b60200201516112cf9083614577565b90506112fb565b818684600381106112e9576112e961454b565b60200201516112f89190614577565b90505b6402540be40061130b828e6145da565b61131591906145f9565b8d84600381106113275761132761454b565b60200201526402540be4008b8e85600381106113455761134561454b565b602002015161135491906145da565b61135e91906145f9565b8684600381106113705761137061454b565b602002015161137f9190614577565b600b84600381106113925761139261454b565b01558c83600381106113a6576113a661454b565b60200201518684600381106113bd576113bd61454b565b602002018181516113ce9190614577565b9052508291506113df9050816145a7565b915050611255565b506113f283886133b4565b9050611408565b611406600b8460036141db565b505b600086611416575081611438565b856114218184614577565b61142b90896145da565b61143591906145f9565b90505b8b8110156114585760405162461bcd60e51b8152600401610928906146d1565b60005b60038110156114c05760008e82600381106114785761147861454b565b602002015190506000600883600381106114945761149461454b565b01546001600160a01b031690506114ab81836133c8565b505080806114b8906145a7565b91505061145b565b506011546040516340c10f1960e01b81526001600160a01b03909116906340c10f19906114f390339085906004016146ff565b600060405180830381600087803b15801561150d57600080fd5b505af1158015611521573d6000803e3d6000fd5b503392507f423f6495a08fc652425cf4ed0d1f9e37e571d9b9529b1c1c23cce780b2e7df0d91508f90508d86611557868d6145c2565b604051611567949392919061473b565b60405180910390a25050600180555050505050505050505050565b600b816003811061159257600080fd5b0154905081565b601a54610100900460ff16156115f15760405162461bcd60e51b815260206004820152601f60248201527f4f7065726174696f6e733a20416c726561647920696e697469616c697a6564006044820152606401610928565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146116635760405162461bcd60e51b81526020600482015260176024820152764f7065726174696f6e733a204e6f7420666163746f727960481b6044820152606401610928565b620f42408511156116ab5760405162461bcd60e51b81526020600482015260126024820152715f412065786365656473206d6178696d756d60701b6044820152606401610928565b64012a05f2008411156116f75760405162461bcd60e51b81526020600482015260146024820152735f6665652065786365656473206d6178696d756d60601b6044820152606401610928565b6402540be40083111561174c5760405162461bcd60e51b815260206004820152601a60248201527f5f61646d696e5f6665652065786365656473206d6178696d756d0000000000006044820152606401610928565b601a805461ff00191661010017905560005b600381101561197357600087826003811061177b5761177b61454b565b60200201516001600160a01b031614156117c65760405162461bcd60e51b815260206004820152600c60248201526b5a45524f204164647265737360a01b6044820152606401610928565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8883600381106117ef576117ef61454b565b60200201516001600160a01b0316141561181e57506011805460ff60a01b1916600160a01b179055601261189c565b8782600381106118305761183061454b565b60200201516001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611872573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118969190614769565b60ff1690505b60128111156118f95760405162461bcd60e51b8152602060048201526024808201527f546865206d6178696d756d20646563696d616c2063616e6e6f742065786365656044820152630c84062760e31b6064820152608401610928565b611904816012614577565b61190f90600a614870565b600283600381106119225761192261454b565b0155600282600381106119375761193761454b565b015461194b90670de0b6b3a76400006145da565b6005836003811061195e5761195e61454b565b0155508061196b816145a7565b91505061175e565b506119816008876003614215565b5060128590556013859055600e849055600f8390556119a3624f1a00426145c2565b601955601180546001600160a01b0319166001600160a01b0383161790556119ca82613220565b505050505050565b336119db612426565b6001600160a01b031614611a015760405162461bcd60e51b815260040161092890614516565b601654421015611a235760405162461bcd60e51b81526004016109289061461b565b601654611a815760405162461bcd60e51b815260206004820152602660248201527f61646d696e5f616374696f6e735f646561646c696e652073686f756c64206e6f60448201526507420626520360d41b6064820152608401610928565b6000601655601754600e819055601854600f8190556040517fbe12859b636aed607d5230b2cc2711f68d70e51060e6cca1f575ef5d2fcc95d192611acd92908252602082015260400190565b60405180910390a1565b600080611ae48484613421565b50949350505050565b33611af6612426565b6001600160a01b031614611b1c5760405162461bcd60e51b815260040161092890614516565b60005b6003811015611c275773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60088260038110611b5057611b5061454b565b01546001600160a01b03161415611b7c5747600b8260038110611b7557611b7561454b565b0155611c15565b60088160038110611b8f57611b8f61454b565b01546040516370a0823160e01b81526001600160a01b03909116906370a0823190611bbe9030906004016144ba565b602060405180830381865afa158015611bdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bff919061458e565b600b8260038110611c1257611c1261454b565b01555b80611c1f816145a7565b915050611b1f565b506040517f2c7203581ca666b8c5094c11c03f0b19b3750234a9d281bcbc88a260bcb006de90600090a1565b60408051606081019182905260009182919060059060039082845b815481526020019060010190808311611c6e57505050505090506000611c92613723565b90506000670de0b6b3a7640000838860038110611cb157611cb161454b565b6020020151611cc090876145da565b611cca91906145f9565b828860038110611cdc57611cdc61454b565b6020020151611ceb91906145c2565b90506000611cfb888884866137dd565b90506000848860038110611d1157611d1161454b565b6020020151670de0b6b3a7640000600184878c60038110611d3457611d3461454b565b6020020151611d439190614577565b611d4d9190614577565b611d5791906145da565b611d6191906145f9565b905060006402540be40082600e54611d7991906145da565b611d8391906145f9565b9050611d8f8183614577565b96505050505050505b9392505050565b60026001541415611dc25760405162461bcd60e51b81526004016109289061464b565b6002600155601a5460ff1615611dea5760405162461bcd60e51b815260040161092890614682565b601154600160a01b900460ff16611e19573415611e195760405162461bcd60e51b8152600401610928906146a2565b604080516060810191829052600091600b9060039082845b815481526020019060010190808311611e3157505050505090506000611e56826139d9565b90506000670de0b6b3a764000060058860038110611e7657611e7661454b565b0154611e8290876145da565b611e8c91906145f9565b828860038110611e9e57611e9e61454b565b6020020151611ead91906145c2565b90506000611ebd888884866137dd565b90506000600182858a60038110611ed657611ed661454b565b6020020151611ee59190614577565b611eef9190614577565b905060006402540be400600e5483611f0791906145da565b611f1191906145f9565b905060058960038110611f2657611f2661454b565b0154670de0b6b3a7640000611f3b8385614577565b611f4591906145da565b611f4f91906145f9565b915086821015611fb85760405162461bcd60e51b815260206004820152602e60248201527f45786368616e676520726573756c74656420696e20666577657220636f696e7360448201526d081d1a185b88195e1c1958dd195960921b6064820152608401610928565b60006402540be400600f5483611fce91906145da565b611fd891906145f9565b905060058a60038110611fed57611fed61454b565b0154612001670de0b6b3a7640000836145da565b61200b91906145f9565b905088878c600381106120205761202061454b565b602002015161202f91906145c2565b600b8c600381106120425761204261454b565b01558083888c600381106120585761205861454b565b60200201516120679190614577565b6120719190614577565b600b8b600381106120845761208461454b565b0155600060088c6003811061209b5761209b61454b565b01546001600160a01b0316905073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8114156120e857348a146120e35760405162461bcd60e51b8152600401610928906146a2565b6120fd565b6120fd6001600160a01b03821633308d613a97565b600060088c600381106121125761211261454b565b01546001600160a01b0316905061212981866132cc565b604080518e8152602081018d90529081018d90526060810186905233907fb2e76ae99761dc136e598d4a629bb347eccb9532a5f8bbd72e18467c3c34cc9890608001611567565b33612179612426565b6001600160a01b03161461219f5760405162461bcd60e51b815260040161092890614516565b601654156121ef5760405162461bcd60e51b815260206004820181905260248201527f61646d696e5f616374696f6e735f646561646c696e65206d75737420626520306044820152606401610928565b64012a05f20082111561223f5760405162461bcd60e51b81526020600482015260186024820152776465763a206665652065786365656473206d6178696d756d60401b6044820152606401610928565b6402540be4008111156122945760405162461bcd60e51b815260206004820152601e60248201527f6465763a2061646d696e206665652065786365656473206d6178696d756d00006044820152606401610928565b6122a16203f480426145c2565b60168190556017839055601882905560408051848152602081018490527f351fc5da2fbf480f2225debf3664a4bc90fa9923743aad58b4603f648e931fe0910160405180910390a25050565b6005816003811061159257600080fd5b33612306612426565b6001600160a01b03161461232c5760405162461bcd60e51b815260040161092890614516565b6123366000613b08565b565b6002816003811061159257600080fd5b600080612353613723565b6040805160608101918290529192506000919060029060039082845b81548152602001906001019080831161236f5750505050509050600081876003811061239d5761239d61454b565b60200201516123ac90866145da565b8388600381106123be576123be61454b565b60200201516123cd91906145c2565b905060006123dd888884876137dd565b905060008388600381106123f3576123f361454b565b6020020151600183878b6003811061240d5761240d61454b565b602002015161241c9190614577565b611d579190614577565b6000546001600160a01b031690565b600260015414156124585760405162461bcd60e51b81526004016109289061464b565b6002600155601a5460ff16156124805760405162461bcd60e51b815260040161092890614682565b601154604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa1580156124ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ee919061458e565b9050600081116125395760405162461bcd60e51b81526020600482015260166024820152756465763a207a65726f20746f74616c20737570706c7960501b6044820152606401610928565b600061254760016003614577565b6125529060046145da565b6003600e5461256191906145da565b61256b91906145f9565b600f54909150600061257b613313565b60408051606081019182905291925060009190600b9060039082845b815481526020019060010190808311612597575050505050905060006040518060600160405280836000600381106125d1576125d161454b565b60200201518152602001836001600381106125ee576125ee61454b565b602002015181526020018360026003811061260b5761260b61454b565b602002015190529050600061262083856133b4565b905060005b600381101561267d578981600381106126405761264061454b565b60200201518382600381106126575761265761454b565b602002018181516126689190614577565b90525080612675816145a7565b915050612625565b50600061268a83866133b4565b90506126946141bd565b60005b6003811015612829576000848783600381106126b5576126b561454b565b60200201516126c490866145da565b6126ce91906145f9565b905060008683600381106126e4576126e461454b565b6020020151821115612718578683600381106127025761270261454b565b60200201516127119083614577565b905061273d565b8187846003811061272b5761272b61454b565b602002015161273a9190614577565b90505b6402540be40061274d828d6145da565b61275791906145f9565b8484600381106127695761276961454b565b60200201526402540be4008a8585600381106127875761278761454b565b602002015161279691906145da565b6127a091906145f9565b8784600381106127b2576127b261454b565b60200201516127c19190614577565b600b84600381106127d4576127d461454b565b01558383600381106127e8576127e861454b565b60200201518784600381106127ff576127ff61454b565b602002018181516128109190614577565b9052508291506128219050816145a7565b915050612697565b50600061283685886133b4565b90506000848b6128468483614577565b61285091906145da565b61285a91906145f9565b9050600081116128b85760405162461bcd60e51b815260206004820152602360248201527f746f6b656e5f616d6f756e74206d75737420626520677265617465722074686160448201526206e20360ec1b6064820152608401610928565b6128c36001826145c2565b90508b8111156128e55760405162461bcd60e51b8152600401610928906146d1565b60115460405163079cc67960e41b81526001600160a01b03909116906379cc67909061291790339085906004016146ff565b600060405180830381600087803b15801561293157600080fd5b505af1158015612945573d6000803e3d6000fd5b5050505060005b60038110156129c35760008e82600381106129695761296961454b565b602002015111156129b1576129b16008826003811061298a5761298a61454b565b01546001600160a01b03168f83600381106129a7576129a761454b565b60200201516132cc565b806129bb816145a7565b91505061294c565b506129ce818c614577565b9a50336001600160a01b03167f173599dbf9c6ca6f7c3b590df07ae98a45d74ff54065505141e7de6c46a624c28e85878f604051611567949392919061473b565b33612a18612426565b6001600160a01b031614612a3e5760405162461bcd60e51b815260040161092890614516565b6108fc8110158015612a5257506159d88111155b612a8c5760405162461bcd60e51b815260206004820152600b60248201526a496c6c6567616c2067617360a81b6044820152606401610928565b60108190556040518181527f320c5e7159406866d39a81979ca1c22276b644dfcfd52ee1f335ee467ad0ec67906020015b60405180910390a150565b600080612ae3612ad6613723565b612ade613313565b613b58565b90506000601160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b5e919061458e565b905080612b73670de0b6b3a7640000846145da565b612b7d91906145f9565b9250505090565b60088160038110612b9457600080fd5b01546001600160a01b0316905081565b33612bad612426565b6001600160a01b031614612bd35760405162461bcd60e51b815260040161092890614516565b6000612bdd613313565b6012819055601381905542601481905560158190556040519192507f46e22fb3709ad289f62ce63d469248536dbc78d82b84a3d7e74ad606dc20193891612abd91848252602082015260400190565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60088360038110612c5657612c5661454b565b01546001600160a01b03161415612c8657600b8260038110612c7a57612c7a61454b565b0154610d0a9047614577565b600b8260038110612c9957612c9961454b565b015460088360038110612cae57612cae61454b565b01546040516370a0823160e01b81526001600160a01b03909116906370a0823190612cdd9030906004016144ba565b602060405180830381865afa158015612cfa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d1e919061458e565b610d0a9190614577565b919050565b33612d36612426565b6001600160a01b031614612d5c5760405162461bcd60e51b815260040161092890614516565b4260195411612da15760405162461bcd60e51b8152602060048201526011602482015270457863656564656420646561646c696e6560781b6044820152606401610928565b601a805460ff191660011790556040517fbe26733c2bf6ff3ea5ba8cfe744422bd49052ff9ed5685c9e81e6f9321dbaddd90600090a1565b60026001541415612dfc5760405162461bcd60e51b81526004016109289061464b565b6002600155601154604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015612e4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e6f919061458e565b9050612e796141bd565b612e816141bd565b60005b6003811015612fa65760008487600b8460038110612ea457612ea461454b565b0154612eb091906145da565b612eba91906145f9565b9050858260038110612ece57612ece61454b565b6020020151811015612f3b5760405162461bcd60e51b815260206004820152603060248201527f5769746864726177616c20726573756c74656420696e20666577657220636f6960448201526f1b9cc81d1a185b88195e1c1958dd195960821b6064820152608401610928565b80600b8360038110612f4f57612f4f61454b565b016000828254612f5f9190614577565b90915550819050848360038110612f7857612f7861454b565b6020020152612f9360088360038110610b2257610b2261454b565b5080612f9e816145a7565b915050612e84565b5060115460405163079cc67960e41b81526001600160a01b03909116906379cc679090612fd990339089906004016146ff565b600060405180830381600087803b158015612ff357600080fd5b505af1158015613007573d6000803e3d6000fd5b503392507fa49d4cf02656aebf8c771f5a8585638a2a15ee6c97cf7205d4208ed7c1df252d91508490508361303c8988614577565b60405161304b9392919061487c565b60405180910390a2505060018055505050565b600260015414156130815760405162461bcd60e51b81526004016109289061464b565b6002600155601a5460ff16156130a95760405162461bcd60e51b815260040161092890614682565b6000806130b68585613421565b91509150828210156131055760405162461bcd60e51b8152602060048201526018602482015277139bdd08195b9bdd59da0818dbda5b9cc81c995b5bdd995960421b6044820152606401610928565b6402540be400600f548261311991906145da565b61312391906145f9565b61312d90836145c2565b600b85600381106131405761314061454b565b0160008282546131509190614577565b909155505060115460405163079cc67960e41b81526001600160a01b03909116906379cc67909061318790339089906004016146ff565b600060405180830381600087803b1580156131a157600080fd5b505af11580156131b5573d6000803e3d6000fd5b505050506131e0600885600381106131cf576131cf61454b565b01546001600160a01b0316836132cc565b604080518581526020810187905290810183905233907f5ad056f2e28a8cec232015406b843668c1e36cda598127ec3b8c59b8c72773a09060600161304b565b33613229612426565b6001600160a01b03161461324f5760405162461bcd60e51b815260040161092890614516565b6001600160a01b0381166132b45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610928565b610b4681613b08565b60006132c7613313565b905090565b6001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156132ff576132fb3382613cee565b5050565b6132fb6001600160a01b0383163383613d90565b6015546013546000919042821115610d0a57601254601454818311156133785761333d8185614577565b6133478242614577565b6133518486614577565b61335b91906145da565b61336591906145f9565b61336f90836145c2565b94505050505090565b6133828185614577565b61338c8242614577565b6133968585614577565b6133a091906145da565b6133aa91906145f9565b61336f9083614577565b6000611d986133c2846139d9565b83613b58565b6001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141561340c573481146132fb5760405162461bcd60e51b8152600401610928906146a2565b6132fb6001600160a01b038316333084613a97565b600080600061342e613313565b9050600061343e60016003614577565b6134499060046145da565b6003600e5461345891906145da565b61346291906145f9565b6040805160608101918290529192506000919060029060039082845b81548152602001906001019080831161347e57505050505090506000601160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156134ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613511919061458e565b9050600061351d613723565b9050600061352b8287613b58565b905060008361353a838d6145da565b61354491906145f9565b61354e9083614577565b905082600061355f898d8486613daf565b90506000878d600381106135755761357561454b565b602002015182878f6003811061358d5761358d61454b565b602002015161359c9190614577565b6135a691906145f9565b905060005b60038110156136a25760008e8214156135fd578387878a85600381106135d3576135d361454b565b60200201516135e291906145da565b6135ec91906145f9565b6135f69190614577565b905061364e565b86868984600381106136115761361161454b565b602002015161362091906145da565b61362a91906145f9565b88836003811061363c5761363c61454b565b602002015161364b9190614577565b90505b6402540be40061365e828d6145da565b61366891906145f9565b85836003811061367a5761367a61454b565b6020020181815161368b9190614577565b90525081905061369a816145a7565b9150506135ab565b5060006136b18b8f8688613daf565b848f600381106136c3576136c361454b565b60200201516136d29190614577565b9050888e600381106136e6576136e661454b565b60200201516136f6600183614577565b61370091906145f9565b90508061370d8184614577565b9c509c5050505050505050505050509250929050565b61372b6141bd565b6040805160608101918290529060059060039082845b815481526020019060010190808311613741575050505050905060005b60038110156137d957670de0b6b3a7640000600b82600381106137835761378361454b565b01548383600381106137975761379761454b565b60200201516137a691906145da565b6137b091906145f9565b8282600381106137c2576137c261454b565b6020020152806137d1816145a7565b91505061375e565b5090565b60008385141580156137ef5750600385105b80156137fb5750600384105b61383b5760405162461bcd60e51b815260206004820152601160248201527024b63632b3b0b6103830b930b6b2ba32b960791b6044820152606401610928565b6000613845613313565b905060006138538483613b58565b9050806000806138646003866145da565b90506000805b60038110156138ed578b811415613883578991506138ad565b8a81146138a85788816003811061389c5761389c61454b565b602002015191506138ad565b6138db565b6138b782856145c2565b93506138c46003836145da565b6138ce87876145da565b6138d891906145f9565b94505b806138e5816145a7565b91505061386a565b506138f96003836145da565b61390386866145da565b61390d91906145f9565b9350600061391b83876145f9565b61392590856145c2565b9050600086815b60ff8110156139c757819250888483600261394791906145da565b61395191906145c2565b61395b9190614577565b8861396684806145da565b61397091906145c2565b61397a91906145f9565b91508282111561399f5760016139908484614577565b1161399a576139c7565b6139b5565b60016139ab8385614577565b116139b5576139c7565b806139bf816145a7565b91505061392c565b509d9c50505050505050505050505050565b6139e16141bd565b6040805160608101918290529060059060039082845b8154815260200190600101908083116139f7575050505050905060005b6003811015613a9157670de0b6b3a7640000838260038110613a3857613a3861454b565b6020020151838360038110613a4f57613a4f61454b565b6020020151613a5e91906145da565b613a6891906145f9565b828260038110613a7a57613a7a61454b565b602002015280613a89816145a7565b915050613a14565b50919050565b6040516001600160a01b0380851660248301528316604482015260648101829052613b029085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613f6a565b50505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060005b6003811015613b9c57848160038110613b7957613b7961454b565b6020020151613b8890836145c2565b915080613b94816145a7565b915050613b5e565b5080613bac576000915050610d0a565b60008181613bbb6003876145da565b905060005b60ff811015613ce2578260005b6003811015613c215760038a8260038110613bea57613bea61454b565b6020020151613bf991906145da565b613c0386846145da565b613c0d91906145f9565b915080613c19816145a7565b915050613bcd565b508394508060036001613c3491906145c2565b613c3e91906145da565b84613c4a600186614577565b613c5491906145da565b613c5e91906145c2565b84613c6a6003846145da565b613c7489876145da565b613c7e91906145c2565b613c8891906145da565b613c9291906145f9565b935084841115613cb8576001613ca88686614577565b11613cb35750613ce2565b613ccf565b6001613cc48587614577565b11613ccf5750613ce2565b5080613cda816145a7565b915050613bc0565b50909695505050505050565b6000826001600160a01b031660105483604051600060405180830381858888f193505050503d8060008114613d3f576040519150601f19603f3d011682016040523d82523d6000602084013e613d44565b606091505b5050905080613d8b5760405162461bcd60e51b8152602060048201526013602482015272109390881d1c985b9cd9995c8819985a5b1959606a1b6044820152606401610928565b505050565b613d8b8363a9059cbb60e01b8484604051602401613acb9291906146ff565b600060038410613df85760405162461bcd60e51b81526020600482015260146024820152736465763a20692061626f7665204e5f434f494e5360601b6044820152606401610928565b81600080613e076003896145da565b90506000805b6003811015613e8057888114613e3b57878160038110613e2f57613e2f61454b565b60200201519150613e40565b613e6e565b613e4a82856145c2565b9350613e576003836145da565b613e6188876145da565b613e6b91906145f9565b94505b80613e78816145a7565b915050613e0d565b50613e8c6003836145da565b613e9687866145da565b613ea091906145f9565b93506000613eae83886145f9565b613eb890856145c2565b9050600087815b60ff811015613f5a578192508984836002613eda91906145da565b613ee491906145c2565b613eee9190614577565b88613ef984806145da565b613f0391906145c2565b613f0d91906145f9565b915082821115613f32576001613f238484614577565b11613f2d57613f5a565b613f48565b6001613f3e8385614577565b11613f4857613f5a565b80613f52816145a7565b915050613ebf565b509b9a5050505050505050505050565b6000613fbf826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661403c9092919063ffffffff16565b805190915015613d8b5780806020019051810190613fdd91906148a5565b613d8b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610928565b606061404b8484600085614053565b949350505050565b6060824710156140b45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610928565b6001600160a01b0385163b61410b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610928565b600080866001600160a01b0316858760405161412791906148ee565b60006040518083038185875af1925050503d8060008114614164576040519150601f19603f3d011682016040523d82523d6000602084013e614169565b606091505b5091509150614179828286614184565b979650505050505050565b60608315614193575081611d98565b8251156141a35782518084602001fd5b8160405162461bcd60e51b8152600401610928919061490a565b60405180606001604052806003906020820280368337509192915050565b8260038101928215614209579160200282015b828111156142095782518255916020019190600101906141ee565b506137d992915061425d565b8260038101928215614209579160200282015b8281111561420957825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614228565b5b808211156137d9576000815560010161425e565b6040516060810167ffffffffffffffff811182821017156142a357634e487b7160e01b600052604160045260246000fd5b60405290565b600082601f8301126142ba57600080fd5b6142c2614272565b8060608401858111156142d457600080fd5b845b818110156142ee5780358452602093840193016142d6565b509095945050505050565b8015158114610b4657600080fd5b6000806080838503121561431a57600080fd5b61432484846142a9565b91506060830135614334816142f9565b809150509250929050565b6000806040838503121561435257600080fd5b50508035926020909101359150565b6000806080838503121561437457600080fd5b61437e84846142a9565b946060939093013593505050565b60006020828403121561439e57600080fd5b5035919050565b80356001600160a01b0381168114612d2857600080fd5b60008060008060008061010087890312156143d657600080fd5b87601f8801126143e557600080fd5b6143ed614272565b80606089018a8111156143ff57600080fd5b895b8181101561442057614412816143a5565b845260209384019301614401565b50909750359550506080870135935060a0870135925061444260c088016143a5565b915061445060e088016143a5565b90509295509295509295565b60008060006060848603121561447157600080fd5b505081359360208301359350604090920135919050565b6000806000806080858703121561449e57600080fd5b5050823594602084013594506040840135936060013592509050565b6001600160a01b0391909116815260200190565b600080608083850312156144e157600080fd5b823591506144f284602085016142a9565b90509250929050565b60006020828403121561450d57600080fd5b611d98826143a5565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008282101561458957614589614561565b500390565b6000602082840312156145a057600080fd5b5051919050565b60006000198214156145bb576145bb614561565b5060010190565b600082198211156145d5576145d5614561565b500190565b60008160001904831182151516156145f4576145f4614561565b500290565b60008261461657634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601690820152756465763a20696e73756666696369656e742074696d6560501b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526006908201526512da5b1b195960d21b604082015260600190565b602080825260159082015274496e636f6e73697374656e74207175616e7469747960581b604082015260600190565b602080825260149082015273536c697070616765207363726577656420796f7560601b604082015260600190565b6001600160a01b03929092168252602082015260400190565b8060005b6003811015613b0257815184526020938401939091019060010161471c565b610100810161474a8287614718565b6147576060830186614718565b60c082019390935260e0015292915050565b60006020828403121561477b57600080fd5b815160ff81168114611d9857600080fd5b600181815b808511156147c75781600019048211156147ad576147ad614561565b808516156147ba57918102915b93841c9390800290614791565b509250929050565b6000826147de57506001610d0a565b816147eb57506000610d0a565b8160018114614801576002811461480b57614827565b6001915050610d0a565b60ff84111561481c5761481c614561565b50506001821b610d0a565b5060208310610133831016604e8410600b841016171561484a575081810a610d0a565b614854838361478c565b806000190482111561486857614868614561565b029392505050565b6000611d9883836147cf565b60e0810161488a8286614718565b6148976060830185614718565b8260c0830152949350505050565b6000602082840312156148b757600080fd5b8151611d98816142f9565b60005b838110156148dd5781810151838201526020016148c5565b83811115613b025750506000910152565b600082516149008184602087016148c2565b9190910192915050565b60208152600082518060208401526149298160408501602087016148c2565b601f01601f1916919091016040019291505056fea2646970667358221220406a9fc5f0c005fc8f81d0281a5af6ee338e435fc15e5dd07272311582cf83ac64736f6c634300080a0033a2646970667358221220871e5b5929f2188aaac72a8c3a1f938b4e3456e4a50173b420cc941552bcd13f64736f6c634300080a0033