Contract 0xc693C8AAD9745588e95995fef4570d6DcEF98000 2

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x49a03a945046591a0ba69e363df50df4bc9c81ca246812bf00d9d1801b554aa9Set Aggregator20193672022-06-14 9:25:0659 days 12 hrs ago0x0132613b3a1061816f4661ad301612910e3cce0b IN  0xc693c8aad9745588e95995fef4570d6dcef980000 MOVR0.‍000051424
0x5f96cd3e3985a25e5f59788c385b7cebdeceb6a0a47ccf0f8db171e74d995f9dSet Router20193652022-06-14 9:24:4259 days 12 hrs ago0x0132613b3a1061816f4661ad301612910e3cce0b IN  0xc693c8aad9745588e95995fef4570d6dcef980000 MOVR0.‍000050634
0x6211ccbcc1a66ce8705ae3a2278eba679312714028794489e23d3ea3f312d932Set Router20193632022-06-14 9:24:1859 days 12 hrs ago0x0132613b3a1061816f4661ad301612910e3cce0b IN  0xc693c8aad9745588e95995fef4570d6dcef980000 MOVR0.‍000050634
0xecad4eb29ab7497572df51182ed374c23e112a7e54dccd051b0dc3dd8b61baf00x6080604020193552022-06-14 9:22:3059 days 12 hrs ago0x0132613b3a1061816f4661ad301612910e3cce0b IN  Create: Multicaller0 MOVR0.‍001604692
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x319e49987250f03b952f1be94062aa3238da554471b9a9adcc673eab4b0837dd23665132022-08-12 14:25:007 hrs 42 mins ago 0xc693c8aad9745588e95995fef4570d6dcef980000x3d158702f35e383395b3d1d94cd9279ed46d92792.‍898675758532163691 MOVR
0x319e49987250f03b952f1be94062aa3238da554471b9a9adcc673eab4b0837dd23665132022-08-12 14:25:007 hrs 42 mins ago Solarbeam: Solar Router 0xc693c8aad9745588e95995fef4570d6dcef980002.‍898675758532163691 MOVR
0x5d6011ab7c4131dc829ab522190f8a27f4d0df3d695f6fc57b489f5647d2f00623643902022-08-12 5:40:3016 hrs 26 mins ago 0xc693c8aad9745588e95995fef4570d6dcef980000x3d158702f35e383395b3d1d94cd9279ed46d92791.‍377738097695057846 MOVR
0x5d6011ab7c4131dc829ab522190f8a27f4d0df3d695f6fc57b489f5647d2f00623643902022-08-12 5:40:3016 hrs 26 mins ago Solarbeam: Solar Router 0xc693c8aad9745588e95995fef4570d6dcef980001.‍377738097695057846 MOVR
0xc54ef821160483ad9deba8cc2a1684ac644628cef07d1e2fc7c1c6f96996594023358932022-08-07 9:58:305 days 12 hrs ago 0xc693c8aad9745588e95995fef4570d6dcef980000xf87687e2bac4e2a4a15cd3944d2cd5d46d07f4b50.‍048143928031028295 MOVR
0xc54ef821160483ad9deba8cc2a1684ac644628cef07d1e2fc7c1c6f96996594023358932022-08-07 9:58:305 days 12 hrs ago Solarbeam: Solar Router 0xc693c8aad9745588e95995fef4570d6dcef980000.‍048143928031028295 MOVR
0x61f6f7780162fa890deff7410c3286a0df134d5edc2580c88b7373232ae1de3123275742022-08-05 23:16:126 days 22 hrs ago 0xc693c8aad9745588e95995fef4570d6dcef980000x56aa4fb42f77faa81b5ca0d2b3cab33f808996486.‍259644392633083842 MOVR
0x61f6f7780162fa890deff7410c3286a0df134d5edc2580c88b7373232ae1de3123275742022-08-05 23:16:126 days 22 hrs ago Solarbeam: Solar Router 0xc693c8aad9745588e95995fef4570d6dcef980006.‍259644392633083842 MOVR
0xd495d0647eb8981a2bc69490556aa854c0e7902b025dfc2c7ef3b7733931e7c223272692022-08-05 21:58:487 days 8 mins ago 0xc693c8aad9745588e95995fef4570d6dcef980000x56aa4fb42f77faa81b5ca0d2b3cab33f8089964810.‍432368747723496787 MOVR
0xd495d0647eb8981a2bc69490556aa854c0e7902b025dfc2c7ef3b7733931e7c223272692022-08-05 21:58:487 days 8 mins ago Solarbeam: Solar Router 0xc693c8aad9745588e95995fef4570d6dcef9800010.‍432368747723496787 MOVR
0xf17d361d6ea1cee54735fc1adf4b233c0d34aacee1a51b498eb6c0b9be5ce55d23243522022-08-05 9:15:367 days 12 hrs ago 0xc693c8aad9745588e95995fef4570d6dcef980000x5548be19a291a1dd02c01b1af2ba15a951cfd33d10.‍898421942370510984 MOVR
0xf17d361d6ea1cee54735fc1adf4b233c0d34aacee1a51b498eb6c0b9be5ce55d23243522022-08-05 9:15:367 days 12 hrs ago Solarbeam: Solar Router 0xc693c8aad9745588e95995fef4570d6dcef9800010.‍898421942370510984 MOVR
0xc2f7a0f0efb706eb931c278058809b7b8d6602d59b986480434ac8cc28d74c9523158162022-08-03 20:48:129 days 1 hr ago 0xc693c8aad9745588e95995fef4570d6dcef98000 Solarbeam: Solar Router1.‍6840920035 MOVR
0xc2f7a0f0efb706eb931c278058809b7b8d6602d59b986480434ac8cc28d74c9523158162022-08-03 20:48:129 days 1 hr ago 0x5088be9a441737d019541d75e078bba8ffff2c2a 0xc693c8aad9745588e95995fef4570d6dcef980001.‍6840920035 MOVR
0x5c4d1c8c4e24ff2a8677e755552ddf74e5694f083fc58d56b08904ac4d70fd0323145292022-08-03 15:18:189 days 6 hrs ago 0xc693c8aad9745588e95995fef4570d6dcef98000 Solarbeam: Solar Router0.‍59 MOVR
0x5c4d1c8c4e24ff2a8677e755552ddf74e5694f083fc58d56b08904ac4d70fd0323145292022-08-03 15:18:189 days 6 hrs ago 0x5088be9a441737d019541d75e078bba8ffff2c2a 0xc693c8aad9745588e95995fef4570d6dcef980000.‍59 MOVR
0x611b377c86a3d3cdd94bcb593d2d547b6957f2e1f0648b51a43f740c96a97efa23094072022-08-02 17:03:4810 days 5 hrs ago 0xc693c8aad9745588e95995fef4570d6dcef98000 Solarbeam: Solar Router40 MOVR
0x611b377c86a3d3cdd94bcb593d2d547b6957f2e1f0648b51a43f740c96a97efa23094072022-08-02 17:03:4810 days 5 hrs ago 0x5088be9a441737d019541d75e078bba8ffff2c2a 0xc693c8aad9745588e95995fef4570d6dcef9800040 MOVR
0x3df45f073c4bd5ff89c7aa944fcb1dc5dcd7529336593ff0555cae73b505bca023083652022-08-02 12:29:4810 days 9 hrs ago 0xc693c8aad9745588e95995fef4570d6dcef980000xb79f96cd3d939fd26c1b583d57f78fb4b503973a0.‍106860852428638299 MOVR
0x3df45f073c4bd5ff89c7aa944fcb1dc5dcd7529336593ff0555cae73b505bca023083652022-08-02 12:29:4810 days 9 hrs ago Solarbeam: Solar Router 0xc693c8aad9745588e95995fef4570d6dcef980000.‍106860852428638299 MOVR
0xfb364db3df0c35cb94e65b4c1ee45add088e7632f1af5bec7af12730382eb3be22648482022-07-25 18:08:0618 days 3 hrs ago 0xc693c8aad9745588e95995fef4570d6dcef980000x214f3ac75c047c8d05b093a863ffaf262248827b7.‍597078715493956512 MOVR
0xfb364db3df0c35cb94e65b4c1ee45add088e7632f1af5bec7af12730382eb3be22648482022-07-25 18:08:0618 days 3 hrs ago Solarbeam: Solar Router 0xc693c8aad9745588e95995fef4570d6dcef980007.‍597078715493956512 MOVR
0x54225f4d7f755e00f0ee45238450fd22cd29981f00c789f742bb392f321c64f122641862022-07-25 15:26:3618 days 6 hrs ago 0xc693c8aad9745588e95995fef4570d6dcef98000 Solarbeam: Solar Router0.‍236545013 MOVR
0x54225f4d7f755e00f0ee45238450fd22cd29981f00c789f742bb392f321c64f122641862022-07-25 15:26:3618 days 6 hrs ago 0x5088be9a441737d019541d75e078bba8ffff2c2a 0xc693c8aad9745588e95995fef4570d6dcef980000.‍236545013 MOVR
0xb846112536bbe9ed13faf6b24b7c6d99205049c938760c14ed0e720ac46c106721461832022-07-05 7:54:0638 days 14 hrs ago 0xc693c8aad9745588e95995fef4570d6dcef980000x88f859db067c45b114897db6920f3e4a61a5ca663.‍891346614246964885 MOVR
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Multicaller

Compiler Version
v0.8.2+commit.661d1103

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 12 : Multicaller.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.2;

import { AccessControl } from "AccessControl.sol";
import { Address } from "Address.sol";
import "Ownable.sol";
import "SafeERC20.sol";
import "ReentrancyGuard.sol";

/// @title Multicaller helps swap assets through designated routes of pools stated in calls array
/// @notice Use `multiswap` to swap assets by `calls` array and receiver address
contract Multicaller is AccessControl, ReentrancyGuard {

    using SafeERC20 for IERC20;

    /* ========== STRUCTURE ========== */

    // Call describes a swap for multicaller
    struct Call {
        // the contract to execute the swap
        address target;
        // prefix of the swap bytecode
        bytes prefix;
        // suffix of the swap bytecode
        bytes suffix;
        // from token address
        address fromToken;
        // to token address
        address toToken;
        // amount of the token to swap (optional, use non-zero value to specified amount to swap if needed)
        uint256 amountIn;
    }

    /* ========== STATE VARIABLES ========== */
    bytes32 public constant ROLE_OWNER = keccak256("ROLE_OWNER");
    bytes32 public constant ROLE_AGGREGATOR = keccak256("ROLE_AGGREGATOR");
    address public constant ETHER_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

    // Store the whitelisted swap routers.
    mapping(address => bool) public routerWhitelist;


    receive() external payable {}


    /// @dev Constuctor sets deployer as owner. Also, owner is the admin of the role aggregator.
    constructor() {
        _setRoleAdmin(ROLE_OWNER, ROLE_OWNER);
        _setRoleAdmin(ROLE_AGGREGATOR, ROLE_OWNER);
        _setupRole(ROLE_OWNER, msg.sender);
    }

    /* ========== INTERNAL FUNCTIONS ========== */

    /// @notice Get balance of the desired account address of the given token
    /// @param token The token address to be checked
    /// @param account The address to be checked
    /// @return The token balance of the desired account address
    function uniBalanceOf(IERC20 token, address account) internal view returns (uint256) {
        if (address(token) == ETHER_ADDRESS) {
            return account.balance;
        } else {
            return token.balanceOf(account);
        }
    }

    /// @notice Infinite approval to spender address if needed
    /// @param token the token contract address to execute `approve` method
    /// @param spender the address allowed to spend
    function approveIfNeeded(IERC20 token, address spender) internal {
        if (address(token) != ETHER_ADDRESS && token.allowance(address(this), spender) == 0) {
            token.safeApprove(spender, 2**256 - 1);
        }
    }

    /* ========== WRITE FUNCTIONS ========== */

    /// @notice Set aggregator address.
    /// @param aggregator The aggregator address. This multicaller should only be used
    /// by `aggregator`.
    function setAggregator(address aggregator) external onlyRole(ROLE_OWNER) {
        require(Address.isContract(aggregator), "ERR_AGGREGATOR_NOT_CONTRACT");
        _setupRole(ROLE_AGGREGATOR, aggregator);
    }

    /// @notice Add/remove a swap router to/from the whitelist. It can only be called by the owner.
    /// @param router The swap router address.
    /// @param isAdding `True` if router is being added and `False` being removed.
    function setRouter(address router, bool isAdding) external onlyRole(ROLE_OWNER) {
        require(Address.isContract(router), "ERR_ROUTER_NOT_CONTRACT");
        routerWhitelist[router] = isAdding;
        emit SetRouter(router, isAdding);
    }

    /// @notice Multi-swap through array of calls by sequence and then transfer final swapped token to receiver
    /// @dev Since the output amount of every swap will differ based on exchange conditions, the amount to swap
    /// of next `Call` needs dynamically changed based on the output of the previous swap. In order to support this,
    /// pre-generated bytecode only contains partial call signature excluding input amount param. The complete
    /// calldata will be packed in runtime.
    /// @param calls the array of calls to swap through different pools (See definition of `Call` in this file)
    /// @param receiver the address to receive final swapped token
    function multiswap(
        Call[] memory calls,
        address payable receiver
    )
        public
        payable
        onlyRole(ROLE_AGGREGATOR)
        nonReentrant
        returns (uint256 blockNumber, bytes[] memory returnData)
    {
        blockNumber = block.number;
        returnData = new bytes[](calls.length);

        // `calls` contain only swap actions
        uint256 amountIn;
        for(uint256 i = 0; i < calls.length; i++) {
            // Check: call target must be a whitelisted swap router.
            require(routerWhitelist[calls[i].target], "ERR_ROUTER_NOT_IN_WHITELIST");

            approveIfNeeded(IERC20(calls[i].fromToken), calls[i].target);

            if (calls[i].amountIn > 0) {
                amountIn = calls[i].amountIn;
            }
            uint256 value = 0;
            bytes memory callData;
            if (calls[i].fromToken == ETHER_ADDRESS) {
                value = amountIn;
                callData = abi.encodePacked(calls[i].prefix, calls[i].suffix);
            } else {
                callData = abi.encodePacked(calls[i].prefix, amountIn, calls[i].suffix);
            }
            uint256 balance = uniBalanceOf(IERC20(calls[i].toToken), address(this));
            bytes memory ret = Address.functionCallWithValue(calls[i].target, callData, value, "Multicall multiswap: call failed");
            amountIn = uniBalanceOf(IERC20(calls[i].toToken), address(this)) - balance;
            returnData[i] = ret;
        }

        Call memory lastCall = calls[calls.length - 1];
        if (lastCall.toToken == ETHER_ADDRESS) {
            receiver.transfer(address(this).balance);
        } else {
            uint256 balance = IERC20(lastCall.toToken).balanceOf(address(this));
            IERC20(lastCall.toToken).safeTransfer(receiver, balance);
        }
    }

    /* ========== EVENTS ========== */

    event SetRouter(address indexed router, bool isAdding);
}

File 2 of 12 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "IAccessControl.sol";
import "Context.sol";
import "Strings.sol";
import "ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 3 of 12 : IAccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 4 of 12 : 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;
    }
}

File 5 of 12 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 6 of 12 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 7 of 12 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 8 of 12 : 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 9 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "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 10 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "IERC20.sol";
import "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 11 of 12 : 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 12 of 12 : 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;
    }
}

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

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"router","type":"address"},{"indexed":false,"internalType":"bool","name":"isAdding","type":"bool"}],"name":"SetRouter","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ETHER_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_AGGREGATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_OWNER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"prefix","type":"bytes"},{"internalType":"bytes","name":"suffix","type":"bytes"},{"internalType":"address","name":"fromToken","type":"address"},{"internalType":"address","name":"toToken","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"internalType":"struct Multicaller.Call[]","name":"calls","type":"tuple[]"},{"internalType":"address payable","name":"receiver","type":"address"}],"name":"multiswap","outputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"bytes[]","name":"returnData","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"routerWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"aggregator","type":"address"}],"name":"setAggregator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"router","type":"address"},{"internalType":"bool","name":"isAdding","type":"bool"}],"name":"setRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b50600180556200003160008051602062001bd5833981519152806200008d565b6200006c7f78047634eb0ea25ec59dc1b0568e3280fe1d08ca41cd8b39596c8482adce9e0e60008051602062001bd58339815191526200008d565b6200008760008051602062001bd583398151915233620000d8565b62000188565b600082815260208190526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b620000e48282620000e8565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620000e4576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001443390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611a3d80620001986000396000f3fe6080604052600436106100e15760003560e01c806391d148541161007f578063c3c6467411610059578063c3c6467414610290578063cf1d21c0146102b0578063d547741f146102f0578063f9120af614610310576100e8565b806391d148541461023a578063969da0001461025a578063a217fddf1461027b576100e8565b806336568abe116100bb57806336568abe1461018257806363cbb145146101a25780638ad682af146101d25780638b68e64d14610206576100e8565b806301ffc9a7146100ed578063248a9ca3146101225780632f2ff15d14610160576100e8565b366100e857005b600080fd5b3480156100f957600080fd5b5061010d6101083660046116f6565b610330565b60405190151581526020015b60405180910390f35b34801561012e57600080fd5b5061015261013d3660046116ba565b60009081526020819052604090206001015490565b604051908152602001610119565b34801561016c57600080fd5b5061018061017b3660046116d2565b610369565b005b34801561018e57600080fd5b5061018061019d3660046116d2565b610395565b3480156101ae57600080fd5b5061010d6101bd366004611503565b60026020526000908152604090205460ff1681565b3480156101de57600080fd5b506101527f9f4e1c871d5fdd0aee1cd182666698a4492b24c6832aac230d07b11046af5a8981565b34801561021257600080fd5b506101527f78047634eb0ea25ec59dc1b0568e3280fe1d08ca41cd8b39596c8482adce9e0e81565b34801561024657600080fd5b5061010d6102553660046116d2565b610418565b61026d610268366004611557565b610443565b60405161011992919061186c565b34801561028757600080fd5b50610152600081565b34801561029c57600080fd5b506101806102ab36600461151f565b610a5e565b3480156102bc57600080fd5b506102d873eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b6040516001600160a01b039091168152602001610119565b3480156102fc57600080fd5b5061018061030b3660046116d2565b610b37565b34801561031c57600080fd5b5061018061032b366004611503565b610b5d565b60006001600160e01b03198216637965db0b60e01b148061036157506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b60008281526020819052604090206001015461038681335b610c00565b6103908383610c64565b505050565b6001600160a01b038116331461040a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6104148282610ce8565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff165b92915050565b600060607f78047634eb0ea25ec59dc1b0568e3280fe1d08ca41cd8b39596c8482adce9e0e6104728133610381565b600260015414156104c55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610401565b6002600155845143935067ffffffffffffffff8111156104f557634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561052857816020015b60608152602001906001900390816105135790505b5091506000805b865181101561090b576002600088838151811061055c57634e487b7160e01b600052603260045260246000fd5b602090810291909101810151516001600160a01b031682528101919091526040016000205460ff166105d05760405162461bcd60e51b815260206004820152601b60248201527f4552525f524f555445525f4e4f545f494e5f57484954454c49535400000000006044820152606401610401565b6106308782815181106105f357634e487b7160e01b600052603260045260246000fd5b60200260200101516060015188838151811061061f57634e487b7160e01b600052603260045260246000fd5b602002602001015160000151610d4d565b600087828151811061065257634e487b7160e01b600052603260045260246000fd5b602002602001015160a0015111156106935786818151811061068457634e487b7160e01b600052603260045260246000fd5b602002602001015160a0015191505b6000606073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03168984815181106106d557634e487b7160e01b600052603260045260246000fd5b6020026020010151606001516001600160a01b031614156107725783915088838151811061071357634e487b7160e01b600052603260045260246000fd5b60200260200101516020015189848151811061073f57634e487b7160e01b600052603260045260246000fd5b60200260200101516040015160405160200161075c92919061177e565b60405160208183030381529060405290506107ef565b88838151811061079257634e487b7160e01b600052603260045260246000fd5b602002602001015160200151848a85815181106107bf57634e487b7160e01b600052603260045260246000fd5b6020026020010151604001516040516020016107dd939291906117ad565b60405160208183030381529060405290505b60006108268a858151811061081457634e487b7160e01b600052603260045260246000fd5b60200260200101516080015130610e11565b905060006108968b868151811061084d57634e487b7160e01b600052603260045260246000fd5b60200260200101516000015184866040518060400160405280602081526020017f4d756c746963616c6c206d756c7469737761703a2063616c6c206661696c6564815250610ec9565b9050816108bc8c878151811061081457634e487b7160e01b600052603260045260246000fd5b6108c6919061193c565b9550808886815181106108e957634e487b7160e01b600052603260045260246000fd5b60200260200101819052505050505080806109039061199a565b91505061052f565b506000866001885161091d919061193c565b8151811061093b57634e487b7160e01b600052603260045260246000fd5b6020026020010151905073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b031681608001516001600160a01b031614156109b2576040516001600160a01b038716904780156108fc02916000818181858888f193505050501580156109ac573d6000803e3d6000fd5b50610a4e565b60808101516040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156109f857600080fd5b505afa158015610a0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a30919061171e565b6080830151909150610a4c906001600160a01b03168883610ff1565b505b5050600180555090939092509050565b7f9f4e1c871d5fdd0aee1cd182666698a4492b24c6832aac230d07b11046af5a89610a898133610381565b823b610ad75760405162461bcd60e51b815260206004820152601760248201527f4552525f524f555445525f4e4f545f434f4e54524143540000000000000000006044820152606401610401565b6001600160a01b038316600081815260026020908152604091829020805460ff191686151590811790915591519182527f09b50446349d7fd45dbe59f55204a44404c2adf607c59e9420b87535ed2454b1910160405180910390a2505050565b600082815260208190526040902060010154610b538133610381565b6103908383610ce8565b7f9f4e1c871d5fdd0aee1cd182666698a4492b24c6832aac230d07b11046af5a89610b888133610381565b813b610bd65760405162461bcd60e51b815260206004820152601b60248201527f4552525f41474752454741544f525f4e4f545f434f4e545241435400000000006044820152606401610401565b6104147f78047634eb0ea25ec59dc1b0568e3280fe1d08ca41cd8b39596c8482adce9e0e83611054565b610c0a8282610418565b61041457610c22816001600160a01b0316601461105e565b610c2d83602061105e565b604051602001610c3e9291906117e4565b60408051601f198184030181529082905262461bcd60e51b825261040191600401611859565b610c6e8282610418565b610414576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610ca43390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610cf28282610418565b15610414576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14801590610df65750604051636eb1769f60e11b81523060048201526001600160a01b03828116602483015283169063dd62ed3e9060440160206040518083038186803b158015610dbc57600080fd5b505afa158015610dd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df4919061171e565b155b15610414576104146001600160a01b03831682600019611247565b60006001600160a01b03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415610e4957506001600160a01b0381163161043d565b6040516370a0823160e01b81526001600160a01b0383811660048301528416906370a082319060240160206040518083038186803b158015610e8a57600080fd5b505afa158015610e9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec2919061171e565b905061043d565b606082471015610f2a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610401565b843b610f785760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610401565b600080866001600160a01b03168587604051610f949190611762565b60006040518083038185875af1925050503d8060008114610fd1576040519150601f19603f3d011682016040523d82523d6000602084013e610fd6565b606091505b5091509150610fe682828661136b565b979650505050505050565b6040516001600160a01b03831660248201526044810182905261039090849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526113a4565b6104148282610c64565b6060600061106d83600261191d565b611078906002611905565b67ffffffffffffffff81111561109e57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156110c8576020820181803683370190505b509050600360fc1b816000815181106110f157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061112e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600061115284600261191d565b61115d906001611905565b90505b60018111156111f1576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061119f57634e487b7160e01b600052603260045260246000fd5b1a60f81b8282815181106111c357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936111ea81611983565b9050611160565b5083156112405760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610401565b9392505050565b8015806112d05750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b15801561129657600080fd5b505afa1580156112aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ce919061171e565b155b61133b5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610401565b6040516001600160a01b03831660248201526044810182905261039090849063095ea7b360e01b9060640161101d565b6060831561137a575081611240565b82511561138a5782518084602001fd5b8160405162461bcd60e51b81526004016104019190611859565b60006113f9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114769092919063ffffffff16565b8051909150156103905780806020019051810190611417919061169e565b6103905760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610401565b60606114858484600085610ec9565b949350505050565b8035610364816119e1565b600082601f8301126114a8578081fd5b813567ffffffffffffffff8111156114c2576114c26119cb565b6114d5601f8201601f19166020016118d4565b8181528460208386010111156114e9578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215611514578081fd5b8135611240816119e1565b60008060408385031215611531578081fd5b823561153c816119e1565b9150602083013561154c816119f9565b809150509250929050565b60008060408385031215611569578182fd5b823567ffffffffffffffff80821115611580578384fd5b818501915085601f830112611593578384fd5b81356020828211156115a7576115a76119cb565b6115b481828402016118d4565b82815281810190858301885b8581101561167f578135880160c0818e03601f190112156115df578a8bfd5b6115e960c06118d4565b6115f487830161148d565b8152604082013589811115611607578c8dfd5b6116158f8983860101611498565b888301525060608201358981111561162b578c8dfd5b6116398f8983860101611498565b60408301525061164b6080830161148d565b606082015261165c60a0830161148d565b608082015260c0919091013560a0820152845292840192908401906001016115c0565b5050809750505061169181880161148d565b9450505050509250929050565b6000602082840312156116af578081fd5b8151611240816119f9565b6000602082840312156116cb578081fd5b5035919050565b600080604083850312156116e4578182fd5b82359150602083013561154c816119e1565b600060208284031215611707578081fd5b81356001600160e01b031981168114611240578182fd5b60006020828403121561172f578081fd5b5051919050565b6000815180845261174e816020860160208601611953565b601f01601f19169290920160200192915050565b60008251611774818460208701611953565b9190910192915050565b60008351611790818460208801611953565b8351908301906117a4818360208801611953565b01949350505050565b600084516117bf818460208901611953565b820184815283516117d7816020808501908801611953565b0160200195945050505050565b60007f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008252835161181c816017850160208801611953565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161184d816028840160208801611953565b01602801949350505050565b6000602082526112406020830184611736565b600060408201848352602060408185015281855180845260608601915060608382028701019350828701855b828110156118c657605f198887030184526118b4868351611736565b95509284019290840190600101611898565b509398975050505050505050565b604051601f8201601f1916810167ffffffffffffffff811182821017156118fd576118fd6119cb565b604052919050565b60008219821115611918576119186119b5565b500190565b6000816000190483118215151615611937576119376119b5565b500290565b60008282101561194e5761194e6119b5565b500390565b60005b8381101561196e578181015183820152602001611956565b8381111561197d576000848401525b50505050565b600081611992576119926119b5565b506000190190565b60006000198214156119ae576119ae6119b5565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146119f657600080fd5b50565b80151581146119f657600080fdfea26469706673582212207fed1c6607610ca4c808dc7c15a2eba6a6ad4405917d5d3d9adec97c83e5931964736f6c634300080200339f4e1c871d5fdd0aee1cd182666698a4492b24c6832aac230d07b11046af5a89

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.