Contract 0x33388cf69e032c6f60a420b37e44b1f5443d3333 11

Txn Hash Method
Block
From
To
Value [Txn Fee]
0xfa9eea4206cbdb27034bed4532820e14605ba4f211a080ea9a0bce41bb0a84fbRouter Call Nati...230191332022-11-30 3:56:162 hrs 55 mins ago0x9aa1b93a3e850181b0209370154f905653a11e89 IN  0x33388cf69e032c6f60a420b37e44b1f5443d33337.671673819742489 AVAX0.01885885 25
0x93c108b490267e1c43b014df6a939a079ebb2a5b790008876672438acb7612caRouter Call Nati...230181792022-11-30 3:23:573 hrs 27 mins ago0x467bbc99694c42dee2f63a08828d9693cd943c06 IN  0x33388cf69e032c6f60a420b37e44b1f5443d33336.171673819742489 AVAX0.0118533705 26.5
0xe0dbaac725ea5850d613e316533c99dccd870e483c9a9002c5fc673db91d6fd8Router Call Nati...230181272022-11-30 3:22:093 hrs 29 mins ago0x467bbc99694c42dee2f63a08828d9693cd943c06 IN  0x33388cf69e032c6f60a420b37e44b1f5443d33336.276736019742489 AVAX0.004035925924 26.8818
0xa20c12d829080b031ccee3037881661c1f58414bc273f73120486e7a587bfcd6Router Call230157442022-11-30 2:00:584 hrs 50 mins ago0x4354bd35a5c97e1a727650bb407dfadee0b87289 IN  0x33388cf69e032c6f60a420b37e44b1f5443d33330.171673819742489 AVAX0.017359375 25
0x34587d1b61c5f6e2dcc3a8b4dbde009c335b0b633d49acdd954773edd7784eaaRouter Call Nati...230095362022-11-29 22:32:048 hrs 19 mins ago0xcab75b2c33e83b5232a6997cc73c064079f19598 IN  0x33388cf69e032c6f60a420b37e44b1f5443d333325.171673819742489 AVAX0.0142789 25
0x39b2f17b45ee0b6464f3a08b84544bf0a09ec7e1410fe542235ca512c6cb17bfRouter Call Nati...230090572022-11-29 22:15:508 hrs 35 mins ago0xcab75b2c33e83b5232a6997cc73c064079f19598 IN  0x33388cf69e032c6f60a420b37e44b1f5443d333325.171673819742489 AVAX0.01427745 25
0x42cc6625c8c9185e81e00be3eadbd1a8b7a32a0796e59e685d58fd09666549d2Router Call Nati...230089102022-11-29 22:10:488 hrs 40 mins ago0xcab75b2c33e83b5232a6997cc73c064079f19598 IN  0x33388cf69e032c6f60a420b37e44b1f5443d33333.074994283288697 AVAX0.01994535 25
0xb5b4387406ab9af08a68f8b9d15254751f4328ae98d678bded52c537bec7b1adRouter Call Nati...230079692022-11-29 21:39:059 hrs 12 mins ago0xcab75b2c33e83b5232a6997cc73c064079f19598 IN  0x33388cf69e032c6f60a420b37e44b1f5443d33333.222343798643673 AVAX0.02696105 25
0xb59d08e0a159feff5679a16f97b74de960125321f80492a42f36c4aeefe3ea69Router Call Nati...230070692022-11-29 21:08:339 hrs 43 mins ago0x3b6d6af3e79bb044351fb4677e398890bb25c924 IN  0x33388cf69e032c6f60a420b37e44b1f5443d33334.171673819742489 AVAX0.015202225 25
0xbcac8a148e86d1062af7a94f3ac129c0fea74edbfe1da9cf850d600c81e14d45Router Call230056202022-11-29 20:19:4510 hrs 31 mins ago0x36f2b1ff6c85532e07de44446c632250d9f55624 IN  0x33388cf69e032c6f60a420b37e44b1f5443d33330.235644200657987 AVAX0.018341175 25
0xf67b59a4e9b35d5acc344009f24cedc51de51e22f2567526d89960cb9d0ac37dRouter Call230037232022-11-29 19:15:4411 hrs 35 mins ago0x6be3d1ac87797a80851ed667c3b3a71f2372f19d IN  0x33388cf69e032c6f60a420b37e44b1f5443d33330.171673819742489 AVAX0.01388085 25
0x1198a4bc73f3cfa465914a13f591a97dc2b46f63bcccdb2524098b1a40feb17dRouter Call Nati...229988942022-11-29 16:32:0014 hrs 19 mins ago0x4ca6b786b406e9cd072acdacad96c707691fe795 IN  0x33388cf69e032c6f60a420b37e44b1f5443d333352.171673819742489 AVAX0.011019725 25
0x12612c1c6afe1b18d378d154dc4fc04e3792df925a5c3078e90906eafac27341Router Call229980602022-11-29 16:03:4114 hrs 48 mins ago0xdd12c40d8eb5837a959890ea72c993e5c6fed7d3 IN  0x33388cf69e032c6f60a420b37e44b1f5443d33330.181673819742489 AVAX0.03802525 25
0xfb7d3c48f2be143457ce8c899eb68e35cbcc43cee4015fe13b93a93e68944afdSet Integrator I...229961232022-11-29 14:58:0515 hrs 53 mins ago0xae6faf6c1c0006b81ce04308e225b01d9b667a6e IN  0x33388cf69e032c6f60a420b37e44b1f5443d33330 AVAX0.0014957187531.25
0x63fc1f3a984ae7e668d305f39347fb0831aaffba0d33f9808878240644e9c6a8Router Call Nati...229880852022-11-29 10:24:3620 hrs 27 mins ago0x23b6571b9bbdda23b424b20f248f65b1c99ffc6c IN  0x33388cf69e032c6f60a420b37e44b1f5443d33333.176736019742489 AVAX0.01212745 25
0x09db1d3572592958851a45612e6e454499db6adb807280e07a7a53ef2a47c3ecRouter Call229849782022-11-29 8:38:3322 hrs 13 mins ago0xada734a6a0cfdc7b2b14aeacacbfd2291d8b9daa IN  0x33388cf69e032c6f60a420b37e44b1f5443d33330.171673819742489 AVAX0.008319325 25
0x2b5e51eab9b3f85db241521969c4cce6d9d05e41af1c9cbfce0b31c37a59584bRouter Call Nati...229846402022-11-29 8:27:1422 hrs 24 mins ago0x0ceff25b45559baddccf6c7521ac57076d67daa0 IN  0x33388cf69e032c6f60a420b37e44b1f5443d33337.851673819742489 AVAX0.03610005 25
0xba3f71fc7a66a5a44551c64c54bca8e1e0856352462eb83d9cafb917f2578127Router Call Nati...229803202022-11-29 6:00:331 day 51 mins ago0xa6b87bd82fe4b7f0c9a3b26c8965726d784b6a01 IN  0x33388cf69e032c6f60a420b37e44b1f5443d333349.171673819742489 AVAX0.024715575 25
0xc978961725db2e77c91ba0d2ad4f78d94d7c0c1ee7908c9b79a98c5e796f08e8Router Call Nati...229782262022-11-29 4:49:301 day 2 hrs ago0xd97e6de29bb4a3d6dbcd3741a79334556831cece IN  0x33388cf69e032c6f60a420b37e44b1f5443d3333212.821673819742489 AVAX0.020504775 25
0xda65e61ad287e7c40cf1d509e3c3e8cb6e12ebc6dc6d480070a6456e8b43a16bRouter Call Nati...229730662022-11-29 1:55:121 day 4 hrs ago0xedbe9c576783c94fd174beb9b4ad92b68f0ed7f6 IN  0x33388cf69e032c6f60a420b37e44b1f5443d333371.171673819742489 AVAX0.0324562 25
0x4cbe18b68bb5cdaeb17f72d01047c6a732fd976a5ea81689c8c176d88023c78dRouter Call Nati...229663092022-11-28 22:05:541 day 8 hrs ago0x2693b57ee51f4e2a26dfb339a911fa8731061f49 IN  0x33388cf69e032c6f60a420b37e44b1f5443d33333.176736019742489 AVAX0.01212715 25
0x62c535fe20bac0aa9ac2d89dd0336d1cfb122f3e734736644be31b9d8560db05Router Call Nati...229662612022-11-28 22:04:051 day 8 hrs ago0x3b6d6af3e79bb044351fb4677e398890bb25c924 IN  0x33388cf69e032c6f60a420b37e44b1f5443d33337.419748707256103 AVAX0.0152931 25
0x3b910ecf87bae94611c655dfe0d4d11290348ae055f40107ae50f8f64aee73a9Router Call229553762022-11-28 15:53:271 day 14 hrs ago0x697dcc1cdb1660b3a83d54582f91f134fb6f4d0c IN  0x33388cf69e032c6f60a420b37e44b1f5443d33330.171673819742489 AVAX0.018817 25
0x88bc1581e0a56f10cc9aa1abc6b0b06f8501670e7e7df74df840056c8cf71073Router Call229530082022-11-28 14:33:181 day 16 hrs ago0xe22bafa3ce69f8a3fd22d26a8f7b0511a76f56cc IN  0x33388cf69e032c6f60a420b37e44b1f5443d33330.171673819742489 AVAX0.016700975 25
0x6dfaaec2bcc8245f6c887adf6803462f9b82ab616a5cfcab483b1ce6cb5568bcRouter Call229529682022-11-28 14:31:581 day 16 hrs ago0xb14241baa3e80480dcfd30e5b3baa9a1111c847c IN  0x33388cf69e032c6f60a420b37e44b1f5443d33330.171673819742489 AVAX0.016930975 25
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xfa9eea4206cbdb27034bed4532820e14605ba4f211a080ea9a0bce41bb0a84fb230191332022-11-30 3:56:162 hrs 55 mins ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 Symbiosis: MetaRouter7.5 AVAX
0x93c108b490267e1c43b014df6a939a079ebb2a5b790008876672438acb7612ca230181792022-11-30 3:23:573 hrs 27 mins ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 Symbiosis: MetaRouter6 AVAX
0xe0dbaac725ea5850d613e316533c99dccd870e483c9a9002c5fc673db91d6fd8230181272022-11-30 3:22:093 hrs 29 mins ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 0xc4300be7878f42b39bdfb6a57d0f88eb87b842c36.1050622 AVAX
0x34587d1b61c5f6e2dcc3a8b4dbde009c335b0b633d49acdd954773edd7784eaa230095362022-11-29 22:32:048 hrs 19 mins ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 Symbiosis: MetaRouter25 AVAX
0x39b2f17b45ee0b6464f3a08b84544bf0a09ec7e1410fe542235ca512c6cb17bf230090572022-11-29 22:15:508 hrs 35 mins ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 Symbiosis: MetaRouter25 AVAX
0x42cc6625c8c9185e81e00be3eadbd1a8b7a32a0796e59e685d58fd09666549d2230089102022-11-29 22:10:488 hrs 40 mins ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae2.903320463546207851 AVAX
0xb5b4387406ab9af08a68f8b9d15254751f4328ae98d678bded52c537bec7b1ad230079692022-11-29 21:39:059 hrs 12 mins ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae3.050669978901184388 AVAX
0xb59d08e0a159feff5679a16f97b74de960125321f80492a42f36c4aeefe3ea69230070692022-11-29 21:08:339 hrs 43 mins ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 Symbiosis: MetaRouter4 AVAX
0xbcac8a148e86d1062af7a94f3ac129c0fea74edbfe1da9cf850d600c81e14d45230056202022-11-29 20:19:4510 hrs 31 mins ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae0.063970380915498248 AVAX
0x1198a4bc73f3cfa465914a13f591a97dc2b46f63bcccdb2524098b1a40feb17d229988942022-11-29 16:32:0014 hrs 19 mins ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae52 AVAX
0x12612c1c6afe1b18d378d154dc4fc04e3792df925a5c3078e90906eafac27341229980602022-11-29 16:03:4114 hrs 48 mins ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 0x663dc15d3c1ac63ff12e45ab68fea3f0a883c2510.01 AVAX
0x63fc1f3a984ae7e668d305f39347fb0831aaffba0d33f9808878240644e9c6a8229880852022-11-29 10:24:3620 hrs 27 mins ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 0xc4300be7878f42b39bdfb6a57d0f88eb87b842c33.0050622 AVAX
0x2b5e51eab9b3f85db241521969c4cce6d9d05e41af1c9cbfce0b31c37a59584b229846402022-11-29 8:27:1422 hrs 24 mins ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 0x663dc15d3c1ac63ff12e45ab68fea3f0a883c2517.68 AVAX
0xba3f71fc7a66a5a44551c64c54bca8e1e0856352462eb83d9cafb917f2578127229803202022-11-29 6:00:331 day 51 mins ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 Symbiosis: MetaRouter49 AVAX
0xc978961725db2e77c91ba0d2ad4f78d94d7c0c1ee7908c9b79a98c5e796f08e8229782262022-11-29 4:49:301 day 2 hrs ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae212.65 AVAX
0xda65e61ad287e7c40cf1d509e3c3e8cb6e12ebc6dc6d480070a6456e8b43a16b229730662022-11-29 1:55:121 day 4 hrs ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 Symbiosis: MetaRouter71 AVAX
0x4cbe18b68bb5cdaeb17f72d01047c6a732fd976a5ea81689c8c176d88023c78d229663092022-11-28 22:05:541 day 8 hrs ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 0xc4300be7878f42b39bdfb6a57d0f88eb87b842c33.0050622 AVAX
0x62c535fe20bac0aa9ac2d89dd0336d1cfb122f3e734736644be31b9d8560db05229662612022-11-28 22:04:051 day 8 hrs ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 Symbiosis: MetaRouter7.248074887513614153 AVAX
0x1f4925cecb8324584ca8d8535d664146f1a6986754c5e9accd59c4d61fcb6f09229458782022-11-28 10:28:371 day 20 hrs ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 0x663dc15d3c1ac63ff12e45ab68fea3f0a883c2511.667833999423394724 AVAX
0x4438b0e06649bc0f1c392b21b8b3414ca2d64dee88e046fd0dc3708f44574a1b229300012022-11-28 1:21:552 days 5 hrs ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 Symbiosis: MetaRouter13.8 AVAX
0x56f66105944049be1c439f741e2c678cb28cbef0cf3f5905e6e2a90f04443991229275272022-11-27 23:56:272 days 6 hrs ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 0xc4300be7878f42b39bdfb6a57d0f88eb87b842c30.0050622 AVAX
0x1ad7c7371c1e172b92c955834c3ee0dbb64ef5a3eb0f6a09c64b4ba97d1a5df7229254092022-11-27 22:44:162 days 8 hrs ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 0xc4300be7878f42b39bdfb6a57d0f88eb87b842c311.4550622 AVAX
0x6013d7871b9a860ff1376a4fc710682de70859afa2f32d25244b2c293e30e367229245102022-11-27 22:13:322 days 8 hrs ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 Symbiosis: MetaRouter22.333 AVAX
0xcd59ff135412a587cc50a1b0d946f13c9be4453f89280bacd2917a20877a1438229165312022-11-27 17:39:272 days 13 hrs ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 Symbiosis: MetaRouter18 AVAX
0x51c765ede72e26c92484aa13c4d7ac0eb7ada31d70c0cd207973994f2a174708229153072022-11-27 16:57:552 days 13 hrs ago 0x33388cf69e032c6f60a420b37e44b1f5443d3333 0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae0.589405564409825963 AVAX
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RubicProxy

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 100000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 19 : RubicProxy.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.10;

/**

  ██████╗ ██╗   ██╗██████╗ ██╗ ██████╗    ██████╗ ██████╗  ██████╗ ██╗  ██╗██╗   ██╗
  ██╔══██╗██║   ██║██╔══██╗██║██╔════╝    ██╔══██╗██╔══██╗██╔═══██╗╚██╗██╔╝╚██╗ ██╔╝
  ██████╔╝██║   ██║██████╔╝██║██║         ██████╔╝██████╔╝██║   ██║ ╚███╔╝  ╚████╔╝
  ██╔══██╗██║   ██║██╔══██╗██║██║         ██╔═══╝ ██╔══██╗██║   ██║ ██╔██╗   ╚██╔╝
  ██║  ██║╚██████╔╝██████╔╝██║╚██████╗    ██║     ██║  ██║╚██████╔╝██╔╝ ██╗   ██║
  ╚═╝  ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═════╝    ╚═╝     ╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═╝   ╚═╝

*/

import 'rubic-bridge-base/contracts/architecture/OnlySourceFunctionality.sol';
import '@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol';
import '@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol';
import 'rubic-bridge-base/contracts/errors/Errors.sol';

error DifferentAmountSpent();
error RouterNotAvailable();

/**
    @title RubicProxy
    @author Vladislav Yaroshuk
    @author George Eliseev
    @notice Universal proxy contract to Symbiosis, LiFi, deBridge and other cross-chain solutions
 */
contract RubicProxy is OnlySourceFunctionality {
    using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
    using SafeERC20Upgradeable for IERC20Upgradeable;

    constructor(
        uint256 _fixedCryptoFee,
        uint256 _RubicPlatformFee,
        address[] memory _routers,
        address[] memory _tokens,
        uint256[] memory _minTokenAmounts,
        uint256[] memory _maxTokenAmounts
    ) {
        initialize(_fixedCryptoFee, _RubicPlatformFee, _routers, _tokens, _minTokenAmounts, _maxTokenAmounts);
    }

    function initialize(
        uint256 _fixedCryptoFee,
        uint256 _RubicPlatformFee,
        address[] memory _routers,
        address[] memory _tokens,
        uint256[] memory _minTokenAmounts,
        uint256[] memory _maxTokenAmounts
    ) private initializer {
        __OnlySourceFunctionalityInit(
            _fixedCryptoFee,
            _RubicPlatformFee,
            _routers,
            _tokens,
            _minTokenAmounts,
            _maxTokenAmounts
        );
    }

    function routerCall(
        string calldata _providerInfo,
        BaseCrossChainParams calldata _params,
        address _gateway,
        bytes calldata _data
    ) external payable nonReentrant whenNotPaused eventEmitter(_params, _providerInfo) {
        if (!(availableRouters.contains(_params.router) && availableRouters.contains(_gateway))) {
            revert RouterNotAvailable();
        }

        uint256 balanceBeforeTransfer = IERC20Upgradeable(_params.srcInputToken).balanceOf(address(this));
        IERC20Upgradeable(_params.srcInputToken).safeTransferFrom(msg.sender, address(this), _params.srcInputAmount);
        uint256 balanceAfterTransfer = IERC20Upgradeable(_params.srcInputToken).balanceOf(address(this));

        // input amount for deflationary tokens
        uint256 _amountIn = balanceAfterTransfer - balanceBeforeTransfer;

        IntegratorFeeInfo memory _info = integratorToFeeInfo[_params.integrator];

        _amountIn = accrueTokenFees(_params.integrator, _info, _amountIn, 0, _params.srcInputToken);

        SafeERC20Upgradeable.safeIncreaseAllowance(IERC20Upgradeable(_params.srcInputToken), _gateway, _amountIn);

        AddressUpgradeable.functionCallWithValue(
            _params.router,
            _data,
            accrueFixedCryptoFee(_params.integrator, _info)
        );

        if (balanceAfterTransfer - IERC20Upgradeable(_params.srcInputToken).balanceOf(address(this)) != _amountIn) {
            revert DifferentAmountSpent();
        }

        // reset allowance back to zero, just in case
        if (IERC20Upgradeable(_params.srcInputToken).allowance(address(this), _gateway) > 0) {
            IERC20Upgradeable(_params.srcInputToken).safeApprove(_gateway, 0);
        }
    }

    function routerCallNative(
        string calldata _providerInfo,
        BaseCrossChainParams calldata _params,
        bytes calldata _data
    ) external payable nonReentrant whenNotPaused eventEmitter(_params, _providerInfo) {
        if (!availableRouters.contains(_params.router)) {
            revert RouterNotAvailable();
        }

        IntegratorFeeInfo memory _info = integratorToFeeInfo[_params.integrator];

        uint256 _amountIn = accrueTokenFees(
            _params.integrator,
            _info,
            accrueFixedCryptoFee(_params.integrator, _info),
            0,
            address(0)
        );

        AddressUpgradeable.functionCallWithValue(_params.router, _data, _amountIn);
    }

    function sweepTokens(address _token, uint256 _amount) external onlyAdmin {
        sendToken(_token, _amount, msg.sender);
    }
}

File 2 of 19 : OnlySourceFunctionality.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

import '../BridgeBase.sol';

contract OnlySourceFunctionality is BridgeBase {
    event RequestSent(BaseCrossChainParams parameters, string providerName);

    modifier eventEmitter(BaseCrossChainParams calldata _params, string calldata _providerName) {
        _;
        emit RequestSent(_params, _providerName);
    }

    function __OnlySourceFunctionalityInit(
        uint256 _fixedCryptoFee,
        uint256 _RubicPlatformFee,
        address[] memory _routers,
        address[] memory _tokens,
        uint256[] memory _minTokenAmounts,
        uint256[] memory _maxTokenAmounts
    ) internal onlyInitializing {
        __BridgeBaseInit(_fixedCryptoFee, _RubicPlatformFee, _routers, _tokens, _minTokenAmounts, _maxTokenAmounts);
    }
}

File 3 of 19 : SafeERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";
import "../extensions/draft-IERC20PermitUpgradeable.sol";
import "../../../utils/AddressUpgradeable.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 SafeERC20Upgradeable {
    using AddressUpgradeable for address;

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

    function safeTransferFrom(
        IERC20Upgradeable 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(
        IERC20Upgradeable 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(
        IERC20Upgradeable 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(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

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

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20Upgradeable 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 4 of 19 : Errors.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

error NotAnAdmin();
error NotAManager();
error NotARelayer();
error OnlyEOA();
error FeeTooHigh();
error ShareTooHigh();
error ZeroAddress();
error ZeroAmount();
error InefficientFixedFee();
error ApproveFailed();
error MinMustBeLowerThanMax();
error MaxMustBeBiggerThanMin();
error CantSetToNull();
error Unchangeable();
error LengthMismatch();

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

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

File 6 of 19 : BridgeBase.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

import '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol';
import '@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol';
import '@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol';
import '@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol';
import '@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol';
import '@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol';

import './libraries/FullMath.sol';

import './errors/Errors.sol';

contract BridgeBase is AccessControlUpgradeable, PausableUpgradeable, ReentrancyGuardUpgradeable {
    using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
    using SafeERC20Upgradeable for IERC20Upgradeable;

    // Denominator for setting fees
    uint256 internal constant DENOMINATOR = 1e6;

    bytes32 public constant MANAGER_ROLE = keccak256('MANAGER_ROLE');

    // Struct with all info about integrator fees
    mapping(address => IntegratorFeeInfo) public integratorToFeeInfo;
    // Amount of collected fees in native token integrator -> native fees
    mapping(address => uint256) public availableIntegratorCryptoFee;

    // token -> minAmount for swap
    mapping(address => uint256) public minTokenAmount;
    // token -> maxAmount for swap
    mapping(address => uint256) public maxTokenAmount;

    // token -> rubic collected fees
    mapping(address => uint256) public availableRubicTokenFee;
    // token -> integrator collected fees
    mapping(address => mapping(address => uint256)) public availableIntegratorTokenFee;

    // Rubic token fee
    uint256 public RubicPlatformFee;
    // Rubic fixed fee for swap
    uint256 public fixedCryptoFee;
    // Collected rubic fees in native token
    uint256 public availableRubicCryptoFee;

    // AddressSet of whitelisted addresses
    EnumerableSetUpgradeable.AddressSet internal availableRouters;

    event FixedCryptoFee(uint256 RubicPart, uint256 integratorPart, address indexed integrator);
    event FixedCryptoFeeCollected(uint256 amount, address collector);
    event TokenFee(uint256 RubicPart, uint256 integratorPart, address indexed integrator, address token);
    event IntegratorTokenFeeCollected(uint256 amount, address indexed integrator, address token);
    event RubicTokenFeeCollected(uint256 amount, address token);

    struct IntegratorFeeInfo {
        bool isIntegrator; // flag for setting 0 fees for integrator      - 1 byte
        uint32 tokenFee; // total fee percent gathered from user          - 4 bytes
        uint32 RubicTokenShare; // token share of platform commission     - 4 bytes
        uint32 RubicFixedCryptoShare; // native share of fixed commission - 4 bytes
        uint128 fixedFeeAmount; // custom fixed fee amount                - 16 bytes
    } //                                                            total - 29 bytes <= 32 bytes

    struct BaseCrossChainParams {
        address srcInputToken;
        uint256 srcInputAmount;
        uint256 dstChainID;
        address dstOutputToken;
        uint256 dstMinOutputAmount;
        address recipient;
        address integrator;
        address router;
    }

    // reference to https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3347/
    modifier onlyAdmin() {
        checkIsAdmin();
        _;
    }

    modifier onlyManagerOrAdmin() {
        checkIsManagerOrAdmin();
        _;
    }

    modifier onlyEOA() {
        if (msg.sender != tx.origin) {
            revert OnlyEOA();
        }
        _;
    }

    function __BridgeBaseInit(
        uint256 _fixedCryptoFee,
        uint256 _RubicPlatformFee,
        address[] memory _routers,
        address[] memory _tokens,
        uint256[] memory _minTokenAmounts,
        uint256[] memory _maxTokenAmounts
    ) internal onlyInitializing {
        __Pausable_init_unchained();

        fixedCryptoFee = _fixedCryptoFee;

        if (_RubicPlatformFee > DENOMINATOR) {
            revert FeeTooHigh();
        }

        RubicPlatformFee = _RubicPlatformFee;

        uint256 routerLength = _routers.length;
        for (uint256 i; i < routerLength; ) {
            availableRouters.add(_routers[i]);
            unchecked {
                ++i;
            }
        }

        uint256 tokensLength = _tokens.length;
        for (uint256 i; i < tokensLength; ) {
            if (_minTokenAmounts[i] > _maxTokenAmounts[i]) {
                revert MinMustBeLowerThanMax();
            }
            minTokenAmount[_tokens[i]] = _minTokenAmounts[i];
            maxTokenAmount[_tokens[i]] = _maxTokenAmounts[i];
            unchecked {
                ++i;
            }
        }

        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
    }

    /**
     * @dev Calculates and accrues fixed crypto fee
     * @param _integrator Integrator's address if there is one
     * @param _info A struct with integrator fee info
     * @return The msg.value without fixedCryptoFee
     */
    function accrueFixedCryptoFee(address _integrator, IntegratorFeeInfo memory _info) internal returns (uint256) {
        uint256 _fixedCryptoFee;
        uint256 _RubicPart;
        if (_info.isIntegrator) {
            _fixedCryptoFee = uint256(_info.fixedFeeAmount);

            if (_fixedCryptoFee > 0) {
                _RubicPart = (_fixedCryptoFee * _info.RubicFixedCryptoShare) / DENOMINATOR;

                availableIntegratorCryptoFee[_integrator] += _fixedCryptoFee - _RubicPart;
            }
        } else {
            _fixedCryptoFee = fixedCryptoFee;
            _RubicPart = _fixedCryptoFee;
        }

        availableRubicCryptoFee += _RubicPart;

        emit FixedCryptoFee(_RubicPart, _fixedCryptoFee - _RubicPart, _integrator);

        // Underflow is prevented by sol 0.8
        return (msg.value - _fixedCryptoFee);
    }

    /**
     * @dev Calculates token fees and accrues them
     * @param _integrator Integrator's address if there is one
     * @param _info A struct with fee info about integrator
     * @param _amountWithFee Total amount passed by the user
     * @param _token The token in which the fees are collected
     * @param _initBlockchainNum Used if the _calculateFee is overriden by
     * WithDestinationFunctionality, otherwise is ignored
     * @return Amount of tokens without fee
     */
    function accrueTokenFees(
        address _integrator,
        IntegratorFeeInfo memory _info,
        uint256 _amountWithFee,
        uint256 _initBlockchainNum,
        address _token
    ) internal returns (uint256) {
        (uint256 _totalFees, uint256 _RubicFee) = _calculateFee(_info, _amountWithFee, _initBlockchainNum);

        if (_integrator != address(0)) {
            availableIntegratorTokenFee[_token][_integrator] += _totalFees - _RubicFee;
        }
        availableRubicTokenFee[_token] += _RubicFee;

        emit TokenFee(_RubicFee, _totalFees - _RubicFee, _integrator, _token);

        return _amountWithFee - _totalFees;
    }

    /**
     * @dev Calculates fee amount for integrator and rubic, used in architecture
     * @param _amountWithFee the users initial amount
     * @param _info the struct with data about integrator
     * @return _totalFee the amount of Rubic + integrator fee
     * @return _RubicFee the amount of Rubic fee only
     */
    function _calculateFeeWithIntegrator(uint256 _amountWithFee, IntegratorFeeInfo memory _info)
        internal
        pure
        returns (uint256 _totalFee, uint256 _RubicFee)
    {
        if (_info.tokenFee > 0) {
            _totalFee = FullMath.mulDiv(_amountWithFee, _info.tokenFee, DENOMINATOR);

            _RubicFee = FullMath.mulDiv(_totalFee, _info.RubicTokenShare, DENOMINATOR);
        }
    }

    function _calculateFee(
        IntegratorFeeInfo memory _info,
        uint256 _amountWithFee,
        uint256
    ) internal view returns (uint256 _totalFee, uint256 _RubicFee) {
        if (_info.isIntegrator) {
            (_totalFee, _RubicFee) = _calculateFeeWithIntegrator(_amountWithFee, _info);
        } else {
            _totalFee = FullMath.mulDiv(_amountWithFee, RubicPlatformFee, DENOMINATOR);

            _RubicFee = _totalFee;
        }
    }

    /// COLLECT FUNCTIONS ///

    function _collectIntegrator(address _integrator, address _token) private {
        uint256 _amount;

        if (_token == address(0)) {
            _amount = availableIntegratorCryptoFee[_integrator];
            availableIntegratorCryptoFee[_integrator] = 0;
            emit FixedCryptoFeeCollected(_amount, _integrator);
        }

        _amount += availableIntegratorTokenFee[_token][_integrator];

        if (_amount == 0) {
            revert ZeroAmount();
        }

        availableIntegratorTokenFee[_token][_integrator] = 0;

        sendToken(_token, _amount, _integrator);

        emit IntegratorTokenFeeCollected(_amount, _integrator, _token);
    }

    /**
     * @dev Integrator can collect fees calling this function
     * @param _token The token to collect fees in
     */
    function collectIntegratorFee(address _token) external nonReentrant {
        _collectIntegrator(msg.sender, _token);
    }

    /**
     * @dev Managers can collect integrator's fees calling this function
     * Fees go to the integrator
     * @param _integrator Address of the integrator
     * @param _token The token to collect fees in
     */
    function collectIntegratorFee(address _integrator, address _token) external onlyManagerOrAdmin {
        _collectIntegrator(_integrator, _token);
    }

    /**
     * @dev Calling this function managers can collect Rubic's token fee
     * @param _token The token to collect fees in
     */
    function collectRubicFee(address _token) external onlyManagerOrAdmin {
        uint256 _amount = availableRubicTokenFee[_token];
        if (_amount == 0) {
            revert ZeroAmount();
        }

        availableRubicTokenFee[_token] = 0;
        sendToken(_token, _amount, msg.sender);

        emit RubicTokenFeeCollected(_amount, _token);
    }

    /**
     * @dev Calling this function managers can collect Rubic's fixed crypto fee
     */
    function collectRubicCryptoFee() external onlyManagerOrAdmin {
        uint256 _cryptoFee = availableRubicCryptoFee;
        availableRubicCryptoFee = 0;

        sendToken(address(0), _cryptoFee, msg.sender);

        emit FixedCryptoFeeCollected(_cryptoFee, msg.sender);
    }

    /// CONTROL FUNCTIONS ///

    function pauseExecution() external onlyManagerOrAdmin {
        _pause();
    }

    function unpauseExecution() external onlyManagerOrAdmin {
        _unpause();
    }

    /**
     * @dev Sets fee info associated with an integrator
     * @param _integrator Address of the integrator
     * @param _info Struct with fee info
     */
    function setIntegratorInfo(address _integrator, IntegratorFeeInfo memory _info) external onlyManagerOrAdmin {
        if (_info.tokenFee > DENOMINATOR) {
            revert FeeTooHigh();
        }
        if (_info.RubicTokenShare > DENOMINATOR || _info.RubicFixedCryptoShare > DENOMINATOR) {
            revert ShareTooHigh();
        }

        integratorToFeeInfo[_integrator] = _info;
    }

    /**
     * @dev Sets fixed crypto fee
     * @param _fixedCryptoFee Fixed crypto fee
     */
    function setFixedCryptoFee(uint256 _fixedCryptoFee) external onlyManagerOrAdmin {
        fixedCryptoFee = _fixedCryptoFee;
    }

    function setRubicPlatformFee(uint256 _platformFee) external onlyManagerOrAdmin {
        if (_platformFee > DENOMINATOR) {
            revert FeeTooHigh();
        }

        RubicPlatformFee = _platformFee;
    }

    /**
     * @dev Changes requirement for minimal token amount on transfers
     * @param _token The token address to setup
     * @param _minTokenAmount Amount of tokens
     */
    function setMinTokenAmount(address _token, uint256 _minTokenAmount) external onlyManagerOrAdmin {
        if (_minTokenAmount > maxTokenAmount[_token]) {
            // can be equal in case we want them to be zero
            revert MinMustBeLowerThanMax();
        }
        minTokenAmount[_token] = _minTokenAmount;
    }

    /**
     * @dev Changes requirement for maximum token amount on transfers
     * @param _token The token address to setup
     * @param _maxTokenAmount Amount of tokens
     */
    function setMaxTokenAmount(address _token, uint256 _maxTokenAmount) external onlyManagerOrAdmin {
        if (_maxTokenAmount < minTokenAmount[_token]) {
            // can be equal in case we want them to be zero
            revert MaxMustBeBiggerThanMin();
        }
        maxTokenAmount[_token] = _maxTokenAmount;
    }

    /**
     * @dev Appends new available routers
     * @param _routers Routers addresses to add
     */
    function addAvailableRouters(address[] memory _routers) external onlyManagerOrAdmin {
        uint256 length = _routers.length;
        for (uint256 i; i < length; ) {
            address _router = _routers[i];
            if (_router == address(0)) {
                revert ZeroAddress();
            }
            // Check that router exists is performed inside the library
            availableRouters.add(_router);
            unchecked {
                ++i;
            }
        }
    }

    /**
     * @dev Removes existing available routers
     * @param _routers Routers addresses to remove
     */
    function removeAvailableRouters(address[] memory _routers) external onlyManagerOrAdmin {
        uint256 length = _routers.length;
        for (uint256 i; i < length; ) {
            // Check that router exists is performed inside the library
            availableRouters.remove(_routers[i]);
            unchecked {
                ++i;
            }
        }
    }

    /**
     * @dev Transfers admin role
     * @param _newAdmin New admin's address
     */
    function transferAdmin(address _newAdmin) external onlyAdmin {
        _revokeRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _grantRole(DEFAULT_ADMIN_ROLE, _newAdmin);
    }

    /// VIEW FUNCTIONS ///

    /**
     * @return Available routers
     */
    function getAvailableRouters() external view returns (address[] memory) {
        return availableRouters.values();
    }

    /**
     * @notice Used in modifiers
     * @dev Function to check if address is belongs to manager or admin role
     */
    function checkIsManagerOrAdmin() internal view {
        if (!(hasRole(MANAGER_ROLE, msg.sender) || hasRole(DEFAULT_ADMIN_ROLE, msg.sender))) {
            revert NotAManager();
        }
    }

    /**
     * @notice Used in modifiers
     * @dev Function to check if address is belongs to default admin role
     */
    function checkIsAdmin() internal view {
        if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {
            revert NotAnAdmin();
        }
    }

    function sendToken(
        address _token,
        uint256 _amount,
        address _receiver
    ) internal virtual {
        if (_token == address(0)) {
            AddressUpgradeable.sendValue(payable(_receiver), _amount);
        } else {
            IERC20Upgradeable(_token).safeTransfer(_receiver, _amount);
        }
    }

    /**
     * @dev Plain fallback function to receive native
     */
    receive() external payable {}

    /**
     * @dev Plain fallback function
     */
    fallback() external {}
}

File 7 of 19 : AccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControlUpgradeable.sol";
import "../utils/ContextUpgradeable.sol";
import "../utils/StringsUpgradeable.sol";
import "../utils/introspection/ERC165Upgradeable.sol";
import "../proxy/utils/Initializable.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 AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {
    function __AccessControl_init() internal onlyInitializing {
    }

    function __AccessControl_init_unchained() internal onlyInitializing {
    }
    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);
        _;
    }

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

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

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @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 virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        StringsUpgradeable.toHexString(uint160(account), 20),
                        " is missing role ",
                        StringsUpgradeable.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 virtual 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.
     *
     * May emit a {RoleGranted} event.
     */
    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.
     *
     * May emit a {RoleRevoked} event.
     */
    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 revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    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.
     *
     * May emit a {RoleGranted} event.
     *
     * [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}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    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);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 8 of 19 : PausableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    function __Pausable_init() internal onlyInitializing {
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal onlyInitializing {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 9 of 19 : FullMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

/// @title Contains 512-bit math functions
/// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision
/// @dev Handles "phantom overflow" i.e., allows multiplication and division where an intermediate value overflows 256 bits
library FullMath {
    /// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
    /// @param a The multiplicand
    /// @param b The multiplier
    /// @param denominator The divisor
    /// @return result The 256-bit result
    /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv
    function mulDiv(
        uint256 a,
        uint256 b,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = a * b
            // Compute the product mod 2**256 and mod 2**256 - 1
            // then use the Chinese Remainder Theorem to reconstruct
            // the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2**256 + prod0
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(a, b, not(0))
                prod0 := mul(a, b)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division
            if (prod1 == 0) {
                require(denominator > 0);
                assembly {
                    result := div(prod0, denominator)
                }
                return result;
            }

            // Make sure the result is less than 2**256.
            // Also prevents denominator == 0
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0]
            // Compute remainder using mulmod
            uint256 remainder;
            assembly {
                remainder := mulmod(a, b, denominator)
            }
            // Subtract 256 bit number from 512 bit number
            assembly {
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator
            // Compute largest power of two divisor of denominator.
            // Always >= 1.
            uint256 twos = (0 - denominator) & denominator;
            // Divide denominator by power of two
            assembly {
                denominator := div(denominator, twos)
            }

            // Divide [prod1 prod0] by the factors of two
            assembly {
                prod0 := div(prod0, twos)
            }
            // Shift in bits from prod1 into prod0. For this we need
            // to flip `twos` such that it is 2**256 / twos.
            // If twos is zero, then it becomes one
            assembly {
                twos := add(div(sub(0, twos), twos), 1)
            }
            prod0 |= prod1 * twos;

            // Invert denominator mod 2**256
            // Now that denominator is an odd number, it has an inverse
            // modulo 2**256 such that denominator * inv = 1 mod 2**256.
            // Compute the inverse by starting with a seed that is correct
            // correct for four bits. That is, denominator * inv = 1 mod 2**4
            uint256 inv = (3 * denominator) ^ 2;
            // Now use Newton-Raphson iteration to improve the precision.
            // Thanks to Hensel's lifting lemma, this also works in modular
            // arithmetic, doubling the correct bits in each step.
            inv *= 2 - denominator * inv; // inverse mod 2**8
            inv *= 2 - denominator * inv; // inverse mod 2**16
            inv *= 2 - denominator * inv; // inverse mod 2**32
            inv *= 2 - denominator * inv; // inverse mod 2**64
            inv *= 2 - denominator * inv; // inverse mod 2**128
            inv *= 2 - denominator * inv; // inverse mod 2**256

            // Because the division is now exact we can divide by multiplying
            // with the modular inverse of denominator. This will give us the
            // correct result modulo 2**256. Since the precoditions guarantee
            // that the outcome is less than 2**256, this is the final result.
            // We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inv;
            return result;
        }
    }
}

File 10 of 19 : EnumerableSetUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 *  Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.
 *  See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 *  In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.
 * ====
 */
library EnumerableSetUpgradeable {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

File 11 of 19 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ReentrancyGuardUpgradeable is Initializable {
    // 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;

    function __ReentrancyGuard_init() internal onlyInitializing {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal onlyInitializing {
        _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 making 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;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 12 of 19 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

File 14 of 19 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 15 of 19 : IAccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControlUpgradeable {
    /**
     * @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 16 of 19 : StringsUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library StringsUpgradeable {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

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

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 17 of 19 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
     * initialization step. This is essential to configure modules that are added through upgrades and that require
     * initialization.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }
}

File 18 of 19 : ERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {
    function __ERC165_init() internal onlyInitializing {
    }

    function __ERC165_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165Upgradeable).interfaceId;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 19 of 19 : IERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

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 IERC165Upgradeable {
    /**
     * @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);
}

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

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_fixedCryptoFee","type":"uint256"},{"internalType":"uint256","name":"_RubicPlatformFee","type":"uint256"},{"internalType":"address[]","name":"_routers","type":"address[]"},{"internalType":"address[]","name":"_tokens","type":"address[]"},{"internalType":"uint256[]","name":"_minTokenAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"_maxTokenAmounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"DifferentAmountSpent","type":"error"},{"inputs":[],"name":"FeeTooHigh","type":"error"},{"inputs":[],"name":"MaxMustBeBiggerThanMin","type":"error"},{"inputs":[],"name":"MinMustBeLowerThanMax","type":"error"},{"inputs":[],"name":"NotAManager","type":"error"},{"inputs":[],"name":"NotAnAdmin","type":"error"},{"inputs":[],"name":"RouterNotAvailable","type":"error"},{"inputs":[],"name":"ShareTooHigh","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"inputs":[],"name":"ZeroAmount","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"RubicPart","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"integratorPart","type":"uint256"},{"indexed":true,"internalType":"address","name":"integrator","type":"address"}],"name":"FixedCryptoFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"collector","type":"address"}],"name":"FixedCryptoFeeCollected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"integrator","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"IntegratorTokenFeeCollected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"srcInputToken","type":"address"},{"internalType":"uint256","name":"srcInputAmount","type":"uint256"},{"internalType":"uint256","name":"dstChainID","type":"uint256"},{"internalType":"address","name":"dstOutputToken","type":"address"},{"internalType":"uint256","name":"dstMinOutputAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"integrator","type":"address"},{"internalType":"address","name":"router","type":"address"}],"indexed":false,"internalType":"struct BridgeBase.BaseCrossChainParams","name":"parameters","type":"tuple"},{"indexed":false,"internalType":"string","name":"providerName","type":"string"}],"name":"RequestSent","type":"event"},{"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":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"RubicTokenFeeCollected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"RubicPart","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"integratorPart","type":"uint256"},{"indexed":true,"internalType":"address","name":"integrator","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"TokenFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RubicPlatformFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_routers","type":"address[]"}],"name":"addAvailableRouters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"availableIntegratorCryptoFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"availableIntegratorTokenFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"availableRubicCryptoFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"availableRubicTokenFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"collectIntegratorFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_integrator","type":"address"},{"internalType":"address","name":"_token","type":"address"}],"name":"collectIntegratorFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collectRubicCryptoFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"collectRubicFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fixedCryptoFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAvailableRouters","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"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":[{"internalType":"address","name":"","type":"address"}],"name":"integratorToFeeInfo","outputs":[{"internalType":"bool","name":"isIntegrator","type":"bool"},{"internalType":"uint32","name":"tokenFee","type":"uint32"},{"internalType":"uint32","name":"RubicTokenShare","type":"uint32"},{"internalType":"uint32","name":"RubicFixedCryptoShare","type":"uint32"},{"internalType":"uint128","name":"fixedFeeAmount","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"minTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseExecution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_routers","type":"address[]"}],"name":"removeAvailableRouters","outputs":[],"stateMutability":"nonpayable","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":"string","name":"_providerInfo","type":"string"},{"components":[{"internalType":"address","name":"srcInputToken","type":"address"},{"internalType":"uint256","name":"srcInputAmount","type":"uint256"},{"internalType":"uint256","name":"dstChainID","type":"uint256"},{"internalType":"address","name":"dstOutputToken","type":"address"},{"internalType":"uint256","name":"dstMinOutputAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"integrator","type":"address"},{"internalType":"address","name":"router","type":"address"}],"internalType":"struct BridgeBase.BaseCrossChainParams","name":"_params","type":"tuple"},{"internalType":"address","name":"_gateway","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"routerCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"_providerInfo","type":"string"},{"components":[{"internalType":"address","name":"srcInputToken","type":"address"},{"internalType":"uint256","name":"srcInputAmount","type":"uint256"},{"internalType":"uint256","name":"dstChainID","type":"uint256"},{"internalType":"address","name":"dstOutputToken","type":"address"},{"internalType":"uint256","name":"dstMinOutputAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"integrator","type":"address"},{"internalType":"address","name":"router","type":"address"}],"internalType":"struct BridgeBase.BaseCrossChainParams","name":"_params","type":"tuple"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"routerCallNative","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fixedCryptoFee","type":"uint256"}],"name":"setFixedCryptoFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_integrator","type":"address"},{"components":[{"internalType":"bool","name":"isIntegrator","type":"bool"},{"internalType":"uint32","name":"tokenFee","type":"uint32"},{"internalType":"uint32","name":"RubicTokenShare","type":"uint32"},{"internalType":"uint32","name":"RubicFixedCryptoShare","type":"uint32"},{"internalType":"uint128","name":"fixedFeeAmount","type":"uint128"}],"internalType":"struct BridgeBase.IntegratorFeeInfo","name":"_info","type":"tuple"}],"name":"setIntegratorInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_maxTokenAmount","type":"uint256"}],"name":"setMaxTokenAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_minTokenAmount","type":"uint256"}],"name":"setMinTokenAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_platformFee","type":"uint256"}],"name":"setRubicPlatformFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"sweepTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newAdmin","type":"address"}],"name":"transferAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpauseExecution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b50604051620041aa380380620041aa833981016040819052620000349162000727565b6200004486868686868662000050565b50505050505062000809565b600054610100900460ff1615808015620000715750600054600160ff909116105b80620000a157506200008e306200018e60201b620018851760201c565b158015620000a1575060005460ff166001145b6200010a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156200012e576000805461ff0019166101001790555b6200013e8787878787876200019d565b801562000185576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b6001600160a01b03163b151590565b600054610100900460ff16620001f95760405162461bcd60e51b815260206004820152602b60248201526000805160206200418a83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000101565b6200020986868686868662000211565b505050505050565b600054610100900460ff166200026d5760405162461bcd60e51b815260206004820152602b60248201526000805160206200418a83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000101565b620002776200043e565b610102869055620f4240851115620002a25760405163cd4e616760e01b815260040160405180910390fd5b610101859055835160005b81811015620002f857620002ee868281518110620002cf57620002cf620007f3565b6020026020010151610104620004a660201b620018a11790919060201c565b50600101620002ad565b50835160005b8181101562000426578381815181106200031c576200031c620007f3565b6020026020010151858281518110620003395762000339620007f3565b60200260200101511115620003615760405163129c63a160e31b815260040160405180910390fd5b848181518110620003765762000376620007f3565b602002602001015160fd6000888481518110620003975762000397620007f3565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550838181518110620003d857620003d8620007f3565b602002602001015160fe6000888481518110620003f957620003f9620007f3565b6020908102919091018101516001600160a01b0316825281019190915260400160002055600101620002fe565b5062000434600033620004c6565b5050505050505050565b600054610100900460ff166200049a5760405162461bcd60e51b815260206004820152602b60248201526000805160206200418a83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000101565b6097805460ff19169055565b6000620004bd836001600160a01b038416620004d6565b90505b92915050565b620004d2828262000528565b5050565b60008181526001830160205260408120546200051f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620004c0565b506000620004c0565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16620004d25760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620005883390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156200060d576200060d620005cc565b604052919050565b60006001600160401b03821115620006315762000631620005cc565b5060051b60200190565b600082601f8301126200064d57600080fd5b8151602062000666620006608362000615565b620005e2565b82815260059290921b840181019181810190868411156200068657600080fd5b8286015b84811015620006ba5780516001600160a01b0381168114620006ac5760008081fd5b83529183019183016200068a565b509695505050505050565b600082601f830112620006d757600080fd5b81516020620006ea620006608362000615565b82815260059290921b840181019181810190868411156200070a57600080fd5b8286015b84811015620006ba57805183529183019183016200070e565b60008060008060008060c087890312156200074157600080fd5b86516020880151604089015191975095506001600160401b03808211156200076857600080fd5b620007768a838b016200063b565b955060608901519150808211156200078d57600080fd5b6200079b8a838b016200063b565b94506080890151915080821115620007b257600080fd5b620007c08a838b01620006c5565b935060a0890151915080821115620007d757600080fd5b50620007e689828a01620006c5565b9150509295509295509295565b634e487b7160e01b600052603260045260246000fd5b61397180620008196000396000f3fe6080604052600436106102535760003560e01c8063772f8c2d116101385780639e369235116100b0578063c75b3d411161007f578063dc26e24711610064578063dc26e24714610779578063dec6603614610799578063ec87621c146107b95761025a565b8063c75b3d4114610742578063d547741f146107595761025a565b80639e369235146106c9578063a217fddf146106e0578063beea8df8146106f5578063c4707686146107155761025a565b8063825dc415116101075780639108f342116100ec5780639108f3421461063657806391d148541461065657806395c54f5a146106a95761025a565b8063825dc41514610601578063859806cc146106215761025a565b8063772f8c2d146104da57806379e65062146105075780637cd5083f146105275780637e903aa6146105ec5761025a565b80632f2ff15d116101cb57806348d8b9a41161019a57806369fe30e81161017f57806369fe30e81461046e57806370cc1b2f146104a757806375829def146104ba5761025a565b806348d8b9a41461043f5780635c975abb146104565761025a565b80632f2ff15d146103bd57806336568abe146103dd5780633a68ff83146103fd5780633f979a9a1461041f5761025a565b8063162dfb0d116102225780631e2c0314116102075780631e2c0314146103585780631f041ec614610378578063248a9ca31461038d5761025a565b8063162dfb0d1461030b5780631bceb8d41461032b5761025a565b806301ffc9a714610268578063060203eb1461029d57806307598f62146102b05780630f4fb373146102d05761025a565b3661025a57005b34801561026657600080fd5b005b34801561027457600080fd5b5061028861028336600461304f565b6107ed565b60405190151581526020015b60405180910390f35b6102666102ab3660046130ec565b610886565b3480156102bc57600080fd5b506102666102cb36600461319c565b610ae9565b3480156102dc57600080fd5b506102fd6102eb36600461319c565b60fe6020526000908152604090205481565b604051908152602001610294565b34801561031757600080fd5b506102666103263660046131b7565b610b6c565b34801561033757600080fd5b506102fd61034636600461319c565b60fd6020526000908152604090205481565b34801561036457600080fd5b506102666103733660046131e1565b610b82565b34801561038457600080fd5b50610266610b90565b34801561039957600080fd5b506102fd6103a83660046131e1565b60009081526065602052604090206001015490565b3480156103c957600080fd5b506102666103d83660046131fa565b610ba2565b3480156103e957600080fd5b506102666103f83660046131fa565b610bcc565b34801561040957600080fd5b50610412610c7b565b604051610294919061321d565b34801561042b57600080fd5b5061026661043a366004613277565b610c8d565b34801561044b57600080fd5b506102fd6101025481565b34801561046257600080fd5b5060975460ff16610288565b34801561047a57600080fd5b506102fd6104893660046131b7565b61010060209081526000928352604080842090915290825290205481565b6102666104b53660046132a1565b610d1d565b3480156104c657600080fd5b506102666104d536600461319c565b6112fd565b3480156104e657600080fd5b506102fd6104f536600461319c565b60fc6020526000908152604090205481565b34801561051357600080fd5b50610266610522366004613277565b61131e565b34801561053357600080fd5b506105a561054236600461319c565b60fb6020526000908152604090205460ff81169063ffffffff61010082048116916501000000000081048216916901000000000000000000820416906fffffffffffffffffffffffffffffffff6d01000000000000000000000000009091041685565b60408051951515865263ffffffff94851660208701529284169285019290925290911660608301526fffffffffffffffffffffffffffffffff16608082015260a001610294565b3480156105f857600080fd5b506102666113ae565b34801561060d57600080fd5b5061026661061c366004613402565b611408565b34801561062d57600080fd5b5061026661160c565b34801561064257600080fd5b506102666106513660046134d0565b61161c565b34801561066257600080fd5b506102886106713660046131fa565b600091825260656020908152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b3480156106b557600080fd5b506102666106c43660046131e1565b611668565b3480156106d557600080fd5b506102fd6101035481565b3480156106ec57600080fd5b506102fd600081565b34801561070157600080fd5b5061026661071036600461319c565b6116b3565b34801561072157600080fd5b506102fd61073036600461319c565b60ff6020526000908152604090205481565b34801561074e57600080fd5b506102fd6101015481565b34801561076557600080fd5b506102666107743660046131fa565b61179e565b34801561078557600080fd5b506102666107943660046134d0565b6117c3565b3480156107a557600080fd5b506102666107b4366004613277565b611872565b3480156107c557600080fd5b506102fd7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0881565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061088057507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b600260c954036108f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260c9556109046118ca565b82858561092461091b610100850160e0860161319c565b61010490611937565b61095a576040517f91127ab800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060fb8161096f60e08a0160c08b0161319c565b73ffffffffffffffffffffffffffffffffffffffff16815260208082019290925260409081016000908120825160a081018452905460ff811615158252610100810463ffffffff908116958301959095526501000000000081048516938201939093526901000000000000000000830490931660608401526d01000000000000000000000000009091046fffffffffffffffffffffffffffffffff166080830152909150610a48610a2660e08a0160c08b0161319c565b83610a40610a3a60e08d0160c08e0161319c565b86611966565b600080611a92565b9050610a9c610a5e6101008a0160e08b0161319c565b88888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250869250611be0915050565b5050507ffdfc2ea0331bf5b8bdaf1cf2c15124d38246c8eca2c7d79091b3c0b6ec5e24e5838383604051610ad2939291906135ba565b60405180910390a15050600160c955505050505050565b600260c95403610b55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108ee565b600260c955610b643382611c0e565b50600160c955565b610b74611da5565b610b7e8282611c0e565b5050565b610b8a611da5565b61010255565b610b98611da5565b610ba0611e46565b565b600082815260656020526040902060010154610bbd81611ecb565b610bc78383611ed5565b505050565b73ffffffffffffffffffffffffffffffffffffffff81163314610c71576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016108ee565b610b7e8282611fc9565b6060610c88610104612084565b905090565b610c95611da5565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260fd6020526040902054811015610cf4576040517fb213476a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff909116600090815260fe6020526040902055565b600260c95403610d89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108ee565b600260c955610d966118ca565b838686610dad61091b610100850160e0860161319c565b8015610dc05750610dc061010487611937565b610df6576040517f91127ab800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610e05602089018961319c565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91909116906370a0823190602401602060405180830381865afa158015610e71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e959190613693565b9050610ecb333060208b01803590610ead908d61319c565b73ffffffffffffffffffffffffffffffffffffffff16929190612091565b6000610eda60208a018a61319c565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91909116906370a0823190602401602060405180830381865afa158015610f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6a9190613693565b90506000610f7883836136db565b9050600060fb81610f8f60e08e0160c08f0161319c565b73ffffffffffffffffffffffffffffffffffffffff1681526020808201929092526040908101600020815160a081018352905460ff81161515825263ffffffff61010082048116948301949094526501000000000081048416928201929092526901000000000000000000820490921660608301526fffffffffffffffffffffffffffffffff6d0100000000000000000000000000909104166080820152905061105e61104260e08d0160c08e0161319c565b828460008f6000016020810190611059919061319c565b611a92565b915061107761107060208d018d61319c565b8b84612173565b6110f161108b6101008d0160e08e0161319c565b8a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506110ec8e60c00160208101906110e6919061319c565b85611966565b611be0565b508161110060208d018d61319c565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91909116906370a0823190602401602060405180830381865afa15801561116c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111909190613693565b61119a90856136db565b146111d1576040517f119e050500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006111e060208d018d61319c565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8d81166024830152919091169063dd62ed3e90604401602060405180830381865afa158015611254573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112789190613693565b11156112ae576112ae8a600061129160208f018f61319c565b73ffffffffffffffffffffffffffffffffffffffff169190612271565b505050507ffdfc2ea0331bf5b8bdaf1cf2c15124d38246c8eca2c7d79091b3c0b6ec5e24e58383836040516112e5939291906135ba565b60405180910390a15050600160c95550505050505050565b6113056123f3565b611310600033611fc9565b61131b600082611ed5565b50565b611326611da5565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260fe6020526040902054811115611385576040517f94e31d0800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff909116600090815260fd6020526040902055565b6113b6611da5565b6101038054600091829055906113cd90823361245b565b604080518281523360208201527f445ea353dd3cfa91aaa8ea899f31ffb4d03e783c45f0ef3717b46c32ea17969d910160405180910390a150565b611410611da5565b620f4240816020015163ffffffff161115611457576040517fcd4e616700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620f4240816040015163ffffffff16118061147e5750620f4240816060015163ffffffff16115b156114b5576040517f2a07fc4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff909116600090815260fb602090815260409182902083518154928501519385015160608601516080909601516fffffffffffffffffffffffffffffffff166d0100000000000000000000000000027fffffff00000000000000000000000000000000ffffffffffffffffffffffffff63ffffffff9788166901000000000000000000027fffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffffff9389166501000000000002939093167fffffffffffffffffffffffffffffffffffffff0000000000000000ffffffffff98909716610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ff941515949094167fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000909616959095179290921795909516939093179390931716179055565b611614611da5565b610ba06124a1565b611624611da5565b805160005b81811015610bc75761165f838281518110611646576116466136ee565b60200260200101516101046124f890919063ffffffff16565b50600101611629565b611670611da5565b620f42408111156116ad576040517fcd4e616700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61010155565b6116bb611da5565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260ff60205260408120549081900361171b576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260ff602052604081205561174c82823361245b565b6040805182815273ffffffffffffffffffffffffffffffffffffffff841660208201527f9216fa2f918153a5852ce98e7929c12cd94e0adeda8117f80e761c216157b27c910160405180910390a15050565b6000828152606560205260409020600101546117b981611ecb565b610bc78383611fc9565b6117cb611da5565b805160005b81811015610bc75760008382815181106117ec576117ec6136ee565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361185c576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611868610104826118a1565b50506001016117d0565b61187a6123f3565b610b7e82823361245b565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b60006118c38373ffffffffffffffffffffffffffffffffffffffff841661251a565b9392505050565b60975460ff1615610ba0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016108ee565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260018301602052604081205415156118c3565b6000806000836000015115611a045760808401516fffffffffffffffffffffffffffffffff16915081156119ff57620f4240846060015163ffffffff16836119ae919061371d565b6119b8919061375a565b90506119c481836136db565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260fc6020526040812080549091906119f9908490613795565b90915550505b611a0c565b505061010254805b806101036000828254611a1f9190613795565b909155505073ffffffffffffffffffffffffffffffffffffffff85167f3a84e53f89d2f7779a9c9a54779858ae0eb0b7760d607b445b6fd175c30a04d482611a6781866136db565b6040805192835260208301919091520160405180910390a2611a8982346136db565b95945050505050565b6000806000611aa2878787612569565b909250905073ffffffffffffffffffffffffffffffffffffffff881615611b1857611acd81836136db565b73ffffffffffffffffffffffffffffffffffffffff808616600090815261010060209081526040808320938d1683529290529081208054909190611b12908490613795565b90915550505b73ffffffffffffffffffffffffffffffffffffffff8416600090815260ff602052604081208054839290611b4d908490613795565b909155505073ffffffffffffffffffffffffffffffffffffffff88167f25471ec9f39b4ceb20d58f63c37f9c738011f0babcc4b6af69bdd82984ca5f8e82611b9581866136db565b60408051928352602083019190915273ffffffffffffffffffffffffffffffffffffffff88169082015260600160405180910390a2611bd482876136db565b98975050505050505050565b6060611c0684848460405180606001604052806029815260200161393c602991396125a9565b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff8216611c93575073ffffffffffffffffffffffffffffffffffffffff8216600081815260fc60209081526040808320805493905580518381529182019390935290917f445ea353dd3cfa91aaa8ea899f31ffb4d03e783c45f0ef3717b46c32ea17969d910160405180910390a15b73ffffffffffffffffffffffffffffffffffffffff80831660009081526101006020908152604080832093871683529290522054611cd19082613795565b905080600003611d0d576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808316600090815261010060209081526040808320938716835292905290812055611d4e82828561245b565b6040805182815273ffffffffffffffffffffffffffffffffffffffff84811660208301528516917f6f83ca8ce48e63b2a223b9f9e7ef1ea7bf3a8385c7a9bd63baae22963b2b26e0910160405180910390a2505050565b3360009081527fcee91eb23e767f0f440dd9fce5554f355614443931e9ac5ce78c67b9e06e6f70602052604090205460ff1680611e1057503360009081527fffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b602052604090205460ff165b610ba0576040517fe92bcd1400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611e4e6118ca565b609780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611ea13390565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b61131b813361273f565b600082815260656020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610b7e57600082815260656020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055611f6b3390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600082815260656020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1615610b7e57600082815260656020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b606060006118c383612811565b60405173ffffffffffffffffffffffffffffffffffffffff8085166024830152831660448201526064810182905261216d9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261286d565b50505050565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa1580156121ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061220e9190613693565b6122189190613795565b60405173ffffffffffffffffffffffffffffffffffffffff851660248201526044810182905290915061216d9085907f095ea7b300000000000000000000000000000000000000000000000000000000906064016120eb565b80158061231157506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156122eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061230f9190613693565b155b61239d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084016108ee565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610bc79084907f095ea7b300000000000000000000000000000000000000000000000000000000906064016120eb565b3360009081527fffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b602052604090205460ff16610ba0576040517f55098f2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831661248057610bc78183612979565b610bc773ffffffffffffffffffffffffffffffffffffffff84168284612ad3565b6124a9612b29565b609780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611ea1565b60006118c38373ffffffffffffffffffffffffffffffffffffffff8416612b95565b600081815260018301602052604081205461256157508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610880565b506000610880565b60008084600001511561258a576125808486612c88565b90925090506125a1565b61259b8461010154620f4240612cda565b91508190505b935093915050565b60608247101561263b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016108ee565b73ffffffffffffffffffffffffffffffffffffffff85163b6126b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108ee565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516126e291906137cc565b60006040518083038185875af1925050503d806000811461271f576040519150601f19603f3d011682016040523d82523d6000602084013e612724565b606091505b5091509150612734828286612daa565b979650505050505050565b600082815260656020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610b7e576127978173ffffffffffffffffffffffffffffffffffffffff166014612dfd565b6127a2836020612dfd565b6040516020016127b39291906137e8565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a00000000000000000000000000000000000000000000000000000000082526108ee91600401613869565b60608160000180548060200260200160405190810160405280929190818152602001828054801561286157602002820191906000526020600020905b81548152602001906001019080831161284d575b50505050509050919050565b60006128cf826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166130409092919063ffffffff16565b805190915015610bc757808060200190518101906128ed91906138ba565b610bc7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016108ee565b804710156129e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016108ee565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114612a3d576040519150601f19603f3d011682016040523d82523d6000602084013e612a42565b606091505b5050905080610bc7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016108ee565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610bc79084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064016120eb565b60975460ff16610ba0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016108ee565b60008181526001830160205260408120548015612c7e576000612bb96001836136db565b8554909150600090612bcd906001906136db565b9050818114612c32576000866000018281548110612bed57612bed6136ee565b9060005260206000200154905080876000018481548110612c1057612c106136ee565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612c4357612c436138d7565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610880565b6000915050610880565b6000806000836020015163ffffffff161115612cd357612cb684846020015163ffffffff16620f4240612cda565b9150612cd082846040015163ffffffff16620f4240612cda565b90505b9250929050565b600080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85870985870292508281108382030391505080600003612d315760008411612d2657600080fd5b5082900490506118c3565b808411612d3d57600080fd5b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b60608315612db95750816118c3565b825115612dc95782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ee9190613869565b60606000612e0c83600261371d565b612e17906002613795565b67ffffffffffffffff811115612e2f57612e2f613339565b6040519080825280601f01601f191660200182016040528015612e59576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612e9057612e906136ee565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612ef357612ef36136ee565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000612f2f84600261371d565b612f3a906001613795565b90505b6001811115612fd7577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612f7b57612f7b6136ee565b1a60f81b828281518110612f9157612f916136ee565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93612fd081613906565b9050612f3d565b5083156118c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108ee565b6060611c0684846000856125a9565b60006020828403121561306157600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146118c357600080fd5b60008083601f8401126130a357600080fd5b50813567ffffffffffffffff8111156130bb57600080fd5b602083019150836020828501011115612cd357600080fd5b600061010082840312156130e657600080fd5b50919050565b6000806000806000610140868803121561310557600080fd5b853567ffffffffffffffff8082111561311d57600080fd5b61312989838a01613091565b909750955085915061313e8960208a016130d3565b945061012088013591508082111561315557600080fd5b5061316288828901613091565b969995985093965092949392505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461319757600080fd5b919050565b6000602082840312156131ae57600080fd5b6118c382613173565b600080604083850312156131ca57600080fd5b6131d383613173565b9150612cd060208401613173565b6000602082840312156131f357600080fd5b5035919050565b6000806040838503121561320d57600080fd5b82359150612cd060208401613173565b6020808252825182820181905260009190848201906040850190845b8181101561326b57835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101613239565b50909695505050505050565b6000806040838503121561328a57600080fd5b61329383613173565b946020939093013593505050565b60008060008060008061016087890312156132bb57600080fd5b863567ffffffffffffffff808211156132d357600080fd5b6132df8a838b01613091565b90985096508691506132f48a60208b016130d3565b95506133036101208a01613173565b945061014089013591508082111561331a57600080fd5b5061332789828a01613091565b979a9699509497509295939492505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160a0810167ffffffffffffffff8111828210171561338b5761338b613339565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156133d8576133d8613339565b604052919050565b801515811461131b57600080fd5b803563ffffffff8116811461319757600080fd5b60008082840360c081121561341657600080fd5b61341f84613173565b925060a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08201121561345157600080fd5b5061345a613368565b6020840135613468816133e0565b8152613476604085016133ee565b6020820152613487606085016133ee565b6040820152613498608085016133ee565b606082015260a08401356fffffffffffffffffffffffffffffffff811681146134c057600080fd5b6080820152919491935090915050565b600060208083850312156134e357600080fd5b823567ffffffffffffffff808211156134fb57600080fd5b818501915085601f83011261350f57600080fd5b81358181111561352157613521613339565b8060051b9150613532848301613391565b818152918301840191848101908884111561354c57600080fd5b938501935b83851015611bd45761356285613173565b82529385019390850190613551565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600061012073ffffffffffffffffffffffffffffffffffffffff806135de88613173565b16845260208701356020850152604087013560408501528061360260608901613173565b166060850152608087013560808501528061361f60a08901613173565b1660a08501525061363260c08701613173565b73ffffffffffffffffffffffffffffffffffffffff1660c084015261365960e08701613173565b73ffffffffffffffffffffffffffffffffffffffff1660e084015261010083018190526136898184018587613571565b9695505050505050565b6000602082840312156136a557600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115610880576108806136ac565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613755576137556136ac565b500290565b600082613790577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b80820180821115610880576108806136ac565b60005b838110156137c35781810151838201526020016137ab565b50506000910152565b600082516137de8184602087016137a8565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516138208160178501602088016137a8565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161385d8160288401602088016137a8565b01602801949350505050565b60208152600082518060208401526138888160408501602087016137a8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000602082840312156138cc57600080fd5b81516118c3816133e0565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600081613915576139156136ac565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fe416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564a164736f6c6343000810000a496e697469616c697a61626c653a20636f6e7472616374206973206e6f7420690000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000002c0000000000000000000000000000000000000000000000000000000000000000d000000000000000000000000663dc15d3c1ac63ff12e45ab68fea3f0a883c2510000000000000000000000007f8038682545d52ea4d9462376b77765c20d0812000000000000000000000000e5e68630b5b759e6c701b70892aa8324b71e6e2000000000000000000000000025821a21c2e3455967229cadca9b6fdd4a80a40b000000000000000000000000c4300be7878f42b39bdfb6a57d0f88eb87b842c30000000000000000000000002b42affd4b7c14d9b7c2579229495c052672ccd3000000000000000000000000362fa9d0bca5d19f743db50738345ce2b40ec99f0000000000000000000000009b17baadf0f21f03e35249e0e59723f34994f806000000000000000000000000833f307ac507d47309fd8cdd1f835bef8d702a93000000000000000000000000b0731d50c681c45856bfc3f7539d5f61d4be81d8000000000000000000000000e5cf1558a1470cb5c166c2e8651ed0f3c5fb8f420000000000000000000000002a5c2568b10a0e826bfa892cf21ba7218310180b000000000000000000000000ef3c714c9425a8f3697a9c969dc1af30ba82e5d4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

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

0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000002c0000000000000000000000000000000000000000000000000000000000000000d000000000000000000000000663dc15d3c1ac63ff12e45ab68fea3f0a883c2510000000000000000000000007f8038682545d52ea4d9462376b77765c20d0812000000000000000000000000e5e68630b5b759e6c701b70892aa8324b71e6e2000000000000000000000000025821a21c2e3455967229cadca9b6fdd4a80a40b000000000000000000000000c4300be7878f42b39bdfb6a57d0f88eb87b842c30000000000000000000000002b42affd4b7c14d9b7c2579229495c052672ccd3000000000000000000000000362fa9d0bca5d19f743db50738345ce2b40ec99f0000000000000000000000009b17baadf0f21f03e35249e0e59723f34994f806000000000000000000000000833f307ac507d47309fd8cdd1f835bef8d702a93000000000000000000000000b0731d50c681c45856bfc3f7539d5f61d4be81d8000000000000000000000000e5cf1558a1470cb5c166c2e8651ed0f3c5fb8f420000000000000000000000002a5c2568b10a0e826bfa892cf21ba7218310180b000000000000000000000000ef3c714c9425a8f3697a9c969dc1af30ba82e5d4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _fixedCryptoFee (uint256): 0
Arg [1] : _RubicPlatformFee (uint256): 0
Arg [2] : _routers (address[]): 0x663dc15d3c1ac63ff12e45ab68fea3f0a883c251,0x7f8038682545d52ea4d9462376b77765c20d0812,0xe5e68630b5b759e6c701b70892aa8324b71e6e20,0x25821a21c2e3455967229cadca9b6fdd4a80a40b,0xc4300be7878f42b39bdfb6a57d0f88eb87b842c3,0x2b42affd4b7c14d9b7c2579229495c052672ccd3,0x362fa9d0bca5d19f743db50738345ce2b40ec99f,0x9b17baadf0f21f03e35249e0e59723f34994f806,0x833f307ac507d47309fd8cdd1f835bef8d702a93,0xb0731d50c681c45856bfc3f7539d5f61d4be81d8,0xe5cf1558a1470cb5c166c2e8651ed0f3c5fb8f42,0x2a5c2568b10a0e826bfa892cf21ba7218310180b,0xef3c714c9425a8f3697a9c969dc1af30ba82e5d4

-----Encoded View---------------
23 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000280
Arg [4] : 00000000000000000000000000000000000000000000000000000000000002a0
Arg [5] : 00000000000000000000000000000000000000000000000000000000000002c0
Arg [6] : 000000000000000000000000000000000000000000000000000000000000000d
Arg [7] : 000000000000000000000000663dc15d3c1ac63ff12e45ab68fea3f0a883c251
Arg [8] : 0000000000000000000000007f8038682545d52ea4d9462376b77765c20d0812
Arg [9] : 000000000000000000000000e5e68630b5b759e6c701b70892aa8324b71e6e20
Arg [10] : 00000000000000000000000025821a21c2e3455967229cadca9b6fdd4a80a40b
Arg [11] : 000000000000000000000000c4300be7878f42b39bdfb6a57d0f88eb87b842c3
Arg [12] : 0000000000000000000000002b42affd4b7c14d9b7c2579229495c052672ccd3
Arg [13] : 000000000000000000000000362fa9d0bca5d19f743db50738345ce2b40ec99f
Arg [14] : 0000000000000000000000009b17baadf0f21f03e35249e0e59723f34994f806
Arg [15] : 000000000000000000000000833f307ac507d47309fd8cdd1f835bef8d702a93
Arg [16] : 000000000000000000000000b0731d50c681c45856bfc3f7539d5f61d4be81d8
Arg [17] : 000000000000000000000000e5cf1558a1470cb5c166c2e8651ed0f3c5fb8f42
Arg [18] : 0000000000000000000000002a5c2568b10a0e826bfa892cf21ba7218310180b
Arg [19] : 000000000000000000000000ef3c714c9425a8f3697a9c969dc1af30ba82e5d4
Arg [20] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [21] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [22] : 0000000000000000000000000000000000000000000000000000000000000000


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