Contract 0x973bf562407766e77f885c1cd1a8060e5303c745 14

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x77255881f1fdaac9b3a401ec85b412b3381771a4884e1f98b563a49c9c4192cd0x96b218882028787612024-04-20 6:00:1753 mins ago0x2573437f17593beddf851839ff93ea32ef86f15d IN  0x973bf562407766e77f885c1cd1a8060e5303c7450 ETH0.0000018 0.01
0xd0442971437613d629e92dcf37cd522ae9b686a5e397a0bab7ee249730c45da30x15caf08c2028775752024-04-20 5:55:1958 mins ago0x3577be5a69156013eac1e75e8e7f17f1b7350d59 IN  0x973bf562407766e77f885c1cd1a8060e5303c7450 ETH0.00000154 0.01
0x83aa91748bfea640822a25c98ed8fee5c20dbe2e35c4c52c7bbdcfbf9f15ec440x950e5c842028750452024-04-20 5:44:471 hr 8 mins ago0xcf68bb04d690ab88f44692ef8d2536b298f00e9b IN  0x973bf562407766e77f885c1cd1a8060e5303c7450 ETH0.00000142 0.01
0x460b2b2962b090f45da241347e9cd1d318554d2a734817523efdb816c96385030xa47b6c802028744762024-04-20 5:42:241 hr 11 mins ago0xe64447abb267817fc0410acf79f540efffa43235 IN  0x973bf562407766e77f885c1cd1a8060e5303c7450 ETH0.00000228 0.01
0xace884f23c5e5331c3e423d9f28bec21f174f32bb4e56e0aac0545d4f468a3560x178e24852028736742024-04-20 5:39:031 hr 14 mins ago0x4d6e030855d5e787a671ac69c2b3e19bc2447bd5 IN  0x973bf562407766e77f885c1cd1a8060e5303c7450 ETH0.00000145 0.01
0xd0b82e99be7005d92f0df4d1d66a975698367eac9018d36af818067e74ddb9140x0ed7a4002028733542024-04-20 5:37:431 hr 16 mins ago0x4bf6d9eb7a02ee9e5ee9068d194fd16c6c0e5326 IN  0x973bf562407766e77f885c1cd1a8060e5303c7450.0000366 ETH0.00000164 0.01
0xad774403fb8515ac973fb690c5f85fcacdf4f779748c8d2499d05691181e039e0x0f3648002028673812024-04-20 5:12:411 hr 41 mins ago0xbfc096a3f5fa046ab9b7a9c43424203a444656be IN  0x973bf562407766e77f885c1cd1a8060e5303c7450.0000386 ETH0.00000166 0.01
0xbb656e91437b7bc5f2cd38e95d40ebd346d07aac95470a968d8e0cb23e6e9a690x3442986d2028632602024-04-20 4:55:281 hr 58 mins ago0x4d842c484484f629064b99c57104174f87debe06 IN  0x973bf562407766e77f885c1cd1a8060e5303c7450 ETH0.00000142 0.01
0xa84b1fa9fef112abced4aa0b6b7bc8f349d72314977ede9109ec285691f59dff0x045c88942028490882024-04-20 3:55:552 hrs 57 mins ago0x973a43addda29dde2de6330a6a3d20277f4735d3 IN  0x973bf562407766e77f885c1cd1a8060e5303c7450 ETH0.000001530.01
0x4daf7e16ce98277a288351fcafa227e620c69b85379f384d736eb51fbe6f72f90x045c6c942028450102024-04-20 3:38:463 hrs 15 mins ago0x7e09dfbba23d078e16f038b1ed4c558185c4be1e IN  0x973bf562407766e77f885c1cd1a8060e5303c7450 ETH0.000001550.01
0xb62361d5c75f8d610810d8d3b413e23a886bbe3f9090ee9fd988ddb32b192f320x074300902028424202024-04-20 3:27:453 hrs 26 mins ago0x4ba1d152409f43ad92ba358886fe94bae4f5f656 IN  0x973bf562407766e77f885c1cd1a8060e5303c7450 ETH0.000001610.01
0x22a1491eaee9d6cc883e9a8ecd0e1083dd19b6f1d6365ba5f0bd3f968d71db1f0x04acc4982028183332024-04-20 1:46:305 hrs 7 mins ago0x96eb66349e9ab00d45d21fd32a178114312f2353 IN  0x973bf562407766e77f885c1cd1a8060e5303c7450 ETH0.000001530.01
0x9e6f5b8a070fc70f29e208537740e169ce4b29d5d52e45a79da058a00dfc92310x94d178962028147422024-04-20 1:31:135 hrs 22 mins ago0xf06a656f234fa77f7bfda8a85ed1da6eb73487a4 IN  0x973bf562407766e77f885c1cd1a8060e5303c7450 ETH0.00000184 0.01
0x5cfa43f6349deffb8a47addc66afd0f62a356a98cc2c960629b0663ac314af400x0d0964042028124622024-04-20 1:21:355 hrs 32 mins ago0x9c39190c44147cf5aa553f88bf8a6933b5559b3e IN  0x973bf562407766e77f885c1cd1a8060e5303c7450.0000543 ETH0.00000154 0.01
0x994f29c3e6e9a7ac3e511daf3fe59fa2e3936b1b0f9127bcdea27e2054c7e8690x0bc828002027949412024-04-20 0:06:326 hrs 47 mins ago0x38a80b38ca4b6243536f75e087ddd6fb528252ba IN  0x973bf562407766e77f885c1cd1a8060e5303c7450.0000203 ETH0.00000155 0.01
0xbc5da1cc2fb218161dbe3f8b33ee2e3baf17cfe374064645f1bcf57c7cb01d140xacba54b02027871222024-04-19 23:33:337 hrs 20 mins ago0x7a299d77ba39b30c6936fd832dac546be74b3e21 IN  0x973bf562407766e77f885c1cd1a8060e5303c7450.0005 ETH0.000003 0.01
0x37f64b05da0fdace09b5ec5b1dbc68eedc15c10deaa54c35f5a4c31476466bc00xacbb7cb02027863182024-04-19 23:30:107 hrs 23 mins ago0x2c33ec0fa93d10221801f3b7ca2550e0cd017c08 IN  0x973bf562407766e77f885c1cd1a8060e5303c7450.0005 ETH0.00000354 0.01
0x71ebc739ed86a59d4d09f238d397e3ba553ba6c3fe2c93956406f562796b788f0x20f7fc012027733122024-04-19 22:34:408 hrs 19 mins ago0x747a1b709a12274a35c7be8b37adea98d5b7bc98 IN  0x973bf562407766e77f885c1cd1a8060e5303c7450.0033 ETH0.000001640.01
0xb44f7a050929bfc5587244536b27d49337a5ea3c3b32cc33dc95f8017d07cf410xafa588912027688722024-04-19 22:15:508 hrs 37 mins ago0x5e235143f22019730a80437455b18742efc7657f IN  0x973bf562407766e77f885c1cd1a8060e5303c7450.000003174038819 ETH0.00000152 0.01
0xd78f2ab399a0f2736407fc1130900175c0725b759d3cfeac30f97f48c4860b120xa5075c762027687362024-04-19 22:15:168 hrs 38 mins ago0x13a5e7bde7477616c953ac4d4a1a82f751053efb IN  0x973bf562407766e77f885c1cd1a8060e5303c7450 ETH0.00000153 0.01
0x3f13eb02b6c6cb0e5643407cfb3172f9cb34346062c21c5e8a1bcaf9f3194b9e0x2f1858812027676872024-04-19 22:10:528 hrs 42 mins ago0x3b77a86a2becdf67a246afcc30f60b7319ce2a1f IN  0x973bf562407766e77f885c1cd1a8060e5303c7450 ETH0.00000152 0.01
0x7e594ae4a891c1003f82c31b7096a30a7b51ca5b0d2c50a13cc6bb522997edff0x95e450842027415682024-04-19 20:19:2110 hrs 34 mins ago0x16aea9952f9d308b1a1def3684b0f18111a0aabf IN  0x973bf562407766e77f885c1cd1a8060e5303c7450 ETH0.00000181 0.01
0xc1c2ce317f41c3fcb17ff7dd3200522425cfb7d5fed849c894d235dadc5f10e00x151268a52027404062024-04-19 20:14:2610 hrs 39 mins ago0x5302bd11821ae5ebb29e81a0cc37fca9b4a3720c IN  0x973bf562407766e77f885c1cd1a8060e5303c7450 ETH0.0000015 0.01
0x389f0bab399935be714ca7497190c53bdf3d2938dc68c85e15d056c9c6f1ac280xacdcf89d2027381472024-04-19 20:04:5110 hrs 48 mins ago0x5d2da6934caa75a8ea55a4d21840b5283d9b6eb5 IN  0x973bf562407766e77f885c1cd1a8060e5303c7450.0000161187704 ETH0.00000168 0.01
0xe0fd40380479bf4e8d03948b749f8a3dcd68e9d7536f761691b576595d2bba8a0x0f42c4002027366512024-04-19 19:58:2810 hrs 55 mins ago0xf0c11422d0abba8a6a87e3992e9361177b9000d1 IN  0x973bf562407766e77f885c1cd1a8060e5303c7450.0000384 ETH0.00000175 0.01
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x77255881f1fdaac9b3a401ec85b412b3381771a4884e1f98b563a49c9c4192cd2028787612024-04-20 6:00:1753 mins ago 0x973bf562407766e77f885c1cd1a8060e5303c7450x2573437f17593beddf851839ff93ea32ef86f15d0.001884657679002747 ETH
0x77255881f1fdaac9b3a401ec85b412b3381771a4884e1f98b563a49c9c4192cd2028787612024-04-20 6:00:1753 mins ago Wrapped Ether 0x973bf562407766e77f885c1cd1a8060e5303c7450.001884657679002747 ETH
0xd0442971437613d629e92dcf37cd522ae9b686a5e397a0bab7ee249730c45da32028775752024-04-20 5:55:1958 mins ago 0x973bf562407766e77f885c1cd1a8060e5303c7450x3577be5a69156013eac1e75e8e7f17f1b7350d590.003261009095951001 ETH
0xd0442971437613d629e92dcf37cd522ae9b686a5e397a0bab7ee249730c45da32028775752024-04-20 5:55:1958 mins ago Wrapped Ether 0x973bf562407766e77f885c1cd1a8060e5303c7450.003261009095951001 ETH
0x83aa91748bfea640822a25c98ed8fee5c20dbe2e35c4c52c7bbdcfbf9f15ec442028750452024-04-20 5:44:471 hr 8 mins ago 0x973bf562407766e77f885c1cd1a8060e5303c7450xcf68bb04d690ab88f44692ef8d2536b298f00e9b0.000711576590617516 ETH
0x83aa91748bfea640822a25c98ed8fee5c20dbe2e35c4c52c7bbdcfbf9f15ec442028750452024-04-20 5:44:471 hr 8 mins ago Wrapped Ether 0x973bf562407766e77f885c1cd1a8060e5303c7450.000711576590617516 ETH
0x460b2b2962b090f45da241347e9cd1d318554d2a734817523efdb816c96385032028744762024-04-20 5:42:241 hr 11 mins ago 0x973bf562407766e77f885c1cd1a8060e5303c7450xe64447abb267817fc0410acf79f540efffa432350.000315400289310323 ETH
0x460b2b2962b090f45da241347e9cd1d318554d2a734817523efdb816c96385032028744762024-04-20 5:42:241 hr 11 mins ago Wrapped Ether 0x973bf562407766e77f885c1cd1a8060e5303c7450.000315400289310323 ETH
0xace884f23c5e5331c3e423d9f28bec21f174f32bb4e56e0aac0545d4f468a3562028736742024-04-20 5:39:031 hr 14 mins ago 0x973bf562407766e77f885c1cd1a8060e5303c7450x4d6e030855d5e787a671ac69c2b3e19bc2447bd50.001063303208789994 ETH
0xace884f23c5e5331c3e423d9f28bec21f174f32bb4e56e0aac0545d4f468a3562028736742024-04-20 5:39:031 hr 14 mins ago Wrapped Ether 0x973bf562407766e77f885c1cd1a8060e5303c7450.001063303208789994 ETH
0xd0b82e99be7005d92f0df4d1d66a975698367eac9018d36af818067e74ddb9142028733542024-04-20 5:37:431 hr 16 mins ago 0x973bf562407766e77f885c1cd1a8060e5303c745 Wrapped Ether0.0000366 ETH
0xad774403fb8515ac973fb690c5f85fcacdf4f779748c8d2499d05691181e039e2028673812024-04-20 5:12:411 hr 41 mins ago 0x973bf562407766e77f885c1cd1a8060e5303c745 Wrapped Ether0.0000386 ETH
0xbb656e91437b7bc5f2cd38e95d40ebd346d07aac95470a968d8e0cb23e6e9a692028632602024-04-20 4:55:281 hr 58 mins ago 0x973bf562407766e77f885c1cd1a8060e5303c7450x4d842c484484f629064b99c57104174f87debe060.00000936812150304 ETH
0xbb656e91437b7bc5f2cd38e95d40ebd346d07aac95470a968d8e0cb23e6e9a692028632602024-04-20 4:55:281 hr 58 mins ago Wrapped Ether 0x973bf562407766e77f885c1cd1a8060e5303c7450.00000936812150304 ETH
0xa84b1fa9fef112abced4aa0b6b7bc8f349d72314977ede9109ec285691f59dff2028490882024-04-20 3:55:552 hrs 57 mins ago 0x973bf562407766e77f885c1cd1a8060e5303c7450x973a43addda29dde2de6330a6a3d20277f4735d30.009815248273701974 ETH
0xa84b1fa9fef112abced4aa0b6b7bc8f349d72314977ede9109ec285691f59dff2028490882024-04-20 3:55:552 hrs 57 mins ago Wrapped Ether 0x973bf562407766e77f885c1cd1a8060e5303c7450.009815248273701974 ETH
0x4daf7e16ce98277a288351fcafa227e620c69b85379f384d736eb51fbe6f72f92028450102024-04-20 3:38:463 hrs 15 mins ago 0x973bf562407766e77f885c1cd1a8060e5303c7450x7e09dfbba23d078e16f038b1ed4c558185c4be1e0.009820150664527872 ETH
0x4daf7e16ce98277a288351fcafa227e620c69b85379f384d736eb51fbe6f72f92028450102024-04-20 3:38:463 hrs 15 mins ago Wrapped Ether 0x973bf562407766e77f885c1cd1a8060e5303c7450.009820150664527872 ETH
0xb62361d5c75f8d610810d8d3b413e23a886bbe3f9090ee9fd988ddb32b192f322028424202024-04-20 3:27:453 hrs 26 mins ago 0x973bf562407766e77f885c1cd1a8060e5303c7450x4ba1d152409f43ad92ba358886fe94bae4f5f6560.008175968464142336 ETH
0xb62361d5c75f8d610810d8d3b413e23a886bbe3f9090ee9fd988ddb32b192f322028424202024-04-20 3:27:453 hrs 26 mins ago Wrapped Ether 0x973bf562407766e77f885c1cd1a8060e5303c7450.008175968464142336 ETH
0x22a1491eaee9d6cc883e9a8ecd0e1083dd19b6f1d6365ba5f0bd3f968d71db1f2028183332024-04-20 1:46:305 hrs 7 mins ago 0x973bf562407766e77f885c1cd1a8060e5303c7450x96eb66349e9ab00d45d21fd32a178114312f23530.021046471829491618 ETH
0x22a1491eaee9d6cc883e9a8ecd0e1083dd19b6f1d6365ba5f0bd3f968d71db1f2028183332024-04-20 1:46:305 hrs 7 mins ago Wrapped Ether 0x973bf562407766e77f885c1cd1a8060e5303c7450.021046471829491618 ETH
0x9e6f5b8a070fc70f29e208537740e169ce4b29d5d52e45a79da058a00dfc92312028147422024-04-20 1:31:135 hrs 22 mins ago 0x973bf562407766e77f885c1cd1a8060e5303c7450xf06a656f234fa77f7bfda8a85ed1da6eb73487a40.010849705864986624 ETH
0x9e6f5b8a070fc70f29e208537740e169ce4b29d5d52e45a79da058a00dfc92312028147422024-04-20 1:31:135 hrs 22 mins ago Wrapped Ether 0x973bf562407766e77f885c1cd1a8060e5303c7450.010849705864986624 ETH
0x5cfa43f6349deffb8a47addc66afd0f62a356a98cc2c960629b0663ac314af402028124622024-04-20 1:21:355 hrs 32 mins ago 0x973bf562407766e77f885c1cd1a8060e5303c745 Wrapped Ether0.0000543 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LlamaZip

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion, None license
File 1 of 9 : LlamaZip.sol
//SPDX-License-Identifier: None
pragma solidity =0.7.6;
pragma abicoder v2;

import "./router/SwapRouter.sol";
import "./router/libs/IERC20.sol";

interface UniswapV3Pool {
    function token0() external returns (address);
    function token1() external returns (address);
    function fee() external returns (uint24);
}

contract LlamaZip is SwapRouter {
    address internal immutable owner; // Set to internal to avoid collisions
    uint internal constant MAX_BPS = 10000;

    constructor(address _factory, address _WETH9, address _owner) SwapRouter(_factory, _WETH9) {
        owner = _owner;
    }

    struct Pool {
        address token0;
        address token1;
        uint24 fee;
    }

    mapping(uint => Pool) internal pools;

    function setPool(uint id, address pool) internal {
        require(pools[id].token0 == address(0) && pools[id].token1 == address(0), "already set");

        pools[id] = Pool({
            fee: UniswapV3Pool(pool).fee(),
            token0: UniswapV3Pool(pool).token0(),
            token1: UniswapV3Pool(pool).token1()
        });
    }

    function getPool(uint poolId) view internal returns (Pool memory pool){
        if(poolId == 0){
            return Pool(0x82aF49447D8a07e3bd95BD0d56f35241523fBab1, 0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8, 500); // WETH / USDC 0.05%
        } else if(poolId == (1 << 252)){
            return Pool(0x82aF49447D8a07e3bd95BD0d56f35241523fBab1, 0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9, 500); // WETH / USDT 0.05%
        } else if(poolId == (2 << 252)){
            return Pool(0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f, 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1, 500); // WBTC / WETH 0.05%
        } else if(poolId == (3 << 252)){
            return Pool(0x82aF49447D8a07e3bd95BD0d56f35241523fBab1, 0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a, 3000); // WETH / GMX 0.3%
        } else if(poolId == (4 << 252)){
            return Pool(0x18c11FD286C5EC11c3b683Caa813B77f5163A122, 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1, 3000); // GNS / WETH 0.3%
        } else if(poolId == (5 << 252)){
            return Pool(0x539bdE0d7Dbd336b79148AA742883198BBF60342, 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1, 10000); // MAGIC / WETH 1%
        } else if(poolId == (6 << 252)){
            return Pool(0x82aF49447D8a07e3bd95BD0d56f35241523fBab1, 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1, 3000); // WETH / DAI 0.3%
        } else if(poolId == (7 << 252)){
            return Pool(0x82aF49447D8a07e3bd95BD0d56f35241523fBab1, 0x912CE59144191C1204E64559FE8253a0e49E6548, 10000); // WETH / ARB 1%
        } else if(poolId == (8 << 252)){
            return Pool(0x82aF49447D8a07e3bd95BD0d56f35241523fBab1, 0x912CE59144191C1204E64559FE8253a0e49E6548, 3000); // WETH / ARB 0.3%
        } else if(poolId == (9 << 252)){
            return Pool(0x82aF49447D8a07e3bd95BD0d56f35241523fBab1, 0x912CE59144191C1204E64559FE8253a0e49E6548, 500); // WETH / ARB 0.05%
        } else if(poolId == (10 << 252)){
            return Pool(0x82aF49447D8a07e3bd95BD0d56f35241523fBab1, 0x912CE59144191C1204E64559FE8253a0e49E6548, 100); // WETH / ARB 0.01%
        }

        return pools[poolId];
    }

    // Because of function uniswapV3SwapCallback() 2.3e-8% of calls will fail because they'll hit that selector
    fallback() external payable {
        if(msg.sender == owner){
            (uint method) = abi.decode(msg.data, (uint));
            if(method == 0){
                // Sweep tokens or ETH that got stuck here
                (,address token, uint amount, address receiver) = abi.decode(msg.data, (uint, address, uint, address));
                if(token == address(0)){
                    payable(receiver).transfer(address(this).balance);
                } else {
                    IERC20(token).transfer(receiver, amount); // We don't care if it fails
                }
            } else{
                (,uint poolId, address poolAddress) = abi.decode(msg.data, (uint, uint, address));
                setPool(poolId, poolAddress);
            }
            return;
        }

        uint data;
        assembly {
            data := calldataload(0)
        }
        uint pair = data & (0xf << (256-4));
        uint token0IsTokenIn = data & (0x1 << (256-4-1));
        Pool memory pool = getPool(pair);
        address tokenIn = token0IsTokenIn == 0?pool.token1:pool.token0;

        uint expectedSignificantBits = (data & (0x1ffff << (256-5-17))) >> (256-5-17);
        uint outZeros = (data & (0xff << (256-5-17-8))) >> (256-5-17-8);
        uint expectedTotalOut = expectedSignificantBits << outZeros;

        uint totalIn;
        if(tokenIn == WETH9 && msg.value > 0){
            totalIn = msg.value;
        } else {
            uint inputDataExists = data & (type(uint256).max >> 5+17+8+2);
            if(inputDataExists == 0){
                totalIn = IERC20(tokenIn).balanceOf(msg.sender);
                expectedTotalOut = (expectedTotalOut*totalIn)/1e18; // use it as a rate instead
            } else {
                uint inZeros = (data & (0x1f << (256-5-17-8-2-5))) >> (256-5-17-8-2-5);
                uint calldataLength;
                assembly {
                    calldataLength := calldatasize()
                }
                // (type(uint256).max >> 5+17+8+2+5) = 0x7ffffffffffffffffffffffffffffffffffffffffffffffffffffff, this is done to get around stack too deep
                uint significantInputBits = (data & 0x7ffffffffffffffffffffffffffffffffffffffffffffffffffffff) >> (256-(calldataLength*8));
                totalIn = significantInputBits * (10**inZeros);
            }
        }

        uint slippageBps;
        {
            uint slippageId = data & (0x3 << (256-5-17-8-2));
            if(slippageId == 0){
                slippageBps = MAX_BPS - 50; //0.5
            } else if(slippageId == (0x1 << (256-5-17-8-2))){
                slippageBps = MAX_BPS - 10; //0.1
            }  else if(slippageId == (0x2 << (256-5-17-8-2))){
                slippageBps = MAX_BPS - 100; //1
            }  else if(slippageId == (0x3 << (256-5-17-8-2))){
                slippageBps = MAX_BPS - 500; //5
            }
        }

        uint minTotalOut = (expectedTotalOut * slippageBps)/MAX_BPS;

        address tokenOut = token0IsTokenIn == 0?pool.token0:pool.token1;
        swap(tokenIn, tokenOut, pool.fee, totalIn, expectedTotalOut, minTotalOut);
    }
}

File 2 of 9 : SwapRouter.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity =0.7.6;
pragma abicoder v2;

import "./libs/CallbackValidation.sol";
import "./libs/PeripheryPayments.sol";
import "./libs/PeripheryImmutableState.sol";
import "./libs/SafeCast.sol";

interface IUniswapV3Pool {
    function swap(
        address recipient,
        bool zeroForOne,
        int256 amountSpecified,
        uint160 sqrtPriceLimitX96,
        bytes calldata data
    ) external returns (int256 amount0, int256 amount1);
}

contract SwapRouter is PeripheryImmutableState, PeripheryPayments {
    using SafeCast for uint256;

    /// @dev The minimum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MIN_TICK)
    uint160 internal constant MIN_SQRT_RATIO = 4295128739;
    /// @dev The maximum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MAX_TICK)
    uint160 internal constant MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342;

    constructor(address _factory, address _WETH9) PeripheryImmutableState(_factory, _WETH9) {}

    function getPool(
        address tokenA,
        address tokenB,
        uint24 fee
    ) private view returns (IUniswapV3Pool) {
        return IUniswapV3Pool(PoolAddress.computeAddress(factory, PoolAddress.getPoolKey(tokenA, tokenB, fee)));
    }

    struct SwapCallbackData {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address payer;
    }

    function swap(address tokenIn, address tokenOut, uint24 fee, uint amountIn, uint expectedAmountOut, uint minAmountOut) internal {
        bool zeroForOne = tokenIn < tokenOut;

        bytes memory data = abi.encode(SwapCallbackData({
            tokenIn: tokenIn,
            tokenOut: tokenOut,
            fee: fee,
            payer: msg.sender
        }));

        (int256 amount0, int256 amount1) =
            getPool(tokenIn, tokenOut, fee).swap(
                address(this),
                zeroForOne,
                amountIn.toInt256(),
                (zeroForOne ? MIN_SQRT_RATIO + 1 : MAX_SQRT_RATIO - 1),
                data
            );

        uint amountOut = uint256(-(zeroForOne ? amount1 : amount0));
        if(amountOut > expectedAmountOut){
            amountOut = expectedAmountOut;
        }

        require(amountOut >= minAmountOut, 'Too little received');

        if(tokenOut == WETH9){
            // Doesn't support WETH output since we can't differentiate
            IWETH9(WETH9).withdraw(amountOut);
            TransferHelper.safeTransferETH(msg.sender, amountOut);
        } else {
            TransferHelper.safeTransfer(tokenOut, msg.sender, amountOut);
        }
    }

    function uniswapV3SwapCallback(
        int256 amount0Delta,
        int256 amount1Delta,
        bytes calldata _data
    ) external {
        require(amount0Delta > 0 || amount1Delta > 0); // swaps entirely within 0-liquidity regions are not supported
        SwapCallbackData memory data = abi.decode(_data, (SwapCallbackData));
        CallbackValidation.verifyCallback(factory, data.tokenIn, data.tokenOut, data.fee);

        pay(data.tokenIn, data.payer, msg.sender, amount0Delta > 0? uint256(amount0Delta) : uint256(amount1Delta));
    }
}

File 3 of 9 : CallbackValidation.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity =0.7.6;

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 (address 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 (address pool)
    {
        pool = PoolAddress.computeAddress(factory, poolKey);
        require(msg.sender == address(pool));
    }
}

File 4 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.7.6;

interface IERC20{
    function balanceOf(address account) external view returns (uint256);
    function transfer(address to, uint256 amount) external returns (bool);
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
    function approve(address spender, uint256 amount) external returns (bool);
}

File 5 of 9 : PeripheryImmutableState.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity =0.7.6;

/// @title Immutable state
/// @notice Immutable state used by periphery contracts
abstract contract PeripheryImmutableState {
    address internal immutable factory;
    address internal immutable WETH9;

    constructor(address _factory, address _WETH9) {
        factory = _factory;
        WETH9 = _WETH9;
    }
}

File 6 of 9 : PeripheryPayments.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.5;

import './IERC20.sol';

import './TransferHelper.sol';

import './PeripheryImmutableState.sol';

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;
}

abstract contract PeripheryPayments is PeripheryImmutableState {
    receive() external payable {
        require(msg.sender == WETH9, 'Not WETH9');
    }

/*
Removed external functions to avoid collisions

    /// @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);
        }
    }
}

File 7 of 9 : PoolAddress.sol
// 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
                    )
                )
            )
        );
    }
}

File 8 of 9 : SafeCast.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Safe casting methods
/// @notice Contains methods for safely casting between types
library SafeCast {
    /// @notice Cast a uint256 to a uint160, revert on overflow
    /// @param y The uint256 to be downcasted
    /// @return z The downcasted integer, now type uint160
    function toUint160(uint256 y) internal pure returns (uint160 z) {
        require((z = uint160(y)) == y);
    }

    /// @notice Cast a int256 to a int128, revert on overflow or underflow
    /// @param y The int256 to be downcasted
    /// @return z The downcasted integer, now type int128
    function toInt128(int256 y) internal pure returns (int128 z) {
        require((z = int128(y)) == y);
    }

    /// @notice Cast a uint256 to a int256, revert on overflow
    /// @param y The uint256 to be casted
    /// @return z The casted integer, now type int256
    function toInt256(uint256 y) internal pure returns (int256 z) {
        require(y < 2**255);
        z = int256(y);
    }
}

File 9 of 9 : TransferHelper.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.0;

import './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');
    }
}

Settings
{
  "evmVersion": "istanbul",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 999999
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WETH9","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"int256","name":"amount0Delta","type":"int256"},{"internalType":"int256","name":"amount1Delta","type":"int256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"uniswapV3SwapCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60e06040523480156200001157600080fd5b5060405162001ff138038062001ff1833981016040819052620000349162000079565b6001600160601b0319606093841b811660805291831b821660a05290911b1660c052620000c2565b80516001600160a01b03811681146200007457600080fd5b919050565b6000806000606084860312156200008e578283fd5b62000099846200005c565b9250620000a9602085016200005c565b9150620000b9604085016200005c565b90509250925092565b60805160601c60a05160601c60c05160601c611ed8620001196000398060e5525080603f52806102f45280610f5b5280610fea52806114bc528061151c528061159d5250806110a5528061110a5250611ed86000f3fe6080604052600436106100225760003560e01c8063fa461e3314610555576100cd565b366100cd573373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146100cb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742057455448390000000000000000000000000000000000000000000000604482015290519081900360640190fd5b005b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561026c5760006101173682611c07565b905080610247576000808061012c3682611c37565b919550935091505073ffffffffffffffffffffffffffffffffffffffff83166101975760405173ffffffffffffffffffffffffffffffffffffffff8216904780156108fc02916000818181858888f19350505050158015610191573d6000803e3d6000fd5b5061023f565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84169063a9059cbb906101eb9084908690600401611d84565b602060405180830381600087803b15801561020557600080fd5b505af1158015610219573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023d9190611aaf565b505b505050610266565b6000806102543682611c80565b92509250506102638282610575565b50505b506100cb565b60008035907ff0000000000000000000000000000000000000000000000000000000000000008216907f08000000000000000000000000000000000000000000000000000000000000008316906102c283610887565b9050600082156102d35781516102d9565b81602001515b905060ea85901c6201ffff1660e286901c60ff1681811b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff90811690861614801561033b5750600034115b1561034757503461045c565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff891680610423576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8716906370a08231906103bd903390600401611cb8565b60206040518083038186803b1580156103d557600080fd5b505afa1580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190611c1f565b9150670de0b6b3a764000083830204925061045a565b601f60db8b901c16600a0a7b07ffffffffffffffffffffffffffffffffffffffffffffffffffffff8b1660083602610100031c0291505b505b60007c03000000000000000000000000000000000000000000000000000000008a168061048d576126de9150610516565b807c010000000000000000000000000000000000000000000000000000000014156104bc576127069150610516565b807c020000000000000000000000000000000000000000000000000000000014156104eb576126ac9150610516565b807c030000000000000000000000000000000000000000000000000000000014156105165761251c91505b506127108184020460008915610530578860200151610533565b88515b905061054788828b60400151878987610dcb565b505050505050505050505050005b34801561056157600080fd5b506100cb610570366004611af2565b611078565b60008281526020819052604090205473ffffffffffffffffffffffffffffffffffffffff161580156105cc575060008281526020819052604090206001015473ffffffffffffffffffffffffffffffffffffffff16155b61060b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060290611de1565b60405180910390fd5b60405180606001604052808273ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561065e57600080fd5b505af1158015610672573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106969190611a8c565b73ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156106f957600080fd5b505af115801561070d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107319190611a8c565b73ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1663ddca3f436040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561079457600080fd5b505af11580156107a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107cc9190611beb565b62ffffff90811690915260009384526020848152604094859020835181547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff92831617835592850151600190920180549590970151949092169116177fffffffffffffffffff000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000092909116919091021790915550565b61088f611a6c565b816108df5750604080516060810182527382af49447d8a07e3bd95bd0d56f35241523fbab1815273ff970a61a04b1ca14834a43f5de4533ebddb5cc860208201526101f491810191909152610dc6565b817f100000000000000000000000000000000000000000000000000000000000000014156109525750604080516060810182527382af49447d8a07e3bd95bd0d56f35241523fbab1815273fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb960208201526101f491810191909152610dc6565b817f200000000000000000000000000000000000000000000000000000000000000014156109c5575060408051606081018252732f2a2543b76a4166549f7aab2e75bef0aefc5b0f81527382af49447d8a07e3bd95bd0d56f35241523fbab160208201526101f491810191909152610dc6565b817f30000000000000000000000000000000000000000000000000000000000000001415610a385750604080516060810182527382af49447d8a07e3bd95bd0d56f35241523fbab1815273fc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a6020820152610bb891810191909152610dc6565b817f40000000000000000000000000000000000000000000000000000000000000001415610aab5750604080516060810182527318c11fd286c5ec11c3b683caa813b77f5163a12281527382af49447d8a07e3bd95bd0d56f35241523fbab16020820152610bb891810191909152610dc6565b817f50000000000000000000000000000000000000000000000000000000000000001415610b1e57506040805160608101825273539bde0d7dbd336b79148aa742883198bbf6034281527382af49447d8a07e3bd95bd0d56f35241523fbab1602082015261271091810191909152610dc6565b817f60000000000000000000000000000000000000000000000000000000000000001415610b915750604080516060810182527382af49447d8a07e3bd95bd0d56f35241523fbab1815273da10009cbd5d07dd0cecc66161fc93d7c9000da16020820152610bb891810191909152610dc6565b817f70000000000000000000000000000000000000000000000000000000000000001415610c045750604080516060810182527382af49447d8a07e3bd95bd0d56f35241523fbab1815273912ce59144191c1204e64559fe8253a0e49e6548602082015261271091810191909152610dc6565b817f80000000000000000000000000000000000000000000000000000000000000001415610c775750604080516060810182527382af49447d8a07e3bd95bd0d56f35241523fbab1815273912ce59144191c1204e64559fe8253a0e49e65486020820152610bb891810191909152610dc6565b817f90000000000000000000000000000000000000000000000000000000000000001415610cea5750604080516060810182527382af49447d8a07e3bd95bd0d56f35241523fbab1815273912ce59144191c1204e64559fe8253a0e49e654860208201526101f491810191909152610dc6565b817fa0000000000000000000000000000000000000000000000000000000000000001415610d5c5750604080516060810182527382af49447d8a07e3bd95bd0d56f35241523fbab1815273912ce59144191c1204e64559fe8253a0e49e65486020820152606491810191909152610dc6565b50600081815260208181526040918290208251606081018452815473ffffffffffffffffffffffffffffffffffffffff90811682526001909201549182169281019290925274010000000000000000000000000000000000000000900462ffffff16918101919091525b919050565b6040805160808101825273ffffffffffffffffffffffffffffffffffffffff888116808352908816602080840182905262ffffff8916848601523360608501529351911092600092610e1f92909101611e18565b6040516020818303038152906040529050600080610e3e8a8a8a611103565b73ffffffffffffffffffffffffffffffffffffffff1663128acb083086610e648b611141565b88610e835773fffd8963efd1fc6a506488495d951d5263988d25610e8a565b6401000276a45b886040518663ffffffff1660e01b8152600401610eab959493929190611cd9565b6040805180830381600087803b158015610ec457600080fd5b505af1158015610ed8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610efc9190611acf565b91509150600084610f0d5782610f0f565b815b600003905086811115610f1f5750855b85811015610f59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060290611daa565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff161415611060576040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690632e1a7d4d9061101f908490600401611e63565b600060405180830381600087803b15801561103957600080fd5b505af115801561104d573d6000803e3d6000fd5b5050505061105b3382611173565b61106b565b61106b8a33836112c6565b5050505050505050505050565b60008413806110875750600083135b61109057600080fd5b600061109e82840184611b6d565b90506110d87f000000000000000000000000000000000000000000000000000000000000000082600001518360200151846040015161149b565b506110fc8160000151826060015133600089136110f557876110f7565b885b6114ba565b5050505050565b60006111397f000000000000000000000000000000000000000000000000000000000000000061113486868661169e565b61171b565b949350505050565b60007f8000000000000000000000000000000000000000000000000000000000000000821061116f57600080fd5b5090565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff84169083906040518082805190602001908083835b602083106111ea57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016111ad565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461124c576040519150601f19603f3d011682016040523d82523d6000602084013e611251565b606091505b50509050806112c157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f5354450000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251825160009485949389169392918291908083835b6020831061139b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161135e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146113fd576040519150601f19603f3d011682016040523d82523d6000602084013e611402565b606091505b5091509150818015611430575080511580611430575080806020019051602081101561142d57600080fd5b50515b6110fc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f5354000000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60006114b1856114ac86868661169e565b611851565b95945050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156115155750804710155b1561165e577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561158257600080fd5b505af1158015611596573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561162c57600080fd5b505af1158015611640573d6000803e3d6000fd5b505050506040513d602081101561165657600080fd5b506116989050565b73ffffffffffffffffffffffffffffffffffffffff831630141561168c576116878483836112c6565b611698565b61169884848484611887565b50505050565b6116a6611a6c565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1611156116de579192915b506040805160608101825273ffffffffffffffffffffffffffffffffffffffff948516815292909316602083015262ffffff169181019190915290565b6000816020015173ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff161061175d57600080fd5b508051602080830151604093840151845173ffffffffffffffffffffffffffffffffffffffff94851681850152939091168385015262ffffff166060808401919091528351808403820181526080840185528051908301207fff0000000000000000000000000000000000000000000000000000000000000060a085015294901b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660a183015260b58201939093527fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b5460d5808301919091528251808303909101815260f5909101909152805191012090565b600061185d838361171b565b90503373ffffffffffffffffffffffffffffffffffffffff82161461188157600080fd5b92915050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000178152925182516000948594938a169392918291908083835b6020831061196457805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611927565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146119c6576040519150601f19603f3d011682016040523d82523d6000602084013e6119cb565b606091505b50915091508180156119f95750805115806119f957508080602001905160208110156119f657600080fd5b50515b611a6457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f5354460000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b505050505050565b604080516060810182526000808252602082018190529181019190915290565b600060208284031215611a9d578081fd5b8151611aa881611e6c565b9392505050565b600060208284031215611ac0578081fd5b81518015158114611aa8578182fd5b60008060408385031215611ae1578081fd5b505080516020909101519092909150565b60008060008060608587031215611b07578182fd5b8435935060208501359250604085013567ffffffffffffffff80821115611b2c578384fd5b818701915087601f830112611b3f578384fd5b813581811115611b4d578485fd5b886020828501011115611b5e578485fd5b95989497505060200194505050565b600060808284031215611b7e578081fd5b6040516080810181811067ffffffffffffffff82111715611b9b57fe5b6040528235611ba981611e6c565b81526020830135611bb981611e6c565b60208201526040830135611bcc81611e91565b60408201526060830135611bdf81611e6c565b60608201529392505050565b600060208284031215611bfc578081fd5b8151611aa881611e91565b600060208284031215611c18578081fd5b5035919050565b600060208284031215611c30578081fd5b5051919050565b60008060008060808587031215611c4c578384fd5b843593506020850135611c5e81611e6c565b9250604085013591506060850135611c7581611e6c565b939692955090935050565b600080600060608486031215611c94578283fd5b83359250602084013591506040840135611cad81611e6c565b809150509250925092565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8088168352602087151581850152866040850152818616606085015260a06080850152845191508160a0850152825b82811015611d3b5785810182015185820160c001528101611d1f565b82811115611d4c578360c084870101525b5050601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160c0019695505050505050565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b60208082526013908201527f546f6f206c6974746c6520726563656976656400000000000000000000000000604082015260600190565b6020808252600b908201527f616c726561647920736574000000000000000000000000000000000000000000604082015260600190565b815173ffffffffffffffffffffffffffffffffffffffff908116825260208084015182169083015260408084015162ffffff1690830152606092830151169181019190915260800190565b90815260200190565b73ffffffffffffffffffffffffffffffffffffffff81168114611e8e57600080fd5b50565b62ffffff81168114611e8e57600080fdfea2646970667358221220e9769cee8bb55bc2968cc998e49f02f19922cdd6e2f1c5a6ae157ba14fb6d32c64736f6c634300070600330000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f98400000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1000000000000000000000000afad7a0794fa622e8f7e6c34e69a2657c157ef99

Deployed Bytecode

0x6080604052600436106100225760003560e01c8063fa461e3314610555576100cd565b366100cd573373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab116146100cb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742057455448390000000000000000000000000000000000000000000000604482015290519081900360640190fd5b005b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000afad7a0794fa622e8f7e6c34e69a2657c157ef9916141561026c5760006101173682611c07565b905080610247576000808061012c3682611c37565b919550935091505073ffffffffffffffffffffffffffffffffffffffff83166101975760405173ffffffffffffffffffffffffffffffffffffffff8216904780156108fc02916000818181858888f19350505050158015610191573d6000803e3d6000fd5b5061023f565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84169063a9059cbb906101eb9084908690600401611d84565b602060405180830381600087803b15801561020557600080fd5b505af1158015610219573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023d9190611aaf565b505b505050610266565b6000806102543682611c80565b92509250506102638282610575565b50505b506100cb565b60008035907ff0000000000000000000000000000000000000000000000000000000000000008216907f08000000000000000000000000000000000000000000000000000000000000008316906102c283610887565b9050600082156102d35781516102d9565b81602001515b905060ea85901c6201ffff1660e286901c60ff1681811b60007f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab173ffffffffffffffffffffffffffffffffffffffff90811690861614801561033b5750600034115b1561034757503461045c565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff891680610423576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8716906370a08231906103bd903390600401611cb8565b60206040518083038186803b1580156103d557600080fd5b505afa1580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190611c1f565b9150670de0b6b3a764000083830204925061045a565b601f60db8b901c16600a0a7b07ffffffffffffffffffffffffffffffffffffffffffffffffffffff8b1660083602610100031c0291505b505b60007c03000000000000000000000000000000000000000000000000000000008a168061048d576126de9150610516565b807c010000000000000000000000000000000000000000000000000000000014156104bc576127069150610516565b807c020000000000000000000000000000000000000000000000000000000014156104eb576126ac9150610516565b807c030000000000000000000000000000000000000000000000000000000014156105165761251c91505b506127108184020460008915610530578860200151610533565b88515b905061054788828b60400151878987610dcb565b505050505050505050505050005b34801561056157600080fd5b506100cb610570366004611af2565b611078565b60008281526020819052604090205473ffffffffffffffffffffffffffffffffffffffff161580156105cc575060008281526020819052604090206001015473ffffffffffffffffffffffffffffffffffffffff16155b61060b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060290611de1565b60405180910390fd5b60405180606001604052808273ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561065e57600080fd5b505af1158015610672573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106969190611a8c565b73ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156106f957600080fd5b505af115801561070d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107319190611a8c565b73ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1663ddca3f436040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561079457600080fd5b505af11580156107a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107cc9190611beb565b62ffffff90811690915260009384526020848152604094859020835181547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff92831617835592850151600190920180549590970151949092169116177fffffffffffffffffff000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000092909116919091021790915550565b61088f611a6c565b816108df5750604080516060810182527382af49447d8a07e3bd95bd0d56f35241523fbab1815273ff970a61a04b1ca14834a43f5de4533ebddb5cc860208201526101f491810191909152610dc6565b817f100000000000000000000000000000000000000000000000000000000000000014156109525750604080516060810182527382af49447d8a07e3bd95bd0d56f35241523fbab1815273fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb960208201526101f491810191909152610dc6565b817f200000000000000000000000000000000000000000000000000000000000000014156109c5575060408051606081018252732f2a2543b76a4166549f7aab2e75bef0aefc5b0f81527382af49447d8a07e3bd95bd0d56f35241523fbab160208201526101f491810191909152610dc6565b817f30000000000000000000000000000000000000000000000000000000000000001415610a385750604080516060810182527382af49447d8a07e3bd95bd0d56f35241523fbab1815273fc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a6020820152610bb891810191909152610dc6565b817f40000000000000000000000000000000000000000000000000000000000000001415610aab5750604080516060810182527318c11fd286c5ec11c3b683caa813b77f5163a12281527382af49447d8a07e3bd95bd0d56f35241523fbab16020820152610bb891810191909152610dc6565b817f50000000000000000000000000000000000000000000000000000000000000001415610b1e57506040805160608101825273539bde0d7dbd336b79148aa742883198bbf6034281527382af49447d8a07e3bd95bd0d56f35241523fbab1602082015261271091810191909152610dc6565b817f60000000000000000000000000000000000000000000000000000000000000001415610b915750604080516060810182527382af49447d8a07e3bd95bd0d56f35241523fbab1815273da10009cbd5d07dd0cecc66161fc93d7c9000da16020820152610bb891810191909152610dc6565b817f70000000000000000000000000000000000000000000000000000000000000001415610c045750604080516060810182527382af49447d8a07e3bd95bd0d56f35241523fbab1815273912ce59144191c1204e64559fe8253a0e49e6548602082015261271091810191909152610dc6565b817f80000000000000000000000000000000000000000000000000000000000000001415610c775750604080516060810182527382af49447d8a07e3bd95bd0d56f35241523fbab1815273912ce59144191c1204e64559fe8253a0e49e65486020820152610bb891810191909152610dc6565b817f90000000000000000000000000000000000000000000000000000000000000001415610cea5750604080516060810182527382af49447d8a07e3bd95bd0d56f35241523fbab1815273912ce59144191c1204e64559fe8253a0e49e654860208201526101f491810191909152610dc6565b817fa0000000000000000000000000000000000000000000000000000000000000001415610d5c5750604080516060810182527382af49447d8a07e3bd95bd0d56f35241523fbab1815273912ce59144191c1204e64559fe8253a0e49e65486020820152606491810191909152610dc6565b50600081815260208181526040918290208251606081018452815473ffffffffffffffffffffffffffffffffffffffff90811682526001909201549182169281019290925274010000000000000000000000000000000000000000900462ffffff16918101919091525b919050565b6040805160808101825273ffffffffffffffffffffffffffffffffffffffff888116808352908816602080840182905262ffffff8916848601523360608501529351911092600092610e1f92909101611e18565b6040516020818303038152906040529050600080610e3e8a8a8a611103565b73ffffffffffffffffffffffffffffffffffffffff1663128acb083086610e648b611141565b88610e835773fffd8963efd1fc6a506488495d951d5263988d25610e8a565b6401000276a45b886040518663ffffffff1660e01b8152600401610eab959493929190611cd9565b6040805180830381600087803b158015610ec457600080fd5b505af1158015610ed8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610efc9190611acf565b91509150600084610f0d5782610f0f565b815b600003905086811115610f1f5750855b85811015610f59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060290611daa565b7f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab173ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff161415611060576040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab11690632e1a7d4d9061101f908490600401611e63565b600060405180830381600087803b15801561103957600080fd5b505af115801561104d573d6000803e3d6000fd5b5050505061105b3382611173565b61106b565b61106b8a33836112c6565b5050505050505050505050565b60008413806110875750600083135b61109057600080fd5b600061109e82840184611b6d565b90506110d87f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f98482600001518360200151846040015161149b565b506110fc8160000151826060015133600089136110f557876110f7565b885b6114ba565b5050505050565b60006111397f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f98461113486868661169e565b61171b565b949350505050565b60007f8000000000000000000000000000000000000000000000000000000000000000821061116f57600080fd5b5090565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff84169083906040518082805190602001908083835b602083106111ea57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016111ad565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461124c576040519150601f19603f3d011682016040523d82523d6000602084013e611251565b606091505b50509050806112c157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f5354450000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251825160009485949389169392918291908083835b6020831061139b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161135e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146113fd576040519150601f19603f3d011682016040523d82523d6000602084013e611402565b606091505b5091509150818015611430575080511580611430575080806020019051602081101561142d57600080fd5b50515b6110fc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f5354000000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60006114b1856114ac86868661169e565b611851565b95945050505050565b7f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab173ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156115155750804710155b1561165e577f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561158257600080fd5b505af1158015611596573d6000803e3d6000fd5b50505050507f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561162c57600080fd5b505af1158015611640573d6000803e3d6000fd5b505050506040513d602081101561165657600080fd5b506116989050565b73ffffffffffffffffffffffffffffffffffffffff831630141561168c576116878483836112c6565b611698565b61169884848484611887565b50505050565b6116a6611a6c565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1611156116de579192915b506040805160608101825273ffffffffffffffffffffffffffffffffffffffff948516815292909316602083015262ffffff169181019190915290565b6000816020015173ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff161061175d57600080fd5b508051602080830151604093840151845173ffffffffffffffffffffffffffffffffffffffff94851681850152939091168385015262ffffff166060808401919091528351808403820181526080840185528051908301207fff0000000000000000000000000000000000000000000000000000000000000060a085015294901b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660a183015260b58201939093527fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b5460d5808301919091528251808303909101815260f5909101909152805191012090565b600061185d838361171b565b90503373ffffffffffffffffffffffffffffffffffffffff82161461188157600080fd5b92915050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000178152925182516000948594938a169392918291908083835b6020831061196457805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611927565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146119c6576040519150601f19603f3d011682016040523d82523d6000602084013e6119cb565b606091505b50915091508180156119f95750805115806119f957508080602001905160208110156119f657600080fd5b50515b611a6457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f5354460000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b505050505050565b604080516060810182526000808252602082018190529181019190915290565b600060208284031215611a9d578081fd5b8151611aa881611e6c565b9392505050565b600060208284031215611ac0578081fd5b81518015158114611aa8578182fd5b60008060408385031215611ae1578081fd5b505080516020909101519092909150565b60008060008060608587031215611b07578182fd5b8435935060208501359250604085013567ffffffffffffffff80821115611b2c578384fd5b818701915087601f830112611b3f578384fd5b813581811115611b4d578485fd5b886020828501011115611b5e578485fd5b95989497505060200194505050565b600060808284031215611b7e578081fd5b6040516080810181811067ffffffffffffffff82111715611b9b57fe5b6040528235611ba981611e6c565b81526020830135611bb981611e6c565b60208201526040830135611bcc81611e91565b60408201526060830135611bdf81611e6c565b60608201529392505050565b600060208284031215611bfc578081fd5b8151611aa881611e91565b600060208284031215611c18578081fd5b5035919050565b600060208284031215611c30578081fd5b5051919050565b60008060008060808587031215611c4c578384fd5b843593506020850135611c5e81611e6c565b9250604085013591506060850135611c7581611e6c565b939692955090935050565b600080600060608486031215611c94578283fd5b83359250602084013591506040840135611cad81611e6c565b809150509250925092565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8088168352602087151581850152866040850152818616606085015260a06080850152845191508160a0850152825b82811015611d3b5785810182015185820160c001528101611d1f565b82811115611d4c578360c084870101525b5050601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160c0019695505050505050565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b60208082526013908201527f546f6f206c6974746c6520726563656976656400000000000000000000000000604082015260600190565b6020808252600b908201527f616c726561647920736574000000000000000000000000000000000000000000604082015260600190565b815173ffffffffffffffffffffffffffffffffffffffff908116825260208084015182169083015260408084015162ffffff1690830152606092830151169181019190915260800190565b90815260200190565b73ffffffffffffffffffffffffffffffffffffffff81168114611e8e57600080fd5b50565b62ffffff81168114611e8e57600080fdfea2646970667358221220e9769cee8bb55bc2968cc998e49f02f19922cdd6e2f1c5a6ae157ba14fb6d32c64736f6c63430007060033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f98400000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1000000000000000000000000afad7a0794fa622e8f7e6c34e69a2657c157ef99

-----Decoded View---------------
Arg [0] : _factory (address): 0x1F98431c8aD98523631AE4a59f267346ea31F984
Arg [1] : _WETH9 (address): 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1
Arg [2] : _owner (address): 0xafad7a0794fA622e8f7e6c34e69A2657c157ef99

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984
Arg [1] : 00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1
Arg [2] : 000000000000000000000000afad7a0794fa622e8f7e6c34e69a2657c157ef99


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.