Contract 0xD9988b4B5bBC53A794240496cfA9Bf5b1F8E0523 2

 

Contract Overview

SushiSwap: Trident Router
Balance:
0 ETH

ETH Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x703af6c51a26e80650047a318e0114ee91fc73663e649d9e9cc9656c239101f3Multicall760449542023-04-01 20:21:356 mins ago0xd560c0bf859287e2fa8f16f8b4170a3e66518136 IN  SushiSwap: Trident Router0.001856678423158 ETH0.00013654 0.1
0x365a9bf5e2b14d5171af684ae2d55d48ba362dbc04c784f53eb1308fc6aa57c8Burn Liquidity760376972023-04-01 19:49:4938 mins ago0xbb000687721ddf851433187d842021004a731a9d IN  SushiSwap: Trident Router0 ETH0.00009860.1
0xa90a7b48ac6492755276f2c5379943b0fb411a4937b2358709952b17cca2ee99Multicall760242602023-04-01 18:51:041 hr 37 mins ago0xb22b3dce45cffef78f2f41060f75dfa2e51ffcf1 IN  SushiSwap: Trident Router0 ETH0.00014564 0.1
0xc8a5f262e9c37d667eaf566d18cfcd638900b784999aca2f6c72a878a9fd948cMulticall760217212023-04-01 18:40:051 hr 48 mins ago0xb22b3dce45cffef78f2f41060f75dfa2e51ffcf1 IN  SushiSwap: Trident Router1.8 ETH0.00052576 0.1
0xf77578d31090d18f4600a94abecaa4d26c3d40cd02fec6f423842dc1d677632cMulticall760172312023-04-01 18:20:512 hrs 7 mins ago0xf5fa2c1b70632b2e954373d4a91e99db117a4a62 IN  SushiSwap: Trident Router0 ETH0.00013643 0.1
0xb40ca60bb8be625e711511567193ff5bc8d4bfbf6f38ba0b3d8a37de3c6d74acBurn Liquidity760148532023-04-01 18:10:492 hrs 17 mins ago0xbb000687721ddf851433187d842021004a731a9d IN  SushiSwap: Trident Router0 ETH0.000115690.1
0xf9f56f57a34324b34579f8e87307f29c3b4956eee9a901a948399a1c7a6ffed1Multicall760146692023-04-01 18:10:012 hrs 18 mins ago0xf5fa2c1b70632b2e954373d4a91e99db117a4a62 IN  SushiSwap: Trident Router1.5 ETH0.00052874 0.1
0xcdb316b8364b2819a7564377388ce98d6186030622b7efa9b079e461cd15b40dMulticall760017862023-04-01 17:14:583 hrs 13 mins ago0xaabd24aeb217e872f8a58968b550e2dc945388f2 IN  SushiSwap: Trident Router0 ETH0.0001969 0.1
0x8f6647c8bfc49189c20abee02805b16b0315097d0a0c7a50a25bf1ae810b92a2Add Liquidity759929942023-04-01 16:38:083 hrs 50 mins ago0xbee8f84bb7a4f18c17a685763b974d2b2756a65f IN  SushiSwap: Trident Router0.004398770184403 ETH0.000162340.1
0xd05f6c408087b7b23bf22215f3c56835bc2dc1dbcc821a276da0bf55619a301fMulticall759923812023-04-01 16:35:363 hrs 52 mins ago0xb88a48b223844e66347c28b018b98ee673a67340 IN  SushiSwap: Trident Router0.001086438229577 ETH0.00022002 0.1
0x1c666cf05ba96767c908859b68ca37de8661acfbeab16b4af69f7b5d21d5279cMulticall759796122023-04-01 15:42:244 hrs 45 mins ago0x145c584f2f022997a9d0e5fcb4346042229525e1 IN  SushiSwap: Trident Router0 ETH0.00014496 0.1
0x77659584f2f95df3ba60c4e01a3fd636bf37a52f75b82dea9e8f06a1b43eb375Burn Liquidity759594122023-04-01 14:17:556 hrs 10 mins ago0x8cbc89890a1404a377958b92df1935cceb146e0b IN  SushiSwap: Trident Router0 ETH0.00011583 0.1
0xeddb4ae6ae782c2d713c495cc6acacecd85adf5fccea8521401965ce34d63d13Exact Input Sing...759515532023-04-01 13:45:006 hrs 43 mins ago0x2a08bda57ce9dc61d4d08c552efd5dcbeb6ab758 IN  SushiSwap: Trident Router0 ETH0.00010022 0.1
0xd036b17f68476e8a025f43b94ffb51ebc1cf7b6fb7e2854dfa69b0f553174861Add Liquidity759252932023-04-01 11:55:478 hrs 32 mins ago0x6e2d0e4c0ab888e3a637511780f531b8b3a75091 IN  SushiSwap: Trident Router0.135202870218478 ETH0.00010179 0.1
0x729e7069dd500b7b83e49ff13837b95df00aa954345831f4ddf00a4421c0bdb5Add Liquidity758945162023-04-01 9:47:3710 hrs 40 mins ago0xb931315d66d22377cb26e8c5b8e24861149ad480 IN  SushiSwap: Trident Router0 ETH0.0001092 0.1
0x83615a8cb53f7105f40d2f2b012211c15578ebfc836b40f6d4c1128d5136d4e5Add Liquidity758871572023-04-01 9:17:1311 hrs 11 mins ago0xa10d11eb58c417b639fa977c297275e6db6acfcf IN  SushiSwap: Trident Router0.004999651484567 ETH0.00009814 0.1
0x126cd79b7067d4892f7637e4be0471bfe2ec2065fb346ddce7918fa6088d6533Add Liquidity758762382023-04-01 8:32:0411 hrs 56 mins ago0xa10d11eb58c417b639fa977c297275e6db6acfcf IN  SushiSwap: Trident Router0 ETH0.00010245 0.1
0x21d753aa4c5a81b6ee01f790ad6ff79b3c8fe73e27cae3885acf186ee80db0b8Add Liquidity758761052023-04-01 8:31:3111 hrs 56 mins ago0xa10d11eb58c417b639fa977c297275e6db6acfcf IN  SushiSwap: Trident Router0 ETH0.00010424 0.1
0x8ebf26d21d56d745169b31f7053db8babd7c9134da81e4472156ea961a846384Multicall758724242023-04-01 8:16:1812 hrs 11 mins ago0xa10d11eb58c417b639fa977c297275e6db6acfcf IN  SushiSwap: Trident Router0.054528346772235 ETH0.0001299 0.1
0xb9835be89eccb9cf6b67d34e6b86fe39c06d9b1ba719e177e4dadeb3a4bfa177Multicall758632462023-04-01 7:38:1112 hrs 50 mins ago0x39e2a0bce9142b9c0e1593a853b2a6107c6c82e8 IN  SushiSwap: Trident Router0.001 ETH0.00047164 0.1
0x202a3d244d67425b0706ac0afa32663b97f2d70c7999b24a8a126f143f0766e8Multicall758627392023-04-01 7:36:0312 hrs 52 mins ago0xd0caf8730c4bc89906b4eec73fa714b2826e7d85 IN  SushiSwap: Trident Router0.000577366829448 ETH0.00012945 0.1
0xfc0019eef5c02a4db505a0cc6e2ac419bfa7bfee19c554639758d2cd682c631cMulticall758608432023-04-01 7:28:0613 hrs ago0x9dc5be5241530fb285fe0feb55aaa9743e519c10 IN  SushiSwap: Trident Router0 ETH0.00012749 0.1
0xc17b8e04ed0e30ebccd5de9fee5a74a8336fd63c9a77dd4219cd2584cbd53b6dMulticall758289322023-04-01 5:14:1515 hrs 13 mins ago0x7664e3892cb0c3495e6418a4c734384072b81985 IN  SushiSwap: Trident Router0 ETH0.00012926 0.1
0x684b4ca2c768cdddd853540b7b22e99c73b5d7aa59ab626158c4ee38754c503eAdd Liquidity757928952023-04-01 2:39:2917 hrs 48 mins ago0xf21277aa4e4197591a3762c974a7df5c1291edfd IN  SushiSwap: Trident Router0.756012168440807 ETH0.00012336 0.1
0x08daab5d9bf71a313693247521cc3cab261a1351311faca359f4d6e2095f5d41Multicall757859892023-04-01 2:09:3918 hrs 18 mins ago0x7b983b4e1597eabfbe8fb3c4bbce961c0fe79242 IN  SushiSwap: Trident Router0.015120270447269 ETH0.00011145 0.1
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x703af6c51a26e80650047a318e0114ee91fc73663e649d9e9cc9656c239101f3760449542023-04-01 20:21:356 mins ago SushiSwap: Trident Router SushiSwap: BentoBoxV10.001856678423158286 ETH
0xa90a7b48ac6492755276f2c5379943b0fb411a4937b2358709952b17cca2ee99760242602023-04-01 18:51:041 hr 37 mins ago SushiSwap: Trident Router0xb22b3dce45cffef78f2f41060f75dfa2e51ffcf11.914970536564665399 ETH
0xa90a7b48ac6492755276f2c5379943b0fb411a4937b2358709952b17cca2ee99760242602023-04-01 18:51:041 hr 37 mins ago 0x82af49447d8a07e3bd95bd0d56f35241523fbab1 SushiSwap: Trident Router1.914970536564665399 ETH
0xc8a5f262e9c37d667eaf566d18cfcd638900b784999aca2f6c72a878a9fd948c760217212023-04-01 18:40:051 hr 48 mins ago SushiSwap: Trident Router SushiSwap: BentoBoxV11.8 ETH
0xf77578d31090d18f4600a94abecaa4d26c3d40cd02fec6f423842dc1d677632c760172312023-04-01 18:20:512 hrs 7 mins ago SushiSwap: Trident Router0xf5fa2c1b70632b2e954373d4a91e99db117a4a621.749934592483754964 ETH
0xf77578d31090d18f4600a94abecaa4d26c3d40cd02fec6f423842dc1d677632c760172312023-04-01 18:20:512 hrs 7 mins ago 0x82af49447d8a07e3bd95bd0d56f35241523fbab1 SushiSwap: Trident Router1.749934592483754964 ETH
0xf9f56f57a34324b34579f8e87307f29c3b4956eee9a901a948399a1c7a6ffed1760146692023-04-01 18:10:012 hrs 18 mins ago SushiSwap: Trident Router SushiSwap: BentoBoxV11.5 ETH
0xcdb316b8364b2819a7564377388ce98d6186030622b7efa9b079e461cd15b40d760017862023-04-01 17:14:583 hrs 13 mins ago SushiSwap: Trident Router0xaabd24aeb217e872f8a58968b550e2dc945388f20.104482796110095665 ETH
0xcdb316b8364b2819a7564377388ce98d6186030622b7efa9b079e461cd15b40d760017862023-04-01 17:14:583 hrs 13 mins ago 0x82af49447d8a07e3bd95bd0d56f35241523fbab1 SushiSwap: Trident Router0.104482796110095665 ETH
0x8f6647c8bfc49189c20abee02805b16b0315097d0a0c7a50a25bf1ae810b92a2759929942023-04-01 16:38:083 hrs 50 mins ago SushiSwap: Trident Router SushiSwap: BentoBoxV10.004398770184403165 ETH
0xd05f6c408087b7b23bf22215f3c56835bc2dc1dbcc821a276da0bf55619a301f759923812023-04-01 16:35:363 hrs 52 mins ago SushiSwap: Trident Router SushiSwap: BentoBoxV10.001086438229577844 ETH
0x1c666cf05ba96767c908859b68ca37de8661acfbeab16b4af69f7b5d21d5279c759796122023-04-01 15:42:244 hrs 45 mins ago SushiSwap: Trident Router0x145c584f2f022997a9d0e5fcb4346042229525e10.011816393127980371 ETH
0x1c666cf05ba96767c908859b68ca37de8661acfbeab16b4af69f7b5d21d5279c759796122023-04-01 15:42:244 hrs 45 mins ago 0x82af49447d8a07e3bd95bd0d56f35241523fbab1 SushiSwap: Trident Router0.011816393127980371 ETH
0xd036b17f68476e8a025f43b94ffb51ebc1cf7b6fb7e2854dfa69b0f553174861759252932023-04-01 11:55:478 hrs 32 mins ago SushiSwap: Trident Router SushiSwap: BentoBoxV10.135202870218478662 ETH
0x83615a8cb53f7105f40d2f2b012211c15578ebfc836b40f6d4c1128d5136d4e5758871572023-04-01 9:17:1311 hrs 11 mins ago SushiSwap: Trident Router SushiSwap: BentoBoxV10.004999651484567215 ETH
0x8ebf26d21d56d745169b31f7053db8babd7c9134da81e4472156ea961a846384758724242023-04-01 8:16:1812 hrs 11 mins ago SushiSwap: Trident Router SushiSwap: BentoBoxV10.054528346772235548 ETH
0xb9835be89eccb9cf6b67d34e6b86fe39c06d9b1ba719e177e4dadeb3a4bfa177758632462023-04-01 7:38:1112 hrs 50 mins ago SushiSwap: Trident Router SushiSwap: BentoBoxV10.001 ETH
0x202a3d244d67425b0706ac0afa32663b97f2d70c7999b24a8a126f143f0766e8758627392023-04-01 7:36:0312 hrs 52 mins ago SushiSwap: Trident Router SushiSwap: BentoBoxV10.000577366829448623 ETH
0xfc0019eef5c02a4db505a0cc6e2ac419bfa7bfee19c554639758d2cd682c631c758608432023-04-01 7:28:0613 hrs ago SushiSwap: Trident Router0x9dc5be5241530fb285fe0feb55aaa9743e519c100.001314283513204095 ETH
0xfc0019eef5c02a4db505a0cc6e2ac419bfa7bfee19c554639758d2cd682c631c758608432023-04-01 7:28:0613 hrs ago 0x82af49447d8a07e3bd95bd0d56f35241523fbab1 SushiSwap: Trident Router0.001314283513204095 ETH
0xc17b8e04ed0e30ebccd5de9fee5a74a8336fd63c9a77dd4219cd2584cbd53b6d758289322023-04-01 5:14:1515 hrs 13 mins ago SushiSwap: Trident Router0x7664e3892cb0c3495e6418a4c734384072b819850.344988002061175239 ETH
0xc17b8e04ed0e30ebccd5de9fee5a74a8336fd63c9a77dd4219cd2584cbd53b6d758289322023-04-01 5:14:1515 hrs 13 mins ago 0x82af49447d8a07e3bd95bd0d56f35241523fbab1 SushiSwap: Trident Router0.344988002061175239 ETH
0x684b4ca2c768cdddd853540b7b22e99c73b5d7aa59ab626158c4ee38754c503e757928952023-04-01 2:39:2917 hrs 48 mins ago SushiSwap: Trident Router SushiSwap: BentoBoxV10.756012168440807631 ETH
0x08daab5d9bf71a313693247521cc3cab261a1351311faca359f4d6e2095f5d41757859892023-04-01 2:09:3918 hrs 18 mins ago SushiSwap: Trident Router SushiSwap: BentoBoxV10.015120270447269308 ETH
0xed7e594551eddd585621650d93724dfdc8f2794175b9bfdd13b7a4dbf68f5fce757631052023-04-01 0:29:4319 hrs 58 mins ago SushiSwap: Trident Router0x7852d40f2a8ea6c219a91aea2249f5a3f70d4da00.195086248612951897 ETH
[ Download CSV Export 
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xDF3c1D08d853a436c2cbbEd27a37b8F03beF3997

Contract Name:
TridentRouter

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion
File 1 of 13 : TridentRouter.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.8.0;

import {Multicall} from "./abstract/Multicall.sol";
import {SelfPermit} from "./abstract/SelfPermit.sol";
import {Transfer} from "./libraries/Transfer.sol";
import {IBentoBoxMinimal} from "./interfaces/IBentoBoxMinimal.sol";
import {IMasterDeployer} from "./interfaces/IMasterDeployer.sol";
import {IPool} from "./interfaces/IPool.sol";
import {ITridentRouter} from "./interfaces/ITridentRouter.sol";
import {IWETH9} from "./interfaces/IWETH9.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

/// @dev Custom Errors
error NotWethSender();
error TooLittleReceived();
error NotEnoughLiquidityMinted();
error IncorrectTokenWithdrawn();
error IncorrectSlippageParams();
error InsufficientWETH();
error InvalidPool();

/// @notice Router contract that helps in swapping across Trident pools.
contract TridentRouter is ITridentRouter, SelfPermit, Multicall {
    using Transfer for address;

    /// @notice BentoBox token vault.
    IBentoBoxMinimal public immutable bento;

    /// @notice Master deployer.
    IMasterDeployer public immutable masterDeployer;

    /// @notice ERC-20 token for wrapped ETH (v9).
    address internal immutable wETH;

    /// @notice The user should use 0x0 if they want to use native currency, e.g., ETH.
    address constant USE_NATIVE = address(0);

    constructor(
        IBentoBoxMinimal _bento,
        IMasterDeployer _masterDeployer,
        address _wETH
    ) {
        bento = _bento;
        masterDeployer = _masterDeployer;
        wETH = _wETH;
        _bento.registerProtocol();
    }

    receive() external payable {
        if (msg.sender != wETH) revert NotWethSender();
    }

    /// @notice Swaps token A to token B directly. Swaps are done on `bento` tokens.
    /// @param params This includes the address of token A, pool, amount of token A to swap,
    /// minimum amount of token B after the swap and data required by the pool for the swap.
    /// @dev Ensure that the pool is trusted before calling this function. The pool can steal users' tokens.
    function exactInputSingle(ExactInputSingleParams calldata params) public payable returns (uint256 amountOut) {
        // Prefund the pool with token A.
        bento.transfer(params.tokenIn, msg.sender, params.pool, params.amountIn);
        // Trigger the swap in the pool.
        amountOut = IPool(params.pool).swap(params.data);
        // Ensure that the slippage wasn't too much. This assumes that the pool is honest.
        if (amountOut < params.amountOutMinimum) revert TooLittleReceived();
    }

    /// @notice Swaps token A to token B indirectly by using multiple hops.
    /// @param params This includes the addresses of the tokens, pools, amount of token A to swap,
    /// minimum amount of token B after the swap and data required by the pools for the swaps.
    /// @dev Ensure that the pools are trusted before calling this function. The pools can steal users' tokens.
    function exactInput(ExactInputParams calldata params) public payable returns (uint256 amountOut) {
        // Pay the first pool directly.
        bento.transfer(params.tokenIn, msg.sender, params.path[0].pool, params.amountIn);
        // Call every pool in the path.
        // Pool `N` should transfer its output tokens to pool `N+1` directly.
        // The last pool should transfer its output tokens to the user.
        // If the user wants to unwrap `wETH`, the final destination should be this contract and
        // a batch call should be made to `unwrapWETH`.
        uint256 n = params.path.length;
        for (uint256 i = 0; i < n; i = _increment(i)) {
            amountOut = IPool(params.path[i].pool).swap(params.path[i].data);
        }
        // Ensure that the slippage wasn't too much. This assumes that the pool is honest.
        if (amountOut < params.amountOutMinimum) revert TooLittleReceived();
    }

    /// @notice Swaps token A to token B directly. It's the same as `exactInputSingle` except
    /// it takes raw ERC-20 tokens from the users and deposits them into `bento`.
    /// @param params This includes the address of token A, pool, amount of token A to swap,
    /// minimum amount of token B after the swap and data required by the pool for the swap.
    /// @dev Ensure that the pool is trusted before calling this function. The pool can steal users' tokens.
    function exactInputSingleWithNativeToken(ExactInputSingleParams calldata params) public payable returns (uint256 amountOut) {
        // Deposits the native ERC-20 token from the user into the pool's `bento`.
        _depositToBentoBox(params.tokenIn, params.pool, params.amountIn);
        // Trigger the swap in the pool.
        amountOut = IPool(params.pool).swap(params.data);
        // Ensure that the slippage wasn't too much. This assumes that the pool is honest.
        if (amountOut < params.amountOutMinimum) revert TooLittleReceived();
    }

    /// @notice Swaps token A to token B indirectly by using multiple hops. It's the same as `exactInput` except
    /// it takes raw ERC-20 tokens from the users and deposits them into `bento`.
    /// @param params This includes the addresses of the tokens, pools, amount of token A to swap,
    /// minimum amount of token B after the swap and data required by the pools for the swaps.
    /// @dev Ensure that the pools are trusted before calling this function. The pools can steal users' tokens.
    function exactInputWithNativeToken(ExactInputParams calldata params) public payable returns (uint256 amountOut) {
        // Deposits the native ERC-20 token from the user into the pool's `bento`.
        _depositToBentoBox(params.tokenIn, params.path[0].pool, params.amountIn);
        // Call every pool in the path.
        // Pool `N` should transfer its output tokens to pool `N+1` directly.
        // The last pool should transfer its output tokens to the user.
        uint256 n = params.path.length;
        for (uint256 i = 0; i < n; i = _increment(i)) {
            amountOut = IPool(params.path[i].pool).swap(params.path[i].data);
        }
        // Ensure that the slippage wasn't too much. This assumes that the pool is honest.
        if (amountOut < params.amountOutMinimum) revert TooLittleReceived();
    }

    /// @notice Swaps multiple input tokens to multiple output tokens using multiple paths, in different percentages.
    /// For example, you can swap 50 DAI + 100 USDC into 60% ETH and 40% BTC.
    /// @param params This includes everything needed for the swap. Look at the `ComplexPathParams` struct for more details.
    /// @dev This function is not optimized for single swaps and should only be used in complex cases where
    /// the amounts are large enough that minimizing slippage by using multiple paths is worth the extra gas.
    function complexPath(ComplexPathParams calldata params) public payable {
        // Deposit all initial tokens to respective pools and initiate the swaps.
        // Input tokens come from the user - output goes to following pools.
        uint256 n = params.initialPath.length;
        for (uint256 i = 0; i < n; i = _increment(i)) {
            if (params.initialPath[i].native) {
                _depositToBentoBox(params.initialPath[i].tokenIn, params.initialPath[i].pool, params.initialPath[i].amount);
            } else {
                bento.transfer(params.initialPath[i].tokenIn, msg.sender, params.initialPath[i].pool, params.initialPath[i].amount);
            }
            IPool(params.initialPath[i].pool).swap(params.initialPath[i].data);
        }
        // Do all the middle swaps. Input comes from previous pools.
        n = params.percentagePath.length;
        for (uint256 i = 0; i < n; i = _increment(i)) {
            uint256 balanceShares = bento.balanceOf(params.percentagePath[i].tokenIn, address(this));
            uint256 transferShares = (balanceShares * params.percentagePath[i].balancePercentage) / uint256(10)**8;
            bento.transfer(params.percentagePath[i].tokenIn, address(this), params.percentagePath[i].pool, transferShares);
            IPool(params.percentagePath[i].pool).swap(params.percentagePath[i].data);
        }
        // Ensure enough was received and transfer the ouput to the recipient.
        n = params.output.length;
        for (uint256 i = 0; i < n; i = _increment(i)) {
            uint256 balanceShares = bento.balanceOf(params.output[i].token, address(this));
            if (balanceShares < params.output[i].minAmount) revert TooLittleReceived();
            if (params.output[i].unwrapBento) {
                bento.withdraw(params.output[i].token, address(this), params.output[i].to, 0, balanceShares);
            } else {
                bento.transfer(params.output[i].token, address(this), params.output[i].to, balanceShares);
            }
        }
    }

    /// @notice Add liquidity to a pool.
    /// @param tokenInput Token address and amount to add as liquidity.
    /// @param pool Pool address to add liquidity to.
    /// @param minLiquidity Minimum output liquidity - caps slippage.
    /// @param data Data required by the pool to add liquidity.
    function addLiquidity(
        TokenInput[] calldata tokenInput,
        address pool,
        uint256 minLiquidity,
        bytes calldata data
    ) public payable returns (uint256 liquidity) {
        // Send all input tokens to the pool.
        uint256 n = tokenInput.length;
        for (uint256 i = 0; i < n; i = _increment(i)) {
            if (tokenInput[i].native) {
                _depositToBentoBox(tokenInput[i].token, pool, tokenInput[i].amount);
            } else {
                bento.transfer(tokenInput[i].token, msg.sender, pool, tokenInput[i].amount);
            }
        }
        liquidity = IPool(pool).mint(data);
        if (liquidity < minLiquidity) revert NotEnoughLiquidityMinted();
    }

    /// @notice Burn liquidity tokens to get back `bento` tokens.
    /// @param pool Pool address.
    /// @param liquidity Amount of liquidity tokens to burn.
    /// @param data Data required by the pool to burn liquidity.
    /// @param minWithdrawals Minimum amount of `bento` tokens to be returned.
    function burnLiquidity(
        address pool,
        uint256 liquidity,
        bytes calldata data,
        IPool.TokenAmount[] calldata minWithdrawals
    ) public payable {
        pool.safeTransferFrom(msg.sender, pool, liquidity);
        IPool.TokenAmount[] memory withdrawnLiquidity = IPool(pool).burn(data);
        uint256 n = minWithdrawals.length;
        for (uint256 i = 0; i < n; i = _increment(i)) {
            if (minWithdrawals[i].token != withdrawnLiquidity[i].token) revert IncorrectSlippageParams();
            if (withdrawnLiquidity[i].amount < minWithdrawals[i].amount) revert TooLittleReceived();
        }
    }

    /// @notice Burn liquidity tokens to get back `bento` tokens.
    /// @dev The tokens are swapped automatically and the output is in a single token.
    /// @param pool Pool address.
    /// @param liquidity Amount of liquidity tokens to burn.
    /// @param data Data required by the pool to burn liquidity.
    /// @param minWithdrawal Minimum amount of tokens to be returned.
    function burnLiquiditySingle(
        address pool,
        uint256 liquidity,
        bytes calldata data,
        uint256 minWithdrawal
    ) public payable {
        // Use 'liquidity = 0' for prefunding.
        pool.safeTransferFrom(msg.sender, pool, liquidity);
        uint256 withdrawn = IPool(pool).burnSingle(data);
        if (withdrawn < minWithdrawal) revert TooLittleReceived();
    }

    /// @notice Recover mistakenly sent tokens.
    function sweep(
        address token,
        address recipient,
        bool fromBento
    ) external payable {
        if (fromBento) {
            uint256 shares = bento.balanceOf(token, address(this));
            bento.transfer(token, address(this), recipient, shares);
        } else {
            uint256 amount = token == USE_NATIVE ? address(this).balance : (IERC20(token).balanceOf(address(this)) - 1);
            token == USE_NATIVE ? recipient.safeTransferETH(amount) : token.safeTransfer(recipient, amount);
        }
    }

    /// @notice Unwrap this contract's wETH into ETH.
    function unwrapWETH(address recipient) external payable {
        uint256 balance = IWETH9(wETH).balanceOf(address(this));
        IWETH9(wETH).withdraw(balance);
        recipient.safeTransferETH(balance);
    }

    /// @notice Wrapper function to allow pool deployment to be batched.
    function deployPool(address factory, bytes calldata deployData) external payable returns (address) {
        return masterDeployer.deployPool(factory, deployData);
    }

    /// @notice Wrapper function to allow bento set master contract approval to be batched, so the first trade can happen in one transaction.
    function approveMasterContract(
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external payable {
        bento.setMasterContractApproval(msg.sender, address(this), true, v, r, s);
    }

    /// @notice Call BentoBox harvest function to rebalance a BentoBox token strategy and ensure there are enough tokens available to withdraw a swap output.
    /// @dev Should be batched in before a swap.
    function harvest(address token, uint256 maxChangeAmount) external payable {
        bento.harvest(token, true, maxChangeAmount);
    }

    /// @notice Deposit from the user's wallet into BentoBox.
    /// @dev Amount is the native token amount. We let BentoBox do the conversion into shares.
    function _depositToBentoBox(
        address token,
        address recipient,
        uint256 amount
    ) internal {
        bento.deposit{value: token == USE_NATIVE ? amount : 0}(token, msg.sender, recipient, amount, 0);
    }

    function _increment(uint256 i) internal pure returns (uint256) {
        unchecked {
            return i + 1;
        }
    }
}

File 2 of 13 : Multicall.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.8.0;

/// @notice Helper utility that enables calling multiple local methods in a single call.
/// @author Modified from Uniswap (https://github.com/Uniswap/v3-periphery/blob/main/contracts/base/Multicall.sol)
/// License-Identifier: GPL-2.0-or-later
abstract contract Multicall {
    function multicall(bytes[] calldata data) public payable returns (bytes[] memory results) {
        results = new bytes[](data.length);
        
        for (uint256 i; i < data.length;) {
            (bool success, bytes memory result) = address(this).delegatecall(data[i]);

            if (!success) {
                // Next 5 lines from https://ethereum.stackexchange.com/a/83577
                if (result.length < 68) revert();
                assembly {
                    result := add(result, 0x04)
                }
                revert(abi.decode(result, (string)));
            }

            results[i] = result;

            // cannot realistically overflow on human timescales
            unchecked {
                ++i;
            }
        }
    }
}

File 3 of 13 : SelfPermit.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol";

import "../interfaces/IERC20PermitAllowed.sol";

abstract contract SelfPermit {
    function selfPermit(
        address token,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public payable {
        IERC20Permit(token).permit(msg.sender, address(this), value, deadline, v, r, s);
    }

    function selfPermitIfNecessary(
        address token,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external payable {
        if (IERC20(token).allowance(msg.sender, address(this)) < value) selfPermit(token, value, deadline, v, r, s);
    }

    function selfPermitAllowed(
        address token,
        uint256 nonce,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public payable {
        IERC20PermitAllowed(token).permit(msg.sender, address(this), nonce, expiry, true, v, r, s);
    }

    function selfPermitAllowedIfNecessary(
        address token,
        uint256 nonce,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external payable {
        if (IERC20(token).allowance(msg.sender, address(this)) < type(uint256).max)
            selfPermitAllowed(token, nonce, expiry, v, r, s);
    }
}

File 4 of 13 : Transfer.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

library Transfer {
    /// @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");
    }
}

File 5 of 13 : IBentoBoxMinimal.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.8.0;

import "../libraries/RebaseLibrary.sol";

/// @notice Minimal BentoBox vault interface.
/// @dev `token` is aliased as `address` from `IERC20` for simplicity.
interface IBentoBoxMinimal {
    /// @notice Balance per ERC-20 token per account in shares.
    function balanceOf(address, address) external view returns (uint256);

    /// @dev Helper function to represent an `amount` of `token` in shares.
    /// @param token The ERC-20 token.
    /// @param amount The `token` amount.
    /// @param roundUp If the result `share` should be rounded up.
    /// @return share The token amount represented in shares.
    function toShare(
        address token,
        uint256 amount,
        bool roundUp
    ) external view returns (uint256 share);

    /// @dev Helper function to represent shares back into the `token` amount.
    /// @param token The ERC-20 token.
    /// @param share The amount of shares.
    /// @param roundUp If the result should be rounded up.
    /// @return amount The share amount back into native representation.
    function toAmount(
        address token,
        uint256 share,
        bool roundUp
    ) external view returns (uint256 amount);

    /// @notice Registers this contract so that users can approve it for BentoBox.
    function registerProtocol() external;

    /// @notice Deposit an amount of `token` represented in either `amount` or `share`.
    /// @param token The ERC-20 token to deposit.
    /// @param from which account to pull the tokens.
    /// @param to which account to push the tokens.
    /// @param amount Token amount in native representation to deposit.
    /// @param share Token amount represented in shares to deposit. Takes precedence over `amount`.
    /// @return amountOut The amount deposited.
    /// @return shareOut The deposited amount represented in shares.
    function deposit(
        address token,
        address from,
        address to,
        uint256 amount,
        uint256 share
    ) external payable returns (uint256 amountOut, uint256 shareOut);

    /// @notice Withdraws an amount of `token` from a user account.
    /// @param token_ The ERC-20 token to withdraw.
    /// @param from which user to pull the tokens.
    /// @param to which user to push the tokens.
    /// @param amount of tokens. Either one of `amount` or `share` needs to be supplied.
    /// @param share Like above, but `share` takes precedence over `amount`.
    function withdraw(
        address token_,
        address from,
        address to,
        uint256 amount,
        uint256 share
    ) external returns (uint256 amountOut, uint256 shareOut);

    /// @notice Transfer shares from a user account to another one.
    /// @param token The ERC-20 token to transfer.
    /// @param from which user to pull the tokens.
    /// @param to which user to push the tokens.
    /// @param share The amount of `token` in shares.
    function transfer(
        address token,
        address from,
        address to,
        uint256 share
    ) external;

    /// @dev Reads the Rebase `totals`from storage for a given token
    function totals(address token) external view returns (Rebase memory total);

    /// @dev Approves users' BentoBox assets to a "master" contract.
    function setMasterContractApproval(
        address user,
        address masterContract,
        bool approved,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    function harvest(
        address token,
        bool balance,
        uint256 maxChangeAmount
    ) external;
}

File 6 of 13 : IMasterDeployer.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.8.0;

/// @notice Trident pool deployer interface.
interface IMasterDeployer {
    function barFee() external view returns (uint256);

    function barFeeTo() external view returns (address);

    function bento() external view returns (address);

    function migrator() external view returns (address);

    function pools(address pool) external view returns (bool);

    function deployPool(address factory, bytes calldata deployData) external returns (address);
}

File 7 of 13 : IPool.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.5.0;
pragma experimental ABIEncoderV2;

/// @notice Trident pool interface.
interface IPool {
    /// @notice Executes a swap from one token to another.
    /// @dev The input tokens must've already been sent to the pool.
    /// @param data ABI-encoded params that the pool requires.
    /// @return finalAmountOut The amount of output tokens that were sent to the user.
    function swap(bytes calldata data) external returns (uint256 finalAmountOut);

    /// @notice Executes a swap from one token to another with a callback.
    /// @dev This function allows borrowing the output tokens and sending the input tokens in the callback.
    /// @param data ABI-encoded params that the pool requires.
    /// @return finalAmountOut The amount of output tokens that were sent to the user.
    function flashSwap(bytes calldata data) external returns (uint256 finalAmountOut);

    /// @notice Mints liquidity tokens.
    /// @param data ABI-encoded params that the pool requires.
    /// @return liquidity The amount of liquidity tokens that were minted for the user.
    function mint(bytes calldata data) external returns (uint256 liquidity);

    /// @notice Burns liquidity tokens.
    /// @dev The input LP tokens must've already been sent to the pool.
    /// @param data ABI-encoded params that the pool requires.
    /// @return withdrawnAmounts The amount of various output tokens that were sent to the user.
    function burn(bytes calldata data) external returns (TokenAmount[] memory withdrawnAmounts);

    /// @notice Burns liquidity tokens for a single output token.
    /// @dev The input LP tokens must've already been sent to the pool.
    /// @param data ABI-encoded params that the pool requires.
    /// @return amountOut The amount of output tokens that were sent to the user.
    function burnSingle(bytes calldata data) external returns (uint256 amountOut);

    /// @return A unique identifier for the pool type.
    function poolIdentifier() external pure returns (bytes32);

    /// @return An array of tokens supported by the pool.
    function getAssets() external view returns (address[] memory);

    /// @notice Simulates a trade and returns the expected output.
    /// @dev The pool does not need to include a trade simulator directly in itself - it can use a library.
    /// @param data ABI-encoded params that the pool requires.
    /// @return finalAmountOut The amount of output tokens that will be sent to the user if the trade is executed.
    function getAmountOut(bytes calldata data) external view returns (uint256 finalAmountOut);

    /// @notice Simulates a trade and returns the expected output.
    /// @dev The pool does not need to include a trade simulator directly in itself - it can use a library.
    /// @param data ABI-encoded params that the pool requires.
    /// @return finalAmountIn The amount of input tokens that are required from the user if the trade is executed.
    function getAmountIn(bytes calldata data) external view returns (uint256 finalAmountIn);

    /// @dev This event must be emitted on all swaps.
    event Swap(address indexed recipient, address indexed tokenIn, address indexed tokenOut, uint256 amountIn, uint256 amountOut);

    /// @dev This struct frames output tokens for burns.
    struct TokenAmount {
        address token;
        uint256 amount;
    }
}

File 8 of 13 : ITridentRouter.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.8.0;

/// @notice Trident pool router interface.
interface ITridentRouter {
    struct Path {
        address pool;
        bytes data;
    }

    struct ExactInputSingleParams {
        uint256 amountIn;
        uint256 amountOutMinimum;
        address pool;
        address tokenIn;
        bytes data;
    }

    struct ExactInputParams {
        address tokenIn;
        uint256 amountIn;
        uint256 amountOutMinimum;
        Path[] path;
    }

    struct TokenInput {
        address token;
        bool native;
        uint256 amount;
    }

    struct InitialPath {
        address tokenIn;
        address pool;
        bool native;
        uint256 amount;
        bytes data;
    }

    struct PercentagePath {
        address tokenIn;
        address pool;
        uint64 balancePercentage; // Multiplied by 10^6. 100% = 100_000_000
        bytes data;
    }

    struct Output {
        address token;
        address to;
        bool unwrapBento;
        uint256 minAmount;
    }

    struct ComplexPathParams {
        InitialPath[] initialPath;
        PercentagePath[] percentagePath;
        Output[] output;
    }
}

File 9 of 13 : IWETH9.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface IWETH9 is IERC20 {
    function deposit() external payable;
    function withdraw(uint256) external;
}

File 10 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the 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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 11 of 13 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 12 of 13 : IERC20PermitAllowed.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.8.0;

interface IERC20PermitAllowed {
    function permit(
        address holder,
        address spender,
        uint256 nonce,
        uint256 expiry,
        bool allowed,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;
}

File 13 of 13 : RebaseLibrary.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8;

struct Rebase {
    uint128 elastic;
    uint128 base;
}

/// @notice A rebasing library
library RebaseLibrary {
    /// @notice Calculates the base value in relationship to `elastic` and `total`.
    function toBase(Rebase memory total, uint256 elastic) internal pure returns (uint256 base) {
        if (total.elastic == 0) {
            base = elastic;
        } else {
            base = (elastic * total.base) / total.elastic;
        }
    }

    /// @notice Calculates the elastic value in relationship to `base` and `total`.
    function toElastic(Rebase memory total, uint256 base) internal pure returns (uint256 elastic) {
        if (total.base == 0) {
            elastic = base;
        } else {
            elastic = (base * total.elastic) / total.base;
        }
    }
}

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

Contract ABI

[{"inputs":[{"internalType":"contract IBentoBoxMinimal","name":"_bento","type":"address"},{"internalType":"contract IMasterDeployer","name":"_masterDeployer","type":"address"},{"internalType":"address","name":"_wETH","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"IncorrectSlippageParams","type":"error"},{"inputs":[],"name":"NotEnoughLiquidityMinted","type":"error"},{"inputs":[],"name":"NotWethSender","type":"error"},{"inputs":[],"name":"TooLittleReceived","type":"error"},{"inputs":[{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"bool","name":"native","type":"bool"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ITridentRouter.TokenInput[]","name":"tokenInput","type":"tuple[]"},{"internalType":"address","name":"pool","type":"address"},{"internalType":"uint256","name":"minLiquidity","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"addLiquidity","outputs":[{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"approveMasterContract","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"bento","outputs":[{"internalType":"contract IBentoBoxMinimal","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct IPool.TokenAmount[]","name":"minWithdrawals","type":"tuple[]"}],"name":"burnLiquidity","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"minWithdrawal","type":"uint256"}],"name":"burnLiquiditySingle","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"pool","type":"address"},{"internalType":"bool","name":"native","type":"bool"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ITridentRouter.InitialPath[]","name":"initialPath","type":"tuple[]"},{"components":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"pool","type":"address"},{"internalType":"uint64","name":"balancePercentage","type":"uint64"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ITridentRouter.PercentagePath[]","name":"percentagePath","type":"tuple[]"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"unwrapBento","type":"bool"},{"internalType":"uint256","name":"minAmount","type":"uint256"}],"internalType":"struct ITridentRouter.Output[]","name":"output","type":"tuple[]"}],"internalType":"struct ITridentRouter.ComplexPathParams","name":"params","type":"tuple"}],"name":"complexPath","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"factory","type":"address"},{"internalType":"bytes","name":"deployData","type":"bytes"}],"name":"deployPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMinimum","type":"uint256"},{"components":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ITridentRouter.Path[]","name":"path","type":"tuple[]"}],"internalType":"struct ITridentRouter.ExactInputParams","name":"params","type":"tuple"}],"name":"exactInput","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMinimum","type":"uint256"},{"internalType":"address","name":"pool","type":"address"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ITridentRouter.ExactInputSingleParams","name":"params","type":"tuple"}],"name":"exactInputSingle","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMinimum","type":"uint256"},{"internalType":"address","name":"pool","type":"address"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ITridentRouter.ExactInputSingleParams","name":"params","type":"tuple"}],"name":"exactInputSingleWithNativeToken","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMinimum","type":"uint256"},{"components":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ITridentRouter.Path[]","name":"path","type":"tuple[]"}],"internalType":"struct ITridentRouter.ExactInputParams","name":"params","type":"tuple"}],"name":"exactInputWithNativeToken","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"maxChangeAmount","type":"uint256"}],"name":"harvest","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"masterDeployer","outputs":[{"internalType":"contract IMasterDeployer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitAllowed","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitAllowedIfNecessary","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitIfNecessary","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"bool","name":"fromBento","type":"bool"}],"name":"sweep","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"unwrapWETH","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60e06040523480156200001157600080fd5b5060405162003a4c38038062003a4c8339810160408190526200003491620000c3565b6001600160a01b03808416608081905283821660a05290821660c0526040805163577268d960e11b8152905163aee4d1b29160048082019260009290919082900301818387803b1580156200008857600080fd5b505af11580156200009d573d6000803e3d6000fd5b5050505050505062000117565b6001600160a01b0381168114620000c057600080fd5b50565b600080600060608486031215620000d957600080fd5b8351620000e681620000aa565b6020850151909350620000f981620000aa565b60408501519092506200010c81620000aa565b809150509250925092565b60805160a05160c05161388e620001be600039600081816101800152818161152901526115db0152600081816103ac015261095a0152600081816102d30152818161043401528181610669015281816109f701528181610caf01528181610f000152818161129f0152818161136901528181611a0f01528181611ca201528181611e1e01528181612099015281816122370152818161238f01526125f6015261388e6000f3fe6080604052600436106101635760003560e01c8063783312d9116100c0578063ac9650d811610074578063c2e3140a11610059578063c2e3140a14610387578063cf58879a1461039a578063f3995c67146103ce57600080fd5b8063ac9650d814610354578063b96c5c0e1461037457600080fd5b806389a3f136116100a557806389a3f1361461031b5780639fa744911461032e578063a4a78f0c1461034157600080fd5b8063783312d9146102f55780637f6ad4551461030857600080fd5b80632c0d9a0111610117578063403335a8116100fc578063403335a81461029b5780634659a494146102ae5780634da31827146102c157600080fd5b80632c0d9a01146102755780632cfcb94f1461028857600080fd5b80630f93d439116101485780630f93d439146102175780631aa349a81461022a578063250558dc1461023d57600080fd5b8063018ee9b7146101de5780630b0d1b1e146101f157600080fd5b366101d9573373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146101d7576040517fe7218bb300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b005b600080fd5b6101d76101ec366004612acc565b6103e1565b6102046101ff366004612af8565b610494565b6040519081526020015b60405180910390f35b610204610225366004612b3a565b610650565b6101d7610238366004612bbe565b610822565b61025061024b366004612c22565b61091a565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161020e565b610204610283366004612af8565b6109de565b610204610296366004612c77565b610c1f565b6101d76102a9366004612d43565b610eae565b6101d76102bc366004612d76565b610f76565b3480156102cd57600080fd5b506102507f000000000000000000000000000000000000000000000000000000000000000081565b6101d7610303366004612dd0565b611031565b6101d7610316366004612e99565b61124b565b6101d7610329366004612ee4565b6114f8565b61020461033c366004612b3a565b611671565b6101d761034f366004612d76565b6116ad565b610367610362366004612f01565b611777565b60405161020e9190612fec565b6101d761038236600461306c565b6118e7565b6101d7610395366004612d76565b6124bc565b3480156103a657600080fd5b506102507f000000000000000000000000000000000000000000000000000000000000000081565b6101d76103dc366004612d76565b612562565b6040517f66c6bb0b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015260016024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906366c6bb0b90606401600060405180830381600087803b15801561047857600080fd5b505af115801561048c573d6000803e3d6000fd5b505050505050565b60006104ee6104a66020840184612ee4565b6104b360608501856130a7565b60008181106104c4576104c461310f565b90506020028101906104d6919061313e565b6104e4906020810190612ee4565b84602001356125df565b60006104fd60608401846130a7565b9050905060005b8181101561060b5761051960608501856130a7565b828181106105295761052961310f565b905060200281019061053b919061313e565b610549906020810190612ee4565b73ffffffffffffffffffffffffffffffffffffffff1663627dd56a61057160608701876130a7565b848181106105815761058161310f565b9050602002810190610593919061313e565b6105a190602081019061317c565b6040518363ffffffff1660e01b81526004016105be92919061322a565b6020604051808303816000875af11580156105dd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610601919061323e565b9250600101610504565b50826040013582101561064a576040517fc9f52c7100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50919050565b600073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663f18d03cc61069e6080850160608601612ee4565b336106af6060870160408801612ee4565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff93841660048201529183166024830152909116604482015284356064820152608401600060405180830381600087803b15801561072c57600080fd5b505af1158015610740573d6000803e3d6000fd5b50610755925050506060830160408401612ee4565b73ffffffffffffffffffffffffffffffffffffffff1663627dd56a61077d608085018561317c565b6040518363ffffffff1660e01b815260040161079a92919061322a565b6020604051808303816000875af11580156107b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107dd919061323e565b9050816020013581101561081d576040517fc9f52c7100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b61084473ffffffffffffffffffffffffffffffffffffffff86163387876126de565b6040517faf8c09bf00000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff87169063af8c09bf9061089b908790879060040161322a565b6020604051808303816000875af11580156108ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108de919061323e565b90508181101561048c576040517fc9f52c7100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f250558dc00000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063250558dc9061099390879087908790600401613257565b6020604051808303816000875af11580156109b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d69190613290565b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663f18d03cc610a296020850185612ee4565b33610a3760608701876130a7565b6000818110610a4857610a4861310f565b9050602002810190610a5a919061313e565b610a68906020810190612ee4565b60405160e085901b7fffffffff0000000000000000000000000000000000000000000000000000000016815273ffffffffffffffffffffffffffffffffffffffff93841660048201529183166024830152909116604482015260208501356064820152608401600060405180830381600087803b158015610ae857600080fd5b505af1158015610afc573d6000803e3d6000fd5b5060009250610b1191505060608401846130a7565b9050905060005b8181101561060b57610b2d60608501856130a7565b82818110610b3d57610b3d61310f565b9050602002810190610b4f919061313e565b610b5d906020810190612ee4565b73ffffffffffffffffffffffffffffffffffffffff1663627dd56a610b8560608701876130a7565b84818110610b9557610b9561310f565b9050602002810190610ba7919061313e565b610bb590602081019061317c565b6040518363ffffffff1660e01b8152600401610bd292919061322a565b6020604051808303816000875af1158015610bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c15919061323e565b9250600101610b18565b600085815b81811015610dcf57888882818110610c3e57610c3e61310f565b9050606002016020016020810190610c5691906132ad565b15610cad57610ca8898983818110610c7057610c7061310f565b610c869260206060909202019081019150612ee4565b888b8b85818110610c9957610c9961310f565b905060600201604001356125df565b610dc7565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f18d03cc8a8a84818110610cfb57610cfb61310f565b610d119260206060909202019081019150612ee4565b338a8d8d87818110610d2557610d2561310f565b604080517fffffffff0000000000000000000000000000000000000000000000000000000060e08a901b16815273ffffffffffffffffffffffffffffffffffffffff978816600482015295871660248701529590931660448501525060609091020191909101356064820152608401600060405180830381600087803b158015610dae57600080fd5b505af1158015610dc2573d6000803e3d6000fd5b505050505b600101610c24565b506040517f7ba0e2e700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871690637ba0e2e790610e24908790879060040161322a565b6020604051808303816000875af1158015610e43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e67919061323e565b915084821015610ea3576040517f249942be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b509695505050505050565b6040517fc0a47c930000000000000000000000000000000000000000000000000000000081523360048201523060248201526001604482015260ff841660648201526084810183905260a481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063c0a47c939060c401600060405180830381600087803b158015610f5957600080fd5b505af1158015610f6d573d6000803e3d6000fd5b50505050505050565b6040517f8fcbaf0c00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101869052606481018590526001608482015260ff841660a482015260c4810183905260e4810182905273ffffffffffffffffffffffffffffffffffffffff871690638fcbaf0c90610104015b600060405180830381600087803b15801561101157600080fd5b505af1158015611025573d6000803e3d6000fd5b50505050505050505050565b61105373ffffffffffffffffffffffffffffffffffffffff87163388886126de565b6040517f2a07b6c700000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff881690632a07b6c7906110aa908890889060040161322a565b6000604051808303816000875af11580156110c9573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261110f9190810190613371565b90508160005b818110156112405782818151811061112f5761112f61310f565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff168585838181106111635761116361310f565b6111799260206040909202019081019150612ee4565b73ffffffffffffffffffffffffffffffffffffffff16146111c6576040517f2664ab9d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8484828181106111d8576111d861310f565b905060400201602001358382815181106111f4576111f461310f565b6020026020010151602001511015611238576040517fc9f52c7100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101611115565b505050505050505050565b80156113cd576040517ff7888aec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301523060248301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063f7888aec90604401602060405180830381865afa1580156112e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130c919061323e565b6040517ff18d03cc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301523060248301528581166044830152606482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063f18d03cc90608401600060405180830381600087803b1580156113af57600080fd5b505af11580156113c3573d6000803e3d6000fd5b5050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff84161561148b576040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260019073ffffffffffffffffffffffffffffffffffffffff8616906370a0823190602401602060405180830381865afa158015611458573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147c919061323e565b6114869190613476565b61148d565b475b905073ffffffffffffffffffffffffffffffffffffffff8416156114d1576114cc73ffffffffffffffffffffffffffffffffffffffff8516848361284f565b6114f1565b6114f173ffffffffffffffffffffffffffffffffffffffff8416826129b8565b505b505050565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015611585573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a9919061323e565b6040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018290529091507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632e1a7d4d90602401600060405180830381600087803b15801561163457600080fd5b505af1158015611648573d6000803e3d6000fd5b5061166d9250505073ffffffffffffffffffffffffffffffffffffffff8316826129b8565b5050565b600061169d6116866080840160608501612ee4565b6116966060850160408601612ee4565b84356125df565b6107556060830160408401612ee4565b6040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523360048201523060248201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9073ffffffffffffffffffffffffffffffffffffffff88169063dd62ed3e90604401602060405180830381865afa15801561173f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611763919061323e565b101561048c5761048c868686868686610f76565b60608167ffffffffffffffff811115611792576117926132ca565b6040519080825280602002602001820160405280156117c557816020015b60608152602001906001900390816117b05790505b50905060005b828110156118e057600080308686858181106117e9576117e961310f565b90506020028101906117fb919061317c565b60405161180992919061348d565b600060405180830381855af49150503d8060008114611844576040519150601f19603f3d011682016040523d82523d6000602084013e611849565b606091505b5091509150816118b85760448151101561186257600080fd5b6004810190508080602001905181019061187c919061349d565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118af919061354f565b60405180910390fd5b808484815181106118cb576118cb61310f565b602090810291909101015250506001016117cb565b5092915050565b60006118f382806130a7565b9050905060005b81811015611c6c5761190c83806130a7565b8281811061191c5761191c61310f565b905060200281019061192e9190613562565b61193f9060608101906040016132ad565b156119f8576119f361195184806130a7565b838181106119615761196161310f565b90506020028101906119739190613562565b611981906020810190612ee4565b61198b85806130a7565b8481811061199b5761199b61310f565b90506020028101906119ad9190613562565b6119be906040810190602001612ee4565b6119c886806130a7565b858181106119d8576119d861310f565b90506020028101906119ea9190613562565b606001356125df565b611b71565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663f18d03cc611a3e85806130a7565b84818110611a4e57611a4e61310f565b9050602002810190611a609190613562565b611a6e906020810190612ee4565b33611a7987806130a7565b86818110611a8957611a8961310f565b9050602002810190611a9b9190613562565b611aac906040810190602001612ee4565b611ab688806130a7565b87818110611ac657611ac661310f565b9050602002810190611ad89190613562565b60405160e086901b7fffffffff0000000000000000000000000000000000000000000000000000000016815273ffffffffffffffffffffffffffffffffffffffff94851660048201529284166024840152921660448201526060909101356064820152608401600060405180830381600087803b158015611b5857600080fd5b505af1158015611b6c573d6000803e3d6000fd5b505050505b611b7b83806130a7565b82818110611b8b57611b8b61310f565b9050602002810190611b9d9190613562565b611bae906040810190602001612ee4565b73ffffffffffffffffffffffffffffffffffffffff1663627dd56a611bd385806130a7565b84818110611be357611be361310f565b9050602002810190611bf59190613562565b611c0390608081019061317c565b6040518363ffffffff1660e01b8152600401611c2092919061322a565b6020604051808303816000875af1158015611c3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c63919061323e565b506001016118fa565b50611c7a60208301836130a7565b9050905060005b8181101561206357600073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663f7888aec611cd460208701876130a7565b85818110611ce457611ce461310f565b9050602002810190611cf69190613596565b611d04906020810190612ee4565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152306024820152604401602060405180830381865afa158015611d73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d97919061323e565b90506000611da76008600a6136ec565b611db460208701876130a7565b85818110611dc457611dc461310f565b9050602002810190611dd69190613596565b611de79060608101906040016136fb565b611dfb9067ffffffffffffffff1684613725565b611e059190613762565b905073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663f18d03cc611e5060208801886130a7565b86818110611e6057611e6061310f565b9050602002810190611e729190613596565b611e80906020810190612ee4565b30611e8e60208a018a6130a7565b88818110611e9e57611e9e61310f565b9050602002810190611eb09190613596565b611ec1906040810190602001612ee4565b60405160e085901b7fffffffff0000000000000000000000000000000000000000000000000000000016815273ffffffffffffffffffffffffffffffffffffffff93841660048201529183166024830152909116604482015260648101849052608401600060405180830381600087803b158015611f3e57600080fd5b505af1158015611f52573d6000803e3d6000fd5b50611f649250505060208601866130a7565b84818110611f7457611f7461310f565b9050602002810190611f869190613596565b611f97906040810190602001612ee4565b73ffffffffffffffffffffffffffffffffffffffff1663627dd56a611fbf60208801886130a7565b86818110611fcf57611fcf61310f565b9050602002810190611fe19190613596565b611fef90606081019061317c565b6040518363ffffffff1660e01b815260040161200c92919061322a565b6020604051808303816000875af115801561202b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061204f919061323e565b50505061205c8160010190565b9050611c81565b50612071604083018361379d565b9050905060005b818110156114f357600073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663f7888aec6120cb604087018761379d565b858181106120db576120db61310f565b6120f19260206080909202019081019150612ee4565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152306024820152604401602060405180830381865afa158015612160573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612184919061323e565b9050612193604085018561379d565b838181106121a3576121a361310f565b905060800201606001358110156121e6576040517fc9f52c7100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6121f3604085018561379d565b838181106122035761220361310f565b905060800201604001602081019061221b91906132ad565b156123785773ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166397da6d30612269604087018761379d565b858181106122795761227961310f565b61228f9260206080909202019081019150612ee4565b3061229d604089018961379d565b878181106122ad576122ad61310f565b90506080020160200160208101906122c59190612ee4565b60405160e085901b7fffffffff0000000000000000000000000000000000000000000000000000000016815273ffffffffffffffffffffffffffffffffffffffff938416600482015291831660248301529091166044820152600060648201526084810184905260a40160408051808303816000875af115801561234d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123719190613805565b50506124b3565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663f18d03cc6123c1604087018761379d565b858181106123d1576123d161310f565b6123e79260206080909202019081019150612ee4565b306123f5604089018961379d565b878181106124055761240561310f565b905060800201602001602081019061241d9190612ee4565b60405160e085901b7fffffffff0000000000000000000000000000000000000000000000000000000016815273ffffffffffffffffffffffffffffffffffffffff93841660048201529183166024830152909116604482015260648101849052608401600060405180830381600087803b15801561249a57600080fd5b505af11580156124ae573d6000803e3d6000fd5b505050505b50600101612078565b6040517fdd62ed3e000000000000000000000000000000000000000000000000000000008152336004820152306024820152859073ffffffffffffffffffffffffffffffffffffffff88169063dd62ed3e90604401602060405180830381865afa15801561252e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612552919061323e565b101561048c5761048c8686868686865b6040517fd505accf000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018690526064810185905260ff8416608482015260a4810183905260c4810182905273ffffffffffffffffffffffffffffffffffffffff87169063d505accf9060e401610ff7565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116906302b9446c9085161561262c57600061262e565b825b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff808816600483015233602483015286166044820152606481018590526000608482015260a401604080518083038185885af11580156126b2573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906126d79190613805565b5050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052915160009283929088169161277d9190613829565b6000604051808303816000865af19150503d80600081146127ba576040519150601f19603f3d011682016040523d82523d6000602084013e6127bf565b606091505b50915091508180156127e95750805115806127e95750808060200190518101906127e9919061383b565b61048c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f535446000000000000000000000000000000000000000000000000000000000060448201526064016118af565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905291516000928392908716916128e69190613829565b6000604051808303816000865af19150503d8060008114612923576040519150601f19603f3d011682016040523d82523d6000602084013e612928565b606091505b5091509150818015612952575080511580612952575080806020019051810190612952919061383b565b6126d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f535400000000000000000000000000000000000000000000000000000000000060448201526064016118af565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff84169083906040516129ef9190613829565b60006040518083038185875af1925050503d8060008114612a2c576040519150601f19603f3d011682016040523d82523d6000602084013e612a31565b606091505b50509050806114f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f535445000000000000000000000000000000000000000000000000000000000060448201526064016118af565b73ffffffffffffffffffffffffffffffffffffffff81168114612abe57600080fd5b50565b803561081d81612a9c565b60008060408385031215612adf57600080fd5b8235612aea81612a9c565b946020939093013593505050565b600060208284031215612b0a57600080fd5b813567ffffffffffffffff811115612b2157600080fd5b820160808185031215612b3357600080fd5b9392505050565b600060208284031215612b4c57600080fd5b813567ffffffffffffffff811115612b6357600080fd5b820160a08185031215612b3357600080fd5b60008083601f840112612b8757600080fd5b50813567ffffffffffffffff811115612b9f57600080fd5b602083019150836020828501011115612bb757600080fd5b9250929050565b600080600080600060808688031215612bd657600080fd5b8535612be181612a9c565b945060208601359350604086013567ffffffffffffffff811115612c0457600080fd5b612c1088828901612b75565b96999598509660600135949350505050565b600080600060408486031215612c3757600080fd5b8335612c4281612a9c565b9250602084013567ffffffffffffffff811115612c5e57600080fd5b612c6a86828701612b75565b9497909650939450505050565b60008060008060008060808789031215612c9057600080fd5b863567ffffffffffffffff80821115612ca857600080fd5b818901915089601f830112612cbc57600080fd5b813581811115612ccb57600080fd5b8a6020606083028501011115612ce057600080fd5b60208301985080975050612cf660208a01612ac1565b9550604089013594506060890135915080821115612d1357600080fd5b50612d2089828a01612b75565b979a9699509497509295939492505050565b803560ff8116811461081d57600080fd5b600080600060608486031215612d5857600080fd5b612d6184612d32565b95602085013595506040909401359392505050565b60008060008060008060c08789031215612d8f57600080fd5b8635612d9a81612a9c565b95506020870135945060408701359350612db660608801612d32565b92506080870135915060a087013590509295509295509295565b60008060008060008060808789031215612de957600080fd5b8635612df481612a9c565b955060208701359450604087013567ffffffffffffffff80821115612e1857600080fd5b612e248a838b01612b75565b90965094506060890135915080821115612e3d57600080fd5b818901915089601f830112612e5157600080fd5b813581811115612e6057600080fd5b8a60208260061b8501011115612e7557600080fd5b6020830194508093505050509295509295509295565b8015158114612abe57600080fd5b600080600060608486031215612eae57600080fd5b8335612eb981612a9c565b92506020840135612ec981612a9c565b91506040840135612ed981612e8b565b809150509250925092565b600060208284031215612ef657600080fd5b8135612b3381612a9c565b60008060208385031215612f1457600080fd5b823567ffffffffffffffff80821115612f2c57600080fd5b818501915085601f830112612f4057600080fd5b813581811115612f4f57600080fd5b8660208260051b8501011115612f6457600080fd5b60209290920196919550909350505050565b60005b83811015612f91578181015183820152602001612f79565b838111156114f15750506000910152565b60008151808452612fba816020860160208601612f76565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561305f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc088860301845261304d858351612fa2565b94509285019290850190600101613013565b5092979650505050505050565b60006020828403121561307e57600080fd5b813567ffffffffffffffff81111561309557600080fd5b820160608185031215612b3357600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126130dc57600080fd5b83018035915067ffffffffffffffff8211156130f757600080fd5b6020019150600581901b3603821315612bb757600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc183360301811261317257600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126131b157600080fd5b83018035915067ffffffffffffffff8211156131cc57600080fd5b602001915036819003821315612bb757600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6020815260006109d66020830184866131e1565b60006020828403121561325057600080fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff841681526040602082015260006132876040830184866131e1565b95945050505050565b6000602082840312156132a257600080fd5b8151612b3381612a9c565b6000602082840312156132bf57600080fd5b8135612b3381612e8b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561331c5761331c6132ca565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613369576133696132ca565b604052919050565b6000602080838503121561338457600080fd5b825167ffffffffffffffff8082111561339c57600080fd5b818501915085601f8301126133b057600080fd5b8151818111156133c2576133c26132ca565b6133d0848260051b01613322565b818152848101925060069190911b8301840190878211156133f057600080fd5b928401925b8184101561343c576040848903121561340e5760008081fd5b6134166132f9565b845161342181612a9c565b815284860151868201528352604090930192918401916133f5565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561348857613488613447565b500390565b8183823760009101908152919050565b6000602082840312156134af57600080fd5b815167ffffffffffffffff808211156134c757600080fd5b818401915084601f8301126134db57600080fd5b8151818111156134ed576134ed6132ca565b61351e60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613322565b915080825285602082850101111561353557600080fd5b613546816020840160208601612f76565b50949350505050565b602081526000612b336020830184612fa2565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6183360301811261317257600080fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8183360301811261317257600080fd5b600181815b8085111561362357817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561360957613609613447565b8085161561361657918102915b93841c93908002906135cf565b509250929050565b60008261363a575060016136e6565b81613647575060006136e6565b816001811461365d576002811461366757613683565b60019150506136e6565b60ff84111561367857613678613447565b50506001821b6136e6565b5060208310610133831016604e8410600b84101617156136a6575081810a6136e6565b6136b083836135ca565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156136e2576136e2613447565b0290505b92915050565b6000612b3360ff84168361362b565b60006020828403121561370d57600080fd5b813567ffffffffffffffff81168114612b3357600080fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561375d5761375d613447565b500290565b600082613798577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126137d257600080fd5b83018035915067ffffffffffffffff8211156137ed57600080fd5b6020019150600781901b3603821315612bb757600080fd5b6000806040838503121561381857600080fd5b505080516020909101519092909150565b60008251613172818460208701612f76565b60006020828403121561384d57600080fd5b8151612b3381612e8b56fea26469706673582212200415ef60859319d7d187c25545410ef4faa3bb09dcd795c90e34fd5d95f1b99e64736f6c634300080a003300000000000000000000000074c764d41b77dbbb4fe771dab1939b00b146894a000000000000000000000000fb39216449db04a1dbab41b7a5ac2a2d4f43b50e00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1

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.