Source Code
Latest 25 from a total of 88,866 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Swap Exact Token... | 41284043 | 12 hrs ago | IN | 0 ETH | 0.00000373 | ||||
| Swap Exact Token... | 41283499 | 12 hrs ago | IN | 0 ETH | 0.00000176 | ||||
| Swap Exact ETH F... | 41283052 | 13 hrs ago | IN | 0.00142039 ETH | 0.00000235 | ||||
| Swap Exact Token... | 41282866 | 13 hrs ago | IN | 0 ETH | 0.00000236 | ||||
| Swap Exact Token... | 41282600 | 13 hrs ago | IN | 0 ETH | 0.00000278 | ||||
| Swap Exact ETH F... | 41282269 | 13 hrs ago | IN | 0.00225223 ETH | 0.00000352 | ||||
| Swap Exact Token... | 41281958 | 13 hrs ago | IN | 0 ETH | 0.00000204 | ||||
| Swap Exact Token... | 41281157 | 14 hrs ago | IN | 0 ETH | 0.00000236 | ||||
| Swap Exact Token... | 41280766 | 14 hrs ago | IN | 0 ETH | 0.00000184 | ||||
| Swap Exact ETH F... | 41280626 | 14 hrs ago | IN | 0.00204442 ETH | 0.00000203 | ||||
| Swap Exact ETH F... | 41280330 | 14 hrs ago | IN | 0.00273123 ETH | 0.00000214 | ||||
| Swap Exact ETH F... | 41280163 | 14 hrs ago | IN | 0.00385306 ETH | 0.00000212 | ||||
| Swap Exact ETH F... | 41279368 | 15 hrs ago | IN | 0.00270873 ETH | 0.00000153 | ||||
| Swap Exact ETH F... | 41279173 | 15 hrs ago | IN | 0.00109951 ETH | 0.00000153 | ||||
| Swap Exact Token... | 41278989 | 15 hrs ago | IN | 0 ETH | 0.00000129 | ||||
| Swap Exact ETH F... | 41278938 | 15 hrs ago | IN | 0.00309404 ETH | 0.00000137 | ||||
| Swap Exact Token... | 41278688 | 15 hrs ago | IN | 0 ETH | 0.0000014 | ||||
| Swap Exact ETH F... | 41278608 | 15 hrs ago | IN | 0.00294647 ETH | 0.00000137 | ||||
| Swap Exact Token... | 41278511 | 15 hrs ago | IN | 0 ETH | 0.0000013 | ||||
| Swap Exact Token... | 41278497 | 15 hrs ago | IN | 0 ETH | 0.00000184 | ||||
| Swap Exact ETH F... | 41277964 | 16 hrs ago | IN | 0.00148916 ETH | 0.00000114 | ||||
| Swap Exact Token... | 41276173 | 17 hrs ago | IN | 0 ETH | 0.00000061 | ||||
| Swap Exact Token... | 41275973 | 17 hrs ago | IN | 0 ETH | 0.00000056 | ||||
| Swap Exact ETH F... | 41275939 | 17 hrs ago | IN | 0.00096448 ETH | 0.00000057 | ||||
| Swap Exact Token... | 41275929 | 17 hrs ago | IN | 0 ETH | 0.00000057 |
Latest 25 internal transactions (View All)
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 41284043 | 12 hrs ago | 0.00062628 ETH | ||||
| 41284043 | 12 hrs ago | 0.00062628 ETH | ||||
| 41283499 | 12 hrs ago | 0.0006188 ETH | ||||
| 41283499 | 12 hrs ago | 0.0006188 ETH | ||||
| 41283052 | 13 hrs ago | 0.00142039 ETH | ||||
| 41282866 | 13 hrs ago | 0.00366257 ETH | ||||
| 41282866 | 13 hrs ago | 0.00366257 ETH | ||||
| 41282600 | 13 hrs ago | 0.00099021 ETH | ||||
| 41282600 | 13 hrs ago | 0.00099021 ETH | ||||
| 41282269 | 13 hrs ago | 0.00225223 ETH | ||||
| 41281958 | 13 hrs ago | 0.00200395 ETH | ||||
| 41281958 | 13 hrs ago | 0.00200395 ETH | ||||
| 41281157 | 14 hrs ago | 0.00260363 ETH | ||||
| 41281157 | 14 hrs ago | 0.00260363 ETH | ||||
| 41280766 | 14 hrs ago | 0.00373401 ETH | ||||
| 41280766 | 14 hrs ago | 0.00373401 ETH | ||||
| 41280626 | 14 hrs ago | 0.00204442 ETH | ||||
| 41280330 | 14 hrs ago | 0.00273123 ETH | ||||
| 41280163 | 14 hrs ago | 0.00385306 ETH | ||||
| 41279368 | 15 hrs ago | 0.00270873 ETH | ||||
| 41279173 | 15 hrs ago | 0.00109951 ETH | ||||
| 41278989 | 15 hrs ago | 0.00246884 ETH | ||||
| 41278989 | 15 hrs ago | 0.00246884 ETH | ||||
| 41278938 | 15 hrs ago | 0.00309404 ETH | ||||
| 41278688 | 15 hrs ago | 0.0021171 ETH |
Cross-Chain Transactions
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x238a9f53...C1f72Fa2d The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
Router
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
import "contracts/libraries/Math.sol";
import "contracts/interfaces/IPair.sol";
import "contracts/interfaces/IPairFactory.sol";
import "contracts/interfaces/ILockFactory.sol";
import "contracts/interfaces/IRouter.sol";
import "contracts/interfaces/IWETH.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
contract Router is IRouter {
using SafeERC20 for IERC20;
struct route {
address from;
address to;
bool stable;
}
address public immutable factory;
ILockFactory public immutable lockFactory;
IWETH public immutable weth;
uint internal constant MINIMUM_LIQUIDITY = 10 ** 3;
bytes32 immutable pairCodeHash;
modifier ensure(uint deadline) {
require(deadline >= block.timestamp, "Router: EXPIRED");
_;
}
constructor(address _factory, ILockFactory _lockFactory, address _weth) {
factory = _factory;
lockFactory = _lockFactory;
pairCodeHash = IPairFactory(_factory).pairCodeHash();
weth = IWETH(_weth);
}
receive() external payable {
assert(msg.sender == address(weth)); // only accept ETH via fallback from the WETH contract
}
function sortTokens(
address tokenA,
address tokenB
) public pure returns (address token0, address token1) {
require(tokenA != tokenB, "Router: IDENTICAL_ADDRESSES");
(token0, token1) = tokenA < tokenB
? (tokenA, tokenB)
: (tokenB, tokenA);
require(token0 != address(0), "Router: ZERO_ADDRESS");
}
// calculates the CREATE2 address for a pair without making any external calls
function pairFor(
address tokenA,
address tokenB,
bool stable
) public view returns (address pair) {
(address token0, address token1) = sortTokens(tokenA, tokenB);
pair = address(
uint160(
uint256(
keccak256(
abi.encodePacked(
hex"ff",
factory,
keccak256(abi.encodePacked(token0, token1, stable)),
pairCodeHash // init code hash
)
)
)
)
);
}
// given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
function quoteLiquidity(
uint amountA,
uint reserveA,
uint reserveB
) internal pure returns (uint amountB) {
require(amountA > 0, "Router: INSUFFICIENT_AMOUNT");
require(reserveA > 0 && reserveB > 0, "Router: INSUFFICIENT_LIQUIDITY");
amountB = (amountA * reserveB) / reserveA;
}
// fetches and sorts the reserves for a pair
function getReserves(
address tokenA,
address tokenB,
bool stable
) public view returns (uint reserveA, uint reserveB) {
(address token0, ) = sortTokens(tokenA, tokenB);
(uint reserve0, uint reserve1, ) = IPair(
pairFor(tokenA, tokenB, stable)
).getReserves();
(reserveA, reserveB) = tokenA == token0
? (reserve0, reserve1)
: (reserve1, reserve0);
}
// performs chained getAmountOut calculations on any number of pairs
function getAmountOut(
uint amountIn,
address tokenIn,
address tokenOut
) external view returns (uint amount, bool stable) {
address pair = pairFor(tokenIn, tokenOut, true);
uint amountStable;
uint amountVolatile;
if (IPairFactory(factory).isPair(pair)) {
amountStable = IPair(pair).getAmountOut(amountIn, tokenIn);
}
pair = pairFor(tokenIn, tokenOut, false);
if (IPairFactory(factory).isPair(pair)) {
amountVolatile = IPair(pair).getAmountOut(amountIn, tokenIn);
}
return
amountStable > amountVolatile
? (amountStable, true)
: (amountVolatile, false);
}
// performs chained getAmountOut calculations on any number of pairs
function getAmountsOut(
uint amountIn,
route[] memory routes
) public view returns (uint[] memory amounts) {
require(routes.length >= 1, "Router: INVALID_PATH");
amounts = new uint[](routes.length + 1);
amounts[0] = amountIn;
for (uint i = 0; i < routes.length; i++) {
address pair = pairFor(
routes[i].from,
routes[i].to,
routes[i].stable
);
if (IPairFactory(factory).isPair(pair)) {
amounts[i + 1] = IPair(pair).getAmountOut(
amounts[i],
routes[i].from
);
}
}
}
function isPair(address pair) external view returns (bool) {
return IPairFactory(factory).isPair(pair);
}
function quoteAddLiquidity(
address tokenA,
address tokenB,
bool stable,
uint amountADesired,
uint amountBDesired
) external view returns (uint amountA, uint amountB, uint liquidity) {
// create the pair if it doesn't exist yet
address _pair = IPairFactory(factory).getPair(tokenA, tokenB, stable);
(uint reserveA, uint reserveB) = (0, 0);
uint _totalSupply = 0;
if (_pair != address(0)) {
_totalSupply = IERC20(_pair).totalSupply();
(reserveA, reserveB) = getReserves(tokenA, tokenB, stable);
}
if (reserveA == 0 && reserveB == 0) {
(amountA, amountB) = (amountADesired, amountBDesired);
liquidity = Math.sqrt(amountA * amountB) - MINIMUM_LIQUIDITY;
} else {
uint amountBOptimal = quoteLiquidity(
amountADesired,
reserveA,
reserveB
);
if (amountBOptimal <= amountBDesired) {
(amountA, amountB) = (amountADesired, amountBOptimal);
liquidity = Math.min(
(amountA * _totalSupply) / reserveA,
(amountB * _totalSupply) / reserveB
);
} else {
uint amountAOptimal = quoteLiquidity(
amountBDesired,
reserveB,
reserveA
);
(amountA, amountB) = (amountAOptimal, amountBDesired);
liquidity = Math.min(
(amountA * _totalSupply) / reserveA,
(amountB * _totalSupply) / reserveB
);
}
}
}
function quoteRemoveLiquidity(
address tokenA,
address tokenB,
bool stable,
uint liquidity
) external view returns (uint amountA, uint amountB) {
// create the pair if it doesn't exist yet
address _pair = IPairFactory(factory).getPair(tokenA, tokenB, stable);
if (_pair == address(0)) {
return (0, 0);
}
(uint reserveA, uint reserveB) = getReserves(tokenA, tokenB, stable);
uint _totalSupply = IERC20(_pair).totalSupply();
amountA = (liquidity * reserveA) / _totalSupply; // using balances ensures pro-rata distribution
amountB = (liquidity * reserveB) / _totalSupply; // using balances ensures pro-rata distribution
}
function _addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
bool stable,
uint256 lockerFeesP
) internal returns (uint amountA, uint amountB) {
require(amountADesired >= amountAMin);
require(amountBDesired >= amountBMin);
// create the pair if it doesn't exist yet
address _pair = IPairFactory(factory).getPair(tokenA, tokenB, stable);
if (_pair == address(0)) {
address feeDistributor;
if (lockerFeesP > 0) {
_pair = pairFor(tokenA, tokenB, stable);
feeDistributor = lockFactory.createLock(_pair, lockerFeesP);
}
_pair = IPairFactory(factory).createPair(
tokenA,
tokenB,
stable,
lockerFeesP,
feeDistributor
);
}
(uint reserveA, uint reserveB) = getReserves(tokenA, tokenB, stable);
if (reserveA == 0 && reserveB == 0) {
(amountA, amountB) = (amountADesired, amountBDesired);
} else {
uint amountBOptimal = quoteLiquidity(
amountADesired,
reserveA,
reserveB
);
if (amountBOptimal <= amountBDesired) {
require(
amountBOptimal >= amountBMin,
"Router: INSUFFICIENT_B_AMOUNT"
);
(amountA, amountB) = (amountADesired, amountBOptimal);
} else {
uint amountAOptimal = quoteLiquidity(
amountBDesired,
reserveB,
reserveA
);
assert(amountAOptimal <= amountADesired);
require(
amountAOptimal >= amountAMin,
"Router: INSUFFICIENT_A_AMOUNT"
);
(amountA, amountB) = (amountAOptimal, amountBDesired);
}
}
}
// Add liquidity, if pair doesn't exist then use lockerFeesP for creating a pair.
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool stable,
uint256 lockerFeesP
)
external
ensure(deadline)
returns (uint amountA, uint amountB, uint liquidity)
{
(amountA, amountB) = _addLiquidity(
tokenA,
tokenB,
amountADesired,
amountBDesired,
amountAMin,
amountBMin,
stable,
lockerFeesP
);
address pair = pairFor(tokenA, tokenB, stable);
_safeTransfer(tokenA, msg.sender, pair, amountA);
_safeTransfer(tokenB, msg.sender, pair, amountB);
liquidity = IPair(pair).mint(to);
}
// Add ETH liquidity, if pair doesn't exist then use lockerFeesP for creating a pair.
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool stable,
uint256 lockerFeesP
)
external
payable
ensure(deadline)
returns (uint amountToken, uint amountETH, uint liquidity)
{
(amountToken, amountETH) = _addLiquidity(
token,
address(weth),
amountTokenDesired,
msg.value,
amountTokenMin,
amountETHMin,
stable,
lockerFeesP
);
address pair = pairFor(token, address(weth), stable);
_safeTransfer(token, msg.sender, pair, amountToken);
weth.deposit{value: amountETH}();
assert(weth.transfer(pair, amountETH));
liquidity = IPair(pair).mint(to);
// refund dust eth, if any
if (msg.value > amountETH)
_safeTransferETH(msg.sender, msg.value - amountETH);
}
// **** REMOVE LIQUIDITY ****
function removeLiquidity(
address tokenA,
address tokenB,
bool stable,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) public ensure(deadline) returns (uint amountA, uint amountB) {
address pair = pairFor(tokenA, tokenB, stable);
require(IPair(pair).transferFrom(msg.sender, pair, liquidity)); // send liquidity to pair
(uint amount0, uint amount1) = IPair(pair).burn(to);
(address token0, ) = sortTokens(tokenA, tokenB);
(amountA, amountB) = tokenA == token0
? (amount0, amount1)
: (amount1, amount0);
require(amountA >= amountAMin, "Router: INSUFFICIENT_A_AMOUNT");
require(amountB >= amountBMin, "Router: INSUFFICIENT_B_AMOUNT");
}
function removeLiquidityETH(
address token,
bool stable,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) public ensure(deadline) returns (uint amountToken, uint amountETH) {
(amountToken, amountETH) = removeLiquidity(
token,
address(weth),
stable,
liquidity,
amountTokenMin,
amountETHMin,
address(this),
deadline
);
_safeTransfer(token, address(this), to, amountToken);
weth.withdraw(amountETH);
_safeTransferETH(to, amountETH);
}
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
bool stable,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint amountA, uint amountB) {
address pair = pairFor(tokenA, tokenB, stable);
{
uint value = approveMax ? type(uint).max : liquidity;
IPair(pair).permit(
msg.sender,
address(this),
value,
deadline,
v,
r,
s
);
}
(amountA, amountB) = removeLiquidity(
tokenA,
tokenB,
stable,
liquidity,
amountAMin,
amountBMin,
to,
deadline
);
}
function removeLiquidityETHWithPermit(
address token,
bool stable,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint amountToken, uint amountETH) {
address pair = pairFor(token, address(weth), stable);
uint value = approveMax ? type(uint).max : liquidity;
IPair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
(amountToken, amountETH) = removeLiquidityETH(
token,
stable,
liquidity,
amountTokenMin,
amountETHMin,
to,
deadline
);
}
// **** SWAP ****
// requires the initial amount to have already been sent to the first pair
function _swap(
uint[] memory amounts,
route[] memory routes,
address _to
) internal virtual {
for (uint i = 0; i < routes.length; i++) {
(address token0, ) = sortTokens(routes[i].from, routes[i].to);
uint amountOut = amounts[i + 1];
(uint amount0Out, uint amount1Out) = routes[i].from == token0
? (uint(0), amountOut)
: (amountOut, uint(0));
address to = i < routes.length - 1
? pairFor(
routes[i + 1].from,
routes[i + 1].to,
routes[i + 1].stable
)
: _to;
IPair(pairFor(routes[i].from, routes[i].to, routes[i].stable)).swap(
amount0Out,
amount1Out,
to,
new bytes(0)
);
}
}
function swapExactTokensForTokensSimple(
uint amountIn,
uint amountOutMin,
address tokenFrom,
address tokenTo,
bool stable,
address to,
uint deadline
) external ensure(deadline) returns (uint[] memory amounts) {
route[] memory routes = new route[](1);
routes[0].from = tokenFrom;
routes[0].to = tokenTo;
routes[0].stable = stable;
amounts = getAmountsOut(amountIn, routes);
require(
amounts[amounts.length - 1] >= amountOutMin,
"Router: INSUFFICIENT_OUTPUT_AMOUNT"
);
_safeTransfer(
routes[0].from,
msg.sender,
pairFor(routes[0].from, routes[0].to, routes[0].stable),
amounts[0]
);
_swap(amounts, routes, to);
}
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
route[] calldata routes,
address to,
uint deadline
) external ensure(deadline) returns (uint[] memory amounts) {
amounts = getAmountsOut(amountIn, routes);
require(
amounts[amounts.length - 1] >= amountOutMin,
"Router: INSUFFICIENT_OUTPUT_AMOUNT"
);
_safeTransfer(
routes[0].from,
msg.sender,
pairFor(routes[0].from, routes[0].to, routes[0].stable),
amounts[0]
);
_swap(amounts, routes, to);
}
function swapExactETHForTokens(
uint amountOutMin,
route[] calldata routes,
address to,
uint deadline
) external payable ensure(deadline) returns (uint[] memory amounts) {
require(routes[0].from == address(weth), "Router: INVALID_PATH");
amounts = getAmountsOut(msg.value, routes);
require(
amounts[amounts.length - 1] >= amountOutMin,
"Router: INSUFFICIENT_OUTPUT_AMOUNT"
);
weth.deposit{value: amounts[0]}();
assert(
weth.transfer(
pairFor(routes[0].from, routes[0].to, routes[0].stable),
amounts[0]
)
);
_swap(amounts, routes, to);
}
function swapExactTokensForETH(
uint amountIn,
uint amountOutMin,
route[] calldata routes,
address to,
uint deadline
) external ensure(deadline) returns (uint[] memory amounts) {
require(
routes[routes.length - 1].to == address(weth),
"Router: INVALID_PATH"
);
amounts = getAmountsOut(amountIn, routes);
require(
amounts[amounts.length - 1] >= amountOutMin,
"Router: INSUFFICIENT_OUTPUT_AMOUNT"
);
_safeTransfer(
routes[0].from,
msg.sender,
pairFor(routes[0].from, routes[0].to, routes[0].stable),
amounts[0]
);
_swap(amounts, routes, address(this));
weth.withdraw(amounts[amounts.length - 1]);
_safeTransferETH(to, amounts[amounts.length - 1]);
}
function UNSAFE_swapExactTokensForTokens(
uint[] memory amounts,
route[] calldata routes,
address to,
uint deadline
) external ensure(deadline) returns (uint[] memory) {
_safeTransfer(
routes[0].from,
msg.sender,
pairFor(routes[0].from, routes[0].to, routes[0].stable),
amounts[0]
);
_swap(amounts, routes, to);
return amounts;
}
function _safeTransferETH(address to, uint value) internal {
(bool success, ) = to.call{value: value}(new bytes(0));
require(success, "TransferHelper: ETH_TRANSFER_FAILED");
}
function _safeTransfer(
address token,
address from,
address to,
uint256 value
) internal {
if (token == address(0)) {
require(msg.value >= value, "not enough value");
(bool success, ) = payable(to).call{value: value}("");
require(success, "Should transfer ethers");
} else {
if (from == address(this)) {
IERC20(token).safeTransfer(to, value);
} else {
IERC20(token).safeTransferFrom(from, to, value);
}
}
}
}// 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/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/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: MIT
pragma solidity 0.8.20;
interface ILockFactory {
function getInitFeeDistributor() external view returns (address);
function getInitTokenLocker()
external
view
returns (address, uint256, uint256);
function createLock(
address pair,
uint256 lockerFeesP
) external returns (address);
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
interface IPair {
function metadata()
external
view
returns (
uint dec0,
uint dec1,
uint r0,
uint r1,
bool st,
address t0,
address t1
);
function claimFees() external returns (uint, uint);
function tokens() external view returns (address, address);
function transferFrom(
address src,
address dst,
uint amount
) external returns (bool);
function permit(
address owner,
address spender,
uint value,
uint deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
function swap(
uint amount0Out,
uint amount1Out,
address to,
bytes calldata data
) external;
function burn(address to) external returns (uint amount0, uint amount1);
function mint(address to) external returns (uint liquidity);
function getReserves()
external
view
returns (uint _reserve0, uint _reserve1, uint _blockTimestampLast);
function getAmountOut(uint, address) external view returns (uint);
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
interface IPairFactory {
function allPairsLength() external view returns (uint);
function isPair(address pair) external view returns (bool);
function pairCodeHash() external pure returns (bytes32);
function getPair(
address tokenA,
address token,
bool stable
) external view returns (address);
function createPair(
address tokenA,
address tokenB,
bool stable,
uint256 lockerFeesP,
address feeDistributor
) external returns (address pair);
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
interface IRouter {
function pairFor(
address tokenA,
address tokenB,
bool stable
) external view returns (address pair);
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
interface IWETH {
function deposit() external payable;
function transfer(address to, uint256 value) external returns (bool);
function withdraw(uint256) external;
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
library Math {
function max(uint a, uint b) internal pure returns (uint) {
return a >= b ? a : b;
}
function min(uint a, uint b) internal pure returns (uint) {
return a < b ? a : b;
}
function sqrt(uint y) internal pure returns (uint z) {
if (y > 3) {
z = y;
uint x = y / 2 + 1;
while (x < z) {
z = x;
x = (y / x + x) / 2;
}
} else if (y != 0) {
z = 1;
}
}
function cbrt(uint256 n) internal pure returns (uint256) {
unchecked {
uint256 x = 0;
for (uint256 y = 1 << 255; y > 0; y >>= 3) {
x <<= 1;
uint256 z = 3 * x * (x + 1) + 1;
if (n / y >= z) {
n -= y * z;
x += 1;
}
}
return x;
}
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"contract ILockFactory","name":"_lockFactory","type":"address"},{"internalType":"address","name":"_weth","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":"uint256[]","name":"amounts","type":"uint256[]"},{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"stable","type":"bool"}],"internalType":"struct Router.route[]","name":"routes","type":"tuple[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"UNSAFE_swapExactTokensForTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"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"},{"internalType":"bool","name":"stable","type":"bool"},{"internalType":"uint256","name":"lockerFeesP","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":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"stable","type":"bool"},{"internalType":"uint256","name":"lockerFeesP","type":"uint256"}],"name":"addLiquidityETH","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","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":"amountIn","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"}],"name":"getAmountOut","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"stable","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"stable","type":"bool"}],"internalType":"struct Router.route[]","name":"routes","type":"tuple[]"}],"name":"getAmountsOut","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"bool","name":"stable","type":"bool"}],"name":"getReserves","outputs":[{"internalType":"uint256","name":"reserveA","type":"uint256"},{"internalType":"uint256","name":"reserveB","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pair","type":"address"}],"name":"isPair","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockFactory","outputs":[{"internalType":"contract ILockFactory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"bool","name":"stable","type":"bool"}],"name":"pairFor","outputs":[{"internalType":"address","name":"pair","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"bool","name":"stable","type":"bool"},{"internalType":"uint256","name":"amountADesired","type":"uint256"},{"internalType":"uint256","name":"amountBDesired","type":"uint256"}],"name":"quoteAddLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"bool","name":"stable","type":"bool"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"name":"quoteRemoveLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"bool","name":"stable","type":"bool"},{"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":"bool","name":"stable","type":"bool"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidityETH","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"bool","name":"stable","type":"bool"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","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":"removeLiquidityETHWithPermit","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"bool","name":"stable","type":"bool"},{"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":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"}],"name":"sortTokens","outputs":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"stable","type":"bool"}],"internalType":"struct Router.route[]","name":"routes","type":"tuple[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactETHForTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"stable","type":"bool"}],"internalType":"struct Router.route[]","name":"routes","type":"tuple[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForETH","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"stable","type":"bool"}],"internalType":"struct Router.route[]","name":"routes","type":"tuple[]"},{"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":"tokenFrom","type":"address"},{"internalType":"address","name":"tokenTo","type":"address"},{"internalType":"bool","name":"stable","type":"bool"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForTokensSimple","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"contract IWETH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
0x6101006040523480156200001257600080fd5b5060405162003c9d38038062003c9d8339810160408190526200003591620000de565b6001600160a01b03808416608081905290831660a05260408051631355724960e31b81529051639aab9248916004808201926020929091908290030181865afa15801562000087573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000ad919062000132565b60e0526001600160a01b031660c052506200014c9050565b6001600160a01b0381168114620000db57600080fd5b50565b600080600060608486031215620000f457600080fd5b83516200010181620000c5565b60208501519093506200011481620000c5565b60408501519092506200012781620000c5565b809150509250925092565b6000602082840312156200014557600080fd5b5051919050565b60805160a05160c05160e051613a76620002276000396000610f45015260008181610149015281816102620152818161095801528181610b9701528181610df5015281816110d70152818161110e01528181611143015281816111d80152818161161f01528181611732015281816117c001528181611fa20152611ff3015260008181610216015261286601526000818161044c01528181610cac01528181610f0a015281816113260152818161143a01528181611b4501528181611ce901528181612172015281816127ad01526129160152613a766000f3fe6080604052600436106101395760003560e01c80635e60dab5116100ab578063a32b1fcd1161006f578063a32b1fcd1461041a578063c45a01551461043a578063d7b0e0a51461046e578063dcd660d61461048e578063e5e31b13146104ae578063f41766d8146104de57600080fd5b80635e60dab51461038757806367ffb66a146103a75780637301e3c8146103ba5780639881fcb4146103da57806398a0fb3c146103fa57600080fd5b80634386e63c116100fd5780634386e63c14610284578063448725b4146102a45780634c1ee03e146102c4578063544caa56146102e45780635c314b79146103245780635e1e63251461035257600080fd5b80630dede6c41461017d57806313dcfc59146101b757806318a13086146101e45780631db9be1b146102045780633fc8cef31461025057600080fd5b3661017857336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461017657610176612e06565b005b600080fd5b34801561018957600080fd5b5061019d610198366004612e4a565b6104fe565b604080519283526020830191909152015b60405180910390f35b3480156101c357600080fd5b506101d76101d2366004612ecf565b610718565b6040516101ae9190612f4a565b3480156101f057600080fd5b506101d76101ff366004612fd3565b61092b565b34801561021057600080fd5b506102387f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101ae565b34801561025c57600080fd5b506102387f000000000000000000000000000000000000000000000000000000000000000081565b34801561029057600080fd5b5061019d61029f366004613046565b610c76565b3480156102b057600080fd5b5061019d6102bf3660046130a8565b610dea565b3480156102d057600080fd5b506102386102df366004613152565b610ec3565b3480156102f057600080fd5b506103046102ff36600461319d565b610fcb565b604080516001600160a01b039384168152929091166020830152016101ae565b6103376103323660046131d6565b6110ab565b604080519384526020840192909252908201526060016101ae565b34801561035e57600080fd5b5061037261036d36600461323a565b6112ee565b604080519283529015156020830152016101ae565b34801561039357600080fd5b5061019d6103a2366004613152565b611542565b6101d76103b5366004613271565b6115fa565b3480156103c657600080fd5b506101d76103d5366004613343565b611959565b3480156103e657600080fd5b506101d76103f5366004613485565b611a2f565b34801561040657600080fd5b5061033761041536600461352b565b611cb1565b34801561042657600080fd5b5061019d610435366004613586565b611ebd565b34801561044657600080fd5b506102387f000000000000000000000000000000000000000000000000000000000000000081565b34801561047a57600080fd5b5061019d610489366004613642565b611f78565b34801561049a57600080fd5b506103376104a936600461369d565b61206e565b3480156104ba57600080fd5b506104ce6104c9366004613737565b612150565b60405190151581526020016101ae565b3480156104ea57600080fd5b506101d76104f9366004612fd3565b6121e5565b600080824281101561052b5760405162461bcd60e51b815260040161052290613754565b60405180910390fd5b60006105388c8c8c610ec3565b6040516323b872dd60e01b81523360048201526001600160a01b03821660248201819052604482018c90529192506323b872dd906064016020604051808303816000875af115801561058e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b2919061377d565b6105bb57600080fd5b60405163226bf2d160e21b81526001600160a01b03878116600483015260009182918416906389afcb449060240160408051808303816000875af1158015610607573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062b919061379a565b91509150600061063b8f8f610fcb565b509050806001600160a01b03168f6001600160a01b03161461065e578183610661565b82825b90975095508a8710156106b65760405162461bcd60e51b815260206004820152601d60248201527f526f757465723a20494e53554646494349454e545f415f414d4f554e540000006044820152606401610522565b898610156107065760405162461bcd60e51b815260206004820152601d60248201527f526f757465723a20494e53554646494349454e545f425f414d4f554e540000006044820152606401610522565b50505050509850989650505050505050565b6060814281101561073b5760405162461bcd60e51b815260040161052290613754565b604080516001808252818301909252600091816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816107525790505090508781600081518110610795576107956137be565b6020026020010151600001906001600160a01b031690816001600160a01b03168152505086816000815181106107cd576107cd6137be565b6020026020010151602001906001600160a01b031690816001600160a01b0316815250508581600081518110610805576108056137be565b60209081029190910101519015156040909101526108238a82611a2f565b925088836001855161083591906137ea565b81518110610845576108456137be565b6020026020010151101561086b5760405162461bcd60e51b8152600401610522906137fd565b61091381600081518110610881576108816137be565b602002602001015160000151336108f3846000815181106108a4576108a46137be565b602002602001015160000151856000815181106108c3576108c36137be565b602002602001015160200151866000815181106108e2576108e26137be565b602002602001015160400151610ec3565b86600081518110610906576109066137be565b602002602001015161230a565b61091e838287612441565b5050979650505050505050565b6060814281101561094e5760405162461bcd60e51b815260040161052290613754565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001686866109856001826137ea565b818110610994576109946137be565b90506060020160200160208101906109ac9190613737565b6001600160a01b0316146109d25760405162461bcd60e51b81526004016105229061383f565b610a2e888787808060200260200160405190810160405280939291908181526020016000905b82821015610a2457610a156060830286013681900381019061386d565b815260200190600101906109f8565b5050505050611a2f565b9150868260018451610a4091906137ea565b81518110610a5057610a506137be565b60200260200101511015610a765760405162461bcd60e51b8152600401610522906137fd565b610b3886866000818110610a8c57610a8c6137be565b610aa29260206060909202019081019150613737565b33610b2589896000818110610ab957610ab96137be565b610acf9260206060909202019081019150613737565b8a8a6000818110610ae257610ae26137be565b9050606002016020016020810190610afa9190613737565b8b8b6000818110610b0d57610b0d6137be565b90506060020160400160208101906102df9190613889565b85600081518110610906576109066137be565b610b95828787808060200260200160405190810160405280939291908181526020016000905b82821015610b8a57610b7b6060830286013681900381019061386d565b81526020019060010190610b5e565b505050505030612441565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d8360018551610bd391906137ea565b81518110610be357610be36137be565b60200260200101516040518263ffffffff1660e01b8152600401610c0991815260200190565b600060405180830381600087803b158015610c2357600080fd5b505af1158015610c37573d6000803e3d6000fd5b50505050610c6b848360018551610c4e91906137ea565b81518110610c5e57610c5e6137be565b6020026020010151612690565b509695505050505050565b6040516306801cc360e41b81526001600160a01b03858116600483015284811660248301528315156044830152600091829182917f000000000000000000000000000000000000000000000000000000000000000090911690636801cc3090606401602060405180830381865afa158015610cf5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1991906138a6565b90506001600160a01b038116610d36576000809250925050610de1565b600080610d44898989611542565b915091506000836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dac91906138c3565b905080610db984896138dc565b610dc391906138f3565b955080610dd083896138dc565b610dda91906138f3565b9450505050505b94509492505050565b6000806000610e1a8e7f00000000000000000000000000000000000000000000000000000000000000008f610ec3565b9050600087610e29578c610e2d565b6000195b60405163d505accf60e01b81529091506001600160a01b0383169063d505accf90610e68903390309086908f908e908e908e90600401613915565b600060405180830381600087803b158015610e8257600080fd5b505af1158015610e96573d6000803e3d6000fd5b50505050610ea98f8f8f8f8f8f8f611f78565b809450819550505050509b509b9950505050505050505050565b6000806000610ed28686610fcb565b6040516bffffffffffffffffffffffff19606084811b8216602084015283901b16603482015286151560f81b604882015291935091507f000000000000000000000000000000000000000000000000000000000000000090604901604051602081830303815290604052805190602001207f0000000000000000000000000000000000000000000000000000000000000000604051602001610fa9939291906001600160f81b0319815260609390931b6bffffffffffffffffffffffff191660018401526015830191909152603582015260550190565b60408051601f1981840301815291905280516020909101209695505050505050565b600080826001600160a01b0316846001600160a01b03160361102f5760405162461bcd60e51b815260206004820152601b60248201527f526f757465723a204944454e544943414c5f41444452455353455300000000006044820152606401610522565b826001600160a01b0316846001600160a01b03161061104f578284611052565b83835b90925090506001600160a01b0382166110a45760405162461bcd60e51b8152602060048201526014602482015273526f757465723a205a45524f5f4144445245535360601b6044820152606401610522565b9250929050565b600080600085428110156110d15760405162461bcd60e51b815260040161052290613754565b6111018c7f00000000000000000000000000000000000000000000000000000000000000008d348e8e8c8c61275e565b909450925060006111338d7f000000000000000000000000000000000000000000000000000000000000000089610ec3565b90506111418d33838861230a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561119c57600080fd5b505af11580156111b0573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038581166004830152602482018990527f000000000000000000000000000000000000000000000000000000000000000016935063a9059cbb925060440190506020604051808303816000875af1158015611225573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611249919061377d565b61125557611255612e06565b6040516335313c2160e11b81526001600160a01b038a81166004830152821690636a627842906024016020604051808303816000875af115801561129d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c191906138c3565b9250833411156112de576112de336112d986346137ea565b612690565b5050985098509895505050505050565b60008060006112ff85856001610ec3565b60405163e5e31b1360e01b81526001600160a01b03828116600483015291925060009182917f00000000000000000000000000000000000000000000000000000000000000009091169063e5e31b1390602401602060405180830381865afa15801561136f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611393919061377d565b1561140c576040516378a051ad60e11b8152600481018990526001600160a01b03888116602483015284169063f140a35a90604401602060405180830381865afa1580156113e5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140991906138c3565b91505b61141887876000610ec3565b60405163e5e31b1360e01b81526001600160a01b0380831660048301529194507f00000000000000000000000000000000000000000000000000000000000000009091169063e5e31b1390602401602060405180830381865afa158015611483573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a7919061377d565b15611520576040516378a051ad60e11b8152600481018990526001600160a01b03888116602483015284169063f140a35a90604401602060405180830381865afa1580156114f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061151d91906138c3565b90505b80821161152f57806000611533565b8160015b94509450505050935093915050565b60008060006115518686610fcb565b509050600080611562888888610ec3565b6001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561159f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115c39190613956565b5091509150826001600160a01b0316886001600160a01b0316146115e85780826115eb565b81815b90999098509650505050505050565b6060814281101561161d5760405162461bcd60e51b815260040161052290613754565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168686600081811061165a5761165a6137be565b6116709260206060909202019081019150613737565b6001600160a01b0316146116965760405162461bcd60e51b81526004016105229061383f565b6116e8348787808060200260200160405190810160405280939291908181526020016000905b82821015610a24576116d96060830286013681900381019061386d565b815260200190600101906116bc565b91508682600184516116fa91906137ea565b8151811061170a5761170a6137be565b602002602001015110156117305760405162461bcd60e51b8152600401610522906137fd565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db083600081518110611772576117726137be565b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156117a557600080fd5b505af11580156117b9573d6000803e3d6000fd5b50505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb61185788886000818110611803576118036137be565b6118199260206060909202019081019150613737565b8989600081811061182c5761182c6137be565b90506060020160200160208101906118449190613737565b8a8a6000818110610b0d57610b0d6137be565b8460008151811061186a5761186a6137be565b60200260200101516040518363ffffffff1660e01b81526004016118a39291906001600160a01b03929092168252602082015260400190565b6020604051808303816000875af11580156118c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118e6919061377d565b6118f2576118f2612e06565b61194f828787808060200260200160405190810160405280939291908181526020016000905b82821015611944576119356060830286013681900381019061386d565b81526020019060010190611918565b505050505086612441565b5095945050505050565b6060814281101561197c5760405162461bcd60e51b815260040161052290613754565b6119d286866000818110611992576119926137be565b6119a89260206060909202019081019150613737565b336119bf89896000818110610ab957610ab96137be565b8a600081518110610906576109066137be565b611a24878787808060200260200160405190810160405280939291908181526020016000905b8282101561194457611a156060830286013681900381019061386d565b815260200190600101906119f8565b509495945050505050565b6060600182511015611a535760405162461bcd60e51b81526004016105229061383f565b8151611a60906001613984565b67ffffffffffffffff811115611a7857611a786132d8565b604051908082528060200260200182016040528015611aa1578160200160208202803683370190505b5090508281600081518110611ab857611ab86137be565b60200260200101818152505060005b8251811015611caa576000611b23848381518110611ae757611ae76137be565b602002602001015160000151858481518110611b0557611b056137be565b6020026020010151602001518685815181106108e2576108e26137be565b60405163e5e31b1360e01b81526001600160a01b0380831660048301529192507f00000000000000000000000000000000000000000000000000000000000000009091169063e5e31b1390602401602060405180830381865afa158015611b8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb2919061377d565b15611c9757806001600160a01b031663f140a35a848481518110611bd857611bd86137be565b6020026020010151868581518110611bf257611bf26137be565b6020026020010151600001516040518363ffffffff1660e01b8152600401611c2d9291909182526001600160a01b0316602082015260400190565b602060405180830381865afa158015611c4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6e91906138c3565b83611c7a846001613984565b81518110611c8a57611c8a6137be565b6020026020010181815250505b5080611ca281613997565b915050611ac7565b5092915050565b6040516306801cc360e41b81526001600160a01b038681166004830152858116602483015284151560448301526000918291829182917f00000000000000000000000000000000000000000000000000000000000000001690636801cc3090606401602060405180830381865afa158015611d30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d5491906138a6565b9050600080806001600160a01b03841615611dde57836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611da7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dcb91906138c3565b9050611dd88c8c8c611542565b90935091505b82158015611dea575081155b15611e1b578896508795506103e8611e0a611e05888a6138dc565b612aaf565b611e1491906137ea565b9450611eae565b6000611e288a8585612b1f565b9050888111611e7057899750955085611e6984611e45848b6138dc565b611e4f91906138f3565b84611e5a858b6138dc565b611e6491906138f3565b612be9565b9550611eac565b6000611e7d8a8587612b1f565b9850899750889050611ea885611e9385846138dc565b611e9d91906138f3565b85611e5a868c6138dc565b9650505b505b50505050955095509592505050565b6000806000611ecd8f8f8f610ec3565b9050600087611edc578c611ee0565b6000195b60405163d505accf60e01b81529091506001600160a01b0383169063d505accf90611f1b903390309086908f908e908e908e90600401613915565b600060405180830381600087803b158015611f3557600080fd5b505af1158015611f49573d6000803e3d6000fd5b5050505050611f5e8f8f8f8f8f8f8f8f6104fe565b8093508194505050509c509c9a5050505050505050505050565b6000808242811015611f9c5760405162461bcd60e51b815260040161052290613754565b611fcc8a7f00000000000000000000000000000000000000000000000000000000000000008b8b8b8b308b6104fe565b9093509150611fdd8a30878661230a565b604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561203f57600080fd5b505af1158015612053573d6000803e3d6000fd5b505050506120618583612690565b5097509795505050505050565b600080600085428110156120945760405162461bcd60e51b815260040161052290613754565b6120a48e8e8e8e8e8e8c8c61275e565b909450925060006120b68f8f89610ec3565b90506120c48f33838861230a565b6120d08e33838761230a565b6040516335313c2160e11b81526001600160a01b038a81166004830152821690636a627842906024016020604051808303816000875af1158015612118573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061213c91906138c3565b925050509a509a509a975050505050505050565b60405163e5e31b1360e01b81526001600160a01b0382811660048301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063e5e31b1390602401602060405180830381865afa1580156121bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121df919061377d565b92915050565b606081428110156122085760405162461bcd60e51b815260040161052290613754565b61225a888787808060200260200160405190810160405280939291908181526020016000905b82821015610a245761224b6060830286013681900381019061386d565b8152602001906001019061222e565b915086826001845161226c91906137ea565b8151811061227c5761227c6137be565b602002602001015110156122a25760405162461bcd60e51b8152600401610522906137fd565b6122b886866000818110610a8c57610a8c6137be565b610c6b828787808060200260200160405190810160405280939291908181526020016000905b82821015611944576122fb6060830286013681900381019061386d565b815260200190600101906122de565b6001600160a01b0384166123fd578034101561235b5760405162461bcd60e51b815260206004820152601060248201526f6e6f7420656e6f7567682076616c756560801b6044820152606401610522565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146123a8576040519150601f19603f3d011682016040523d82523d6000602084013e6123ad565b606091505b50509050806123f75760405162461bcd60e51b815260206004820152601660248201527553686f756c64207472616e736665722065746865727360501b6044820152606401610522565b5061243b565b306001600160a01b03841603612426576124216001600160a01b0385168383612c01565b61243b565b61243b6001600160a01b038516848484612c60565b50505050565b60005b825181101561243b576000612493848381518110612464576124646137be565b602002602001015160000151858481518110612482576124826137be565b602002602001015160200151610fcb565b5090506000856124a4846001613984565b815181106124b4576124b46137be565b60200260200101519050600080836001600160a01b03168786815181106124dd576124dd6137be565b6020026020010151600001516001600160a01b0316146124ff57826000612503565b6000835b9150915060006001885161251791906137ea565b86106125235786612596565b61259688612532886001613984565b81518110612542576125426137be565b6020026020010151600001518988600161255c9190613984565b8151811061256c5761256c6137be565b6020026020010151602001518a8960016125869190613984565b815181106108e2576108e26137be565b90506125e98887815181106125ad576125ad6137be565b6020026020010151600001518988815181106125cb576125cb6137be565b6020026020010151602001518a89815181106108e2576108e26137be565b6001600160a01b031663022c0d9f84848460006040519080825280601f01601f191660200182016040528015612626576020820181803683370190505b506040518563ffffffff1660e01b815260040161264694939291906139d4565b600060405180830381600087803b15801561266057600080fd5b505af1158015612674573d6000803e3d6000fd5b505050505050505050808061268890613997565b915050612444565b604080516000808252602082019092526001600160a01b0384169083906040516126ba9190613a24565b60006040518083038185875af1925050503d80600081146126f7576040519150601f19603f3d011682016040523d82523d6000602084013e6126fc565b606091505b50509050806127595760405162461bcd60e51b815260206004820152602360248201527f5472616e7366657248656c7065723a204554485f5452414e534645525f46414960448201526213115160ea1b6064820152608401610522565b505050565b6000808588101561276e57600080fd5b8487101561277b57600080fd5b6040516306801cc360e41b81526001600160a01b038b811660048301528a8116602483015285151560448301526000917f000000000000000000000000000000000000000000000000000000000000000090911690636801cc3090606401602060405180830381865afa1580156127f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061281a91906138a6565b90506001600160a01b03811661298757600084156128d85761283d8c8c88610ec3565b6040516354c5718560e11b81526001600160a01b038083166004830152602482018890529193507f00000000000000000000000000000000000000000000000000000000000000009091169063a98ae30a906044016020604051808303816000875af11580156128b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128d591906138a6565b90505b6040516333c2c0b360e01b81526001600160a01b038d811660048301528c8116602483015287151560448301526064820187905282811660848301527f000000000000000000000000000000000000000000000000000000000000000016906333c2c0b39060a4016020604051808303816000875af115801561295f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061298391906138a6565b9150505b6000806129958d8d89611542565b915091508160001480156129a7575080155b156129b7578a9450899350612a9f565b60006129c48c8484612b1f565b90508a8111612a285788811015612a1d5760405162461bcd60e51b815260206004820152601d60248201527f526f757465723a20494e53554646494349454e545f425f414d4f554e540000006044820152606401610522565b8b9550935083612a9d565b6000612a358c8486612b1f565b90508c811115612a4757612a47612e06565b8a811015612a975760405162461bcd60e51b815260206004820152601d60248201527f526f757465723a20494e53554646494349454e545f415f414d4f554e540000006044820152606401610522565b95508a94505b505b5050509850989650505050505050565b60006003821115612b105750806000612ac96002836138f3565b612ad4906001613984565b90505b81811015612b0a57905080600281612aef81866138f3565b612af99190613984565b612b0391906138f3565b9050612ad7565b50919050565b8115612b1a575060015b919050565b6000808411612b705760405162461bcd60e51b815260206004820152601b60248201527f526f757465723a20494e53554646494349454e545f414d4f554e5400000000006044820152606401610522565b600083118015612b805750600082115b612bcc5760405162461bcd60e51b815260206004820152601e60248201527f526f757465723a20494e53554646494349454e545f4c495155494449545900006044820152606401610522565b82612bd783866138dc565b612be191906138f3565b949350505050565b6000818310612bf85781612bfa565b825b9392505050565b6040516001600160a01b0383811660248301526044820183905261275991859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050612c99565b6040516001600160a01b03848116602483015283811660448301526064820183905261243b9186918216906323b872dd90608401612c2e565b6000612cae6001600160a01b03841683612cfc565b90508051600014158015612cd3575080806020019051810190612cd1919061377d565b155b1561275957604051635274afe760e01b81526001600160a01b0384166004820152602401610522565b6060612bfa8383600084600080856001600160a01b03168486604051612d229190613a24565b60006040518083038185875af1925050503d8060008114612d5f576040519150601f19603f3d011682016040523d82523d6000602084013e612d64565b606091505b5091509150612d74868383612d7e565b9695505050505050565b606082612d9357612d8e82612dda565b612bfa565b8151158015612daa57506001600160a01b0384163b155b15612dd357604051639996b31560e01b81526001600160a01b0385166004820152602401610522565b5080612bfa565b805115612dea5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b634e487b7160e01b600052600160045260246000fd5b6001600160a01b0381168114612e0357600080fd5b8035612b1a81612e1c565b8015158114612e0357600080fd5b600080600080600080600080610100898b031215612e6757600080fd5b8835612e7281612e1c565b97506020890135612e8281612e1c565b96506040890135612e9281612e3c565b9550606089013594506080890135935060a0890135925060c0890135612eb781612e1c565b8092505060e089013590509295985092959890939650565b600080600080600080600060e0888a031215612eea57600080fd5b87359650602088013595506040880135612f0381612e1c565b94506060880135612f1381612e1c565b93506080880135612f2381612e3c565b925060a0880135612f3381612e1c565b8092505060c0880135905092959891949750929550565b6020808252825182820181905260009190848201906040850190845b81811015612f8257835183529284019291840191600101612f66565b50909695505050505050565b60008083601f840112612fa057600080fd5b50813567ffffffffffffffff811115612fb857600080fd5b6020830191508360206060830285010111156110a457600080fd5b60008060008060008060a08789031215612fec57600080fd5b8635955060208701359450604087013567ffffffffffffffff81111561301157600080fd5b61301d89828a01612f8e565b909550935050606087013561303181612e1c565b80925050608087013590509295509295509295565b6000806000806080858703121561305c57600080fd5b843561306781612e1c565b9350602085013561307781612e1c565b9250604085013561308781612e3c565b9396929550929360600135925050565b803560ff81168114612b1a57600080fd5b60008060008060008060008060008060006101608c8e0312156130ca57600080fd5b8b356130d581612e1c565b9a5060208c01356130e581612e3c565b995060408c0135985060608c0135975060808c0135965060a08c013561310a81612e1c565b955060c08c0135945060e08c013561312181612e3c565b93506131306101008d01613097565b92506101208c013591506101408c013590509295989b509295989b9093969950565b60008060006060848603121561316757600080fd5b833561317281612e1c565b9250602084013561318281612e1c565b9150604084013561319281612e3c565b809150509250925092565b600080604083850312156131b057600080fd5b82356131bb81612e1c565b915060208301356131cb81612e1c565b809150509250929050565b600080600080600080600080610100898b0312156131f357600080fd5b88356131fe81612e1c565b9750602089013596506040890135955060608901359450608089013561322381612e1c565b935060a0890135925060c0890135612eb781612e3c565b60008060006060848603121561324f57600080fd5b83359250602084013561326181612e1c565b9150604084013561319281612e1c565b60008060008060006080868803121561328957600080fd5b85359450602086013567ffffffffffffffff8111156132a757600080fd5b6132b388828901612f8e565b90955093505060408601356132c781612e1c565b949793965091946060013592915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613317576133176132d8565b604052919050565b600067ffffffffffffffff821115613339576133396132d8565b5060051b60200190565b60008060008060006080868803121561335b57600080fd5b853567ffffffffffffffff8082111561337357600080fd5b818801915088601f83011261338757600080fd5b8135602061339c6133978361331f565b6132ee565b82815260059290921b8401810191818101908c8411156133bb57600080fd5b948201945b838610156133d9578535825294820194908201906133c0565b995050890135925050808211156133ef57600080fd5b506133fc88828901612f8e565b90955093506132c7905060408701612e31565b60006060828403121561342157600080fd5b6040516060810181811067ffffffffffffffff82111715613444576134446132d8565b604052905080823561345581612e1c565b8152602083013561346581612e1c565b6020820152604083013561347881612e3c565b6040919091015292915050565b6000806040838503121561349857600080fd5b8235915060208084013567ffffffffffffffff8111156134b757600080fd5b8401601f810186136134c857600080fd5b80356134d66133978261331f565b818152606091820283018401918482019190898411156134f557600080fd5b938501935b8385101561351b5761350c8a8661340f565b835293840193918501916134fa565b5080955050505050509250929050565b600080600080600060a0868803121561354357600080fd5b853561354e81612e1c565b9450602086013561355e81612e1c565b9350604086013561356e81612e3c565b94979396509394606081013594506080013592915050565b6000806000806000806000806000806000806101808d8f0312156135a957600080fd5b8c356135b481612e1c565b9b5060208d01356135c481612e1c565b9a5060408d01356135d481612e3c565b995060608d0135985060808d0135975060a08d0135965060c08d01356135f981612e1c565b955060e08d013594506101008d013561361181612e3c565b93506136206101208e01613097565b92506101408d013591506101608d013590509295989b509295989b509295989b565b600080600080600080600060e0888a03121561365d57600080fd5b873561366881612e1c565b9650602088013561367881612e3c565b955060408801359450606088013593506080880135925060a0880135612f3381612e1c565b6000806000806000806000806000806101408b8d0312156136bd57600080fd5b8a356136c881612e1c565b995060208b01356136d881612e1c565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b013561370481612e1c565b935060e08b013592506101008b013561371c81612e3c565b809250506101208b013590509295989b9194979a5092959850565b60006020828403121561374957600080fd5b8135612bfa81612e1c565b6020808252600f908201526e149bdd5d195c8e8811561412549151608a1b604082015260600190565b60006020828403121561378f57600080fd5b8151612bfa81612e3c565b600080604083850312156137ad57600080fd5b505080516020909101519092909150565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156121df576121df6137d4565b60208082526022908201527f526f757465723a20494e53554646494349454e545f4f55545055545f414d4f55604082015261139560f21b606082015260800190565b6020808252601490820152730a4deeae8cae47440929cac82989288bea082a8960631b604082015260600190565b60006060828403121561387f57600080fd5b612bfa838361340f565b60006020828403121561389b57600080fd5b8135612bfa81612e3c565b6000602082840312156138b857600080fd5b8151612bfa81612e1c565b6000602082840312156138d557600080fd5b5051919050565b80820281158282048414176121df576121df6137d4565b60008261391057634e487b7160e01b600052601260045260246000fd5b500490565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b60008060006060848603121561396b57600080fd5b8351925060208401519150604084015190509250925092565b808201808211156121df576121df6137d4565b6000600182016139a9576139a96137d4565b5060010190565b60005b838110156139cb5781810151838201526020016139b3565b50506000910152565b84815283602082015260018060a01b03831660408201526080606082015260008251806080840152613a0d8160a08501602087016139b0565b601f01601f19169190910160a00195945050505050565b60008251613a368184602087016139b0565b919091019291505056fea26469706673582212206d9c13d36f69561385e85bb0a60b6290b4f7d5aaead85477bdab29c8ecb07cfc64736f6c634300081400330000000000000000000000002d9a3a2bd6400ee28d770c7254ca840c82faf23f0000000000000000000000002d259c6c1a7acb410326ca662a26ca3fddb890ba0000000000000000000000004200000000000000000000000000000000000006
Deployed Bytecode
0x6080604052600436106101395760003560e01c80635e60dab5116100ab578063a32b1fcd1161006f578063a32b1fcd1461041a578063c45a01551461043a578063d7b0e0a51461046e578063dcd660d61461048e578063e5e31b13146104ae578063f41766d8146104de57600080fd5b80635e60dab51461038757806367ffb66a146103a75780637301e3c8146103ba5780639881fcb4146103da57806398a0fb3c146103fa57600080fd5b80634386e63c116100fd5780634386e63c14610284578063448725b4146102a45780634c1ee03e146102c4578063544caa56146102e45780635c314b79146103245780635e1e63251461035257600080fd5b80630dede6c41461017d57806313dcfc59146101b757806318a13086146101e45780631db9be1b146102045780633fc8cef31461025057600080fd5b3661017857336001600160a01b037f0000000000000000000000004200000000000000000000000000000000000006161461017657610176612e06565b005b600080fd5b34801561018957600080fd5b5061019d610198366004612e4a565b6104fe565b604080519283526020830191909152015b60405180910390f35b3480156101c357600080fd5b506101d76101d2366004612ecf565b610718565b6040516101ae9190612f4a565b3480156101f057600080fd5b506101d76101ff366004612fd3565b61092b565b34801561021057600080fd5b506102387f0000000000000000000000002d259c6c1a7acb410326ca662a26ca3fddb890ba81565b6040516001600160a01b0390911681526020016101ae565b34801561025c57600080fd5b506102387f000000000000000000000000420000000000000000000000000000000000000681565b34801561029057600080fd5b5061019d61029f366004613046565b610c76565b3480156102b057600080fd5b5061019d6102bf3660046130a8565b610dea565b3480156102d057600080fd5b506102386102df366004613152565b610ec3565b3480156102f057600080fd5b506103046102ff36600461319d565b610fcb565b604080516001600160a01b039384168152929091166020830152016101ae565b6103376103323660046131d6565b6110ab565b604080519384526020840192909252908201526060016101ae565b34801561035e57600080fd5b5061037261036d36600461323a565b6112ee565b604080519283529015156020830152016101ae565b34801561039357600080fd5b5061019d6103a2366004613152565b611542565b6101d76103b5366004613271565b6115fa565b3480156103c657600080fd5b506101d76103d5366004613343565b611959565b3480156103e657600080fd5b506101d76103f5366004613485565b611a2f565b34801561040657600080fd5b5061033761041536600461352b565b611cb1565b34801561042657600080fd5b5061019d610435366004613586565b611ebd565b34801561044657600080fd5b506102387f0000000000000000000000002d9a3a2bd6400ee28d770c7254ca840c82faf23f81565b34801561047a57600080fd5b5061019d610489366004613642565b611f78565b34801561049a57600080fd5b506103376104a936600461369d565b61206e565b3480156104ba57600080fd5b506104ce6104c9366004613737565b612150565b60405190151581526020016101ae565b3480156104ea57600080fd5b506101d76104f9366004612fd3565b6121e5565b600080824281101561052b5760405162461bcd60e51b815260040161052290613754565b60405180910390fd5b60006105388c8c8c610ec3565b6040516323b872dd60e01b81523360048201526001600160a01b03821660248201819052604482018c90529192506323b872dd906064016020604051808303816000875af115801561058e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b2919061377d565b6105bb57600080fd5b60405163226bf2d160e21b81526001600160a01b03878116600483015260009182918416906389afcb449060240160408051808303816000875af1158015610607573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062b919061379a565b91509150600061063b8f8f610fcb565b509050806001600160a01b03168f6001600160a01b03161461065e578183610661565b82825b90975095508a8710156106b65760405162461bcd60e51b815260206004820152601d60248201527f526f757465723a20494e53554646494349454e545f415f414d4f554e540000006044820152606401610522565b898610156107065760405162461bcd60e51b815260206004820152601d60248201527f526f757465723a20494e53554646494349454e545f425f414d4f554e540000006044820152606401610522565b50505050509850989650505050505050565b6060814281101561073b5760405162461bcd60e51b815260040161052290613754565b604080516001808252818301909252600091816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816107525790505090508781600081518110610795576107956137be565b6020026020010151600001906001600160a01b031690816001600160a01b03168152505086816000815181106107cd576107cd6137be565b6020026020010151602001906001600160a01b031690816001600160a01b0316815250508581600081518110610805576108056137be565b60209081029190910101519015156040909101526108238a82611a2f565b925088836001855161083591906137ea565b81518110610845576108456137be565b6020026020010151101561086b5760405162461bcd60e51b8152600401610522906137fd565b61091381600081518110610881576108816137be565b602002602001015160000151336108f3846000815181106108a4576108a46137be565b602002602001015160000151856000815181106108c3576108c36137be565b602002602001015160200151866000815181106108e2576108e26137be565b602002602001015160400151610ec3565b86600081518110610906576109066137be565b602002602001015161230a565b61091e838287612441565b5050979650505050505050565b6060814281101561094e5760405162461bcd60e51b815260040161052290613754565b6001600160a01b037f00000000000000000000000042000000000000000000000000000000000000061686866109856001826137ea565b818110610994576109946137be565b90506060020160200160208101906109ac9190613737565b6001600160a01b0316146109d25760405162461bcd60e51b81526004016105229061383f565b610a2e888787808060200260200160405190810160405280939291908181526020016000905b82821015610a2457610a156060830286013681900381019061386d565b815260200190600101906109f8565b5050505050611a2f565b9150868260018451610a4091906137ea565b81518110610a5057610a506137be565b60200260200101511015610a765760405162461bcd60e51b8152600401610522906137fd565b610b3886866000818110610a8c57610a8c6137be565b610aa29260206060909202019081019150613737565b33610b2589896000818110610ab957610ab96137be565b610acf9260206060909202019081019150613737565b8a8a6000818110610ae257610ae26137be565b9050606002016020016020810190610afa9190613737565b8b8b6000818110610b0d57610b0d6137be565b90506060020160400160208101906102df9190613889565b85600081518110610906576109066137be565b610b95828787808060200260200160405190810160405280939291908181526020016000905b82821015610b8a57610b7b6060830286013681900381019061386d565b81526020019060010190610b5e565b505050505030612441565b7f00000000000000000000000042000000000000000000000000000000000000066001600160a01b0316632e1a7d4d8360018551610bd391906137ea565b81518110610be357610be36137be565b60200260200101516040518263ffffffff1660e01b8152600401610c0991815260200190565b600060405180830381600087803b158015610c2357600080fd5b505af1158015610c37573d6000803e3d6000fd5b50505050610c6b848360018551610c4e91906137ea565b81518110610c5e57610c5e6137be565b6020026020010151612690565b509695505050505050565b6040516306801cc360e41b81526001600160a01b03858116600483015284811660248301528315156044830152600091829182917f0000000000000000000000002d9a3a2bd6400ee28d770c7254ca840c82faf23f90911690636801cc3090606401602060405180830381865afa158015610cf5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1991906138a6565b90506001600160a01b038116610d36576000809250925050610de1565b600080610d44898989611542565b915091506000836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dac91906138c3565b905080610db984896138dc565b610dc391906138f3565b955080610dd083896138dc565b610dda91906138f3565b9450505050505b94509492505050565b6000806000610e1a8e7f00000000000000000000000042000000000000000000000000000000000000068f610ec3565b9050600087610e29578c610e2d565b6000195b60405163d505accf60e01b81529091506001600160a01b0383169063d505accf90610e68903390309086908f908e908e908e90600401613915565b600060405180830381600087803b158015610e8257600080fd5b505af1158015610e96573d6000803e3d6000fd5b50505050610ea98f8f8f8f8f8f8f611f78565b809450819550505050509b509b9950505050505050505050565b6000806000610ed28686610fcb565b6040516bffffffffffffffffffffffff19606084811b8216602084015283901b16603482015286151560f81b604882015291935091507f0000000000000000000000002d9a3a2bd6400ee28d770c7254ca840c82faf23f90604901604051602081830303815290604052805190602001207f219feae2806b91b43e3369a02074b26dde4d33b44972f02d717f37ac78ab0245604051602001610fa9939291906001600160f81b0319815260609390931b6bffffffffffffffffffffffff191660018401526015830191909152603582015260550190565b60408051601f1981840301815291905280516020909101209695505050505050565b600080826001600160a01b0316846001600160a01b03160361102f5760405162461bcd60e51b815260206004820152601b60248201527f526f757465723a204944454e544943414c5f41444452455353455300000000006044820152606401610522565b826001600160a01b0316846001600160a01b03161061104f578284611052565b83835b90925090506001600160a01b0382166110a45760405162461bcd60e51b8152602060048201526014602482015273526f757465723a205a45524f5f4144445245535360601b6044820152606401610522565b9250929050565b600080600085428110156110d15760405162461bcd60e51b815260040161052290613754565b6111018c7f00000000000000000000000042000000000000000000000000000000000000068d348e8e8c8c61275e565b909450925060006111338d7f000000000000000000000000420000000000000000000000000000000000000689610ec3565b90506111418d33838861230a565b7f00000000000000000000000042000000000000000000000000000000000000066001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561119c57600080fd5b505af11580156111b0573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038581166004830152602482018990527f000000000000000000000000420000000000000000000000000000000000000616935063a9059cbb925060440190506020604051808303816000875af1158015611225573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611249919061377d565b61125557611255612e06565b6040516335313c2160e11b81526001600160a01b038a81166004830152821690636a627842906024016020604051808303816000875af115801561129d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c191906138c3565b9250833411156112de576112de336112d986346137ea565b612690565b5050985098509895505050505050565b60008060006112ff85856001610ec3565b60405163e5e31b1360e01b81526001600160a01b03828116600483015291925060009182917f0000000000000000000000002d9a3a2bd6400ee28d770c7254ca840c82faf23f9091169063e5e31b1390602401602060405180830381865afa15801561136f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611393919061377d565b1561140c576040516378a051ad60e11b8152600481018990526001600160a01b03888116602483015284169063f140a35a90604401602060405180830381865afa1580156113e5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140991906138c3565b91505b61141887876000610ec3565b60405163e5e31b1360e01b81526001600160a01b0380831660048301529194507f0000000000000000000000002d9a3a2bd6400ee28d770c7254ca840c82faf23f9091169063e5e31b1390602401602060405180830381865afa158015611483573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a7919061377d565b15611520576040516378a051ad60e11b8152600481018990526001600160a01b03888116602483015284169063f140a35a90604401602060405180830381865afa1580156114f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061151d91906138c3565b90505b80821161152f57806000611533565b8160015b94509450505050935093915050565b60008060006115518686610fcb565b509050600080611562888888610ec3565b6001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561159f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115c39190613956565b5091509150826001600160a01b0316886001600160a01b0316146115e85780826115eb565b81815b90999098509650505050505050565b6060814281101561161d5760405162461bcd60e51b815260040161052290613754565b7f00000000000000000000000042000000000000000000000000000000000000066001600160a01b03168686600081811061165a5761165a6137be565b6116709260206060909202019081019150613737565b6001600160a01b0316146116965760405162461bcd60e51b81526004016105229061383f565b6116e8348787808060200260200160405190810160405280939291908181526020016000905b82821015610a24576116d96060830286013681900381019061386d565b815260200190600101906116bc565b91508682600184516116fa91906137ea565b8151811061170a5761170a6137be565b602002602001015110156117305760405162461bcd60e51b8152600401610522906137fd565b7f00000000000000000000000042000000000000000000000000000000000000066001600160a01b031663d0e30db083600081518110611772576117726137be565b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156117a557600080fd5b505af11580156117b9573d6000803e3d6000fd5b50505050507f00000000000000000000000042000000000000000000000000000000000000066001600160a01b031663a9059cbb61185788886000818110611803576118036137be565b6118199260206060909202019081019150613737565b8989600081811061182c5761182c6137be565b90506060020160200160208101906118449190613737565b8a8a6000818110610b0d57610b0d6137be565b8460008151811061186a5761186a6137be565b60200260200101516040518363ffffffff1660e01b81526004016118a39291906001600160a01b03929092168252602082015260400190565b6020604051808303816000875af11580156118c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118e6919061377d565b6118f2576118f2612e06565b61194f828787808060200260200160405190810160405280939291908181526020016000905b82821015611944576119356060830286013681900381019061386d565b81526020019060010190611918565b505050505086612441565b5095945050505050565b6060814281101561197c5760405162461bcd60e51b815260040161052290613754565b6119d286866000818110611992576119926137be565b6119a89260206060909202019081019150613737565b336119bf89896000818110610ab957610ab96137be565b8a600081518110610906576109066137be565b611a24878787808060200260200160405190810160405280939291908181526020016000905b8282101561194457611a156060830286013681900381019061386d565b815260200190600101906119f8565b509495945050505050565b6060600182511015611a535760405162461bcd60e51b81526004016105229061383f565b8151611a60906001613984565b67ffffffffffffffff811115611a7857611a786132d8565b604051908082528060200260200182016040528015611aa1578160200160208202803683370190505b5090508281600081518110611ab857611ab86137be565b60200260200101818152505060005b8251811015611caa576000611b23848381518110611ae757611ae76137be565b602002602001015160000151858481518110611b0557611b056137be565b6020026020010151602001518685815181106108e2576108e26137be565b60405163e5e31b1360e01b81526001600160a01b0380831660048301529192507f0000000000000000000000002d9a3a2bd6400ee28d770c7254ca840c82faf23f9091169063e5e31b1390602401602060405180830381865afa158015611b8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb2919061377d565b15611c9757806001600160a01b031663f140a35a848481518110611bd857611bd86137be565b6020026020010151868581518110611bf257611bf26137be565b6020026020010151600001516040518363ffffffff1660e01b8152600401611c2d9291909182526001600160a01b0316602082015260400190565b602060405180830381865afa158015611c4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6e91906138c3565b83611c7a846001613984565b81518110611c8a57611c8a6137be565b6020026020010181815250505b5080611ca281613997565b915050611ac7565b5092915050565b6040516306801cc360e41b81526001600160a01b038681166004830152858116602483015284151560448301526000918291829182917f0000000000000000000000002d9a3a2bd6400ee28d770c7254ca840c82faf23f1690636801cc3090606401602060405180830381865afa158015611d30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d5491906138a6565b9050600080806001600160a01b03841615611dde57836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611da7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dcb91906138c3565b9050611dd88c8c8c611542565b90935091505b82158015611dea575081155b15611e1b578896508795506103e8611e0a611e05888a6138dc565b612aaf565b611e1491906137ea565b9450611eae565b6000611e288a8585612b1f565b9050888111611e7057899750955085611e6984611e45848b6138dc565b611e4f91906138f3565b84611e5a858b6138dc565b611e6491906138f3565b612be9565b9550611eac565b6000611e7d8a8587612b1f565b9850899750889050611ea885611e9385846138dc565b611e9d91906138f3565b85611e5a868c6138dc565b9650505b505b50505050955095509592505050565b6000806000611ecd8f8f8f610ec3565b9050600087611edc578c611ee0565b6000195b60405163d505accf60e01b81529091506001600160a01b0383169063d505accf90611f1b903390309086908f908e908e908e90600401613915565b600060405180830381600087803b158015611f3557600080fd5b505af1158015611f49573d6000803e3d6000fd5b5050505050611f5e8f8f8f8f8f8f8f8f6104fe565b8093508194505050509c509c9a5050505050505050505050565b6000808242811015611f9c5760405162461bcd60e51b815260040161052290613754565b611fcc8a7f00000000000000000000000042000000000000000000000000000000000000068b8b8b8b308b6104fe565b9093509150611fdd8a30878661230a565b604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000042000000000000000000000000000000000000066001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561203f57600080fd5b505af1158015612053573d6000803e3d6000fd5b505050506120618583612690565b5097509795505050505050565b600080600085428110156120945760405162461bcd60e51b815260040161052290613754565b6120a48e8e8e8e8e8e8c8c61275e565b909450925060006120b68f8f89610ec3565b90506120c48f33838861230a565b6120d08e33838761230a565b6040516335313c2160e11b81526001600160a01b038a81166004830152821690636a627842906024016020604051808303816000875af1158015612118573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061213c91906138c3565b925050509a509a509a975050505050505050565b60405163e5e31b1360e01b81526001600160a01b0382811660048301526000917f0000000000000000000000002d9a3a2bd6400ee28d770c7254ca840c82faf23f9091169063e5e31b1390602401602060405180830381865afa1580156121bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121df919061377d565b92915050565b606081428110156122085760405162461bcd60e51b815260040161052290613754565b61225a888787808060200260200160405190810160405280939291908181526020016000905b82821015610a245761224b6060830286013681900381019061386d565b8152602001906001019061222e565b915086826001845161226c91906137ea565b8151811061227c5761227c6137be565b602002602001015110156122a25760405162461bcd60e51b8152600401610522906137fd565b6122b886866000818110610a8c57610a8c6137be565b610c6b828787808060200260200160405190810160405280939291908181526020016000905b82821015611944576122fb6060830286013681900381019061386d565b815260200190600101906122de565b6001600160a01b0384166123fd578034101561235b5760405162461bcd60e51b815260206004820152601060248201526f6e6f7420656e6f7567682076616c756560801b6044820152606401610522565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146123a8576040519150601f19603f3d011682016040523d82523d6000602084013e6123ad565b606091505b50509050806123f75760405162461bcd60e51b815260206004820152601660248201527553686f756c64207472616e736665722065746865727360501b6044820152606401610522565b5061243b565b306001600160a01b03841603612426576124216001600160a01b0385168383612c01565b61243b565b61243b6001600160a01b038516848484612c60565b50505050565b60005b825181101561243b576000612493848381518110612464576124646137be565b602002602001015160000151858481518110612482576124826137be565b602002602001015160200151610fcb565b5090506000856124a4846001613984565b815181106124b4576124b46137be565b60200260200101519050600080836001600160a01b03168786815181106124dd576124dd6137be565b6020026020010151600001516001600160a01b0316146124ff57826000612503565b6000835b9150915060006001885161251791906137ea565b86106125235786612596565b61259688612532886001613984565b81518110612542576125426137be565b6020026020010151600001518988600161255c9190613984565b8151811061256c5761256c6137be565b6020026020010151602001518a8960016125869190613984565b815181106108e2576108e26137be565b90506125e98887815181106125ad576125ad6137be565b6020026020010151600001518988815181106125cb576125cb6137be565b6020026020010151602001518a89815181106108e2576108e26137be565b6001600160a01b031663022c0d9f84848460006040519080825280601f01601f191660200182016040528015612626576020820181803683370190505b506040518563ffffffff1660e01b815260040161264694939291906139d4565b600060405180830381600087803b15801561266057600080fd5b505af1158015612674573d6000803e3d6000fd5b505050505050505050808061268890613997565b915050612444565b604080516000808252602082019092526001600160a01b0384169083906040516126ba9190613a24565b60006040518083038185875af1925050503d80600081146126f7576040519150601f19603f3d011682016040523d82523d6000602084013e6126fc565b606091505b50509050806127595760405162461bcd60e51b815260206004820152602360248201527f5472616e7366657248656c7065723a204554485f5452414e534645525f46414960448201526213115160ea1b6064820152608401610522565b505050565b6000808588101561276e57600080fd5b8487101561277b57600080fd5b6040516306801cc360e41b81526001600160a01b038b811660048301528a8116602483015285151560448301526000917f0000000000000000000000002d9a3a2bd6400ee28d770c7254ca840c82faf23f90911690636801cc3090606401602060405180830381865afa1580156127f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061281a91906138a6565b90506001600160a01b03811661298757600084156128d85761283d8c8c88610ec3565b6040516354c5718560e11b81526001600160a01b038083166004830152602482018890529193507f0000000000000000000000002d259c6c1a7acb410326ca662a26ca3fddb890ba9091169063a98ae30a906044016020604051808303816000875af11580156128b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128d591906138a6565b90505b6040516333c2c0b360e01b81526001600160a01b038d811660048301528c8116602483015287151560448301526064820187905282811660848301527f0000000000000000000000002d9a3a2bd6400ee28d770c7254ca840c82faf23f16906333c2c0b39060a4016020604051808303816000875af115801561295f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061298391906138a6565b9150505b6000806129958d8d89611542565b915091508160001480156129a7575080155b156129b7578a9450899350612a9f565b60006129c48c8484612b1f565b90508a8111612a285788811015612a1d5760405162461bcd60e51b815260206004820152601d60248201527f526f757465723a20494e53554646494349454e545f425f414d4f554e540000006044820152606401610522565b8b9550935083612a9d565b6000612a358c8486612b1f565b90508c811115612a4757612a47612e06565b8a811015612a975760405162461bcd60e51b815260206004820152601d60248201527f526f757465723a20494e53554646494349454e545f415f414d4f554e540000006044820152606401610522565b95508a94505b505b5050509850989650505050505050565b60006003821115612b105750806000612ac96002836138f3565b612ad4906001613984565b90505b81811015612b0a57905080600281612aef81866138f3565b612af99190613984565b612b0391906138f3565b9050612ad7565b50919050565b8115612b1a575060015b919050565b6000808411612b705760405162461bcd60e51b815260206004820152601b60248201527f526f757465723a20494e53554646494349454e545f414d4f554e5400000000006044820152606401610522565b600083118015612b805750600082115b612bcc5760405162461bcd60e51b815260206004820152601e60248201527f526f757465723a20494e53554646494349454e545f4c495155494449545900006044820152606401610522565b82612bd783866138dc565b612be191906138f3565b949350505050565b6000818310612bf85781612bfa565b825b9392505050565b6040516001600160a01b0383811660248301526044820183905261275991859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050612c99565b6040516001600160a01b03848116602483015283811660448301526064820183905261243b9186918216906323b872dd90608401612c2e565b6000612cae6001600160a01b03841683612cfc565b90508051600014158015612cd3575080806020019051810190612cd1919061377d565b155b1561275957604051635274afe760e01b81526001600160a01b0384166004820152602401610522565b6060612bfa8383600084600080856001600160a01b03168486604051612d229190613a24565b60006040518083038185875af1925050503d8060008114612d5f576040519150601f19603f3d011682016040523d82523d6000602084013e612d64565b606091505b5091509150612d74868383612d7e565b9695505050505050565b606082612d9357612d8e82612dda565b612bfa565b8151158015612daa57506001600160a01b0384163b155b15612dd357604051639996b31560e01b81526001600160a01b0385166004820152602401610522565b5080612bfa565b805115612dea5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b634e487b7160e01b600052600160045260246000fd5b6001600160a01b0381168114612e0357600080fd5b8035612b1a81612e1c565b8015158114612e0357600080fd5b600080600080600080600080610100898b031215612e6757600080fd5b8835612e7281612e1c565b97506020890135612e8281612e1c565b96506040890135612e9281612e3c565b9550606089013594506080890135935060a0890135925060c0890135612eb781612e1c565b8092505060e089013590509295985092959890939650565b600080600080600080600060e0888a031215612eea57600080fd5b87359650602088013595506040880135612f0381612e1c565b94506060880135612f1381612e1c565b93506080880135612f2381612e3c565b925060a0880135612f3381612e1c565b8092505060c0880135905092959891949750929550565b6020808252825182820181905260009190848201906040850190845b81811015612f8257835183529284019291840191600101612f66565b50909695505050505050565b60008083601f840112612fa057600080fd5b50813567ffffffffffffffff811115612fb857600080fd5b6020830191508360206060830285010111156110a457600080fd5b60008060008060008060a08789031215612fec57600080fd5b8635955060208701359450604087013567ffffffffffffffff81111561301157600080fd5b61301d89828a01612f8e565b909550935050606087013561303181612e1c565b80925050608087013590509295509295509295565b6000806000806080858703121561305c57600080fd5b843561306781612e1c565b9350602085013561307781612e1c565b9250604085013561308781612e3c565b9396929550929360600135925050565b803560ff81168114612b1a57600080fd5b60008060008060008060008060008060006101608c8e0312156130ca57600080fd5b8b356130d581612e1c565b9a5060208c01356130e581612e3c565b995060408c0135985060608c0135975060808c0135965060a08c013561310a81612e1c565b955060c08c0135945060e08c013561312181612e3c565b93506131306101008d01613097565b92506101208c013591506101408c013590509295989b509295989b9093969950565b60008060006060848603121561316757600080fd5b833561317281612e1c565b9250602084013561318281612e1c565b9150604084013561319281612e3c565b809150509250925092565b600080604083850312156131b057600080fd5b82356131bb81612e1c565b915060208301356131cb81612e1c565b809150509250929050565b600080600080600080600080610100898b0312156131f357600080fd5b88356131fe81612e1c565b9750602089013596506040890135955060608901359450608089013561322381612e1c565b935060a0890135925060c0890135612eb781612e3c565b60008060006060848603121561324f57600080fd5b83359250602084013561326181612e1c565b9150604084013561319281612e1c565b60008060008060006080868803121561328957600080fd5b85359450602086013567ffffffffffffffff8111156132a757600080fd5b6132b388828901612f8e565b90955093505060408601356132c781612e1c565b949793965091946060013592915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613317576133176132d8565b604052919050565b600067ffffffffffffffff821115613339576133396132d8565b5060051b60200190565b60008060008060006080868803121561335b57600080fd5b853567ffffffffffffffff8082111561337357600080fd5b818801915088601f83011261338757600080fd5b8135602061339c6133978361331f565b6132ee565b82815260059290921b8401810191818101908c8411156133bb57600080fd5b948201945b838610156133d9578535825294820194908201906133c0565b995050890135925050808211156133ef57600080fd5b506133fc88828901612f8e565b90955093506132c7905060408701612e31565b60006060828403121561342157600080fd5b6040516060810181811067ffffffffffffffff82111715613444576134446132d8565b604052905080823561345581612e1c565b8152602083013561346581612e1c565b6020820152604083013561347881612e3c565b6040919091015292915050565b6000806040838503121561349857600080fd5b8235915060208084013567ffffffffffffffff8111156134b757600080fd5b8401601f810186136134c857600080fd5b80356134d66133978261331f565b818152606091820283018401918482019190898411156134f557600080fd5b938501935b8385101561351b5761350c8a8661340f565b835293840193918501916134fa565b5080955050505050509250929050565b600080600080600060a0868803121561354357600080fd5b853561354e81612e1c565b9450602086013561355e81612e1c565b9350604086013561356e81612e3c565b94979396509394606081013594506080013592915050565b6000806000806000806000806000806000806101808d8f0312156135a957600080fd5b8c356135b481612e1c565b9b5060208d01356135c481612e1c565b9a5060408d01356135d481612e3c565b995060608d0135985060808d0135975060a08d0135965060c08d01356135f981612e1c565b955060e08d013594506101008d013561361181612e3c565b93506136206101208e01613097565b92506101408d013591506101608d013590509295989b509295989b509295989b565b600080600080600080600060e0888a03121561365d57600080fd5b873561366881612e1c565b9650602088013561367881612e3c565b955060408801359450606088013593506080880135925060a0880135612f3381612e1c565b6000806000806000806000806000806101408b8d0312156136bd57600080fd5b8a356136c881612e1c565b995060208b01356136d881612e1c565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b013561370481612e1c565b935060e08b013592506101008b013561371c81612e3c565b809250506101208b013590509295989b9194979a5092959850565b60006020828403121561374957600080fd5b8135612bfa81612e1c565b6020808252600f908201526e149bdd5d195c8e8811561412549151608a1b604082015260600190565b60006020828403121561378f57600080fd5b8151612bfa81612e3c565b600080604083850312156137ad57600080fd5b505080516020909101519092909150565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156121df576121df6137d4565b60208082526022908201527f526f757465723a20494e53554646494349454e545f4f55545055545f414d4f55604082015261139560f21b606082015260800190565b6020808252601490820152730a4deeae8cae47440929cac82989288bea082a8960631b604082015260600190565b60006060828403121561387f57600080fd5b612bfa838361340f565b60006020828403121561389b57600080fd5b8135612bfa81612e3c565b6000602082840312156138b857600080fd5b8151612bfa81612e1c565b6000602082840312156138d557600080fd5b5051919050565b80820281158282048414176121df576121df6137d4565b60008261391057634e487b7160e01b600052601260045260246000fd5b500490565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b60008060006060848603121561396b57600080fd5b8351925060208401519150604084015190509250925092565b808201808211156121df576121df6137d4565b6000600182016139a9576139a96137d4565b5060010190565b60005b838110156139cb5781810151838201526020016139b3565b50506000910152565b84815283602082015260018060a01b03831660408201526080606082015260008251806080840152613a0d8160a08501602087016139b0565b601f01601f19169190910160a00195945050505050565b60008251613a368184602087016139b0565b919091019291505056fea26469706673582212206d9c13d36f69561385e85bb0a60b6290b4f7d5aaead85477bdab29c8ecb07cfc64736f6c63430008140033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.