Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 459 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Init Flash With ... | 20635344 | 92 days ago | IN | 0.51923435 ETH | 0.00325693 | ||||
Init Flash With ... | 18863291 | 340 days ago | IN | 0.69837008 ETH | 0.01936097 | ||||
Init Swap Star F... | 18859590 | 341 days ago | IN | 0 ETH | 0.00967846 | ||||
Init Flash With ... | 18844010 | 343 days ago | IN | 0.69657037 ETH | 0.01512046 | ||||
Init Swap Star F... | 18843094 | 343 days ago | IN | 0 ETH | 0.01733752 | ||||
Init Flash With ... | 18787455 | 351 days ago | IN | 0.99769401 ETH | 0.0376449 | ||||
Init Flash With ... | 18740079 | 357 days ago | IN | 0.97840556 ETH | 0.030783 | ||||
Init Swap Star F... | 17522959 | 528 days ago | IN | 0 ETH | 0.01126774 | ||||
Init Swap Star F... | 17336424 | 554 days ago | IN | 0 ETH | 0.02103475 | ||||
Init Swap Star F... | 17332446 | 555 days ago | IN | 0 ETH | 0.01541712 | ||||
Init Swap Star F... | 17207617 | 572 days ago | IN | 0 ETH | 0.04793587 | ||||
Init Swap Star F... | 17207603 | 572 days ago | IN | 0 ETH | 0.04492664 | ||||
Init Swap Star F... | 17207595 | 572 days ago | IN | 0 ETH | 0.04823113 | ||||
Init Swap Star F... | 17207585 | 572 days ago | IN | 0 ETH | 0.04995378 | ||||
Init Swap Star F... | 17207573 | 572 days ago | IN | 0 ETH | 0.04241153 | ||||
Init Flash With ... | 17186274 | 575 days ago | IN | 1.74246369 ETH | 0.04838591 | ||||
Init Swap Star F... | 17176323 | 577 days ago | IN | 0 ETH | 0.0602815 | ||||
Init Swap Star F... | 17160582 | 579 days ago | IN | 0 ETH | 0.03789546 | ||||
Init Swap Star F... | 17139365 | 582 days ago | IN | 0 ETH | 0.01973948 | ||||
Init Flash With ... | 17116513 | 585 days ago | IN | 1.81066717 ETH | 0.11267473 | ||||
Init Swap Star F... | 17116501 | 585 days ago | IN | 0 ETH | 0.02659351 | ||||
Init Swap Star F... | 17115348 | 585 days ago | IN | 0 ETH | 0.02035903 | ||||
Init Swap Star F... | 17115321 | 585 days ago | IN | 0 ETH | 0.01879395 | ||||
Init Swap Star F... | 17115291 | 585 days ago | IN | 0 ETH | 0.02130775 | ||||
Init Swap Star F... | 17115264 | 585 days ago | IN | 0 ETH | 0.02292971 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
20635344 | 92 days ago | 0.51923435 ETH | ||||
18863291 | 340 days ago | 0.69837008 ETH | ||||
18859590 | 341 days ago | 0.68353334 ETH | ||||
18859590 | 341 days ago | 0.68353334 ETH | ||||
18844010 | 343 days ago | 0.69657037 ETH | ||||
18843094 | 343 days ago | 0.68177314 ETH | ||||
18843094 | 343 days ago | 0.68177314 ETH | ||||
18787455 | 351 days ago | 0.99769401 ETH | ||||
18740079 | 357 days ago | 0.97840556 ETH | ||||
17522959 | 528 days ago | 1.66819759 ETH | ||||
17522959 | 528 days ago | 1.66819759 ETH | ||||
17336424 | 554 days ago | 1.67108599 ETH | ||||
17336424 | 554 days ago | 1.67108599 ETH | ||||
17332446 | 555 days ago | 1.67746785 ETH | ||||
17332446 | 555 days ago | 1.67746785 ETH | ||||
17332372 | 555 days ago | 0.02774687 ETH | ||||
17332312 | 555 days ago | 0.02778511 ETH | ||||
17207617 | 572 days ago | 1.66907009 ETH | ||||
17207617 | 572 days ago | 1.66907009 ETH | ||||
17207603 | 572 days ago | 1.67487154 ETH | ||||
17207603 | 572 days ago | 1.67487154 ETH | ||||
17207595 | 572 days ago | 1.68070328 ETH | ||||
17207595 | 572 days ago | 1.68070328 ETH | ||||
17207585 | 572 days ago | 1.68656553 ETH | ||||
17207585 | 572 days ago | 1.68656553 ETH |
Loading...
Loading
Contract Name:
wstrFlashSwap
Compiler Version
v0.7.6+commit.7338295f
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity =0.7.6; pragma abicoder v2; import { WETH as IWETH } from "./interfaces/WETH.sol"; import { TreasuryProxy as ITreasuryProxy } from "./interfaces/TreasuryProxy.sol"; import { WSTR as IWSTR } from "./interfaces/WSTR.sol"; import { Ecliptic as IEcliptic } from "./interfaces/Ecliptic.sol"; import "@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3FlashCallback.sol"; import "@uniswap/v3-core/contracts/libraries/LowGasSafeMath.sol"; import "@uniswap/v3-periphery/contracts/base/PeripheryPayments.sol"; import "@uniswap/v3-periphery/contracts/base/PeripheryImmutableState.sol"; import "@uniswap/v3-periphery/contracts/libraries/PoolAddress.sol"; import "@uniswap/v3-periphery/contracts/libraries/CallbackValidation.sol"; import "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol"; import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol"; import "./Base.sol"; contract wstrFlashSwap is IUniswapV3FlashCallback, PeripheryImmutableState, PeripheryPayments, Base { using LowGasSafeMath for uint256; ISwapRouter public immutable swapRouter; IWETH weth; ITreasuryProxy treasury; IWSTR wstr; IEcliptic ecliptic; address public constant _WETH9 = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address public constant _TREASURYPROXY = 0x3E1efDa147EC9309e1e47782EcaFeDe1d04b45E5; address public constant _WSTR = 0xF0dC76C22139ab22618dDFb498BE1283254612B1; address public constant _ECLIPTIC = 0x33EeCbf908478C10614626A9D304bfe18B78DD73; uint24 constant public POOL_FEE = 10000; // constructor(): configure uniswap router and contract addresses // constructor( ISwapRouter _swapRouter, address _factory ) payable PeripheryImmutableState(_factory, _WETH9) { swapRouter = _swapRouter; weth = IWETH(_WETH9); treasury = ITreasuryProxy(_TREASURYPROXY); wstr = IWSTR(_WSTR); ecliptic = IEcliptic(_ECLIPTIC); } // uniswapV3FlashCallback(): called by uniswap pool after the flashloan is initiated // function uniswapV3FlashCallback( uint256 fee0, uint256 fee1, bytes calldata data ) external override { // decode callback data and verify (required logic by uni) FlashCallbackData memory decoded = abi.decode(data, (FlashCallbackData)); CallbackValidation.verifyCallback(factory, decoded.poolKey); // receive flashloan address token1 = decoded.poolKey.token1; TransferHelper.safeApprove(token1, address(swapRouter), decoded.amount1); // set length of array uint16[] memory stars = new uint16[](decoded.depth); redeemStars(decoded.targetStar, stars); transferTargetStar(decoded.buyer, decoded.targetStar); depositStars(stars); payback(decoded.amount1, fee1, token1); } // redeemStars(): redeem WSTR for stars in the treasury // function redeemStars( uint16 targetStar, uint16[] memory stars ) internal { uint16 j = 0; uint16 i = 0; while (j != targetStar) { j = treasury.redeem(); stars[i] = j; i++; } } // transferTargetStar(): transfer the targeted star to the buyer // function transferTargetStar( address buyer, uint32 targetStar ) internal { ecliptic.approve(buyer, targetStar); ecliptic.transferPoint(targetStar, buyer, true); } // depositStars(): deposit all remaining stars to retrieve WSTR // function depositStars(uint16[] memory stars) internal { for (uint16 j = 0; j < stars.length - 1; j++) { uint16 star = stars[j]; ecliptic.approve(_TREASURYPROXY, uint256(star)); treasury.deposit(star); } } // payback(): pay back loaned WSTR plus the pool fee // function payback( uint256 amount1, uint256 fee1, address token1 ) internal { uint256 amount1Owed = LowGasSafeMath.add(amount1, fee1); TransferHelper.safeApprove(token1, address(this), amount1Owed); pay(token1, address(this), msg.sender, amount1Owed); } struct FlashParams { address token0; address token1; uint24 fee1; uint256 amount0; uint256 amount1; uint24 fee2; uint24 fee3; uint16 targetStar; uint16 depth; uint256 wstrAmountOut; } struct FlashCallbackData { uint256 amount0; uint256 amount1; address buyer; PoolAddress.PoolKey poolKey; uint24 poolFee2; uint24 poolFee3; uint16 targetStar; uint16 depth; } // initFlash(): use a flashloan to recover a specific star in the WSTR treasury. The buyer provides // the amount of WSTR needed to redeem the target star (1.0) and pay the pool fee (0.01 per star // above the target star). The remainder of the WSTR required to redeem is borrowed with a flashloan. // function initFlash(FlashParams memory params) external { // transfer WSTR from buyer TransferHelper.safeTransferFrom(_WSTR, msg.sender, address(this), params.wstrAmountOut); // set pool params PoolAddress.PoolKey memory poolKey = PoolAddress.PoolKey({ token0: params.token0, token1: params.token1, fee: params.fee1 }); IUniswapV3Pool pool = IUniswapV3Pool( PoolAddress.computeAddress(factory, poolKey) ); // kickoff the flashloan pool.flash( address(this), params.amount0, params.amount1, abi.encode( FlashCallbackData({ amount0: params.amount0, amount1: params.amount1, buyer: msg.sender, poolKey: poolKey, poolFee2: params.fee2, poolFee3: params.fee3, targetStar: params.targetStar, depth: params.depth }) ) ); } // initFlashWithSwap(): use a swap and a flashloan to recover a specific // star in the WSTR treasury. The buyer just provides ETH. // function initFlashWithSwap(FlashParams memory params) external payable { // convert ETH to WETH uint256 amountInMaximum = msg.value; weth.deposit{ value: amountInMaximum }(); // approve transfer and swap WETH for WSTR TransferHelper.safeApprove(WETH9, address(swapRouter), amountInMaximum); ISwapRouter.ExactOutputSingleParams memory swapParams = ISwapRouter.ExactOutputSingleParams({ tokenIn: _WETH9, tokenOut: _WSTR, fee: POOL_FEE, recipient: address(this), deadline: block.timestamp, amountOut: params.wstrAmountOut, amountInMaximum: amountInMaximum, sqrtPriceLimitX96: 0 }); uint256 amountIn = swapRouter.exactOutputSingle(swapParams); // transfer unspent WETH back to buyer if (amountIn < amountInMaximum) { TransferHelper.safeApprove(_WETH9, address(swapRouter), amountInMaximum - amountIn); TransferHelper.safeTransfer(_WETH9, msg.sender, amountInMaximum - amountIn); } // set pool params PoolAddress.PoolKey memory poolKey = PoolAddress.PoolKey({ token0: params.token0, token1: params.token1, fee: params.fee1 }); IUniswapV3Pool pool = IUniswapV3Pool( PoolAddress.computeAddress(factory, poolKey) ); // kickoff the flashloan pool.flash( address(this), params.amount0, params.amount1, abi.encode( FlashCallbackData({ amount0: params.amount0, amount1: params.amount1, buyer: msg.sender, poolKey: poolKey, poolFee2: params.fee2, poolFee3: params.fee3, targetStar: params.targetStar, depth: params.depth }) ) ); } // initSwapStarForETH(): convert seller's star to WSTR then swap for ETH // function initSwapStarForETH( uint32 star, uint256 amountOutMinimum ) external { // caller must be owner of the star require(msg.sender == ecliptic.ownerOf(uint256(star)), "msg.sender does not own star"); // transfer star from seller to contract ecliptic.transferPoint(star, address(this), true); // approve transfer and deposit star into treasury ecliptic.approve(_TREASURYPROXY, uint16(star)); treasury.deposit(uint16(star)); // approve transfer and swap WSTR for WETH uint256 amountIn = 1e18; TransferHelper.safeApprove(_WSTR, address(swapRouter), amountIn); ISwapRouter.ExactInputSingleParams memory swapParams = ISwapRouter.ExactInputSingleParams({ tokenIn: _WSTR, tokenOut: _WETH9, fee: POOL_FEE, recipient: address(this), deadline: block.timestamp, amountIn: amountIn, amountOutMinimum: amountOutMinimum, sqrtPriceLimitX96: 0 }); uint256 amountOut = swapRouter.exactInputSingle(swapParams); // convert WETH to ETH and transfer balance to seller weth.withdraw(amountOut); msg.sender.transfer(address(this).balance); } }
// SPDX-License-Identifier: MIT pragma solidity 0.7.6; import { IERC20 as ERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface WETHInterface { function deposit() external payable; function balanceOf(address account) external view returns (uint256); function withdraw(uint wad) external; } abstract contract WETH is WETHInterface {}
// SPDX-License-Identifier: MIT pragma solidity 0.7.6; import { IERC721 as ERC721 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; interface TreasuryProxyInterface { function deposit(uint16 _star) external; function redeem() external returns(uint16); } abstract contract TreasuryProxy is TreasuryProxyInterface {}
// SPDX-License-Identifier: MIT pragma solidity 0.7.6; import { IERC20 as ERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface WSTRInterface { function balanceOf(address account) external view returns (uint256); function totalSupply() external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); } abstract contract WSTR is WSTRInterface {}
// SPDX-License-Identifier: MIT pragma solidity 0.7.6; import { IERC721 as ERC721 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; interface EclipticInterface { function approve(address to, uint256 tokenId) external; function transferPoint(uint32 _point, address _target, bool _reset) external; function ownerOf(uint256 _tokenId) external view returns (address _owner); } abstract contract Ecliptic is EclipticInterface {}
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Callback for IUniswapV3PoolActions#flash /// @notice Any contract that calls IUniswapV3PoolActions#flash must implement this interface interface IUniswapV3FlashCallback { /// @notice Called to `msg.sender` after transferring to the recipient from IUniswapV3Pool#flash. /// @dev In the implementation you must repay the pool the tokens sent by flash plus the computed fee amounts. /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory. /// @param fee0 The fee amount in token0 due to the pool by the end of the flash /// @param fee1 The fee amount in token1 due to the pool by the end of the flash /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#flash call function uniswapV3FlashCallback( uint256 fee0, uint256 fee1, bytes calldata data ) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.0; /// @title Optimized overflow and underflow safe math operations /// @notice Contains methods for doing math operations that revert on overflow or underflow for minimal gas cost library LowGasSafeMath { /// @notice Returns x + y, reverts if sum overflows uint256 /// @param x The augend /// @param y The addend /// @return z The sum of x and y function add(uint256 x, uint256 y) internal pure returns (uint256 z) { require((z = x + y) >= x); } /// @notice Returns x - y, reverts if underflows /// @param x The minuend /// @param y The subtrahend /// @return z The difference of x and y function sub(uint256 x, uint256 y) internal pure returns (uint256 z) { require((z = x - y) <= x); } /// @notice Returns x * y, reverts if overflows /// @param x The multiplicand /// @param y The multiplier /// @return z The product of x and y function mul(uint256 x, uint256 y) internal pure returns (uint256 z) { require(x == 0 || (z = x * y) / x == y); } /// @notice Returns x + y, reverts if overflows or underflows /// @param x The augend /// @param y The addend /// @return z The sum of x and y function add(int256 x, int256 y) internal pure returns (int256 z) { require((z = x + y) >= x == (y >= 0)); } /// @notice Returns x - y, reverts if overflows or underflows /// @param x The minuend /// @param y The subtrahend /// @return z The difference of x and y function sub(int256 x, int256 y) internal pure returns (int256 z) { require((z = x - y) <= x == (y >= 0)); } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.5; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '../interfaces/IPeripheryPayments.sol'; import '../interfaces/external/IWETH9.sol'; import '../libraries/TransferHelper.sol'; import './PeripheryImmutableState.sol'; abstract contract PeripheryPayments is IPeripheryPayments, PeripheryImmutableState { receive() external payable { require(msg.sender == WETH9, 'Not WETH9'); } /// @inheritdoc IPeripheryPayments function unwrapWETH9(uint256 amountMinimum, address recipient) public payable override { uint256 balanceWETH9 = IWETH9(WETH9).balanceOf(address(this)); require(balanceWETH9 >= amountMinimum, 'Insufficient WETH9'); if (balanceWETH9 > 0) { IWETH9(WETH9).withdraw(balanceWETH9); TransferHelper.safeTransferETH(recipient, balanceWETH9); } } /// @inheritdoc IPeripheryPayments function sweepToken( address token, uint256 amountMinimum, address recipient ) public payable override { uint256 balanceToken = IERC20(token).balanceOf(address(this)); require(balanceToken >= amountMinimum, 'Insufficient token'); if (balanceToken > 0) { TransferHelper.safeTransfer(token, recipient, balanceToken); } } /// @inheritdoc IPeripheryPayments function refundETH() external payable override { if (address(this).balance > 0) TransferHelper.safeTransferETH(msg.sender, address(this).balance); } /// @param token The token to pay /// @param payer The entity that must pay /// @param recipient The entity that will receive payment /// @param value The amount to pay function pay( address token, address payer, address recipient, uint256 value ) internal { if (token == WETH9 && address(this).balance >= value) { // pay with WETH9 IWETH9(WETH9).deposit{value: value}(); // wrap only what is needed to pay IWETH9(WETH9).transfer(recipient, value); } else if (payer == address(this)) { // pay with tokens already in the contract (for the exact input multihop case) TransferHelper.safeTransfer(token, recipient, value); } else { // pull payment TransferHelper.safeTransferFrom(token, payer, recipient, value); } } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity =0.7.6; import '../interfaces/IPeripheryImmutableState.sol'; /// @title Immutable state /// @notice Immutable state used by periphery contracts abstract contract PeripheryImmutableState is IPeripheryImmutableState { /// @inheritdoc IPeripheryImmutableState address public immutable override factory; /// @inheritdoc IPeripheryImmutableState address public immutable override WETH9; constructor(address _factory, address _WETH9) { factory = _factory; WETH9 = _WETH9; } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Provides functions for deriving a pool address from the factory, tokens, and the fee library PoolAddress { bytes32 internal constant POOL_INIT_CODE_HASH = 0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54; /// @notice The identifying key of the pool struct PoolKey { address token0; address token1; uint24 fee; } /// @notice Returns PoolKey: the ordered tokens with the matched fee levels /// @param tokenA The first token of a pool, unsorted /// @param tokenB The second token of a pool, unsorted /// @param fee The fee level of the pool /// @return Poolkey The pool details with ordered token0 and token1 assignments function getPoolKey( address tokenA, address tokenB, uint24 fee ) internal pure returns (PoolKey memory) { if (tokenA > tokenB) (tokenA, tokenB) = (tokenB, tokenA); return PoolKey({token0: tokenA, token1: tokenB, fee: fee}); } /// @notice Deterministically computes the pool address given the factory and PoolKey /// @param factory The Uniswap V3 factory contract address /// @param key The PoolKey /// @return pool The contract address of the V3 pool function computeAddress(address factory, PoolKey memory key) internal pure returns (address pool) { require(key.token0 < key.token1); pool = address( uint256( keccak256( abi.encodePacked( hex'ff', factory, keccak256(abi.encode(key.token0, key.token1, key.fee)), POOL_INIT_CODE_HASH ) ) ) ); } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity =0.7.6; import '@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol'; import './PoolAddress.sol'; /// @notice Provides validation for callbacks from Uniswap V3 Pools library CallbackValidation { /// @notice Returns the address of a valid Uniswap V3 Pool /// @param factory The contract address of the Uniswap V3 factory /// @param tokenA The contract address of either token0 or token1 /// @param tokenB The contract address of the other token /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip /// @return pool The V3 pool contract address function verifyCallback( address factory, address tokenA, address tokenB, uint24 fee ) internal view returns (IUniswapV3Pool pool) { return verifyCallback(factory, PoolAddress.getPoolKey(tokenA, tokenB, fee)); } /// @notice Returns the address of a valid Uniswap V3 Pool /// @param factory The contract address of the Uniswap V3 factory /// @param poolKey The identifying key of the V3 pool /// @return pool The V3 pool contract address function verifyCallback(address factory, PoolAddress.PoolKey memory poolKey) internal view returns (IUniswapV3Pool pool) { pool = IUniswapV3Pool(PoolAddress.computeAddress(factory, poolKey)); require(msg.sender == address(pool)); } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.6.0; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; library TransferHelper { /// @notice Transfers tokens from the targeted address to the given destination /// @notice Errors with 'STF' if transfer fails /// @param token The contract address of the token to be transferred /// @param from The originating address from which the tokens will be transferred /// @param to The destination address of the transfer /// @param value The amount to be transferred function safeTransferFrom( address token, address from, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'STF'); } /// @notice Transfers tokens from msg.sender to a recipient /// @dev Errors with ST if transfer fails /// @param token The contract address of the token which will be transferred /// @param to The recipient of the transfer /// @param value The value of the transfer function safeTransfer( address token, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'ST'); } /// @notice Approves the stipulated contract to spend the given allowance in the given token /// @dev Errors with 'SA' if transfer fails /// @param token The contract address of the token to be approved /// @param to The target of the approval /// @param value The amount of the given token the target will be allowed to spend function safeApprove( address token, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'SA'); } /// @notice Transfers ETH to the recipient address /// @dev Fails with `STE` /// @param to The destination of the transfer /// @param value The value to be transferred function safeTransferETH(address to, uint256 value) internal { (bool success, ) = to.call{value: value}(new bytes(0)); require(success, 'STE'); } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.5; pragma abicoder v2; import '@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol'; /// @title Router token swapping functionality /// @notice Functions for swapping tokens via Uniswap V3 interface ISwapRouter is IUniswapV3SwapCallback { struct ExactInputSingleParams { address tokenIn; address tokenOut; uint24 fee; address recipient; uint256 deadline; uint256 amountIn; uint256 amountOutMinimum; uint160 sqrtPriceLimitX96; } /// @notice Swaps `amountIn` of one token for as much as possible of another token /// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata /// @return amountOut The amount of the received token function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut); struct ExactInputParams { bytes path; address recipient; uint256 deadline; uint256 amountIn; uint256 amountOutMinimum; } /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata /// @return amountOut The amount of the received token function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut); struct ExactOutputSingleParams { address tokenIn; address tokenOut; uint24 fee; address recipient; uint256 deadline; uint256 amountOut; uint256 amountInMaximum; uint160 sqrtPriceLimitX96; } /// @notice Swaps as little as possible of one token for `amountOut` of another token /// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata /// @return amountIn The amount of the input token function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn); struct ExactOutputParams { bytes path; address recipient; uint256 deadline; uint256 amountOut; uint256 amountInMaximum; } /// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed) /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata /// @return amountIn The amount of the input token function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn); }
// SPDX-License-Identifier: MIT pragma solidity =0.7.6; contract Base { bool internal locked; address public owner; event Received(address, uint); constructor() { owner = msg.sender; } modifier noReentrant() { require(!locked, "No re-entrancy"); locked = true; _; locked = false; } modifier onlyOwner() { require(owner == msg.sender, "Ownable: caller is not the owner"); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; import "../../introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.5; /// @title Periphery Payments /// @notice Functions to ease deposits and withdrawals of ETH interface IPeripheryPayments { /// @notice Unwraps the contract's WETH9 balance and sends it to recipient as ETH. /// @dev The amountMinimum parameter prevents malicious contracts from stealing WETH9 from users. /// @param amountMinimum The minimum amount of WETH9 to unwrap /// @param recipient The address receiving ETH function unwrapWETH9(uint256 amountMinimum, address recipient) external payable; /// @notice Refunds any ETH balance held by this contract to the `msg.sender` /// @dev Useful for bundling with mint or increase liquidity that uses ether, or exact output swaps /// that use ether for the input amount function refundETH() external payable; /// @notice Transfers the full amount of a token held by this contract to recipient /// @dev The amountMinimum parameter prevents malicious contracts from stealing the token from users /// @param token The contract address of the token which will be transferred to `recipient` /// @param amountMinimum The minimum amount of token required for a transfer /// @param recipient The destination address of the token function sweepToken( address token, uint256 amountMinimum, address recipient ) external payable; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity =0.7.6; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; /// @title Interface for WETH9 interface IWETH9 is IERC20 { /// @notice Deposit ether to get wrapped ether function deposit() external payable; /// @notice Withdraw wrapped ether to get ether function withdraw(uint256) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Immutable state /// @notice Functions that return immutable state of the router interface IPeripheryImmutableState { /// @return Returns the address of the Uniswap V3 factory function factory() external view returns (address); /// @return Returns the address of WETH9 function WETH9() external view returns (address); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; import './pool/IUniswapV3PoolImmutables.sol'; import './pool/IUniswapV3PoolState.sol'; import './pool/IUniswapV3PoolDerivedState.sol'; import './pool/IUniswapV3PoolActions.sol'; import './pool/IUniswapV3PoolOwnerActions.sol'; import './pool/IUniswapV3PoolEvents.sol'; /// @title The interface for a Uniswap V3 Pool /// @notice A Uniswap pool facilitates swapping and automated market making between any two assets that strictly conform /// to the ERC20 specification /// @dev The pool interface is broken up into many smaller pieces interface IUniswapV3Pool is IUniswapV3PoolImmutables, IUniswapV3PoolState, IUniswapV3PoolDerivedState, IUniswapV3PoolActions, IUniswapV3PoolOwnerActions, IUniswapV3PoolEvents { }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Pool state that never changes /// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same values interface IUniswapV3PoolImmutables { /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface /// @return The contract address function factory() external view returns (address); /// @notice The first of the two tokens of the pool, sorted by address /// @return The token contract address function token0() external view returns (address); /// @notice The second of the two tokens of the pool, sorted by address /// @return The token contract address function token1() external view returns (address); /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6 /// @return The fee function fee() external view returns (uint24); /// @notice The pool tick spacing /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ... /// This value is an int24 to avoid casting even though it is always positive. /// @return The tick spacing function tickSpacing() external view returns (int24); /// @notice The maximum amount of position liquidity that can use any tick in the range /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool /// @return The max amount of liquidity per tick function maxLiquidityPerTick() external view returns (uint128); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Pool state that can change /// @notice These methods compose the pool's state, and can change with any frequency including multiple times /// per transaction interface IUniswapV3PoolState { /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas /// when accessed externally. /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value /// tick The current tick of the pool, i.e. according to the last tick transition that was run. /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick /// boundary. /// observationIndex The index of the last oracle observation that was written, /// observationCardinality The current maximum number of observations stored in the pool, /// observationCardinalityNext The next maximum number of observations, to be updated when the observation. /// feeProtocol The protocol fee for both tokens of the pool. /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0 /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee. /// unlocked Whether the pool is currently locked to reentrancy function slot0() external view returns ( uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked ); /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool /// @dev This value can overflow the uint256 function feeGrowthGlobal0X128() external view returns (uint256); /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool /// @dev This value can overflow the uint256 function feeGrowthGlobal1X128() external view returns (uint256); /// @notice The amounts of token0 and token1 that are owed to the protocol /// @dev Protocol fees will never exceed uint128 max in either token function protocolFees() external view returns (uint128 token0, uint128 token1); /// @notice The currently in range liquidity available to the pool /// @dev This value has no relationship to the total liquidity across all ticks function liquidity() external view returns (uint128); /// @notice Look up information about a specific tick in the pool /// @param tick The tick to look up /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or /// tick upper, /// liquidityNet how much liquidity changes when the pool price crosses the tick, /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0, /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1, /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick, /// secondsOutside the seconds spent on the other side of the tick from the current tick, /// initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false. /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0. /// In addition, these values are only relative and must be used only in comparison to previous snapshots for /// a specific position. function ticks(int24 tick) external view returns ( uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128, int56 tickCumulativeOutside, uint160 secondsPerLiquidityOutsideX128, uint32 secondsOutside, bool initialized ); /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information function tickBitmap(int16 wordPosition) external view returns (uint256); /// @notice Returns the information about a position by the position's key /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper /// @return _liquidity The amount of liquidity in the position, /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke, /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke, /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke, /// Returns tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke function positions(bytes32 key) external view returns ( uint128 _liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1 ); /// @notice Returns data about a specific observation index /// @param index The element of the observations array to fetch /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time /// ago, rather than at a specific index in the array. /// @return blockTimestamp The timestamp of the observation, /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp, /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp, /// Returns initialized whether the observation has been initialized and the values are safe to use function observations(uint256 index) external view returns ( uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized ); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Pool state that is not stored /// @notice Contains view functions to provide information about the pool that is computed rather than stored on the /// blockchain. The functions here may have variable gas costs. interface IUniswapV3PoolDerivedState { /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick, /// you must call it with secondsAgos = [3600, 0]. /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio. /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block /// timestamp function observe(uint32[] calldata secondsAgos) external view returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s); /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed. /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first /// snapshot is taken and the second snapshot is taken. /// @param tickLower The lower tick of the range /// @param tickUpper The upper tick of the range /// @return tickCumulativeInside The snapshot of the tick accumulator for the range /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range /// @return secondsInside The snapshot of seconds per liquidity for the range function snapshotCumulativesInside(int24 tickLower, int24 tickUpper) external view returns ( int56 tickCumulativeInside, uint160 secondsPerLiquidityInsideX128, uint32 secondsInside ); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Permissionless pool actions /// @notice Contains pool methods that can be called by anyone interface IUniswapV3PoolActions { /// @notice Sets the initial price for the pool /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96 function initialize(uint160 sqrtPriceX96) external; /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends /// on tickLower, tickUpper, the amount of liquidity, and the current price. /// @param recipient The address for which the liquidity will be created /// @param tickLower The lower tick of the position in which to add liquidity /// @param tickUpper The upper tick of the position in which to add liquidity /// @param amount The amount of liquidity to mint /// @param data Any data that should be passed through to the callback /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback function mint( address recipient, int24 tickLower, int24 tickUpper, uint128 amount, bytes calldata data ) external returns (uint256 amount0, uint256 amount1); /// @notice Collects tokens owed to a position /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity. /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity. /// @param recipient The address which should receive the fees collected /// @param tickLower The lower tick of the position for which to collect fees /// @param tickUpper The upper tick of the position for which to collect fees /// @param amount0Requested How much token0 should be withdrawn from the fees owed /// @param amount1Requested How much token1 should be withdrawn from the fees owed /// @return amount0 The amount of fees collected in token0 /// @return amount1 The amount of fees collected in token1 function collect( address recipient, int24 tickLower, int24 tickUpper, uint128 amount0Requested, uint128 amount1Requested ) external returns (uint128 amount0, uint128 amount1); /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0 /// @dev Fees must be collected separately via a call to #collect /// @param tickLower The lower tick of the position for which to burn liquidity /// @param tickUpper The upper tick of the position for which to burn liquidity /// @param amount How much liquidity to burn /// @return amount0 The amount of token0 sent to the recipient /// @return amount1 The amount of token1 sent to the recipient function burn( int24 tickLower, int24 tickUpper, uint128 amount ) external returns (uint256 amount0, uint256 amount1); /// @notice Swap token0 for token1, or token1 for token0 /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback /// @param recipient The address to receive the output of the swap /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0 /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative) /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this /// value after the swap. If one for zero, the price cannot be greater than this value after the swap /// @param data Any data to be passed through to the callback /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive function swap( address recipient, bool zeroForOne, int256 amountSpecified, uint160 sqrtPriceLimitX96, bytes calldata data ) external returns (int256 amount0, int256 amount1); /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling /// with 0 amount{0,1} and sending the donation amount(s) from the callback /// @param recipient The address which will receive the token0 and token1 amounts /// @param amount0 The amount of token0 to send /// @param amount1 The amount of token1 to send /// @param data Any data to be passed through to the callback function flash( address recipient, uint256 amount0, uint256 amount1, bytes calldata data ) external; /// @notice Increase the maximum number of price and liquidity observations that this pool will store /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to /// the input observationCardinalityNext. /// @param observationCardinalityNext The desired minimum number of observations for the pool to store function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Permissioned pool actions /// @notice Contains pool methods that may only be called by the factory owner interface IUniswapV3PoolOwnerActions { /// @notice Set the denominator of the protocol's % share of the fees /// @param feeProtocol0 new protocol fee for token0 of the pool /// @param feeProtocol1 new protocol fee for token1 of the pool function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external; /// @notice Collect the protocol fee accrued to the pool /// @param recipient The address to which collected protocol fees should be sent /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1 /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0 /// @return amount0 The protocol fee collected in token0 /// @return amount1 The protocol fee collected in token1 function collectProtocol( address recipient, uint128 amount0Requested, uint128 amount1Requested ) external returns (uint128 amount0, uint128 amount1); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Events emitted by a pool /// @notice Contains all events emitted by the pool interface IUniswapV3PoolEvents { /// @notice Emitted exactly once by a pool when #initialize is first called on the pool /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96 /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool event Initialize(uint160 sqrtPriceX96, int24 tick); /// @notice Emitted when liquidity is minted for a given position /// @param sender The address that minted the liquidity /// @param owner The owner of the position and recipient of any minted liquidity /// @param tickLower The lower tick of the position /// @param tickUpper The upper tick of the position /// @param amount The amount of liquidity minted to the position range /// @param amount0 How much token0 was required for the minted liquidity /// @param amount1 How much token1 was required for the minted liquidity event Mint( address sender, address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1 ); /// @notice Emitted when fees are collected by the owner of a position /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees /// @param owner The owner of the position for which fees are collected /// @param tickLower The lower tick of the position /// @param tickUpper The upper tick of the position /// @param amount0 The amount of token0 fees collected /// @param amount1 The amount of token1 fees collected event Collect( address indexed owner, address recipient, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount0, uint128 amount1 ); /// @notice Emitted when a position's liquidity is removed /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect /// @param owner The owner of the position for which liquidity is removed /// @param tickLower The lower tick of the position /// @param tickUpper The upper tick of the position /// @param amount The amount of liquidity to remove /// @param amount0 The amount of token0 withdrawn /// @param amount1 The amount of token1 withdrawn event Burn( address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1 ); /// @notice Emitted by the pool for any swaps between token0 and token1 /// @param sender The address that initiated the swap call, and that received the callback /// @param recipient The address that received the output of the swap /// @param amount0 The delta of the token0 balance of the pool /// @param amount1 The delta of the token1 balance of the pool /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96 /// @param liquidity The liquidity of the pool after the swap /// @param tick The log base 1.0001 of price of the pool after the swap event Swap( address indexed sender, address indexed recipient, int256 amount0, int256 amount1, uint160 sqrtPriceX96, uint128 liquidity, int24 tick ); /// @notice Emitted by the pool for any flashes of token0/token1 /// @param sender The address that initiated the swap call, and that received the callback /// @param recipient The address that received the tokens from flash /// @param amount0 The amount of token0 that was flashed /// @param amount1 The amount of token1 that was flashed /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee event Flash( address indexed sender, address indexed recipient, uint256 amount0, uint256 amount1, uint256 paid0, uint256 paid1 ); /// @notice Emitted by the pool for increases to the number of observations that can be stored /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index /// just before a mint/swap/burn. /// @param observationCardinalityNextOld The previous value of the next observation cardinality /// @param observationCardinalityNextNew The updated value of the next observation cardinality event IncreaseObservationCardinalityNext( uint16 observationCardinalityNextOld, uint16 observationCardinalityNextNew ); /// @notice Emitted when the protocol fee is changed by the pool /// @param feeProtocol0Old The previous value of the token0 protocol fee /// @param feeProtocol1Old The previous value of the token1 protocol fee /// @param feeProtocol0New The updated value of the token0 protocol fee /// @param feeProtocol1New The updated value of the token1 protocol fee event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New); /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner /// @param sender The address that collects the protocol fees /// @param recipient The address that receives the collected protocol fees /// @param amount0 The amount of token0 protocol fees that is withdrawn /// @param amount0 The amount of token1 protocol fees that is withdrawn event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Callback for IUniswapV3PoolActions#swap /// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface interface IUniswapV3SwapCallback { /// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap. /// @dev In the implementation you must pay the pool tokens owed for the swap. /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory. /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped. /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by /// the end of the swap. If positive, the callback must send that amount of token0 to the pool. /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by /// the end of the swap. If positive, the callback must send that amount of token1 to the pool. /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call function uniswapV3SwapCallback( int256 amount0Delta, int256 amount1Delta, bytes calldata data ) external; }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract ISwapRouter","name":"_swapRouter","type":"address"},{"internalType":"address","name":"_factory","type":"address"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"Received","type":"event"},{"inputs":[],"name":"POOL_FEE","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH9","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_ECLIPTIC","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_TREASURYPROXY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_WETH9","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_WSTR","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint24","name":"fee1","type":"uint24"},{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"},{"internalType":"uint24","name":"fee2","type":"uint24"},{"internalType":"uint24","name":"fee3","type":"uint24"},{"internalType":"uint16","name":"targetStar","type":"uint16"},{"internalType":"uint16","name":"depth","type":"uint16"},{"internalType":"uint256","name":"wstrAmountOut","type":"uint256"}],"internalType":"struct wstrFlashSwap.FlashParams","name":"params","type":"tuple"}],"name":"initFlash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint24","name":"fee1","type":"uint24"},{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"},{"internalType":"uint24","name":"fee2","type":"uint24"},{"internalType":"uint24","name":"fee3","type":"uint24"},{"internalType":"uint16","name":"targetStar","type":"uint16"},{"internalType":"uint16","name":"depth","type":"uint16"},{"internalType":"uint256","name":"wstrAmountOut","type":"uint256"}],"internalType":"struct wstrFlashSwap.FlashParams","name":"params","type":"tuple"}],"name":"initFlashWithSwap","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint32","name":"star","type":"uint32"},{"internalType":"uint256","name":"amountOutMinimum","type":"uint256"}],"name":"initSwapStarForETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refundETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"swapRouter","outputs":[{"internalType":"contract ISwapRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"sweepToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee0","type":"uint256"},{"internalType":"uint256","name":"fee1","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"uniswapV3FlashCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"unwrapWETH9","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60e06040526040516200350e3803806200350e8339818101604052810190620000299190620002b1565b8073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b81525050505033600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b8152505073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550733e1efda147ec9309e1e47782ecafede1d04b45e5600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555073f0dc76c22139ab22618ddfb498be1283254612b1600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507333eecbf908478c10614626a9d304bfe18b78dd73600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506200036e565b60008151905062000294816200033a565b92915050565b600081519050620002ab8162000354565b92915050565b60008060408385031215620002c557600080fd5b6000620002d5858286016200029a565b9250506020620002e88582860162000283565b9150509250929050565b6000620002ff826200031a565b9050919050565b60006200031382620002f2565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6200034581620002f2565b81146200035157600080fd5b50565b6200035f8162000306565b81146200036b57600080fd5b50565b60805160601c60a05160601c60c05160601c61311b620003f36000398061091c5280610a105280610add5280610ccc52806110315280611120528061143852508060fe528061046a52806105ad528061064852806108fb5280612210528061227052806122f15250806107305280610b895280610cf052806113fb525061311b6000f3fe6080604052600436106100f75760003560e01c8063911cb1271161008a578063d7bfa3af11610059578063d7bfa3af14610387578063dd1b9c4a146103b0578063df2ab5bb146103db578063e9cbafb0146103f7576101bf565b8063911cb127146102ea578063c31c9c0714610306578063c45a015514610331578063c978d5961461035c576101bf565b80634aa4a4fc116100c65780634aa4a4fc1461024057806363e8f7281461026b5780638da5cb5b1461029657806390218586146102c1576101bf565b8063063226a4146101c457806312210e8a146101ef5780631e6d2f31146101f957806349404b7c14610224576101bf565b366101bf577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260098152602001807f4e6f74205745544839000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b005b600080fd5b3480156101d057600080fd5b506101d9610420565b6040516101e69190612cab565b60405180910390f35b6101f7610438565b005b34801561020557600080fd5b5061020e61044e565b60405161021b9190612cab565b60405180910390f35b61023e60048036038101906102399190612843565b610466565b005b34801561024c57600080fd5b50610255610646565b6040516102629190612cab565b60405180910390f35b34801561027757600080fd5b5061028061066a565b60405161028d9190612cab565b60405180910390f35b3480156102a257600080fd5b506102ab610682565b6040516102b89190612cab565b60405180910390f35b3480156102cd57600080fd5b506102e860048036038101906102e391906127c7565b6106a8565b005b61030460048036038101906102ff91906127c7565b61086e565b005b34801561031257600080fd5b5061031b610cca565b6040516103289190612d8d565b60405180910390f35b34801561033d57600080fd5b50610346610cee565b6040516103539190612cab565b60405180910390f35b34801561036857600080fd5b50610371610d12565b60405161037e9190612cab565b60405180910390f35b34801561039357600080fd5b506103ae60048036038101906103a991906128eb565b610d2a565b005b3480156103bc57600080fd5b506103c56112a6565b6040516103d29190612e37565b60405180910390f35b6103f560048036038101906103f0919061274e565b6112ac565b005b34801561040357600080fd5b5061041e6004803603810190610419919061287f565b6113e3565b005b73f0dc76c22139ab22618ddfb498be1283254612b181565b600047111561044c5761044b33476114f9565b5b565b733e1efda147ec9309e1e47782ecafede1d04b45e581565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156104ef57600080fd5b505afa158015610503573d6000803e3d6000fd5b505050506040513d602081101561051957600080fd5b81019080805190602001909291905050509050828110156105a2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f496e73756666696369656e74205745544839000000000000000000000000000081525060200191505060405180910390fd5b6000811115610641577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561061e57600080fd5b505af1158015610632573d6000803e3d6000fd5b5050505061064082826114f9565b5b505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6106cd73f0dc76c22139ab22618ddfb498be1283254612b13330846101200151611675565b60006040518060600160405280836000015173ffffffffffffffffffffffffffffffffffffffff168152602001836020015173ffffffffffffffffffffffffffffffffffffffff168152602001836040015162ffffff16815250905060006107557f000000000000000000000000000000000000000000000000000000000000000083611895565b90508073ffffffffffffffffffffffffffffffffffffffff1663490e6cbc308560600151866080015160405180610100016040528089606001518152602001896080015181526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018881526020018960a0015162ffffff1681526020018960c0015162ffffff1681526020018960e0015161ffff16815260200189610100015161ffff168152506040516020016108099190612e00565b6040516020818303038152906040526040518563ffffffff1660e01b81526004016108379493929190612cc6565b600060405180830381600087803b15801561085157600080fd5b505af1158015610865573d6000803e3d6000fd5b50505050505050565b6000349050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b1580156108dd57600080fd5b505af11580156108f1573d6000803e3d6000fd5b50505050506109417f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000836119f0565b600060405180610100016040528073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16815260200173f0dc76c22139ab22618ddfb498be1283254612b173ffffffffffffffffffffffffffffffffffffffff16815260200161271062ffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff1681526020014281526020018461012001518152602001838152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663db3e2198836040518263ffffffff1660e01b8152600401610a679190612de4565b602060405180830381600087803b158015610a8157600080fd5b505af1158015610a95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab9919061281a565b905082811015610b2657610b0473c02aaa39b223fe8d0a0e5c4f27ead9083c756cc27f00000000000000000000000000000000000000000000000000000000000000008386036119f0565b610b2573c02aaa39b223fe8d0a0e5c4f27ead9083c756cc233838603611bf1565b5b60006040518060600160405280866000015173ffffffffffffffffffffffffffffffffffffffff168152602001866020015173ffffffffffffffffffffffffffffffffffffffff168152602001866040015162ffffff1681525090506000610bae7f000000000000000000000000000000000000000000000000000000000000000083611895565b90508073ffffffffffffffffffffffffffffffffffffffff1663490e6cbc30886060015189608001516040518061010001604052808c6060015181526020018c6080015181526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018881526020018c60a0015162ffffff1681526020018c60c0015162ffffff1681526020018c60e0015161ffff1681526020018c610100015161ffff16815250604051602001610c629190612e00565b6040516020818303038152906040526040518563ffffffff1660e01b8152600401610c909493929190612cc6565b600060405180830381600087803b158015610caa57600080fd5b505af1158015610cbe573d6000803e3d6000fd5b50505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7333eecbf908478c10614626a9d304bfe18b78dd7381565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e8363ffffffff166040518263ffffffff1660e01b8152600401610d8b9190612e52565b60206040518083038186803b158015610da357600080fd5b505afa158015610db7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddb9190612725565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3f90612da8565b60405180910390fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631e79a85b833060016040518463ffffffff1660e01b8152600401610ea893929190612e6d565b600060405180830381600087803b158015610ec257600080fd5b505af1158015610ed6573d6000803e3d6000fd5b50505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3733e1efda147ec9309e1e47782ecafede1d04b45e5846040518363ffffffff1660e01b8152600401610f4b929190612d12565b600060405180830381600087803b158015610f6557600080fd5b505af1158015610f79573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c0c77a836040518263ffffffff1660e01b8152600401610fd89190612e1c565b600060405180830381600087803b158015610ff257600080fd5b505af1158015611006573d6000803e3d6000fd5b505050506000670de0b6b3a7640000905061105673f0dc76c22139ab22618ddfb498be1283254612b17f0000000000000000000000000000000000000000000000000000000000000000836119f0565b600060405180610100016040528073f0dc76c22139ab22618ddfb498be1283254612b173ffffffffffffffffffffffffffffffffffffffff16815260200173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16815260200161271062ffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff168152602001428152602001838152602001848152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663414bf389836040518263ffffffff1660e01b81526004016111779190612dc8565b602060405180830381600087803b15801561119157600080fd5b505af11580156111a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c9919061281a565b9050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b81526004016112269190612e52565b600060405180830381600087803b15801561124057600080fd5b505af1158015611254573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f1935050505015801561129e573d6000803e3d6000fd5b505050505050565b61271081565b60008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561131557600080fd5b505afa158015611329573d6000803e3d6000fd5b505050506040513d602081101561133f57600080fd5b81019080805190602001909291905050509050828110156113c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f496e73756666696369656e7420746f6b656e000000000000000000000000000081525060200191505060405180910390fd5b60008111156113dd576113dc848383611bf1565b5b50505050565b600082828101906113f4919061279d565b90506114247f00000000000000000000000000000000000000000000000000000000000000008260600151611df2565b5060008160600151602001519050611461817f000000000000000000000000000000000000000000000000000000000000000084602001516119f0565b60008260e0015161ffff1667ffffffffffffffff8111801561148257600080fd5b506040519080825280602002602001820160405280156114b15781602001602082028036833780820191505090505b5090506114c28360c0015182611e3e565b6114d883604001518460c0015161ffff16611f2f565b6114e181612054565b6114f0836020015187846121c9565b50505050505050565b60008273ffffffffffffffffffffffffffffffffffffffff1682600067ffffffffffffffff8111801561152b57600080fd5b506040519080825280601f01601f19166020018201604052801561155e5781602001600182028036833780820191505090505b506040518082805190602001908083835b60208310611592578051825260208201915060208101905060208303925061156f565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146115f4576040519150601f19603f3d011682016040523d82523d6000602084013e6115f9565b606091505b5050905080611670576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f535445000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b505050565b6000808573ffffffffffffffffffffffffffffffffffffffff166323b872dd60e01b868686604051602401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106117745780518252602082019150602081019050602083039250611751565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146117d6576040519150601f19603f3d011682016040523d82523d6000602084013e6117db565b606091505b509150915081801561181b575060008151148061181a575080806020019051602081101561180857600080fd5b81019080805190602001909291905050505b5b61188d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f535446000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b505050505050565b6000816020015173ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff16106118d757600080fd5b82826000015183602001518460400151604051602001808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018262ffffff1681526020019350505050604051602081830303815290604052805190602001207fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b5460001b60405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c905092915050565b6000808473ffffffffffffffffffffffffffffffffffffffff1663095ea7b360e01b8585604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310611ad15780518252602082019150602081019050602083039250611aae565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611b33576040519150601f19603f3d011682016040523d82523d6000602084013e611b38565b606091505b5091509150818015611b785750600081511480611b775750808060200190516020811015611b6557600080fd5b81019080805190602001909291905050505b5b611bea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260028152602001807f534100000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b5050505050565b6000808473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b8585604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310611cd25780518252602082019150602081019050602083039250611caf565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611d34576040519150601f19603f3d011682016040523d82523d6000602084013e611d39565b606091505b5091509150818015611d795750600081511480611d785750808060200190516020811015611d6657600080fd5b81019080805190602001909291905050505b5b611deb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260028152602001807f535400000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b5050505050565b6000611dfe8383611895565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611e3857600080fd5b92915050565b6000805b8361ffff168261ffff1614611f2957600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663be040fb06040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611ebb57600080fd5b505af1158015611ecf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef391906127f1565b915081838261ffff1681518110611f0657fe5b602002602001019061ffff16908161ffff16815250508080600101915050611e42565b50505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b383836040518363ffffffff1660e01b8152600401611f8c929190612d64565b600060405180830381600087803b158015611fa657600080fd5b505af1158015611fba573d6000803e3d6000fd5b50505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631e79a85b828460016040518463ffffffff1660e01b815260040161201e93929190612ea4565b600060405180830381600087803b15801561203857600080fd5b505af115801561204c573d6000803e3d6000fd5b505050505050565b60005b60018251038161ffff1610156121c5576000828261ffff168151811061207957fe5b60200260200101519050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3733e1efda147ec9309e1e47782ecafede1d04b45e58361ffff166040518363ffffffff1660e01b81526004016120f8929190612d3b565b600060405180830381600087803b15801561211257600080fd5b505af1158015612126573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c0c77a826040518263ffffffff1660e01b81526004016121859190612e1c565b600060405180830381600087803b15801561219f57600080fd5b505af11580156121b3573d6000803e3d6000fd5b50505050508080600101915050612057565b5050565b60006121d584846121f4565b90506121e28230836119f0565b6121ee8230338461220e565b50505050565b600082828401915081101561220857600080fd5b92915050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156122695750804710155b156123c1577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b1580156122d657600080fd5b505af11580156122ea573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561238057600080fd5b505af1158015612394573d6000803e3d6000fd5b505050506040513d60208110156123aa57600080fd5b810190808051906020019092919050505050612413565b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561240557612400848383611bf1565b612412565b61241184848484611675565b5b5b50505050565b60008135905061242881613072565b92915050565b60008151905061243d81613072565b92915050565b60008083601f84011261245557600080fd5b8235905067ffffffffffffffff81111561246e57600080fd5b60208301915083600182028301111561248657600080fd5b9250929050565b600061014082840312156124a057600080fd5b6124ab610100612edb565b905060006124bb848285016126e6565b60008301525060206124cf848285016126e6565b60208301525060406124e384828501612419565b60408301525060606124f784828501612647565b60608301525060c061250b848285016126d1565b60808301525060e061251f848285016126d1565b60a083015250610100612534848285016126a7565b60c083015250610120612549848285016126a7565b60e08301525092915050565b6000610140828403121561256857600080fd5b612573610140612edb565b9050600061258384828501612419565b600083015250602061259784828501612419565b60208301525060406125ab848285016126d1565b60408301525060606125bf848285016126e6565b60608301525060806125d3848285016126e6565b60808301525060a06125e7848285016126d1565b60a08301525060c06125fb848285016126d1565b60c08301525060e061260f848285016126a7565b60e083015250610100612624848285016126a7565b6101008301525061012061263a848285016126e6565b6101208301525092915050565b60006060828403121561265957600080fd5b6126636060612edb565b9050600061267384828501612419565b600083015250602061268784828501612419565b602083015250604061269b848285016126d1565b60408301525092915050565b6000813590506126b681613089565b92915050565b6000815190506126cb81613089565b92915050565b6000813590506126e0816130a0565b92915050565b6000813590506126f5816130b7565b92915050565b60008151905061270a816130b7565b92915050565b60008135905061271f816130ce565b92915050565b60006020828403121561273757600080fd5b60006127458482850161242e565b91505092915050565b60008060006060848603121561276357600080fd5b600061277186828701612419565b9350506020612782868287016126e6565b925050604061279386828701612419565b9150509250925092565b600061014082840312156127b057600080fd5b60006127be8482850161248d565b91505092915050565b600061014082840312156127da57600080fd5b60006127e884828501612555565b91505092915050565b60006020828403121561280357600080fd5b6000612811848285016126bc565b91505092915050565b60006020828403121561282c57600080fd5b600061283a848285016126fb565b91505092915050565b6000806040838503121561285657600080fd5b6000612864858286016126e6565b925050602061287585828601612419565b9150509250929050565b6000806000806060858703121561289557600080fd5b60006128a3878288016126e6565b94505060206128b4878288016126e6565b935050604085013567ffffffffffffffff8111156128d157600080fd5b6128dd87828801612443565b925092505092959194509250565b600080604083850312156128fe57600080fd5b600061290c85828601612710565b925050602061291d858286016126e6565b9150509250929050565b61293081612fae565b82525050565b61293f81612f39565b82525050565b61294e81612f39565b82525050565b61295d81612f4b565b82525050565b600061296e82612f0c565b6129788185612f17565b935061298881856020860161302c565b61299181613061565b840191505092915050565b6129a581612fc0565b82525050565b60006129b8601c83612f28565b91507f6d73672e73656e64657220646f6573206e6f74206f776e2073746172000000006000830152602082019050919050565b61010082016000820151612a026000850182612936565b506020820151612a156020850182612936565b506040820151612a286040850182612c51565b506060820151612a3b6060850182612936565b506080820151612a4e6080850182612c6f565b5060a0820151612a6160a0850182612c6f565b5060c0820151612a7460c0850182612c6f565b5060e0820151612a8760e0850182612c15565b50505050565b61010082016000820151612aa46000850182612936565b506020820151612ab76020850182612936565b506040820151612aca6040850182612c51565b506060820151612add6060850182612936565b506080820151612af06080850182612c6f565b5060a0820151612b0360a0850182612c6f565b5060c0820151612b1660c0850182612c6f565b5060e0820151612b2960e0850182612c15565b50505050565b61014082016000820151612b466000850182612c6f565b506020820151612b596020850182612c6f565b506040820151612b6c6040850182612936565b506060820151612b7f6060850182612bd3565b506080820151612b9260c0850182612c51565b5060a0820151612ba560e0850182612c51565b5060c0820151612bb9610100850182612c24565b5060e0820151612bcd610120850182612c24565b50505050565b606082016000820151612be96000850182612936565b506020820151612bfc6020850182612936565b506040820151612c0f6040850182612c51565b50505050565b612c1e81612f65565b82525050565b612c2d81612f57565b82525050565b612c3c81612f57565b82525050565b612c4b81613008565b82525050565b612c5a81612f85565b82525050565b612c6981612f85565b82525050565b612c7881612f94565b82525050565b612c8781612f94565b82525050565b612c968161301a565b82525050565b612ca581612f9e565b82525050565b6000602082019050612cc06000830184612945565b92915050565b6000608082019050612cdb6000830187612927565b612ce86020830186612c7e565b612cf56040830185612c7e565b8181036060830152612d078184612963565b905095945050505050565b6000604082019050612d276000830185612945565b612d346020830184612c42565b9392505050565b6000604082019050612d506000830185612945565b612d5d6020830184612c7e565b9392505050565b6000604082019050612d796000830185612945565b612d866020830184612c8d565b9392505050565b6000602082019050612da2600083018461299c565b92915050565b60006020820190508181036000830152612dc1816129ab565b9050919050565b600061010082019050612dde60008301846129eb565b92915050565b600061010082019050612dfa6000830184612a8d565b92915050565b600061014082019050612e166000830184612b2f565b92915050565b6000602082019050612e316000830184612c33565b92915050565b6000602082019050612e4c6000830184612c60565b92915050565b6000602082019050612e676000830184612c7e565b92915050565b6000606082019050612e826000830186612c9c565b612e8f6020830185612927565b612e9c6040830184612954565b949350505050565b6000606082019050612eb96000830186612c9c565b612ec66020830185612945565b612ed36040830184612954565b949350505050565b6000604051905081810181811067ffffffffffffffff82111715612f0257612f0161305f565b5b8060405250919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612f4482612f65565b9050919050565b60008115159050919050565b600061ffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b6000612fb982612fe4565b9050919050565b6000612fcb82612fd2565b9050919050565b6000612fdd82612f65565b9050919050565b6000612fef82612ff6565b9050919050565b600061300182612f65565b9050919050565b600061301382612f57565b9050919050565b600061302582612f9e565b9050919050565b60005b8381101561304a57808201518184015260208101905061302f565b83811115613059576000848401525b50505050565bfe5b6000601f19601f8301169050919050565b61307b81612f39565b811461308657600080fd5b50565b61309281612f57565b811461309d57600080fd5b50565b6130a981612f85565b81146130b457600080fd5b50565b6130c081612f94565b81146130cb57600080fd5b50565b6130d781612f9e565b81146130e257600080fd5b5056fea2646970667358221220e59e61cc0ea57d7103919b477a60c54036f02c06e7309c24d56da7696e05690964736f6c63430007060033000000000000000000000000e592427a0aece92de3edee1f18e0157c058615640000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984
Deployed Bytecode
0x6080604052600436106100f75760003560e01c8063911cb1271161008a578063d7bfa3af11610059578063d7bfa3af14610387578063dd1b9c4a146103b0578063df2ab5bb146103db578063e9cbafb0146103f7576101bf565b8063911cb127146102ea578063c31c9c0714610306578063c45a015514610331578063c978d5961461035c576101bf565b80634aa4a4fc116100c65780634aa4a4fc1461024057806363e8f7281461026b5780638da5cb5b1461029657806390218586146102c1576101bf565b8063063226a4146101c457806312210e8a146101ef5780631e6d2f31146101f957806349404b7c14610224576101bf565b366101bf577f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260098152602001807f4e6f74205745544839000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b005b600080fd5b3480156101d057600080fd5b506101d9610420565b6040516101e69190612cab565b60405180910390f35b6101f7610438565b005b34801561020557600080fd5b5061020e61044e565b60405161021b9190612cab565b60405180910390f35b61023e60048036038101906102399190612843565b610466565b005b34801561024c57600080fd5b50610255610646565b6040516102629190612cab565b60405180910390f35b34801561027757600080fd5b5061028061066a565b60405161028d9190612cab565b60405180910390f35b3480156102a257600080fd5b506102ab610682565b6040516102b89190612cab565b60405180910390f35b3480156102cd57600080fd5b506102e860048036038101906102e391906127c7565b6106a8565b005b61030460048036038101906102ff91906127c7565b61086e565b005b34801561031257600080fd5b5061031b610cca565b6040516103289190612d8d565b60405180910390f35b34801561033d57600080fd5b50610346610cee565b6040516103539190612cab565b60405180910390f35b34801561036857600080fd5b50610371610d12565b60405161037e9190612cab565b60405180910390f35b34801561039357600080fd5b506103ae60048036038101906103a991906128eb565b610d2a565b005b3480156103bc57600080fd5b506103c56112a6565b6040516103d29190612e37565b60405180910390f35b6103f560048036038101906103f0919061274e565b6112ac565b005b34801561040357600080fd5b5061041e6004803603810190610419919061287f565b6113e3565b005b73f0dc76c22139ab22618ddfb498be1283254612b181565b600047111561044c5761044b33476114f9565b5b565b733e1efda147ec9309e1e47782ecafede1d04b45e581565b60007f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156104ef57600080fd5b505afa158015610503573d6000803e3d6000fd5b505050506040513d602081101561051957600080fd5b81019080805190602001909291905050509050828110156105a2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f496e73756666696369656e74205745544839000000000000000000000000000081525060200191505060405180910390fd5b6000811115610641577f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561061e57600080fd5b505af1158015610632573d6000803e3d6000fd5b5050505061064082826114f9565b5b505050565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6106cd73f0dc76c22139ab22618ddfb498be1283254612b13330846101200151611675565b60006040518060600160405280836000015173ffffffffffffffffffffffffffffffffffffffff168152602001836020015173ffffffffffffffffffffffffffffffffffffffff168152602001836040015162ffffff16815250905060006107557f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f98483611895565b90508073ffffffffffffffffffffffffffffffffffffffff1663490e6cbc308560600151866080015160405180610100016040528089606001518152602001896080015181526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018881526020018960a0015162ffffff1681526020018960c0015162ffffff1681526020018960e0015161ffff16815260200189610100015161ffff168152506040516020016108099190612e00565b6040516020818303038152906040526040518563ffffffff1660e01b81526004016108379493929190612cc6565b600060405180830381600087803b15801561085157600080fd5b505af1158015610865573d6000803e3d6000fd5b50505050505050565b6000349050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b1580156108dd57600080fd5b505af11580156108f1573d6000803e3d6000fd5b50505050506109417f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc27f000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564836119f0565b600060405180610100016040528073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16815260200173f0dc76c22139ab22618ddfb498be1283254612b173ffffffffffffffffffffffffffffffffffffffff16815260200161271062ffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff1681526020014281526020018461012001518152602001838152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000e592427a0aece92de3edee1f18e0157c0586156473ffffffffffffffffffffffffffffffffffffffff1663db3e2198836040518263ffffffff1660e01b8152600401610a679190612de4565b602060405180830381600087803b158015610a8157600080fd5b505af1158015610a95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab9919061281a565b905082811015610b2657610b0473c02aaa39b223fe8d0a0e5c4f27ead9083c756cc27f000000000000000000000000e592427a0aece92de3edee1f18e0157c058615648386036119f0565b610b2573c02aaa39b223fe8d0a0e5c4f27ead9083c756cc233838603611bf1565b5b60006040518060600160405280866000015173ffffffffffffffffffffffffffffffffffffffff168152602001866020015173ffffffffffffffffffffffffffffffffffffffff168152602001866040015162ffffff1681525090506000610bae7f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f98483611895565b90508073ffffffffffffffffffffffffffffffffffffffff1663490e6cbc30886060015189608001516040518061010001604052808c6060015181526020018c6080015181526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018881526020018c60a0015162ffffff1681526020018c60c0015162ffffff1681526020018c60e0015161ffff1681526020018c610100015161ffff16815250604051602001610c629190612e00565b6040516020818303038152906040526040518563ffffffff1660e01b8152600401610c909493929190612cc6565b600060405180830381600087803b158015610caa57600080fd5b505af1158015610cbe573d6000803e3d6000fd5b50505050505050505050565b7f000000000000000000000000e592427a0aece92de3edee1f18e0157c0586156481565b7f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f98481565b7333eecbf908478c10614626a9d304bfe18b78dd7381565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e8363ffffffff166040518263ffffffff1660e01b8152600401610d8b9190612e52565b60206040518083038186803b158015610da357600080fd5b505afa158015610db7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddb9190612725565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3f90612da8565b60405180910390fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631e79a85b833060016040518463ffffffff1660e01b8152600401610ea893929190612e6d565b600060405180830381600087803b158015610ec257600080fd5b505af1158015610ed6573d6000803e3d6000fd5b50505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3733e1efda147ec9309e1e47782ecafede1d04b45e5846040518363ffffffff1660e01b8152600401610f4b929190612d12565b600060405180830381600087803b158015610f6557600080fd5b505af1158015610f79573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c0c77a836040518263ffffffff1660e01b8152600401610fd89190612e1c565b600060405180830381600087803b158015610ff257600080fd5b505af1158015611006573d6000803e3d6000fd5b505050506000670de0b6b3a7640000905061105673f0dc76c22139ab22618ddfb498be1283254612b17f000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564836119f0565b600060405180610100016040528073f0dc76c22139ab22618ddfb498be1283254612b173ffffffffffffffffffffffffffffffffffffffff16815260200173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16815260200161271062ffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff168152602001428152602001838152602001848152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000e592427a0aece92de3edee1f18e0157c0586156473ffffffffffffffffffffffffffffffffffffffff1663414bf389836040518263ffffffff1660e01b81526004016111779190612dc8565b602060405180830381600087803b15801561119157600080fd5b505af11580156111a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c9919061281a565b9050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b81526004016112269190612e52565b600060405180830381600087803b15801561124057600080fd5b505af1158015611254573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f1935050505015801561129e573d6000803e3d6000fd5b505050505050565b61271081565b60008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561131557600080fd5b505afa158015611329573d6000803e3d6000fd5b505050506040513d602081101561133f57600080fd5b81019080805190602001909291905050509050828110156113c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f496e73756666696369656e7420746f6b656e000000000000000000000000000081525060200191505060405180910390fd5b60008111156113dd576113dc848383611bf1565b5b50505050565b600082828101906113f4919061279d565b90506114247f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f9848260600151611df2565b5060008160600151602001519050611461817f000000000000000000000000e592427a0aece92de3edee1f18e0157c0586156484602001516119f0565b60008260e0015161ffff1667ffffffffffffffff8111801561148257600080fd5b506040519080825280602002602001820160405280156114b15781602001602082028036833780820191505090505b5090506114c28360c0015182611e3e565b6114d883604001518460c0015161ffff16611f2f565b6114e181612054565b6114f0836020015187846121c9565b50505050505050565b60008273ffffffffffffffffffffffffffffffffffffffff1682600067ffffffffffffffff8111801561152b57600080fd5b506040519080825280601f01601f19166020018201604052801561155e5781602001600182028036833780820191505090505b506040518082805190602001908083835b60208310611592578051825260208201915060208101905060208303925061156f565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146115f4576040519150601f19603f3d011682016040523d82523d6000602084013e6115f9565b606091505b5050905080611670576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f535445000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b505050565b6000808573ffffffffffffffffffffffffffffffffffffffff166323b872dd60e01b868686604051602401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106117745780518252602082019150602081019050602083039250611751565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146117d6576040519150601f19603f3d011682016040523d82523d6000602084013e6117db565b606091505b509150915081801561181b575060008151148061181a575080806020019051602081101561180857600080fd5b81019080805190602001909291905050505b5b61188d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f535446000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b505050505050565b6000816020015173ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff16106118d757600080fd5b82826000015183602001518460400151604051602001808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018262ffffff1681526020019350505050604051602081830303815290604052805190602001207fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b5460001b60405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018473ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200193505050506040516020818303038152906040528051906020012060001c905092915050565b6000808473ffffffffffffffffffffffffffffffffffffffff1663095ea7b360e01b8585604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310611ad15780518252602082019150602081019050602083039250611aae565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611b33576040519150601f19603f3d011682016040523d82523d6000602084013e611b38565b606091505b5091509150818015611b785750600081511480611b775750808060200190516020811015611b6557600080fd5b81019080805190602001909291905050505b5b611bea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260028152602001807f534100000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b5050505050565b6000808473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b8585604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310611cd25780518252602082019150602081019050602083039250611caf565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611d34576040519150601f19603f3d011682016040523d82523d6000602084013e611d39565b606091505b5091509150818015611d795750600081511480611d785750808060200190516020811015611d6657600080fd5b81019080805190602001909291905050505b5b611deb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260028152602001807f535400000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b5050505050565b6000611dfe8383611895565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611e3857600080fd5b92915050565b6000805b8361ffff168261ffff1614611f2957600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663be040fb06040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611ebb57600080fd5b505af1158015611ecf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef391906127f1565b915081838261ffff1681518110611f0657fe5b602002602001019061ffff16908161ffff16815250508080600101915050611e42565b50505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b383836040518363ffffffff1660e01b8152600401611f8c929190612d64565b600060405180830381600087803b158015611fa657600080fd5b505af1158015611fba573d6000803e3d6000fd5b50505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631e79a85b828460016040518463ffffffff1660e01b815260040161201e93929190612ea4565b600060405180830381600087803b15801561203857600080fd5b505af115801561204c573d6000803e3d6000fd5b505050505050565b60005b60018251038161ffff1610156121c5576000828261ffff168151811061207957fe5b60200260200101519050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3733e1efda147ec9309e1e47782ecafede1d04b45e58361ffff166040518363ffffffff1660e01b81526004016120f8929190612d3b565b600060405180830381600087803b15801561211257600080fd5b505af1158015612126573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c0c77a826040518263ffffffff1660e01b81526004016121859190612e1c565b600060405180830381600087803b15801561219f57600080fd5b505af11580156121b3573d6000803e3d6000fd5b50505050508080600101915050612057565b5050565b60006121d584846121f4565b90506121e28230836119f0565b6121ee8230338461220e565b50505050565b600082828401915081101561220857600080fd5b92915050565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156122695750804710155b156123c1577f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b1580156122d657600080fd5b505af11580156122ea573d6000803e3d6000fd5b50505050507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561238057600080fd5b505af1158015612394573d6000803e3d6000fd5b505050506040513d60208110156123aa57600080fd5b810190808051906020019092919050505050612413565b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561240557612400848383611bf1565b612412565b61241184848484611675565b5b5b50505050565b60008135905061242881613072565b92915050565b60008151905061243d81613072565b92915050565b60008083601f84011261245557600080fd5b8235905067ffffffffffffffff81111561246e57600080fd5b60208301915083600182028301111561248657600080fd5b9250929050565b600061014082840312156124a057600080fd5b6124ab610100612edb565b905060006124bb848285016126e6565b60008301525060206124cf848285016126e6565b60208301525060406124e384828501612419565b60408301525060606124f784828501612647565b60608301525060c061250b848285016126d1565b60808301525060e061251f848285016126d1565b60a083015250610100612534848285016126a7565b60c083015250610120612549848285016126a7565b60e08301525092915050565b6000610140828403121561256857600080fd5b612573610140612edb565b9050600061258384828501612419565b600083015250602061259784828501612419565b60208301525060406125ab848285016126d1565b60408301525060606125bf848285016126e6565b60608301525060806125d3848285016126e6565b60808301525060a06125e7848285016126d1565b60a08301525060c06125fb848285016126d1565b60c08301525060e061260f848285016126a7565b60e083015250610100612624848285016126a7565b6101008301525061012061263a848285016126e6565b6101208301525092915050565b60006060828403121561265957600080fd5b6126636060612edb565b9050600061267384828501612419565b600083015250602061268784828501612419565b602083015250604061269b848285016126d1565b60408301525092915050565b6000813590506126b681613089565b92915050565b6000815190506126cb81613089565b92915050565b6000813590506126e0816130a0565b92915050565b6000813590506126f5816130b7565b92915050565b60008151905061270a816130b7565b92915050565b60008135905061271f816130ce565b92915050565b60006020828403121561273757600080fd5b60006127458482850161242e565b91505092915050565b60008060006060848603121561276357600080fd5b600061277186828701612419565b9350506020612782868287016126e6565b925050604061279386828701612419565b9150509250925092565b600061014082840312156127b057600080fd5b60006127be8482850161248d565b91505092915050565b600061014082840312156127da57600080fd5b60006127e884828501612555565b91505092915050565b60006020828403121561280357600080fd5b6000612811848285016126bc565b91505092915050565b60006020828403121561282c57600080fd5b600061283a848285016126fb565b91505092915050565b6000806040838503121561285657600080fd5b6000612864858286016126e6565b925050602061287585828601612419565b9150509250929050565b6000806000806060858703121561289557600080fd5b60006128a3878288016126e6565b94505060206128b4878288016126e6565b935050604085013567ffffffffffffffff8111156128d157600080fd5b6128dd87828801612443565b925092505092959194509250565b600080604083850312156128fe57600080fd5b600061290c85828601612710565b925050602061291d858286016126e6565b9150509250929050565b61293081612fae565b82525050565b61293f81612f39565b82525050565b61294e81612f39565b82525050565b61295d81612f4b565b82525050565b600061296e82612f0c565b6129788185612f17565b935061298881856020860161302c565b61299181613061565b840191505092915050565b6129a581612fc0565b82525050565b60006129b8601c83612f28565b91507f6d73672e73656e64657220646f6573206e6f74206f776e2073746172000000006000830152602082019050919050565b61010082016000820151612a026000850182612936565b506020820151612a156020850182612936565b506040820151612a286040850182612c51565b506060820151612a3b6060850182612936565b506080820151612a4e6080850182612c6f565b5060a0820151612a6160a0850182612c6f565b5060c0820151612a7460c0850182612c6f565b5060e0820151612a8760e0850182612c15565b50505050565b61010082016000820151612aa46000850182612936565b506020820151612ab76020850182612936565b506040820151612aca6040850182612c51565b506060820151612add6060850182612936565b506080820151612af06080850182612c6f565b5060a0820151612b0360a0850182612c6f565b5060c0820151612b1660c0850182612c6f565b5060e0820151612b2960e0850182612c15565b50505050565b61014082016000820151612b466000850182612c6f565b506020820151612b596020850182612c6f565b506040820151612b6c6040850182612936565b506060820151612b7f6060850182612bd3565b506080820151612b9260c0850182612c51565b5060a0820151612ba560e0850182612c51565b5060c0820151612bb9610100850182612c24565b5060e0820151612bcd610120850182612c24565b50505050565b606082016000820151612be96000850182612936565b506020820151612bfc6020850182612936565b506040820151612c0f6040850182612c51565b50505050565b612c1e81612f65565b82525050565b612c2d81612f57565b82525050565b612c3c81612f57565b82525050565b612c4b81613008565b82525050565b612c5a81612f85565b82525050565b612c6981612f85565b82525050565b612c7881612f94565b82525050565b612c8781612f94565b82525050565b612c968161301a565b82525050565b612ca581612f9e565b82525050565b6000602082019050612cc06000830184612945565b92915050565b6000608082019050612cdb6000830187612927565b612ce86020830186612c7e565b612cf56040830185612c7e565b8181036060830152612d078184612963565b905095945050505050565b6000604082019050612d276000830185612945565b612d346020830184612c42565b9392505050565b6000604082019050612d506000830185612945565b612d5d6020830184612c7e565b9392505050565b6000604082019050612d796000830185612945565b612d866020830184612c8d565b9392505050565b6000602082019050612da2600083018461299c565b92915050565b60006020820190508181036000830152612dc1816129ab565b9050919050565b600061010082019050612dde60008301846129eb565b92915050565b600061010082019050612dfa6000830184612a8d565b92915050565b600061014082019050612e166000830184612b2f565b92915050565b6000602082019050612e316000830184612c33565b92915050565b6000602082019050612e4c6000830184612c60565b92915050565b6000602082019050612e676000830184612c7e565b92915050565b6000606082019050612e826000830186612c9c565b612e8f6020830185612927565b612e9c6040830184612954565b949350505050565b6000606082019050612eb96000830186612c9c565b612ec66020830185612945565b612ed36040830184612954565b949350505050565b6000604051905081810181811067ffffffffffffffff82111715612f0257612f0161305f565b5b8060405250919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612f4482612f65565b9050919050565b60008115159050919050565b600061ffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b6000612fb982612fe4565b9050919050565b6000612fcb82612fd2565b9050919050565b6000612fdd82612f65565b9050919050565b6000612fef82612ff6565b9050919050565b600061300182612f65565b9050919050565b600061301382612f57565b9050919050565b600061302582612f9e565b9050919050565b60005b8381101561304a57808201518184015260208101905061302f565b83811115613059576000848401525b50505050565bfe5b6000601f19601f8301169050919050565b61307b81612f39565b811461308657600080fd5b50565b61309281612f57565b811461309d57600080fd5b50565b6130a981612f85565b81146130b457600080fd5b50565b6130c081612f94565b81146130cb57600080fd5b50565b6130d781612f9e565b81146130e257600080fd5b5056fea2646970667358221220e59e61cc0ea57d7103919b477a60c54036f02c06e7309c24d56da7696e05690964736f6c63430007060033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000e592427a0aece92de3edee1f18e0157c058615640000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984
-----Decoded View---------------
Arg [0] : _swapRouter (address): 0xE592427A0AEce92De3Edee1F18E0157C05861564
Arg [1] : _factory (address): 0x1F98431c8aD98523631AE4a59f267346ea31F984
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564
Arg [1] : 0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.