Contract 0x41A57F5581aDf11b25F3eDb7C1DB19f18bb76734

 

Contract Overview

Aztec: Fee Distributor
Balance:
4.807539528854932297 Ether

EtherValue:
$16,997.15 (@ $3,535.52/ETH)

Token:
Ad
Crypto.com
Txn Hash Method
Block
From
To
Value
0xda5fd4b4a51909b7f20e990ac310e68a0d79fc3a7a03401bbd22cc1fc7931ec1Transfer131845532021-09-08 10:27:078 days 21 hrs agoCoinbase 4 IN  Aztec: Fee Distributor2 Ether0.001873727307 88.992035505
0x3248ef946d4150aa2abeab8d434c751b4859536084ae55234af93471fc3a0da7Transfer131645972021-09-05 8:17:1111 days 23 hrs agoCoinbase 6 IN  Aztec: Fee Distributor2 Ether0.00214236078 101.750690142
0xf1966c7c318072f32ef4ca3fe7d093e60e017fb5fd5011f3328d93e5567383adTransfer131468632021-09-02 14:40:1714 days 17 hrs ago0xfcf75295f242c4e87203abb5d7c9bbeda90a8895 IN  Aztec: Fee Distributor0.3 Ether0.002409908509 114.457777721
0x1aa270ab089eed3666ab731fc0e3880593eec634f11bc75f06166f771a27e74bTransfer130184822021-08-13 18:31:1334 days 13 hrs agoCoinbase 4 IN  Aztec: Fee Distributor2 Ether0.001271569903 60.392776217
0xa9e370f7009189b0fa6fa34abd12c87204fb0bd2b6e1471b7c469f15e838a2ebTransfer130181002021-08-13 17:07:3234 days 14 hrs ago0xfcf75295f242c4e87203abb5d7c9bbeda90a8895 IN  Aztec: Fee Distributor0.3 Ether0.00132646563
0x0bd546277bc72d2b406f2dc67cbcf1c66788e072b50a95899daf91899475fcaeTransfer129897382021-08-09 8:06:2038 days 23 hrs ago0xfcf75295f242c4e87203abb5d7c9bbeda90a8895 IN  Aztec: Fee Distributor0.5 Ether0.0008843142
0x480f8b68ab55a1e321d9674920b56fc290e0f98b040940ac82253420b8e39fecTransfer124741502021-05-20 23:09:58119 days 8 hrs agoCoinbase 5 IN  Aztec: Fee Distributor3.97904139 Ether0.0019370692
0xdc53179213f9326b3596fd6c74fefd7147dd683c0a93605d2305bbb4bddec611Transfer124598182021-05-18 17:48:25121 days 14 hrs ago0xfcf75295f242c4e87203abb5d7c9bbeda90a8895 IN  Aztec: Fee Distributor0.5 Ether0.00218972104
0xd4699eff50195f42f94114313fb82e7cf5b8371eab97702afda4d3d59fa93debTransfer124258262021-05-13 11:42:49126 days 20 hrs ago0xfcf75295f242c4e87203abb5d7c9bbeda90a8895 IN  Aztec: Fee Distributor0.6 Ether0.00345302164
0x01f3cac02854cedcc6892151759eecfa96f0a72101d7e69571d4f217a8e52e06Transfer124129992021-05-11 11:54:57128 days 19 hrs ago0xfcf75295f242c4e87203abb5d7c9bbeda90a8895 IN  Aztec: Fee Distributor1 Ether0.00560063266
0x9e0239aef2b91562b110f0d859208fa1b6285ac0dd60446a3344d8136735aab7Transfer124129152021-05-11 11:34:42128 days 20 hrs ago0xfbe92fc403af400b5ef2ae579d2e7700e916718d IN  Aztec: Fee Distributor0.81 Ether0.0054743260
0x31a382b83e4dd8b6cd5820416fb154a12e884330121843abb8b64013191fc7360x61010060123303102021-04-28 17:33:51141 days 14 hrs ago0xfcf75295f242c4e87203abb5d7c9bbeda90a8895 IN  Create: AztecFeeDistributor0 Ether0.11875455679.5
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x8fe46c81d77828824e8204dc1cadbea0439f3b33e5d569dc869df610701daa51132403952021-09-17 1:49:046 hrs 5 mins ago Aztec: Fee Distributor0xfcf75295f242c4e87203abb5d7c9bbeda90a88950.049688184075763392 Ether
0x8fe46c81d77828824e8204dc1cadbea0439f3b33e5d569dc869df610701daa51132403952021-09-17 1:49:046 hrs 5 mins ago Aztec: Private Rollup Bridge Aztec: Fee Distributor0.013734 Ether
0x7a8464e4f565d1e98c7a8f4fab3a4330904cfa00ee01cbff66e63692bbe83b65132387342021-09-16 19:44:2412 hrs 10 mins ago Aztec: Fee Distributor0xfcf75295f242c4e87203abb5d7c9bbeda90a88950.106278066701492392 Ether
0x7a8464e4f565d1e98c7a8f4fab3a4330904cfa00ee01cbff66e63692bbe83b65132387342021-09-16 19:44:2412 hrs 10 mins ago Aztec: Private Rollup Bridge Aztec: Fee Distributor0.01724 Ether
0x60ff677ca231c97ccf5263bbc08dc11d8963116a5d2053e1aefcefb120f1677f132368972021-09-16 12:58:4518 hrs 55 mins ago Aztec: Fee Distributor0xfcf75295f242c4e87203abb5d7c9bbeda90a88950.052029697932816288 Ether
0x60ff677ca231c97ccf5263bbc08dc11d8963116a5d2053e1aefcefb120f1677f132368972021-09-16 12:58:4518 hrs 55 mins ago Aztec: Private Rollup Bridge Aztec: Fee Distributor0.029156 Ether
0xa1e863f71672c67aaa380ac8d9f6e6afe3548f3ff452b6de84aeb2d607d1ab9d132359952021-09-16 9:35:2322 hrs 19 mins ago Aztec: Fee Distributor0xfcf75295f242c4e87203abb5d7c9bbeda90a88950.059581831571275676 Ether
0xa1e863f71672c67aaa380ac8d9f6e6afe3548f3ff452b6de84aeb2d607d1ab9d132359952021-09-16 9:35:2322 hrs 19 mins ago Aztec: Private Rollup Bridge Aztec: Fee Distributor0.035697 Ether
0x90b64906eadc7a2b0ea11d4694f27bdb6601cfe0d4e88ccc53aba8ec0c93eec4132343322021-09-16 3:29:461 day 4 hrs ago Aztec: Fee Distributor0xfcf75295f242c4e87203abb5d7c9bbeda90a88950.079855174135076895 Ether
0x90b64906eadc7a2b0ea11d4694f27bdb6601cfe0d4e88ccc53aba8ec0c93eec4132343322021-09-16 3:29:461 day 4 hrs ago Aztec: Private Rollup Bridge Aztec: Fee Distributor0.012264 Ether
0x1118c9f310960db17285c2d198a155f12f2512c1435f6996ef74807832731d7c132327232021-09-15 21:22:351 day 10 hrs ago Aztec: Fee Distributor0xfcf75295f242c4e87203abb5d7c9bbeda90a88950.139868374783024971 Ether
0x1118c9f310960db17285c2d198a155f12f2512c1435f6996ef74807832731d7c132327232021-09-15 21:22:351 day 10 hrs ago Aztec: Private Rollup Bridge Aztec: Fee Distributor0.030345 Ether
0x0acb322a15c9139a64a1cb94c44ea2d0ea6a719458ae4515cce810b7d4539c68132310592021-09-15 15:18:271 day 16 hrs ago Aztec: Fee Distributor0xfcf75295f242c4e87203abb5d7c9bbeda90a88950.084944898307841337 Ether
0x0acb322a15c9139a64a1cb94c44ea2d0ea6a719458ae4515cce810b7d4539c68132310592021-09-15 15:18:271 day 16 hrs ago Aztec: Private Rollup Bridge Aztec: Fee Distributor0.019337 Ether
0x67711c28fe023ada8f3cbca2621ecd38e48c1ce23b76b75190f9178d37777f37132298642021-09-15 10:50:411 day 21 hrs ago 0xe298a76986336686cc3566469e3520d23d1a8aad Aztec: Fee Distributor4 Ether
0xec4255e43ce6e8bf787cb59becac9c1b4270f7f9e5e1fafc40d081c028f43878132298262021-09-15 10:40:481 day 21 hrs ago Aztec: Fee Distributor0xfcf75295f242c4e87203abb5d7c9bbeda90a88950.045769669239703968 Ether
0xec4255e43ce6e8bf787cb59becac9c1b4270f7f9e5e1fafc40d081c028f43878132298262021-09-15 10:40:481 day 21 hrs ago Wrapped Ether Aztec: Fee Distributor0.179669824621742464 Ether
0xec4255e43ce6e8bf787cb59becac9c1b4270f7f9e5e1fafc40d081c028f43878132298262021-09-15 10:40:481 day 21 hrs ago Aztec: Private Rollup Bridge Aztec: Fee Distributor0.02268 Ether
0xb53be8124cee7467d904f77b4993a7d73da6f47de58233ce1f0cb355ac282fc3132281692021-09-15 4:36:282 days 3 hrs ago Aztec: Fee Distributor0xfcf75295f242c4e87203abb5d7c9bbeda90a88950.042393108885929024 Ether
0xb53be8124cee7467d904f77b4993a7d73da6f47de58233ce1f0cb355ac282fc3132281692021-09-15 4:36:282 days 3 hrs ago Aztec: Private Rollup Bridge Aztec: Fee Distributor0.004851 Ether
0x7e011b29a2fb5441a8485c318ed5be8c427150f5b81d268c7eefbf90fb9a9dab132265482021-09-14 22:32:092 days 9 hrs ago Aztec: Fee Distributor0xfcf75295f242c4e87203abb5d7c9bbeda90a88950.052689221626682733 Ether
0x7e011b29a2fb5441a8485c318ed5be8c427150f5b81d268c7eefbf90fb9a9dab132265482021-09-14 22:32:092 days 9 hrs ago Aztec: Private Rollup Bridge Aztec: Fee Distributor0.007728 Ether
0xd3abad3b3307f3ff9950a20180032f63470244156bfac7e7918e8248fe566b0c132249062021-09-14 16:27:532 days 15 hrs ago Aztec: Fee Distributor0xfcf75295f242c4e87203abb5d7c9bbeda90a88950.191633958916838592 Ether
0xd3abad3b3307f3ff9950a20180032f63470244156bfac7e7918e8248fe566b0c132249062021-09-14 16:27:532 days 15 hrs ago Aztec: Private Rollup Bridge Aztec: Fee Distributor0.018558 Ether
0x4b8581aa405a7805eef625c64f2ac680ffecec0ad8dc69fc7847006f3288d23c132232882021-09-14 10:28:112 days 21 hrs ago Aztec: Fee Distributor0xfcf75295f242c4e87203abb5d7c9bbeda90a88950.032762764498932843 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AztecFeeDistributor

Compiler Version
v0.6.10+commit.00c0fcaf

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 13 : AztecFeeDistributor.sol
// SPDX-License-Identifier: GPL-2.0-only
// Copyright 2020 Spilsbury Holdings Ltd
pragma solidity >=0.6.10 <0.8.0;

import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';
import {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';

import {IUniswapV2Router02} from '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol';
import {IUniswapV2Pair} from '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';
import {IWETH} from '@uniswap/v2-periphery/contracts/interfaces/IWETH.sol';
import {UniswapV2Library} from '@uniswap/v2-periphery/contracts/libraries/UniswapV2Library.sol';

import {IFeeDistributor} from './interfaces/IFeeDistributor.sol';
import {IRollupProcessor} from './interfaces/IRollupProcessor.sol';

contract AztecFeeDistributor is IFeeDistributor, Ownable {
    using SafeMath for uint256;

    uint256 constant ethAssetId = 0;

    uint256 public override reimburseConstant = 16 * 14465;
    uint256 public override convertConstant = 157768 * 20; // gas for calling convert() / 5%
    address public immutable override rollupProcessor;
    address public immutable override router;
    address public immutable override factory;
    address public immutable override WETH;

    constructor(address _rollupProcessor, address _router) public {
        rollupProcessor = _rollupProcessor;
        router = _router;
        factory = IUniswapV2Router02(_router).factory();
        WETH = IUniswapV2Router02(_router).WETH();
    }

    receive() external payable {}

    function setReimburseConstant(uint256 _reimburseConstant) external override onlyOwner {
        reimburseConstant = _reimburseConstant;
    }

    function setConvertConstant(uint256 _convertConstant) external override onlyOwner {
        convertConstant = _convertConstant;
    }

    function txFeeBalance(uint256 assetId) public override view returns (uint256) {
        if (assetId == ethAssetId) {
            return address(this).balance;
        } else {
            address assetAddress = IRollupProcessor(rollupProcessor).getSupportedAsset(assetId);
            return IERC20(assetAddress).balanceOf(address(this));
        }
    }

    function deposit(uint256 assetId, uint256 amount) external override payable returns (uint256 depositedAmount) {
        if (assetId == ethAssetId) {
            require(amount == msg.value, 'Fee Distributor: WRONG_AMOUNT');
        } else {
            require(msg.value == 0, 'Fee Distributor: WRONG_PAYMENT_TYPE');

            address assetAddress = IRollupProcessor(rollupProcessor).getSupportedAsset(assetId);
            IERC20(assetAddress).transferFrom(msg.sender, address(this), amount);

            uint256 balance = IERC20(assetAddress).balanceOf(address(this));
            uint256 outputValue = getAmountOut(assetAddress, balance);
            if (outputValue >= convertConstant.mul(tx.gasprice)) {
                swapTokensForETH(assetAddress, balance, outputValue);

                emit Convert(assetId, balance, outputValue);
            }
        }

        depositedAmount = amount;
    }

    function reimburseGas(
        uint256 gasUsed,
        uint256 feeLimit,
        address payable feeReceiver
    ) external override returns (uint256 reimbursement) {
        require(msg.sender == rollupProcessor, 'Fee Distributor: INVALID_CALLER');

        reimbursement = gasUsed.add(reimburseConstant).mul(tx.gasprice);
        require(reimbursement <= feeLimit, 'Fee Distributor: FEE_LIMIT_EXCEEDED');

        (bool success, ) = feeReceiver.call{value: reimbursement}('');
        require(success, 'Fee Distributor: REIMBURSE_GAS_FAILED');

        emit FeeReimbursed(feeReceiver, reimbursement);
    }

    function convert(uint256 assetId, uint256 minOutputValue) public override onlyOwner returns (uint256 outputValue) {
        require(assetId != ethAssetId, 'Fee Distributor: NOT_A_TOKEN_ASSET');

        address assetAddress = IRollupProcessor(rollupProcessor).getSupportedAsset(assetId);
        uint256 inputValue = IERC20(assetAddress).balanceOf(address(this));
        require(inputValue > 0, 'Fee Distributor: EMPTY_BALANCE');

        outputValue = getAmountOut(assetAddress, inputValue);
        require(outputValue >= minOutputValue, 'Fee Distributor: INSUFFICIENT_OUTPUT_AMOUNT');

        swapTokensForETH(assetAddress, inputValue, outputValue);

        emit Convert(assetId, inputValue, outputValue);
    }

    function getAmountOut(address assetAddress, uint256 inputValue) internal view returns (uint256 outputValue) {
        (uint256 reserveIn, uint256 reserveOut) = UniswapV2Library.getReserves(factory, assetAddress, WETH);
        outputValue = UniswapV2Library.getAmountOut(inputValue, reserveIn, reserveOut);
    }

    function swapTokensForETH(
        address assetAddress,
        uint256 inputValue,
        uint256 outputValue
    ) internal {
        address pair = UniswapV2Library.pairFor(factory, assetAddress, WETH);
        (bool success, ) = assetAddress.call(abi.encodeWithSelector(0xa9059cbb, pair, inputValue));
        require(success, 'Fee Distributor: TRANSFER_FAILED');

        (uint256 amountOut0, uint256 amountOut1) = assetAddress < WETH
            ? (uint256(0), outputValue)
            : (outputValue, uint256(0));
        IUniswapV2Pair(pair).swap(amountOut0, amountOut1, address(this), new bytes(0));

        IWETH(WETH).withdraw(outputValue);
    }
}

File 2 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 3 of 13 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), 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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 4 of 13 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
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) {
        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) {
        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) {
        // 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) {
        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) {
        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) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @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) {
        require(b <= a, "SafeMath: subtraction overflow");
        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) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @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. 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) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        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) {
        require(b > 0, "SafeMath: modulo by zero");
        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) {
        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.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * 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) {
        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) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 5 of 13 : IUniswapV2Router02.sol
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 6 of 13 : IUniswapV2Pair.sol
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 7 of 13 : IWETH.sol
pragma solidity >=0.5.0;

interface IWETH {
    function deposit() external payable;
    function transfer(address to, uint value) external returns (bool);
    function withdraw(uint) external;
}

File 8 of 13 : UniswapV2Library.sol
pragma solidity >=0.5.0;

import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';

import "./SafeMath.sol";

library UniswapV2Library {
    using SafeMath for uint;

    // returns sorted token addresses, used to handle return values from pairs sorted in this order
    function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
        require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES');
        (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
        require(token0 != address(0), 'UniswapV2Library: ZERO_ADDRESS');
    }

    // calculates the CREATE2 address for a pair without making any external calls
    function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {
        (address token0, address token1) = sortTokens(tokenA, tokenB);
        pair = address(uint(keccak256(abi.encodePacked(
                hex'ff',
                factory,
                keccak256(abi.encodePacked(token0, token1)),
                hex'96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f' // init code hash
            ))));
    }

    // fetches and sorts the reserves for a pair
    function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {
        (address token0,) = sortTokens(tokenA, tokenB);
        (uint reserve0, uint reserve1,) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB)).getReserves();
        (reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0);
    }

    // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
    function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {
        require(amountA > 0, 'UniswapV2Library: INSUFFICIENT_AMOUNT');
        require(reserveA > 0 && reserveB > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
        amountB = amountA.mul(reserveB) / reserveA;
    }

    // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {
        require(amountIn > 0, 'UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT');
        require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
        uint amountInWithFee = amountIn.mul(997);
        uint numerator = amountInWithFee.mul(reserveOut);
        uint denominator = reserveIn.mul(1000).add(amountInWithFee);
        amountOut = numerator / denominator;
    }

    // given an output amount of an asset and pair reserves, returns a required input amount of the other asset
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) {
        require(amountOut > 0, 'UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT');
        require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
        uint numerator = reserveIn.mul(amountOut).mul(1000);
        uint denominator = reserveOut.sub(amountOut).mul(997);
        amountIn = (numerator / denominator).add(1);
    }

    // performs chained getAmountOut calculations on any number of pairs
    function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) {
        require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
        amounts = new uint[](path.length);
        amounts[0] = amountIn;
        for (uint i; i < path.length - 1; i++) {
            (uint reserveIn, uint reserveOut) = getReserves(factory, path[i], path[i + 1]);
            amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut);
        }
    }

    // performs chained getAmountIn calculations on any number of pairs
    function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) {
        require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
        amounts = new uint[](path.length);
        amounts[amounts.length - 1] = amountOut;
        for (uint i = path.length - 1; i > 0; i--) {
            (uint reserveIn, uint reserveOut) = getReserves(factory, path[i - 1], path[i]);
            amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut);
        }
    }
}

File 9 of 13 : IFeeDistributor.sol
// SPDX-License-Identifier: GPL-2.0-only
// Copyright 2020 Spilsbury Holdings Ltd
pragma solidity >=0.6.10 <0.8.0;

interface IFeeDistributor {
    event FeeReimbursed(address receiver, uint256 amount);
    event Convert(uint256 assetId, uint256 inputValue, uint256 outputValue);

    function reimburseConstant() external pure returns (uint256);

    function convertConstant() external pure returns (uint256);

    function rollupProcessor() external pure returns (address);

    function router() external pure returns (address);

    function factory() external pure returns (address);

    function WETH() external pure returns (address);

    function setReimburseConstant(uint256 _reimburseConstant) external;

    function setConvertConstant(uint256 _convertConstant) external;

    function txFeeBalance(uint256 assetId) external view returns (uint256);

    function deposit(uint256 assetId, uint256 amount) external payable returns (uint256 depositedAmount);

    function reimburseGas(
        uint256 gasUsed,
        uint256 feeLimit,
        address payable feeReceiver
    ) external returns (uint256 reimbursement);

    function convert(uint256 assetId, uint256 minOutputValue) external returns (uint256 outputValue);
}

File 10 of 13 : IRollupProcessor.sol
// SPDX-License-Identifier: GPL-2.0-only
// Copyright 2020 Spilsbury Holdings Ltd
pragma solidity >=0.6.10 <0.8.0;

interface IRollupProcessor {
    function feeDistributor() external view returns (address);

    function escapeHatch(
        bytes calldata proofData,
        bytes calldata signatures,
        bytes calldata viewingKeys
    ) external;

    function processRollup(
        bytes calldata proofData,
        bytes calldata signatures,
        bytes calldata viewingKeys,
        bytes calldata providerSignature,
        address provider,
        address payable feeReceiver,
        uint256 feeLimit
    ) external;

    function depositPendingFunds(
        uint256 assetId,
        uint256 amount,
        address owner
    ) external payable;

    function depositPendingFundsPermit(
        uint256 assetId,
        uint256 amount,
        address owner,
        address spender,
        uint256 permitApprovalAmount,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    function setRollupProvider(address provderAddress, bool valid) external;

    function approveProof(bytes32 _proofHash) external;

    function setFeeDistributor(address feeDistributorAddress) external;

    function setVerifier(address verifierAddress) external;

    function setSupportedAsset(address linkedToken, bool supportsPermit) external;

    function setAssetPermitSupport(uint256 assetId, bool supportsPermit) external;

    function getSupportedAsset(uint256 assetId) external view returns (address);

    function getSupportedAssets() external view returns (address[] memory);

    function getTotalDeposited() external view returns (uint256[] memory);

    function getTotalWithdrawn() external view returns (uint256[] memory);

    function getTotalPendingDeposit() external view returns (uint256[] memory);

    function getTotalFees() external view returns (uint256[] memory);

    function getAssetPermitSupport(uint256 assetId) external view returns (bool);

    function getEscapeHatchStatus() external view returns (bool, uint256);

    function getUserPendingDeposit(uint256 assetId, address userAddress) external view returns (uint256);
}

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

pragma solidity >=0.6.0 <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 GSN 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 payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 12 of 13 : IUniswapV2Router01.sol
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 13 of 13 : SafeMath.sol
pragma solidity >=0.6.6;

// a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math)

library SafeMath {
    function add(uint x, uint y) internal pure returns (uint z) {
        require((z = x + y) >= x, 'ds-math-add-overflow');
    }

    function sub(uint x, uint y) internal pure returns (uint z) {
        require((z = x - y) <= x, 'ds-math-sub-underflow');
    }

    function mul(uint x, uint y) internal pure returns (uint z) {
        require(y == 0 || (z = x * y) / y == x, 'ds-math-mul-overflow');
    }
}

Settings
{
  "evmVersion": "istanbul",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_rollupProcessor","type":"address"},{"internalType":"address","name":"_router","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"assetId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"inputValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"outputValue","type":"uint256"}],"name":"Convert","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FeeReimbursed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assetId","type":"uint256"},{"internalType":"uint256","name":"minOutputValue","type":"uint256"}],"name":"convert","outputs":[{"internalType":"uint256","name":"outputValue","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"convertConstant","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assetId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"depositedAmount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reimburseConstant","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gasUsed","type":"uint256"},{"internalType":"uint256","name":"feeLimit","type":"uint256"},{"internalType":"address payable","name":"feeReceiver","type":"address"}],"name":"reimburseGas","outputs":[{"internalType":"uint256","name":"reimbursement","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rollupProcessor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_convertConstant","type":"uint256"}],"name":"setConvertConstant","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_reimburseConstant","type":"uint256"}],"name":"setReimburseConstant","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"assetId","type":"uint256"}],"name":"txFeeBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

61010060405262038810600155623025a06002553480156200002057600080fd5b5060405162001af538038062001af5833981810160405260408110156200004657600080fd5b5080516020909101516000620000646001600160e01b03620001cf16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160601b0319606083811b821660805282901b1660a0526040805163c45a015560e01b815290516001600160a01b0383169163c45a0155916004808301926020929190829003018186803b1580156200010957600080fd5b505afa1580156200011e573d6000803e3d6000fd5b505050506040513d60208110156200013557600080fd5b505160601b6001600160601b03191660c052604080516315ab88c960e31b815290516001600160a01b0383169163ad5c4648916004808301926020929190829003018186803b1580156200018857600080fd5b505afa1580156200019d573d6000803e3d6000fd5b505050506040513d6020811015620001b457600080fd5b505160601b6001600160601b03191660e05250620001d39050565b3390565b60805160601c60a05160601c60c05160601c60e05160601c6118ae6200024760003980610a495280610f515280610fb65280611119528061124e525080610a6d5280610f2f5280610f94525080610e43525080610315528061034a5280610510528061084f5280610b3652506118ae6000f3fe6080604052600436106100ec5760003560e01c80638da5cb5b1161008a578063c746d1d011610059578063c746d1d014610293578063e2bbb158146102a8578063f2fde38b146102cb578063f887ea40146102fe576100f3565b80638da5cb5b1461022457806396e4ee3d14610239578063ad5c464814610269578063c45a01551461027e576100f3565b80636b426d66116100c65780636b426d661461018f578063715018a6146101b95780637827524b146101d057806386a88da2146101fa576100f3565b80632a113d6e146100f857806349a695081461012957806356aa719914610150576100f3565b366100f357005b600080fd5b34801561010457600080fd5b5061010d610313565b604080516001600160a01b039092168252519081900360200190f35b34801561013557600080fd5b5061013e610337565b60408051918252519081900360200190f35b34801561015c57600080fd5b5061013e6004803603606081101561017357600080fd5b50803590602081013590604001356001600160a01b031661033d565b34801561019b57600080fd5b5061013e600480360360208110156101b257600080fd5b50356104fe565b3480156101c557600080fd5b506101ce610622565b005b3480156101dc57600080fd5b506101ce600480360360208110156101f357600080fd5b50356106ce565b34801561020657600080fd5b506101ce6004803603602081101561021d57600080fd5b5035610735565b34801561023057600080fd5b5061010d61079c565b34801561024557600080fd5b5061013e6004803603604081101561025c57600080fd5b50803590602001356107ab565b34801561027557600080fd5b5061010d610a47565b34801561028a57600080fd5b5061010d610a6b565b34801561029f57600080fd5b5061013e610a8f565b61013e600480360360408110156102be57600080fd5b5080359060200135610a95565b3480156102d757600080fd5b506101ce600480360360208110156102ee57600080fd5b50356001600160a01b0316610d3f565b34801561030a57600080fd5b5061010d610e41565b7f000000000000000000000000000000000000000000000000000000000000000081565b60015481565b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103bc576040805162461bcd60e51b815260206004820152601f60248201527f466565204469737472696275746f723a20494e56414c49445f43414c4c455200604482015290519081900360640190fd5b6103e13a6103d560015487610e6590919063ffffffff16565b9063ffffffff610ec816565b9050828111156104225760405162461bcd60e51b815260040180806020018281038252602381526020018061182b6023913960400191505060405180910390fd5b6040516000906001600160a01b0384169083908381818185875af1925050503d806000811461046d576040519150601f19603f3d011682016040523d82523d6000602084013e610472565b606091505b50509050806104b25760405162461bcd60e51b81526004018080602001828103825260258152602001806117c56025913960400191505060405180910390fd5b604080516001600160a01b03851681526020810184905281517fcf4cc329b7982381c7a729b04a403439bbef0749b4a8dbd2a3850218b420bd87929181900390910190a1509392505050565b60008161050c57504761061d565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166360a8b18a846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561057257600080fd5b505afa158015610586573d6000803e3d6000fd5b505050506040513d602081101561059c57600080fd5b5051604080516370a0823160e01b815230600482015290519192506001600160a01b038316916370a0823191602480820192602092909190829003018186803b1580156105e857600080fd5b505afa1580156105fc573d6000803e3d6000fd5b505050506040513d602081101561061257600080fd5b5051915061061d9050565b919050565b61062a610f21565b6001600160a01b031661063b61079c565b6001600160a01b031614610684576040805162461bcd60e51b8152602060048201819052602482015260008051602061180b833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6106d6610f21565b6001600160a01b03166106e761079c565b6001600160a01b031614610730576040805162461bcd60e51b8152602060048201819052602482015260008051602061180b833981519152604482015290519081900360640190fd5b600155565b61073d610f21565b6001600160a01b031661074e61079c565b6001600160a01b031614610797576040805162461bcd60e51b8152602060048201819052602482015260008051602061180b833981519152604482015290519081900360640190fd5b600255565b6000546001600160a01b031690565b60006107b5610f21565b6001600160a01b03166107c661079c565b6001600160a01b03161461080f576040805162461bcd60e51b8152602060048201819052602482015260008051602061180b833981519152604482015290519081900360640190fd5b8261084b5760405162461bcd60e51b81526004018080602001828103825260228152602001806116e26022913960400191505060405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166360a8b18a856040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156108b157600080fd5b505afa1580156108c5573d6000803e3d6000fd5b505050506040513d60208110156108db57600080fd5b5051604080516370a0823160e01b815230600482015290519192506000916001600160a01b038416916370a08231916024808301926020929190829003018186803b15801561092957600080fd5b505afa15801561093d573d6000803e3d6000fd5b505050506040513d602081101561095357600080fd5b50519050806109a9576040805162461bcd60e51b815260206004820152601e60248201527f466565204469737472696275746f723a20454d5054595f42414c414e43450000604482015290519081900360640190fd5b6109b38282610f25565b9250838310156109f45760405162461bcd60e51b815260040180806020018281038252602b815260200180611772602b913960400191505060405180910390fd5b6109ff828285610f8d565b604080518681526020810183905280820185905290517f4ce95f38741cee3ff8dbe0e93f4d495736f717646b07bdc0c17fc43549c34e4f9181900360600190a1505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60025481565b600082610af557348214610af0576040805162461bcd60e51b815260206004820152601d60248201527f466565204469737472696275746f723a2057524f4e475f414d4f554e54000000604482015290519081900360640190fd5b610d39565b3415610b325760405162461bcd60e51b815260040180806020018281038252602381526020018061172a6023913960400191505060405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166360a8b18a856040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610b9857600080fd5b505afa158015610bac573d6000803e3d6000fd5b505050506040513d6020811015610bc257600080fd5b5051604080516323b872dd60e01b81523360048201523060248201526044810186905290519192506001600160a01b038316916323b872dd916064808201926020929091908290030181600087803b158015610c1d57600080fd5b505af1158015610c31573d6000803e3d6000fd5b505050506040513d6020811015610c4757600080fd5b5050604080516370a0823160e01b815230600482015290516000916001600160a01b038416916370a0823191602480820192602092909190829003018186803b158015610c9357600080fd5b505afa158015610ca7573d6000803e3d6000fd5b505050506040513d6020811015610cbd57600080fd5b505190506000610ccd8383610f25565b600254909150610ce3903a63ffffffff610ec816565b8110610d3557610cf4838383610f8d565b604080518781526020810184905280820183905290517f4ce95f38741cee3ff8dbe0e93f4d495736f717646b07bdc0c17fc43549c34e4f9181900360600190a15b5050505b50919050565b610d47610f21565b6001600160a01b0316610d5861079c565b6001600160a01b031614610da1576040805162461bcd60e51b8152602060048201819052602482015260008051602061180b833981519152604482015290519081900360640190fd5b6001600160a01b038116610de65760405162461bcd60e51b81526004018080602001828103825260268152602001806117046026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b7f000000000000000000000000000000000000000000000000000000000000000081565b600082820183811015610ebf576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b600082610ed757506000610ec2565b82820282848281610ee457fe5b0414610ebf5760405162461bcd60e51b81526004018080602001828103825260218152602001806117ea6021913960400191505060405180910390fd5b3390565b6000806000610f757f0000000000000000000000000000000000000000000000000000000000000000867f00000000000000000000000000000000000000000000000000000000000000006112d3565b91509150610f848483836113a1565b95945050505050565b6000610fda7f0000000000000000000000000000000000000000000000000000000000000000857f0000000000000000000000000000000000000000000000000000000000000000611491565b604080516001600160a01b038084166024830152604480830188905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182519495506000949189169390918291908083835b602083106110575780518252601f199092019160209182019101611038565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146110b9576040519150601f19603f3d011682016040523d82523d6000602084013e6110be565b606091505b5050905080611114576040805162461bcd60e51b815260206004820181905260248201527f466565204469737472696275746f723a205452414e534645525f4641494c4544604482015290519081900360640190fd5b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316876001600160a01b0316106111585784600061115c565b6000855b604080516000808252602082019283905263022c0d9f60e01b835260248201858152604483018590523060648401819052608060848501908152845160a486018190529799509597506001600160a01b038b169663022c0d9f968a968a969395939493919260c48601928190849084905b838110156111e55781810151838201526020016111cd565b50505050905090810190601f1680156112125780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561123457600080fd5b505af1158015611248573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d866040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156112b257600080fd5b505af11580156112c6573d6000803e3d6000fd5b5050505050505050505050565b60008060006112e28585611551565b5090506000806112f3888888611491565b6001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561132b57600080fd5b505afa15801561133f573d6000803e3d6000fd5b505050506040513d606081101561135557600080fd5b5080516020909101516dffffffffffffffffffffffffffff91821693501690506001600160a01b038781169084161461138f578082611392565b81815b90999098509650505050505050565b60008084116113e15760405162461bcd60e51b815260040180806020018281038252602b81526020018061184e602b913960400191505060405180910390fd5b6000831180156113f15750600082115b61142c5760405162461bcd60e51b815260040180806020018281038252602881526020018061179d6028913960400191505060405180910390fd5b6000611440856103e563ffffffff61162f16565b90506000611454828563ffffffff61162f16565b9050600061147a8361146e886103e863ffffffff61162f16565b9063ffffffff61169216565b905080828161148557fe5b04979650505050505050565b60008060006114a08585611551565b604080516bffffffffffffffffffffffff19606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501206001600160f81b031960688401529a90941b9093166069840152607d8301989098527f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b600080826001600160a01b0316846001600160a01b031614156115a55760405162461bcd60e51b815260040180806020018281038252602581526020018061174d6025913960400191505060405180910390fd5b826001600160a01b0316846001600160a01b0316106115c55782846115c8565b83835b90925090506001600160a01b038216611628576040805162461bcd60e51b815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f414444524553530000604482015290519081900360640190fd5b9250929050565b600081158061164a5750508082028282828161164757fe5b04145b610ec2576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6d756c2d6f766572666c6f7760601b604482015290519081900360640190fd5b80820182811015610ec2576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b604482015290519081900360640190fdfe466565204469737472696275746f723a204e4f545f415f544f4b454e5f41535345544f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373466565204469737472696275746f723a2057524f4e475f5041594d454e545f54595045556e697377617056324c6962726172793a204944454e544943414c5f414444524553534553466565204469737472696275746f723a20494e53554646494349454e545f4f55545055545f414d4f554e54556e697377617056324c6962726172793a20494e53554646494349454e545f4c4951554944495459466565204469737472696275746f723a205245494d42555253455f4741535f4641494c4544536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572466565204469737472696275746f723a204645455f4c494d49545f4558434545444544556e697377617056324c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e54a2646970667358221220f968829c6f6760eb3d7db7c6cf0da404baab6c6868cdfc9a2307b64c5f3f5d9564736f6c634300060a0033000000000000000000000000737901bea3eeb88459df9ef1be8ff3ae1b42a2ba0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d

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

000000000000000000000000737901bea3eeb88459df9ef1be8ff3ae1b42a2ba0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d

-----Decoded View---------------
Arg [0] : _rollupProcessor (address): 0x737901bea3eeb88459df9ef1be8ff3ae1b42a2ba
Arg [1] : _router (address): 0x7a250d5630b4cf539739df2c5dacb4c659f2488d

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000737901bea3eeb88459df9ef1be8ff3ae1b42a2ba
Arg [1] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d


Block Transaction Difficulty Gas Used Reward
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.