@hyperlane-xyz/sdk 5.6.1 → 5.7.0
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/consts/multisigIsm.d.ts.map +1 -1
- package/dist/consts/multisigIsm.js +119 -14
- package/dist/consts/multisigIsm.js.map +1 -1
- package/dist/consts/multisigIsm.test.js +13 -0
- package/dist/consts/multisigIsm.test.js.map +1 -1
- package/dist/contracts/contracts.d.ts +3 -0
- package/dist/contracts/contracts.d.ts.map +1 -1
- package/dist/contracts/contracts.js +15 -1
- package/dist/contracts/contracts.js.map +1 -1
- package/dist/core/EvmCoreModule.d.ts.map +1 -1
- package/dist/core/EvmCoreModule.js +2 -8
- package/dist/core/EvmCoreModule.js.map +1 -1
- package/dist/core/HyperlaneCore.d.ts.map +1 -1
- package/dist/core/HyperlaneCore.js +5 -2
- package/dist/core/HyperlaneCore.js.map +1 -1
- package/dist/core/HyperlaneRelayer.d.ts +37 -32
- package/dist/core/HyperlaneRelayer.d.ts.map +1 -1
- package/dist/core/HyperlaneRelayer.js +6 -6
- package/dist/core/HyperlaneRelayer.js.map +1 -1
- package/dist/core/schemas.d.ts +1007 -953
- package/dist/core/schemas.d.ts.map +1 -1
- package/dist/deploy/HyperlaneDeployer.d.ts +1 -0
- package/dist/deploy/HyperlaneDeployer.d.ts.map +1 -1
- package/dist/deploy/HyperlaneDeployer.js +2 -2
- package/dist/deploy/HyperlaneDeployer.js.map +1 -1
- package/dist/deploy/types.d.ts +2 -1
- package/dist/deploy/types.d.ts.map +1 -1
- package/dist/deploy/types.js.map +1 -1
- package/dist/deploy/verify/PostDeploymentContractVerifier.d.ts.map +1 -1
- package/dist/deploy/verify/PostDeploymentContractVerifier.js +1 -1
- package/dist/deploy/verify/PostDeploymentContractVerifier.js.map +1 -1
- package/dist/deploy/verify/utils.d.ts +36 -0
- package/dist/deploy/verify/utils.d.ts.map +1 -1
- package/dist/deploy/verify/utils.js +100 -1
- package/dist/deploy/verify/utils.js.map +1 -1
- package/dist/gas/token-prices.d.ts +7 -7
- package/dist/gas/token-prices.d.ts.map +1 -1
- package/dist/gas/token-prices.js +36 -32
- package/dist/gas/token-prices.js.map +1 -1
- package/dist/gas/utils.d.ts +38 -0
- package/dist/gas/utils.d.ts.map +1 -0
- package/dist/gas/utils.js +145 -0
- package/dist/gas/utils.js.map +1 -0
- package/dist/hook/EvmHookModule.d.ts +9 -4
- package/dist/hook/EvmHookModule.d.ts.map +1 -1
- package/dist/hook/EvmHookModule.js +43 -81
- package/dist/hook/EvmHookModule.js.map +1 -1
- package/dist/hook/EvmHookReader.d.ts +3 -1
- package/dist/hook/EvmHookReader.d.ts.map +1 -1
- package/dist/hook/EvmHookReader.js +9 -2
- package/dist/hook/EvmHookReader.js.map +1 -1
- package/dist/hook/schemas.d.ts +10 -4
- package/dist/hook/schemas.d.ts.map +1 -1
- package/dist/hook/schemas.js +1 -0
- package/dist/hook/schemas.js.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/ism/EvmIsmModule.d.ts +5 -24
- package/dist/ism/EvmIsmModule.d.ts.map +1 -1
- package/dist/ism/EvmIsmModule.js +22 -222
- package/dist/ism/EvmIsmModule.js.map +1 -1
- package/dist/ism/EvmIsmReader.d.ts +3 -1
- package/dist/ism/EvmIsmReader.d.ts.map +1 -1
- package/dist/ism/EvmIsmReader.js +10 -4
- package/dist/ism/EvmIsmReader.js.map +1 -1
- package/dist/ism/HyperlaneIsmFactory.d.ts +17 -4
- package/dist/ism/HyperlaneIsmFactory.d.ts.map +1 -1
- package/dist/ism/HyperlaneIsmFactory.hardhat-test.js +0 -1
- package/dist/ism/HyperlaneIsmFactory.hardhat-test.js.map +1 -1
- package/dist/ism/HyperlaneIsmFactory.js +30 -17
- package/dist/ism/HyperlaneIsmFactory.js.map +1 -1
- package/dist/ism/metadata/arbL2ToL1.hardhat-test.js +20 -5
- package/dist/ism/metadata/arbL2ToL1.hardhat-test.js.map +1 -1
- package/dist/metadata/agentConfig.d.ts +5 -5
- package/dist/metadata/warpRouteConfig.d.ts +10 -0
- package/dist/metadata/warpRouteConfig.d.ts.map +1 -1
- package/dist/metadata/warpRouteConfig.js +1 -0
- package/dist/metadata/warpRouteConfig.js.map +1 -1
- package/dist/middleware/account/InterchainAccount.d.ts.map +1 -1
- package/dist/middleware/account/InterchainAccount.js +4 -1
- package/dist/middleware/account/InterchainAccount.js.map +1 -1
- package/dist/router/ProxiedRouterDeployer.d.ts.map +1 -1
- package/dist/router/ProxiedRouterDeployer.js +10 -2
- package/dist/router/ProxiedRouterDeployer.js.map +1 -1
- package/dist/router/schemas.d.ts +155 -90
- package/dist/router/schemas.d.ts.map +1 -1
- package/dist/router/schemas.js +6 -1
- package/dist/router/schemas.js.map +1 -1
- package/dist/router/types.d.ts +2 -1
- package/dist/router/types.d.ts.map +1 -1
- package/dist/router/types.js.map +1 -1
- package/dist/schemas.d.ts +13 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +3 -0
- package/dist/schemas.js.map +1 -1
- package/dist/token/EvmERC20WarpModule.d.ts +9 -0
- package/dist/token/EvmERC20WarpModule.d.ts.map +1 -1
- package/dist/token/EvmERC20WarpModule.hardhat-test.js +67 -2
- package/dist/token/EvmERC20WarpModule.hardhat-test.js.map +1 -1
- package/dist/token/EvmERC20WarpModule.js +61 -10
- package/dist/token/EvmERC20WarpModule.js.map +1 -1
- package/dist/token/EvmERC20WarpRouteReader.d.ts +4 -1
- package/dist/token/EvmERC20WarpRouteReader.d.ts.map +1 -1
- package/dist/token/EvmERC20WarpRouteReader.hardhat-test.js +0 -1
- package/dist/token/EvmERC20WarpRouteReader.hardhat-test.js.map +1 -1
- package/dist/token/EvmERC20WarpRouteReader.js +26 -1
- package/dist/token/EvmERC20WarpRouteReader.js.map +1 -1
- package/dist/token/IToken.d.ts +2 -2
- package/dist/token/adapters/SealevelTokenAdapter.d.ts.map +1 -1
- package/dist/token/adapters/SealevelTokenAdapter.js +2 -2
- package/dist/token/adapters/SealevelTokenAdapter.js.map +1 -1
- package/dist/token/deploy.d.ts.map +1 -1
- package/dist/token/deploy.js +18 -7
- package/dist/token/deploy.js.map +1 -1
- package/dist/token/schemas.d.ts +206 -120
- package/dist/token/schemas.d.ts.map +1 -1
- package/dist/token/schemas.js +5 -1
- package/dist/token/schemas.js.map +1 -1
- package/dist/utils/cosmos.d.ts +12 -12
- package/dist/warp/types.d.ts +4 -4
- package/package.json +3 -3
- package/dist/deploy/EvmModuleDeployer.d.ts +0 -93
- package/dist/deploy/EvmModuleDeployer.d.ts.map +0 -1
- package/dist/deploy/EvmModuleDeployer.js +0 -187
- package/dist/deploy/EvmModuleDeployer.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/token/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,qBAAqB,EAAE,eAAe,SAAS,CAAC,qBAAqB,0BAA0B,SAAS,CAAC,eAAe,EAAE;IAC1H,iBAAiB,EAAE,uFAAuF;CAC3G,CAAC;AACF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;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AAC;QAChB,CAAC,CAAsC,CAAC;IAC1C,CAAC;IAED,GAAG,CAAC,QAAQ,CAAC;QACX,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,MAAM;QAC3B,OAAO,EAAE,iCAAiC,CAAC,qBAAqB;KACjE,CAAC,CAAC;IAEH,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,qDAAqD;AACvE,CAAC,CAAC,CAAC;AAEL,SAAS,iCAAiC,CACxC,qBAAwD;IAExD,qGAAqG;IACrG,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,MAAM,CAC/D,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,wBAAwB,CAAC,MAAM,CAAC,CACnD,CAAC;IAEF,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAE5C,6CAA6C;IAC7C,MAAM,kBAAkB,GAAY,YAAY,CAAC,KAAK,CACpD,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,uBAAuB,CAAC,MAAM,CAAC,CACzD,CAAC;IACF,OAAO,kBAAkB,CAAC;AAC5B,CAAC"}
|
package/dist/utils/cosmos.d.ts
CHANGED
|
@@ -810,12 +810,12 @@ export declare const CosmosChainSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
810
810
|
address: z.ZodString;
|
|
811
811
|
provider: z.ZodOptional<z.ZodString>;
|
|
812
812
|
}, "strict", z.ZodTypeAny, {
|
|
813
|
-
id: string;
|
|
814
813
|
address: string;
|
|
814
|
+
id: string;
|
|
815
815
|
provider?: string | undefined;
|
|
816
816
|
}, {
|
|
817
|
-
id: string;
|
|
818
817
|
address: string;
|
|
818
|
+
id: string;
|
|
819
819
|
provider?: string | undefined;
|
|
820
820
|
}>, "many">>;
|
|
821
821
|
persistent_peers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -823,34 +823,34 @@ export declare const CosmosChainSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
823
823
|
address: z.ZodString;
|
|
824
824
|
provider: z.ZodOptional<z.ZodString>;
|
|
825
825
|
}, "strict", z.ZodTypeAny, {
|
|
826
|
-
id: string;
|
|
827
826
|
address: string;
|
|
827
|
+
id: string;
|
|
828
828
|
provider?: string | undefined;
|
|
829
829
|
}, {
|
|
830
|
-
id: string;
|
|
831
830
|
address: string;
|
|
831
|
+
id: string;
|
|
832
832
|
provider?: string | undefined;
|
|
833
833
|
}>, "many">>;
|
|
834
834
|
}, "strict", z.ZodTypeAny, {
|
|
835
835
|
seeds?: {
|
|
836
|
-
id: string;
|
|
837
836
|
address: string;
|
|
837
|
+
id: string;
|
|
838
838
|
provider?: string | undefined;
|
|
839
839
|
}[] | undefined;
|
|
840
840
|
persistent_peers?: {
|
|
841
|
-
id: string;
|
|
842
841
|
address: string;
|
|
842
|
+
id: string;
|
|
843
843
|
provider?: string | undefined;
|
|
844
844
|
}[] | undefined;
|
|
845
845
|
}, {
|
|
846
846
|
seeds?: {
|
|
847
|
-
id: string;
|
|
848
847
|
address: string;
|
|
848
|
+
id: string;
|
|
849
849
|
provider?: string | undefined;
|
|
850
850
|
}[] | undefined;
|
|
851
851
|
persistent_peers?: {
|
|
852
|
-
id: string;
|
|
853
852
|
address: string;
|
|
853
|
+
id: string;
|
|
854
854
|
provider?: string | undefined;
|
|
855
855
|
}[] | undefined;
|
|
856
856
|
}>>;
|
|
@@ -1192,13 +1192,13 @@ export declare const CosmosChainSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
1192
1192
|
description?: string | undefined;
|
|
1193
1193
|
peers?: {
|
|
1194
1194
|
seeds?: {
|
|
1195
|
-
id: string;
|
|
1196
1195
|
address: string;
|
|
1196
|
+
id: string;
|
|
1197
1197
|
provider?: string | undefined;
|
|
1198
1198
|
}[] | undefined;
|
|
1199
1199
|
persistent_peers?: {
|
|
1200
|
-
id: string;
|
|
1201
1200
|
address: string;
|
|
1201
|
+
id: string;
|
|
1202
1202
|
provider?: string | undefined;
|
|
1203
1203
|
}[] | undefined;
|
|
1204
1204
|
} | undefined;
|
|
@@ -1414,13 +1414,13 @@ export declare const CosmosChainSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
1414
1414
|
description?: string | undefined;
|
|
1415
1415
|
peers?: {
|
|
1416
1416
|
seeds?: {
|
|
1417
|
-
id: string;
|
|
1418
1417
|
address: string;
|
|
1418
|
+
id: string;
|
|
1419
1419
|
provider?: string | undefined;
|
|
1420
1420
|
}[] | undefined;
|
|
1421
1421
|
persistent_peers?: {
|
|
1422
|
-
id: string;
|
|
1423
1422
|
address: string;
|
|
1423
|
+
id: string;
|
|
1424
1424
|
provider?: string | undefined;
|
|
1425
1425
|
}[] | undefined;
|
|
1426
1426
|
} | undefined;
|
package/dist/warp/types.d.ts
CHANGED
|
@@ -86,8 +86,8 @@ export declare const WarpCoreConfigSchema: z.ZodObject<{
|
|
|
86
86
|
symbol: string;
|
|
87
87
|
name: string;
|
|
88
88
|
decimals: number;
|
|
89
|
-
addressOrDenom: string | null;
|
|
90
89
|
chainName: string;
|
|
90
|
+
addressOrDenom: string | null;
|
|
91
91
|
standard: import("../index.js").TokenStandard;
|
|
92
92
|
collateralAddressOrDenom?: string | undefined;
|
|
93
93
|
igpTokenAddressOrDenom?: string | undefined;
|
|
@@ -113,8 +113,8 @@ export declare const WarpCoreConfigSchema: z.ZodObject<{
|
|
|
113
113
|
symbol: string;
|
|
114
114
|
name: string;
|
|
115
115
|
decimals: number;
|
|
116
|
-
addressOrDenom: string | null;
|
|
117
116
|
chainName: string;
|
|
117
|
+
addressOrDenom: string | null;
|
|
118
118
|
standard: import("../index.js").TokenStandard;
|
|
119
119
|
collateralAddressOrDenom?: string | undefined;
|
|
120
120
|
igpTokenAddressOrDenom?: string | undefined;
|
|
@@ -220,8 +220,8 @@ export declare const WarpCoreConfigSchema: z.ZodObject<{
|
|
|
220
220
|
symbol: string;
|
|
221
221
|
name: string;
|
|
222
222
|
decimals: number;
|
|
223
|
-
addressOrDenom: string | null;
|
|
224
223
|
chainName: string;
|
|
224
|
+
addressOrDenom: string | null;
|
|
225
225
|
standard: import("../index.js").TokenStandard;
|
|
226
226
|
collateralAddressOrDenom?: string | undefined;
|
|
227
227
|
igpTokenAddressOrDenom?: string | undefined;
|
|
@@ -267,8 +267,8 @@ export declare const WarpCoreConfigSchema: z.ZodObject<{
|
|
|
267
267
|
symbol: string;
|
|
268
268
|
name: string;
|
|
269
269
|
decimals: number;
|
|
270
|
-
addressOrDenom: string | null;
|
|
271
270
|
chainName: string;
|
|
271
|
+
addressOrDenom: string | null;
|
|
272
272
|
standard: import("../index.js").TokenStandard;
|
|
273
273
|
collateralAddressOrDenom?: string | undefined;
|
|
274
274
|
igpTokenAddressOrDenom?: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperlane-xyz/sdk",
|
|
3
3
|
"description": "The official SDK for the Hyperlane Network",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.7.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@arbitrum/sdk": "^4.0.0",
|
|
7
7
|
"@aws-sdk/client-s3": "^3.74.0",
|
|
8
8
|
"@cosmjs/cosmwasm-stargate": "^0.32.4",
|
|
9
9
|
"@cosmjs/stargate": "^0.32.4",
|
|
10
|
-
"@hyperlane-xyz/core": "5.
|
|
11
|
-
"@hyperlane-xyz/utils": "5.
|
|
10
|
+
"@hyperlane-xyz/core": "5.7.0",
|
|
11
|
+
"@hyperlane-xyz/utils": "5.7.0",
|
|
12
12
|
"@safe-global/api-kit": "1.3.0",
|
|
13
13
|
"@safe-global/protocol-kit": "1.3.0",
|
|
14
14
|
"@safe-global/safe-deployments": "1.37.8",
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { ethers } from 'ethers';
|
|
2
|
-
import { Logger } from 'pino';
|
|
3
|
-
import { StaticAddressSetFactory, StaticThresholdAddressSetFactory } from '@hyperlane-xyz/core';
|
|
4
|
-
import { Address } from '@hyperlane-xyz/utils';
|
|
5
|
-
import { HyperlaneContracts, HyperlaneFactories } from '../contracts/types.js';
|
|
6
|
-
import { MultiProvider } from '../providers/MultiProvider.js';
|
|
7
|
-
import { AnnotatedEV5Transaction } from '../providers/ProviderType.js';
|
|
8
|
-
import { ChainMap, ChainName } from '../types.js';
|
|
9
|
-
import { ContractVerifier } from './verify/ContractVerifier.js';
|
|
10
|
-
import { ContractVerificationInput } from './verify/types.js';
|
|
11
|
-
export declare class EvmModuleDeployer<Factories extends HyperlaneFactories> {
|
|
12
|
-
protected readonly multiProvider: MultiProvider;
|
|
13
|
-
protected readonly factories: Factories;
|
|
14
|
-
protected readonly logger: import("pino").default.Logger<never>;
|
|
15
|
-
protected readonly contractVerifier?: ContractVerifier | undefined;
|
|
16
|
-
verificationInputs: ChainMap<ContractVerificationInput[]>;
|
|
17
|
-
constructor(multiProvider: MultiProvider, factories: Factories, logger?: import("pino").default.Logger<never>, contractVerifier?: ContractVerifier | undefined);
|
|
18
|
-
deployContractFromFactory<F extends ethers.ContractFactory>({ chain, factory, contractName, constructorArgs, initializeArgs, implementationAddress, }: {
|
|
19
|
-
chain: ChainName;
|
|
20
|
-
factory: F;
|
|
21
|
-
contractName: string;
|
|
22
|
-
constructorArgs: Parameters<F['deploy']>;
|
|
23
|
-
initializeArgs?: Parameters<Awaited<ReturnType<F['deploy']>>['initialize']>;
|
|
24
|
-
implementationAddress?: Address;
|
|
25
|
-
}): Promise<ReturnType<F['deploy']>>;
|
|
26
|
-
/**
|
|
27
|
-
* Deploys a contract with a specified name.
|
|
28
|
-
*
|
|
29
|
-
* This function is capable of deploying any contract type defined within the `Factories` type to a specified chain.
|
|
30
|
-
*
|
|
31
|
-
* @param {ChainName} chain - The name of the chain on which the contract is to be deployed.
|
|
32
|
-
* @param {K} contractKey - The key identifying the factory to use for deployment.
|
|
33
|
-
* @param {string} contractName - The name of the contract to deploy. This must match the contract source code.
|
|
34
|
-
* @param {Parameters<Factories[K]['deploy']>} constructorArgs - Arguments for the contract's constructor.
|
|
35
|
-
* @param {Parameters<Awaited<ReturnType<Factories[K]['deploy']>>['initialize']>?} initializeArgs - Optional arguments for the contract's initialization function.
|
|
36
|
-
* @returns {Promise<HyperlaneContracts<Factories>[K]>} A promise that resolves to the deployed contract instance.
|
|
37
|
-
*/
|
|
38
|
-
deployContractWithName<K extends keyof Factories>({ chain, contractKey, contractName, constructorArgs, initializeArgs, }: {
|
|
39
|
-
chain: ChainName;
|
|
40
|
-
contractKey: K;
|
|
41
|
-
contractName: string;
|
|
42
|
-
constructorArgs: Parameters<Factories[K]['deploy']>;
|
|
43
|
-
initializeArgs?: Parameters<Awaited<ReturnType<Factories[K]['deploy']>>['initialize']>;
|
|
44
|
-
}): Promise<HyperlaneContracts<Factories>[K]>;
|
|
45
|
-
deployContract<K extends keyof Factories>({ chain, contractKey, constructorArgs, initializeArgs, }: {
|
|
46
|
-
chain: ChainName;
|
|
47
|
-
contractKey: K;
|
|
48
|
-
constructorArgs: Parameters<Factories[K]['deploy']>;
|
|
49
|
-
initializeArgs?: Parameters<Awaited<ReturnType<Factories[K]['deploy']>>['initialize']>;
|
|
50
|
-
}): Promise<HyperlaneContracts<Factories>[K]>;
|
|
51
|
-
deployProxiedContract<K extends keyof Factories>({ chain, contractKey, contractName, proxyAdmin, constructorArgs, initializeArgs, }: {
|
|
52
|
-
chain: ChainName;
|
|
53
|
-
contractKey: K;
|
|
54
|
-
contractName: string;
|
|
55
|
-
proxyAdmin: string;
|
|
56
|
-
constructorArgs: Parameters<Factories[K]['deploy']>;
|
|
57
|
-
initializeArgs?: Parameters<HyperlaneContracts<Factories>[K]['initialize']>;
|
|
58
|
-
}): Promise<HyperlaneContracts<Factories>[K]>;
|
|
59
|
-
protected deployProxy<C extends ethers.Contract>({ chain, implementation, proxyAdmin, initializeArgs, }: {
|
|
60
|
-
chain: ChainName;
|
|
61
|
-
implementation: C;
|
|
62
|
-
proxyAdmin: string;
|
|
63
|
-
initializeArgs?: Parameters<C['initialize']>;
|
|
64
|
-
}): Promise<C>;
|
|
65
|
-
protected addVerificationArtifacts({ chain, artifacts, }: {
|
|
66
|
-
chain: ChainName;
|
|
67
|
-
artifacts: ContractVerificationInput[];
|
|
68
|
-
}): void;
|
|
69
|
-
static deployStaticAddressSet({ chain, factory, values, logger, threshold, multiProvider, }: {
|
|
70
|
-
chain: ChainName;
|
|
71
|
-
factory: StaticThresholdAddressSetFactory | StaticAddressSetFactory;
|
|
72
|
-
values: Address[];
|
|
73
|
-
logger: Logger;
|
|
74
|
-
threshold?: number;
|
|
75
|
-
multiProvider: MultiProvider;
|
|
76
|
-
}): Promise<Address>;
|
|
77
|
-
/**
|
|
78
|
-
* Transfers ownership of a contract to a new owner.
|
|
79
|
-
*
|
|
80
|
-
* @param actualOwner - The current owner of the contract.
|
|
81
|
-
* @param expectedOwner - The expected new owner of the contract.
|
|
82
|
-
* @param deployedAddress - The address of the deployed contract.
|
|
83
|
-
* @param chainId - The chain ID of the network the contract is deployed on.
|
|
84
|
-
* @returns An array of annotated EV5 transactions that need to be executed to update the owner.
|
|
85
|
-
*/
|
|
86
|
-
static createTransferOwnershipTx(params: {
|
|
87
|
-
actualOwner: Address;
|
|
88
|
-
expectedOwner: Address;
|
|
89
|
-
deployedAddress: Address;
|
|
90
|
-
chainId: number;
|
|
91
|
-
}): AnnotatedEV5Transaction[];
|
|
92
|
-
}
|
|
93
|
-
//# sourceMappingURL=EvmModuleDeployer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EvmModuleDeployer.d.ts","sourceRoot":"","sources":["../../src/deploy/EvmModuleDeployer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9B,OAAO,EAEL,uBAAuB,EACvB,gCAAgC,EAEjC,MAA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OAQG;WACW,yBAAyB,CAAC,MAAM,EAAE;QAC9C,WAAW,EAAE,OAAO,CAAC;QACrB,aAAa,EAAE,OAAO,CAAC;QACvB,eAAe,EAAE,OAAO,CAAC;QACzB,OAAO,EAAE,MAAM,CAAC;KACjB,GAAG,uBAAuB,EAAE;CAmB9B"}
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { Ownable__factory, TransparentUpgradeableProxy__factory, } from '@hyperlane-xyz/core';
|
|
2
|
-
import { buildArtifact as coreBuildArtifact } from '@hyperlane-xyz/core/buildArtifact.js';
|
|
3
|
-
import { addBufferToGasLimit, eqAddress, rootLogger, } from '@hyperlane-xyz/utils';
|
|
4
|
-
import { isProxy, proxyConstructorArgs } from './proxy.js';
|
|
5
|
-
import { ContractVerifier } from './verify/ContractVerifier.js';
|
|
6
|
-
import { ExplorerLicenseType, } from './verify/types.js';
|
|
7
|
-
import { getContractVerificationInput } from './verify/utils.js';
|
|
8
|
-
export class EvmModuleDeployer {
|
|
9
|
-
multiProvider;
|
|
10
|
-
factories;
|
|
11
|
-
logger;
|
|
12
|
-
contractVerifier;
|
|
13
|
-
verificationInputs = {};
|
|
14
|
-
constructor(multiProvider, factories, logger = rootLogger.child({
|
|
15
|
-
module: 'EvmModuleDeployer',
|
|
16
|
-
}), contractVerifier) {
|
|
17
|
-
this.multiProvider = multiProvider;
|
|
18
|
-
this.factories = factories;
|
|
19
|
-
this.logger = logger;
|
|
20
|
-
this.contractVerifier = contractVerifier;
|
|
21
|
-
this.contractVerifier ??= new ContractVerifier(multiProvider, {}, coreBuildArtifact, ExplorerLicenseType.MIT);
|
|
22
|
-
}
|
|
23
|
-
// Deploys a contract from a factory
|
|
24
|
-
async deployContractFromFactory({ chain, factory, contractName, constructorArgs, initializeArgs, implementationAddress, }) {
|
|
25
|
-
this.logger.info(`Deploying ${contractName} on ${chain} with constructor args (${constructorArgs.join(', ')})...`);
|
|
26
|
-
const contract = await this.multiProvider.handleDeploy(chain, factory, constructorArgs);
|
|
27
|
-
if (initializeArgs) {
|
|
28
|
-
this.logger.debug(`Initialize ${contractName} on ${chain}`);
|
|
29
|
-
// Estimate gas for the initialize transaction
|
|
30
|
-
const estimatedGas = await contract.estimateGas.initialize(...initializeArgs);
|
|
31
|
-
// deploy with buffer on gas limit
|
|
32
|
-
const overrides = this.multiProvider.getTransactionOverrides(chain);
|
|
33
|
-
const initTx = await contract.initialize(...initializeArgs, {
|
|
34
|
-
gasLimit: addBufferToGasLimit(estimatedGas),
|
|
35
|
-
...overrides,
|
|
36
|
-
});
|
|
37
|
-
await this.multiProvider.handleTx(chain, initTx);
|
|
38
|
-
}
|
|
39
|
-
const verificationInput = getContractVerificationInput({
|
|
40
|
-
name: contractName,
|
|
41
|
-
contract,
|
|
42
|
-
bytecode: factory.bytecode,
|
|
43
|
-
expectedimplementation: implementationAddress,
|
|
44
|
-
});
|
|
45
|
-
this.addVerificationArtifacts({ chain, artifacts: [verificationInput] });
|
|
46
|
-
// try verifying contract
|
|
47
|
-
try {
|
|
48
|
-
await this.contractVerifier?.verifyContract(chain, verificationInput);
|
|
49
|
-
}
|
|
50
|
-
catch (error) {
|
|
51
|
-
// log error but keep deploying, can also verify post-deployment if needed
|
|
52
|
-
this.logger.debug(`Error verifying contract: ${error}`);
|
|
53
|
-
}
|
|
54
|
-
return contract;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Deploys a contract with a specified name.
|
|
58
|
-
*
|
|
59
|
-
* This function is capable of deploying any contract type defined within the `Factories` type to a specified chain.
|
|
60
|
-
*
|
|
61
|
-
* @param {ChainName} chain - The name of the chain on which the contract is to be deployed.
|
|
62
|
-
* @param {K} contractKey - The key identifying the factory to use for deployment.
|
|
63
|
-
* @param {string} contractName - The name of the contract to deploy. This must match the contract source code.
|
|
64
|
-
* @param {Parameters<Factories[K]['deploy']>} constructorArgs - Arguments for the contract's constructor.
|
|
65
|
-
* @param {Parameters<Awaited<ReturnType<Factories[K]['deploy']>>['initialize']>?} initializeArgs - Optional arguments for the contract's initialization function.
|
|
66
|
-
* @returns {Promise<HyperlaneContracts<Factories>[K]>} A promise that resolves to the deployed contract instance.
|
|
67
|
-
*/
|
|
68
|
-
async deployContractWithName({ chain, contractKey, contractName, constructorArgs, initializeArgs, }) {
|
|
69
|
-
const contract = await this.deployContractFromFactory({
|
|
70
|
-
chain,
|
|
71
|
-
factory: this.factories[contractKey],
|
|
72
|
-
contractName,
|
|
73
|
-
constructorArgs,
|
|
74
|
-
initializeArgs,
|
|
75
|
-
});
|
|
76
|
-
return contract;
|
|
77
|
-
}
|
|
78
|
-
// Deploys a contract with the same name as the contract key
|
|
79
|
-
async deployContract({ chain, contractKey, constructorArgs, initializeArgs, }) {
|
|
80
|
-
return this.deployContractWithName({
|
|
81
|
-
chain,
|
|
82
|
-
contractKey,
|
|
83
|
-
contractName: contractKey.toString(),
|
|
84
|
-
constructorArgs,
|
|
85
|
-
initializeArgs,
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
// Deploys the Implementation and Proxy for a given contract
|
|
89
|
-
async deployProxiedContract({ chain, contractKey, contractName, proxyAdmin, constructorArgs, initializeArgs, }) {
|
|
90
|
-
// Try to initialize the implementation even though it may not be necessary
|
|
91
|
-
const implementation = await this.deployContractWithName({
|
|
92
|
-
chain,
|
|
93
|
-
contractKey,
|
|
94
|
-
contractName,
|
|
95
|
-
constructorArgs,
|
|
96
|
-
initializeArgs,
|
|
97
|
-
});
|
|
98
|
-
// Initialize the proxy the same way
|
|
99
|
-
return this.deployProxy({
|
|
100
|
-
chain,
|
|
101
|
-
implementation,
|
|
102
|
-
proxyAdmin,
|
|
103
|
-
initializeArgs,
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
// Deploys a proxy for a given implementation contract
|
|
107
|
-
async deployProxy({ chain, implementation, proxyAdmin, initializeArgs, }) {
|
|
108
|
-
const isProxied = await isProxy(this.multiProvider.getProvider(chain), implementation.address);
|
|
109
|
-
if (isProxied) {
|
|
110
|
-
// if the implementation is already a proxy, do not deploy a new proxy
|
|
111
|
-
return implementation;
|
|
112
|
-
}
|
|
113
|
-
const constructorArgs = proxyConstructorArgs(implementation, proxyAdmin, initializeArgs);
|
|
114
|
-
const proxy = await this.deployContractFromFactory({
|
|
115
|
-
chain,
|
|
116
|
-
factory: new TransparentUpgradeableProxy__factory(),
|
|
117
|
-
contractName: 'TransparentUpgradeableProxy',
|
|
118
|
-
constructorArgs,
|
|
119
|
-
implementationAddress: implementation.address,
|
|
120
|
-
});
|
|
121
|
-
return implementation.attach(proxy.address);
|
|
122
|
-
}
|
|
123
|
-
// Adds verification artifacts to the verificationInputs map
|
|
124
|
-
addVerificationArtifacts({ chain, artifacts, }) {
|
|
125
|
-
this.verificationInputs[chain] = this.verificationInputs[chain] || [];
|
|
126
|
-
artifacts.forEach((artifact) => {
|
|
127
|
-
this.verificationInputs[chain].push(artifact);
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
// Static deploy function used by Hook and ISM modules.
|
|
131
|
-
static async deployStaticAddressSet({ chain, factory, values, logger, threshold = values.length, multiProvider, }) {
|
|
132
|
-
const sortedValues = [...values].sort();
|
|
133
|
-
const address = await factory['getAddress(address[],uint8)'](sortedValues, threshold);
|
|
134
|
-
const code = await multiProvider.getProvider(chain).getCode(address);
|
|
135
|
-
if (code === '0x') {
|
|
136
|
-
logger.debug(`Deploying new ${threshold} of ${sortedValues.length} address set to ${chain}`);
|
|
137
|
-
const overrides = multiProvider.getTransactionOverrides(chain);
|
|
138
|
-
// estimate gas
|
|
139
|
-
const estimatedGas = await factory.estimateGas['deploy(address[],uint8)'](sortedValues, threshold, overrides);
|
|
140
|
-
// add gas buffer
|
|
141
|
-
const hash = await factory['deploy(address[],uint8)'](sortedValues, threshold, {
|
|
142
|
-
gasLimit: addBufferToGasLimit(estimatedGas),
|
|
143
|
-
...overrides,
|
|
144
|
-
});
|
|
145
|
-
await multiProvider.handleTx(chain, hash);
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
logger.debug(`Recovered ${threshold} of ${sortedValues.length} address set on ${chain}: ${address}`);
|
|
149
|
-
}
|
|
150
|
-
// TODO: figure out how to get the constructor arguments for manual deploy TXs
|
|
151
|
-
// const verificationInput = buildVerificationInput(
|
|
152
|
-
// NAME,
|
|
153
|
-
// ADDRESS,
|
|
154
|
-
// CONSTRUCTOR_ARGS,
|
|
155
|
-
// );
|
|
156
|
-
// await this.deployer.verifyContract(
|
|
157
|
-
// this.chainName,
|
|
158
|
-
// verificationInput,
|
|
159
|
-
// logger,
|
|
160
|
-
// );
|
|
161
|
-
return address;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Transfers ownership of a contract to a new owner.
|
|
165
|
-
*
|
|
166
|
-
* @param actualOwner - The current owner of the contract.
|
|
167
|
-
* @param expectedOwner - The expected new owner of the contract.
|
|
168
|
-
* @param deployedAddress - The address of the deployed contract.
|
|
169
|
-
* @param chainId - The chain ID of the network the contract is deployed on.
|
|
170
|
-
* @returns An array of annotated EV5 transactions that need to be executed to update the owner.
|
|
171
|
-
*/
|
|
172
|
-
static createTransferOwnershipTx(params) {
|
|
173
|
-
const { actualOwner, expectedOwner, deployedAddress, chainId } = params;
|
|
174
|
-
const updateTransactions = [];
|
|
175
|
-
if (eqAddress(actualOwner, expectedOwner)) {
|
|
176
|
-
return [];
|
|
177
|
-
}
|
|
178
|
-
updateTransactions.push({
|
|
179
|
-
annotation: `Transferring ownership of ${deployedAddress} from current owner ${actualOwner} to new owner ${expectedOwner}`,
|
|
180
|
-
chainId,
|
|
181
|
-
to: deployedAddress,
|
|
182
|
-
data: Ownable__factory.createInterface().encodeFunctionData('transferOwnership(address)', [expectedOwner]),
|
|
183
|
-
});
|
|
184
|
-
return updateTransactions;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
//# sourceMappingURL=EvmModuleDeployer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EvmModuleDeployer.js","sourceRoot":"","sources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