Latest 25 from a total of 21,145,826 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Swap Exact Token... | 90570230 | 1 hr ago | IN | 0 MNT | 0.01434132 | ||||
| Swap Exact Token... | 90569151 | 1 hr ago | IN | 0 MNT | 0.0144223 | ||||
| Swap Exact Token... | 90567815 | 2 hrs ago | IN | 0 MNT | 0.01439816 | ||||
| Swap Exact Token... | 90559294 | 7 hrs ago | IN | 0 MNT | 0.00666339 | ||||
| Swap Tokens For ... | 90525290 | 25 hrs ago | IN | 0 MNT | 0.04230996 | ||||
| Swap Exact Token... | 90519683 | 29 hrs ago | IN | 0 MNT | 0.00667566 | ||||
| Swap Tokens For ... | 90512538 | 33 hrs ago | IN | 0 MNT | 0.04172954 | ||||
| Remove Liquidity | 90481938 | 2 days ago | IN | 0 MNT | 0.01471322 | ||||
| Swap Tokens For ... | 90477236 | 2 days ago | IN | 0 MNT | 0.01568999 | ||||
| Swap Tokens For ... | 90475082 | 2 days ago | IN | 0 MNT | 0.01414992 | ||||
| Swap Tokens For ... | 90475082 | 2 days ago | IN | 0 MNT | 0.01555302 | ||||
| Swap Tokens For ... | 90475065 | 2 days ago | IN | 0 MNT | 0.01555198 | ||||
| Swap Tokens For ... | 90473830 | 2 days ago | IN | 0 MNT | 0.01550017 | ||||
| Swap Tokens For ... | 90473400 | 2 days ago | IN | 0 MNT | 0.01547734 | ||||
| Swap Exact Token... | 90472898 | 2 days ago | IN | 0 MNT | 0.00675975 | ||||
| Remove Liquidity... | 90472069 | 2 days ago | IN | 0 MNT | 0.01849212 | ||||
| Swap Tokens For ... | 90466240 | 2 days ago | IN | 0 MNT | 0.01549068 | ||||
| Swap Tokens For ... | 90465442 | 2 days ago | IN | 0 MNT | 0.01545348 | ||||
| Swap Exact Token... | 90445255 | 2 days ago | IN | 0 MNT | 0.01472067 | ||||
| Swap Tokens For ... | 90443038 | 2 days ago | IN | 0 MNT | 0.01583668 | ||||
| Swap Tokens For ... | 90442141 | 3 days ago | IN | 0 MNT | 0.00530256 | ||||
| Swap Tokens For ... | 90442141 | 3 days ago | IN | 0 MNT | 0.08336589 | ||||
| Swap Tokens For ... | 90442104 | 3 days ago | IN | 0 MNT | 0.01544473 | ||||
| Swap Tokens For ... | 90434927 | 3 days ago | IN | 0 MNT | 0.01544178 | ||||
| Swap Tokens For ... | 90433688 | 3 days ago | IN | 0 MNT | 0.01542315 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 90472069 | 2 days ago | 1,586.74560888 MNT | ||||
| 90472069 | 2 days ago | 1,586.74560888 MNT | ||||
| 90397806 | 4 days ago | 3.74707807 MNT | ||||
| 90397806 | 4 days ago | 3.74707807 MNT | ||||
| 90363503 | 4 days ago | 16.45375278 MNT | ||||
| 90363503 | 4 days ago | 16.45375278 MNT | ||||
| 90304899 | 6 days ago | 1.64996795 MNT | ||||
| 90304899 | 6 days ago | 1.64996795 MNT | ||||
| 90256269 | 7 days ago | 263.79931958 MNT | ||||
| 90256269 | 7 days ago | 263.79931958 MNT | ||||
| 90016330 | 12 days ago | 4.47246608 MNT | ||||
| 90016330 | 12 days ago | 4.47246608 MNT | ||||
| 89802158 | 17 days ago | 1.98519507 MNT | ||||
| 89802158 | 17 days ago | 1.98519507 MNT | ||||
| 89738179 | 19 days ago | 0.71935777 MNT | ||||
| 89738179 | 19 days ago | 0.71935777 MNT | ||||
| 89738111 | 19 days ago | 0.280612 MNT | ||||
| 89675906 | 20 days ago | 8.07526159 MNT | ||||
| 89675906 | 20 days ago | 8.07526159 MNT | ||||
| 89667049 | 20 days ago | 210.45689842 MNT | ||||
| 89667049 | 20 days ago | 210.45689842 MNT | ||||
| 89589941 | 22 days ago | 0.00000294 MNT | ||||
| 89589941 | 22 days ago | 11.99999705 MNT | ||||
| 89587177 | 22 days ago | 23.46961685 MNT | ||||
| 89587177 | 22 days ago | 23.46961685 MNT |
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
MoeRouter
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 600 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.20;
import {SafeERC20, IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {MoeLibrary} from "./libraries/MoeLibrary.sol";
import {IMoeRouter} from "./interfaces/IMoeRouter.sol";
import {IMoeFactory} from "./interfaces/IMoeFactory.sol";
import {IMoePair} from "./interfaces/IMoePair.sol";
import {IWNative} from "./interfaces/IWNative.sol";
contract MoeRouter is IMoeRouter {
using SafeERC20 for IERC20;
address public immutable override factory;
address public immutable override pairImplementation;
address public immutable override wNative;
modifier ensure(uint256 deadline) {
require(deadline >= block.timestamp, "MoeRouter: EXPIRED");
_;
}
constructor(address _factory, address _wNative) {
factory = _factory;
wNative = _wNative;
pairImplementation = IMoeFactory(_factory).moePairImplementation();
}
receive() external payable {
assert(msg.sender == wNative); // only accept Native via fallback from the wNative contract
}
function _safeTransferNative(address to, uint256 amount) internal {
(bool success,) = to.call{value: amount}("");
require(success, "MoeRouter: NATIVE_TRANSFER_FAILED");
}
// **** ADD LIQUIDITY ****
function _getPair(address tokenA, address tokenB) internal view virtual returns (address pair) {
pair = MoeLibrary.pairFor(factory, pairImplementation, tokenA, tokenB);
}
function _addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin
) internal virtual returns (uint256 amountA, uint256 amountB) {
// create the pair if it doesn't exist yet
if (IMoeFactory(factory).getPair(tokenA, tokenB) == address(0)) {
IMoeFactory(factory).createPair(tokenA, tokenB);
}
(uint256 reserveA, uint256 reserveB) = MoeLibrary.getReserves(factory, tokenA, tokenB);
if (reserveA == 0 && reserveB == 0) {
(amountA, amountB) = (amountADesired, amountBDesired);
} else {
uint256 amountBOptimal = MoeLibrary.quote(amountADesired, reserveA, reserveB);
if (amountBOptimal <= amountBDesired) {
require(amountBOptimal >= amountBMin, "MoeRouter: INSUFFICIENT_B_AMOUNT");
(amountA, amountB) = (amountADesired, amountBOptimal);
} else {
uint256 amountAOptimal = MoeLibrary.quote(amountBDesired, reserveB, reserveA);
assert(amountAOptimal <= amountADesired);
require(amountAOptimal >= amountAMin, "MoeRouter: INSUFFICIENT_A_AMOUNT");
(amountA, amountB) = (amountAOptimal, amountBDesired);
}
}
}
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external virtual override ensure(deadline) returns (uint256 amountA, uint256 amountB, uint256 liquidity) {
(address _tokenA, address _tokenB) = (tokenA, tokenB); // avoid stack too deep errors
(amountA, amountB) = _addLiquidity(_tokenA, _tokenB, amountADesired, amountBDesired, amountAMin, amountBMin);
address pair = _getPair(_tokenA, _tokenB);
IERC20(_tokenA).safeTransferFrom(msg.sender, pair, amountA);
IERC20(_tokenB).safeTransferFrom(msg.sender, pair, amountB);
liquidity = IMoePair(pair).mint(to);
}
function addLiquidityNative(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountNativeMin,
address to,
uint256 deadline
)
external
payable
virtual
override
ensure(deadline)
returns (uint256 amountToken, uint256 amountNative, uint256 liquidity)
{
(amountToken, amountNative) =
_addLiquidity(token, wNative, amountTokenDesired, msg.value, amountTokenMin, amountNativeMin);
address pair = _getPair(token, wNative);
IERC20(token).safeTransferFrom(msg.sender, pair, amountToken);
IWNative(wNative).deposit{value: amountNative}();
assert(IWNative(wNative).transfer(pair, amountNative));
liquidity = IMoePair(pair).mint(to);
// refund dust eth, if any
if (msg.value > amountNative) _safeTransferNative(msg.sender, msg.value - amountNative);
}
// **** REMOVE LIQUIDITY ****
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) public virtual override ensure(deadline) returns (uint256 amountA, uint256 amountB) {
address pair = _getPair(tokenA, tokenB);
IMoePair(pair).transferFrom(msg.sender, pair, liquidity); // send liquidity to pair
(uint256 amount0, uint256 amount1) = IMoePair(pair).burn(to);
(address token0,) = MoeLibrary.sortTokens(tokenA, tokenB);
(amountA, amountB) = tokenA == token0 ? (amount0, amount1) : (amount1, amount0);
require(amountA >= amountAMin, "MoeRouter: INSUFFICIENT_A_AMOUNT");
require(amountB >= amountBMin, "MoeRouter: INSUFFICIENT_B_AMOUNT");
}
function removeLiquidityNative(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountNativeMin,
address to,
uint256 deadline
) public virtual override ensure(deadline) returns (uint256 amountToken, uint256 amountNative) {
(amountToken, amountNative) =
removeLiquidity(token, wNative, liquidity, amountTokenMin, amountNativeMin, address(this), deadline);
IERC20(token).safeTransfer(to, amountToken);
IWNative(wNative).withdraw(amountNative);
_safeTransferNative(to, amountNative);
}
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external virtual override returns (uint256 amountA, uint256 amountB) {
address pair = _getPair(tokenA, tokenB);
uint256 value = approveMax ? type(uint256).max : liquidity;
IMoePair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
(amountA, amountB) = removeLiquidity(tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline);
}
function removeLiquidityNativeWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountNativeMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external virtual override returns (uint256 amountToken, uint256 amountNative) {
address pair = _getPair(token, wNative);
uint256 value = approveMax ? type(uint256).max : liquidity;
IMoePair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
(amountToken, amountNative) =
removeLiquidityNative(token, liquidity, amountTokenMin, amountNativeMin, to, deadline);
}
// **** REMOVE LIQUIDITY (supporting fee-on-transfer tokens) ****
function removeLiquidityNativeSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountNativeMin,
address to,
uint256 deadline
) public virtual override ensure(deadline) returns (uint256 amountNative) {
(, amountNative) =
removeLiquidity(token, wNative, liquidity, amountTokenMin, amountNativeMin, address(this), deadline);
IERC20(token).safeTransfer(to, IERC20(token).balanceOf(address(this)));
IWNative(wNative).withdraw(amountNative);
_safeTransferNative(to, amountNative);
}
function removeLiquidityNativeWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountNativeMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external virtual override returns (uint256 amountNative) {
address pair = _getPair(token, wNative);
uint256 value = approveMax ? type(uint256).max : liquidity;
IMoePair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
amountNative = removeLiquidityNativeSupportingFeeOnTransferTokens(
token, liquidity, amountTokenMin, amountNativeMin, to, deadline
);
}
// **** SWAP ****
// requires the initial amount to have already been sent to the first pair
function _swap(uint256[] memory amounts, address[] memory path, address _to) internal virtual {
for (uint256 i; i < path.length - 1; i++) {
(address input, address output) = (path[i], path[i + 1]);
(address token0,) = MoeLibrary.sortTokens(input, output);
uint256 amountOut = amounts[i + 1];
(uint256 amount0Out, uint256 amount1Out) =
input == token0 ? (uint256(0), amountOut) : (amountOut, uint256(0));
address to = i < path.length - 2 ? _getPair(output, path[i + 2]) : _to;
IMoePair(_getPair(input, output)).swap(amount0Out, amount1Out, to, new bytes(0));
}
}
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external virtual override ensure(deadline) returns (uint256[] memory amounts) {
amounts = MoeLibrary.getAmountsOut(factory, amountIn, path);
require(amounts[amounts.length - 1] >= amountOutMin, "MoeRouter: INSUFFICIENT_OUTPUT_AMOUNT");
IERC20(path[0]).safeTransferFrom(msg.sender, _getPair(path[0], path[1]), amounts[0]);
_swap(amounts, path, to);
}
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external virtual override ensure(deadline) returns (uint256[] memory amounts) {
amounts = MoeLibrary.getAmountsIn(factory, amountOut, path);
require(amounts[0] <= amountInMax, "MoeRouter: EXCESSIVE_INPUT_AMOUNT");
IERC20(path[0]).safeTransferFrom(msg.sender, _getPair(path[0], path[1]), amounts[0]);
_swap(amounts, path, to);
}
function swapExactNativeForTokens(uint256 amountOutMin, address[] calldata path, address to, uint256 deadline)
external
payable
virtual
override
ensure(deadline)
returns (uint256[] memory amounts)
{
require(path[0] == wNative, "MoeRouter: INVALID_PATH");
amounts = MoeLibrary.getAmountsOut(factory, msg.value, path);
require(amounts[amounts.length - 1] >= amountOutMin, "MoeRouter: INSUFFICIENT_OUTPUT_AMOUNT");
IWNative(wNative).deposit{value: amounts[0]}();
assert(IWNative(wNative).transfer(_getPair(path[0], path[1]), amounts[0]));
_swap(amounts, path, to);
}
function swapTokensForExactNative(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external virtual override ensure(deadline) returns (uint256[] memory amounts) {
require(path[path.length - 1] == wNative, "MoeRouter: INVALID_PATH");
amounts = MoeLibrary.getAmountsIn(factory, amountOut, path);
require(amounts[0] <= amountInMax, "MoeRouter: EXCESSIVE_INPUT_AMOUNT");
IERC20(path[0]).safeTransferFrom(msg.sender, _getPair(path[0], path[1]), amounts[0]);
_swap(amounts, path, address(this));
IWNative(wNative).withdraw(amounts[amounts.length - 1]);
_safeTransferNative(to, amounts[amounts.length - 1]);
}
function swapExactTokensForNative(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external virtual override ensure(deadline) returns (uint256[] memory amounts) {
require(path[path.length - 1] == wNative, "MoeRouter: INVALID_PATH");
amounts = MoeLibrary.getAmountsOut(factory, amountIn, path);
require(amounts[amounts.length - 1] >= amountOutMin, "MoeRouter: INSUFFICIENT_OUTPUT_AMOUNT");
IERC20(path[0]).safeTransferFrom(msg.sender, _getPair(path[0], path[1]), amounts[0]);
_swap(amounts, path, address(this));
IWNative(wNative).withdraw(amounts[amounts.length - 1]);
_safeTransferNative(to, amounts[amounts.length - 1]);
}
function swapNativeForExactTokens(uint256 amountOut, address[] calldata path, address to, uint256 deadline)
external
payable
virtual
override
ensure(deadline)
returns (uint256[] memory amounts)
{
require(path[0] == wNative, "MoeRouter: INVALID_PATH");
amounts = MoeLibrary.getAmountsIn(factory, amountOut, path);
require(amounts[0] <= msg.value, "MoeRouter: EXCESSIVE_INPUT_AMOUNT");
IWNative(wNative).deposit{value: amounts[0]}();
assert(IWNative(wNative).transfer(_getPair(path[0], path[1]), amounts[0]));
_swap(amounts, path, to);
// refund dust eth, if any
if (msg.value > amounts[0]) _safeTransferNative(msg.sender, msg.value - amounts[0]);
}
// **** SWAP (supporting fee-on-transfer tokens) ****
// requires the initial amount to have already been sent to the first pair
function _swapSupportingFeeOnTransferTokens(address[] memory path, address _to) internal virtual {
for (uint256 i; i < path.length - 1; i++) {
(address input, address output) = (path[i], path[i + 1]);
(address token0,) = MoeLibrary.sortTokens(input, output);
IMoePair pair = IMoePair(_getPair(input, output));
uint256 amountInput;
uint256 amountOutput;
{
// scope to avoid stack too deep errors
(uint256 reserve0, uint256 reserve1,) = pair.getReserves();
(uint256 reserveInput, uint256 reserveOutput) =
input == token0 ? (reserve0, reserve1) : (reserve1, reserve0);
amountInput = IERC20(input).balanceOf(address(pair)) - reserveInput;
amountOutput = MoeLibrary.getAmountOut(amountInput, reserveInput, reserveOutput);
}
(uint256 amount0Out, uint256 amount1Out) =
input == token0 ? (uint256(0), amountOutput) : (amountOutput, uint256(0));
address to = i < path.length - 2 ? _getPair(output, path[i + 2]) : _to;
pair.swap(amount0Out, amount1Out, to, new bytes(0));
}
}
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external virtual override ensure(deadline) {
IERC20(path[0]).safeTransferFrom(msg.sender, _getPair(path[0], path[1]), amountIn);
uint256 balanceBefore = IERC20(path[path.length - 1]).balanceOf(to);
_swapSupportingFeeOnTransferTokens(path, to);
require(
IERC20(path[path.length - 1]).balanceOf(to) - balanceBefore >= amountOutMin,
"MoeRouter: INSUFFICIENT_OUTPUT_AMOUNT"
);
}
function swapExactNativeForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable virtual override ensure(deadline) {
require(path[0] == wNative, "MoeRouter: INVALID_PATH");
uint256 amountIn = msg.value;
IWNative(wNative).deposit{value: amountIn}();
assert(IWNative(wNative).transfer(_getPair(path[0], path[1]), amountIn));
uint256 balanceBefore = IERC20(path[path.length - 1]).balanceOf(to);
_swapSupportingFeeOnTransferTokens(path, to);
require(
IERC20(path[path.length - 1]).balanceOf(to) - balanceBefore >= amountOutMin,
"MoeRouter: INSUFFICIENT_OUTPUT_AMOUNT"
);
}
function swapExactTokensForNativeSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external virtual override ensure(deadline) {
require(path[path.length - 1] == wNative, "MoeRouter: INVALID_PATH");
IERC20(path[0]).safeTransferFrom(msg.sender, _getPair(path[0], path[1]), amountIn);
_swapSupportingFeeOnTransferTokens(path, address(this));
uint256 amountOut = IERC20(wNative).balanceOf(address(this));
require(amountOut >= amountOutMin, "MoeRouter: INSUFFICIENT_OUTPUT_AMOUNT");
IWNative(wNative).withdraw(amountOut);
_safeTransferNative(to, amountOut);
}
// **** LIBRARY FUNCTIONS ****
function quote(uint256 amountA, uint256 reserveA, uint256 reserveB)
public
pure
virtual
override
returns (uint256 amountB)
{
return MoeLibrary.quote(amountA, reserveA, reserveB);
}
function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut)
public
pure
virtual
override
returns (uint256 amountOut)
{
return MoeLibrary.getAmountOut(amountIn, reserveIn, reserveOut);
}
function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut)
public
pure
virtual
override
returns (uint256 amountIn)
{
return MoeLibrary.getAmountIn(amountOut, reserveIn, reserveOut);
}
function getAmountsOut(uint256 amountIn, address[] memory path)
public
view
virtual
override
returns (uint256[] memory amounts)
{
return MoeLibrary.getAmountsOut(factory, amountIn, path);
}
function getAmountsIn(uint256 amountOut, address[] memory path)
public
view
virtual
override
returns (uint256[] memory amounts)
{
return MoeLibrary.getAmountsIn(factory, amountOut, path);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
/**
* @title Liquidity Book Immutable Clone Library
* @notice Minimal immutable proxy library.
* @author Trader Joe
* @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol)
* @author Minimal proxy by 0age (https://github.com/0age)
* @author Clones with immutable args by wighawag, zefram.eth, Saw-mon & Natalie
* (https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args)
* @dev Minimal proxy:
* Although the sw0nt pattern saves 5 gas over the erc-1167 pattern during runtime,
* it is not supported out-of-the-box on Etherscan. Hence, we choose to use the 0age pattern,
* which saves 4 gas over the erc-1167 pattern during runtime, and has the smallest bytecode.
* @dev Clones with immutable args (CWIA):
* The implementation of CWIA here doesn't implements a `receive()` as it is not needed for LB.
*/
library ImmutableClone {
error DeploymentFailed();
error PackedDataTooBig();
/**
* @dev Deploys a deterministic clone of `implementation` using immutable arguments encoded in `data`, with `salt`
* @param implementation The address of the implementation
* @param data The encoded immutable arguments
* @param salt The salt
*/
function cloneDeterministic(address implementation, bytes memory data, bytes32 salt)
internal
returns (address instance)
{
assembly {
// Compute the boundaries of the data and cache the memory slots around it.
let mBefore2 := mload(sub(data, 0x40))
let mBefore1 := mload(sub(data, 0x20))
let dataLength := mload(data)
let dataEnd := add(add(data, 0x20), dataLength)
let mAfter1 := mload(dataEnd)
// +2 bytes for telling how much data there is appended to the call.
let extraLength := add(dataLength, 2)
// The `creationSize` is `extraLength + 63`
// The `runSize` is `creationSize - 10`.
// if `extraLength` is greater than `0xffca` revert as the `creationSize` would be greater than `0xffff`.
if gt(extraLength, 0xffca) {
// Store the function selector of `PackedDataTooBig()`.
mstore(0x00, 0xc8c78139)
// Revert with (offset, size).
revert(0x1c, 0x04)
}
/**
* ---------------------------------------------------------------------------------------------------+
* CREATION (10 bytes) |
* ---------------------------------------------------------------------------------------------------|
* Opcode | Mnemonic | Stack | Memory |
* ---------------------------------------------------------------------------------------------------|
* 61 runSize | PUSH2 runSize | r | |
* 3d | RETURNDATASIZE | 0 r | |
* 81 | DUP2 | r 0 r | |
* 60 offset | PUSH1 offset | o r 0 r | |
* 3d | RETURNDATASIZE | 0 o r 0 r | |
* 39 | CODECOPY | 0 r | [0..runSize): runtime code |
* f3 | RETURN | | [0..runSize): runtime code |
* ---------------------------------------------------------------------------------------------------|
* RUNTIME (98 bytes + extraLength) |
* ---------------------------------------------------------------------------------------------------|
* Opcode | Mnemonic | Stack | Memory |
* ---------------------------------------------------------------------------------------------------|
* |
* ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
* 36 | CALLDATASIZE | cds | |
* 3d | RETURNDATASIZE | 0 cds | |
* 3d | RETURNDATASIZE | 0 0 cds | |
* 37 | CALLDATACOPY | | [0..cds): calldata |
* |
* ::: keep some values in stack :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
* 3d | RETURNDATASIZE | 0 | [0..cds): calldata |
* 3d | RETURNDATASIZE | 0 0 | [0..cds): calldata |
* 3d | RETURNDATASIZE | 0 0 0 | [0..cds): calldata |
* 3d | RETURNDATASIZE | 0 0 0 0 | [0..cds): calldata |
* 61 extra | PUSH2 extra | e 0 0 0 0 | [0..cds): calldata |
* |
* ::: copy extra data to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
* 80 | DUP1 | e e 0 0 0 0 | [0..cds): calldata |
* 60 0x35 | PUSH1 0x35 | 0x35 e e 0 0 0 0 | [0..cds): calldata |
* 36 | CALLDATASIZE | cds 0x35 e e 0 0 0 0 | [0..cds): calldata |
* 39 | CODECOPY | e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |
* |
* ::: delegate call to the implementation contract ::::::::::::::::::::::::::::::::::::::::::::::::: |
* 36 | CALLDATASIZE | cds e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |
* 01 | ADD | cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |
* 3d | RETURNDATASIZE | 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |
* 73 addr | PUSH20 addr | addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |
* 5a | GAS | gas addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |
* f4 | DELEGATECALL | success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |
* |
* ::: copy return data to memory ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
* 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |
* 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata, [cds..cds+e): extraData |
* 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |
* 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata, [cds..cds+e): extraData |
* 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata |
* |
* 60 0x33 | PUSH1 0x33 | 0x33 success 0 rds | [0..rds): returndata |
* 57 | JUMPI | 0 rds | [0..rds): returndata |
* |
* ::: revert ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
* fd | REVERT | | [0..rds): returndata |
* |
* ::: return ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
* 5b | JUMPDEST | 0 rds | [0..rds): returndata |
* f3 | RETURN | | [0..rds): returndata |
* ---------------------------------------------------------------------------------------------------+
*/
// Write the bytecode before the data.
mstore(data, 0x5af43d3d93803e603357fd5bf3)
// Write the address of the implementation.
mstore(sub(data, 0x0d), implementation)
mstore(
sub(data, 0x21),
or(
shl(0xd8, add(extraLength, 0x35)),
or(shl(0x48, extraLength), 0x6100003d81600a3d39f3363d3d373d3d3d3d610000806035363936013d73)
)
)
mstore(dataEnd, shl(0xf0, extraLength))
// Create the instance.
instance := create2(0, sub(data, 0x1f), add(extraLength, 0x3f), salt)
// If `instance` is zero, revert.
if iszero(instance) {
// Store the function selector of `DeploymentFailed()`.
mstore(0x00, 0x30116425)
// Revert with (offset, size).
revert(0x1c, 0x04)
}
// Restore the overwritten memory surrounding `data`.
mstore(dataEnd, mAfter1)
mstore(data, dataLength)
mstore(sub(data, 0x20), mBefore1)
mstore(sub(data, 0x40), mBefore2)
}
}
/**
* @dev Returns the initialization code hash of the clone of `implementation`
* using immutable arguments encoded in `data`.
* Used for mining vanity addresses with create2crunch.
* @param implementation The address of the implementation contract.
* @param data The encoded immutable arguments.
* @return hash The initialization code hash.
*/
function initCodeHash(address implementation, bytes memory data) internal pure returns (bytes32 hash) {
assembly {
// Compute the boundaries of the data and cache the memory slots around it.
let mBefore2 := mload(sub(data, 0x40))
let mBefore1 := mload(sub(data, 0x20))
let dataLength := mload(data)
let dataEnd := add(add(data, 0x20), dataLength)
let mAfter1 := mload(dataEnd)
// +2 bytes for telling how much data there is appended to the call.
let extraLength := add(dataLength, 2)
// The `creationSize` is `extraLength + 63`
// The `runSize` is `creationSize - 10`.
// if `extraLength` is greater than `0xffca` revert as the `creationSize` would be greater than `0xffff`.
if gt(extraLength, 0xffca) {
// Store the function selector of `PackedDataTooBig()`.
mstore(0x00, 0xc8c78139)
// Revert with (offset, size).
revert(0x1c, 0x04)
}
// Write the bytecode before the data.
mstore(data, 0x5af43d3d93803e603357fd5bf3)
// Write the address of the implementation.
mstore(sub(data, 0x0d), implementation)
mstore(
sub(data, 0x21),
or(
shl(0xd8, add(extraLength, 0x35)),
or(shl(0x48, extraLength), 0x6100003d81600a3d39f3363d3d373d3d3d3d610000806035363936013d73)
)
)
mstore(dataEnd, shl(0xf0, extraLength))
// Create the instance.
hash := keccak256(sub(data, 0x1f), add(extraLength, 0x3f))
// Restore the overwritten memory surrounding `data`.
mstore(dataEnd, mAfter1)
mstore(data, dataLength)
mstore(sub(data, 0x20), mBefore1)
mstore(sub(data, 0x40), mBefore2)
}
}
/**
* @dev Returns the address of the deterministic clone of
* `implementation` using immutable arguments encoded in `data`, with `salt`, by `deployer`.
* @param implementation The address of the implementation.
* @param data The immutable arguments of the implementation.
* @param salt The salt used to compute the address.
* @param deployer The address of the deployer.
* @return predicted The predicted address.
*/
function predictDeterministicAddress(address implementation, bytes memory data, bytes32 salt, address deployer)
internal
pure
returns (address predicted)
{
bytes32 hash = initCodeHash(implementation, data);
predicted = predictDeterministicAddress(hash, salt, deployer);
}
/**
* @dev Returns the address when a contract with initialization code hash,
* `hash`, is deployed with `salt`, by `deployer`.
* @param hash The initialization code hash.
* @param salt The salt used to compute the address.
* @param deployer The address of the deployer.
* @return predicted The predicted address.
*/
function predictDeterministicAddress(bytes32 hash, bytes32 salt, address deployer)
internal
pure
returns (address predicted)
{
/// @solidity memory-safe-assembly
assembly {
// Compute the boundaries of the data and cache the memory slots around it.
let mBefore := mload(0x35)
// Compute and store the bytecode hash.
mstore8(0x00, 0xff) // Write the prefix.
mstore(0x35, hash)
mstore(0x01, shl(96, deployer))
mstore(0x15, salt)
predicted := keccak256(0x00, 0x55)
// Restore the part of the free memory pointer that has been overwritten.
mstore(0x35, mBefore)
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` 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 value) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*/
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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*
* ==== Security Considerations
*
* There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
* considered as an intention to spend the allowance in any specific way. The second is that because permits have
* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
* generally recommended is:
*
* ```solidity
* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
* doThing(..., value);
* }
*
* function doThing(..., uint256 value) public {
* token.safeTransferFrom(msg.sender, address(this), value);
* ...
* }
* ```
*
* Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
* `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
* {SafeERC20-safeTransferFrom}).
*
* Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
* contracts should have entry points that don't rely on permit.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*
* CAUTION: See Security Considerations above.
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../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;
/**
* @dev An operation with an ERC20 token failed.
*/
error SafeERC20FailedOperation(address token);
/**
* @dev Indicates a failed `decreaseAllowance` request.
*/
error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
forceApprove(token, spender, oldAllowance + value);
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
* value, non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
unchecked {
uint256 currentAllowance = token.allowance(address(this), spender);
if (currentAllowance < requestedDecrease) {
revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
}
forceApprove(token, spender, currentAllowance - requestedDecrease);
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @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);
if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @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).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// 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 cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error AddressInsufficientBalance(address account);
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedInnerCall();
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert AddressInsufficientBalance(address(this));
}
(bool success, ) = recipient.call{value: amount}("");
if (!success) {
revert FailedInnerCall();
}
}
/**
* @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 or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {FailedInnerCall} error.
*
* 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.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @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`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert AddressInsufficientBalance(address(this));
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
* unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {FailedInnerCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
*/
function _revert(bytes memory returndata) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert FailedInnerCall();
}
}
}// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.20;
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
interface IMoeERC20 is IERC20Metadata {
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint256);
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)
external;
}// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.20;
interface IMoeFactory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint256);
event FeeToSet(address indexed feeTo);
function feeTo() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint256) external view returns (address pair);
function allPairsLength() external view returns (uint256);
function moePairImplementation() external view returns (address);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
}// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.20;
import {IMoeERC20} from "./IMoeERC20.sol";
interface IMoePair is IMoeERC20 {
event Mint(address indexed sender, uint256 amount0, uint256 amount1);
event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to);
event Swap(
address indexed sender,
uint256 amount0In,
uint256 amount1In,
uint256 amount0Out,
uint256 amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint256);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function implementation() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint256);
function price1CumulativeLast() external view returns (uint256);
function kLast() external view returns (uint256);
function mint(address to) external returns (uint256 liquidity);
function burn(address to) external returns (uint256 amount0, uint256 amount1);
function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function sweep(address token, address recipient, uint256 amount) external;
function initialize() external;
}// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.20;
interface IMoeRouter {
function factory() external view returns (address);
function wNative() external view returns (address);
function pairImplementation() external view returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);
function addLiquidityNative(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountNativeMin,
address to,
uint256 deadline
) external payable returns (uint256 amountToken, uint256 amountNative, uint256 liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityNative(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountNativeMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountNative);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityNativeWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountNativeMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountNative);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactNativeForTokens(uint256 amountOutMin, address[] calldata path, address to, uint256 deadline)
external
payable
returns (uint256[] memory amounts);
function swapTokensForExactNative(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForNative(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapNativeForExactTokens(uint256 amountOut, address[] calldata path, address to, uint256 deadline)
external
payable
returns (uint256[] memory amounts);
function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB);
function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut)
external
pure
returns (uint256 amountOut);
function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut)
external
pure
returns (uint256 amountIn);
function getAmountsOut(uint256 amountIn, address[] calldata path)
external
view
returns (uint256[] memory amounts);
function getAmountsIn(uint256 amountOut, address[] calldata path)
external
view
returns (uint256[] memory amounts);
function removeLiquidityNativeSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountNativeMin,
address to,
uint256 deadline
) external returns (uint256 amountNative);
function removeLiquidityNativeWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountNativeMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountNative);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactNativeForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForNativeSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface IWNative is IERC20 {
function deposit() external payable;
function withdraw(uint256) external;
}// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.20;
import {ImmutableClone} from "@tj-dexv2/src/libraries/ImmutableClone.sol";
import {IMoePair} from ".././interfaces/IMoePair.sol";
import {IMoeFactory} from ".././interfaces/IMoeFactory.sol";
library MoeLibrary {
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, "MoeLibrary: IDENTICAL_ADDRESSES");
(token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
require(token0 != address(0), "MoeLibrary: ZERO_ADDRESS");
}
// calculates the CREATE2 address for a pair without using any sload
function pairFor(address factory, address tokenA, address tokenB) internal view returns (address pair) {
address implementation = IMoeFactory(factory).moePairImplementation();
return pairFor(factory, implementation, tokenA, tokenB);
}
// calculates the CREATE2 address for a pair without making any external calls
function pairFor(address factory, address implementation, address tokenA, address tokenB)
internal
pure
returns (address pair)
{
(address token0, address token1) = sortTokens(tokenA, tokenB);
bytes memory data = abi.encodePacked(token0, token1);
bytes32 salt = keccak256(data);
return ImmutableClone.predictDeterministicAddress(implementation, data, salt, factory);
}
// fetches and sorts the reserves for a pair
function getReserves(address factory, address tokenA, address tokenB)
internal
view
returns (uint256 reserveA, uint256 reserveB)
{
(address token0,) = sortTokens(tokenA, tokenB);
(uint256 reserve0, uint256 reserve1,) = IMoePair(pairFor(factory, tokenA, tokenB)).getReserves();
(reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0);
}
// given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) internal pure returns (uint256 amountB) {
require(amountA > 0, "MoeLibrary: INSUFFICIENT_AMOUNT");
require(reserveA > 0 && reserveB > 0, "MoeLibrary: INSUFFICIENT_LIQUIDITY");
amountB = amountA * reserveB / reserveA;
}
// given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut)
internal
pure
returns (uint256 amountOut)
{
require(amountIn > 0, "MoeLibrary: INSUFFICIENT_INPUT_AMOUNT");
require(reserveIn > 0 && reserveOut > 0, "MoeLibrary: INSUFFICIENT_LIQUIDITY");
uint256 amountInWithFee = amountIn * 997;
uint256 numerator = amountInWithFee * reserveOut;
uint256 denominator = reserveIn * 1000 + amountInWithFee;
amountOut = numerator / denominator;
}
// given an output amount of an asset and pair reserves, returns a required input amount of the other asset
function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut)
internal
pure
returns (uint256 amountIn)
{
require(amountOut > 0, "MoeLibrary: INSUFFICIENT_OUTPUT_AMOUNT");
require(reserveIn > 0 && reserveOut > 0, "MoeLibrary: INSUFFICIENT_LIQUIDITY");
uint256 numerator = reserveIn * amountOut * 1000;
uint256 denominator = (reserveOut - amountOut) * 997;
amountIn = ((numerator - 1) / denominator) + 1;
}
// performs chained getAmountOut calculations on any number of pairs
function getAmountsOut(address factory, uint256 amountIn, address[] memory path)
internal
view
returns (uint256[] memory amounts)
{
require(path.length >= 2, "MoeLibrary: INVALID_PATH");
amounts = new uint256[](path.length);
amounts[0] = amountIn;
for (uint256 i; i < path.length - 1; i++) {
(uint256 reserveIn, uint256 reserveOut) = getReserves(factory, path[i], path[i + 1]);
amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut);
}
}
// performs chained getAmountIn calculations on any number of pairs
function getAmountsIn(address factory, uint256 amountOut, address[] memory path)
internal
view
returns (uint256[] memory amounts)
{
require(path.length >= 2, "MoeLibrary: INVALID_PATH");
amounts = new uint256[](path.length);
amounts[amounts.length - 1] = amountOut;
for (uint256 i = path.length - 1; i > 0; i--) {
(uint256 reserveIn, uint256 reserveOut) = getReserves(factory, path[i - 1], path[i]);
amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut);
}
}
}{
"evmVersion": "paris",
"libraries": {},
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"optimizer": {
"enabled": true,
"runs": 600
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"remappings": [
"ds-test/=lib/forge-std/lib/ds-test/src/",
"forge-std/=lib/forge-std/src/",
"@openzeppelin/=lib/openzeppelin-contracts/",
"@openzeppelin-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
"@tj-dexv2/=lib/dexv2/",
"@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"dexv2/=lib/dexv2/",
"erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"openzeppelin/=lib/dexv2/lib/openzeppelin-contracts/contracts/"
]
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_wNative","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"amountADesired","type":"uint256"},{"internalType":"uint256","name":"amountBDesired","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"addLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountTokenDesired","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountNativeMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"addLiquidityNative","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountNative","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"reserveIn","type":"uint256"},{"internalType":"uint256","name":"reserveOut","type":"uint256"}],"name":"getAmountIn","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"reserveIn","type":"uint256"},{"internalType":"uint256","name":"reserveOut","type":"uint256"}],"name":"getAmountOut","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsIn","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsOut","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pairImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"reserveA","type":"uint256"},{"internalType":"uint256","name":"reserveB","type":"uint256"}],"name":"quote","outputs":[{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountNativeMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidityNative","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountNative","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountNativeMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidityNativeSupportingFeeOnTransferTokens","outputs":[{"internalType":"uint256","name":"amountNative","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountNativeMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityNativeWithPermit","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountNative","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountNativeMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityNativeWithPermitSupportingFeeOnTransferTokens","outputs":[{"internalType":"uint256","name":"amountNative","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityWithPermit","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactNativeForTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactNativeForTokensSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForNative","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForNativeSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForTokensSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapNativeForExactTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapTokensForExactNative","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapTokensForExactTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wNative","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60e06040523480156200001157600080fd5b5060405162004738380380620047388339810160408190526200003491620000de565b6001600160a01b03808316608081905290821660c052604080516373f9936d60e01b815290516373f9936d916004808201926020929091908290030181865afa15801562000086573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000ac919062000116565b6001600160a01b031660a052506200013b9050565b80516001600160a01b0381168114620000d957600080fd5b919050565b60008060408385031215620000f257600080fd5b620000fd83620000c1565b91506200010d60208401620000c1565b90509250929050565b6000602082840312156200012957600080fd5b6200013482620000c1565b9392505050565b60805160a05160c0516144bc6200027c600039600081816101aa015281816102a9015281816105c90152818161083f01528181610c1401528181610dd901528181610f260152818161100f015281816113160152818161148c0152818161151a0152818161180a01528181611862015281816118f4015281816119de01528181611d3101528181611eb701528181611f45015281816120b3015281816120e801528181612125015281816121ba01528181612311015281816123b80152818161242c015281816126c101526127830152600081816103750152612abc0152600081816104af0152818161066f0152818161093c01528181610a8a01528181610cba015281816113bb015281816116ec01528181611dd60152818161264d01528181612a9b0152818161364c015281816136ee015261376501526144bc6000f3fe60806040526004361061019a5760003560e01c80638803dbee116100e1578063c075a5911161008a578063cbacf4e411610064578063cbacf4e4146104ff578063d06ca61f14610512578063d638d85614610532578063e8e337001461055257600080fd5b8063c075a5911461048a578063c45a01551461049d578063c9e164e3146104d157600080fd5b8063b47c632e116100bb578063b47c632e1461042a578063b7de50b41461044a578063baa2abde1461046a57600080fd5b80638803dbee146103ca578063a96605e8146103ea578063ad615dec1461040a57600080fd5b80634436f4fd1161014357806371f3c5961161011d57806371f3c59614610363578063800a758a1461039757806385f8c259146103aa57600080fd5b80634436f4fd1461030357806356400497146103235780635c11d7951461034357600080fd5b80632195995c116101745780632195995c146102625780632d68efc91461029757806338ed1739146102e357600080fd5b8063029e384f146101de578063054d50d4146102145780631f00ca741461024257600080fd5b366101d957336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101d7576101d7613cdc565b005b600080fd5b3480156101ea57600080fd5b506101fe6101f9366004613d5c565b610572565b60405161020b9190613dcf565b60405180910390f35b34801561022057600080fd5b5061023461022f366004613e13565b61091e565b60405190815260200161020b565b34801561024e57600080fd5b506101fe61025d366004613e55565b610935565b34801561026e57600080fd5b5061028261027d366004613f45565b61096b565b6040805192835260208301919091520161020b565b3480156102a357600080fd5b506102cb7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161020b565b3480156102ef57600080fd5b506101fe6102fe366004613d5c565b610a3d565b34801561030f57600080fd5b506101fe61031e366004613d5c565b610bc2565b34801561032f57600080fd5b506101d761033e366004613d5c565b610d89565b34801561034f57600080fd5b506101d761035e366004613d5c565b611087565b34801561036f57600080fd5b506102cb7f000000000000000000000000000000000000000000000000000000000000000081565b6101fe6103a5366004613fef565b6112cc565b3480156103b657600080fd5b506102346103c5366004613e13565b611692565b3480156103d657600080fd5b506101fe6103e5366004613d5c565b61169f565b3480156103f657600080fd5b50610282610405366004614056565b6117bb565b34801561041657600080fd5b50610234610425366004613e13565b6118dc565b34801561043657600080fd5b506102826104453660046140b4565b6118e9565b34801561045657600080fd5b506102346104653660046140b4565b6119d5565b34801561047657600080fd5b5061028261048536600461414a565b611abb565b6101fe610498366004613fef565b611ce7565b3480156104a957600080fd5b506102cb7f000000000000000000000000000000000000000000000000000000000000000081565b6104e46104df366004614056565b612062565b6040805193845260208401929092529082015260600161020b565b6101d761050d366004613fef565b6122c9565b34801561051e57600080fd5b506101fe61052d366004613e55565b612646565b34801561053e57600080fd5b5061023461054d366004614056565b612673565b34801561055e57600080fd5b506104e461056d3660046141bc565b6127f1565b606081428110156105bf5760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064015b60405180910390fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001686866105f660018261424e565b81811061060557610605614261565b905060200201602081019061061a9190614277565b6001600160a01b03161461066a5760405162461bcd60e51b815260206004820152601760248201527609adecaa4deeae8cae47440929cac82989288bea082a89604b1b60448201526064016105b6565b6106c87f00000000000000000000000000000000000000000000000000000000000000008988888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061290992505050565b91508682600184516106da919061424e565b815181106106ea576106ea614261565b6020026020010151101561074e5760405162461bcd60e51b815260206004820152602560248201527f4d6f65526f757465723a20494e53554646494349454e545f4f55545055545f416044820152641353d5539560da1b60648201526084016105b6565b6107fe336107aa8888600081811061076857610768614261565b905060200201602081019061077d9190614277565b8989600181811061079057610790614261565b90506020020160208101906107a59190614277565b612a94565b846000815181106107bd576107bd614261565b6020026020010151898960008181106107d8576107d8614261565b90506020020160208101906107ed9190614277565b6001600160a01b0316929190612ae2565b61083d82878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250309250612b64915050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d836001855161087b919061424e565b8151811061088b5761088b614261565b60200260200101516040518263ffffffff1660e01b81526004016108b191815260200190565b600060405180830381600087803b1580156108cb57600080fd5b505af11580156108df573d6000803e3d6000fd5b505050506109138483600185516108f6919061424e565b8151811061090657610906614261565b6020026020010151612d24565b509695505050505050565b600061092b848484612dd6565b90505b9392505050565b60606109627f00000000000000000000000000000000000000000000000000000000000000008484612eea565b90505b92915050565b600080600061097a8e8e612a94565b9050600087610989578c61098d565b6000195b60405163d505accf60e01b815233600482015230602482015260448101829052606481018b905260ff8916608482015260a4810188905260c481018790529091506001600160a01b0383169063d505accf9060e401600060405180830381600087803b1580156109fc57600080fd5b505af1158015610a10573d6000803e3d6000fd5b50505050610a238f8f8f8f8f8f8f611abb565b809450819550505050509b509b9950505050505050505050565b60608142811015610a855760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b610ae37f00000000000000000000000000000000000000000000000000000000000000008988888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061290992505050565b9150868260018451610af5919061424e565b81518110610b0557610b05614261565b60200260200101511015610b695760405162461bcd60e51b815260206004820152602560248201527f4d6f65526f757465723a20494e53554646494349454e545f4f55545055545f416044820152641353d5539560da1b60648201526084016105b6565b610b83336107aa8888600081811061076857610768614261565b61091382878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250612b64915050565b60608142811015610c0a5760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168686610c4160018261424e565b818110610c5057610c50614261565b9050602002016020810190610c659190614277565b6001600160a01b031614610cb55760405162461bcd60e51b815260206004820152601760248201527609adecaa4deeae8cae47440929cac82989288bea082a89604b1b60448201526064016105b6565b610d137f000000000000000000000000000000000000000000000000000000000000000089888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612eea92505050565b91508682600081518110610d2957610d29614261565b6020026020010151111561074e5760405162461bcd60e51b815260206004820152602160248201527f4d6f65526f757465723a204558434553534956455f494e5055545f414d4f554e6044820152601560fa1b60648201526084016105b6565b8042811015610dcf5760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168585610e0660018261424e565b818110610e1557610e15614261565b9050602002016020810190610e2a9190614277565b6001600160a01b031614610e7a5760405162461bcd60e51b815260206004820152601760248201527609adecaa4deeae8cae47440929cac82989288bea082a89604b1b60448201526064016105b6565b610ed033610ebc87876000818110610e9457610e94614261565b9050602002016020810190610ea99190614277565b8888600181811061079057610790614261565b89888860008181106107d8576107d8614261565b610f0e85858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525030925061306b915050565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610f75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f999190614294565b905086811015610ff95760405162461bcd60e51b815260206004820152602560248201527f4d6f65526f757465723a20494e53554646494349454e545f4f55545055545f416044820152641353d5539560da1b60648201526084016105b6565b604051632e1a7d4d60e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561105b57600080fd5b505af115801561106f573d6000803e3d6000fd5b5050505061107d8482612d24565b5050505050505050565b80428110156110cd5760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b6110e733610ebc87876000818110610e9457610e94614261565b600085856110f660018261424e565b81811061110557611105614261565b905060200201602081019061111a9190614277565b6040516370a0823160e01b81526001600160a01b03868116600483015291909116906370a0823190602401602060405180830381865afa158015611162573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111869190614294565b90506111c686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525088925061306b915050565b868187876111d560018261424e565b8181106111e4576111e4614261565b90506020020160208101906111f99190614277565b6040516370a0823160e01b81526001600160a01b03888116600483015291909116906370a08231906024015b602060405180830381865afa158015611242573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112669190614294565b611270919061424e565b101561107d5760405162461bcd60e51b815260206004820152602560248201527f4d6f65526f757465723a20494e53554646494349454e545f4f55545055545f416044820152641353d5539560da1b60648201526084016105b6565b606081428110156113145760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168686600081811061135157611351614261565b90506020020160208101906113669190614277565b6001600160a01b0316146113b65760405162461bcd60e51b815260206004820152601760248201527609adecaa4deeae8cae47440929cac82989288bea082a89604b1b60448201526064016105b6565b6114147f000000000000000000000000000000000000000000000000000000000000000088888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612eea92505050565b9150348260008151811061142a5761142a614261565b6020026020010151111561148a5760405162461bcd60e51b815260206004820152602160248201527f4d6f65526f757465723a204558434553534956455f494e5055545f414d4f554e6044820152601560fa1b60648201526084016105b6565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0836000815181106114cc576114cc614261565b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156114ff57600080fd5b505af1158015611513573d6000803e3d6000fd5b50505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb61155d8888600081811061076857610768614261565b8460008151811061157057611570614261565b60200260200101516040518363ffffffff1660e01b81526004016115a99291906001600160a01b03929092168252602082015260400190565b6020604051808303816000875af11580156115c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ec91906142ad565b6115f8576115f8613cdc565b61163782878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250612b64915050565b8160008151811061164a5761164a614261565b602002602001015134111561168857611688338360008151811061167057611670614261565b602002602001015134611683919061424e565b612d24565b5095945050505050565b600061092b848484613311565b606081428110156116e75760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b6117457f000000000000000000000000000000000000000000000000000000000000000089888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612eea92505050565b9150868260008151811061175b5761175b614261565b60200260200101511115610b695760405162461bcd60e51b815260206004820152602160248201527f4d6f65526f757465723a204558434553534956455f494e5055545f414d4f554e6044820152601560fa1b60648201526084016105b6565b60008082428110156118045760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b611833897f00000000000000000000000000000000000000000000000000000000000000008a8a8a308a611abb565b909350915061184c6001600160a01b038a168685613437565b604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b1580156118ae57600080fd5b505af11580156118c2573d6000803e3d6000fd5b505050506118d08583612d24565b50965096945050505050565b600061092b848484613468565b60008060006119188d7f0000000000000000000000000000000000000000000000000000000000000000612a94565b9050600087611927578c61192b565b6000195b60405163d505accf60e01b815233600482015230602482015260448101829052606481018b905260ff8916608482015260a4810188905260c481018790529091506001600160a01b0383169063d505accf9060e401600060405180830381600087803b15801561199a57600080fd5b505af11580156119ae573d6000803e3d6000fd5b505050506119c08e8e8e8e8e8e6117bb565b909f909e509c50505050505050505050505050565b600080611a028c7f0000000000000000000000000000000000000000000000000000000000000000612a94565b9050600086611a11578b611a15565b6000195b60405163d505accf60e01b815233600482015230602482015260448101829052606481018a905260ff8816608482015260a4810187905260c481018690529091506001600160a01b0383169063d505accf9060e401600060405180830381600087803b158015611a8457600080fd5b505af1158015611a98573d6000803e3d6000fd5b50505050611aaa8d8d8d8d8d8d612673565b9d9c50505050505050505050505050565b6000808242811015611b045760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b6000611b108b8b612a94565b6040516323b872dd60e01b81523360048201526001600160a01b03821660248201819052604482018c90529192506323b872dd906064016020604051808303816000875af1158015611b66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b8a91906142ad565b5060405163226bf2d160e21b81526001600160a01b03878116600483015260009182918416906389afcb449060240160408051808303816000875af1158015611bd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bfb91906142ca565b915091506000611c0b8e8e613535565b509050806001600160a01b03168e6001600160a01b031614611c2e578183611c31565b82825b90975095508a871015611c865760405162461bcd60e51b815260206004820181905260248201527f4d6f65526f757465723a20494e53554646494349454e545f415f414d4f554e5460448201526064016105b6565b89861015611cd65760405162461bcd60e51b815260206004820181905260248201527f4d6f65526f757465723a20494e53554646494349454e545f425f414d4f554e5460448201526064016105b6565b505050505097509795505050505050565b60608142811015611d2f5760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031686866000818110611d6c57611d6c614261565b9050602002016020810190611d819190614277565b6001600160a01b031614611dd15760405162461bcd60e51b815260206004820152601760248201527609adecaa4deeae8cae47440929cac82989288bea082a89604b1b60448201526064016105b6565b611e2f7f00000000000000000000000000000000000000000000000000000000000000003488888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061290992505050565b9150868260018451611e41919061424e565b81518110611e5157611e51614261565b60200260200101511015611eb55760405162461bcd60e51b815260206004820152602560248201527f4d6f65526f757465723a20494e53554646494349454e545f4f55545055545f416044820152641353d5539560da1b60648201526084016105b6565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db083600081518110611ef757611ef7614261565b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b158015611f2a57600080fd5b505af1158015611f3e573d6000803e3d6000fd5b50505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb611f888888600081811061076857610768614261565b84600081518110611f9b57611f9b614261565b60200260200101516040518363ffffffff1660e01b8152600401611fd49291906001600160a01b03929092168252602082015260400190565b6020604051808303816000875af1158015611ff3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061201791906142ad565b61202357612023613cdc565b61168882878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250612b64915050565b600080600083428110156120ad5760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b6120db8a7f00000000000000000000000000000000000000000000000000000000000000008b348c8c61361e565b9094509250600061210c8b7f0000000000000000000000000000000000000000000000000000000000000000612a94565b90506121236001600160a01b038c16338388612ae2565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561217e57600080fd5b505af1158015612192573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038581166004830152602482018990527f000000000000000000000000000000000000000000000000000000000000000016935063a9059cbb925060440190506020604051808303816000875af1158015612207573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061222b91906142ad565b61223757612237613cdc565b6040516335313c2160e11b81526001600160a01b038881166004830152821690636a627842906024016020604051808303816000875af115801561227f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122a39190614294565b9250833411156122bb576122bb33611683863461424e565b505096509650969350505050565b804281101561230f5760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168585600081811061234c5761234c614261565b90506020020160208101906123619190614277565b6001600160a01b0316146123b15760405162461bcd60e51b815260206004820152601760248201527609adecaa4deeae8cae47440929cac82989288bea082a89604b1b60448201526064016105b6565b60003490507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561241157600080fd5b505af1158015612425573d6000803e3d6000fd5b50505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb61246f8888600081811061076857610768614261565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af11580156124d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124f891906142ad565b61250457612504613cdc565b6000868661251360018261424e565b81811061252257612522614261565b90506020020160208101906125379190614277565b6040516370a0823160e01b81526001600160a01b03878116600483015291909116906370a0823190602401602060405180830381865afa15801561257f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125a39190614294565b90506125e387878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525089925061306b915050565b878188886125f260018261424e565b81811061260157612601614261565b90506020020160208101906126169190614277565b6040516370a0823160e01b81526001600160a01b03898116600483015291909116906370a0823190602401611225565b60606109627f00000000000000000000000000000000000000000000000000000000000000008484612909565b600081428110156126bb5760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b6126ea887f00000000000000000000000000000000000000000000000000000000000000008989893089611abb565b6040516370a0823160e01b815230600482015290935061276d915085906001600160a01b038b16906370a0823190602401602060405180830381865afa158015612738573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061275c9190614294565b6001600160a01b038b169190613437565b604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b1580156127cf57600080fd5b505af11580156127e3573d6000803e3d6000fd5b505050506109138483612d24565b6000806000834281101561283c5760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b8b8b61284c82828e8e8e8e61361e565b9096509450600061285d8383612a94565b90506128746001600160a01b03841633838a612ae2565b6128896001600160a01b038316338389612ae2565b6040516335313c2160e11b81526001600160a01b038a81166004830152821690636a627842906024016020604051808303816000875af11580156128d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128f59190614294565b945050505050985098509895505050505050565b606060028251101561295d5760405162461bcd60e51b815260206004820152601860248201527f4d6f654c6962726172793a20494e56414c49445f50415448000000000000000060448201526064016105b6565b815167ffffffffffffffff81111561297757612977613e3f565b6040519080825280602002602001820160405280156129a0578160200160208202803683370190505b50905082816000815181106129b7576129b7614261565b60200260200101818152505060005b600183516129d4919061424e565b811015612a8c57600080612a27878685815181106129f4576129f4614261565b602002602001015187866001612a0a91906142ee565b81518110612a1a57612a1a614261565b60200260200101516138a2565b91509150612a4f848481518110612a4057612a40614261565b60200260200101518383612dd6565b84612a5b8560016142ee565b81518110612a6b57612a6b614261565b60200260200101818152505050508080612a8490614301565b9150506129c6565b509392505050565b60006109627f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000858561397a565b6040516001600160a01b038481166024830152838116604483015260648201839052612b5e9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506139ed565b50505050565b60005b60018351612b75919061424e565b811015612b5e57600080848381518110612b9157612b91614261565b602002602001015185846001612ba791906142ee565b81518110612bb757612bb7614261565b6020026020010151915091506000612bcf8383613535565b509050600087612be08660016142ee565b81518110612bf057612bf0614261565b60200260200101519050600080836001600160a01b0316866001600160a01b031614612c1e57826000612c22565b6000835b91509150600060028a51612c36919061424e565b8810612c425788612c6f565b612c6f868b612c528b60026142ee565b81518110612c6257612c62614261565b6020026020010151612a94565b9050612c7b8787612a94565b6001600160a01b031663022c0d9f84848460006040519080825280601f01601f191660200182016040528015612cb8576020820181803683370190505b506040518563ffffffff1660e01b8152600401612cd8949392919061433e565b600060405180830381600087803b158015612cf257600080fd5b505af1158015612d06573d6000803e3d6000fd5b50505050505050505050508080612d1c90614301565b915050612b67565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612d71576040519150601f19603f3d011682016040523d82523d6000602084013e612d76565b606091505b5050905080612dd15760405162461bcd60e51b815260206004820152602160248201527f4d6f65526f757465723a204e41544956455f5452414e534645525f4641494c456044820152601160fa1b60648201526084016105b6565b505050565b6000808411612e355760405162461bcd60e51b815260206004820152602560248201527f4d6f654c6962726172793a20494e53554646494349454e545f494e5055545f416044820152641353d5539560da1b60648201526084016105b6565b600083118015612e455750600082115b612e9c5760405162461bcd60e51b815260206004820152602260248201527f4d6f654c6962726172793a20494e53554646494349454e545f4c495155494449604482015261545960f01b60648201526084016105b6565b6000612eaa856103e561438f565b90506000612eb8848361438f565b9050600082612ec9876103e861438f565b612ed391906142ee565b9050612edf81836143a6565b979650505050505050565b6060600282511015612f3e5760405162461bcd60e51b815260206004820152601860248201527f4d6f654c6962726172793a20494e56414c49445f50415448000000000000000060448201526064016105b6565b815167ffffffffffffffff811115612f5857612f58613e3f565b604051908082528060200260200182016040528015612f81578160200160208202803683370190505b509050828160018351612f94919061424e565b81518110612fa457612fa4614261565b602002602001018181525050600060018351612fc0919061424e565b90505b8015612a8c576000806130068786612fdc60018761424e565b81518110612fec57612fec614261565b6020026020010151878681518110612a1a57612a1a614261565b9150915061302e84848151811061301f5761301f614261565b60200260200101518383613311565b8461303a60018661424e565b8151811061304a5761304a614261565b60200260200101818152505050508080613063906143c8565b915050612fc3565b60005b6001835161307c919061424e565b811015612dd15760008084838151811061309857613098614261565b6020026020010151858460016130ae91906142ee565b815181106130be576130be614261565b60200260200101519150915060006130d68383613535565b50905060006130e58484612a94565b9050600080600080846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561312b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061314f91906143fd565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff169150600080876001600160a01b03168a6001600160a01b03161461319757828461319a565b83835b6040516370a0823160e01b81526001600160a01b038a8116600483015292945090925083918c16906370a0823190602401602060405180830381865afa1580156131e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061320c9190614294565b613216919061424e565b9550613223868383612dd6565b945050505050600080856001600160a01b0316886001600160a01b03161461324d57826000613251565b6000835b91509150600060028c51613265919061424e565b8a10613271578a613281565b613281888d612c528d60026142ee565b6040805160008152602081019182905263022c0d9f60e01b9091529091506001600160a01b0387169063022c0d9f906132c3908690869086906024810161433e565b600060405180830381600087803b1580156132dd57600080fd5b505af11580156132f1573d6000803e3d6000fd5b50505050505050505050505050808061330990614301565b91505061306e565b60008084116133715760405162461bcd60e51b815260206004820152602660248201527f4d6f654c6962726172793a20494e53554646494349454e545f4f55545055545f604482015265105353d5539560d21b60648201526084016105b6565b6000831180156133815750600082115b6133d85760405162461bcd60e51b815260206004820152602260248201527f4d6f654c6962726172793a20494e53554646494349454e545f4c495155494449604482015261545960f01b60648201526084016105b6565b60006133e4858561438f565b6133f0906103e861438f565b905060006133fe868561424e565b61340a906103e561438f565b90508061341860018461424e565b61342291906143a6565b61342d9060016142ee565b9695505050505050565b6040516001600160a01b03838116602483015260448201839052612dd191859182169063a9059cbb90606401612b17565b60008084116134b95760405162461bcd60e51b815260206004820152601f60248201527f4d6f654c6962726172793a20494e53554646494349454e545f414d4f554e540060448201526064016105b6565b6000831180156134c95750600082115b6135205760405162461bcd60e51b815260206004820152602260248201527f4d6f654c6962726172793a20494e53554646494349454e545f4c495155494449604482015261545960f01b60648201526084016105b6565b8261352b838661438f565b61092b91906143a6565b600080826001600160a01b0316846001600160a01b0316036135995760405162461bcd60e51b815260206004820152601f60248201527f4d6f654c6962726172793a204944454e544943414c5f4144445245535345530060448201526064016105b6565b826001600160a01b0316846001600160a01b0316106135b95782846135bc565b83835b90925090506001600160a01b0382166136175760405162461bcd60e51b815260206004820152601860248201527f4d6f654c6962726172793a205a45524f5f41444452455353000000000000000060448201526064016105b6565b9250929050565b60405163e6a4390560e01b81526001600160a01b0387811660048301528681166024830152600091829182917f00000000000000000000000000000000000000000000000000000000000000009091169063e6a4390590604401602060405180830381865afa158015613695573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136b9919061444d565b6001600160a01b03160361375d576040516364e329cb60e11b81526001600160a01b03898116600483015288811660248301527f0000000000000000000000000000000000000000000000000000000000000000169063c9c65396906044016020604051808303816000875af1158015613737573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061375b919061444d565b505b60008061378b7f00000000000000000000000000000000000000000000000000000000000000008b8b6138a2565b9150915081600014801561379d575080155b156137ad57879350869250613895565b60006137ba898484613468565b905087811161381e57858110156138135760405162461bcd60e51b815260206004820181905260248201527f4d6f65526f757465723a20494e53554646494349454e545f425f414d4f554e5460448201526064016105b6565b889450925082613893565b600061382b898486613468565b90508981111561383d5761383d613cdc565b8781101561388d5760405162461bcd60e51b815260206004820181905260248201527f4d6f65526f757465723a20494e53554646494349454e545f415f414d4f554e5460448201526064016105b6565b94508793505b505b5050965096945050505050565b60008060006138b18585613535565b5090506000806138c2888888613a50565b6001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156138ff573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061392391906143fd565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff169150826001600160a01b0316876001600160a01b03161461396857808261396b565b81815b90999098509650505050505050565b60008060006139898585613535565b6040516bffffffffffffffffffffffff19606084811b8216602084015283901b166034820152919350915060009060480160408051601f19818403018152919052805160208201209091506139e08883838c613acc565b9998505050505050505050565b6000613a026001600160a01b03841683613ae6565b90508051600014158015613a27575080806020019051810190613a2591906142ad565b155b15612dd157604051635274afe760e01b81526001600160a01b03841660048201526024016105b6565b600080846001600160a01b03166373f9936d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613a91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ab5919061444d565b9050613ac38582868661397a565b95945050505050565b600080613ad98686613af4565b905061342d818585613b9d565b606061096283836000613bc6565b600060408203516020830351835180602086010180516002830161ffca811115613b265763c8c781396000526004601cfd5b6c5af43d3d93803e603357fd5bf38852600c198801989098526035880160d81b604889901b177d6100003d81600a3d39f3363d3d373d3d3d3d610000806035363936013d731760201988015260f088901b8252603f909701601e198701209690528452601f19840152603f19909201919091525090565b600060355160ff600053603594855260609290921b600152506015919091526055600020915290565b606081471015613beb5760405163cd78605960e01b81523060048201526024016105b6565b600080856001600160a01b03168486604051613c07919061446a565b60006040518083038185875af1925050503d8060008114613c44576040519150601f19603f3d011682016040523d82523d6000602084013e613c49565b606091505b509150915061342d868383606082613c6957613c6482613cb0565b61092e565b8151158015613c8057506001600160a01b0384163b155b15613ca957604051639996b31560e01b81526001600160a01b03851660048201526024016105b6565b508061092e565b805115613cc05780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b634e487b7160e01b600052600160045260246000fd5b60008083601f840112613d0457600080fd5b50813567ffffffffffffffff811115613d1c57600080fd5b6020830191508360208260051b850101111561361757600080fd5b6001600160a01b0381168114613cd957600080fd5b8035613d5781613d37565b919050565b60008060008060008060a08789031215613d7557600080fd5b8635955060208701359450604087013567ffffffffffffffff811115613d9a57600080fd5b613da689828a01613cf2565b9095509350506060870135613dba81613d37565b80925050608087013590509295509295509295565b6020808252825182820181905260009190848201906040850190845b81811015613e0757835183529284019291840191600101613deb565b50909695505050505050565b600080600060608486031215613e2857600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215613e6857600080fd5b8235915060208084013567ffffffffffffffff80821115613e8857600080fd5b818601915086601f830112613e9c57600080fd5b813581811115613eae57613eae613e3f565b8060051b604051601f19603f83011681018181108582111715613ed357613ed3613e3f565b604052918252848201925083810185019189831115613ef157600080fd5b938501935b82851015613f1657613f0785613d4c565b84529385019392850192613ef6565b8096505050505050509250929050565b8015158114613cd957600080fd5b803560ff81168114613d5757600080fd5b60008060008060008060008060008060006101608c8e031215613f6757600080fd5b8b35613f7281613d37565b9a5060208c0135613f8281613d37565b995060408c0135985060608c0135975060808c0135965060a08c0135613fa781613d37565b955060c08c0135945060e08c0135613fbe81613f26565b9350613fcd6101008d01613f34565b92506101208c013591506101408c013590509295989b509295989b9093969950565b60008060008060006080868803121561400757600080fd5b85359450602086013567ffffffffffffffff81111561402557600080fd5b61403188828901613cf2565b909550935050604086013561404581613d37565b949793965091946060013592915050565b60008060008060008060c0878903121561406f57600080fd5b863561407a81613d37565b9550602087013594506040870135935060608701359250608087013561409f81613d37565b8092505060a087013590509295509295509295565b6000806000806000806000806000806101408b8d0312156140d457600080fd5b8a356140df81613d37565b995060208b0135985060408b0135975060608b0135965060808b013561410481613d37565b955060a08b0135945060c08b013561411b81613f26565b935061412960e08c01613f34565b92506101008b013591506101208b013590509295989b9194979a5092959850565b600080600080600080600060e0888a03121561416557600080fd5b873561417081613d37565b9650602088013561418081613d37565b955060408801359450606088013593506080880135925060a08801356141a581613d37565b8092505060c0880135905092959891949750929550565b600080600080600080600080610100898b0312156141d957600080fd5b88356141e481613d37565b975060208901356141f481613d37565b965060408901359550606089013594506080890135935060a0890135925060c089013561422081613d37565b8092505060e089013590509295985092959890939650565b634e487b7160e01b600052601160045260246000fd5b8181038181111561096557610965614238565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561428957600080fd5b813561092e81613d37565b6000602082840312156142a657600080fd5b5051919050565b6000602082840312156142bf57600080fd5b815161092e81613f26565b600080604083850312156142dd57600080fd5b505080516020909101519092909150565b8082018082111561096557610965614238565b60006001820161431357614313614238565b5060010190565b60005b8381101561433557818101518382015260200161431d565b50506000910152565b8481528360208201526001600160a01b038316604082015260806060820152600082518060808401526143788160a085016020870161431a565b601f01601f19169190910160a00195945050505050565b808202811582820484141761096557610965614238565b6000826143c357634e487b7160e01b600052601260045260246000fd5b500490565b6000816143d7576143d7614238565b506000190190565b80516dffffffffffffffffffffffffffff81168114613d5757600080fd5b60008060006060848603121561441257600080fd5b61441b846143df565b9250614429602085016143df565b9150604084015163ffffffff8116811461444257600080fd5b809150509250925092565b60006020828403121561445f57600080fd5b815161092e81613d37565b6000825161447c81846020870161431a565b919091019291505056fea26469706673582212200fc62354ca0d1d3dbe260afc83596e1a444e4d4cebf67a327160ab8410120f1a64736f6c634300081400330000000000000000000000005bef015ca9424a7c07b68490616a4c1f094bedec00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb8
Deployed Bytecode
0x60806040526004361061019a5760003560e01c80638803dbee116100e1578063c075a5911161008a578063cbacf4e411610064578063cbacf4e4146104ff578063d06ca61f14610512578063d638d85614610532578063e8e337001461055257600080fd5b8063c075a5911461048a578063c45a01551461049d578063c9e164e3146104d157600080fd5b8063b47c632e116100bb578063b47c632e1461042a578063b7de50b41461044a578063baa2abde1461046a57600080fd5b80638803dbee146103ca578063a96605e8146103ea578063ad615dec1461040a57600080fd5b80634436f4fd1161014357806371f3c5961161011d57806371f3c59614610363578063800a758a1461039757806385f8c259146103aa57600080fd5b80634436f4fd1461030357806356400497146103235780635c11d7951461034357600080fd5b80632195995c116101745780632195995c146102625780632d68efc91461029757806338ed1739146102e357600080fd5b8063029e384f146101de578063054d50d4146102145780631f00ca741461024257600080fd5b366101d957336001600160a01b037f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb816146101d7576101d7613cdc565b005b600080fd5b3480156101ea57600080fd5b506101fe6101f9366004613d5c565b610572565b60405161020b9190613dcf565b60405180910390f35b34801561022057600080fd5b5061023461022f366004613e13565b61091e565b60405190815260200161020b565b34801561024e57600080fd5b506101fe61025d366004613e55565b610935565b34801561026e57600080fd5b5061028261027d366004613f45565b61096b565b6040805192835260208301919091520161020b565b3480156102a357600080fd5b506102cb7f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb881565b6040516001600160a01b03909116815260200161020b565b3480156102ef57600080fd5b506101fe6102fe366004613d5c565b610a3d565b34801561030f57600080fd5b506101fe61031e366004613d5c565b610bc2565b34801561032f57600080fd5b506101d761033e366004613d5c565b610d89565b34801561034f57600080fd5b506101d761035e366004613d5c565b611087565b34801561036f57600080fd5b506102cb7f00000000000000000000000008477e01a19d44c31e4c11dc2ac86e3bbe69c28b81565b6101fe6103a5366004613fef565b6112cc565b3480156103b657600080fd5b506102346103c5366004613e13565b611692565b3480156103d657600080fd5b506101fe6103e5366004613d5c565b61169f565b3480156103f657600080fd5b50610282610405366004614056565b6117bb565b34801561041657600080fd5b50610234610425366004613e13565b6118dc565b34801561043657600080fd5b506102826104453660046140b4565b6118e9565b34801561045657600080fd5b506102346104653660046140b4565b6119d5565b34801561047657600080fd5b5061028261048536600461414a565b611abb565b6101fe610498366004613fef565b611ce7565b3480156104a957600080fd5b506102cb7f0000000000000000000000005bef015ca9424a7c07b68490616a4c1f094bedec81565b6104e46104df366004614056565b612062565b6040805193845260208401929092529082015260600161020b565b6101d761050d366004613fef565b6122c9565b34801561051e57600080fd5b506101fe61052d366004613e55565b612646565b34801561053e57600080fd5b5061023461054d366004614056565b612673565b34801561055e57600080fd5b506104e461056d3660046141bc565b6127f1565b606081428110156105bf5760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064015b60405180910390fd5b6001600160a01b037f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb81686866105f660018261424e565b81811061060557610605614261565b905060200201602081019061061a9190614277565b6001600160a01b03161461066a5760405162461bcd60e51b815260206004820152601760248201527609adecaa4deeae8cae47440929cac82989288bea082a89604b1b60448201526064016105b6565b6106c87f0000000000000000000000005bef015ca9424a7c07b68490616a4c1f094bedec8988888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061290992505050565b91508682600184516106da919061424e565b815181106106ea576106ea614261565b6020026020010151101561074e5760405162461bcd60e51b815260206004820152602560248201527f4d6f65526f757465723a20494e53554646494349454e545f4f55545055545f416044820152641353d5539560da1b60648201526084016105b6565b6107fe336107aa8888600081811061076857610768614261565b905060200201602081019061077d9190614277565b8989600181811061079057610790614261565b90506020020160208101906107a59190614277565b612a94565b846000815181106107bd576107bd614261565b6020026020010151898960008181106107d8576107d8614261565b90506020020160208101906107ed9190614277565b6001600160a01b0316929190612ae2565b61083d82878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250309250612b64915050565b7f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb86001600160a01b0316632e1a7d4d836001855161087b919061424e565b8151811061088b5761088b614261565b60200260200101516040518263ffffffff1660e01b81526004016108b191815260200190565b600060405180830381600087803b1580156108cb57600080fd5b505af11580156108df573d6000803e3d6000fd5b505050506109138483600185516108f6919061424e565b8151811061090657610906614261565b6020026020010151612d24565b509695505050505050565b600061092b848484612dd6565b90505b9392505050565b60606109627f0000000000000000000000005bef015ca9424a7c07b68490616a4c1f094bedec8484612eea565b90505b92915050565b600080600061097a8e8e612a94565b9050600087610989578c61098d565b6000195b60405163d505accf60e01b815233600482015230602482015260448101829052606481018b905260ff8916608482015260a4810188905260c481018790529091506001600160a01b0383169063d505accf9060e401600060405180830381600087803b1580156109fc57600080fd5b505af1158015610a10573d6000803e3d6000fd5b50505050610a238f8f8f8f8f8f8f611abb565b809450819550505050509b509b9950505050505050505050565b60608142811015610a855760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b610ae37f0000000000000000000000005bef015ca9424a7c07b68490616a4c1f094bedec8988888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061290992505050565b9150868260018451610af5919061424e565b81518110610b0557610b05614261565b60200260200101511015610b695760405162461bcd60e51b815260206004820152602560248201527f4d6f65526f757465723a20494e53554646494349454e545f4f55545055545f416044820152641353d5539560da1b60648201526084016105b6565b610b83336107aa8888600081811061076857610768614261565b61091382878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250612b64915050565b60608142811015610c0a5760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b6001600160a01b037f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb8168686610c4160018261424e565b818110610c5057610c50614261565b9050602002016020810190610c659190614277565b6001600160a01b031614610cb55760405162461bcd60e51b815260206004820152601760248201527609adecaa4deeae8cae47440929cac82989288bea082a89604b1b60448201526064016105b6565b610d137f0000000000000000000000005bef015ca9424a7c07b68490616a4c1f094bedec89888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612eea92505050565b91508682600081518110610d2957610d29614261565b6020026020010151111561074e5760405162461bcd60e51b815260206004820152602160248201527f4d6f65526f757465723a204558434553534956455f494e5055545f414d4f554e6044820152601560fa1b60648201526084016105b6565b8042811015610dcf5760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b6001600160a01b037f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb8168585610e0660018261424e565b818110610e1557610e15614261565b9050602002016020810190610e2a9190614277565b6001600160a01b031614610e7a5760405162461bcd60e51b815260206004820152601760248201527609adecaa4deeae8cae47440929cac82989288bea082a89604b1b60448201526064016105b6565b610ed033610ebc87876000818110610e9457610e94614261565b9050602002016020810190610ea99190614277565b8888600181811061079057610790614261565b89888860008181106107d8576107d8614261565b610f0e85858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525030925061306b915050565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb86001600160a01b0316906370a0823190602401602060405180830381865afa158015610f75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f999190614294565b905086811015610ff95760405162461bcd60e51b815260206004820152602560248201527f4d6f65526f757465723a20494e53554646494349454e545f4f55545055545f416044820152641353d5539560da1b60648201526084016105b6565b604051632e1a7d4d60e01b8152600481018290527f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb86001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561105b57600080fd5b505af115801561106f573d6000803e3d6000fd5b5050505061107d8482612d24565b5050505050505050565b80428110156110cd5760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b6110e733610ebc87876000818110610e9457610e94614261565b600085856110f660018261424e565b81811061110557611105614261565b905060200201602081019061111a9190614277565b6040516370a0823160e01b81526001600160a01b03868116600483015291909116906370a0823190602401602060405180830381865afa158015611162573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111869190614294565b90506111c686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525088925061306b915050565b868187876111d560018261424e565b8181106111e4576111e4614261565b90506020020160208101906111f99190614277565b6040516370a0823160e01b81526001600160a01b03888116600483015291909116906370a08231906024015b602060405180830381865afa158015611242573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112669190614294565b611270919061424e565b101561107d5760405162461bcd60e51b815260206004820152602560248201527f4d6f65526f757465723a20494e53554646494349454e545f4f55545055545f416044820152641353d5539560da1b60648201526084016105b6565b606081428110156113145760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b7f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb86001600160a01b03168686600081811061135157611351614261565b90506020020160208101906113669190614277565b6001600160a01b0316146113b65760405162461bcd60e51b815260206004820152601760248201527609adecaa4deeae8cae47440929cac82989288bea082a89604b1b60448201526064016105b6565b6114147f0000000000000000000000005bef015ca9424a7c07b68490616a4c1f094bedec88888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612eea92505050565b9150348260008151811061142a5761142a614261565b6020026020010151111561148a5760405162461bcd60e51b815260206004820152602160248201527f4d6f65526f757465723a204558434553534956455f494e5055545f414d4f554e6044820152601560fa1b60648201526084016105b6565b7f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb86001600160a01b031663d0e30db0836000815181106114cc576114cc614261565b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156114ff57600080fd5b505af1158015611513573d6000803e3d6000fd5b50505050507f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb86001600160a01b031663a9059cbb61155d8888600081811061076857610768614261565b8460008151811061157057611570614261565b60200260200101516040518363ffffffff1660e01b81526004016115a99291906001600160a01b03929092168252602082015260400190565b6020604051808303816000875af11580156115c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ec91906142ad565b6115f8576115f8613cdc565b61163782878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250612b64915050565b8160008151811061164a5761164a614261565b602002602001015134111561168857611688338360008151811061167057611670614261565b602002602001015134611683919061424e565b612d24565b5095945050505050565b600061092b848484613311565b606081428110156116e75760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b6117457f0000000000000000000000005bef015ca9424a7c07b68490616a4c1f094bedec89888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612eea92505050565b9150868260008151811061175b5761175b614261565b60200260200101511115610b695760405162461bcd60e51b815260206004820152602160248201527f4d6f65526f757465723a204558434553534956455f494e5055545f414d4f554e6044820152601560fa1b60648201526084016105b6565b60008082428110156118045760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b611833897f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb88a8a8a308a611abb565b909350915061184c6001600160a01b038a168685613437565b604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb86001600160a01b031690632e1a7d4d90602401600060405180830381600087803b1580156118ae57600080fd5b505af11580156118c2573d6000803e3d6000fd5b505050506118d08583612d24565b50965096945050505050565b600061092b848484613468565b60008060006119188d7f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb8612a94565b9050600087611927578c61192b565b6000195b60405163d505accf60e01b815233600482015230602482015260448101829052606481018b905260ff8916608482015260a4810188905260c481018790529091506001600160a01b0383169063d505accf9060e401600060405180830381600087803b15801561199a57600080fd5b505af11580156119ae573d6000803e3d6000fd5b505050506119c08e8e8e8e8e8e6117bb565b909f909e509c50505050505050505050505050565b600080611a028c7f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb8612a94565b9050600086611a11578b611a15565b6000195b60405163d505accf60e01b815233600482015230602482015260448101829052606481018a905260ff8816608482015260a4810187905260c481018690529091506001600160a01b0383169063d505accf9060e401600060405180830381600087803b158015611a8457600080fd5b505af1158015611a98573d6000803e3d6000fd5b50505050611aaa8d8d8d8d8d8d612673565b9d9c50505050505050505050505050565b6000808242811015611b045760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b6000611b108b8b612a94565b6040516323b872dd60e01b81523360048201526001600160a01b03821660248201819052604482018c90529192506323b872dd906064016020604051808303816000875af1158015611b66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b8a91906142ad565b5060405163226bf2d160e21b81526001600160a01b03878116600483015260009182918416906389afcb449060240160408051808303816000875af1158015611bd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bfb91906142ca565b915091506000611c0b8e8e613535565b509050806001600160a01b03168e6001600160a01b031614611c2e578183611c31565b82825b90975095508a871015611c865760405162461bcd60e51b815260206004820181905260248201527f4d6f65526f757465723a20494e53554646494349454e545f415f414d4f554e5460448201526064016105b6565b89861015611cd65760405162461bcd60e51b815260206004820181905260248201527f4d6f65526f757465723a20494e53554646494349454e545f425f414d4f554e5460448201526064016105b6565b505050505097509795505050505050565b60608142811015611d2f5760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b7f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb86001600160a01b031686866000818110611d6c57611d6c614261565b9050602002016020810190611d819190614277565b6001600160a01b031614611dd15760405162461bcd60e51b815260206004820152601760248201527609adecaa4deeae8cae47440929cac82989288bea082a89604b1b60448201526064016105b6565b611e2f7f0000000000000000000000005bef015ca9424a7c07b68490616a4c1f094bedec3488888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061290992505050565b9150868260018451611e41919061424e565b81518110611e5157611e51614261565b60200260200101511015611eb55760405162461bcd60e51b815260206004820152602560248201527f4d6f65526f757465723a20494e53554646494349454e545f4f55545055545f416044820152641353d5539560da1b60648201526084016105b6565b7f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb86001600160a01b031663d0e30db083600081518110611ef757611ef7614261565b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b158015611f2a57600080fd5b505af1158015611f3e573d6000803e3d6000fd5b50505050507f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb86001600160a01b031663a9059cbb611f888888600081811061076857610768614261565b84600081518110611f9b57611f9b614261565b60200260200101516040518363ffffffff1660e01b8152600401611fd49291906001600160a01b03929092168252602082015260400190565b6020604051808303816000875af1158015611ff3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061201791906142ad565b61202357612023613cdc565b61168882878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250612b64915050565b600080600083428110156120ad5760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b6120db8a7f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb88b348c8c61361e565b9094509250600061210c8b7f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb8612a94565b90506121236001600160a01b038c16338388612ae2565b7f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb86001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561217e57600080fd5b505af1158015612192573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038581166004830152602482018990527f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb816935063a9059cbb925060440190506020604051808303816000875af1158015612207573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061222b91906142ad565b61223757612237613cdc565b6040516335313c2160e11b81526001600160a01b038881166004830152821690636a627842906024016020604051808303816000875af115801561227f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122a39190614294565b9250833411156122bb576122bb33611683863461424e565b505096509650969350505050565b804281101561230f5760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b7f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb86001600160a01b03168585600081811061234c5761234c614261565b90506020020160208101906123619190614277565b6001600160a01b0316146123b15760405162461bcd60e51b815260206004820152601760248201527609adecaa4deeae8cae47440929cac82989288bea082a89604b1b60448201526064016105b6565b60003490507f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb86001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561241157600080fd5b505af1158015612425573d6000803e3d6000fd5b50505050507f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb86001600160a01b031663a9059cbb61246f8888600081811061076857610768614261565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af11580156124d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124f891906142ad565b61250457612504613cdc565b6000868661251360018261424e565b81811061252257612522614261565b90506020020160208101906125379190614277565b6040516370a0823160e01b81526001600160a01b03878116600483015291909116906370a0823190602401602060405180830381865afa15801561257f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125a39190614294565b90506125e387878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525089925061306b915050565b878188886125f260018261424e565b81811061260157612601614261565b90506020020160208101906126169190614277565b6040516370a0823160e01b81526001600160a01b03898116600483015291909116906370a0823190602401611225565b60606109627f0000000000000000000000005bef015ca9424a7c07b68490616a4c1f094bedec8484612909565b600081428110156126bb5760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b6126ea887f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb88989893089611abb565b6040516370a0823160e01b815230600482015290935061276d915085906001600160a01b038b16906370a0823190602401602060405180830381865afa158015612738573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061275c9190614294565b6001600160a01b038b169190613437565b604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb86001600160a01b031690632e1a7d4d90602401600060405180830381600087803b1580156127cf57600080fd5b505af11580156127e3573d6000803e3d6000fd5b505050506109138483612d24565b6000806000834281101561283c5760405162461bcd60e51b8152602060048201526012602482015271135bd9549bdd5d195c8e881156141254915160721b60448201526064016105b6565b8b8b61284c82828e8e8e8e61361e565b9096509450600061285d8383612a94565b90506128746001600160a01b03841633838a612ae2565b6128896001600160a01b038316338389612ae2565b6040516335313c2160e11b81526001600160a01b038a81166004830152821690636a627842906024016020604051808303816000875af11580156128d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128f59190614294565b945050505050985098509895505050505050565b606060028251101561295d5760405162461bcd60e51b815260206004820152601860248201527f4d6f654c6962726172793a20494e56414c49445f50415448000000000000000060448201526064016105b6565b815167ffffffffffffffff81111561297757612977613e3f565b6040519080825280602002602001820160405280156129a0578160200160208202803683370190505b50905082816000815181106129b7576129b7614261565b60200260200101818152505060005b600183516129d4919061424e565b811015612a8c57600080612a27878685815181106129f4576129f4614261565b602002602001015187866001612a0a91906142ee565b81518110612a1a57612a1a614261565b60200260200101516138a2565b91509150612a4f848481518110612a4057612a40614261565b60200260200101518383612dd6565b84612a5b8560016142ee565b81518110612a6b57612a6b614261565b60200260200101818152505050508080612a8490614301565b9150506129c6565b509392505050565b60006109627f0000000000000000000000005bef015ca9424a7c07b68490616a4c1f094bedec7f00000000000000000000000008477e01a19d44c31e4c11dc2ac86e3bbe69c28b858561397a565b6040516001600160a01b038481166024830152838116604483015260648201839052612b5e9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506139ed565b50505050565b60005b60018351612b75919061424e565b811015612b5e57600080848381518110612b9157612b91614261565b602002602001015185846001612ba791906142ee565b81518110612bb757612bb7614261565b6020026020010151915091506000612bcf8383613535565b509050600087612be08660016142ee565b81518110612bf057612bf0614261565b60200260200101519050600080836001600160a01b0316866001600160a01b031614612c1e57826000612c22565b6000835b91509150600060028a51612c36919061424e565b8810612c425788612c6f565b612c6f868b612c528b60026142ee565b81518110612c6257612c62614261565b6020026020010151612a94565b9050612c7b8787612a94565b6001600160a01b031663022c0d9f84848460006040519080825280601f01601f191660200182016040528015612cb8576020820181803683370190505b506040518563ffffffff1660e01b8152600401612cd8949392919061433e565b600060405180830381600087803b158015612cf257600080fd5b505af1158015612d06573d6000803e3d6000fd5b50505050505050505050508080612d1c90614301565b915050612b67565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612d71576040519150601f19603f3d011682016040523d82523d6000602084013e612d76565b606091505b5050905080612dd15760405162461bcd60e51b815260206004820152602160248201527f4d6f65526f757465723a204e41544956455f5452414e534645525f4641494c456044820152601160fa1b60648201526084016105b6565b505050565b6000808411612e355760405162461bcd60e51b815260206004820152602560248201527f4d6f654c6962726172793a20494e53554646494349454e545f494e5055545f416044820152641353d5539560da1b60648201526084016105b6565b600083118015612e455750600082115b612e9c5760405162461bcd60e51b815260206004820152602260248201527f4d6f654c6962726172793a20494e53554646494349454e545f4c495155494449604482015261545960f01b60648201526084016105b6565b6000612eaa856103e561438f565b90506000612eb8848361438f565b9050600082612ec9876103e861438f565b612ed391906142ee565b9050612edf81836143a6565b979650505050505050565b6060600282511015612f3e5760405162461bcd60e51b815260206004820152601860248201527f4d6f654c6962726172793a20494e56414c49445f50415448000000000000000060448201526064016105b6565b815167ffffffffffffffff811115612f5857612f58613e3f565b604051908082528060200260200182016040528015612f81578160200160208202803683370190505b509050828160018351612f94919061424e565b81518110612fa457612fa4614261565b602002602001018181525050600060018351612fc0919061424e565b90505b8015612a8c576000806130068786612fdc60018761424e565b81518110612fec57612fec614261565b6020026020010151878681518110612a1a57612a1a614261565b9150915061302e84848151811061301f5761301f614261565b60200260200101518383613311565b8461303a60018661424e565b8151811061304a5761304a614261565b60200260200101818152505050508080613063906143c8565b915050612fc3565b60005b6001835161307c919061424e565b811015612dd15760008084838151811061309857613098614261565b6020026020010151858460016130ae91906142ee565b815181106130be576130be614261565b60200260200101519150915060006130d68383613535565b50905060006130e58484612a94565b9050600080600080846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561312b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061314f91906143fd565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff169150600080876001600160a01b03168a6001600160a01b03161461319757828461319a565b83835b6040516370a0823160e01b81526001600160a01b038a8116600483015292945090925083918c16906370a0823190602401602060405180830381865afa1580156131e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061320c9190614294565b613216919061424e565b9550613223868383612dd6565b945050505050600080856001600160a01b0316886001600160a01b03161461324d57826000613251565b6000835b91509150600060028c51613265919061424e565b8a10613271578a613281565b613281888d612c528d60026142ee565b6040805160008152602081019182905263022c0d9f60e01b9091529091506001600160a01b0387169063022c0d9f906132c3908690869086906024810161433e565b600060405180830381600087803b1580156132dd57600080fd5b505af11580156132f1573d6000803e3d6000fd5b50505050505050505050505050808061330990614301565b91505061306e565b60008084116133715760405162461bcd60e51b815260206004820152602660248201527f4d6f654c6962726172793a20494e53554646494349454e545f4f55545055545f604482015265105353d5539560d21b60648201526084016105b6565b6000831180156133815750600082115b6133d85760405162461bcd60e51b815260206004820152602260248201527f4d6f654c6962726172793a20494e53554646494349454e545f4c495155494449604482015261545960f01b60648201526084016105b6565b60006133e4858561438f565b6133f0906103e861438f565b905060006133fe868561424e565b61340a906103e561438f565b90508061341860018461424e565b61342291906143a6565b61342d9060016142ee565b9695505050505050565b6040516001600160a01b03838116602483015260448201839052612dd191859182169063a9059cbb90606401612b17565b60008084116134b95760405162461bcd60e51b815260206004820152601f60248201527f4d6f654c6962726172793a20494e53554646494349454e545f414d4f554e540060448201526064016105b6565b6000831180156134c95750600082115b6135205760405162461bcd60e51b815260206004820152602260248201527f4d6f654c6962726172793a20494e53554646494349454e545f4c495155494449604482015261545960f01b60648201526084016105b6565b8261352b838661438f565b61092b91906143a6565b600080826001600160a01b0316846001600160a01b0316036135995760405162461bcd60e51b815260206004820152601f60248201527f4d6f654c6962726172793a204944454e544943414c5f4144445245535345530060448201526064016105b6565b826001600160a01b0316846001600160a01b0316106135b95782846135bc565b83835b90925090506001600160a01b0382166136175760405162461bcd60e51b815260206004820152601860248201527f4d6f654c6962726172793a205a45524f5f41444452455353000000000000000060448201526064016105b6565b9250929050565b60405163e6a4390560e01b81526001600160a01b0387811660048301528681166024830152600091829182917f0000000000000000000000005bef015ca9424a7c07b68490616a4c1f094bedec9091169063e6a4390590604401602060405180830381865afa158015613695573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136b9919061444d565b6001600160a01b03160361375d576040516364e329cb60e11b81526001600160a01b03898116600483015288811660248301527f0000000000000000000000005bef015ca9424a7c07b68490616a4c1f094bedec169063c9c65396906044016020604051808303816000875af1158015613737573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061375b919061444d565b505b60008061378b7f0000000000000000000000005bef015ca9424a7c07b68490616a4c1f094bedec8b8b6138a2565b9150915081600014801561379d575080155b156137ad57879350869250613895565b60006137ba898484613468565b905087811161381e57858110156138135760405162461bcd60e51b815260206004820181905260248201527f4d6f65526f757465723a20494e53554646494349454e545f425f414d4f554e5460448201526064016105b6565b889450925082613893565b600061382b898486613468565b90508981111561383d5761383d613cdc565b8781101561388d5760405162461bcd60e51b815260206004820181905260248201527f4d6f65526f757465723a20494e53554646494349454e545f415f414d4f554e5460448201526064016105b6565b94508793505b505b5050965096945050505050565b60008060006138b18585613535565b5090506000806138c2888888613a50565b6001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156138ff573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061392391906143fd565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff169150826001600160a01b0316876001600160a01b03161461396857808261396b565b81815b90999098509650505050505050565b60008060006139898585613535565b6040516bffffffffffffffffffffffff19606084811b8216602084015283901b166034820152919350915060009060480160408051601f19818403018152919052805160208201209091506139e08883838c613acc565b9998505050505050505050565b6000613a026001600160a01b03841683613ae6565b90508051600014158015613a27575080806020019051810190613a2591906142ad565b155b15612dd157604051635274afe760e01b81526001600160a01b03841660048201526024016105b6565b600080846001600160a01b03166373f9936d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613a91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ab5919061444d565b9050613ac38582868661397a565b95945050505050565b600080613ad98686613af4565b905061342d818585613b9d565b606061096283836000613bc6565b600060408203516020830351835180602086010180516002830161ffca811115613b265763c8c781396000526004601cfd5b6c5af43d3d93803e603357fd5bf38852600c198801989098526035880160d81b604889901b177d6100003d81600a3d39f3363d3d373d3d3d3d610000806035363936013d731760201988015260f088901b8252603f909701601e198701209690528452601f19840152603f19909201919091525090565b600060355160ff600053603594855260609290921b600152506015919091526055600020915290565b606081471015613beb5760405163cd78605960e01b81523060048201526024016105b6565b600080856001600160a01b03168486604051613c07919061446a565b60006040518083038185875af1925050503d8060008114613c44576040519150601f19603f3d011682016040523d82523d6000602084013e613c49565b606091505b509150915061342d868383606082613c6957613c6482613cb0565b61092e565b8151158015613c8057506001600160a01b0384163b155b15613ca957604051639996b31560e01b81526001600160a01b03851660048201526024016105b6565b508061092e565b805115613cc05780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b634e487b7160e01b600052600160045260246000fd5b60008083601f840112613d0457600080fd5b50813567ffffffffffffffff811115613d1c57600080fd5b6020830191508360208260051b850101111561361757600080fd5b6001600160a01b0381168114613cd957600080fd5b8035613d5781613d37565b919050565b60008060008060008060a08789031215613d7557600080fd5b8635955060208701359450604087013567ffffffffffffffff811115613d9a57600080fd5b613da689828a01613cf2565b9095509350506060870135613dba81613d37565b80925050608087013590509295509295509295565b6020808252825182820181905260009190848201906040850190845b81811015613e0757835183529284019291840191600101613deb565b50909695505050505050565b600080600060608486031215613e2857600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215613e6857600080fd5b8235915060208084013567ffffffffffffffff80821115613e8857600080fd5b818601915086601f830112613e9c57600080fd5b813581811115613eae57613eae613e3f565b8060051b604051601f19603f83011681018181108582111715613ed357613ed3613e3f565b604052918252848201925083810185019189831115613ef157600080fd5b938501935b82851015613f1657613f0785613d4c565b84529385019392850192613ef6565b8096505050505050509250929050565b8015158114613cd957600080fd5b803560ff81168114613d5757600080fd5b60008060008060008060008060008060006101608c8e031215613f6757600080fd5b8b35613f7281613d37565b9a5060208c0135613f8281613d37565b995060408c0135985060608c0135975060808c0135965060a08c0135613fa781613d37565b955060c08c0135945060e08c0135613fbe81613f26565b9350613fcd6101008d01613f34565b92506101208c013591506101408c013590509295989b509295989b9093969950565b60008060008060006080868803121561400757600080fd5b85359450602086013567ffffffffffffffff81111561402557600080fd5b61403188828901613cf2565b909550935050604086013561404581613d37565b949793965091946060013592915050565b60008060008060008060c0878903121561406f57600080fd5b863561407a81613d37565b9550602087013594506040870135935060608701359250608087013561409f81613d37565b8092505060a087013590509295509295509295565b6000806000806000806000806000806101408b8d0312156140d457600080fd5b8a356140df81613d37565b995060208b0135985060408b0135975060608b0135965060808b013561410481613d37565b955060a08b0135945060c08b013561411b81613f26565b935061412960e08c01613f34565b92506101008b013591506101208b013590509295989b9194979a5092959850565b600080600080600080600060e0888a03121561416557600080fd5b873561417081613d37565b9650602088013561418081613d37565b955060408801359450606088013593506080880135925060a08801356141a581613d37565b8092505060c0880135905092959891949750929550565b600080600080600080600080610100898b0312156141d957600080fd5b88356141e481613d37565b975060208901356141f481613d37565b965060408901359550606089013594506080890135935060a0890135925060c089013561422081613d37565b8092505060e089013590509295985092959890939650565b634e487b7160e01b600052601160045260246000fd5b8181038181111561096557610965614238565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561428957600080fd5b813561092e81613d37565b6000602082840312156142a657600080fd5b5051919050565b6000602082840312156142bf57600080fd5b815161092e81613f26565b600080604083850312156142dd57600080fd5b505080516020909101519092909150565b8082018082111561096557610965614238565b60006001820161431357614313614238565b5060010190565b60005b8381101561433557818101518382015260200161431d565b50506000910152565b8481528360208201526001600160a01b038316604082015260806060820152600082518060808401526143788160a085016020870161431a565b601f01601f19169190910160a00195945050505050565b808202811582820484141761096557610965614238565b6000826143c357634e487b7160e01b600052601260045260246000fd5b500490565b6000816143d7576143d7614238565b506000190190565b80516dffffffffffffffffffffffffffff81168114613d5757600080fd5b60008060006060848603121561441257600080fd5b61441b846143df565b9250614429602085016143df565b9150604084015163ffffffff8116811461444257600080fd5b809150509250925092565b60006020828403121561445f57600080fd5b815161092e81613d37565b6000825161447c81846020870161431a565b919091019291505056fea26469706673582212200fc62354ca0d1d3dbe260afc83596e1a444e4d4cebf67a327160ab8410120f1a64736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000005bef015ca9424a7c07b68490616a4c1f094bedec00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb8
-----Decoded View---------------
Arg [0] : _factory (address): 0x5bEf015CA9424A7C07B68490616a4C1F094BEdEc
Arg [1] : _wNative (address): 0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000005bef015ca9424a7c07b68490616a4c1f094bedec
Arg [1] : 00000000000000000000000078c1b0c915c4faa5fffa6cabf0219da63d7f4cb8
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in MNT
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.