ETH Price: $3,482.49 (+3.58%)
Gas: 2 Gwei

Contract

0xF70c086618dcf2b1A461311275e00D6B722ef914
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
0x112ef9c01f6f3ef73780ef3595aa93050cb3ee7f73c06d8970fa308be7fa8d05 Process Route(pending)2024-06-30 1:36:1827 hrs ago1719711378IN
0xF70c0866...B722ef914
0.012 ETH(Pending)(Pending)
Process Route201448412024-06-22 4:24:119 days ago1719030251IN
0xF70c0866...B722ef914
0.005 ETH0.000276072
Process Route184112832023-10-23 6:46:35251 days ago1698043595IN
0xF70c0866...B722ef914
0.0001 ETH0.001065898.5162059
Process Route182028642023-09-24 3:04:11281 days ago1695524651IN
0xF70c0866...B722ef914
0.001 ETH0.001856296.05
Process Route181884962023-09-22 2:44:23283 days ago1695350663IN
0xF70c0866...B722ef914
0 ETH0.000928597.54410669
Process Route181761452023-09-20 9:15:47284 days ago1695201347IN
0xF70c0866...B722ef914
0 ETH0.000958267.43147917
Process Route181547372023-09-17 9:00:23287 days ago1694941223IN
0xF70c0866...B722ef914
0.003 ETH0.001192959.28240917
Process Route181545422023-09-17 8:20:35287 days ago1694938835IN
0xF70c0866...B722ef914
0 ETH0.000511278.34374336
Process Route180082992023-08-27 20:12:11308 days ago1693167131IN
0xF70c0866...B722ef914
0 ETH0.001908111.30875183
Process Route179026692023-08-13 1:30:35323 days ago1691890235IN
0xF70c0866...B722ef914
0 ETH0.0012548810.55393205
Process Route178087162023-07-30 22:07:23336 days ago1690754843IN
0xF70c0866...B722ef914
0.004 ETH0.0020276616.32529514
Process Route177051802023-07-16 10:12:23350 days ago1689502343IN
0xF70c0866...B722ef914
0.053 ETH0.0023515317.04791331
Process Route176110752023-07-03 4:28:59364 days ago1688358539IN
0xF70c0866...B722ef914
0.0042 ETH0.0026715313.24303978
Process Route176036392023-07-02 3:25:23365 days ago1688268323IN
0xF70c0866...B722ef914
0.003 ETH0.0018325613.31367986
Process Route175976562023-07-01 7:14:23365 days ago1688195663IN
0xF70c0866...B722ef914
0.001 ETH0.0019023515.19928095
Process Route175687882023-06-27 5:58:47369 days ago1687845527IN
0xF70c0866...B722ef914
0 ETH0.0013638511.41784929
Process Route175687872023-06-27 5:58:35369 days ago1687845515IN
0xF70c0866...B722ef914
0 ETH0.0014972612.53603945
Process Route175687862023-06-27 5:58:23369 days ago1687845503IN
0xF70c0866...B722ef914
0 ETH0.001378812.66245513
Process Route175687862023-06-27 5:58:23369 days ago1687845503IN
0xF70c0866...B722ef914
0 ETH0.0014992912.66245513
Process Route175687862023-06-27 5:58:23369 days ago1687845503IN
0xF70c0866...B722ef914
0 ETH0.001378812.66245513
Process Route175687862023-06-27 5:58:23369 days ago1687845503IN
0xF70c0866...B722ef914
0 ETH0.001378812.66245513
Process Route175687862023-06-27 5:58:23369 days ago1687845503IN
0xF70c0866...B722ef914
0 ETH0.0016336212.66245513
Process Route175687682023-06-27 5:54:47369 days ago1687845287IN
0xF70c0866...B722ef914
0.0012 ETH0.0013411411.74062289
Process Route175687672023-06-27 5:54:35369 days ago1687845275IN
0xF70c0866...B722ef914
0.0012 ETH0.0013779212.0600974
Process Route175687652023-06-27 5:54:11369 days ago1687845251IN
0xF70c0866...B722ef914
0.0012 ETH0.0014279312.50037309
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To Value
201448412024-06-22 4:24:119 days ago1719030251
0xF70c0866...B722ef914
0.005 ETH
184112832023-10-23 6:46:35251 days ago1698043595
0xF70c0866...B722ef914
0.0001 ETH
182028642023-09-24 3:04:11281 days ago1695524651
0xF70c0866...B722ef914
0.001 ETH
181884962023-09-22 2:44:23283 days ago1695350663
0xF70c0866...B722ef914
0.00263052 ETH
181884962023-09-22 2:44:23283 days ago1695350663
0xF70c0866...B722ef914
0.00263052 ETH
181761452023-09-20 9:15:47284 days ago1695201347
0xF70c0866...B722ef914
0.02985452 ETH
181761452023-09-20 9:15:47284 days ago1695201347
0xF70c0866...B722ef914
0.02985452 ETH
181547372023-09-17 9:00:23287 days ago1694941223
0xF70c0866...B722ef914
0.003 ETH
181545422023-09-17 8:20:35287 days ago1694938835
0xF70c0866...B722ef914
0.852349 ETH
181545422023-09-17 8:20:35287 days ago1694938835
0xF70c0866...B722ef914
0.852349 ETH
179026692023-08-13 1:30:35323 days ago1691890235
0xF70c0866...B722ef914
0.07800051 ETH
179026692023-08-13 1:30:35323 days ago1691890235
0xF70c0866...B722ef914
0.07800051 ETH
178087162023-07-30 22:07:23336 days ago1690754843
0xF70c0866...B722ef914
0.004 ETH
177051802023-07-16 10:12:23350 days ago1689502343
0xF70c0866...B722ef914
0.053 ETH
176110752023-07-03 4:28:59364 days ago1688358539
0xF70c0866...B722ef914
0.0042 ETH
176036392023-07-02 3:25:23365 days ago1688268323
0xF70c0866...B722ef914
0.003 ETH
175976562023-07-01 7:14:23365 days ago1688195663
0xF70c0866...B722ef914
0.001 ETH
175687882023-06-27 5:58:47369 days ago1687845527
0xF70c0866...B722ef914
0.00119285 ETH
175687882023-06-27 5:58:47369 days ago1687845527
0xF70c0866...B722ef914
0.00119285 ETH
175687872023-06-27 5:58:35369 days ago1687845515
0xF70c0866...B722ef914
0.0035781 ETH
175687872023-06-27 5:58:35369 days ago1687845515
0xF70c0866...B722ef914
0.0035781 ETH
175687862023-06-27 5:58:23369 days ago1687845503
0xF70c0866...B722ef914
0.00238557 ETH
175687862023-06-27 5:58:23369 days ago1687845503
0xF70c0866...B722ef914
0.00238557 ETH
175687862023-06-27 5:58:23369 days ago1687845503
0xF70c0866...B722ef914
0.00000338 ETH
175687862023-06-27 5:58:23369 days ago1687845503
0xF70c0866...B722ef914
0.00000338 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RouteProcessor

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 10000000 runs

Other Settings:
default evmVersion
File 1 of 10 : RouteProcessor.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.10;

import '../interfaces/IUniswapV2Pair.sol';
import '../interfaces/IBentoBoxMinimal.sol';
import '../interfaces/IPool.sol';
import '../interfaces/IWETH.sol';
import './InputStream.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';

address constant NATIVE_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

/// @title A route processor for the Sushi Aggregator
/// @author Okavango
contract RouteProcessor {
  using SafeERC20 for IERC20;
  using InputStream for uint256;

  IBentoBoxMinimal public immutable bentoBox;

  uint private unlocked = 1;
  modifier lock() {
      require(unlocked == 1, 'RouteProcessor is locked');
      unlocked = 2;
      _;
      unlocked = 1;
  }

  constructor(address _bentoBox) {
    bentoBox = IBentoBoxMinimal(_bentoBox);
  }

  /// @notice For native unwrapping
  receive() external payable {}

  /// @notice Processes the route generated off-chain. Has a lock
  /// @param tokenIn Address of the input token
  /// @param amountIn Amount of the input token
  /// @param tokenOut Address of the output token
  /// @param amountOutMin Minimum amount of the output token
  /// @return amountOut Actual amount of the output token
  function processRoute(
    address tokenIn,
    uint256 amountIn,
    address tokenOut,
    uint256 amountOutMin,
    address to,
    bytes memory route
  ) external payable lock returns (uint256 amountOut) {
    return processRouteInternal(tokenIn, amountIn, tokenOut, amountOutMin, to, route);
  }

  /// @notice Transfers some value to <transferValueTo> and then processes the route
  /// @param transferValueTo Address where the value should be transferred
  /// @param amountValueTransfer How much value to transfer
  /// @param tokenIn Address of the input token
  /// @param amountIn Amount of the input token
  /// @param tokenOut Address of the output token
  /// @param amountOutMin Minimum amount of the output token
  /// @return amountOut Actual amount of the output token
  function transferValueAndprocessRoute(
    address payable transferValueTo,
    uint256 amountValueTransfer,
    address tokenIn,
    uint256 amountIn,
    address tokenOut,
    uint256 amountOutMin,
    address to,
    bytes memory route
  ) external payable lock returns (uint256 amountOut) {
    transferValueTo.transfer(amountValueTransfer);
    return processRouteInternal(tokenIn, amountIn, tokenOut, amountOutMin, to, route);
  }

  /// @notice Processes the route generated off-chain
  /// @param tokenIn Address of the input token
  /// @param amountIn Amount of the input token
  /// @param tokenOut Address of the output token
  /// @param amountOutMin Minimum amount of the output token
  /// @return amountOut Actual amount of the output token
  function processRouteInternal(
    address tokenIn,
    uint256 amountIn,
    address tokenOut,
    uint256 amountOutMin,
    address to,
    bytes memory route
  ) private returns (uint256 amountOut) {
    uint256 amountInAcc = 0;
    uint256 balanceInitial = tokenOut == NATIVE_ADDRESS ? 
      address(to).balance : IERC20(tokenOut).balanceOf(to);

    uint256 stream = InputStream.createStream(route);
    while (stream.isNotEmpty()) {
      uint8 commandCode = stream.readUint8();
      if (commandCode < 20) {
        if (commandCode == 10)
          swapUniswapPool(stream); // Sushi/Uniswap pool swap
        else if (commandCode == 4)
          distributeERC20Shares(stream); // distribute ERC20 tokens from this router to pools
        else if (commandCode == 3)
          amountInAcc += distributeERC20Amounts(stream, tokenIn); // initial distribution
        else if (commandCode == 5)
          amountInAcc += wrapAndDistributeERC20Amounts(stream); // wrap natives and initial distribution        
        else if (commandCode == 6) unwrapNative(to, stream);
        else revert('Unknown command code');
      } else if (commandCode < 24) {
        if (commandCode == 20) bentoDepositAmountFromBento(stream, tokenIn);
        else if (commandCode == 21) swapTrident(stream);
        else if (commandCode == 23) bentoWithdrawShareFromRP(stream, tokenIn);
        else revert('Unknown command code');
      } else {
        if (commandCode == 24) amountInAcc += distributeBentoShares(stream, tokenIn);
        else if (commandCode == 25) distributeBentoPortions(stream);
        else if (commandCode == 26) bentoDepositAllFromBento(stream);
        else if (commandCode == 27) bentoWithdrawAllFromRP(stream);
        else revert('Unknown command code');
      }
    }

    require(amountInAcc == amountIn, 'Wrong amountIn value');
    uint256 balanceFinal = tokenOut == NATIVE_ADDRESS ? 
      address(to).balance : IERC20(tokenOut).balanceOf(to);
    require(balanceFinal >= balanceInitial + amountOutMin, 'Minimal ouput balance violation');

    amountOut = balanceFinal - balanceInitial;
  }

  /// @notice Transfers input tokens sent to BentoBox to a pool
  /// @notice Expected to be called for initial liquidity transfer from user to BentoBox, so we know exact amounts
  /// @param stream [Pool, Amount]. Pool into which an amount of tokens will be transferred
  /// @param token Address of the token to transfer
  function bentoDepositAmountFromBento(uint256 stream, address token) private {
    address to = stream.readAddress();
    uint256 amount = stream.readUint();
    bentoBox.deposit(token, address(bentoBox), to, amount, 0);
  }

  /// @notice Transfers all available input tokens from BentoBox to a pool
  /// @param stream [Pool, Token]. Pool into which all tokens will be transferred 
  function bentoDepositAllFromBento(uint256 stream) private {
    address to = stream.readAddress();
    address token = stream.readAddress();

    uint256 amount = IERC20(token).balanceOf(address(bentoBox)) +
      bentoBox.strategyData(token).balance -
      bentoBox.totals(token).elastic;
    bentoBox.deposit(token, address(bentoBox), to, amount, 0);
  }

  /// @notice Withdraws BentoBox tokens from BentoBox to an address
  /// @param stream [To, Amount]. Destination where an amount of token will be transferred
  /// @param token Token to transfer
  function bentoWithdrawShareFromRP(uint256 stream, address token) private {
    address to = stream.readAddress();
    uint256 amount = stream.readUint();
    bentoBox.withdraw(token, address(this), to, amount, 0);
  }

  /// @notice Withdraws all available BentoBox tokens from BentoBox to an address
  /// @param stream [Token, To]. Token which will be transferred to a destination
  function bentoWithdrawAllFromRP(uint256 stream) private {
    address token = stream.readAddress();
    address to = stream.readAddress();
    uint256 amount = bentoBox.balanceOf(token, address(this));
    bentoBox.withdraw(token, address(this), to, 0, amount);
  }

  /// @notice Performs a Trident pool swap
  /// @param stream [Pool, SwapData]. Pool against a swap defined by SwapData will be executed
  function swapTrident(uint256 stream) private {
    address pool = stream.readAddress();
    bytes memory swapData = stream.readBytes();
    IPool(pool).swap(swapData);
  }

  /// @notice Performs a Sushi/UniswapV2 pool swap
  /// @param stream [Pool, TokenIn, Direction, To]
  /// @return amountOut Amount of the output token
  function swapUniswapPool(uint256 stream) private returns (uint256 amountOut) {
    address pool = stream.readAddress();
    address tokenIn = stream.readAddress();
    uint8 direction = stream.readUint8();
    address to = stream.readAddress();

    (uint256 r0, uint256 r1, ) = IUniswapV2Pair(pool).getReserves();
    require(r0 > 0 && r1 > 0, 'Wrong pool reserves');
    (uint256 reserveIn, uint256 reserveOut) = direction == 1 ? (r0, r1) : (r1, r0);

    uint256 amountIn = IERC20(tokenIn).balanceOf(pool) - reserveIn;
    uint256 amountInWithFee = amountIn * 997;
    amountOut = (amountInWithFee * reserveOut) / (reserveIn * 1000 + amountInWithFee);
    (uint256 amount0Out, uint256 amount1Out) = direction == 1 ? (uint256(0), amountOut) : (amountOut, uint256(0));
    IUniswapV2Pair(pool).swap(amount0Out, amount1Out, to, new bytes(0));
  }

  /// @notice Distributes input ERC20 tokens from msg.sender to addresses. Tokens should be approved
  /// @notice Expected to be called for initial liquidity transfer from the user to pools, so we know exact amounts
  /// @param stream [ArrayLength, ...[To, Amount][]]. An array of destinations and token amounts
  /// @param token Token to distribute
  /// @return amountTotal Total amount distributed
  function distributeERC20Amounts(uint256 stream, address token) private returns (uint256 amountTotal) {
    uint8 num = stream.readUint8();
    amountTotal = 0;
    for (uint256 i = 0; i < num; ++i) {
      address to = stream.readAddress();
      uint256 amount = stream.readUint();
      amountTotal += amount;
      IERC20(token).safeTransferFrom(msg.sender, to, amount);
    }
  }

  /// @notice Wraps all native inputs and distributes wrapped ERC20 tokens from RouteProcessor to addresses
  /// @notice Expected to be called for initial liquidity transfer from the user to pools, so we know exact amounts
  /// @param stream [WrapToken, ArrayLength, ...[To, Amount][]]. An array of destinations and token amounts
  /// @return amountTotal Total amount distributed
  function wrapAndDistributeERC20Amounts(uint256 stream) private returns (uint256 amountTotal) {
    address token = stream.readAddress();
    IWETH(token).deposit{value: address(this).balance}();
    uint8 num = stream.readUint8();
    amountTotal = 0;
    for (uint256 i = 0; i < num; ++i) {
      address to = stream.readAddress();
      uint256 amount = stream.readUint();
      amountTotal += amount;
      IERC20(token).safeTransfer(to, amount);
    }
    require(address(this).balance == 0, "RouteProcessor: invalid input amount");
  }

  /// @notice Distributes input BentoBox tokens from msg.sender to addresses. Tokens should be approved
  /// @notice Expected to be called for initial liquidity transfer from the user to pools, so we know exact amounts
  /// @param stream [ArrayLength, ...[To, ShareAmount][]]. An array of destinations and token share amounts
  /// @param token Token to distribute
  /// @return sharesTotal Total shares distributed
  function distributeBentoShares(uint256 stream, address token) private returns (uint256 sharesTotal) {
    uint8 num = stream.readUint8();
    sharesTotal = 0;
    for (uint256 i = 0; i < num; ++i) {
      address to = stream.readAddress();
      uint256 share = stream.readUint();
      sharesTotal += share;
      bentoBox.transfer(token, msg.sender, to, share);
    }
  }

  /// @notice Distributes ERC20 tokens from RouteProcessor to addresses
  /// @notice Quantity for sending is determined by share in 1/65535
  /// @notice During routing we can't predict in advance the actual value of internal swaps because of slippage,
  /// @notice so we have to work with shares - not fixed amounts
  /// @param stream [Token, ArrayLength, ...[To, ShareAmount][]]. Token to distribute. An array of destinations and token share amounts
  function distributeERC20Shares(uint256 stream) private {
    address token = stream.readAddress();
    uint8 num = stream.readUint8();
    uint256 amountTotal = IERC20(token).balanceOf(address(this))
      - 1;     // slot undrain protection

    unchecked {
      for (uint256 i = 0; i < num; ++i) {
        address to = stream.readAddress();
        uint16 share = stream.readUint16();
        uint256 amount = (amountTotal * share) / 65535;
        amountTotal -= amount;
        IERC20(token).safeTransfer(to, amount);
      }
    }
  }

  /// @notice Distributes BentoBox tokens from RouteProcessor to addresses
  /// @notice Quantity for sending is determined by portions in 1/65535.
  /// @notice During routing we can't predict in advance the actual value of internal swaps because of slippage,
  /// @notice so we have to work with portions - not fixed amounts
  /// @param stream [Token, ArrayLength, ...[To, ShareAmount][]]. Token to distribute. An array of destinations and token share amounts
  function distributeBentoPortions(uint256 stream) private {
    address token = stream.readAddress();
    uint8 num = stream.readUint8();
    uint256 amountTotal = bentoBox.balanceOf(token, address(this))
      - 1;     // slot undrain protection

    unchecked {
      for (uint256 i = 0; i < num; ++i) {
        address to = stream.readAddress();
        uint16 share = stream.readUint16();
        uint256 amount = (amountTotal * share) / 65535;
        amountTotal -= amount;
        bentoBox.transfer(token, address(this), to, amount);
      }
    }
  }

  /// @notice Unwraps the Native Token
  /// @param receiver Destination of the unwrapped token
  /// @param stream [Token]. Token to unwrap native
  function unwrapNative(address receiver, uint256 stream) private {
    address token = stream.readAddress();
    IWETH(token).withdraw( IERC20(token).balanceOf(address(this))
      - 1);     // slot undrain protection
    payable(receiver).transfer(address(this).balance);
  }
}

File 2 of 10 : 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 3 of 10 : 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 4 of 10 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 5 of 10 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 6 of 10 : InputStream.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.10;

library InputStream {
  function createStream(bytes memory data) internal pure returns (uint256 stream) {
    assembly {
      stream := mload(0x40)
      mstore(0x40, add(stream, 64))
      mstore(stream, data)
      let length := mload(data)
      mstore(add(stream, 32), add(data, length))
    }
  }

  function isNotEmpty(uint256 stream) internal pure returns (bool) {
    uint256 pos;
    uint256 finish;
    assembly {
      pos := mload(stream)
      finish := mload(add(stream, 32))
    }
    return pos < finish;
  }

  function readUint8(uint256 stream) internal pure returns (uint8 res) {
    assembly {
      let pos := mload(stream)
      pos := add(pos, 1)
      res := mload(pos)
      mstore(stream, pos)
    }
  }

  function readUint16(uint256 stream) internal pure returns (uint16 res) {
    assembly {
      let pos := mload(stream)
      pos := add(pos, 2)
      res := mload(pos)
      mstore(stream, pos)
    }
  }

  function readUint32(uint256 stream) internal pure returns (uint32 res) {
    assembly {
      let pos := mload(stream)
      pos := add(pos, 4)
      res := mload(pos)
      mstore(stream, pos)
    }
  }

  function readUint(uint256 stream) internal pure returns (uint256 res) {
    assembly {
      let pos := mload(stream)
      pos := add(pos, 32)
      res := mload(pos)
      mstore(stream, pos)
    }
  }

  function readAddress(uint256 stream) internal pure returns (address res) {
    assembly {
      let pos := mload(stream)
      pos := add(pos, 20)
      res := mload(pos)
      mstore(stream, pos)
    }
  }

  function readBytes(uint256 stream) internal pure returns (bytes memory res) {
    assembly {
      let pos := mload(stream)
      res := add(pos, 32)
      let length := mload(res)
      mstore(stream, add(res, length))
    }
  }
}

File 7 of 10 : IBentoBoxMinimal.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.8.0;

struct Rebase {
    uint128 elastic;
    uint128 base;
}

struct StrategyData {
    uint64 strategyStartDate;
    uint64 targetPercentage;
    uint128 balance; // the balance of the strategy that BentoBox thinks is in there
}

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

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

    function strategyData(address token) external view returns (StrategyData 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 8 of 10 : 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 9 of 10 : IUniswapV2Pair.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity >=0.5.0;

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;

    event Mint(address indexed sender, uint amount0, uint amount1);
    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

File 10 of 10 : IWETH.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity 0.8.10;

interface IWETH {
  function deposit() external payable;

  function transfer(address to, uint256 value) external returns (bool);

  function withdraw(uint256) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_bentoBox","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"bentoBox","outputs":[{"internalType":"contract IBentoBoxMinimal","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"route","type":"bytes"}],"name":"processRoute","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address payable","name":"transferValueTo","type":"address"},{"internalType":"uint256","name":"amountValueTransfer","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"route","type":"bytes"}],"name":"transferValueAndprocessRoute","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a0604052600160005534801561001557600080fd5b506040516200243e3803806200243e83398101604081905261003691610047565b6001600160a01b0316608052610077565b60006020828403121561005957600080fd5b81516001600160a01b038116811461007057600080fd5b9392505050565b60805161235f620000df60003960008181607c01528181610f2701528181611100015281816111e7015281816112d2015281816113ea015281816114c50152818161158a0152818161163701528181611718015281816117de01526118ad015261235f6000f3fe6080604052600436106100385760003560e01c80632646478b146100445780636b2ace871461006a57806393b3774c146100c357600080fd5b3661003f57005b600080fd5b610057610052366004611e2c565b6100d6565b6040519081526020015b60405180910390f35b34801561007657600080fd5b5061009e7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610061565b6100576100d1366004611eb3565b61016b565b60008054600114610148576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f526f75746550726f636573736f72206973206c6f636b6564000000000000000060448201526064015b60405180910390fd5b600260005561015b878787878787610241565b6001600055979650505050505050565b600080546001146101d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f526f75746550726f636573736f72206973206c6f636b65640000000000000000604482015260640161013f565b6002600090815560405173ffffffffffffffffffffffffffffffffffffffff8b16918a156108fc02918b91818181858888f19350505050158015610220573d6000803e3d6000fd5b5061022f878787878787610241565b60016000559998505050505050505050565b6000808073ffffffffffffffffffffffffffffffffffffffff871673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1461030b576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301528816906370a0823190602401602060405180830381865afa1580156102e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103069190611f58565b610324565b8473ffffffffffffffffffffffffffffffffffffffff16315b604080518082019091528581528551860160208201529091505b8051602082015111156104fc57600061035d8280516001018051915290565b905060148160ff161015610454578060ff16600a141561038657610380826106d4565b506104f6565b8060ff16600414156103a05761039b826109f6565b6104f6565b8060ff16600314156103c7576103b6828c610b3a565b6103c09085611fa0565b93506104f6565b8060ff16600514156103dc576103b682610bd2565b8060ff16600614156103f25761039b8783610d6b565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f556e6b6e6f776e20636f6d6d616e6420636f6465000000000000000000000000604482015260640161013f565b60188160ff1610156104a1578060ff16601414156104765761039b828c610ebc565b8060ff166015141561048b5761039b82610fbc565b8060ff16601714156103f25761039b828c611076565b8060ff16601814156104b7576103b6828c611131565b8060ff16601914156104cc5761039b82611258565b8060ff16601a14156104e15761039b82611454565b8060ff16601b14156103f25761039b82611767565b5061033e565b888314610565576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f57726f6e6720616d6f756e74496e2076616c7565000000000000000000000000604482015260640161013f565b600073ffffffffffffffffffffffffffffffffffffffff891673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1461062d576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301528a16906370a0823190602401602060405180830381865afa158015610604573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106289190611f58565b610646565b8673ffffffffffffffffffffffffffffffffffffffff16315b90506106528884611fa0565b8110156106bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4d696e696d616c206f757075742062616c616e63652076696f6c6174696f6e00604482015260640161013f565b6106c58382611fb8565b9b9a5050505050505050505050565b6000806106e78380516014018051915290565b905060006106fb8480516014018051915290565b9050600061070f8580516001018051915290565b905060006107238680516014018051915290565b90506000808573ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610773573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107979190611ff2565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff1691506000821180156107cc5750600081115b610832576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f57726f6e6720706f6f6c20726573657276657300000000000000000000000000604482015260640161013f565b6000808560ff1660011461084757828461084a565b83835b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b811660048301529294509092506000918491908a16906370a0823190602401602060405180830381865afa1580156108c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e69190611f58565b6108f09190611fb8565b90506000610900826103e5612042565b90508061090f856103e8612042565b6109199190611fa0565b6109238483612042565b61092d919061207f565b9a506000808960ff16600114610945578c6000610949565b60008d5b604080516000815260208101918290527f022c0d9f00000000000000000000000000000000000000000000000000000000909152919350915073ffffffffffffffffffffffffffffffffffffffff8d169063022c0d9f906109b390859085908e9060248101612130565b600060405180830381600087803b1580156109cd57600080fd5b505af11580156109e1573d6000803e3d6000fd5b50505050505050505050505050505050919050565b6000610a088280516014018051915290565b90506000610a1c8380516001018051915290565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290915060009060019073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190602401602060405180830381865afa158015610a8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab39190611f58565b610abd9190611fb8565b905060005b8260ff16811015610b33576000610adf8680516014018051915290565b90506000610af38780516002018051915290565b61ffff8082168602049485900394909150610b2573ffffffffffffffffffffffffffffffffffffffff881684836118de565b505050806001019050610ac2565b5050505050565b600080610b4d8480516001018051915290565b90506000915060005b8160ff16811015610bca576000610b738680516014018051915290565b90506000610b878780516020018051915290565b9050610b938186611fa0565b9450610bb773ffffffffffffffffffffffffffffffffffffffff87163384846119b7565b505080610bc390612175565b9050610b56565b505092915050565b600080610be58380516014018051915290565b90508073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b158015610c2f57600080fd5b505af1158015610c43573d6000803e3d6000fd5b50505050506000610c5a8480516001018051915290565b90506000925060005b8160ff16811015610cd6576000610c808680516014018051915290565b90506000610c948780516020018051915290565b9050610ca08187611fa0565b9550610cc373ffffffffffffffffffffffffffffffffffffffff861683836118de565b505080610ccf90612175565b9050610c63565b504715610d64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f526f75746550726f636573736f723a20696e76616c696420696e70757420616d60448201527f6f756e7400000000000000000000000000000000000000000000000000000000606482015260840161013f565b5050919050565b6000610d7d8280516014018051915290565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290915073ffffffffffffffffffffffffffffffffffffffff821690632e1a7d4d9060019083906370a0823190602401602060405180830381865afa158015610df5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e199190611f58565b610e239190611fb8565b6040518263ffffffff1660e01b8152600401610e4191815260200190565b600060405180830381600087803b158015610e5b57600080fd5b505af1158015610e6f573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff861692504780156108fc029250906000818181858888f19350505050158015610eb6573d6000803e3d6000fd5b50505050565b6000610ece8380516014018051915290565b90506000610ee28480516020018051915290565b6040517f02b9446c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301527f0000000000000000000000000000000000000000000000000000000000000000811660248301819052908516604483015260648201839052600060848301529192506302b9446c9060a4015b60408051808303816000875af1158015610f90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb491906121ae565b505050505050565b6000610fce8280516014018051915290565b8251602080820180519092010184526040517f627dd56a0000000000000000000000000000000000000000000000000000000081529192509073ffffffffffffffffffffffffffffffffffffffff83169063627dd56a906110339084906004016121d2565b6020604051808303816000875af1158015611052573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb69190611f58565b60006110888380516014018051915290565b9050600061109c8480516020018051915290565b6040517f97da6d3000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152306024830152848116604483015260648201839052600060848301529192507f0000000000000000000000000000000000000000000000000000000000000000909116906397da6d309060a401610f72565b6000806111448480516001018051915290565b90506000915060005b8160ff16811015610bca57600061116a8680516014018051915290565b9050600061117e8780516020018051915290565b905061118a8186611fa0565b6040517ff18d03cc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301523360248301528481166044830152606482018490529196507f00000000000000000000000000000000000000000000000000000000000000009091169063f18d03cc90608401600060405180830381600087803b15801561122d57600080fd5b505af1158015611241573d6000803e3d6000fd5b5050505050508061125190612175565b905061114d565b600061126a8280516014018051915290565b9050600061127e8380516001018051915290565b6040517ff7888aec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301523060248301529192506000916001917f00000000000000000000000000000000000000000000000000000000000000009091169063f7888aec90604401602060405180830381865afa15801561131b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133f9190611f58565b6113499190611fb8565b905060005b8260ff16811015610b3357600061136b8680516014018051915290565b9050600061137f8780516002018051915290565b6040517ff18d03cc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152306024830152848116604483015261ffff8084168802046064830181905296879003969293507f0000000000000000000000000000000000000000000000000000000000000000169063f18d03cc90608401600060405180830381600087803b15801561142e57600080fd5b505af1158015611442573d6000803e3d6000fd5b5050505050505080600101905061134e565b60006114668280516014018051915290565b9050600061147a8380516014018051915290565b6040517f4ffe34db00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff80831660048301529192506000917f00000000000000000000000000000000000000000000000000000000000000001690634ffe34db906024016040805180830381865afa15801561150b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061152f919061220c565b516040517fdf23b45b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526fffffffffffffffffffffffffffffffff909216917f0000000000000000000000000000000000000000000000000000000000000000169063df23b45b90602401606060405180830381865afa1580156115d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f5919061227f565b60409081015190517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301526fffffffffffffffffffffffffffffffff909216918516906370a0823190602401602060405180830381865afa15801561169b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116bf9190611f58565b6116c99190611fa0565b6116d39190611fb8565b6040517f02b9446c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301527f0000000000000000000000000000000000000000000000000000000000000000811660248301819052908616604483015260648201839052600060848301529192506302b9446c9060a401610f72565b60006117798280516014018051915290565b9050600061178d8380516014018051915290565b6040517ff7888aec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301523060248301529192506000917f0000000000000000000000000000000000000000000000000000000000000000169063f7888aec90604401602060405180830381865afa158015611825573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118499190611f58565b6040517f97da6d3000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152306024830152848116604483015260006064830152608482018390529192507f0000000000000000000000000000000000000000000000000000000000000000909116906397da6d309060a401610f72565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526119b29084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611a15565b505050565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052610eb69085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611930565b6000611a77826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611b219092919063ffffffff16565b8051909150156119b25780806020019051810190611a9591906122eb565b6119b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161013f565b6060611b308484600085611b38565b949350505050565b606082471015611bca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161013f565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611bf3919061230d565b60006040518083038185875af1925050503d8060008114611c30576040519150601f19603f3d011682016040523d82523d6000602084013e611c35565b606091505b5091509150611c4687838387611c51565b979650505050505050565b60608315611ce4578251611cdd5773ffffffffffffffffffffffffffffffffffffffff85163b611cdd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161013f565b5081611b30565b611b308383815115611cf95781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161013f91906121d2565b73ffffffffffffffffffffffffffffffffffffffff81168114611d4f57600080fd5b50565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112611d9257600080fd5b813567ffffffffffffffff80821115611dad57611dad611d52565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715611df357611df3611d52565b81604052838152866020858801011115611e0c57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060c08789031215611e4557600080fd5b8635611e5081611d2d565b9550602087013594506040870135611e6781611d2d565b9350606087013592506080870135611e7e81611d2d565b915060a087013567ffffffffffffffff811115611e9a57600080fd5b611ea689828a01611d81565b9150509295509295509295565b600080600080600080600080610100898b031215611ed057600080fd5b8835611edb81611d2d565b9750602089013596506040890135611ef281611d2d565b9550606089013594506080890135611f0981611d2d565b935060a0890135925060c0890135611f2081611d2d565b915060e089013567ffffffffffffffff811115611f3c57600080fd5b611f488b828c01611d81565b9150509295985092959890939650565b600060208284031215611f6a57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115611fb357611fb3611f71565b500190565b600082821015611fca57611fca611f71565b500390565b80516dffffffffffffffffffffffffffff81168114611fed57600080fd5b919050565b60008060006060848603121561200757600080fd5b61201084611fcf565b925061201e60208501611fcf565b9150604084015163ffffffff8116811461203757600080fd5b809150509250925092565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561207a5761207a611f71565b500290565b6000826120b5577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60005b838110156120d55781810151838201526020016120bd565b83811115610eb65750506000910152565b600081518084526120fe8160208601602086016120ba565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b84815283602082015273ffffffffffffffffffffffffffffffffffffffff8316604082015260806060820152600061216b60808301846120e6565b9695505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156121a7576121a7611f71565b5060010190565b600080604083850312156121c157600080fd5b505080516020909101519092909150565b6020815260006121e560208301846120e6565b9392505050565b80516fffffffffffffffffffffffffffffffff81168114611fed57600080fd5b60006040828403121561221e57600080fd5b6040516040810181811067ffffffffffffffff8211171561224157612241611d52565b60405261224d836121ec565b815261225b602084016121ec565b60208201529392505050565b805167ffffffffffffffff81168114611fed57600080fd5b60006060828403121561229157600080fd5b6040516060810181811067ffffffffffffffff821117156122b4576122b4611d52565b6040526122c083612267565b81526122ce60208401612267565b60208201526122df604084016121ec565b60408201529392505050565b6000602082840312156122fd57600080fd5b815180151581146121e557600080fd5b6000825161231f8184602087016120ba565b919091019291505056fea264697066735822122034d6aaed61be322471185edb2643f8c49510cc5c1b4e89e2f9c5b3d5e593096e64736f6c634300080a0033000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd643966

Deployed Bytecode

0x6080604052600436106100385760003560e01c80632646478b146100445780636b2ace871461006a57806393b3774c146100c357600080fd5b3661003f57005b600080fd5b610057610052366004611e2c565b6100d6565b6040519081526020015b60405180910390f35b34801561007657600080fd5b5061009e7f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd64396681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610061565b6100576100d1366004611eb3565b61016b565b60008054600114610148576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f526f75746550726f636573736f72206973206c6f636b6564000000000000000060448201526064015b60405180910390fd5b600260005561015b878787878787610241565b6001600055979650505050505050565b600080546001146101d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f526f75746550726f636573736f72206973206c6f636b65640000000000000000604482015260640161013f565b6002600090815560405173ffffffffffffffffffffffffffffffffffffffff8b16918a156108fc02918b91818181858888f19350505050158015610220573d6000803e3d6000fd5b5061022f878787878787610241565b60016000559998505050505050505050565b6000808073ffffffffffffffffffffffffffffffffffffffff871673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1461030b576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301528816906370a0823190602401602060405180830381865afa1580156102e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103069190611f58565b610324565b8473ffffffffffffffffffffffffffffffffffffffff16315b604080518082019091528581528551860160208201529091505b8051602082015111156104fc57600061035d8280516001018051915290565b905060148160ff161015610454578060ff16600a141561038657610380826106d4565b506104f6565b8060ff16600414156103a05761039b826109f6565b6104f6565b8060ff16600314156103c7576103b6828c610b3a565b6103c09085611fa0565b93506104f6565b8060ff16600514156103dc576103b682610bd2565b8060ff16600614156103f25761039b8783610d6b565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f556e6b6e6f776e20636f6d6d616e6420636f6465000000000000000000000000604482015260640161013f565b60188160ff1610156104a1578060ff16601414156104765761039b828c610ebc565b8060ff166015141561048b5761039b82610fbc565b8060ff16601714156103f25761039b828c611076565b8060ff16601814156104b7576103b6828c611131565b8060ff16601914156104cc5761039b82611258565b8060ff16601a14156104e15761039b82611454565b8060ff16601b14156103f25761039b82611767565b5061033e565b888314610565576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f57726f6e6720616d6f756e74496e2076616c7565000000000000000000000000604482015260640161013f565b600073ffffffffffffffffffffffffffffffffffffffff891673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1461062d576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301528a16906370a0823190602401602060405180830381865afa158015610604573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106289190611f58565b610646565b8673ffffffffffffffffffffffffffffffffffffffff16315b90506106528884611fa0565b8110156106bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4d696e696d616c206f757075742062616c616e63652076696f6c6174696f6e00604482015260640161013f565b6106c58382611fb8565b9b9a5050505050505050505050565b6000806106e78380516014018051915290565b905060006106fb8480516014018051915290565b9050600061070f8580516001018051915290565b905060006107238680516014018051915290565b90506000808573ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610773573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107979190611ff2565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff1691506000821180156107cc5750600081115b610832576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f57726f6e6720706f6f6c20726573657276657300000000000000000000000000604482015260640161013f565b6000808560ff1660011461084757828461084a565b83835b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b811660048301529294509092506000918491908a16906370a0823190602401602060405180830381865afa1580156108c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e69190611f58565b6108f09190611fb8565b90506000610900826103e5612042565b90508061090f856103e8612042565b6109199190611fa0565b6109238483612042565b61092d919061207f565b9a506000808960ff16600114610945578c6000610949565b60008d5b604080516000815260208101918290527f022c0d9f00000000000000000000000000000000000000000000000000000000909152919350915073ffffffffffffffffffffffffffffffffffffffff8d169063022c0d9f906109b390859085908e9060248101612130565b600060405180830381600087803b1580156109cd57600080fd5b505af11580156109e1573d6000803e3d6000fd5b50505050505050505050505050505050919050565b6000610a088280516014018051915290565b90506000610a1c8380516001018051915290565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290915060009060019073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190602401602060405180830381865afa158015610a8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab39190611f58565b610abd9190611fb8565b905060005b8260ff16811015610b33576000610adf8680516014018051915290565b90506000610af38780516002018051915290565b61ffff8082168602049485900394909150610b2573ffffffffffffffffffffffffffffffffffffffff881684836118de565b505050806001019050610ac2565b5050505050565b600080610b4d8480516001018051915290565b90506000915060005b8160ff16811015610bca576000610b738680516014018051915290565b90506000610b878780516020018051915290565b9050610b938186611fa0565b9450610bb773ffffffffffffffffffffffffffffffffffffffff87163384846119b7565b505080610bc390612175565b9050610b56565b505092915050565b600080610be58380516014018051915290565b90508073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b158015610c2f57600080fd5b505af1158015610c43573d6000803e3d6000fd5b50505050506000610c5a8480516001018051915290565b90506000925060005b8160ff16811015610cd6576000610c808680516014018051915290565b90506000610c948780516020018051915290565b9050610ca08187611fa0565b9550610cc373ffffffffffffffffffffffffffffffffffffffff861683836118de565b505080610ccf90612175565b9050610c63565b504715610d64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f526f75746550726f636573736f723a20696e76616c696420696e70757420616d60448201527f6f756e7400000000000000000000000000000000000000000000000000000000606482015260840161013f565b5050919050565b6000610d7d8280516014018051915290565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290915073ffffffffffffffffffffffffffffffffffffffff821690632e1a7d4d9060019083906370a0823190602401602060405180830381865afa158015610df5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e199190611f58565b610e239190611fb8565b6040518263ffffffff1660e01b8152600401610e4191815260200190565b600060405180830381600087803b158015610e5b57600080fd5b505af1158015610e6f573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff861692504780156108fc029250906000818181858888f19350505050158015610eb6573d6000803e3d6000fd5b50505050565b6000610ece8380516014018051915290565b90506000610ee28480516020018051915290565b6040517f02b9446c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301527f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd643966811660248301819052908516604483015260648201839052600060848301529192506302b9446c9060a4015b60408051808303816000875af1158015610f90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb491906121ae565b505050505050565b6000610fce8280516014018051915290565b8251602080820180519092010184526040517f627dd56a0000000000000000000000000000000000000000000000000000000081529192509073ffffffffffffffffffffffffffffffffffffffff83169063627dd56a906110339084906004016121d2565b6020604051808303816000875af1158015611052573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb69190611f58565b60006110888380516014018051915290565b9050600061109c8480516020018051915290565b6040517f97da6d3000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152306024830152848116604483015260648201839052600060848301529192507f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd643966909116906397da6d309060a401610f72565b6000806111448480516001018051915290565b90506000915060005b8160ff16811015610bca57600061116a8680516014018051915290565b9050600061117e8780516020018051915290565b905061118a8186611fa0565b6040517ff18d03cc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301523360248301528481166044830152606482018490529196507f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd6439669091169063f18d03cc90608401600060405180830381600087803b15801561122d57600080fd5b505af1158015611241573d6000803e3d6000fd5b5050505050508061125190612175565b905061114d565b600061126a8280516014018051915290565b9050600061127e8380516001018051915290565b6040517ff7888aec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301523060248301529192506000916001917f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd6439669091169063f7888aec90604401602060405180830381865afa15801561131b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133f9190611f58565b6113499190611fb8565b905060005b8260ff16811015610b3357600061136b8680516014018051915290565b9050600061137f8780516002018051915290565b6040517ff18d03cc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152306024830152848116604483015261ffff8084168802046064830181905296879003969293507f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd643966169063f18d03cc90608401600060405180830381600087803b15801561142e57600080fd5b505af1158015611442573d6000803e3d6000fd5b5050505050505080600101905061134e565b60006114668280516014018051915290565b9050600061147a8380516014018051915290565b6040517f4ffe34db00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff80831660048301529192506000917f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd6439661690634ffe34db906024016040805180830381865afa15801561150b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061152f919061220c565b516040517fdf23b45b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526fffffffffffffffffffffffffffffffff909216917f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd643966169063df23b45b90602401606060405180830381865afa1580156115d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f5919061227f565b60409081015190517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd643966811660048301526fffffffffffffffffffffffffffffffff909216918516906370a0823190602401602060405180830381865afa15801561169b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116bf9190611f58565b6116c99190611fa0565b6116d39190611fb8565b6040517f02b9446c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301527f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd643966811660248301819052908616604483015260648201839052600060848301529192506302b9446c9060a401610f72565b60006117798280516014018051915290565b9050600061178d8380516014018051915290565b6040517ff7888aec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301523060248301529192506000917f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd643966169063f7888aec90604401602060405180830381865afa158015611825573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118499190611f58565b6040517f97da6d3000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152306024830152848116604483015260006064830152608482018390529192507f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd643966909116906397da6d309060a401610f72565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526119b29084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611a15565b505050565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052610eb69085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611930565b6000611a77826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611b219092919063ffffffff16565b8051909150156119b25780806020019051810190611a9591906122eb565b6119b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161013f565b6060611b308484600085611b38565b949350505050565b606082471015611bca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161013f565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611bf3919061230d565b60006040518083038185875af1925050503d8060008114611c30576040519150601f19603f3d011682016040523d82523d6000602084013e611c35565b606091505b5091509150611c4687838387611c51565b979650505050505050565b60608315611ce4578251611cdd5773ffffffffffffffffffffffffffffffffffffffff85163b611cdd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161013f565b5081611b30565b611b308383815115611cf95781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161013f91906121d2565b73ffffffffffffffffffffffffffffffffffffffff81168114611d4f57600080fd5b50565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112611d9257600080fd5b813567ffffffffffffffff80821115611dad57611dad611d52565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715611df357611df3611d52565b81604052838152866020858801011115611e0c57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060c08789031215611e4557600080fd5b8635611e5081611d2d565b9550602087013594506040870135611e6781611d2d565b9350606087013592506080870135611e7e81611d2d565b915060a087013567ffffffffffffffff811115611e9a57600080fd5b611ea689828a01611d81565b9150509295509295509295565b600080600080600080600080610100898b031215611ed057600080fd5b8835611edb81611d2d565b9750602089013596506040890135611ef281611d2d565b9550606089013594506080890135611f0981611d2d565b935060a0890135925060c0890135611f2081611d2d565b915060e089013567ffffffffffffffff811115611f3c57600080fd5b611f488b828c01611d81565b9150509295985092959890939650565b600060208284031215611f6a57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115611fb357611fb3611f71565b500190565b600082821015611fca57611fca611f71565b500390565b80516dffffffffffffffffffffffffffff81168114611fed57600080fd5b919050565b60008060006060848603121561200757600080fd5b61201084611fcf565b925061201e60208501611fcf565b9150604084015163ffffffff8116811461203757600080fd5b809150509250925092565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561207a5761207a611f71565b500290565b6000826120b5577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60005b838110156120d55781810151838201526020016120bd565b83811115610eb65750506000910152565b600081518084526120fe8160208601602086016120ba565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b84815283602082015273ffffffffffffffffffffffffffffffffffffffff8316604082015260806060820152600061216b60808301846120e6565b9695505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156121a7576121a7611f71565b5060010190565b600080604083850312156121c157600080fd5b505080516020909101519092909150565b6020815260006121e560208301846120e6565b9392505050565b80516fffffffffffffffffffffffffffffffff81168114611fed57600080fd5b60006040828403121561221e57600080fd5b6040516040810181811067ffffffffffffffff8211171561224157612241611d52565b60405261224d836121ec565b815261225b602084016121ec565b60208201529392505050565b805167ffffffffffffffff81168114611fed57600080fd5b60006060828403121561229157600080fd5b6040516060810181811067ffffffffffffffff821117156122b4576122b4611d52565b6040526122c083612267565b81526122ce60208401612267565b60208201526122df604084016121ec565b60408201529392505050565b6000602082840312156122fd57600080fd5b815180151581146121e557600080fd5b6000825161231f8184602087016120ba565b919091019291505056fea264697066735822122034d6aaed61be322471185edb2643f8c49510cc5c1b4e89e2f9c5b3d5e593096e64736f6c634300080a0033

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

000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd643966

-----Decoded View---------------
Arg [0] : _bentoBox (address): 0xF5BCE5077908a1b7370B9ae04AdC565EBd643966

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd643966


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.