Contract 0x8311bcA90818330AA228DA17aA8fB7a0bBBaF97C 2

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xe85d057feaa596f04d0fc373d75f3a199e2c439ec7b7a5abbcbcfceae110f1e10xa1fd1a08254962962022-03-02 13:39:19169 days 3 hrs ago0xfac7dd7e20eb674ee38c7864296fb451249f26c9 IN  0x8311bca90818330aa228da17aa8fb7a0bbbaf97c0 MATIC0.90503508 1,240
0x068109dede73882ad9f9ec599a208255594764e212e922764c15da99b39421770xa1fd1a08254936022022-03-02 11:52:30169 days 5 hrs ago0xfac7dd7e20eb674ee38c7864296fb451249f26c9 IN  0x8311bca90818330aa228da17aa8fb7a0bbbaf97c0 MATIC0.93129952 1,240
0xc3d4075fb3808809af935bdb1bab0378d5018de111b4d37d7bcdddcd79c4d6740xa1fd1a08251683552022-02-20 21:21:35178 days 19 hrs ago0xfac7dd7e20eb674ee38c7864296fb451249f26c9 IN  0x8311bca90818330aa228da17aa8fb7a0bbbaf97c0 MATIC1.07614764 1,240
0xb8945dc42eeb35b52764be350293ef20f13e64f7901fde0ee70e96ad5c97fcce0xa1fd1a08250847262022-02-18 14:58:15181 days 2 hrs ago0xfac7dd7e20eb674ee38c7864296fb451249f26c9 IN  0x8311bca90818330aa228da17aa8fb7a0bbbaf97c0 MATIC0.7203222 1,240
0x5023fe8653748bf8638405b12bd43eed600f851b616a6698ce4ec18b7f1dbf660xa1fd1a08250530942022-02-17 15:48:21182 days 1 hr ago0xfac7dd7e20eb674ee38c7864296fb451249f26c9 IN  0x8311bca90818330aa228da17aa8fb7a0bbbaf97c0 MATIC0.33351504 240
0x798cd219af0d01a37d09af79fe6d558c75d2369f94aa27b8534ee7b7b129a4430xa1fd1a08250530942022-02-17 15:48:21182 days 1 hr ago0xfac7dd7e20eb674ee38c7864296fb451249f26c9 IN  0x8311bca90818330aa228da17aa8fb7a0bbbaf97c0 MATIC0.30277392 240
0xb0ae5ca10f97f09d261c8dd5f36163b230b415263e49faa2ae08c1945c8175650xa1fd1a08249963772022-02-16 4:14:28183 days 12 hrs ago0xfac7dd7e20eb674ee38c7864296fb451249f26c9 IN  0x8311bca90818330aa228da17aa8fb7a0bbbaf97c0 MATIC0.21533832 240
0x41625f1b4e6d2157adced57e8e56902de5d0768a45577833eef3d0333ba976bc0xa1fd1a08249784852022-02-15 17:26:32183 days 23 hrs ago0xfac7dd7e20eb674ee38c7864296fb451249f26c9 IN  0x8311bca90818330aa228da17aa8fb7a0bbbaf97c0 MATIC0.0433005 60
0xb07b0eec0548f7488c28cf3dd6f18aa88d1b82cd9890fdf2ff0557f28470fa6e0xa1fd1a08246644242022-02-07 17:39:19191 days 23 hrs ago0xfac7dd7e20eb674ee38c7864296fb451249f26c9 IN  0x8311bca90818330aa228da17aa8fb7a0bbbaf97c0 MATIC0.08437662 60
0x021a22650d722bbd78ba70fd27fa4a884f5c5c9ce06f26bda89d9310581677700xa1fd1a08246620442022-02-07 16:11:06192 days 58 mins ago0xfac7dd7e20eb674ee38c7864296fb451249f26c9 IN  0x8311bca90818330aa228da17aa8fb7a0bbbaf97c0 MATIC0.1155219 60
0x714c5c3ac2396ce0c7bbea316e6ca4ac7121ce0356d1b5200dcc753a5133cc470xa1fd1a08246544222022-02-07 11:27:38192 days 5 hrs ago0xfac7dd7e20eb674ee38c7864296fb451249f26c9 IN  0x8311bca90818330aa228da17aa8fb7a0bbbaf97c0 MATIC0.06207768 60
0xbb99cd99ace92b643dc70c9d452535962ff4cf7d90426bacce1092a02ff74ad20xa1fd1a08245337032022-02-04 8:30:19195 days 8 hrs ago0xfac7dd7e20eb674ee38c7864296fb451249f26c9 IN  0x8311bca90818330aa228da17aa8fb7a0bbbaf97c0 MATIC0.13224846 60
0xcb89129b479291d13fd74e2d8a19df77e5657756b9b428af827af881cb690e9f0xa1fd1a08244801932022-02-02 23:58:15196 days 17 hrs ago0xfac7dd7e20eb674ee38c7864296fb451249f26c9 IN  0x8311bca90818330aa228da17aa8fb7a0bbbaf97c0 MATIC0.01833669 30
0x7805bfcda40de341085830bb297bb689ab0cc7ec730c39185b2649d2ccb6706b0xa1fd1a08244785492022-02-02 22:57:24196 days 18 hrs ago0xfac7dd7e20eb674ee38c7864296fb451249f26c9 IN  0x8311bca90818330aa228da17aa8fb7a0bbbaf97c0 MATIC0.0304749 30
0x8ab3a3dddf386c71f912569c85fd894c74bb002b1146da15730640f4606de9490x60806040244601812022-02-02 12:08:41197 days 5 hrs ago0xfac7dd7e20eb674ee38c7864296fb451249f26c9 IN  Contract Creation0 MATIC0.005839692705 2.500000088
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

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

Contract Name:
Flashloan

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 20 : Flashloan.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";

import "./uniswap/IUniswapV2Router02.sol";
import "./uniswap/v3/ISwapRouter.sol";

import "./dodo/IDODO.sol";

import "./interfaces/IFlashloan.sol";
import "./interfaces/IRouter.sol";

import "./base/DodoBase.sol";
import "./base/FlashloanValidation.sol";
import "./base/Withdraw.sol";

import "./libraries/Part.sol";
import "./libraries/RouteUtils.sol";

contract Flashloan is IFlashloan, DodoBase, FlashloanValidation, Withdraw {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    event SentProfit(address recipient, uint256 profit);
    event SwapFinished(address token, uint256 amount);

    IRouter uniswapRouter;

    constructor(address _router) {
        uniswapRouter = IRouter(_router);
    }

    function dodoFlashLoan(FlashParams memory params)
        external
        checkParams(params)
    {
        bytes memory data = abi.encode(
            FlashCallbackData({
                me: msg.sender,
                flashLoanPool: params.flashLoanPool,
                loanAmount: params.loanAmount,
                firstRoutes: params.firstRoutes,
                secondRoutes: params.secondRoutes
            })
        );
        address loanToken = RouteUtils.getInitialToken(params.firstRoutes[0]);
        IDODO(params.flashLoanPool).flashLoan(
            IDODO(params.flashLoanPool)._BASE_TOKEN_() == loanToken
                ? params.loanAmount
                : 0,
            IDODO(params.flashLoanPool)._BASE_TOKEN_() == loanToken
                ? 0
                : params.loanAmount,
            address(this),
            data
        );
    }

    function _flashLoanCallBack(
        address,
        uint256,
        uint256,
        bytes calldata data
    ) internal override {
        FlashCallbackData memory decoded = abi.decode(
            data,
            (FlashCallbackData)
        );

        address loanToken = RouteUtils.getInitialToken(decoded.firstRoutes[0]);
        address toToken = RouteUtils.getInitialToken(decoded.secondRoutes[0]);

        require(
            IERC20(loanToken).balanceOf(address(this)) >= decoded.loanAmount,
            "Failed to borrow loan token"
        );

        routeLoop(decoded.firstRoutes, decoded.loanAmount);
        uint256 toTokenAmount = IERC20(toToken).balanceOf(address(this));
        routeLoop(decoded.secondRoutes, toTokenAmount);

        emit SwapFinished(
            loanToken,
            IERC20(loanToken).balanceOf(address(this))
        );

        require(
            IERC20(loanToken).balanceOf(address(this)) >= decoded.loanAmount,
            "Not enough amount to return loan"
        );
        //Return funds
        IERC20(loanToken).transfer(decoded.flashLoanPool, decoded.loanAmount);

        // send all loanToken to msg.sender
        uint256 remained = IERC20(loanToken).balanceOf(address(this));
        IERC20(loanToken).transfer(decoded.me, remained);
        emit SentProfit(decoded.me, remained);
    }

    function routeLoop(Route[] memory routes, uint256 totalAmount)
        internal
        checkTotalRoutePart(routes)
    {
        for (uint256 i = 0; i < routes.length; i++) {
            uint256 amountIn = Part.partToAmountIn(routes[i].part, totalAmount);
            hopLoop(routes[i], amountIn);
        }
    }

    function hopLoop(Route memory route, uint256 totalAmount) internal {
        uint256 amountIn = totalAmount;
        for (uint256 i = 0; i < route.hops.length; i++) {
            amountIn = swapLoop(route.hops[i], amountIn);
        }
    }

    function swapLoop(Hop memory hop, uint256 totalAmount)
        internal
        checkTotalSwapPart(hop.swaps)
        returns (uint256)
    {
        uint256 amountOut = 0;
        for (uint256 i = 0; i < hop.swaps.length; i++) {
            uint256 amountIn = Part.partToAmountIn(
                hop.swaps[i].part,
                totalAmount
            );
            amountOut += pickProtocol(hop.swaps[i], hop.path, amountIn);
        }
        return amountOut;
    }

    function pickProtocol(
        Swap memory swap,
        address[] memory path,
        uint256 amountIn
    ) internal returns (uint256 amountOut) {
        if (swap.protocol == 0) {
            // dodoSwap(swap, amountIn);
            return uniswapV3(swap, path, amountIn);
        } else {
            return uniswapV2(swap, path, amountIn)[1];
        }
    }

    function uniswapV3(
        Swap memory swap,
        address[] memory path,
        uint256 amountIn
    ) internal returns (uint256 amountOut) {
        address router = uniswapRouter.getRouterAddress(swap.protocol);
        ISwapRouter swapRouter = ISwapRouter(router);
        approveToken(path[0], address(swapRouter), amountIn);
        uint24 fee = uniswapRouter.getFee(path[0], path[1]);

        // single swaps
        amountOut = swapRouter.exactInputSingle(
            ISwapRouter.ExactInputSingleParams({
                tokenIn: path[0],
                tokenOut: path[1],
                fee: fee,
                recipient: address(this),
                deadline: block.timestamp,
                amountIn: amountIn,
                amountOutMinimum: 0,
                sqrtPriceLimitX96: 0
            })
        );
    }

    function uniswapV2(
        Swap memory swap,
        address[] memory path,
        uint256 amountIn
    ) internal returns (uint256[] memory) {
        address router = uniswapRouter.getRouterAddress(swap.protocol);
        approveToken(path[0], router, amountIn);
        return
            IUniswapV2Router02(router).swapExactTokensForTokens(
                amountIn,
                1,
                path,
                address(this),
                block.timestamp
            );
    }

    function approveToken(
        address token,
        address to,
        uint256 amountIn
    ) internal {
        require(IERC20(token).approve(to, amountIn), "approve failed.");
    }
}

File 2 of 20 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

    /**
     * @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 3 of 20 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 4 of 20 : IUniswapV2Router02.sol
// SPDX-License-Identifier: GNU
pragma solidity >=0.6.2;

import './IUniswapV2Router01.sol';

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

File 5 of 20 : ISwapRouter.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.5;
pragma abicoder v2;

import './IUniswapV3SwapCallback.sol';

/// @title Router token swapping functionality
/// @notice Functions for swapping tokens via Uniswap V3
interface ISwapRouter is IUniswapV3SwapCallback {
    struct ExactInputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint256 deadline;
        uint256 amountIn;
        uint256 amountOutMinimum;
        uint160 sqrtPriceLimitX96;
    }

    /// @notice Swaps `amountIn` of one token for as much as possible of another token
    /// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata
    /// @return amountOut The amount of the received token
    function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);

    struct ExactInputParams {
        bytes path;
        address recipient;
        uint256 deadline;
        uint256 amountIn;
        uint256 amountOutMinimum;
    }

    /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path
    /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata
    /// @return amountOut The amount of the received token
    function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut);

    struct ExactOutputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint256 deadline;
        uint256 amountOut;
        uint256 amountInMaximum;
        uint160 sqrtPriceLimitX96;
    }

    /// @notice Swaps as little as possible of one token for `amountOut` of another token
    /// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata
    /// @return amountIn The amount of the input token
    function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn);

    struct ExactOutputParams {
        bytes path;
        address recipient;
        uint256 deadline;
        uint256 amountOut;
        uint256 amountInMaximum;
    }

    /// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed)
    /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata
    /// @return amountIn The amount of the input token
    function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn);
}

File 6 of 20 : IDODO.sol
// This is a file copied from https://github.com/DODOEX/dodo-example/blob/main/solidity/contracts/DODOFlashloan.sol
/*
    Copyright 2021 DODO ZOO.
    SPDX-License-Identifier: Apache-2.0
*/
pragma solidity ^0.8;
// pragma solidity 0.6.9;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
// import {IERC20} from "./intf/IERC20.sol";

interface IDODO {
    function flashLoan(
        uint256 baseAmount,
        uint256 quoteAmount,
        address assetTo,
        bytes calldata data
    ) external;

    function _BASE_TOKEN_() external view returns (address);
    function _BASE_RESERVE_() external view returns (uint112);
    function _QUOTE_TOKEN_() external view returns (address);
    function _QUOTE_RESERVE_() external view returns (uint112);
}

File 7 of 20 : IFlashloan.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IFlashloan {
    struct Swap {
        uint8 protocol;
        uint16 part;
    }

    struct Hop {
        Swap[] swaps;
        address[] path;
    }

    struct Route {
        Hop[] hops;
        uint16 part;
    }

    struct FlashParams {
        address flashLoanPool;
        uint256 loanAmount;
        Route[] firstRoutes;
        Route[] secondRoutes;
    }

    struct FlashCallbackData {
        address me;
        address flashLoanPool;
        uint256 loanAmount;
        Route[] firstRoutes;
        Route[] secondRoutes;
    }
}

File 8 of 20 : IRouter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IRouter {
    struct PoolInfo {
        address base;
        address quote;
        uint24 fee;
    }

    function getRouterAddress(uint8 routerIdx) external view returns (address);

    function updateRouterAddress(uint8 routerIdx, address router) external;

    function getFee(address base, address quote) external view returns (uint24);

    function updateFee(
        address base,
        address quote,
        uint24 fee
    ) external;
}

File 9 of 20 : DodoBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../interfaces/IFlashloan.sol";
import "../dodo/IDODO.sol";
import "../libraries/RouteUtils.sol";

contract DodoBase is IFlashloan {
    //Note: CallBack function executed by DODOV2(DVM) flashLoan pool
    function DVMFlashLoanCall(
        address sender,
        uint256 baseAmount,
        uint256 quoteAmount,
        bytes calldata data
    ) external {
        _flashLoanCallBack(sender, baseAmount, quoteAmount, data);
    }

    //Note: CallBack function executed by DODOV2(DPP) flashLoan pool
    function DPPFlashLoanCall(
        address sender,
        uint256 baseAmount,
        uint256 quoteAmount,
        bytes calldata data
    ) external {
        _flashLoanCallBack(sender, baseAmount, quoteAmount, data);
    }

    //Note: CallBack function executed by DODOV2(DSP) flashLoan pool
    function DSPFlashLoanCall(
        address sender,
        uint256 baseAmount,
        uint256 quoteAmount,
        bytes calldata data
    ) external {
        _flashLoanCallBack(sender, baseAmount, quoteAmount, data);
    }

    function _flashLoanCallBack(
        address,
        uint256,
        uint256,
        bytes calldata data
    ) internal virtual {}

    modifier checkParams(FlashParams memory params) {
        address loanToken = RouteUtils.getInitialToken(params.firstRoutes[0]);
        bool loanEqBase = loanToken == IDODO(params.flashLoanPool)._BASE_TOKEN_();
        bool loanEqQuote = loanToken == IDODO(params.flashLoanPool)._QUOTE_TOKEN_();
        require(loanEqBase || loanEqQuote, "Wrong flashloan pool address");
		_;
	}
}

File 10 of 20 : FlashloanValidation.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../interfaces/IFlashloan.sol";

abstract contract FlashloanValidation {
    modifier checkTotalRoutePart(IFlashloan.Route[] memory routes) {
        uint16 totalPart = 0;
        for (uint256 i = 0; i < uint256(routes.length); i++) {
            totalPart += routes[i].part;
        }
        require(totalPart == 10000, "Route part error");
        _;
    }

    modifier checkTotalSwapPart(IFlashloan.Swap[] memory swaps) {
        uint16 totalPart = 0;
        for (uint256 i = 0; i < uint256(swaps.length); i++) {
            totalPart += swaps[i].part;
        }
        require(totalPart == 10000, "Swap part error");
        _;
    }
}

File 11 of 20 : Withdraw.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

contract Withdraw is Ownable, ReentrancyGuard {
    event Withdrawal(address indexed sender, uint256 amount);

    function withdrawToken(
        IERC20 token,
        address _to,
        uint256 _value
    ) public onlyOwner nonReentrant {
        require(token.balanceOf(address(this)) >= _value, "Not enough token");
        SafeERC20.safeTransfer(token, _to, _value);
        emit Withdrawal(_to, _value);
    }
}

File 12 of 20 : Part.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/math/SafeMath.sol";

library Part {
    using SafeMath for uint256;
    using SafeMath for uint16;

    function partToAmountIn(uint16 part, uint256 total)
        internal
        pure
        returns (uint256 amountIn)
    {
        amountIn = (total * part) / 10**4;
    }
}

File 13 of 20 : RouteUtils.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../interfaces/IFlashloan.sol";

library RouteUtils {
    function getInitialToken(IFlashloan.Route memory route)
        internal
        pure
        returns (address)
    {
        return route.hops[0].path[0];
    }

}

File 14 of 20 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

File 15 of 20 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 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 functionCall(target, data, "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");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(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) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(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) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason 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 {
            // 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 16 of 20 : IUniswapV2Router01.sol
// SPDX-License-Identifier: GNU
pragma solidity >=0.6.2;

interface IUniswapV2Router01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

File 17 of 20 : IUniswapV3SwapCallback.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Callback for IUniswapV3PoolActions#swap
/// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface
interface IUniswapV3SwapCallback {
    /// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap.
    /// @dev In the implementation you must pay the pool tokens owed for the swap.
    /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory.
    /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped.
    /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by
    /// the end of the swap. If positive, the callback must send that amount of token0 to the pool.
    /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by
    /// the end of the swap. If positive, the callback must send that amount of token1 to the pool.
    /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call
    function uniswapV3SwapCallback(
        int256 amount0Delta,
        int256 amount1Delta,
        bytes calldata data
    ) external;
}

File 18 of 20 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 19 of 20 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 20 of 20 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200,
    "details": {
      "yul": false
    }
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_router","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"profit","type":"uint256"}],"name":"SentProfit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SwapFinished","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawal","type":"event"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"baseAmount","type":"uint256"},{"internalType":"uint256","name":"quoteAmount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"DPPFlashLoanCall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"baseAmount","type":"uint256"},{"internalType":"uint256","name":"quoteAmount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"DSPFlashLoanCall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"baseAmount","type":"uint256"},{"internalType":"uint256","name":"quoteAmount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"DVMFlashLoanCall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"flashLoanPool","type":"address"},{"internalType":"uint256","name":"loanAmount","type":"uint256"},{"components":[{"components":[{"components":[{"internalType":"uint8","name":"protocol","type":"uint8"},{"internalType":"uint16","name":"part","type":"uint16"}],"internalType":"struct IFlashloan.Swap[]","name":"swaps","type":"tuple[]"},{"internalType":"address[]","name":"path","type":"address[]"}],"internalType":"struct IFlashloan.Hop[]","name":"hops","type":"tuple[]"},{"internalType":"uint16","name":"part","type":"uint16"}],"internalType":"struct IFlashloan.Route[]","name":"firstRoutes","type":"tuple[]"},{"components":[{"components":[{"components":[{"internalType":"uint8","name":"protocol","type":"uint8"},{"internalType":"uint16","name":"part","type":"uint16"}],"internalType":"struct IFlashloan.Swap[]","name":"swaps","type":"tuple[]"},{"internalType":"address[]","name":"path","type":"address[]"}],"internalType":"struct IFlashloan.Hop[]","name":"hops","type":"tuple[]"},{"internalType":"uint16","name":"part","type":"uint16"}],"internalType":"struct IFlashloan.Route[]","name":"secondRoutes","type":"tuple[]"}],"internalType":"struct IFlashloan.FlashParams","name":"params","type":"tuple"}],"name":"dodoFlashLoan","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162002931380380620029318339810160408190526200003491620000cc565b6200003f3362000069565b60018055600280546001600160a01b0319166001600160a01b039290921691909117905562000121565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8051620000c68162000107565b92915050565b600060208284031215620000df57600080fd5b6000620000ed8484620000b9565b949350505050565b60006001600160a01b038216620000c6565b6200011281620000f5565b81146200011e57600080fd5b50565b61280080620001316000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063a1fd1a081161005b578063a1fd1a08146100df578063d5b99797146100aa578063eb2021c3146100aa578063f2fde38b146100f257600080fd5b806301e336671461008d578063715018a6146100a25780637ed1f1dd146100aa5780638da5cb5b146100bd575b600080fd5b6100a061009b366004611c7d565b610105565b005b6100a0610251565b6100a06100b8366004611bae565b610287565b6000546001600160a01b03166040516100d6919061240c565b60405180910390f35b6100a06100ed366004611cfe565b61029b565b6100a0610100366004611b72565b61064f565b6000546001600160a01b031633146101385760405162461bcd60e51b815260040161012f906124a1565b60405180910390fd5b6002600154141561015b5760405162461bcd60e51b815260040161012f90612511565b60026001556040516370a0823160e01b815281906001600160a01b038516906370a082319061018e90309060040161240c565b60206040518083038186803b1580156101a657600080fd5b505afa1580156101ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101de9190611d50565b10156101fc5760405162461bcd60e51b815260040161012f90612491565b6102078383836106ab565b816001600160a01b03167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040516102409190612551565b60405180910390a250506001805550565b6000546001600160a01b0316331461027b5760405162461bcd60e51b815260040161012f906124a1565b6102856000610706565b565b6102948585858585610756565b5050505050565b8060006102d382604001516000815181106102c657634e487b7160e01b600052603260045260246000fd5b6020026020010151610c21565b9050600082600001516001600160a01b0316634a248d2a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561031457600080fd5b505afa158015610328573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061034c9190611b90565b6001600160a01b0316826001600160a01b0316149050600083600001516001600160a01b031663d4b970466040518163ffffffff1660e01b815260040160206040518083038186803b1580156103a157600080fd5b505afa1580156103b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d99190611b90565b6001600160a01b0316836001600160a01b031614905081806103f85750805b6104145760405162461bcd60e51b815260040161012f906124f1565b60006040518060a00160405280336001600160a01b0316815260200187600001516001600160a01b031681526020018760200151815260200187604001518152602001876060015181525060405160200161046f9190612540565b604051602081830303815290604052905060006104aa87604001516000815181106102c657634e487b7160e01b600052603260045260246000fd5b905086600001516001600160a01b031663d0a494e4826001600160a01b031689600001516001600160a01b0316634a248d2a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561050657600080fd5b505afa15801561051a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053e9190611b90565b6001600160a01b031614610553576000610559565b88602001515b836001600160a01b03168a600001516001600160a01b0316634a248d2a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105a057600080fd5b505afa1580156105b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d89190611b90565b6001600160a01b0316146105f05789602001516105f3565b60005b30866040518563ffffffff1660e01b815260040161061494939291906125b2565b600060405180830381600087803b15801561062e57600080fd5b505af1158015610642573d6000803e3d6000fd5b5050505050505050505050565b6000546001600160a01b031633146106795760405162461bcd60e51b815260040161012f906124a1565b6001600160a01b03811661069f5760405162461bcd60e51b815260040161012f90612461565b6106a881610706565b50565b6107018363a9059cbb60e01b84846040516024016106ca929190612435565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610c83565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061076482840184611cca565b9050600061079082606001516000815181106102c657634e487b7160e01b600052603260045260246000fd5b905060006107bc83608001516000815181106102c657634e487b7160e01b600052603260045260246000fd5b90508260400151826001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016107ef919061240c565b60206040518083038186803b15801561080757600080fd5b505afa15801561081b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083f9190611d50565b101561085d5760405162461bcd60e51b815260040161012f90612471565b61086f83606001518460400151610d12565b6040516370a0823160e01b81526000906001600160a01b038316906370a082319061089e90309060040161240c565b60206040518083038186803b1580156108b657600080fd5b505afa1580156108ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ee9190611d50565b90506108fe846080015182610d12565b7ffdc1bd83776f7aa310fcf2b1915ae1c6c16a4cfb48ebcea2bf15febd084c03de83846001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161094c919061240c565b60206040518083038186803b15801561096457600080fd5b505afa158015610978573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099c9190611d50565b6040516109aa929190612435565b60405180910390a160408085015190516370a0823160e01b81526001600160a01b038516906370a08231906109e390309060040161240c565b60206040518083038186803b1580156109fb57600080fd5b505afa158015610a0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a339190611d50565b1015610a515760405162461bcd60e51b815260040161012f906124c1565b6020840151604080860151905163a9059cbb60e01b81526001600160a01b0386169263a9059cbb92610a8592600401612435565b602060405180830381600087803b158015610a9f57600080fd5b505af1158015610ab3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad79190611c5f565b506040516370a0823160e01b81526000906001600160a01b038516906370a0823190610b0790309060040161240c565b60206040518083038186803b158015610b1f57600080fd5b505afa158015610b33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b579190611d50565b855160405163a9059cbb60e01b81529192506001600160a01b0386169163a9059cbb91610b88918590600401612435565b602060405180830381600087803b158015610ba257600080fd5b505af1158015610bb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bda9190611c5f565b5084516040517f2b312ac7b7c9b2fc53c9398d48ed2df4c1d192a03cc090b47087b2936ba0a61f91610c0d918490612435565b60405180910390a150505050505050505050565b60008160000151600081518110610c4857634e487b7160e01b600052603260045260246000fd5b602002602001015160200151600081518110610c7457634e487b7160e01b600052603260045260246000fd5b60200260200101519050919050565b6000610cd8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610e1a9092919063ffffffff16565b8051909150156107015780806020019051810190610cf69190611c5f565b6107015760405162461bcd60e51b815260040161012f90612501565b816000805b8251811015610d6b57828181518110610d4057634e487b7160e01b600052603260045260246000fd5b60200260200101516020015182610d579190612639565b915080610d6381612724565b915050610d17565b508061ffff1661271014610d915760405162461bcd60e51b815260040161012f90612521565b60005b8451811015610294576000610dd4868381518110610dc257634e487b7160e01b600052603260045260246000fd5b60200260200101516020015186610e33565b9050610e07868381518110610df957634e487b7160e01b600052603260045260246000fd5b602002602001015182610e50565b5080610e1281612724565b915050610d94565b6060610e298484600085610ead565b90505b9392505050565b6000612710610e4661ffff851684612689565b610e2c9190612675565b8060005b835151811015610ea757610e9384600001518281518110610e8557634e487b7160e01b600052603260045260246000fd5b602002602001015183610f66565b915080610e9f81612724565b915050610e54565b50505050565b606082471015610ecf5760405162461bcd60e51b815260040161012f90612481565b843b610eed5760405162461bcd60e51b815260040161012f906124e1565b600080866001600160a01b03168587604051610f099190612400565b60006040518083038185875af1925050503d8060008114610f46576040519150601f19603f3d011682016040523d82523d6000602084013e610f4b565b606091505b5091509150610f5b828286611097565b979650505050505050565b815160009081805b8251811015610fc257828181518110610f9757634e487b7160e01b600052603260045260246000fd5b60200260200101516020015182610fae9190612639565b915080610fba81612724565b915050610f6e565b508061ffff1661271014610fe85760405162461bcd60e51b815260040161012f906124b1565b6000805b86515181101561108d5760006110318860000151838151811061101f57634e487b7160e01b600052603260045260246000fd5b60200260200101516020015188610e33565b905061106d8860000151838151811061105a57634e487b7160e01b600052603260045260246000fd5b60200260200101518960200151836110d0565b6110779084612662565b925050808061108590612724565b915050610fec565b5095945050505050565b606083156110a6575081610e2c565b8251156110b65782518084602001fd5b8160405162461bcd60e51b815260040161012f9190612450565b825160009060ff166110ee576110e7848484611128565b9050610e2c565b6110f98484846113ef565b60018151811061111957634e487b7160e01b600052603260045260246000fd5b60200260200101519050610e2c565b600254835160405163cac73ed760e01b815260009283926001600160a01b039091169163cac73ed79161115d916004016125ec565b60206040518083038186803b15801561117557600080fd5b505afa158015611189573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ad9190611b90565b905060008190506111e7856000815181106111d857634e487b7160e01b600052603260045260246000fd5b6020026020010151828661153e565b60025485516000916001600160a01b03169063fee99898908890849061121d57634e487b7160e01b600052603260045260246000fd5b60200260200101518860018151811061124657634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b815260040161126b92919061241a565b60206040518083038186803b15801561128357600080fd5b505afa158015611297573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112bb9190611d32565b9050816001600160a01b031663414bf389604051806101000160405280896000815181106112f957634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031681526020018960018151811061133057634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031681526020018462ffffff168152602001306001600160a01b031681526020014281526020018881526020016000815260200160006001600160a01b03168152506040518263ffffffff1660e01b815260040161139d9190612531565b602060405180830381600087803b1580156113b757600080fd5b505af11580156113cb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5b9190611d50565b600254835160405163cac73ed760e01b81526060926000926001600160a01b039091169163cac73ed791611425916004016125ec565b60206040518083038186803b15801561143d57600080fd5b505afa158015611451573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114759190611b90565b90506114aa8460008151811061149b57634e487b7160e01b600052603260045260246000fd5b6020026020010151828561153e565b6040516338ed173960e01b81526001600160a01b038216906338ed1739906114df90869060019089903090429060040161255f565b600060405180830381600087803b1580156114f957600080fd5b505af115801561150d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526115359190810190611c2b565b95945050505050565b60405163095ea7b360e01b81526001600160a01b0384169063095ea7b39061156c9085908590600401612435565b602060405180830381600087803b15801561158657600080fd5b505af115801561159a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115be9190611c5f565b6107015760405162461bcd60e51b815260040161012f906124d1565b60006115ed6115e884612616565b6125fa565b9050808382526020820190508285602086028201111561160c57600080fd5b60005b85811015611638578161162288826117d7565b845250602092830192919091019060010161160f565b5050509392505050565b60006116506115e884612616565b9050808382526020820190508285602086028201111561166f57600080fd5b60005b858110156116385781356001600160401b0381111561169057600080fd5b80860161169d8982611a4c565b855250506020928301929190910190600101611672565b60006116c26115e884612616565b905080838252602082019050828560208602820111156116e157600080fd5b60005b858110156116385781356001600160401b0381111561170257600080fd5b80860161170f8982611ac0565b8552505060209283019291909101906001016116e4565b60006117346115e884612616565b8381529050602081018260408502810186101561175057600080fd5b60005b8581101561163857816117668882611b11565b84525060209092019160409190910190600101611753565b600061178c6115e884612616565b905080838252602082019050828560208602820111156117ab57600080fd5b60005b8581101561163857816117c18882611b5c565b84525060209283019291909101906001016117ae565b80356117e281612781565b92915050565b80516117e281612781565b600082601f83011261180457600080fd5b81356118148482602086016115da565b949350505050565b600082601f83011261182d57600080fd5b8135611814848260208601611642565b600082601f83011261184e57600080fd5b81356118148482602086016116b4565b600082601f83011261186f57600080fd5b8135611814848260208601611726565b600082601f83011261189057600080fd5b815161181484826020860161177e565b80516117e281612795565b60008083601f8401126118bd57600080fd5b5081356001600160401b038111156118d457600080fd5b6020830191508360018202830111156118ec57600080fd5b9250929050565b80356117e28161279d565b600060a0828403121561191057600080fd5b61191a60a06125fa565b9050600061192884846117d7565b8252506020611939848483016117d7565b602083015250604061194d84828501611b51565b60408301525060608201356001600160401b0381111561196c57600080fd5b6119788482850161183d565b60608301525060808201356001600160401b0381111561199757600080fd5b6119a38482850161183d565b60808301525092915050565b6000608082840312156119c157600080fd5b6119cb60806125fa565b905060006119d984846117d7565b82525060206119ea84848301611b51565b60208301525060408201356001600160401b03811115611a0957600080fd5b611a158482850161183d565b60408301525060608201356001600160401b03811115611a3457600080fd5b611a408482850161183d565b60608301525092915050565b600060408284031215611a5e57600080fd5b611a6860406125fa565b905081356001600160401b03811115611a8057600080fd5b611a8c8482850161185e565b82525060208201356001600160401b03811115611aa857600080fd5b611ab4848285016117f3565b60208301525092915050565b600060408284031215611ad257600080fd5b611adc60406125fa565b905081356001600160401b03811115611af457600080fd5b611b008482850161181c565b8252506020611ab484848301611b3b565b600060408284031215611b2357600080fd5b611b2d60406125fa565b90506000611b008484611b67565b80356117e2816127a6565b80516117e2816127b0565b80356117e2816127bb565b80516117e2816127bb565b80356117e2816127c1565b600060208284031215611b8457600080fd5b600061181484846117d7565b600060208284031215611ba257600080fd5b600061181484846117e8565b600080600080600060808688031215611bc657600080fd5b6000611bd288886117d7565b9550506020611be388828901611b51565b9450506040611bf488828901611b51565b93505060608601356001600160401b03811115611c1057600080fd5b611c1c888289016118ab565b92509250509295509295909350565b600060208284031215611c3d57600080fd5b81516001600160401b03811115611c5357600080fd5b6118148482850161187f565b600060208284031215611c7157600080fd5b600061181484846118a0565b600080600060608486031215611c9257600080fd5b6000611c9e86866118f3565b9350506020611caf868287016117d7565b9250506040611cc086828701611b51565b9150509250925092565b600060208284031215611cdc57600080fd5b81356001600160401b03811115611cf257600080fd5b611814848285016118fe565b600060208284031215611d1057600080fd5b81356001600160401b03811115611d2657600080fd5b611814848285016119af565b600060208284031215611d4457600080fd5b60006118148484611b46565b600060208284031215611d6257600080fd5b60006118148484611b5c565b6000611d7a8383611dae565b505060200190565b6000610e2c8383612342565b6000610e2c8383612374565b6000611da683836123a9565b505060400190565b611db7816126a8565b82525050565b6000611dc7825190565b80845260209384019383018060005b83811015611dfb578151611dea8882611d6e565b975060208301925050600101611dd6565b509495945050505050565b6000611e10825190565b80845260209384019383018060005b83811015611dfb578151611e338882611d6e565b975060208301925050600101611e1f565b6000611e4e825190565b80845260208401935083602082028501611e688560200190565b8060005b85811015611e9d5784840389528151611e858582611d82565b94506020830160209a909a0199925050600101611e6c565b5091979650505050505050565b6000611eb4825190565b80845260208401935083602082028501611ece8560200190565b8060005b85811015611e9d5784840389528151611eeb8582611d8e565b94506020830160209a909a0199925050600101611ed2565b6000611f0d825190565b80845260209384019383018060005b83811015611dfb578151611f308882611d9a565b975060208301925050600101611f1c565b6000611f4b825190565b808452602084019350611f628185602086016126cc565b601f01601f19169290920192915050565b6000611f7d825190565b611f8b8185602086016126cc565b9290920192915050565b611db7816126c4565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015291505b5060400190565b601b81526000602082017f4661696c656420746f20626f72726f77206c6f616e20746f6b656e0000000000815291505b5060200190565b602681526000602082017f416464726573733a20696e73756666696369656e742062616c616e636520666f8152651c8818d85b1b60d21b60208201529150611fdd565b601081526000602082016f2737ba1032b737bab3b4103a37b5b2b760811b81529150612014565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657291019081526000612014565b600f81526000602082016e29bbb0b8103830b93a1032b93937b960891b81529150612014565b60208082527f4e6f7420656e6f75676820616d6f756e7420746f2072657475726e206c6f616e91019081526000612014565b600f81526000602082016e30b8383937bb32903330b4b632b21760891b81529150612014565b601d81526000602082017f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000081529150612014565b601c81526000602082017f57726f6e6720666c6173686c6f616e20706f6f6c20616464726573730000000081529150612014565b602a81526000602082017f5361666545524332303a204552433230206f7065726174696f6e20646964206e8152691bdd081cdd58d8d9595960b21b60208201529150611fdd565b601f81526000602082017f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081529150612014565b601081526000602082016f2937baba32903830b93a1032b93937b960811b81529150612014565b80516101008301906122518482611dae565b5060208201516122646020850182611dae565b50604082015161227760408501826123e6565b50606082015161228a6060850182611dae565b50608082015161229d60808501826123f1565b5060a08201516122b060a08501826123f1565b5060c08201516122c360c08501826123f1565b5060e0820151610ea760e08501826123cd565b805160009060a08401906122ea8582611dae565b5060208301516122fd6020860182611dae565b50604083015161231060408601826123f1565b50606083015184820360608601526123288282611eaa565b915050608083015184820360808601526115358282611eaa565b805160408084526000919084019061235a8282611f03565b915050602083015184820360208601526115358282611dbd565b805160408084526000919084019061238c8282611e44565b91505060208301516123a160208601826123dc565b509392505050565b805160408301906123ba84826123f7565b506020820151610ea760208501826123dc565b6001600160a01b038116611db7565b61ffff8116611db7565b62ffffff8116611db7565b80611db7565b60ff8116611db7565b6000610e2c8284611f73565b602081016117e28284611dae565b604081016124288285611dae565b610e2c6020830184611dae565b604081016124438285611dae565b610e2c60208301846123f1565b60208082528101610e2c8184611f41565b602080825281016117e281611f9e565b602080825281016117e281611fe4565b602080825281016117e28161201b565b602080825281016117e28161205e565b602080825281016117e281612085565b602080825281016117e2816120b7565b602080825281016117e2816120dd565b602080825281016117e28161210f565b602080825281016117e281612135565b602080825281016117e281612169565b602080825281016117e28161219d565b602080825281016117e2816121e4565b602080825281016117e281612218565b61010081016117e2828461223f565b60208082528101610e2c81846122d6565b602081016117e282846123f1565b60a0810161256d82886123f1565b61257a6020830187611f95565b818103604083015261258c8186611e06565b905061259b6060830185611dae565b6125a860808301846123f1565b9695505050505050565b608081016125c082876123f1565b6125cd60208301866123f1565b6125da6040830185611dae565b81810360608301526125a88184611f41565b602081016117e282846123f7565b600061260560405190565b905061261182826126f8565b919050565b60006001600160401b0382111561262f5761262f61276b565b5060209081020190565b600061ffff8216915061ffff831692508261ffff0382111561265d5761265d61273f565b500190565b6000821982111561265d5761265d61273f565b60008261268457612684612755565b500490565b60008160001904831182151516156126a3576126a361273f565b500290565b60006001600160a01b0382166117e2565b60006117e2826126a8565b6000816117e2565b60005b838110156126e75781810151838201526020016126cf565b83811115610ea75750506000910152565b601f19601f83011681018181106001600160401b038211171561271d5761271d61276b565b6040525050565b60006000198214156127385761273861273f565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b61278a816126a8565b81146106a857600080fd5b80151561278a565b61278a816126b9565b61ffff811661278a565b62ffffff811661278a565b8061278a565b60ff811661278a56fea2646970667358221220a1126c40d87a0f483f8db00cd927a88c3e33e70a5af75203a4ef212853e78c0064736f6c63430008040033000000000000000000000000112aae1218e91392293cb3e63d4f9e7c9c376d2c

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