Transactions
Token Transfers
Internal Transactions
Coin Balance History
Code
Read Contract
Write Contract
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
This contract has been verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- UniMigrator
- Optimization enabled
- true
- Compiler version
- v0.8.7+commit.e28d00a7
- Optimization runs
- 1
- EVM Version
- london
- Verified at
- 2026-04-04T13:03:55.902786Z
contracts/migrator/UniMigrator.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "../interfaces/ILiquidityGauge.sol";
import "../interfaces/IGUniRouter.sol";
import "../interfaces/IGUniFactory.sol";
import "../interfaces/IGUniPool.sol";
import "../interfaces/IUniswapPool.sol";
import "../interfaces/IUniswapPositionManager.sol";
import "../interfaces/IUniswapV3Router.sol";
/// @title UniMigrator
/// @author Angle Core Team
/// @notice Swaps G-UNI liquidity
contract UniMigrator {
using SafeERC20 for IERC20;
address public owner;
address private constant _AGEUR = 0x1a7e4e63778B4f12a199C062f3eFdD288afCBce8;
address private constant _USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
address private constant _WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
IGUniRouter private constant _GUNIROUTER = IGUniRouter(0x513E0a261af2D33B46F98b81FED547608fA2a03d);
IGUniFactory private constant _GUNIFACTORY = IGUniFactory(0xEA1aFf9dbFfD1580F6b81A3ad3589E66652dB7D9);
address private constant _USDCGAUGE = 0xEB7547a8a734b6fdDBB8Ce0C314a9E6485100a3C;
address private constant _ETHGAUGE = 0x3785Ce82be62a342052b9E5431e9D3a839cfB581;
address private constant _GOVERNOR = 0xdC4e6DFe07EFCa50a197DF15D9200883eF4Eb1c8;
address private constant _UNIUSDCPOOL = 0x7ED3F364668cd2b9449a8660974a26A092C64849;
address private constant _UNIETHPOOL = 0x9496D107a4b90c7d18c703e8685167f90ac273B0;
address private constant _GUNIUSDC = 0x2bD9F7974Bc0E4Cb19B8813F8Be6034F3E772add;
address private constant _GUNIETH = 0x26C2251801D2cfb5461751c984Dc3eAA358bdf0f;
address private constant _ETHNEWPOOL = 0x8dB1b906d47dFc1D84A87fc49bd0522e285b98b9;
IUniswapPositionManager private constant _UNI = IUniswapPositionManager(0xC36442b4a4522E871399CD717aBDD847Ab11FE88);
address private constant _UNIROUTER = 0xE592427A0AEce92De3Edee1F18E0157C05861564;
/// @notice Constructs a new CompSaver token
constructor() {
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner, "wrong caller");
_;
}
/// @notice Changes the minter address
/// @param owner_ Address of the new owner
function setOwner(address owner_) external onlyOwner {
require(owner_ != address(0), "0");
owner = owner_;
}
/// @return poolCreated The address of the pool created for the swap
function migratePool(
uint8 gaugeType,
uint256 amountAgEURMin,
uint256 amountTokenMin
) external onlyOwner returns (address poolCreated) {
address liquidityGauge;
address stakingToken;
uint160 sqrtPriceX96Existing;
address token;
if (gaugeType == 1) {
liquidityGauge = _USDCGAUGE;
stakingToken = _GUNIUSDC;
token = _USDC;
(sqrtPriceX96Existing, , , , , , ) = IUniswapV3Pool(_UNIUSDCPOOL).slot0();
} else {
liquidityGauge = _ETHGAUGE;
stakingToken = _GUNIETH;
token = _WETH;
(sqrtPriceX96Existing, , , , , , ) = IUniswapV3Pool(_UNIETHPOOL).slot0();
}
// Giving allowances: we need it to add and remove liquidity
IERC20(token).safeApprove(address(_GUNIROUTER), type(uint256).max);
IERC20(stakingToken).safeApprove(address(_GUNIROUTER), type(uint256).max);
IERC20(_AGEUR).safeIncreaseAllowance(
address(_GUNIROUTER),
type(uint256).max - IERC20(_AGEUR).allowance(address(this), address(_GUNIROUTER))
);
// Computing amount to recover
uint256 amountRecovered = IERC20(stakingToken).balanceOf(liquidityGauge);
ILiquidityGauge(liquidityGauge).accept_transfer_ownership();
ILiquidityGauge(liquidityGauge).recover_erc20(stakingToken, address(this), amountRecovered);
uint256 amountAgEUR;
uint256 amountToken;
// Removing all liquidity
(amountAgEUR, amountToken, ) = _GUNIROUTER.removeLiquidity(
stakingToken,
amountRecovered,
amountAgEURMin,
amountTokenMin,
address(this)
);
if (gaugeType == 1) {
// In this case, it's _USDC: we need to create the pool
_UNI.createAndInitializePoolIfNecessary(_AGEUR, _USDC, 100, sqrtPriceX96Existing);
poolCreated = _GUNIFACTORY.createManagedPool(_AGEUR, _USDC, 100, 0, -276320, -273470);
} else {
// In this other case it's wETH and the pool already exists
poolCreated = _GUNIFACTORY.createManagedPool(_AGEUR, _WETH, 500, 0, -96120, -69000);
// We need to put the pool at the right price, we do this assuming UniV2 maths and assuming the 5bp fees
// can be neglected
(uint256 newPoolPrice, , , , , , ) = IUniswapV3Pool(_ETHNEWPOOL).slot0();
uint256 oldPoolSpotPrice = (uint256(sqrtPriceX96Existing) * uint256(sqrtPriceX96Existing) * 1e18) >>
(96 * 2);
newPoolPrice = (uint256(newPoolPrice) * uint256(newPoolPrice) * 1e18) >> (96 * 2);
uint256 xBalance = IERC20(_AGEUR).balanceOf(_ETHNEWPOOL);
uint256 yBalance = IERC20(_WETH).balanceOf(_ETHNEWPOOL);
// In this case price ETH/agEUR is lower in the new pool or the price of agEUR per ETH is higher in the new pool:
// we need to remove agEUR and increase ETH and as such buy agEUR
if (oldPoolSpotPrice > newPoolPrice) {
uint256 amountOut = xBalance - _sqrt((xBalance * yBalance) / oldPoolSpotPrice) * 10**9;
IERC20(_WETH).safeApprove(_UNIROUTER, type(uint256).max);
uint256 amountIn = IUniswapV3Router(_UNIROUTER).exactOutputSingle(
ExactOutputSingleParams(
_WETH,
_AGEUR,
500,
address(this),
block.timestamp,
amountOut,
type(uint256).max,
0
)
);
amountAgEUR += amountOut;
amountToken -= amountIn;
} else {
// Need to sell agEUR to increase agEUR in the pool: computing the optimal movement as if in UniV2 and assuming no fees
uint256 amountIn = _sqrt((xBalance * yBalance) / oldPoolSpotPrice) * 10**9 - xBalance;
IERC20(_AGEUR).safeApprove(_UNIROUTER, amountIn);
uint256 amountOut = IUniswapV3Router(_UNIROUTER).exactInputSingle(
ExactInputSingleParams(_AGEUR, _WETH, 500, address(this), block.timestamp, amountIn, 0, 0)
);
amountAgEUR -= amountIn;
amountToken += amountOut;
}
(newPoolPrice, , , , , , ) = IUniswapV3Pool(_ETHNEWPOOL).slot0();
// Scale of the sqrtPrice is 10**27: we're checking if we got close enough (first 9 figures should be fine)
if (newPoolPrice > sqrtPriceX96Existing) {
require(newPoolPrice - sqrtPriceX96Existing < 1 ether);
} else require(sqrtPriceX96Existing - newPoolPrice < 1 ether);
}
// Transfering ownership of the new pool to the guardian address
IGUniPool(poolCreated).transferOwnership(0x0C2553e4B9dFA9f83b1A6D3EAB96c4bAaB42d430);
// Adding liquidity
_GUNIROUTER.addLiquidity(poolCreated, amountAgEUR, amountToken, amountAgEURMin, amountTokenMin, liquidityGauge);
uint256 newGUNIBalance = IERC20(poolCreated).balanceOf(liquidityGauge);
ILiquidityGauge(liquidityGauge).set_staking_token_and_scaling_factor(
poolCreated,
(amountRecovered * 10**18) / newGUNIBalance
);
ILiquidityGauge(liquidityGauge).commit_transfer_ownership(_GOVERNOR);
IERC20(token).safeTransfer(_GOVERNOR, IERC20(token).balanceOf(address(this)));
IERC20(_AGEUR).safeTransfer(_GOVERNOR, IERC20(_AGEUR).balanceOf(address(this)));
}
function _sqrt(uint256 x) internal pure returns (uint256 y) {
uint256 z = (x + 1) / 2;
y = x;
while (z < y) {
y = z;
z = (x / z + z) / 2;
}
}
/// @notice Executes a function
/// @param to Address to sent the value to
/// @param value Value to be sent
/// @param data Call function data
function execute(
address to,
uint256 value,
bytes calldata data
) external onlyOwner returns (bool, bytes memory) {
//solhint-disable-next-line
(bool success, bytes memory result) = to.call{ value: value }(data);
return (success, result);
}
}
/IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/IUniswapPositionManager.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.7;
interface IUniswapPositionManager {
function multicall(bytes[] calldata data) external payable returns (bytes[] memory results);
function createAndInitializePoolIfNecessary(
address token0,
address token1,
uint24 fee,
uint160 sqrtPriceX96
) external payable returns (address pool);
function burn(uint256 tokenId) external;
function positions(uint256 tokenId)
external
view
returns (
uint96 nonce,
address operator,
address token0,
address token1,
uint24 fee,
int24 tickLower,
int24 tickUpper,
uint128 liquidity,
uint256 feeGrowthInside0LastX128,
uint256 feeGrowthInside1LastX128,
uint128 tokensOwed0,
uint128 tokensOwed1
);
}
/IGUniPool.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.7;
interface IGUniPool {
function transferOwnership(address newOwner) external;
function executiveRebalance(
int24 newLowerTick,
int24 newUpperTick,
uint160 swapThresholdPrice,
uint256 swapAmountBPS,
bool zeroForOne
) external;
}
/IUniswapV3Router.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.7;
struct ExactInputSingleParams {
address tokenIn;
address tokenOut;
uint24 fee;
address recipient;
uint256 deadline;
uint256 amountIn;
uint256 amountOutMinimum;
uint160 sqrtPriceLimitX96;
}
struct ExactOutputSingleParams {
address tokenIn;
address tokenOut;
uint24 fee;
address recipient;
uint256 deadline;
uint256 amountOut;
uint256 amountInMaximum;
uint160 sqrtPriceLimitX96;
}
interface IUniswapV3Router {
/// @notice Swaps `amountIn` of one token for as much as possible of another token
/// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata
/// @return amountOut The amount of the received token
function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);
/// @notice Swaps as little as possible of one token for `amountOut` of another token
/// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata
/// @return amountIn The amount of the input token
function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn);
}
/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");
}
}
}
/ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
unchecked {
_approve(sender, _msgSender(), currentAllowance - amount);
}
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `sender` to `recipient`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
uint256 senderBalance = _balances[sender];
require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[sender] = senderBalance - amount;
}
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
_afterTokenTransfer(sender, recipient, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
}
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
/IUniswapPool.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.7;
interface IUniswapV3Pool {
/// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas
/// when accessed externally.
/// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value
/// tick The current tick of the pool, i.e. according to the last tick transition that was run.
/// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick
/// boundary.
/// observationIndex The index of the last oracle observation that was written,
/// observationCardinality The current maximum number of observations stored in the pool,
/// observationCardinalityNext The next maximum number of observations, to be updated when the observation.
/// feeProtocol The protocol fee for both tokens of the pool.
/// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0
/// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.
/// unlocked Whether the pool is currently locked to reentrancy
function slot0()
external
view
returns (
uint160 sqrtPriceX96,
int24 tick,
uint16 observationIndex,
uint16 observationCardinality,
uint16 observationCardinalityNext,
uint8 feeProtocol,
bool unlocked
);
/// @notice Increase the maximum number of price and liquidity observations that this pool will store
/// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to
/// the input observationCardinalityNext.
/// @param observationCardinalityNext The desired minimum number of observations for the pool to store
function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;
/// @notice Swap token0 for token1, or token1 for token0
/// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback
/// @param recipient The address to receive the output of the swap
/// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0
/// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)
/// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this
/// value after the swap. If one for zero, the price cannot be greater than this value after the swap
/// @param data Any data to be passed through to the callback
/// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive
/// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive
function swap(
address recipient,
bool zeroForOne,
int256 amountSpecified,
uint160 sqrtPriceLimitX96,
bytes calldata data
) external returns (int256 amount0, int256 amount1);
}
/IGUniFactory.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.7;
interface IGUniFactory {
/// @notice createManagedPool creates a new instance of a G-UNI token on a specified
/// UniswapV3Pool. The msg.sender is the initial manager of the pool and will
/// forever be associated with the G-UNI pool as it's `deployer`
/// @param tokenA one of the tokens in the uniswap pair
/// @param tokenB the other token in the uniswap pair
/// @param uniFee fee tier of the uniswap pair
/// @param managerFee proportion of earned fees that go to pool manager in Basis Points
/// @param lowerTick initial lower bound of the Uniswap V3 position
/// @param upperTick initial upper bound of the Uniswap V3 position
/// @return pool the address of the newly created G-UNI pool (proxy)
function createManagedPool(
address tokenA,
address tokenB,
uint24 uniFee,
uint16 managerFee,
int24 lowerTick,
int24 upperTick
) external returns (address pool);
}
/Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)
pragma solidity ^0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(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);
}
}
}
}
/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);
}
/ILiquidityGauge.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.7;
interface ILiquidityGauge {
// solhint-disable-next-line
function staking_token() external returns (address stakingToken);
// solhint-disable-next-line
function set_staking_token_and_scaling_factor(address token, uint256 value) external;
// solhint-disable-next-line
function recover_erc20(
address token,
address addr,
uint256 amount
) external;
// solhint-disable-next-line
function commit_transfer_ownership(address addr) external;
// solhint-disable-next-line
function accept_transfer_ownership() external;
// solhint-disable-next-line
function deposit_reward_token(address _rewardToken, uint256 _amount) external;
function deposit(
uint256 _value,
address _addr,
// solhint-disable-next-line
bool _claim_rewards
) external;
// solhint-disable-next-line
function claim_rewards(address _addr) external;
// solhint-disable-next-line
function claim_rewards(address _addr, address _receiver) external;
}
/IGUniRouter.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.7;
interface IGUniRouter {
/// @notice removeLiquidity removes liquidity from a G-UNI pool and burns G-UNI LP tokens
/// @param burnAmount The number of G-UNI tokens to burn
/// @param amount0Min Minimum amount of token0 received after burn (slippage protection)
/// @param amount1Min Minimum amount of token1 received after burn (slippage protection)
/// @param receiver The account to receive the underlying amounts of token0 and token1
/// @return amount0 actual amount of token0 transferred to receiver for burning `burnAmount`
/// @return amount1 actual amount of token1 transferred to receiver for burning `burnAmount`
/// @return liquidityBurned amount of liquidity removed from the underlying Uniswap V3 position
function removeLiquidity(
address pool,
uint256 burnAmount,
uint256 amount0Min,
uint256 amount1Min,
address receiver
)
external
returns (
uint256 amount0,
uint256 amount1,
uint128 liquidityBurned
);
/// @notice addLiquidity adds liquidity to G-UNI pool of interest (mints G-UNI LP tokens)
/// @param pool address of G-UNI pool to add liquidity to
/// @param amount0Max the maximum amount of token0 msg.sender willing to input
/// @param amount1Max the maximum amount of token1 msg.sender willing to input
/// @param amount0Min the minimum amount of token0 actually input (slippage protection)
/// @param amount1Min the minimum amount of token1 actually input (slippage protection)
/// @param receiver account to receive minted G-UNI tokens
/// @return amount0 amount of token0 transferred from msg.sender to mint `mintAmount`
/// @return amount1 amount of token1 transferred from msg.sender to mint `mintAmount`
/// @return mintAmount amount of G-UNI tokens minted and transferred to `receiver`
// solhint-disable-next-line function-max-lines
function addLiquidity(
address pool,
uint256 amount0Max,
uint256 amount1Max,
uint256 amount0Min,
uint256 amount1Min,
address receiver
)
external
returns (
uint256 amount0,
uint256 amount1,
uint256 mintAmount
);
}
/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
{"remappings":[],"optimizer":{"runs":1,"enabled":true},"metadata":{"useLiteralContent":true,"bytecodeHash":"ipfs"},"libraries":{},"evmVersion":"london","compilationTarget":{"contracts/migrator/UniMigrator.sol":"UniMigrator"}}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"},{"type":"bytes","name":"","internalType":"bytes"}],"name":"execute","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"},{"type":"bytes","name":"data","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"address","name":"poolCreated","internalType":"address"}],"name":"migratePool","inputs":[{"type":"uint8","name":"gaugeType","internalType":"uint8"},{"type":"uint256","name":"amountAgEURMin","internalType":"uint256"},{"type":"uint256","name":"amountTokenMin","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setOwner","inputs":[{"type":"address","name":"owner_","internalType":"address"}]}]
Contract Creation Code
0x608060405234801561001057600080fd5b50600080546001600160a01b03191633179055611d22806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806313af4035146100515780638da5cb5b14610066578063b61d27f61461008f578063e7bdc459146100b0575b600080fd5b61006461005f366004611818565b6100c3565b005b600054610079906001600160a01b031681565b6040516100869190611aa3565b60405180910390f35b6100a261009d366004611852565b610152565b604051610086929190611b2f565b6100796100be366004611a16565b6101f0565b6000546001600160a01b031633146100f65760405162461bcd60e51b81526004016100ed90611b5d565b60405180910390fd5b6001600160a01b0381166101305760405162461bcd60e51b81526020600482015260016024820152600360fc1b60448201526064016100ed565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080546060906001600160a01b031633146101805760405162461bcd60e51b81526004016100ed90611b5d565b600080876001600160a01b031687878760405161019e929190611a77565b60006040518083038185875af1925050503d80600081146101db576040519150601f19603f3d011682016040523d82523d6000602084013e6101e0565b606091505b5090999098509650505050505050565b600080546001600160a01b0316331461021b5760405162461bcd60e51b81526004016100ed90611b5d565b6000806000808760ff16600114156103065773eb7547a8a734b6fddbb8ce0c314a9e6485100a3c9350732bd9f7974bc0e4cb19b8813f8be6034f3e772add925073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489050737ed3f364668cd2b9449a8660974a26a092c648496001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b1580156102bf57600080fd5b505afa1580156102d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f791906118f5565b509496506103da945050505050565b733785ce82be62a342052b9e5431e9d3a839cfb58193507326c2251801d2cfb5461751c984dc3eaa358bdf0f925073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29050739496d107a4b90c7d18c703e8685167f90ac273b06001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561039857600080fd5b505afa1580156103ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d091906118f5565b5094965050505050505b6104046001600160a01b03821673513e0a261af2d33b46f98b81fed547608fa2a03d60001961132d565b61042e6001600160a01b03841673513e0a261af2d33b46f98b81fed547608fa2a03d60001961132d565b604051636eb1769f60e11b81526104ed9073513e0a261af2d33b46f98b81fed547608fa2a03d90600080516020611ccd8339815191529063dd62ed3e9061047b9030908590600401611ab7565b60206040518083038186803b15801561049357600080fd5b505afa1580156104a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104cb9190611989565b6104d790600019611c4c565b600080516020611ccd833981519152919061147b565b6040516370a0823160e01b81526000906001600160a01b038516906370a082319061051c908890600401611aa3565b60206040518083038186803b15801561053457600080fd5b505afa158015610548573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061056c9190611989565b9050846001600160a01b031663e5ea47b86040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156105a957600080fd5b505af11580156105bd573d6000803e3d6000fd5b505060405163ddb9864960e01b81526001600160a01b038781166004830152306024830152604482018590528816925063ddb986499150606401600060405180830381600087803b15801561061157600080fd5b505af1158015610625573d6000803e3d6000fd5b5050604051632cfc215960e11b81526001600160a01b038716600482015260248101849052604481018b9052606481018a90523060848201526000925082915073513e0a261af2d33b46f98b81fed547608fa2a03d906359f842b29060a401606060405180830381600087803b15801561069e57600080fd5b505af11580156106b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d691906119a2565b509092509050600160ff8c161415610872576040516309f56ab160e11b8152600080516020611ccd833981519152600482015273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4860248201526064604482018190526001600160a01b0387169082015273c36442b4a4522e871399cd717abdd847ab11fe88906313ead56290608401602060405180830381600087803b15801561077357600080fd5b505af1158015610787573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ab9190611835565b506040516320f182b160e21b815273ea1aff9dbffd1580f6b81a3ad3589e66652db7d9906383c60ac49061081990600080516020611ccd8339815191529073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48906064906000906204375f199062042c3d1990600401611ad1565b602060405180830381600087803b15801561083357600080fd5b505af1158015610847573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086b9190611835565b9750610f33565b6040516320f182b160e21b815273ea1aff9dbffd1580f6b81a3ad3589e66652db7d9906383c60ac4906108e090600080516020611ccd8339815191529073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2906101f49060009062017777199062010d871990600401611ad1565b602060405180830381600087803b1580156108fa57600080fd5b505af115801561090e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109329190611835565b97506000738db1b906d47dfc1d84a87fc49bd0522e285b98b96001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561098357600080fd5b505afa158015610997573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109bb91906118f5565b5050505050506001600160a01b03169050600060c0876001600160a01b0316886001600160a01b03166109ee9190611c2d565b610a0090670de0b6b3a7640000611c2d565b901c905060c0610a108380611c2d565b610a2290670de0b6b3a7640000611c2d565b6040516370a0823160e01b8152911c9250600090600080516020611ccd833981519152906370a0823190610a6e90738db1b906d47dfc1d84a87fc49bd0522e285b98b990600401611aa3565b60206040518083038186803b158015610a8657600080fd5b505afa158015610a9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abe9190611989565b6040516370a0823160e01b815290915060009073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2906370a0823190610b0f90738db1b906d47dfc1d84a87fc49bd0522e285b98b990600401611aa3565b60206040518083038186803b158015610b2757600080fd5b505afa158015610b3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5f9190611989565b905083831115610ce0576000610b8884610b798486611c2d565b610b839190611c0b565b61152d565b610b9690633b9aca00611c2d565b610ba09084611c4c565b9050610bd773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273e592427a0aece92de3edee1f18e0157c0586156460001961132d565b604080516101008101825273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28152600080516020611ccd83398151915260208201526101f48183015230606082015242608082015260a0810183905260001960c0820152600060e082018190529151631b67c43360e31b815273e592427a0aece92de3edee1f18e0157c058615649163db3e219891610c6d9190600401611b83565b602060405180830381600087803b158015610c8757600080fd5b505af1158015610c9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cbf9190611989565b9050610ccb8289611bf3565b9750610cd78188611c4c565b96505050610e3c565b600082610cf185610b798584611c2d565b610cff90633b9aca00611c2d565b610d099190611c4c565b9050610d38600080516020611ccd83398151915273e592427a0aece92de3edee1f18e0157c058615648361132d565b6040805161010081018252600080516020611ccd833981519152815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc260208201526101f48183015230606082015242608082015260a08101839052600060c0820181905260e08201819052915163414bf38960e01b815273e592427a0aece92de3edee1f18e0157c058615649163414bf38991610dcd9190600401611b83565b602060405180830381600087803b158015610de757600080fd5b505af1158015610dfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1f9190611989565b9050610e2b8289611c4c565b9750610e378188611bf3565b965050505b738db1b906d47dfc1d84a87fc49bd0522e285b98b96001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b158015610e8957600080fd5b505afa158015610e9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec191906118f5565b50506001600160a01b039485169850505050508916841115610f0857670de0b6b3a7640000610ef96001600160a01b038b1686611c4c565b10610f0357600080fd5b610f2e565b670de0b6b3a7640000610f24856001600160a01b038c16611c4c565b10610f2e57600080fd5b505050505b60405163f2fde38b60e01b81526001600160a01b0389169063f2fde38b90610f7390730c2553e4b9dfa9f83b1a6d3eab96c4baab42d43090600401611aa3565b600060405180830381600087803b158015610f8d57600080fd5b505af1158015610fa1573d6000803e3d6000fd5b505060405163fb9f478960e01b81526001600160a01b038b811660048301526024820186905260448201859052606482018e9052608482018d90528a1660a482015273513e0a261af2d33b46f98b81fed547608fa2a03d925063fb9f4789915060c401606060405180830381600087803b15801561101e57600080fd5b505af1158015611032573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105691906119e8565b50506040516370a0823160e01b8152600091506001600160a01b038a16906370a0823190611088908b90600401611aa3565b60206040518083038186803b1580156110a057600080fd5b505afa1580156110b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d89190611989565b90506001600160a01b038816638d2c4d848a836110fd88670de0b6b3a7640000611c2d565b6111079190611c0b565b6040518363ffffffff1660e01b8152600401611124929190611b16565b600060405180830381600087803b15801561113e57600080fd5b505af1158015611152573d6000803e3d6000fd5b50506040516301ad106960e61b81526001600160a01b038b169250636b441a4091506111969073dc4e6dfe07efca50a197df15d9200883ef4eb1c890600401611aa3565b600060405180830381600087803b1580156111b057600080fd5b505af11580156111c4573d6000803e3d6000fd5b5050505061126d73dc4e6dfe07efca50a197df15d9200883ef4eb1c8866001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161120c9190611aa3565b60206040518083038186803b15801561122457600080fd5b505afa158015611238573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125c9190611989565b6001600160a01b0388169190611586565b6040516370a0823160e01b815261131e9073dc4e6dfe07efca50a197df15d9200883ef4eb1c890600080516020611ccd833981519152906370a08231906112b8903090600401611aa3565b60206040518083038186803b1580156112d057600080fd5b505afa1580156112e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113089190611989565b600080516020611ccd8339815191529190611586565b50505050505050509392505050565b8015806113b55750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906113639030908690600401611ab7565b60206040518083038186803b15801561137b57600080fd5b505afa15801561138f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b39190611989565b155b6114205760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b60648201526084016100ed565b6114768363095ea7b360e01b848460405160240161143f929190611b16565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526115a5565b505050565b600081846001600160a01b031663dd62ed3e30866040518363ffffffff1660e01b81526004016114ac929190611ab7565b60206040518083038186803b1580156114c457600080fd5b505afa1580156114d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114fc9190611989565b6115069190611bf3565b90506115278463095ea7b360e01b858460405160240161143f929190611b16565b50505050565b600080600261153d846001611bf3565b6115479190611c0b565b90508291505b81811015611580579050806002816115658186611c0b565b61156f9190611bf3565b6115799190611c0b565b905061154d565b50919050565b6114768363a9059cbb60e01b848460405160240161143f929190611b16565b60006115fa826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166116779092919063ffffffff16565b805190915015611476578080602001905181019061161891906118da565b6114765760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016100ed565b60606116868484600085611690565b90505b9392505050565b6060824710156116f15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016100ed565b843b61173f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016100ed565b600080866001600160a01b0316858760405161175b9190611a87565b60006040518083038185875af1925050503d8060008114611798576040519150601f19603f3d011682016040523d82523d6000602084013e61179d565b606091505b50915091506117ad8282866117b8565b979650505050505050565b606083156117c7575081611689565b8251156117d75782518084602001fd5b8160405162461bcd60e51b81526004016100ed9190611b4a565b8051801515811461180157600080fd5b919050565b805161ffff8116811461180157600080fd5b60006020828403121561182a57600080fd5b813561168981611ca5565b60006020828403121561184757600080fd5b815161168981611ca5565b6000806000806060858703121561186857600080fd5b843561187381611ca5565b93506020850135925060408501356001600160401b038082111561189657600080fd5b818701915087601f8301126118aa57600080fd5b8135818111156118b957600080fd5b8860208285010111156118cb57600080fd5b95989497505060200194505050565b6000602082840312156118ec57600080fd5b611689826117f1565b600080600080600080600060e0888a03121561191057600080fd5b875161191b81611ca5565b8097505060208801518060020b811461193357600080fd5b955061194160408901611806565b945061194f60608901611806565b935061195d60808901611806565b925060a088015161196d81611cbd565b915061197b60c089016117f1565b905092959891949750929550565b60006020828403121561199b57600080fd5b5051919050565b6000806000606084860312156119b757600080fd5b83516020850151604086015191945092506001600160801b03811681146119dd57600080fd5b809150509250925092565b6000806000606084860312156119fd57600080fd5b8351925060208401519150604084015190509250925092565b600080600060608486031215611a2b57600080fd5b8335611a3681611cbd565b95602085013595506040909401359392505050565b60008151808452611a63816020860160208601611c63565b601f01601f19169290920160200192915050565b8183823760009101908152919050565b60008251611a99818460208701611c63565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03968716815294909516602085015262ffffff92909216604084015261ffff166060830152600290810b60808301529190910b60a082015260c00190565b6001600160a01b03929092168252602082015260400190565b82151581526040602082015260006116866040830184611a4b565b6020815260006116896020830184611a4b565b6020808252600c908201526b3bb937b7339031b0b63632b960a11b604082015260600190565b6101008101611bed828480516001600160a01b03908116835260208083015182169084015260408083015162ffffff16908401526060808301518216908401526080808301519084015260a0828101519084015260c0808301519084015260e09182015116910152565b92915050565b60008219821115611c0657611c06611c8f565b500190565b600082611c2857634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611c4757611c47611c8f565b500290565b600082821015611c5e57611c5e611c8f565b500390565b60005b83811015611c7e578181015183820152602001611c66565b838111156115275750506000910152565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114611cba57600080fd5b50565b60ff81168114611cba57600080fdfe0000000000000000000000001a7e4e63778b4f12a199c062f3efdd288afcbce8a2646970667358221220d5bbc53dbe974f872263443e87bfd3e6b5b091f40cd13d4cce951c9651d541a964736f6c63430008070033
Deployed ByteCode
0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806313af4035146100515780638da5cb5b14610066578063b61d27f61461008f578063e7bdc459146100b0575b600080fd5b61006461005f366004611818565b6100c3565b005b600054610079906001600160a01b031681565b6040516100869190611aa3565b60405180910390f35b6100a261009d366004611852565b610152565b604051610086929190611b2f565b6100796100be366004611a16565b6101f0565b6000546001600160a01b031633146100f65760405162461bcd60e51b81526004016100ed90611b5d565b60405180910390fd5b6001600160a01b0381166101305760405162461bcd60e51b81526020600482015260016024820152600360fc1b60448201526064016100ed565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080546060906001600160a01b031633146101805760405162461bcd60e51b81526004016100ed90611b5d565b600080876001600160a01b031687878760405161019e929190611a77565b60006040518083038185875af1925050503d80600081146101db576040519150601f19603f3d011682016040523d82523d6000602084013e6101e0565b606091505b5090999098509650505050505050565b600080546001600160a01b0316331461021b5760405162461bcd60e51b81526004016100ed90611b5d565b6000806000808760ff16600114156103065773eb7547a8a734b6fddbb8ce0c314a9e6485100a3c9350732bd9f7974bc0e4cb19b8813f8be6034f3e772add925073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489050737ed3f364668cd2b9449a8660974a26a092c648496001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b1580156102bf57600080fd5b505afa1580156102d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f791906118f5565b509496506103da945050505050565b733785ce82be62a342052b9e5431e9d3a839cfb58193507326c2251801d2cfb5461751c984dc3eaa358bdf0f925073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29050739496d107a4b90c7d18c703e8685167f90ac273b06001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561039857600080fd5b505afa1580156103ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d091906118f5565b5094965050505050505b6104046001600160a01b03821673513e0a261af2d33b46f98b81fed547608fa2a03d60001961132d565b61042e6001600160a01b03841673513e0a261af2d33b46f98b81fed547608fa2a03d60001961132d565b604051636eb1769f60e11b81526104ed9073513e0a261af2d33b46f98b81fed547608fa2a03d90600080516020611ccd8339815191529063dd62ed3e9061047b9030908590600401611ab7565b60206040518083038186803b15801561049357600080fd5b505afa1580156104a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104cb9190611989565b6104d790600019611c4c565b600080516020611ccd833981519152919061147b565b6040516370a0823160e01b81526000906001600160a01b038516906370a082319061051c908890600401611aa3565b60206040518083038186803b15801561053457600080fd5b505afa158015610548573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061056c9190611989565b9050846001600160a01b031663e5ea47b86040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156105a957600080fd5b505af11580156105bd573d6000803e3d6000fd5b505060405163ddb9864960e01b81526001600160a01b038781166004830152306024830152604482018590528816925063ddb986499150606401600060405180830381600087803b15801561061157600080fd5b505af1158015610625573d6000803e3d6000fd5b5050604051632cfc215960e11b81526001600160a01b038716600482015260248101849052604481018b9052606481018a90523060848201526000925082915073513e0a261af2d33b46f98b81fed547608fa2a03d906359f842b29060a401606060405180830381600087803b15801561069e57600080fd5b505af11580156106b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d691906119a2565b509092509050600160ff8c161415610872576040516309f56ab160e11b8152600080516020611ccd833981519152600482015273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4860248201526064604482018190526001600160a01b0387169082015273c36442b4a4522e871399cd717abdd847ab11fe88906313ead56290608401602060405180830381600087803b15801561077357600080fd5b505af1158015610787573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ab9190611835565b506040516320f182b160e21b815273ea1aff9dbffd1580f6b81a3ad3589e66652db7d9906383c60ac49061081990600080516020611ccd8339815191529073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48906064906000906204375f199062042c3d1990600401611ad1565b602060405180830381600087803b15801561083357600080fd5b505af1158015610847573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086b9190611835565b9750610f33565b6040516320f182b160e21b815273ea1aff9dbffd1580f6b81a3ad3589e66652db7d9906383c60ac4906108e090600080516020611ccd8339815191529073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2906101f49060009062017777199062010d871990600401611ad1565b602060405180830381600087803b1580156108fa57600080fd5b505af115801561090e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109329190611835565b97506000738db1b906d47dfc1d84a87fc49bd0522e285b98b96001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561098357600080fd5b505afa158015610997573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109bb91906118f5565b5050505050506001600160a01b03169050600060c0876001600160a01b0316886001600160a01b03166109ee9190611c2d565b610a0090670de0b6b3a7640000611c2d565b901c905060c0610a108380611c2d565b610a2290670de0b6b3a7640000611c2d565b6040516370a0823160e01b8152911c9250600090600080516020611ccd833981519152906370a0823190610a6e90738db1b906d47dfc1d84a87fc49bd0522e285b98b990600401611aa3565b60206040518083038186803b158015610a8657600080fd5b505afa158015610a9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abe9190611989565b6040516370a0823160e01b815290915060009073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2906370a0823190610b0f90738db1b906d47dfc1d84a87fc49bd0522e285b98b990600401611aa3565b60206040518083038186803b158015610b2757600080fd5b505afa158015610b3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5f9190611989565b905083831115610ce0576000610b8884610b798486611c2d565b610b839190611c0b565b61152d565b610b9690633b9aca00611c2d565b610ba09084611c4c565b9050610bd773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273e592427a0aece92de3edee1f18e0157c0586156460001961132d565b604080516101008101825273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28152600080516020611ccd83398151915260208201526101f48183015230606082015242608082015260a0810183905260001960c0820152600060e082018190529151631b67c43360e31b815273e592427a0aece92de3edee1f18e0157c058615649163db3e219891610c6d9190600401611b83565b602060405180830381600087803b158015610c8757600080fd5b505af1158015610c9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cbf9190611989565b9050610ccb8289611bf3565b9750610cd78188611c4c565b96505050610e3c565b600082610cf185610b798584611c2d565b610cff90633b9aca00611c2d565b610d099190611c4c565b9050610d38600080516020611ccd83398151915273e592427a0aece92de3edee1f18e0157c058615648361132d565b6040805161010081018252600080516020611ccd833981519152815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc260208201526101f48183015230606082015242608082015260a08101839052600060c0820181905260e08201819052915163414bf38960e01b815273e592427a0aece92de3edee1f18e0157c058615649163414bf38991610dcd9190600401611b83565b602060405180830381600087803b158015610de757600080fd5b505af1158015610dfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1f9190611989565b9050610e2b8289611c4c565b9750610e378188611bf3565b965050505b738db1b906d47dfc1d84a87fc49bd0522e285b98b96001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b158015610e8957600080fd5b505afa158015610e9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec191906118f5565b50506001600160a01b039485169850505050508916841115610f0857670de0b6b3a7640000610ef96001600160a01b038b1686611c4c565b10610f0357600080fd5b610f2e565b670de0b6b3a7640000610f24856001600160a01b038c16611c4c565b10610f2e57600080fd5b505050505b60405163f2fde38b60e01b81526001600160a01b0389169063f2fde38b90610f7390730c2553e4b9dfa9f83b1a6d3eab96c4baab42d43090600401611aa3565b600060405180830381600087803b158015610f8d57600080fd5b505af1158015610fa1573d6000803e3d6000fd5b505060405163fb9f478960e01b81526001600160a01b038b811660048301526024820186905260448201859052606482018e9052608482018d90528a1660a482015273513e0a261af2d33b46f98b81fed547608fa2a03d925063fb9f4789915060c401606060405180830381600087803b15801561101e57600080fd5b505af1158015611032573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105691906119e8565b50506040516370a0823160e01b8152600091506001600160a01b038a16906370a0823190611088908b90600401611aa3565b60206040518083038186803b1580156110a057600080fd5b505afa1580156110b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d89190611989565b90506001600160a01b038816638d2c4d848a836110fd88670de0b6b3a7640000611c2d565b6111079190611c0b565b6040518363ffffffff1660e01b8152600401611124929190611b16565b600060405180830381600087803b15801561113e57600080fd5b505af1158015611152573d6000803e3d6000fd5b50506040516301ad106960e61b81526001600160a01b038b169250636b441a4091506111969073dc4e6dfe07efca50a197df15d9200883ef4eb1c890600401611aa3565b600060405180830381600087803b1580156111b057600080fd5b505af11580156111c4573d6000803e3d6000fd5b5050505061126d73dc4e6dfe07efca50a197df15d9200883ef4eb1c8866001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161120c9190611aa3565b60206040518083038186803b15801561122457600080fd5b505afa158015611238573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125c9190611989565b6001600160a01b0388169190611586565b6040516370a0823160e01b815261131e9073dc4e6dfe07efca50a197df15d9200883ef4eb1c890600080516020611ccd833981519152906370a08231906112b8903090600401611aa3565b60206040518083038186803b1580156112d057600080fd5b505afa1580156112e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113089190611989565b600080516020611ccd8339815191529190611586565b50505050505050509392505050565b8015806113b55750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906113639030908690600401611ab7565b60206040518083038186803b15801561137b57600080fd5b505afa15801561138f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b39190611989565b155b6114205760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b60648201526084016100ed565b6114768363095ea7b360e01b848460405160240161143f929190611b16565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526115a5565b505050565b600081846001600160a01b031663dd62ed3e30866040518363ffffffff1660e01b81526004016114ac929190611ab7565b60206040518083038186803b1580156114c457600080fd5b505afa1580156114d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114fc9190611989565b6115069190611bf3565b90506115278463095ea7b360e01b858460405160240161143f929190611b16565b50505050565b600080600261153d846001611bf3565b6115479190611c0b565b90508291505b81811015611580579050806002816115658186611c0b565b61156f9190611bf3565b6115799190611c0b565b905061154d565b50919050565b6114768363a9059cbb60e01b848460405160240161143f929190611b16565b60006115fa826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166116779092919063ffffffff16565b805190915015611476578080602001905181019061161891906118da565b6114765760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016100ed565b60606116868484600085611690565b90505b9392505050565b6060824710156116f15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016100ed565b843b61173f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016100ed565b600080866001600160a01b0316858760405161175b9190611a87565b60006040518083038185875af1925050503d8060008114611798576040519150601f19603f3d011682016040523d82523d6000602084013e61179d565b606091505b50915091506117ad8282866117b8565b979650505050505050565b606083156117c7575081611689565b8251156117d75782518084602001fd5b8160405162461bcd60e51b81526004016100ed9190611b4a565b8051801515811461180157600080fd5b919050565b805161ffff8116811461180157600080fd5b60006020828403121561182a57600080fd5b813561168981611ca5565b60006020828403121561184757600080fd5b815161168981611ca5565b6000806000806060858703121561186857600080fd5b843561187381611ca5565b93506020850135925060408501356001600160401b038082111561189657600080fd5b818701915087601f8301126118aa57600080fd5b8135818111156118b957600080fd5b8860208285010111156118cb57600080fd5b95989497505060200194505050565b6000602082840312156118ec57600080fd5b611689826117f1565b600080600080600080600060e0888a03121561191057600080fd5b875161191b81611ca5565b8097505060208801518060020b811461193357600080fd5b955061194160408901611806565b945061194f60608901611806565b935061195d60808901611806565b925060a088015161196d81611cbd565b915061197b60c089016117f1565b905092959891949750929550565b60006020828403121561199b57600080fd5b5051919050565b6000806000606084860312156119b757600080fd5b83516020850151604086015191945092506001600160801b03811681146119dd57600080fd5b809150509250925092565b6000806000606084860312156119fd57600080fd5b8351925060208401519150604084015190509250925092565b600080600060608486031215611a2b57600080fd5b8335611a3681611cbd565b95602085013595506040909401359392505050565b60008151808452611a63816020860160208601611c63565b601f01601f19169290920160200192915050565b8183823760009101908152919050565b60008251611a99818460208701611c63565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03968716815294909516602085015262ffffff92909216604084015261ffff166060830152600290810b60808301529190910b60a082015260c00190565b6001600160a01b03929092168252602082015260400190565b82151581526040602082015260006116866040830184611a4b565b6020815260006116896020830184611a4b565b6020808252600c908201526b3bb937b7339031b0b63632b960a11b604082015260600190565b6101008101611bed828480516001600160a01b03908116835260208083015182169084015260408083015162ffffff16908401526060808301518216908401526080808301519084015260a0828101519084015260c0808301519084015260e09182015116910152565b92915050565b60008219821115611c0657611c06611c8f565b500190565b600082611c2857634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611c4757611c47611c8f565b500290565b600082821015611c5e57611c5e611c8f565b500390565b60005b83811015611c7e578181015183820152602001611c66565b838111156115275750506000910152565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114611cba57600080fd5b50565b60ff81168114611cba57600080fdfe0000000000000000000000001a7e4e63778b4f12a199c062f3efdd288afcbce8a2646970667358221220d5bbc53dbe974f872263443e87bfd3e6b5b091f40cd13d4cce951c9651d541a964736f6c63430008070033