@hyperlane-xyz/sdk 1.5.8 → 3.0.0-beta0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/HyperlaneApp.d.ts +1 -1
- package/dist/app/HyperlaneApp.d.ts.map +1 -1
- package/dist/app/HyperlaneApp.js +1 -1
- package/dist/app/HyperlaneApp.js.map +1 -1
- package/dist/consts/chainMetadata.d.ts +8 -0
- package/dist/consts/chainMetadata.d.ts.map +1 -1
- package/dist/consts/chainMetadata.js +215 -3
- package/dist/consts/chainMetadata.js.map +1 -1
- package/dist/consts/chains.d.ts +14 -6
- package/dist/consts/chains.d.ts.map +1 -1
- package/dist/consts/chains.js +22 -6
- package/dist/consts/chains.js.map +1 -1
- package/dist/consts/environments/index.d.ts +1351 -297
- package/dist/consts/environments/index.d.ts.map +1 -1
- package/dist/consts/environments/index.js +1 -2
- package/dist/consts/environments/index.js.map +1 -1
- package/dist/consts/environments/mainnet.json +826 -147
- package/dist/consts/environments/testnet.json +524 -167
- package/dist/consts/multisigIsm.d.ts +2 -2
- package/dist/consts/multisigIsm.d.ts.map +1 -1
- package/dist/consts/multisigIsm.js +128 -111
- package/dist/consts/multisigIsm.js.map +1 -1
- package/dist/contracts/contracts.d.ts +1 -1
- package/dist/contracts/contracts.d.ts.map +1 -1
- package/dist/contracts/contracts.js +8 -2
- package/dist/contracts/contracts.js.map +1 -1
- package/dist/core/CoreDeployer.hardhat-test.js +65 -13
- package/dist/core/CoreDeployer.hardhat-test.js.map +1 -1
- package/dist/core/HyperlaneCore.d.ts +6 -2
- package/dist/core/HyperlaneCore.d.ts.map +1 -1
- package/dist/core/HyperlaneCore.js +16 -3
- package/dist/core/HyperlaneCore.js.map +1 -1
- package/dist/core/HyperlaneCoreChecker.d.ts.map +1 -1
- package/dist/core/HyperlaneCoreChecker.js +2 -2
- package/dist/core/HyperlaneCoreChecker.js.map +1 -1
- package/dist/core/HyperlaneCoreDeployer.d.ts +7 -2
- package/dist/core/HyperlaneCoreDeployer.d.ts.map +1 -1
- package/dist/core/HyperlaneCoreDeployer.js +52 -29
- package/dist/core/HyperlaneCoreDeployer.js.map +1 -1
- package/dist/core/MultiProtocolCore.d.ts +1 -1
- package/dist/core/MultiProtocolCore.d.ts.map +1 -1
- package/dist/core/MultiProtocolCore.js +2 -3
- package/dist/core/MultiProtocolCore.js.map +1 -1
- package/dist/core/MultiProtocolCore.test.js +2 -2
- package/dist/core/MultiProtocolCore.test.js.map +1 -1
- package/dist/core/TestCoreApp.d.ts +0 -1
- package/dist/core/TestCoreApp.d.ts.map +1 -1
- package/dist/core/TestCoreDeployer.d.ts +1 -5
- package/dist/core/TestCoreDeployer.d.ts.map +1 -1
- package/dist/core/TestCoreDeployer.js +0 -20
- package/dist/core/TestCoreDeployer.js.map +1 -1
- package/dist/core/adapters/EvmCoreAdapter.d.ts +1 -1
- package/dist/core/adapters/EvmCoreAdapter.d.ts.map +1 -1
- package/dist/core/adapters/SealevelCoreAdapter.d.ts +1 -1
- package/dist/core/adapters/SealevelCoreAdapter.d.ts.map +1 -1
- package/dist/core/adapters/SealevelCoreAdapter.js +0 -1
- package/dist/core/adapters/SealevelCoreAdapter.js.map +1 -1
- package/dist/core/adapters/types.d.ts +1 -1
- package/dist/core/adapters/types.d.ts.map +1 -1
- package/dist/core/contracts.d.ts +3 -9
- package/dist/core/contracts.d.ts.map +1 -1
- package/dist/core/contracts.js +0 -1
- package/dist/core/contracts.js.map +1 -1
- package/dist/core/testHyperlaneDeploy.hardhat-test.js +8 -3
- package/dist/core/testHyperlaneDeploy.hardhat-test.js.map +1 -1
- package/dist/core/types.d.ts +3 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/deploy/HyperlaneAppChecker.d.ts.map +1 -1
- package/dist/deploy/HyperlaneAppChecker.js +3 -5
- package/dist/deploy/HyperlaneAppChecker.js.map +1 -1
- package/dist/deploy/HyperlaneDeployer.d.ts +14 -7
- package/dist/deploy/HyperlaneDeployer.d.ts.map +1 -1
- package/dist/deploy/HyperlaneDeployer.js +90 -70
- package/dist/deploy/HyperlaneDeployer.js.map +1 -1
- package/dist/deploy/HyperlaneProxyFactoryDeployer.d.ts +10 -0
- package/dist/deploy/HyperlaneProxyFactoryDeployer.d.ts.map +1 -0
- package/dist/deploy/HyperlaneProxyFactoryDeployer.js +34 -0
- package/dist/deploy/HyperlaneProxyFactoryDeployer.js.map +1 -0
- package/dist/deploy/contracts.d.ts +13 -0
- package/dist/deploy/contracts.d.ts.map +1 -0
- package/dist/deploy/contracts.js +20 -0
- package/dist/deploy/contracts.js.map +1 -0
- package/dist/deploy/proxy.d.ts +1 -0
- package/dist/deploy/proxy.d.ts.map +1 -1
- package/dist/deploy/proxy.js +8 -1
- package/dist/deploy/proxy.js.map +1 -1
- package/dist/deploy/verify/ContractVerifier.d.ts.map +1 -1
- package/dist/deploy/verify/ContractVerifier.js +7 -2
- package/dist/deploy/verify/ContractVerifier.js.map +1 -1
- package/dist/gas/HyperlaneIgp.d.ts.map +1 -1
- package/dist/gas/HyperlaneIgp.js +2 -1
- package/dist/gas/HyperlaneIgp.js.map +1 -1
- package/dist/gas/HyperlaneIgpChecker.d.ts +2 -2
- package/dist/gas/HyperlaneIgpChecker.d.ts.map +1 -1
- package/dist/gas/HyperlaneIgpChecker.js +5 -12
- package/dist/gas/HyperlaneIgpChecker.js.map +1 -1
- package/dist/gas/HyperlaneIgpDeployer.d.ts +4 -6
- package/dist/gas/HyperlaneIgpDeployer.d.ts.map +1 -1
- package/dist/gas/HyperlaneIgpDeployer.js +13 -43
- package/dist/gas/HyperlaneIgpDeployer.js.map +1 -1
- package/dist/gas/contracts.d.ts +2 -4
- package/dist/gas/contracts.d.ts.map +1 -1
- package/dist/gas/contracts.js +1 -3
- package/dist/gas/contracts.js.map +1 -1
- package/dist/gas/types.d.ts +2 -6
- package/dist/gas/types.d.ts.map +1 -1
- package/dist/gas/types.js.map +1 -1
- package/dist/hook/HyperlaneHookDeployer.d.ts +38 -10
- package/dist/hook/HyperlaneHookDeployer.d.ts.map +1 -1
- package/dist/hook/HyperlaneHookDeployer.js +135 -68
- package/dist/hook/HyperlaneHookDeployer.js.map +1 -1
- package/dist/hook/contracts.d.ts +10 -18
- package/dist/hook/contracts.d.ts.map +1 -1
- package/dist/hook/contracts.js +9 -13
- package/dist/hook/contracts.js.map +1 -1
- package/dist/hook/types.d.ts +45 -12
- package/dist/hook/types.d.ts.map +1 -1
- package/dist/hook/types.js +11 -6
- package/dist/hook/types.js.map +1 -1
- package/dist/index.d.ts +15 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +36 -16
- package/dist/index.js.map +1 -1
- package/dist/ism/HyperlaneIsmFactory.d.ts +8 -5
- package/dist/ism/HyperlaneIsmFactory.d.ts.map +1 -1
- package/dist/ism/HyperlaneIsmFactory.hardhat-test.js +6 -6
- package/dist/ism/HyperlaneIsmFactory.hardhat-test.js.map +1 -1
- package/dist/ism/HyperlaneIsmFactory.js +95 -75
- package/dist/ism/HyperlaneIsmFactory.js.map +1 -1
- package/dist/ism/contracts.d.ts +4 -3
- package/dist/ism/contracts.d.ts.map +1 -1
- package/dist/ism/contracts.js +3 -2
- package/dist/ism/contracts.js.map +1 -1
- package/dist/ism/types.d.ts +27 -8
- package/dist/ism/types.d.ts.map +1 -1
- package/dist/ism/types.js +33 -1
- package/dist/ism/types.js.map +1 -1
- package/dist/metadata/ChainMetadataManager.d.ts +0 -10
- package/dist/metadata/ChainMetadataManager.d.ts.map +1 -1
- package/dist/metadata/ChainMetadataManager.js +2 -14
- package/dist/metadata/ChainMetadataManager.js.map +1 -1
- package/dist/metadata/agentConfig.d.ts +615 -1440
- package/dist/metadata/agentConfig.d.ts.map +1 -1
- package/dist/metadata/agentConfig.js +61 -94
- package/dist/metadata/agentConfig.js.map +1 -1
- package/dist/metadata/agentConfig.test.js +9 -9
- package/dist/metadata/agentConfig.test.js.map +1 -1
- package/dist/metadata/chainMetadataTypes.d.ts +1 -1
- package/dist/metadata/chainMetadataTypes.js +4 -4
- package/dist/metadata/chainMetadataTypes.js.map +1 -1
- package/dist/metadata/deploymentArtifacts.d.ts +5 -2
- package/dist/metadata/deploymentArtifacts.d.ts.map +1 -1
- package/dist/metadata/deploymentArtifacts.js +1 -0
- package/dist/metadata/deploymentArtifacts.js.map +1 -1
- package/dist/metadata/matchingList.d.ts +13 -13
- package/dist/metadata/matchingList.d.ts.map +1 -1
- package/dist/metadata/matchingList.js +2 -6
- package/dist/metadata/matchingList.js.map +1 -1
- package/dist/middleware/account/InterchainAccountDeployer.d.ts +2 -7
- package/dist/middleware/account/InterchainAccountDeployer.d.ts.map +1 -1
- package/dist/middleware/account/InterchainAccountDeployer.js +4 -9
- package/dist/middleware/account/InterchainAccountDeployer.js.map +1 -1
- package/dist/middleware/account/accounts.hardhat-test.js +8 -6
- package/dist/middleware/account/accounts.hardhat-test.js.map +1 -1
- package/dist/middleware/liquidity-layer/LiquidityLayerRouterDeployer.d.ts +2 -7
- package/dist/middleware/liquidity-layer/LiquidityLayerRouterDeployer.d.ts.map +1 -1
- package/dist/middleware/liquidity-layer/LiquidityLayerRouterDeployer.js +7 -11
- package/dist/middleware/liquidity-layer/LiquidityLayerRouterDeployer.js.map +1 -1
- package/dist/middleware/liquidity-layer/liquidity-layer.hardhat-test.js +7 -7
- package/dist/middleware/liquidity-layer/liquidity-layer.hardhat-test.js.map +1 -1
- package/dist/middleware/query/InterchainQuery.d.ts.map +1 -1
- package/dist/middleware/query/InterchainQuery.js +1 -0
- package/dist/middleware/query/InterchainQuery.js.map +1 -1
- package/dist/middleware/query/InterchainQueryDeployer.d.ts +2 -7
- package/dist/middleware/query/InterchainQueryDeployer.d.ts.map +1 -1
- package/dist/middleware/query/InterchainQueryDeployer.js +3 -4
- package/dist/middleware/query/InterchainQueryDeployer.js.map +1 -1
- package/dist/middleware/query/queries.hardhat-test.js +8 -9
- package/dist/middleware/query/queries.hardhat-test.js.map +1 -1
- package/dist/providers/MultiProvider.d.ts +7 -2
- package/dist/providers/MultiProvider.d.ts.map +1 -1
- package/dist/providers/MultiProvider.js +12 -1
- package/dist/providers/MultiProvider.js.map +1 -1
- package/dist/router/GasRouterDeployer.d.ts.map +1 -1
- package/dist/router/GasRouterDeployer.js +1 -1
- package/dist/router/GasRouterDeployer.js.map +1 -1
- package/dist/router/HyperlaneRouterChecker.d.ts +1 -1
- package/dist/router/HyperlaneRouterChecker.d.ts.map +1 -1
- package/dist/router/HyperlaneRouterChecker.js +6 -6
- package/dist/router/HyperlaneRouterChecker.js.map +1 -1
- package/dist/router/HyperlaneRouterDeployer.d.ts +1 -1
- package/dist/router/HyperlaneRouterDeployer.d.ts.map +1 -1
- package/dist/router/HyperlaneRouterDeployer.js +15 -18
- package/dist/router/HyperlaneRouterDeployer.js.map +1 -1
- package/dist/router/ProxiedRouterChecker.js +1 -1
- package/dist/router/ProxiedRouterChecker.js.map +1 -1
- package/dist/router/types.d.ts +14 -12
- package/dist/router/types.d.ts.map +1 -1
- package/dist/router/types.js +7 -7
- package/dist/router/types.js.map +1 -1
- package/dist/test/testUtils.d.ts +1 -3
- package/dist/test/testUtils.d.ts.map +1 -1
- package/dist/test/testUtils.js +18 -45
- package/dist/test/testUtils.js.map +1 -1
- package/dist/token/adapters/EvmTokenAdapter.d.ts +65 -0
- package/dist/token/adapters/EvmTokenAdapter.d.ts.map +1 -0
- package/dist/token/adapters/EvmTokenAdapter.js +119 -0
- package/dist/token/adapters/EvmTokenAdapter.js.map +1 -0
- package/dist/token/adapters/ITokenAdapter.d.ts +30 -0
- package/dist/token/adapters/ITokenAdapter.d.ts.map +1 -0
- package/dist/token/adapters/ITokenAdapter.js +3 -0
- package/dist/token/adapters/ITokenAdapter.js.map +1 -0
- package/dist/token/adapters/SealevelTokenAdapter.d.ts +117 -0
- package/dist/token/adapters/SealevelTokenAdapter.d.ts.map +1 -0
- package/dist/token/adapters/SealevelTokenAdapter.js +435 -0
- package/dist/token/adapters/SealevelTokenAdapter.js.map +1 -0
- package/dist/token/adapters/serialization.d.ts +50 -0
- package/dist/token/adapters/serialization.d.ts.map +1 -0
- package/dist/token/adapters/serialization.js +117 -0
- package/dist/token/adapters/serialization.js.map +1 -0
- package/dist/token/config.d.ts +48 -0
- package/dist/token/config.d.ts.map +1 -0
- package/dist/token/config.js +34 -0
- package/dist/token/config.js.map +1 -0
- package/dist/token/contracts.d.ts +9 -0
- package/dist/token/contracts.d.ts.map +1 -0
- package/dist/token/contracts.js +3 -0
- package/dist/token/contracts.js.map +1 -0
- package/dist/token/deploy.d.ts +40 -0
- package/dist/token/deploy.d.ts.map +1 -0
- package/dist/token/deploy.js +262 -0
- package/dist/token/deploy.js.map +1 -0
- package/package.json +9 -7
- package/dist/consts/agentStartBlocks.d.ts +0 -3
- package/dist/consts/agentStartBlocks.d.ts.map +0 -1
- package/dist/consts/agentStartBlocks.js +0 -28
- package/dist/consts/agentStartBlocks.js.map +0 -1
- package/dist/consts/environments/test.json +0 -41
- package/dist/hook/config.d.ts +0 -4
- package/dist/hook/config.d.ts.map +0 -1
- package/dist/hook/config.js +0 -9
- package/dist/hook/config.js.map +0 -1
- package/dist/ism/HyperlaneIsmFactoryDeployer.d.ts +0 -11
- package/dist/ism/HyperlaneIsmFactoryDeployer.d.ts.map +0 -1
- package/dist/ism/HyperlaneIsmFactoryDeployer.js +0 -39
- package/dist/ism/HyperlaneIsmFactoryDeployer.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -23,9 +23,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.HyperlaneIgp = exports.verificationUtils = exports.ContractVerifier = exports.ViolationType = exports.HyperlaneDeployer = exports.HyperlaneAppChecker = exports.MailboxViolationType = exports.CoreViolationType = exports.coreFactories = exports.SealevelCoreAdapter = exports.EvmCoreAdapter = exports.TestCoreDeployer = exports.TestCoreApp = exports.MultiProtocolCore = exports.HyperlaneCoreDeployer = exports.HyperlaneCoreChecker = exports.HyperlaneCore = exports.serializeContractsMap = exports.serializeContracts = exports.filterOwnableContracts = exports.filterChainMapToProtocol = exports.filterChainMapExcludeProtocol = exports.filterAddressesMap = exports.connectContractsMap = exports.connectContracts = exports.attachContractsMapAndGetForeignDeployments = exports.attachContractsMap = exports.attachContracts = exports.SEALEVEL_SPL_NOOP_ADDRESS = exports.defaultMultisigIsmConfigs = exports.hyperlaneEnvironments = exports.hyperlaneContractAddresses = exports.Testnets = exports.TestChains = exports.Mainnets = exports.DeprecatedChains = exports.Chains = exports.AllDeprecatedChains = exports.AllChains = exports.testnetChainsMetadata = exports.solanaChainToClusterName = exports.mainnetChainsMetadata = exports.chainMetadata = exports.chainIdToMetadata = exports.
|
|
27
|
-
exports.ProviderType = exports.MultiProvider = exports.MultiProtocolProvider = exports.interchainQueryFactories = exports.InterchainQueryDeployer = exports.InterchainQueryChecker = exports.InterchainQuery = exports.liquidityLayerFactories = exports.LiquidityLayerDeployer = exports.BridgeAdapterType = exports.LiquidityLayerApp = exports.interchainAccountFactories = exports.InterchainAccountDeployer = exports.InterchainAccountChecker = exports.InterchainAccount = exports.HyperlaneDeploymentArtifactsSchema = exports.isValidChainMetadata = exports.getDomainId = exports.RpcUrlSchema = exports.ExplorerFamily = exports.ChainMetadataSchema = exports.
|
|
28
|
-
exports.wagmiChainMetadata = exports.chainMetadataToWagmiChain = exports.getSealevelAccountDataSchema = exports.SealevelInstructionWrapper = exports.SealevelAccountDataWrapper = exports.multisigIsmVerificationCost = exports.filterByChains = exports.MultiGeneric = exports.
|
|
26
|
+
exports.HyperlaneIgp = exports.verificationUtils = exports.ContractVerifier = exports.ViolationType = exports.HyperlaneProxyFactoryDeployer = exports.HyperlaneDeployer = exports.HyperlaneAppChecker = exports.MailboxViolationType = exports.CoreViolationType = exports.coreFactories = exports.SealevelCoreAdapter = exports.EvmCoreAdapter = exports.TestCoreDeployer = exports.TestCoreApp = exports.MultiProtocolCore = exports.HyperlaneCoreDeployer = exports.HyperlaneCoreChecker = exports.HyperlaneCore = exports.serializeContractsMap = exports.serializeContracts = exports.filterOwnableContracts = exports.filterChainMapToProtocol = exports.filterChainMapExcludeProtocol = exports.filterAddressesMap = exports.connectContractsMap = exports.connectContracts = exports.attachContractsMapAndGetForeignDeployments = exports.attachContractsMap = exports.attachContracts = exports.SEALEVEL_SPL_NOOP_ADDRESS = exports.defaultMultisigIsmConfigs = exports.hyperlaneEnvironments = exports.hyperlaneContractAddresses = exports.Testnets = exports.TestChains = exports.Mainnets = exports.DeprecatedChains = exports.Chains = exports.AllDeprecatedChains = exports.AllChains = exports.testnetChainsMetadata = exports.solanaChainToClusterName = exports.mainnetChainsMetadata = exports.chainMetadata = exports.chainIdToMetadata = exports.MultiProtocolApp = exports.BaseSealevelAdapter = exports.BaseEvmAdapter = exports.BaseAppAdapter = exports.HyperlaneApp = void 0;
|
|
27
|
+
exports.RetryJsonRpcProvider = exports.ProviderType = exports.MultiProvider = exports.MultiProtocolProvider = exports.interchainQueryFactories = exports.InterchainQueryDeployer = exports.InterchainQueryChecker = exports.InterchainQuery = exports.liquidityLayerFactories = exports.LiquidityLayerDeployer = exports.BridgeAdapterType = exports.LiquidityLayerApp = exports.interchainAccountFactories = exports.InterchainAccountDeployer = exports.InterchainAccountChecker = exports.InterchainAccount = exports.HyperlaneDeploymentArtifactsSchema = exports.isValidChainMetadata = exports.getDomainId = exports.RpcUrlSchema = exports.ExplorerFamily = exports.ChainMetadataSchema = exports.buildAgentConfig = exports.RpcConsensusType = exports.GasPaymentEnforcementPolicyType = exports.AgentSignerKeyType = exports.AgentLogLevel = exports.AgentLogFormat = exports.AgentConfigSchema = exports.AgentChainMetadataSchema = exports.ChainMetadataManager = exports.ModuleType = exports.IsmType = exports.moduleCanCertainlyVerify = exports.collectValidators = exports.HyperlaneIsmFactory = exports.HookType = exports.HyperlaneHookDeployer = exports.IgpViolationType = exports.GasOracleContractType = exports.CoinGeckoTokenPriceGetter = exports.igpFactories = exports.SealevelOverheadIgpDataSchema = exports.SealevelOverheadIgpData = exports.SealevelInterchainGasPaymasterType = exports.SealevelInterchainGasPaymasterConfigSchema = exports.SealevelInterchainGasPaymasterConfig = exports.SealevelOverheadIgpAdapter = exports.HyperlaneIgpDeployer = exports.HyperlaneIgpChecker = void 0;
|
|
28
|
+
exports.wagmiChainMetadata = exports.chainMetadataToWagmiChain = exports.getSealevelAccountDataSchema = exports.SealevelInstructionWrapper = exports.SealevelAccountDataWrapper = exports.multisigIsmVerificationCost = exports.filterByChains = exports.MultiGeneric = exports.HypERC721Deployer = exports.HypERC20Deployer = exports.isUriConfig = exports.isCollateralConfig = exports.TokenType = exports.SealevelTransferRemoteSchema = exports.SealevelTransferRemoteInstruction = exports.SealevelHyperlaneTokenDataSchema = exports.SealevelHyperlaneTokenData = exports.SealevelHypTokenInstruction = exports.SealevelTokenAdapter = exports.SealevelNativeTokenAdapter = exports.SealevelHypTokenAdapter = exports.SealevelHypSyntheticAdapter = exports.SealevelHypNativeAdapter = exports.SealevelHypCollateralAdapter = exports.EvmTokenAdapter = exports.EvmNativeTokenAdapter = exports.EvmHypSyntheticAdapter = exports.EvmHypCollateralAdapter = exports.proxiedFactories = exports.RouterViolationType = exports.ConnectionClientViolationType = exports.SealevelRouterAdapter = exports.SealevelGasRouterAdapter = exports.EvmRouterAdapter = exports.EvmGasRouterAdapter = exports.RouterApp = exports.GasRouterApp = exports.MultiProtocolRouterApp = exports.MultiProtocolGasRouterApp = exports.HyperlaneRouterDeployer = exports.HyperlaneRouterChecker = exports.GasRouterDeployer = exports.protocolToDefaultProviderBuilder = exports.defaultViemProviderBuilder = exports.defaultSolProviderBuilder = exports.defaultProviderBuilderMap = exports.defaultProviderBuilder = exports.defaultFuelProviderBuilder = exports.defaultEthersV5ProviderBuilder = exports.DEFAULT_RETRY_OPTIONS = void 0;
|
|
29
29
|
var HyperlaneApp_1 = require("./app/HyperlaneApp");
|
|
30
30
|
Object.defineProperty(exports, "HyperlaneApp", { enumerable: true, get: function () { return HyperlaneApp_1.HyperlaneApp; } });
|
|
31
31
|
var MultiProtocolApp_1 = require("./app/MultiProtocolApp");
|
|
@@ -33,8 +33,6 @@ Object.defineProperty(exports, "BaseAppAdapter", { enumerable: true, get: functi
|
|
|
33
33
|
Object.defineProperty(exports, "BaseEvmAdapter", { enumerable: true, get: function () { return MultiProtocolApp_1.BaseEvmAdapter; } });
|
|
34
34
|
Object.defineProperty(exports, "BaseSealevelAdapter", { enumerable: true, get: function () { return MultiProtocolApp_1.BaseSealevelAdapter; } });
|
|
35
35
|
Object.defineProperty(exports, "MultiProtocolApp", { enumerable: true, get: function () { return MultiProtocolApp_1.MultiProtocolApp; } });
|
|
36
|
-
var agentStartBlocks_1 = require("./consts/agentStartBlocks");
|
|
37
|
-
Object.defineProperty(exports, "agentStartBlocks", { enumerable: true, get: function () { return agentStartBlocks_1.agentStartBlocks; } });
|
|
38
36
|
var chainMetadata_1 = require("./consts/chainMetadata");
|
|
39
37
|
Object.defineProperty(exports, "chainIdToMetadata", { enumerable: true, get: function () { return chainMetadata_1.chainIdToMetadata; } });
|
|
40
38
|
Object.defineProperty(exports, "chainMetadata", { enumerable: true, get: function () { return chainMetadata_1.chainMetadata; } });
|
|
@@ -93,6 +91,8 @@ var HyperlaneAppChecker_1 = require("./deploy/HyperlaneAppChecker");
|
|
|
93
91
|
Object.defineProperty(exports, "HyperlaneAppChecker", { enumerable: true, get: function () { return HyperlaneAppChecker_1.HyperlaneAppChecker; } });
|
|
94
92
|
var HyperlaneDeployer_1 = require("./deploy/HyperlaneDeployer");
|
|
95
93
|
Object.defineProperty(exports, "HyperlaneDeployer", { enumerable: true, get: function () { return HyperlaneDeployer_1.HyperlaneDeployer; } });
|
|
94
|
+
var HyperlaneProxyFactoryDeployer_1 = require("./deploy/HyperlaneProxyFactoryDeployer");
|
|
95
|
+
Object.defineProperty(exports, "HyperlaneProxyFactoryDeployer", { enumerable: true, get: function () { return HyperlaneProxyFactoryDeployer_1.HyperlaneProxyFactoryDeployer; } });
|
|
96
96
|
var types_2 = require("./deploy/types");
|
|
97
97
|
Object.defineProperty(exports, "ViolationType", { enumerable: true, get: function () { return types_2.ViolationType; } });
|
|
98
98
|
var ContractVerifier_1 = require("./deploy/verify/ContractVerifier");
|
|
@@ -122,27 +122,25 @@ Object.defineProperty(exports, "IgpViolationType", { enumerable: true, get: func
|
|
|
122
122
|
var HyperlaneHookDeployer_1 = require("./hook/HyperlaneHookDeployer");
|
|
123
123
|
Object.defineProperty(exports, "HyperlaneHookDeployer", { enumerable: true, get: function () { return HyperlaneHookDeployer_1.HyperlaneHookDeployer; } });
|
|
124
124
|
var types_4 = require("./hook/types");
|
|
125
|
-
Object.defineProperty(exports, "
|
|
125
|
+
Object.defineProperty(exports, "HookType", { enumerable: true, get: function () { return types_4.HookType; } });
|
|
126
126
|
var HyperlaneIsmFactory_1 = require("./ism/HyperlaneIsmFactory");
|
|
127
127
|
Object.defineProperty(exports, "HyperlaneIsmFactory", { enumerable: true, get: function () { return HyperlaneIsmFactory_1.HyperlaneIsmFactory; } });
|
|
128
128
|
Object.defineProperty(exports, "collectValidators", { enumerable: true, get: function () { return HyperlaneIsmFactory_1.collectValidators; } });
|
|
129
129
|
Object.defineProperty(exports, "moduleCanCertainlyVerify", { enumerable: true, get: function () { return HyperlaneIsmFactory_1.moduleCanCertainlyVerify; } });
|
|
130
|
-
var HyperlaneIsmFactoryDeployer_1 = require("./ism/HyperlaneIsmFactoryDeployer");
|
|
131
|
-
Object.defineProperty(exports, "HyperlaneIsmFactoryDeployer", { enumerable: true, get: function () { return HyperlaneIsmFactoryDeployer_1.HyperlaneIsmFactoryDeployer; } });
|
|
132
130
|
var types_5 = require("./ism/types");
|
|
131
|
+
Object.defineProperty(exports, "IsmType", { enumerable: true, get: function () { return types_5.IsmType; } });
|
|
133
132
|
Object.defineProperty(exports, "ModuleType", { enumerable: true, get: function () { return types_5.ModuleType; } });
|
|
134
133
|
var ChainMetadataManager_1 = require("./metadata/ChainMetadataManager");
|
|
135
134
|
Object.defineProperty(exports, "ChainMetadataManager", { enumerable: true, get: function () { return ChainMetadataManager_1.ChainMetadataManager; } });
|
|
136
135
|
var agentConfig_1 = require("./metadata/agentConfig");
|
|
137
136
|
Object.defineProperty(exports, "AgentChainMetadataSchema", { enumerable: true, get: function () { return agentConfig_1.AgentChainMetadataSchema; } });
|
|
138
137
|
Object.defineProperty(exports, "AgentConfigSchema", { enumerable: true, get: function () { return agentConfig_1.AgentConfigSchema; } });
|
|
139
|
-
Object.defineProperty(exports, "AgentConnectionType", { enumerable: true, get: function () { return agentConfig_1.AgentConnectionType; } });
|
|
140
138
|
Object.defineProperty(exports, "AgentLogFormat", { enumerable: true, get: function () { return agentConfig_1.AgentLogFormat; } });
|
|
141
139
|
Object.defineProperty(exports, "AgentLogLevel", { enumerable: true, get: function () { return agentConfig_1.AgentLogLevel; } });
|
|
142
|
-
Object.defineProperty(exports, "
|
|
140
|
+
Object.defineProperty(exports, "AgentSignerKeyType", { enumerable: true, get: function () { return agentConfig_1.AgentSignerKeyType; } });
|
|
141
|
+
Object.defineProperty(exports, "GasPaymentEnforcementPolicyType", { enumerable: true, get: function () { return agentConfig_1.GasPaymentEnforcementPolicyType; } });
|
|
142
|
+
Object.defineProperty(exports, "RpcConsensusType", { enumerable: true, get: function () { return agentConfig_1.RpcConsensusType; } });
|
|
143
143
|
Object.defineProperty(exports, "buildAgentConfig", { enumerable: true, get: function () { return agentConfig_1.buildAgentConfig; } });
|
|
144
|
-
Object.defineProperty(exports, "buildAgentConfigDeprecated", { enumerable: true, get: function () { return agentConfig_1.buildAgentConfigDeprecated; } });
|
|
145
|
-
Object.defineProperty(exports, "buildAgentConfigNew", { enumerable: true, get: function () { return agentConfig_1.buildAgentConfigNew; } });
|
|
146
144
|
var chainMetadataTypes_1 = require("./metadata/chainMetadataTypes");
|
|
147
145
|
Object.defineProperty(exports, "ChainMetadataSchema", { enumerable: true, get: function () { return chainMetadataTypes_1.ChainMetadataSchema; } });
|
|
148
146
|
Object.defineProperty(exports, "ExplorerFamily", { enumerable: true, get: function () { return chainMetadataTypes_1.ExplorerFamily; } });
|
|
@@ -210,12 +208,34 @@ var SealevelRouterAdapter_1 = require("./router/adapters/SealevelRouterAdapter")
|
|
|
210
208
|
Object.defineProperty(exports, "SealevelGasRouterAdapter", { enumerable: true, get: function () { return SealevelRouterAdapter_1.SealevelGasRouterAdapter; } });
|
|
211
209
|
Object.defineProperty(exports, "SealevelRouterAdapter", { enumerable: true, get: function () { return SealevelRouterAdapter_1.SealevelRouterAdapter; } });
|
|
212
210
|
var types_6 = require("./router/types");
|
|
213
|
-
Object.defineProperty(exports, "ConnectionClientViolationType", { enumerable: true, get: function () { return types_6.
|
|
211
|
+
Object.defineProperty(exports, "ConnectionClientViolationType", { enumerable: true, get: function () { return types_6.ClientViolationType; } });
|
|
214
212
|
Object.defineProperty(exports, "RouterViolationType", { enumerable: true, get: function () { return types_6.RouterViolationType; } });
|
|
215
213
|
Object.defineProperty(exports, "proxiedFactories", { enumerable: true, get: function () { return types_6.proxiedFactories; } });
|
|
216
|
-
var
|
|
217
|
-
Object.defineProperty(exports, "
|
|
218
|
-
Object.defineProperty(exports, "
|
|
214
|
+
var EvmTokenAdapter_1 = require("./token/adapters/EvmTokenAdapter");
|
|
215
|
+
Object.defineProperty(exports, "EvmHypCollateralAdapter", { enumerable: true, get: function () { return EvmTokenAdapter_1.EvmHypCollateralAdapter; } });
|
|
216
|
+
Object.defineProperty(exports, "EvmHypSyntheticAdapter", { enumerable: true, get: function () { return EvmTokenAdapter_1.EvmHypSyntheticAdapter; } });
|
|
217
|
+
Object.defineProperty(exports, "EvmNativeTokenAdapter", { enumerable: true, get: function () { return EvmTokenAdapter_1.EvmNativeTokenAdapter; } });
|
|
218
|
+
Object.defineProperty(exports, "EvmTokenAdapter", { enumerable: true, get: function () { return EvmTokenAdapter_1.EvmTokenAdapter; } });
|
|
219
|
+
var SealevelTokenAdapter_1 = require("./token/adapters/SealevelTokenAdapter");
|
|
220
|
+
Object.defineProperty(exports, "SealevelHypCollateralAdapter", { enumerable: true, get: function () { return SealevelTokenAdapter_1.SealevelHypCollateralAdapter; } });
|
|
221
|
+
Object.defineProperty(exports, "SealevelHypNativeAdapter", { enumerable: true, get: function () { return SealevelTokenAdapter_1.SealevelHypNativeAdapter; } });
|
|
222
|
+
Object.defineProperty(exports, "SealevelHypSyntheticAdapter", { enumerable: true, get: function () { return SealevelTokenAdapter_1.SealevelHypSyntheticAdapter; } });
|
|
223
|
+
Object.defineProperty(exports, "SealevelHypTokenAdapter", { enumerable: true, get: function () { return SealevelTokenAdapter_1.SealevelHypTokenAdapter; } });
|
|
224
|
+
Object.defineProperty(exports, "SealevelNativeTokenAdapter", { enumerable: true, get: function () { return SealevelTokenAdapter_1.SealevelNativeTokenAdapter; } });
|
|
225
|
+
Object.defineProperty(exports, "SealevelTokenAdapter", { enumerable: true, get: function () { return SealevelTokenAdapter_1.SealevelTokenAdapter; } });
|
|
226
|
+
var serialization_2 = require("./token/adapters/serialization");
|
|
227
|
+
Object.defineProperty(exports, "SealevelHypTokenInstruction", { enumerable: true, get: function () { return serialization_2.SealevelHypTokenInstruction; } });
|
|
228
|
+
Object.defineProperty(exports, "SealevelHyperlaneTokenData", { enumerable: true, get: function () { return serialization_2.SealevelHyperlaneTokenData; } });
|
|
229
|
+
Object.defineProperty(exports, "SealevelHyperlaneTokenDataSchema", { enumerable: true, get: function () { return serialization_2.SealevelHyperlaneTokenDataSchema; } });
|
|
230
|
+
Object.defineProperty(exports, "SealevelTransferRemoteInstruction", { enumerable: true, get: function () { return serialization_2.SealevelTransferRemoteInstruction; } });
|
|
231
|
+
Object.defineProperty(exports, "SealevelTransferRemoteSchema", { enumerable: true, get: function () { return serialization_2.SealevelTransferRemoteSchema; } });
|
|
232
|
+
var config_1 = require("./token/config");
|
|
233
|
+
Object.defineProperty(exports, "TokenType", { enumerable: true, get: function () { return config_1.TokenType; } });
|
|
234
|
+
Object.defineProperty(exports, "isCollateralConfig", { enumerable: true, get: function () { return config_1.isCollateralConfig; } });
|
|
235
|
+
Object.defineProperty(exports, "isUriConfig", { enumerable: true, get: function () { return config_1.isUriConfig; } });
|
|
236
|
+
var deploy_1 = require("./token/deploy");
|
|
237
|
+
Object.defineProperty(exports, "HypERC20Deployer", { enumerable: true, get: function () { return deploy_1.HypERC20Deployer; } });
|
|
238
|
+
Object.defineProperty(exports, "HypERC721Deployer", { enumerable: true, get: function () { return deploy_1.HypERC721Deployer; } });
|
|
219
239
|
var MultiGeneric_1 = require("./utils/MultiGeneric");
|
|
220
240
|
Object.defineProperty(exports, "MultiGeneric", { enumerable: true, get: function () { return MultiGeneric_1.MultiGeneric; } });
|
|
221
241
|
var filter_1 = require("./utils/filter");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAkD;AAAzC,4GAAA,YAAY,OAAA;AACrB,2DAMgC;AAJ9B,kHAAA,cAAc,OAAA;AACd,kHAAA,cAAc,OAAA;AACd,uHAAA,mBAAmB,OAAA;AACnB,oHAAA,gBAAgB,OAAA;AAElB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAkD;AAAzC,4GAAA,YAAY,OAAA;AACrB,2DAMgC;AAJ9B,kHAAA,cAAc,OAAA;AACd,kHAAA,cAAc,OAAA;AACd,uHAAA,mBAAmB,OAAA;AACnB,oHAAA,gBAAgB,OAAA;AAElB,wDAMgC;AAL9B,kHAAA,iBAAiB,OAAA;AACjB,8GAAA,aAAa,OAAA;AACb,sHAAA,qBAAqB,OAAA;AACrB,yHAAA,wBAAwB,OAAA;AACxB,sHAAA,qBAAqB,OAAA;AAEvB,0CASyB;AARvB,mGAAA,SAAS,OAAA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
1
|
+
import { StaticAddressSetFactory, StaticThresholdAddressSetFactory } from '@hyperlane-xyz/core';
|
|
1
2
|
import { Address } from '@hyperlane-xyz/utils';
|
|
2
3
|
import { HyperlaneApp } from '../app/HyperlaneApp';
|
|
3
4
|
import { HyperlaneEnvironment } from '../consts/environments';
|
|
4
5
|
import { HyperlaneAddressesMap, HyperlaneContracts } from '../contracts/types';
|
|
5
6
|
import { MultiProvider } from '../providers/MultiProvider';
|
|
6
|
-
import { ChainName } from '../types';
|
|
7
|
-
import {
|
|
7
|
+
import { ChainMap, ChainName } from '../types';
|
|
8
|
+
import { FactoryFactories } from './contracts';
|
|
8
9
|
import { DeployedIsm, IsmConfig } from './types';
|
|
9
|
-
export declare class HyperlaneIsmFactory extends HyperlaneApp<
|
|
10
|
+
export declare class HyperlaneIsmFactory extends HyperlaneApp<FactoryFactories> {
|
|
11
|
+
deployedIsms: ChainMap<any>;
|
|
10
12
|
static fromEnvironment<Env extends HyperlaneEnvironment>(env: Env, multiProvider: MultiProvider): HyperlaneIsmFactory;
|
|
11
13
|
static fromAddressesMap(addressesMap: HyperlaneAddressesMap<any>, multiProvider: MultiProvider): HyperlaneIsmFactory;
|
|
12
14
|
deploy(chain: ChainName, config: IsmConfig, origin?: ChainName): Promise<DeployedIsm>;
|
|
13
15
|
private deployMultisigIsm;
|
|
14
16
|
private deployRoutingIsm;
|
|
15
17
|
private deployAggregationIsm;
|
|
16
|
-
private
|
|
18
|
+
private deployOpStackIsm;
|
|
19
|
+
deployStaticAddressSet(chain: ChainName, factory: StaticThresholdAddressSetFactory | StaticAddressSetFactory, values: Address[], threshold?: number): Promise<Address>;
|
|
17
20
|
}
|
|
18
21
|
export declare function moduleCanCertainlyVerify(destModule: Address | IsmConfig, multiProvider: MultiProvider, origin: ChainName, destination: ChainName): Promise<boolean>;
|
|
19
|
-
export declare function moduleMatchesConfig(chain: ChainName, moduleAddress: Address, config: IsmConfig, multiProvider: MultiProvider, contracts: HyperlaneContracts<
|
|
22
|
+
export declare function moduleMatchesConfig(chain: ChainName, moduleAddress: Address, config: IsmConfig, multiProvider: MultiProvider, contracts: HyperlaneContracts<FactoryFactories>, _origin?: ChainName): Promise<boolean>;
|
|
20
23
|
export declare function collectValidators(origin: ChainName, config: IsmConfig): Set<string>;
|
|
21
24
|
//# sourceMappingURL=HyperlaneIsmFactory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HyperlaneIsmFactory.d.ts","sourceRoot":"","sources":["../../src/ism/HyperlaneIsmFactory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HyperlaneIsmFactory.d.ts","sourceRoot":"","sources":["../../src/ism/HyperlaneIsmFactory.ts"],"names":[],"mappings":"AAGA,OAAO,EAOL,uBAAuB,EAEvB,gCAAgC,EAEjC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAkC,MAAM,sBAAsB,CAAC;AAE/E,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EACL,oBAAoB,EAErB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAoB,MAAM,aAAa,CAAC;AACjE,OAAO,EAEL,WAAW,EACX,SAAS,EAOV,MAAM,SAAS,CAAC;AAEjB,qBAAa,mBAAoB,SAAQ,YAAY,CAAC,gBAAgB,CAAC;IAI9D,YAAY,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAM;IAExC,MAAM,CAAC,eAAe,CAAC,GAAG,SAAS,oBAAoB,EACrD,GAAG,EAAE,GAAG,EACR,aAAa,EAAE,aAAa,GAC3B,mBAAmB;IAStB,MAAM,CAAC,gBAAgB,CACrB,YAAY,EAAE,qBAAqB,CAAC,GAAG,CAAC,EACxC,aAAa,EAAE,aAAa,GAC3B,mBAAmB;IAahB,MAAM,CACV,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,SAAS,EACjB,MAAM,CAAC,EAAE,SAAS,GACjB,OAAO,CAAC,WAAW,CAAC;YAsET,iBAAiB;YAiBjB,gBAAgB;YA8ChB,oBAAoB;YAqBpB,gBAAgB;IASxB,sBAAsB,CAC1B,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,gCAAgC,GAAG,uBAAuB,EACnE,MAAM,EAAE,OAAO,EAAE,EACjB,SAAS,SAAgB,GACxB,OAAO,CAAC,OAAO,CAAC;CA2BpB;AAOD,wBAAsB,wBAAwB,CAC5C,UAAU,EAAE,OAAO,GAAG,SAAS,EAC/B,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,SAAS,GACrB,OAAO,CAAC,OAAO,CAAC,CA4GlB;AAED,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,SAAS,EAChB,aAAa,EAAE,OAAO,EACtB,MAAM,EAAE,SAAS,EACjB,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,EAC/C,OAAO,CAAC,EAAE,SAAS,GAClB,OAAO,CAAC,OAAO,CAAC,CAqHlB;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,SAAS,GAChB,GAAG,CAAC,MAAM,CAAC,CAsCb"}
|
|
@@ -4,10 +4,10 @@ const chai_1 = require("chai");
|
|
|
4
4
|
const hardhat_1 = require("hardhat");
|
|
5
5
|
const utils_1 = require("@hyperlane-xyz/utils");
|
|
6
6
|
const chains_1 = require("../consts/chains");
|
|
7
|
+
const HyperlaneProxyFactoryDeployer_1 = require("../deploy/HyperlaneProxyFactoryDeployer");
|
|
7
8
|
const MultiProvider_1 = require("../providers/MultiProvider");
|
|
8
9
|
const testUtils_1 = require("../test/testUtils");
|
|
9
10
|
const HyperlaneIsmFactory_1 = require("./HyperlaneIsmFactory");
|
|
10
|
-
const HyperlaneIsmFactoryDeployer_1 = require("./HyperlaneIsmFactoryDeployer");
|
|
11
11
|
const types_1 = require("./types");
|
|
12
12
|
function randomModuleType() {
|
|
13
13
|
const choices = [
|
|
@@ -21,7 +21,7 @@ const randomMultisigIsmConfig = (m, n) => {
|
|
|
21
21
|
const emptyArray = new Array(n).fill(0);
|
|
22
22
|
const validators = emptyArray.map(() => (0, testUtils_1.randomAddress)());
|
|
23
23
|
return {
|
|
24
|
-
type: types_1.
|
|
24
|
+
type: types_1.IsmType.MERKLE_ROOT_MULTISIG,
|
|
25
25
|
validators,
|
|
26
26
|
threshold: m,
|
|
27
27
|
};
|
|
@@ -34,7 +34,7 @@ const randomIsmConfig = (depth = 0, maxDepth = 2) => {
|
|
|
34
34
|
}
|
|
35
35
|
else if (moduleType === types_1.ModuleType.ROUTING) {
|
|
36
36
|
const config = {
|
|
37
|
-
type: types_1.
|
|
37
|
+
type: types_1.IsmType.ROUTING,
|
|
38
38
|
owner: (0, testUtils_1.randomAddress)(),
|
|
39
39
|
domains: Object.fromEntries(chains_1.TestChains.map((c) => [c, randomIsmConfig(depth + 1)])),
|
|
40
40
|
};
|
|
@@ -46,7 +46,7 @@ const randomIsmConfig = (depth = 0, maxDepth = 2) => {
|
|
|
46
46
|
.fill(0)
|
|
47
47
|
.map(() => randomIsmConfig(depth + 1));
|
|
48
48
|
const config = {
|
|
49
|
-
type: types_1.
|
|
49
|
+
type: types_1.IsmType.AGGREGATION,
|
|
50
50
|
threshold: (0, testUtils_1.randomInt)(n, 1),
|
|
51
51
|
modules,
|
|
52
52
|
};
|
|
@@ -62,8 +62,8 @@ describe('HyperlaneIsmFactory', async () => {
|
|
|
62
62
|
before(async () => {
|
|
63
63
|
const [signer] = await hardhat_1.ethers.getSigners();
|
|
64
64
|
const multiProvider = MultiProvider_1.MultiProvider.createTestMultiProvider({ signer });
|
|
65
|
-
const deployer = new
|
|
66
|
-
const contracts = await deployer.deploy([chain]);
|
|
65
|
+
const deployer = new HyperlaneProxyFactoryDeployer_1.HyperlaneProxyFactoryDeployer(multiProvider);
|
|
66
|
+
const contracts = await deployer.deploy({ [chain]: {} });
|
|
67
67
|
factory = new HyperlaneIsmFactory_1.HyperlaneIsmFactory(contracts, multiProvider);
|
|
68
68
|
});
|
|
69
69
|
it('deploys a simple ism', async () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HyperlaneIsmFactory.hardhat-test.js","sourceRoot":"","sources":["../../src/ism/HyperlaneIsmFactory.hardhat-test.ts"],"names":[],"mappings":";;AAAA,+BAA8B;AAC9B,qCAAiC;AAEjC,gDAA6C;AAE7C,6CAA8C;AAC9C,8DAA2D;AAC3D,iDAA6D;AAE7D,+DAG+B;AAC/B
|
|
1
|
+
{"version":3,"file":"HyperlaneIsmFactory.hardhat-test.js","sourceRoot":"","sources":["../../src/ism/HyperlaneIsmFactory.hardhat-test.ts"],"names":[],"mappings":";;AAAA,+BAA8B;AAC9B,qCAAiC;AAEjC,gDAA6C;AAE7C,6CAA8C;AAC9C,2FAAwF;AACxF,8DAA2D;AAC3D,iDAA6D;AAE7D,+DAG+B;AAC/B,mCAOiB;AAEjB,SAAS,gBAAgB;IACvB,MAAM,OAAO,GAAG;QACd,kBAAU,CAAC,WAAW;QACtB,kBAAU,CAAC,oBAAoB;QAC/B,kBAAU,CAAC,OAAO;KACnB,CAAC;IACF,OAAO,OAAO,CAAC,IAAA,qBAAS,EAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,uBAAuB,GAAG,CAAC,CAAS,EAAE,CAAS,EAAqB,EAAE;IAC1E,MAAM,UAAU,GAAG,IAAI,KAAK,CAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAChD,MAAM,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAA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 = require("../consts/environments");
|
|
|
10
10
|
const contracts_1 = require("../contracts/contracts");
|
|
11
11
|
const contracts_2 = require("./contracts");
|
|
12
12
|
const types_1 = require("./types");
|
|
13
|
-
// TODO this should handle cached addresses like the other deployers
|
|
14
13
|
class HyperlaneIsmFactory extends HyperlaneApp_1.HyperlaneApp {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
// The shape of this object is `ChainMap<Address | ChainMap<Address>`,
|
|
17
|
+
// although `any` is use here because that type breaks a lot of signatures.
|
|
18
|
+
// TODO: fix this in the next refactoring
|
|
19
|
+
this.deployedIsms = {};
|
|
20
|
+
}
|
|
15
21
|
static fromEnvironment(env, multiProvider) {
|
|
16
22
|
const envAddresses = environments_1.hyperlaneEnvironments[env];
|
|
17
23
|
if (!envAddresses) {
|
|
18
24
|
throw new Error(`No addresses found for ${env}`);
|
|
19
25
|
}
|
|
26
|
+
/// @ts-ignore
|
|
20
27
|
return HyperlaneIsmFactory.fromAddressesMap(envAddresses, multiProvider);
|
|
21
28
|
}
|
|
22
29
|
static fromAddressesMap(addressesMap, multiProvider) {
|
|
23
|
-
const helper = (0, contracts_1.appFromAddressesMapHelper)(addressesMap, contracts_2.
|
|
30
|
+
const helper = (0, contracts_1.appFromAddressesMapHelper)(addressesMap, contracts_2.factoryFactories, multiProvider);
|
|
24
31
|
return new HyperlaneIsmFactory(helper.contractsMap, helper.multiProvider, (0, debug_1.debug)('hyperlane:IsmFactoryApp'));
|
|
25
32
|
}
|
|
26
33
|
async deploy(chain, config, origin) {
|
|
34
|
+
let contract;
|
|
27
35
|
if (typeof config === 'string') {
|
|
28
36
|
// TODO: return the appropriate ISM type
|
|
29
37
|
return core_1.IInterchainSecurityModule__factory.connect(config, this.multiProvider.getSignerOrProvider(chain));
|
|
30
38
|
}
|
|
31
|
-
if (config.type === types_1.
|
|
32
|
-
config.type === types_1.
|
|
33
|
-
config.type === types_1.ModuleType.LEGACY_MULTISIG) {
|
|
39
|
+
if (config.type === types_1.IsmType.MERKLE_ROOT_MULTISIG ||
|
|
40
|
+
config.type === types_1.IsmType.MESSAGE_ID_MULTISIG) {
|
|
34
41
|
switch (config.type) {
|
|
35
|
-
case types_1.
|
|
36
|
-
this.logger(`Deploying Legacy Multisig ISM to ${chain} for verifying ${origin}`);
|
|
37
|
-
break;
|
|
38
|
-
case types_1.ModuleType.MERKLE_ROOT_MULTISIG:
|
|
42
|
+
case types_1.IsmType.MERKLE_ROOT_MULTISIG:
|
|
39
43
|
this.logger(`Deploying Merkle Root Multisig ISM to ${chain} for verifying ${origin}`);
|
|
40
44
|
break;
|
|
41
|
-
case types_1.
|
|
45
|
+
case types_1.IsmType.MESSAGE_ID_MULTISIG:
|
|
42
46
|
this.logger(`Deploying Message ID Multisig ISM to ${chain} for verifying ${origin}`);
|
|
43
47
|
break;
|
|
44
48
|
}
|
|
45
|
-
|
|
49
|
+
contract = await this.deployMultisigIsm(chain, config);
|
|
46
50
|
}
|
|
47
|
-
else if (config.type === types_1.
|
|
51
|
+
else if (config.type === types_1.IsmType.ROUTING) {
|
|
48
52
|
this.logger(`Deploying Routing ISM to ${chain} for verifying ${Object.keys(config.domains)}`);
|
|
49
|
-
|
|
53
|
+
contract = await this.deployRoutingIsm(chain, config);
|
|
50
54
|
}
|
|
51
|
-
else if (config.type === types_1.
|
|
55
|
+
else if (config.type === types_1.IsmType.AGGREGATION) {
|
|
52
56
|
this.logger(`Deploying Aggregation ISM to ${chain}`);
|
|
53
|
-
|
|
57
|
+
contract = await this.deployAggregationIsm(chain, config, origin);
|
|
58
|
+
}
|
|
59
|
+
else if (config.type === types_1.IsmType.OP_STACK) {
|
|
60
|
+
this.logger(`Deploying Op Stack ISM to ${chain} for verifying ${origin}`);
|
|
61
|
+
contract = await this.deployOpStackIsm(chain, config);
|
|
62
|
+
}
|
|
63
|
+
else if (config.type === types_1.IsmType.TEST_ISM) {
|
|
64
|
+
this.logger(`Deploying Test ISM to ${chain}`);
|
|
65
|
+
contract = await this.multiProvider.handleDeploy(chain, new core_1.TestIsm__factory(), []);
|
|
54
66
|
}
|
|
55
67
|
else {
|
|
56
68
|
throw new Error(`Unsupported ISM type`);
|
|
57
69
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if (
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
this.
|
|
69
|
-
await this.multiProvider.handleTx(chain, multisig.enrollValidators([originDomain], [config.validators]));
|
|
70
|
-
await this.multiProvider.handleTx(chain, multisig.setThreshold(originDomain, config.threshold));
|
|
71
|
-
address = multisig.address;
|
|
70
|
+
const ismType = config.type;
|
|
71
|
+
if (!this.deployedIsms[chain]) {
|
|
72
|
+
this.deployedIsms[chain] = {};
|
|
73
|
+
}
|
|
74
|
+
if (origin) {
|
|
75
|
+
// if we're deploying network-specific contracts (e.g. ISMs), store them as sub-entry
|
|
76
|
+
// under that network's key (`origin`)
|
|
77
|
+
if (!this.deployedIsms[chain][origin]) {
|
|
78
|
+
this.deployedIsms[chain][origin] = {};
|
|
79
|
+
}
|
|
80
|
+
this.deployedIsms[chain][origin][ismType] = contract;
|
|
72
81
|
}
|
|
73
82
|
else {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
: this.getContracts(chain).messageIdMultisigIsmFactory;
|
|
77
|
-
address = await this.deployMOfNFactory(chain, multisigIsmFactory, config.validators, config.threshold);
|
|
83
|
+
// otherwise store the entry directly
|
|
84
|
+
this.deployedIsms[chain][ismType] = contract;
|
|
78
85
|
}
|
|
86
|
+
return contract;
|
|
87
|
+
}
|
|
88
|
+
async deployMultisigIsm(chain, config) {
|
|
89
|
+
const signer = this.multiProvider.getSigner(chain);
|
|
90
|
+
const multisigIsmFactory = config.type === types_1.IsmType.MERKLE_ROOT_MULTISIG
|
|
91
|
+
? this.getContracts(chain).merkleRootMultisigIsmFactory
|
|
92
|
+
: this.getContracts(chain).messageIdMultisigIsmFactory;
|
|
93
|
+
const address = await this.deployStaticAddressSet(chain, multisigIsmFactory, config.validators, config.threshold);
|
|
79
94
|
return core_1.IMultisigIsm__factory.connect(address, signer);
|
|
80
95
|
}
|
|
81
96
|
async deployRoutingIsm(chain, config) {
|
|
82
97
|
const signer = this.multiProvider.getSigner(chain);
|
|
83
98
|
const routingIsmFactory = this.getContracts(chain).routingIsmFactory;
|
|
84
99
|
const isms = {};
|
|
85
|
-
for (const origin
|
|
100
|
+
for (const origin in config.domains) {
|
|
86
101
|
const ism = await this.deploy(chain, config.domains[origin], origin);
|
|
87
102
|
isms[origin] = ism.address;
|
|
88
103
|
}
|
|
@@ -109,26 +124,30 @@ class HyperlaneIsmFactory extends HyperlaneApp_1.HyperlaneApp {
|
|
|
109
124
|
const address = dispatchLogs[0].args['module'];
|
|
110
125
|
return core_1.IRoutingIsm__factory.connect(address, signer);
|
|
111
126
|
}
|
|
112
|
-
async deployAggregationIsm(chain, config) {
|
|
127
|
+
async deployAggregationIsm(chain, config, origin) {
|
|
113
128
|
const signer = this.multiProvider.getSigner(chain);
|
|
114
129
|
const aggregationIsmFactory = this.getContracts(chain).aggregationIsmFactory;
|
|
115
130
|
const addresses = [];
|
|
116
131
|
for (const module of config.modules) {
|
|
117
|
-
addresses.push((await this.deploy(chain, module)).address);
|
|
132
|
+
addresses.push((await this.deploy(chain, module, origin)).address);
|
|
118
133
|
}
|
|
119
|
-
const address = await this.
|
|
134
|
+
const address = await this.deployStaticAddressSet(chain, aggregationIsmFactory, addresses, config.threshold);
|
|
120
135
|
return core_1.IAggregationIsm__factory.connect(address, signer);
|
|
121
136
|
}
|
|
122
|
-
async
|
|
137
|
+
async deployOpStackIsm(chain, config) {
|
|
138
|
+
const deployedIsm = await this.multiProvider.handleDeploy(chain, new core_1.OPStackIsm__factory(), [config.nativeBridge]);
|
|
139
|
+
return deployedIsm;
|
|
140
|
+
}
|
|
141
|
+
async deployStaticAddressSet(chain, factory, values, threshold = values.length) {
|
|
123
142
|
const sorted = [...values].sort();
|
|
124
|
-
const address = await factory
|
|
125
|
-
const
|
|
126
|
-
const code = await provider.getCode(address);
|
|
143
|
+
const address = await factory['getAddress(address[],uint8)'](sorted, threshold);
|
|
144
|
+
const code = await this.multiProvider.getProvider(chain).getCode(address);
|
|
127
145
|
if (code === '0x') {
|
|
128
146
|
this.logger(`Deploying new ${threshold} of ${values.length} address set to ${chain}`);
|
|
129
147
|
const overrides = this.multiProvider.getTransactionOverrides(chain);
|
|
130
|
-
const hash = await factory
|
|
148
|
+
const hash = await factory['deploy(address[],uint8)'](sorted, threshold, overrides);
|
|
131
149
|
await this.multiProvider.handleTx(chain, hash);
|
|
150
|
+
// TODO: add proxy verification artifact?
|
|
132
151
|
}
|
|
133
152
|
else {
|
|
134
153
|
this.logger(`Recovered ${threshold} of ${values.length} address set on ${chain}`);
|
|
@@ -150,7 +169,6 @@ async function moduleCanCertainlyVerify(destModule, multiProvider, origin, desti
|
|
|
150
169
|
try {
|
|
151
170
|
const moduleType = await module.moduleType();
|
|
152
171
|
if (moduleType === types_1.ModuleType.MERKLE_ROOT_MULTISIG ||
|
|
153
|
-
moduleType === types_1.ModuleType.LEGACY_MULTISIG ||
|
|
154
172
|
moduleType === types_1.ModuleType.MESSAGE_ID_MULTISIG) {
|
|
155
173
|
const multisigModule = core_1.IMultisigIsm__factory.connect(destModule, provider);
|
|
156
174
|
const [, threshold] = await multisigModule.validatorsAndThreshold(message);
|
|
@@ -185,13 +203,14 @@ async function moduleCanCertainlyVerify(destModule, multiProvider, origin, desti
|
|
|
185
203
|
else {
|
|
186
204
|
// destModule is an IsmConfig
|
|
187
205
|
switch (destModule.type) {
|
|
188
|
-
case types_1.
|
|
189
|
-
case types_1.
|
|
190
|
-
case types_1.ModuleType.LEGACY_MULTISIG:
|
|
206
|
+
case types_1.IsmType.MERKLE_ROOT_MULTISIG:
|
|
207
|
+
case types_1.IsmType.MESSAGE_ID_MULTISIG:
|
|
191
208
|
return destModule.threshold > 0;
|
|
192
|
-
case types_1.
|
|
193
|
-
|
|
194
|
-
|
|
209
|
+
case types_1.IsmType.ROUTING: {
|
|
210
|
+
const checking = moduleCanCertainlyVerify(destModule.domains[destination], multiProvider, origin, destination);
|
|
211
|
+
return checking;
|
|
212
|
+
}
|
|
213
|
+
case types_1.IsmType.AGGREGATION: {
|
|
195
214
|
let verified = 0;
|
|
196
215
|
for (const subModule of destModule.modules) {
|
|
197
216
|
const canVerify = await moduleCanCertainlyVerify(subModule, multiProvider, origin, destination);
|
|
@@ -201,11 +220,18 @@ async function moduleCanCertainlyVerify(destModule, multiProvider, origin, desti
|
|
|
201
220
|
}
|
|
202
221
|
return verified >= destModule.threshold;
|
|
203
222
|
}
|
|
223
|
+
case types_1.IsmType.OP_STACK:
|
|
224
|
+
return destModule.nativeBridge !== ethers_1.ethers.constants.AddressZero;
|
|
225
|
+
case types_1.IsmType.TEST_ISM: {
|
|
226
|
+
return true;
|
|
227
|
+
}
|
|
228
|
+
default:
|
|
229
|
+
throw new Error(`Unsupported module type: ${destModule.type}`);
|
|
204
230
|
}
|
|
205
231
|
}
|
|
206
232
|
}
|
|
207
233
|
exports.moduleCanCertainlyVerify = moduleCanCertainlyVerify;
|
|
208
|
-
async function moduleMatchesConfig(chain, moduleAddress, config, multiProvider, contracts,
|
|
234
|
+
async function moduleMatchesConfig(chain, moduleAddress, config, multiProvider, contracts, _origin) {
|
|
209
235
|
if (typeof config === 'string') {
|
|
210
236
|
return (0, utils_1.eqAddress)(moduleAddress, config);
|
|
211
237
|
}
|
|
@@ -217,37 +243,23 @@ async function moduleMatchesConfig(chain, moduleAddress, config, multiProvider,
|
|
|
217
243
|
const provider = multiProvider.getProvider(chain);
|
|
218
244
|
const module = core_1.IInterchainSecurityModule__factory.connect(moduleAddress, provider);
|
|
219
245
|
const actualType = await module.moduleType();
|
|
220
|
-
if (actualType !== config.type)
|
|
246
|
+
if (actualType !== (0, types_1.ismTypeToModuleType)(config.type))
|
|
221
247
|
return false;
|
|
222
248
|
let matches = true;
|
|
223
249
|
switch (config.type) {
|
|
224
|
-
case types_1.
|
|
250
|
+
case types_1.IsmType.MERKLE_ROOT_MULTISIG: {
|
|
225
251
|
// A MerkleRootMultisigIsm matches if validators and threshold match the config
|
|
226
252
|
const expectedAddress = await contracts.merkleRootMultisigIsmFactory.getAddress(config.validators.sort(), config.threshold);
|
|
227
253
|
matches = (0, utils_1.eqAddress)(expectedAddress, module.address);
|
|
228
254
|
break;
|
|
229
255
|
}
|
|
230
|
-
case types_1.
|
|
256
|
+
case types_1.IsmType.MESSAGE_ID_MULTISIG: {
|
|
231
257
|
// A MessageIdMultisigIsm matches if validators and threshold match the config
|
|
232
258
|
const expectedAddress = await contracts.messageIdMultisigIsmFactory.getAddress(config.validators.sort(), config.threshold);
|
|
233
259
|
matches = (0, utils_1.eqAddress)(expectedAddress, module.address);
|
|
234
260
|
break;
|
|
235
261
|
}
|
|
236
|
-
case types_1.
|
|
237
|
-
const multisigIsm = core_1.LegacyMultisigIsm__factory.connect(moduleAddress, provider);
|
|
238
|
-
if (!origin) {
|
|
239
|
-
throw new Error("Can't check legacy multisig without origin");
|
|
240
|
-
}
|
|
241
|
-
const originDomain = multiProvider.getDomainId(origin);
|
|
242
|
-
const validators = await multisigIsm.validators(originDomain);
|
|
243
|
-
const threshold = await multisigIsm.threshold(originDomain);
|
|
244
|
-
matches =
|
|
245
|
-
JSON.stringify(config.validators.map((s) => s.toLowerCase()).sort()) ===
|
|
246
|
-
JSON.stringify(validators.map((s) => s.toLowerCase()).sort()) &&
|
|
247
|
-
config.threshold === threshold;
|
|
248
|
-
break;
|
|
249
|
-
}
|
|
250
|
-
case types_1.ModuleType.ROUTING: {
|
|
262
|
+
case types_1.IsmType.ROUTING: {
|
|
251
263
|
// A RoutingIsm matches if:
|
|
252
264
|
// 1. The set of domains in the config equals those on-chain
|
|
253
265
|
// 2. The modules for each domain match the config
|
|
@@ -259,13 +271,13 @@ async function moduleMatchesConfig(chain, moduleAddress, config, multiProvider,
|
|
|
259
271
|
// Recursively check that the submodule for each configured
|
|
260
272
|
// domain matches the submodule config.
|
|
261
273
|
for (const [origin, subConfig] of Object.entries(config.domains)) {
|
|
262
|
-
const subModule = await routingIsm.
|
|
274
|
+
const subModule = await routingIsm.module(multiProvider.getDomainId(origin));
|
|
263
275
|
const subModuleMatches = await moduleMatchesConfig(chain, subModule, subConfig, multiProvider, contracts, origin);
|
|
264
276
|
matches = matches && subModuleMatches;
|
|
265
277
|
}
|
|
266
278
|
break;
|
|
267
279
|
}
|
|
268
|
-
case types_1.
|
|
280
|
+
case types_1.IsmType.AGGREGATION: {
|
|
269
281
|
// An AggregationIsm matches if:
|
|
270
282
|
// 1. The threshold matches the config
|
|
271
283
|
// 2. There is a bijection between on and off-chain configured modules
|
|
@@ -290,6 +302,11 @@ async function moduleMatchesConfig(chain, moduleAddress, config, multiProvider,
|
|
|
290
302
|
}
|
|
291
303
|
break;
|
|
292
304
|
}
|
|
305
|
+
case types_1.IsmType.TEST_ISM: {
|
|
306
|
+
// This is just a TestISM
|
|
307
|
+
matches = true;
|
|
308
|
+
break;
|
|
309
|
+
}
|
|
293
310
|
default: {
|
|
294
311
|
throw new Error('Unsupported ModuleType');
|
|
295
312
|
}
|
|
@@ -304,23 +321,26 @@ function collectValidators(origin, config) {
|
|
|
304
321
|
return new Set([]);
|
|
305
322
|
}
|
|
306
323
|
let validators = [];
|
|
307
|
-
if (config.type === types_1.
|
|
308
|
-
config.type === types_1.
|
|
309
|
-
config.type === types_1.ModuleType.LEGACY_MULTISIG) {
|
|
324
|
+
if (config.type === types_1.IsmType.MERKLE_ROOT_MULTISIG ||
|
|
325
|
+
config.type === types_1.IsmType.MESSAGE_ID_MULTISIG) {
|
|
310
326
|
validators = config.validators;
|
|
311
327
|
}
|
|
312
|
-
else if (config.type === types_1.
|
|
328
|
+
else if (config.type === types_1.IsmType.ROUTING) {
|
|
313
329
|
if (Object.keys(config.domains).includes(origin)) {
|
|
314
330
|
const domainValidators = collectValidators(origin, config.domains[origin]);
|
|
315
331
|
validators = [...domainValidators];
|
|
316
332
|
}
|
|
317
333
|
}
|
|
318
|
-
else if (config.type === types_1.
|
|
334
|
+
else if (config.type === types_1.IsmType.AGGREGATION) {
|
|
319
335
|
const aggregatedValidators = config.modules.map((c) => collectValidators(origin, c));
|
|
320
336
|
aggregatedValidators.forEach((set) => {
|
|
321
337
|
validators = validators.concat([...set]);
|
|
322
338
|
});
|
|
323
339
|
}
|
|
340
|
+
else if (config.type === types_1.IsmType.TEST_ISM) {
|
|
341
|
+
// This is just a TestISM
|
|
342
|
+
return new Set([]);
|
|
343
|
+
}
|
|
324
344
|
else {
|
|
325
345
|
throw new Error('Unsupported ModuleType');
|
|
326
346
|
}
|