creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "CoreRouter.sol": {
        "content": "//SPDX-License-Identifier: Unlicense\npragma solidity ^0.8.0;\n\n// --------------------------------------------------------------------------------\n// --------------------------------------------------------------------------------\n// GENERATED CODE - do not edit manually!!\n// --------------------------------------------------------------------------------\n// --------------------------------------------------------------------------------\n\ncontract CoreRouter {\n    error UnknownSelector(bytes4 sel);\n\n    address private constant _INITIAL_MODULE_BUNDLE = 0x828EED723cAF0A8F822249231266E38dF614923C;\n    address private constant _FEATURE_FLAG_MODULE = 0xD068fF7dDB7e5D111fA840Cc6a1aceF3F21b65d1;\n    address private constant _ACCOUNT_MODULE = 0x679C5AC3590EdEabe413A2209B38F606C115dba7;\n    address private constant _ASSOCIATE_DEBT_MODULE = 0x3ef1D9c196D629F5306cb9BD3Cc5FB5FDD7f2170;\n    address private constant _ASSOCIATED_SYSTEMS_MODULE = 0xBD7CB42c738E73D5b51966Dc51f3E9d8EcaafA1d;\n    address private constant _CCIP_RECEIVER_MODULE = 0x26360dd5Ff674f0B7E8BBF9873182f8E17D3D151;\n    address private constant _COLLATERAL_MODULE = 0xbD758B98eB94cA6D70B12be429056cbE317CFe94;\n    address private constant _COLLATERAL_CONFIGURATION_MODULE = 0x903a7908b851bab25e5d1f956723A5Bb1A2Af773;\n    address private constant _CROSS_CHAIN_USDMODULE = 0xe85536B3eAa5c711cE0fAF3cB3fc550CC29f0193;\n    address private constant _ISSUE_USDMODULE = 0xADce03921530aC81F2bef116c3073ec587c95079;\n    address private constant _LIQUIDATION_MODULE = 0x095c6d91ca46c69ae1Bd052315d5b8C88782d460;\n    address private constant _MARKET_COLLATERAL_MODULE = 0x67EAfDafA277Aa691BCF06164199Be6505f178e5;\n    address private constant _MARKET_MANAGER_MODULE = 0x631FF7dAdf3043EaF31A1bE1b4166A22C2AE8549;\n    address private constant _POOL_CONFIGURATION_MODULE = 0xa59cea6e24a8829d0Cec993830B2b0FBc892b3e2;\n    address private constant _POOL_MODULE = 0xf62B01F17Ebfd8Fd1040BF8b984523a69f0A414f;\n    address private constant _REWARDS_MANAGER_MODULE = 0x187fEc20126E6781b8C2fd2A5F53C5dAA744B889;\n    address private constant _UTILS_MODULE = 0x30cC289eC290fe2df1513a9c6c4e40c90297F9E0;\n    address private constant _VAULT_MODULE = 0x2B596ae44a5D99E9fD42A94CCbB0d28Fa460171b;\n\n    fallback() external payable {\n        // Lookup table: Function selector => implementation contract\n        bytes4 sig4 = msg.sig;\n        address implementation;\n\n        assembly {\n            let sig32 := shr(224, sig4)\n\n            function findImplementation(sig) -> result {\n                if lt(sig,0x830e23b5) {\n                    if lt(sig,0x3659cfe6) {\n                        if lt(sig,0x198f0aa1) {\n                            if lt(sig,0x11e72a43) {\n                                switch sig\n                                case 0x00cd9ef3 { result := _ACCOUNT_MODULE } // AccountModule.grantPermission()\n                                case 0x01ffc9a7 { result := _UTILS_MODULE } // UtilsModule.supportsInterface()\n                                case 0x07003f0a { result := _MARKET_MANAGER_MODULE } // MarketManagerModule.isMarketCapacityLocked()\n                                case 0x078145a8 { result := _VAULT_MODULE } // VaultModule.getVaultCollateral()\n                                case 0x0bae9893 { result := _COLLATERAL_MODULE } // CollateralModule.createLock()\n                                case 0x0dd2395a { result := _REWARDS_MANAGER_MODULE } // RewardsManagerModule.getRewardRate()\n                                case 0x10b0cf76 { result := _MARKET_MANAGER_MODULE } // MarketManagerModule.depositMarketUsd()\n                                case 0x10d52805 { result := _UTILS_MODULE } // UtilsModule.configureChainlinkCrossChain()\n                                case 0x11aa282d { result := _ASSOCIATE_DEBT_MODULE } // AssociateDebtModule.associateDebt()\n                                leave\n                            }\n                            switch sig\n                            case 0x11e72a43 { result := _POOL_MODULE } // PoolModule.setPoolName()\n                            case 0x1213d453 { result := _ACCOUNT_MODULE } // AccountModule.isAuthorized()\n                            case 0x12e1c673 { result := _MARKET_COLLATERAL_MODULE } // MarketCollateralModule.getMaximumMarketCollateral()\n                            case 0x140a7cfe { result := _MARKET_MANAGER_MODULE } // MarketManagerModule.withdrawMarketUsd()\n                            case 0x150834a3 { result := _MARKET_MANAGER_MODULE } // MarketManagerModule.getMarketCollateral()\n                            case 0x1627540c { result := _INITIAL_MODULE_BUNDLE } // InitialModuleBundle.nominateNewOwner()\n                            case 0x170c1351 { result := _REWARDS_MANAGER_MODULE } // RewardsManagerModule.registerRewardsDistributor()\n                            case 0x183231d7 { result := _POOL_MODULE } // PoolModule.rebalancePool()\n                            leave\n                        }\n                        if lt(sig,0x2a5354d2) {\n                            switch sig\n                            case 0x198f0aa1 { result := _COLLATERAL_MODULE } // CollateralModule.cleanExpiredLocks()\n                            case 0x1b5dccdb { result := _ACCOUNT_MODULE } // AccountModule.getAccountLastInteraction()\n                            case 0x1d90e392 { result := _MARKET_MANAGER_MODULE } // MarketManagerModule.setMarketMinDelegateTime()\n                            case 0x1eb60770 { result := _MARKET_MANAGER_MODULE } // MarketManagerModule.getWithdrawableMarketUsd()\n                            case 0x1f1b33b9 { result := _POOL_MODULE } // PoolModule.revokePoolNomination()\n                            case 0x21f1d9e5 { result := _MARKET_MANAGER_MODULE } // MarketManagerModule.getUsdToken()\n                            case 0x25eeea4b { result := _MARKET_MANAGER_MODULE } // MarketManagerModule.getMarketPoolDebtDistribution()\n                            case 0x2685f42b { result := _REWARDS_MANAGER_MODULE } // RewardsManagerModule.removeRewardsDistributor()\n                            leave\n                        }\n                        switch sig\n                        case 0x2a5354d2 { result := _LIQUIDATION_MODULE } // LiquidationModule.isVaultLiquidatable()\n                        case 0x2d22bef9 { result := _ASSOCIATED_SYSTEMS_MODULE } // AssociatedSystemsModule.initOrUpgradeNft()\n                        case 0x2fa7bb65 { result := _LIQUIDATION_MODULE } // LiquidationModule.isPositionLiquidatable()\n                        case 0x2fb8ff24 { result := _VAULT_MODULE } // VaultModule.getVaultDebt()\n                        case 0x33cc422b { result := _VAULT_MODULE } // VaultModule.getPositionCollateral()\n                        case 0x34078a01 { result := _POOL_MODULE } // PoolModule.setMinLiquidityRatio()\n                        case 0x340824d7 { result := _CROSS_CHAIN_USDMODULE } // CrossChainUSDModule.transferCrossChain()\n                        case 0x3593bbd2 { result := _VAULT_MODULE } // VaultModule.getPositionDebt()\n                        leave\n                    }\n                    if lt(sig,0x60248c55) {\n                        if lt(sig,0x51a40994) {\n                            switch sig\n                            case 0x3659cfe6 { result := _INITIAL_MODULE_BUNDLE } // InitialModuleBundle.upgradeTo()\n                            case 0x3b390b57 { result := _POOL_CONFIGURATION_MODULE } // PoolConfigurationModule.getPreferredPool()\n                            case 0x3e033a06 { result := _LIQUIDATION_MODULE } // LiquidationModule.liquidate()\n                            case 0x40a399ef { result := _FEATURE_FLAG_MODULE } // FeatureFlagModule.getFeatureFlagAllowAll()\n                            case 0x460d2049 { result := _REWARDS_MANAGER_MODULE } // RewardsManagerModule.claimRewards()\n                            case 0x47c1c561 { result := _ACCOUNT_MODULE } // AccountModule.renouncePermission()\n                            case 0x48741626 { result := _POOL_CONFIGURATION_MODULE } // PoolConfigurationModule.getApprovedPools()\n                            case 0x4c6568b1 { result := _POOL_MODULE } // PoolModule.setPoolCollateralDisabledByDefault()\n                            leave\n                        }\n                        switch sig\n                        case 0x51a40994 { result := _COLLATERAL_CONFIGURATION_MODULE } // CollateralConfigurationModule.getCollateralPrice()\n                        case 0x53a47bb7 { result := _INITIAL_MODULE_BUNDLE } // InitialModuleBundle.nominatedOwner()\n                        case 0x5424901b { result := _MARKET_MANAGER_MODULE } // MarketManagerModule.getMarketMinDelegateTime()\n                        case 0x572b6c05 { result := _UTILS_MODULE } // UtilsModule.isTrustedForwarder()\n                        case 0x5a4aabb1 { result := _POOL_MODULE } // PoolModule.setPoolCollateralConfiguration()\n                        case 0x5a7ff7c5 { result := _REWARDS_MANAGER_MODULE } // RewardsManagerModule.distributeRewards()\n                        case 0x5d8c8844 { result := _POOL_MODULE } // PoolModule.setPoolConfiguration()\n                        case 0x5e52ad6e { result := _FEATURE_FLAG_MODULE } // FeatureFlagModule.setFeatureFlagDenyAll()\n                        leave\n                    }\n                    if lt(sig,0x718fe928) {\n                        switch sig\n                        case 0x60248c55 { result := _VAULT_MODULE } // VaultModule.getVaultCollateralRatio()\n                        case 0x60988e09 { result := _ASSOCIATED_SYSTEMS_MODULE } // AssociatedSystemsModule.getAssociatedSystem()\n                        case 0x6141f7a2 { result := _POOL_MODULE } // PoolModule.nominatePoolOwner()\n                        case 0x644cb0f3 { result := _COLLATERAL_CONFIGURATION_MODULE } // CollateralConfigurationModule.configureCollateral()\n                        case 0x645657d8 { result := _REWARDS_MANAGER_MODULE } // RewardsManagerModule.updateRewards()\n                        case 0x6dd5b69d { result := _UTILS_MODULE } // UtilsModule.getConfig()\n                        case 0x6fd5bdce { result := _MARKET_MANAGER_MODULE } // MarketManagerModule.setMinLiquidityRatio()\n                        case 0x715cb7d2 { result := _FEATURE_FLAG_MODULE } // FeatureFlagModule.setDeniers()\n                        leave\n                    }\n                    switch sig\n                    case 0x718fe928 { result := _INITIAL_MODULE_BUNDLE } // InitialModuleBundle.renounceNomination()\n                    case 0x75bf2444 { result := _COLLATERAL_CONFIGURATION_MODULE } // CollateralConfigurationModule.getCollateralConfigurations()\n                    case 0x79ba5097 { result := _INITIAL_MODULE_BUNDLE } // InitialModuleBundle.acceptOwnership()\n                    case 0x7b0532a4 { result := _VAULT_MODULE } // VaultModule.delegateCollateral()\n                    case 0x7cc14a92 { result := _POOL_MODULE } // PoolModule.renouncePoolOwnership()\n                    case 0x7d632bd2 { result := _FEATURE_FLAG_MODULE } // FeatureFlagModule.setFeatureFlagAllowAll()\n                    case 0x7d8a4140 { result := _LIQUIDATION_MODULE } // LiquidationModule.liquidateVault()\n                    case 0x7dec8b55 { result := _ACCOUNT_MODULE } // AccountModule.notifyAccountTransfer()\n                    leave\n                }\n                if lt(sig,0xc4b3410e) {\n                    if lt(sig,0xa4e6306b) {\n                        if lt(sig,0x95909ba3) {\n                            switch sig\n                            case 0x830e23b5 { result := _UTILS_MODULE } // UtilsModule.setSupportedCrossChainNetworks()\n                            case 0x83802968 { result := _COLLATERAL_MODULE } // CollateralModule.deposit()\n                            case 0x84f29b6d { result := _MARKET_MANAGER_MODULE } // MarketManagerModule.getMinLiquidityRatio()\n                            case 0x85572ffb { result := _CCIP_RECEIVER_MODULE } // CcipReceiverModule.ccipReceive()\n                            case 0x85d99ebc { result := _MARKET_MANAGER_MODULE } // MarketManagerModule.getMarketNetIssuance()\n                            case 0x86e3b1cf { result := _MARKET_MANAGER_MODULE } // MarketManagerModule.getMarketReportedDebt()\n                            case 0x8d34166b { result := _ACCOUNT_MODULE } // AccountModule.hasPermission()\n                            case 0x8da5cb5b { result := _INITIAL_MODULE_BUNDLE } // InitialModuleBundle.owner()\n                            case 0x927482ff { result := _COLLATERAL_MODULE } // CollateralModule.getAccountAvailableCollateral()\n                            leave\n                        }\n                        switch sig\n                        case 0x95909ba3 { result := _MARKET_MANAGER_MODULE } // MarketManagerModule.getMarketDebtPerShare()\n                        case 0x95997c51 { result := _COLLATERAL_MODULE } // CollateralModule.withdraw()\n                        case 0x9851af01 { result := _POOL_MODULE } // PoolModule.getNominatedPoolOwner()\n                        case 0x9dca362f { result := _ACCOUNT_MODULE } // AccountModule.createAccount()\n                        case 0xa0778144 { result := _FEATURE_FLAG_MODULE } // FeatureFlagModule.addToFeatureFlagAllowlist()\n                        case 0xa0c12269 { result := _MARKET_MANAGER_MODULE } // MarketManagerModule.distributeDebtToPools()\n                        case 0xa148bf10 { result := _ACCOUNT_MODULE } // AccountModule.getAccountTokenAddress()\n                        case 0xa3aa8b51 { result := _MARKET_COLLATERAL_MODULE } // MarketCollateralModule.withdrawMarketCollateral()\n                        leave\n                    }\n                    if lt(sig,0xb7746b59) {\n                        switch sig\n                        case 0xa4e6306b { result := _MARKET_COLLATERAL_MODULE } // MarketCollateralModule.depositMarketCollateral()\n                        case 0xa5d49393 { result := _UTILS_MODULE } // UtilsModule.configureOracleManager()\n                        case 0xa7627288 { result := _ACCOUNT_MODULE } // AccountModule.revokePermission()\n                        case 0xa796fecd { result := _ACCOUNT_MODULE } // AccountModule.getAccountPermissions()\n                        case 0xa79b9ec9 { result := _MARKET_MANAGER_MODULE } // MarketManagerModule.registerMarket()\n                        case 0xaa8c6369 { result := _COLLATERAL_MODULE } // CollateralModule.getLocks()\n                        case 0xaaf10f42 { result := _INITIAL_MODULE_BUNDLE } // InitialModuleBundle.getImplementation()\n                        case 0xb01ceccd { result := _MARKET_MANAGER_MODULE } // MarketManagerModule.getOracleManager()\n                        leave\n                    }\n                    switch sig\n                    case 0xb7746b59 { result := _FEATURE_FLAG_MODULE } // FeatureFlagModule.removeFromFeatureFlagAllowlist()\n                    case 0xb790a1ae { result := _POOL_CONFIGURATION_MODULE } // PoolConfigurationModule.addApprovedPool()\n                    case 0xbaa2a264 { result := _MARKET_MANAGER_MODULE } // MarketManagerModule.getMarketTotalDebt()\n                    case 0xbbdd7c5a { result := _POOL_MODULE } // PoolModule.getPoolOwner()\n                    case 0xbcae3ea0 { result := _FEATURE_FLAG_MODULE } // FeatureFlagModule.getFeatureFlagDenyAll()\n                    case 0xbe0b8e6f { result := _MARKET_MANAGER_MODULE } // MarketManagerModule.getMarketPools()\n                    case 0xbf60c31d { result := _ACCOUNT_MODULE } // AccountModule.getAccountOwner()\n                    case 0xc2b0cf41 { result := _MARKET_COLLATERAL_MODULE } // MarketCollateralModule.getMarketCollateralAmount()\n                    leave\n                }\n                if lt(sig,0xdbdea94c) {\n                    if lt(sig,0xcadb09a5) {\n                        switch sig\n                        case 0xc4b3410e { result := _REWARDS_MANAGER_MODULE } // RewardsManagerModule.getAvailableRewards()\n                        case 0xc4d2aad3 { result := _POOL_MODULE } // PoolModule.getPoolCollateralIssuanceRatio()\n                        case 0xc6f79537 { result := _ASSOCIATED_SYSTEMS_MODULE } // AssociatedSystemsModule.initOrUpgradeToken()\n                        case 0xc707a39f { result := _POOL_MODULE } // PoolModule.acceptPoolOwnership()\n                        case 0xc77e51f6 { result := _POOL_MODULE } // PoolModule.getPoolCollateralConfiguration()\n                        case 0xc7f62cda { result := _INITIAL_MODULE_BUNDLE } // InitialModuleBundle.simulateUpgradeTo()\n                        case 0xca5bed77 { result := _POOL_MODULE } // PoolModule.renouncePoolNomination()\n                        case 0xcaab529b { result := _POOL_MODULE } // PoolModule.createPool()\n                        leave\n                    }\n                    switch sig\n                    case 0xcadb09a5 { result := _ACCOUNT_MODULE } // AccountModule.createAccount()\n                    case 0xce1b815f { result := _UTILS_MODULE } // UtilsModule.getTrustedForwarder()\n                    case 0xcf635949 { result := _FEATURE_FLAG_MODULE } // FeatureFlagModule.isFeatureAllowed()\n                    case 0xd1fd27b3 { result := _UTILS_MODULE } // UtilsModule.setConfig()\n                    case 0xd24437f1 { result := _MARKET_MANAGER_MODULE } // MarketManagerModule.getMarketAddress()\n                    case 0xd245d983 { result := _ASSOCIATED_SYSTEMS_MODULE } // AssociatedSystemsModule.registerUnmanagedSystem()\n                    case 0xd3264e43 { result := _ISSUE_USDMODULE } // IssueUSDModule.burnUsd()\n                    case 0xd4f88381 { result := _MARKET_COLLATERAL_MODULE } // MarketCollateralModule.getMarketCollateralValue()\n                    leave\n                }\n                if lt(sig,0xed429cf7) {\n                    switch sig\n                    case 0xdbdea94c { result := _MARKET_COLLATERAL_MODULE } // MarketCollateralModule.configureMaximumMarketCollateral()\n                    case 0xdc0a5384 { result := _VAULT_MODULE } // VaultModule.getPositionCollateralRatio()\n                    case 0xdc0b3f52 { result := _COLLATERAL_CONFIGURATION_MODULE } // CollateralConfigurationModule.getCollateralConfiguration()\n                    case 0xdf16a074 { result := _ISSUE_USDMODULE } // IssueUSDModule.mintUsd()\n                    case 0xdfb83437 { result := _MARKET_MANAGER_MODULE } // MarketManagerModule.getMarketFees()\n                    case 0xe12c8160 { result := _FEATURE_FLAG_MODULE } // FeatureFlagModule.getFeatureFlagAllowlist()\n                    case 0xe1b440d0 { result := _POOL_CONFIGURATION_MODULE } // PoolConfigurationModule.removeApprovedPool()\n                    case 0xe7098c0c { result := _POOL_CONFIGURATION_MODULE } // PoolConfigurationModule.setPreferredPool()\n                    leave\n                }\n                switch sig\n                case 0xed429cf7 { result := _FEATURE_FLAG_MODULE } // FeatureFlagModule.getDeniers()\n                case 0xef45148e { result := _COLLATERAL_MODULE } // CollateralModule.getAccountCollateral()\n                case 0xefecf137 { result := _POOL_MODULE } // PoolModule.getPoolConfiguration()\n                case 0xf544d66e { result := _VAULT_MODULE } // VaultModule.getPosition()\n                case 0xf86e6f91 { result := _POOL_MODULE } // PoolModule.getPoolName()\n                case 0xf896503a { result := _UTILS_MODULE } // UtilsModule.getConfigAddress()\n                case 0xf92bb8c9 { result := _UTILS_MODULE } // UtilsModule.getConfigUint()\n                case 0xfd85c1f8 { result := _POOL_MODULE } // PoolModule.getMinLiquidityRatio()\n                leave\n            }\n\n            implementation := findImplementation(sig32)\n        }\n\n        if (implementation == address(0)) {\n            revert UnknownSelector(sig4);\n        }\n\n        // Delegatecall to the implementation contract\n        assembly {\n            calldatacopy(0, 0, calldatasize())\n\n            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n            returndatacopy(0, 0, returndatasize())\n\n            switch result\n            case 0 {\n                revert(0, returndatasize())\n            }\n            default {\n                return(0, returndatasize())\n            }\n        }\n    }\n}\n"
      }
    },
    "settings": {
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      }
    }
  }}