@hyperlane-xyz/sdk 3.6.2 → 3.8.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.
Files changed (240) hide show
  1. package/dist/consts/chainMetadata.d.ts +3 -2
  2. package/dist/consts/chainMetadata.d.ts.map +1 -1
  3. package/dist/consts/chainMetadata.js +99 -72
  4. package/dist/consts/chainMetadata.js.map +1 -1
  5. package/dist/consts/chains.d.ts +3 -2
  6. package/dist/consts/chains.d.ts.map +1 -1
  7. package/dist/consts/chains.js +6 -4
  8. package/dist/consts/chains.js.map +1 -1
  9. package/dist/consts/environments/index.d.ts +141 -133
  10. package/dist/consts/environments/index.d.ts.map +1 -1
  11. package/dist/consts/environments/mainnet.json +20 -0
  12. package/dist/consts/environments/testnet.json +166 -178
  13. package/dist/consts/igp.d.ts +2 -0
  14. package/dist/consts/igp.d.ts.map +1 -0
  15. package/dist/consts/igp.js +5 -0
  16. package/dist/consts/igp.js.map +1 -0
  17. package/dist/consts/multisigIsm.d.ts.map +1 -1
  18. package/dist/consts/multisigIsm.js +22 -18
  19. package/dist/consts/multisigIsm.js.map +1 -1
  20. package/dist/core/CoreDeployer.hardhat-test.js +4 -2
  21. package/dist/core/CoreDeployer.hardhat-test.js.map +1 -1
  22. package/dist/core/HyperlaneCore.d.ts.map +1 -1
  23. package/dist/core/HyperlaneCore.js +10 -4
  24. package/dist/core/HyperlaneCore.js.map +1 -1
  25. package/dist/core/HyperlaneCoreChecker.d.ts.map +1 -1
  26. package/dist/core/HyperlaneCoreChecker.js +3 -3
  27. package/dist/core/HyperlaneCoreChecker.js.map +1 -1
  28. package/dist/core/HyperlaneCoreDeployer.d.ts +6 -2
  29. package/dist/core/HyperlaneCoreDeployer.d.ts.map +1 -1
  30. package/dist/core/HyperlaneCoreDeployer.js +24 -11
  31. package/dist/core/HyperlaneCoreDeployer.js.map +1 -1
  32. package/dist/core/TestRecipientDeployer.d.ts +2 -1
  33. package/dist/core/TestRecipientDeployer.d.ts.map +1 -1
  34. package/dist/core/TestRecipientDeployer.js +2 -1
  35. package/dist/core/TestRecipientDeployer.js.map +1 -1
  36. package/dist/deploy/HyperlaneDeployer.d.ts +7 -6
  37. package/dist/deploy/HyperlaneDeployer.d.ts.map +1 -1
  38. package/dist/deploy/HyperlaneDeployer.js +34 -13
  39. package/dist/deploy/HyperlaneDeployer.js.map +1 -1
  40. package/dist/deploy/HyperlaneProxyFactoryDeployer.d.ts +2 -1
  41. package/dist/deploy/HyperlaneProxyFactoryDeployer.d.ts.map +1 -1
  42. package/dist/deploy/HyperlaneProxyFactoryDeployer.js +2 -1
  43. package/dist/deploy/HyperlaneProxyFactoryDeployer.js.map +1 -1
  44. package/dist/deploy/types.d.ts +1 -1
  45. package/dist/deploy/types.d.ts.map +1 -1
  46. package/dist/deploy/verify/ContractVerifier.d.ts +9 -12
  47. package/dist/deploy/verify/ContractVerifier.d.ts.map +1 -1
  48. package/dist/deploy/verify/ContractVerifier.js +147 -121
  49. package/dist/deploy/verify/ContractVerifier.js.map +1 -1
  50. package/dist/deploy/verify/PostDeploymentContractVerifier.d.ts +14 -0
  51. package/dist/deploy/verify/PostDeploymentContractVerifier.d.ts.map +1 -0
  52. package/dist/deploy/verify/PostDeploymentContractVerifier.js +31 -0
  53. package/dist/deploy/verify/PostDeploymentContractVerifier.js.map +1 -0
  54. package/dist/deploy/verify/types.d.ts +60 -3
  55. package/dist/deploy/verify/types.d.ts.map +1 -1
  56. package/dist/deploy/verify/types.js +42 -0
  57. package/dist/deploy/verify/types.js.map +1 -1
  58. package/dist/gas/HyperlaneIgpChecker.d.ts +0 -2
  59. package/dist/gas/HyperlaneIgpChecker.d.ts.map +1 -1
  60. package/dist/gas/HyperlaneIgpChecker.js +8 -29
  61. package/dist/gas/HyperlaneIgpChecker.js.map +1 -1
  62. package/dist/gas/HyperlaneIgpDeployer.d.ts +3 -2
  63. package/dist/gas/HyperlaneIgpDeployer.d.ts.map +1 -1
  64. package/dist/gas/HyperlaneIgpDeployer.js +47 -20
  65. package/dist/gas/HyperlaneIgpDeployer.js.map +1 -1
  66. package/dist/gas/oracle/configure-gas-oracles.hardhat-test.d.ts +2 -0
  67. package/dist/gas/oracle/configure-gas-oracles.hardhat-test.d.ts.map +1 -0
  68. package/dist/gas/oracle/configure-gas-oracles.hardhat-test.js +47 -0
  69. package/dist/gas/oracle/configure-gas-oracles.hardhat-test.js.map +1 -0
  70. package/dist/gas/oracle/types.d.ts +11 -0
  71. package/dist/gas/oracle/types.d.ts.map +1 -0
  72. package/dist/gas/oracle/types.js +30 -0
  73. package/dist/gas/oracle/types.js.map +1 -0
  74. package/dist/gas/types.d.ts +3 -4
  75. package/dist/gas/types.d.ts.map +1 -1
  76. package/dist/gas/types.js +1 -5
  77. package/dist/gas/types.js.map +1 -1
  78. package/dist/hook/HyperlaneHookDeployer.d.ts +2 -1
  79. package/dist/hook/HyperlaneHookDeployer.d.ts.map +1 -1
  80. package/dist/hook/HyperlaneHookDeployer.js +6 -4
  81. package/dist/hook/HyperlaneHookDeployer.js.map +1 -1
  82. package/dist/index.d.ts +18 -7
  83. package/dist/index.d.ts.map +1 -1
  84. package/dist/index.js +52 -20
  85. package/dist/index.js.map +1 -1
  86. package/dist/ism/HyperlaneIsmFactory.d.ts +11 -10
  87. package/dist/ism/HyperlaneIsmFactory.d.ts.map +1 -1
  88. package/dist/ism/HyperlaneIsmFactory.hardhat-test.js +14 -12
  89. package/dist/ism/HyperlaneIsmFactory.hardhat-test.js.map +1 -1
  90. package/dist/ism/HyperlaneIsmFactory.js +39 -287
  91. package/dist/ism/HyperlaneIsmFactory.js.map +1 -1
  92. package/dist/ism/utils.d.ts +11 -0
  93. package/dist/ism/utils.d.ts.map +1 -0
  94. package/dist/ism/utils.js +277 -0
  95. package/dist/ism/utils.js.map +1 -0
  96. package/dist/metadata/ChainMetadataManager.d.ts +43 -21
  97. package/dist/metadata/ChainMetadataManager.d.ts.map +1 -1
  98. package/dist/metadata/ChainMetadataManager.js +26 -0
  99. package/dist/metadata/ChainMetadataManager.js.map +1 -1
  100. package/dist/metadata/agentConfig.d.ts +138 -46
  101. package/dist/metadata/agentConfig.d.ts.map +1 -1
  102. package/dist/metadata/agentConfig.js +1 -1
  103. package/dist/metadata/blockExplorer.d.ts +6 -1
  104. package/dist/metadata/blockExplorer.d.ts.map +1 -1
  105. package/dist/metadata/blockExplorer.js +15 -1
  106. package/dist/metadata/blockExplorer.js.map +1 -1
  107. package/dist/metadata/chainMetadataTypes.d.ts +202 -1
  108. package/dist/metadata/chainMetadataTypes.d.ts.map +1 -1
  109. package/dist/metadata/chainMetadataTypes.js +18 -4
  110. package/dist/metadata/chainMetadataTypes.js.map +1 -1
  111. package/dist/metadata/customZodTypes.d.ts +2 -0
  112. package/dist/metadata/customZodTypes.d.ts.map +1 -1
  113. package/dist/metadata/customZodTypes.js +3 -1
  114. package/dist/metadata/customZodTypes.js.map +1 -1
  115. package/dist/metadata/health.js +2 -2
  116. package/dist/metadata/health.js.map +1 -1
  117. package/dist/metadata/warpRouteConfig.d.ts +134 -0
  118. package/dist/metadata/warpRouteConfig.d.ts.map +1 -0
  119. package/dist/metadata/warpRouteConfig.js +24 -0
  120. package/dist/metadata/warpRouteConfig.js.map +1 -0
  121. package/dist/middleware/account/InterchainAccountDeployer.d.ts +2 -1
  122. package/dist/middleware/account/InterchainAccountDeployer.d.ts.map +1 -1
  123. package/dist/middleware/account/InterchainAccountDeployer.js +4 -2
  124. package/dist/middleware/account/InterchainAccountDeployer.js.map +1 -1
  125. package/dist/middleware/liquidity-layer/LiquidityLayerRouterDeployer.d.ts +2 -1
  126. package/dist/middleware/liquidity-layer/LiquidityLayerRouterDeployer.d.ts.map +1 -1
  127. package/dist/middleware/liquidity-layer/LiquidityLayerRouterDeployer.js +4 -2
  128. package/dist/middleware/liquidity-layer/LiquidityLayerRouterDeployer.js.map +1 -1
  129. package/dist/middleware/query/InterchainQueryDeployer.d.ts +2 -1
  130. package/dist/middleware/query/InterchainQueryDeployer.d.ts.map +1 -1
  131. package/dist/middleware/query/InterchainQueryDeployer.js +4 -2
  132. package/dist/middleware/query/InterchainQueryDeployer.js.map +1 -1
  133. package/dist/providers/MultiProtocolProvider.d.ts +10 -12
  134. package/dist/providers/MultiProtocolProvider.d.ts.map +1 -1
  135. package/dist/providers/MultiProtocolProvider.js +2 -7
  136. package/dist/providers/MultiProtocolProvider.js.map +1 -1
  137. package/dist/providers/MultiProvider.d.ts +17 -17
  138. package/dist/providers/MultiProvider.d.ts.map +1 -1
  139. package/dist/providers/MultiProvider.js +12 -1
  140. package/dist/providers/MultiProvider.js.map +1 -1
  141. package/dist/providers/ProviderType.d.ts +5 -2
  142. package/dist/providers/ProviderType.d.ts.map +1 -1
  143. package/dist/providers/ProviderType.js +10 -1
  144. package/dist/providers/ProviderType.js.map +1 -1
  145. package/dist/providers/SmartProvider/SmartProvider.d.ts +2 -2
  146. package/dist/providers/SmartProvider/SmartProvider.d.ts.map +1 -1
  147. package/dist/providers/SmartProvider/SmartProvider.js +3 -3
  148. package/dist/providers/SmartProvider/SmartProvider.js.map +1 -1
  149. package/dist/providers/providerBuilders.d.ts.map +1 -1
  150. package/dist/providers/providerBuilders.js +1 -0
  151. package/dist/providers/providerBuilders.js.map +1 -1
  152. package/dist/router/HyperlaneRouterChecker.d.ts.map +1 -1
  153. package/dist/router/HyperlaneRouterChecker.js +2 -2
  154. package/dist/router/HyperlaneRouterChecker.js.map +1 -1
  155. package/dist/router/HyperlaneRouterDeployer.d.ts.map +1 -1
  156. package/dist/router/HyperlaneRouterDeployer.js +2 -3
  157. package/dist/router/HyperlaneRouterDeployer.js.map +1 -1
  158. package/dist/test/metadata-check.js +7 -39
  159. package/dist/test/metadata-check.js.map +1 -1
  160. package/dist/test/testUtils.d.ts +2 -0
  161. package/dist/test/testUtils.d.ts.map +1 -1
  162. package/dist/test/testUtils.js +19 -1
  163. package/dist/test/testUtils.js.map +1 -1
  164. package/dist/token/IToken.d.ts +147 -0
  165. package/dist/token/IToken.d.ts.map +1 -0
  166. package/dist/token/IToken.js +37 -0
  167. package/dist/token/IToken.js.map +1 -0
  168. package/dist/token/Token.d.ts +58 -0
  169. package/dist/token/Token.d.ts.map +1 -0
  170. package/dist/token/Token.js +260 -0
  171. package/dist/token/Token.js.map +1 -0
  172. package/dist/token/Token.test.d.ts +2 -0
  173. package/dist/token/Token.test.d.ts.map +1 -0
  174. package/dist/token/Token.test.js +155 -0
  175. package/dist/token/Token.test.js.map +1 -0
  176. package/dist/token/TokenAmount.d.ts +12 -0
  177. package/dist/token/TokenAmount.d.ts.map +1 -0
  178. package/dist/token/TokenAmount.js +24 -0
  179. package/dist/token/TokenAmount.js.map +1 -0
  180. package/dist/token/TokenAmount.test.d.ts +2 -0
  181. package/dist/token/TokenAmount.test.d.ts.map +1 -0
  182. package/dist/token/TokenAmount.test.js +41 -0
  183. package/dist/token/TokenAmount.test.js.map +1 -0
  184. package/dist/token/TokenConnection.d.ts +81 -0
  185. package/dist/token/TokenConnection.d.ts.map +1 -0
  186. package/dist/token/TokenConnection.js +36 -0
  187. package/dist/token/TokenConnection.js.map +1 -0
  188. package/dist/token/TokenStandard.d.ts +36 -0
  189. package/dist/token/TokenStandard.d.ts.map +1 -0
  190. package/dist/token/TokenStandard.js +118 -0
  191. package/dist/token/TokenStandard.js.map +1 -0
  192. package/dist/token/adapters/CosmWasmTokenAdapter.d.ts +29 -30
  193. package/dist/token/adapters/CosmWasmTokenAdapter.d.ts.map +1 -1
  194. package/dist/token/adapters/CosmWasmTokenAdapter.js +65 -50
  195. package/dist/token/adapters/CosmWasmTokenAdapter.js.map +1 -1
  196. package/dist/token/adapters/CosmosTokenAdapter.d.ts +11 -9
  197. package/dist/token/adapters/CosmosTokenAdapter.d.ts.map +1 -1
  198. package/dist/token/adapters/CosmosTokenAdapter.js +25 -6
  199. package/dist/token/adapters/CosmosTokenAdapter.js.map +1 -1
  200. package/dist/token/adapters/EvmTokenAdapter.d.ts +27 -16
  201. package/dist/token/adapters/EvmTokenAdapter.d.ts.map +1 -1
  202. package/dist/token/adapters/EvmTokenAdapter.js +69 -23
  203. package/dist/token/adapters/EvmTokenAdapter.js.map +1 -1
  204. package/dist/token/adapters/ITokenAdapter.d.ts +16 -11
  205. package/dist/token/adapters/ITokenAdapter.d.ts.map +1 -1
  206. package/dist/token/adapters/SealevelTokenAdapter.d.ts +15 -13
  207. package/dist/token/adapters/SealevelTokenAdapter.d.ts.map +1 -1
  208. package/dist/token/adapters/SealevelTokenAdapter.js +17 -15
  209. package/dist/token/adapters/SealevelTokenAdapter.js.map +1 -1
  210. package/dist/token/deploy.d.ts +3 -2
  211. package/dist/token/deploy.d.ts.map +1 -1
  212. package/dist/token/deploy.js +4 -2
  213. package/dist/token/deploy.js.map +1 -1
  214. package/dist/types.d.ts +2 -1
  215. package/dist/types.d.ts.map +1 -1
  216. package/dist/warp/WarpCore.d.ts +76 -0
  217. package/dist/warp/WarpCore.d.ts.map +1 -0
  218. package/dist/warp/WarpCore.js +288 -0
  219. package/dist/warp/WarpCore.js.map +1 -0
  220. package/dist/warp/WarpCore.test.d.ts +2 -0
  221. package/dist/warp/WarpCore.test.d.ts.map +1 -0
  222. package/dist/warp/WarpCore.test.js +143 -0
  223. package/dist/warp/WarpCore.test.js.map +1 -0
  224. package/dist/warp/types.d.ts +274 -0
  225. package/dist/warp/types.d.ts.map +1 -0
  226. package/dist/warp/types.js +38 -0
  227. package/dist/warp/types.js.map +1 -0
  228. package/logos/black/cosmwasm.svg +1 -1
  229. package/logos/black/inevm.svg +1 -0
  230. package/logos/black/injective.svg +1 -0
  231. package/logos/black/nautilus.svg +1 -0
  232. package/logos/black/plume.svg +29 -0
  233. package/logos/color/cosmos.svg +1 -1
  234. package/logos/color/cosmwasm.svg +1 -1
  235. package/logos/color/inevm.svg +1 -0
  236. package/logos/color/injective.svg +1 -0
  237. package/logos/color/manta.svg +1 -1
  238. package/logos/color/nautilus.svg +1 -0
  239. package/logos/color/plume.svg +24 -0
  240. package/package.json +5 -4
@@ -1,22 +1,19 @@
1
1
  import { Debugger } from 'debug';
2
2
  import { MultiProvider } from '../../providers/MultiProvider';
3
3
  import { ChainMap, ChainName } from '../../types';
4
- import { MultiGeneric } from '../../utils/MultiGeneric';
5
- import { CompilerOptions, ContractVerificationInput, VerificationInput } from './types';
6
- export declare class ContractVerifier extends MultiGeneric<VerificationInput> {
4
+ import { BuildArtifact, CompilerOptions, ContractVerificationInput } from './types';
5
+ export declare class ContractVerifier {
7
6
  protected readonly multiProvider: MultiProvider;
8
7
  protected readonly apiKeys: ChainMap<string>;
9
- protected readonly flattenedSource: string;
8
+ private logger;
9
+ private contractSourceMap;
10
+ protected readonly standardInputJson: string;
10
11
  protected readonly compilerOptions: CompilerOptions;
11
- protected logger: Debugger;
12
- constructor(verificationInputs: ChainMap<VerificationInput>, multiProvider: MultiProvider, apiKeys: ChainMap<string>, flattenedSource: string, // flattened source code from eg `hardhat flatten`
13
- compilerOptions: CompilerOptions);
14
- verify(targets?: string[]): Promise<PromiseSettledResult<void>[]>;
15
- verifyChain(chain: ChainName, inputs: VerificationInput): Promise<void>;
12
+ constructor(multiProvider: MultiProvider, apiKeys: ChainMap<string>, buildArtifact: BuildArtifact, licenseType: CompilerOptions['licenseType']);
16
13
  private submitForm;
17
14
  private isAlreadyVerified;
18
- verifyProxy(chain: ChainName, input: ContractVerificationInput): Promise<void>;
19
- verifyImplementation(chain: ChainName, input: ContractVerificationInput): Promise<void>;
20
- verifyContract(chain: ChainName, input: ContractVerificationInput): Promise<void>;
15
+ private verifyProxy;
16
+ private verifyImplementation;
17
+ verifyContract(chain: ChainName, input: ContractVerificationInput, logger?: Debugger): Promise<void>;
21
18
  }
22
19
  //# sourceMappingURL=ContractVerifier.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContractVerifier.d.ts","sourceRoot":"","sources":["../../../src/deploy/verify/ContractVerifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAS,MAAM,OAAO,CAAC;AAKxC,OAAO,E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0BjB"}
1
+ {"version":3,"file":"ContractVerifier.d.ts","sourceRoot":"","sources":["../../../src/deploy/verify/ContractVerifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAS,MAAM,OAAO,CAAC;AAMxC,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,EACL,aAAa,EACb,eAAe,EACf,yBAAyB,EAK1B,MAAM,SAAS,CAAC;AAEjB,qBAAa,gBAAgB;IASzB,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa;IAC/C,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC;IAT9C,OAAO,CAAC,MAAM,CAAuC;IAErD,OAAO,CAAC,iBAAiB,CAA0C;IAEnE,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IAC7C,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;gBAG/B,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,EAC5C,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,eAAe,CAAC,aAAa,CAAC;YAqC/B,UAAU;YA6FV,iBAAiB;YAuBjB,WAAW;YAuCX,oBAAoB;IA4C5B,cAAc,CAClB,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,yBAAyB,EAChC,MAAM,WAAc,GACnB,OAAO,CAAC,IAAI,CAAC;CAsCjB"}
@@ -8,173 +8,199 @@ const cross_fetch_1 = __importDefault(require("cross-fetch"));
8
8
  const debug_1 = require("debug");
9
9
  const ethers_1 = require("ethers");
10
10
  const utils_1 = require("@hyperlane-xyz/utils");
11
- const MultiGeneric_1 = require("../../utils/MultiGeneric");
12
- var ExplorerApiActions;
13
- (function (ExplorerApiActions) {
14
- ExplorerApiActions["GETSOURCECODE"] = "getsourcecode";
15
- ExplorerApiActions["VERIFY_IMPLEMENTATION"] = "verifysourcecode";
16
- ExplorerApiActions["MARK_PROXY"] = "verifyproxycontract";
17
- ExplorerApiActions["CHECK_STATUS"] = "checkverifystatus";
18
- ExplorerApiActions["CHECK_PROXY_STATUS"] = "checkproxyverification";
19
- })(ExplorerApiActions || (ExplorerApiActions = {}));
20
- var ExplorerApiErrors;
21
- (function (ExplorerApiErrors) {
22
- ExplorerApiErrors["ALREADY_VERIFIED"] = "Contract source code already verified";
23
- ExplorerApiErrors["ALREADY_VERIFIED_ALT"] = "Already Verified";
24
- ExplorerApiErrors["VERIFICATION_PENDING"] = "Pending in queue";
25
- ExplorerApiErrors["PROXY_FAILED"] = "A corresponding implementation contract was unfortunately not detected for the proxy address.";
26
- ExplorerApiErrors["BYTECODE_MISMATCH"] = "Fail - Unable to verify. Compiled contract deployment bytecode does NOT match the transaction deployment bytecode.";
27
- })(ExplorerApiErrors || (ExplorerApiErrors = {}));
28
- class ContractVerifier extends MultiGeneric_1.MultiGeneric {
29
- constructor(verificationInputs, multiProvider, apiKeys, flattenedSource, // flattened source code from eg `hardhat flatten`
30
- compilerOptions) {
31
- super(verificationInputs);
11
+ const chainMetadataTypes_1 = require("../../metadata/chainMetadataTypes");
12
+ const types_1 = require("./types");
13
+ class ContractVerifier {
14
+ constructor(multiProvider, apiKeys, buildArtifact, licenseType) {
32
15
  this.multiProvider = multiProvider;
33
16
  this.apiKeys = apiKeys;
34
- this.flattenedSource = flattenedSource;
35
- this.compilerOptions = compilerOptions;
36
- this.logger = (0, debug_1.debug)('hyperlane:ContractVerifier');
37
- }
38
- verify(targets = this.chains()) {
39
- return Promise.allSettled(targets.map((chain) => this.verifyChain(chain, this.get(chain))));
40
- }
41
- async verifyChain(chain, inputs) {
42
- this.logger(`Verifying ${chain}...`);
43
- for (const input of inputs) {
44
- await this.verifyContract(chain, input);
17
+ this.logger = (0, debug_1.debug)(`hyperlane:ContractVerifier`);
18
+ this.contractSourceMap = {};
19
+ // Extract the standard input json and compiler version from the build artifact
20
+ this.standardInputJson = JSON.stringify(buildArtifact.input);
21
+ const compilerversion = `v${buildArtifact.solcLongVersion}`;
22
+ // double check compiler version matches expected format
23
+ const versionRegex = /v(\d.\d.\d+)\+commit.\w+/;
24
+ const matches = versionRegex.exec(compilerversion);
25
+ if (!matches) {
26
+ throw new Error(`Invalid compiler version ${compilerversion}`);
45
27
  }
46
- }
47
- async submitForm(chain, action, options) {
48
- const apiUrl = new URL(this.multiProvider.getExplorerApiUrl(chain));
49
- const isGetRequest = action === ExplorerApiActions.CHECK_STATUS ||
50
- action === ExplorerApiActions.CHECK_PROXY_STATUS ||
51
- action === ExplorerApiActions.GETSOURCECODE;
52
- const params = new URLSearchParams({
53
- apikey: this.apiKeys[chain],
54
- module: 'contract',
55
- action,
56
- ...options,
28
+ // set compiler options
29
+ // only license type is configurable, empty if not provided
30
+ this.compilerOptions = {
31
+ codeformat: 'solidity-standard-json-input',
32
+ compilerversion,
33
+ licenseType,
34
+ };
35
+ // process input to create mapping of contract names to source names
36
+ // this is required to construct the fully qualified contract name
37
+ const contractRegex = /contract\s+([A-Z][a-zA-Z0-9]*)/g;
38
+ Object.entries(buildArtifact.input.sources).forEach(([sourceName, { content }]) => {
39
+ const matches = content.matchAll(contractRegex);
40
+ for (const match of matches) {
41
+ const contractName = match[1];
42
+ if (contractName) {
43
+ this.contractSourceMap[contractName] = sourceName;
44
+ }
45
+ }
57
46
  });
47
+ }
48
+ async submitForm(chain, action, verificationLogger, options) {
49
+ const { apiUrl, family } = this.multiProvider.getExplorerApi(chain);
50
+ const params = new URLSearchParams();
51
+ params.set('module', 'contract');
52
+ params.set('action', action);
53
+ // no need to provide every argument for every request
54
+ for (const [key, value] of Object.entries(options ?? {})) {
55
+ params.set(key, value);
56
+ }
57
+ // only include apikey if provided & not blockscout
58
+ if (family !== chainMetadataTypes_1.ExplorerFamily.Blockscout && this.apiKeys[chain]) {
59
+ params.set('apikey', this.apiKeys[chain]);
60
+ }
61
+ const url = new URL(apiUrl);
62
+ const isGetRequest = types_1.EXPLORER_GET_ACTIONS.includes(action);
63
+ if (isGetRequest) {
64
+ url.search = params.toString();
65
+ }
66
+ else if (family === chainMetadataTypes_1.ExplorerFamily.Blockscout) {
67
+ // Blockscout requires module and action to be query params
68
+ url.searchParams.set('module', 'contract');
69
+ url.searchParams.set('action', action);
70
+ }
58
71
  let response;
59
72
  if (isGetRequest) {
60
- response = await (0, cross_fetch_1.default)(`${apiUrl}?${params}`);
73
+ response = await (0, cross_fetch_1.default)(url.toString(), {
74
+ method: 'GET',
75
+ });
61
76
  }
62
77
  else {
63
- response = await (0, cross_fetch_1.default)(apiUrl, {
78
+ response = await (0, cross_fetch_1.default)(url.toString(), {
64
79
  method: 'POST',
65
- headers: {
66
- 'Content-Type': 'application/x-www-form-urlencoded',
67
- },
80
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
68
81
  body: params,
69
82
  });
70
83
  }
71
- let result;
72
- let responseText;
73
- try {
74
- responseText = await response.text();
75
- result = JSON.parse(responseText);
76
- }
77
- catch (e) {
78
- this.logger(`Failed to parse response from ${responseText}`, e);
79
- }
80
- if (result.message === 'NOTOK') {
84
+ const responseText = await response.text();
85
+ const result = JSON.parse(responseText);
86
+ if (result.message !== 'OK') {
87
+ let errorMessage;
81
88
  switch (result.result) {
82
- case ExplorerApiErrors.VERIFICATION_PENDING:
89
+ case types_1.ExplorerApiErrors.VERIFICATION_PENDING:
83
90
  await (0, utils_1.sleep)(5000); // wait 5 seconds
84
- return this.submitForm(chain, action, options);
85
- case ExplorerApiErrors.ALREADY_VERIFIED:
86
- case ExplorerApiErrors.ALREADY_VERIFIED_ALT:
87
- return;
88
- case ExplorerApiErrors.PROXY_FAILED:
89
- this.logger(`Proxy verification failed for, try manually?`);
90
- return;
91
- case ExplorerApiErrors.BYTECODE_MISMATCH:
92
- this.logger(`Compiled bytecode does not match deployed bytecode, check constructor arguments?`);
91
+ return this.submitForm(chain, action, verificationLogger, options);
92
+ case types_1.ExplorerApiErrors.ALREADY_VERIFIED:
93
+ case types_1.ExplorerApiErrors.ALREADY_VERIFIED_ALT:
93
94
  return;
95
+ case types_1.ExplorerApiErrors.PROXY_FAILED:
96
+ errorMessage = 'Proxy verification failed, try manually?';
97
+ break;
98
+ case types_1.ExplorerApiErrors.BYTECODE_MISMATCH:
99
+ errorMessage =
100
+ 'Compiled bytecode does not match deployed bytecode, check constructor arguments?';
101
+ break;
94
102
  default:
95
- this.logger(`Verification failed for some unknown reason on ${chain}`, result);
96
- throw new Error(`Verification failed: ${result.result}`);
103
+ errorMessage = `Verification failed. ${result.result ?? response.statusText}`;
104
+ break;
105
+ }
106
+ if (errorMessage) {
107
+ verificationLogger(errorMessage);
108
+ throw new Error(`[${chain}] ${errorMessage}`);
97
109
  }
98
110
  }
111
+ if (result.result === types_1.ExplorerApiErrors.UNKNOWN_UID) {
112
+ await (0, utils_1.sleep)(1000); // wait 1 second
113
+ return this.submitForm(chain, action, verificationLogger, options);
114
+ }
115
+ if (result.result === types_1.ExplorerApiErrors.UNABLE_TO_VERIFY) {
116
+ const errorMessage = `Verification failed. ${result.result ?? response.statusText}`;
117
+ verificationLogger(errorMessage);
118
+ throw new Error(`[${chain}] ${errorMessage}`);
119
+ }
99
120
  return result.result;
100
121
  }
101
- async isAlreadyVerified(chain, input) {
122
+ async isAlreadyVerified(chain, input, verificationLogger) {
102
123
  try {
103
- const result = await this.submitForm(chain, ExplorerApiActions.GETSOURCECODE, {
104
- ...this.compilerOptions,
124
+ const result = await this.submitForm(chain, types_1.ExplorerApiActions.GETSOURCECODE, verificationLogger, {
105
125
  address: input.address,
106
126
  });
107
- return result[0].SourceCode !== '';
127
+ return !!result[0]?.SourceCode;
108
128
  }
109
129
  catch (error) {
110
- this.logger(`Error checking if contract is already verified: ${error}`);
130
+ verificationLogger(`Error checking if contract is already verified: ${error}`);
111
131
  return false;
112
132
  }
113
133
  }
114
- async verifyProxy(chain, input) {
115
- if (input.isProxy) {
116
- try {
117
- const proxyGuid = await this.submitForm(chain, ExplorerApiActions.MARK_PROXY, {
118
- address: input.address,
119
- });
120
- const addressUrl = await this.multiProvider.tryGetExplorerAddressUrl(chain, input.address);
121
- // poll for verified proxy status
122
- if (proxyGuid) {
123
- await this.submitForm(chain, ExplorerApiActions.CHECK_PROXY_STATUS, {
124
- guid: proxyGuid,
125
- });
126
- this.logger(`Successfully verified proxy ${addressUrl}#readProxyContract`);
127
- }
128
- }
129
- catch (error) {
130
- console.error(`Verification of proxy at ${input.address} failed on ${chain}`);
131
- throw error;
132
- }
134
+ async verifyProxy(chain, input, verificationLogger) {
135
+ if (!input.isProxy)
136
+ return;
137
+ try {
138
+ const proxyGuid = await this.submitForm(chain, types_1.ExplorerApiActions.MARK_PROXY, verificationLogger, { address: input.address });
139
+ if (!proxyGuid)
140
+ return;
141
+ await this.submitForm(chain, types_1.ExplorerApiActions.CHECK_PROXY_STATUS, verificationLogger, {
142
+ guid: proxyGuid,
143
+ });
144
+ const addressUrl = await this.multiProvider.tryGetExplorerAddressUrl(chain, input.address);
145
+ verificationLogger(`Successfully verified proxy ${addressUrl}#readProxyContract`);
146
+ }
147
+ catch (error) {
148
+ verificationLogger(`Verification of proxy at ${input.address} failed: ${error}`);
149
+ throw error;
133
150
  }
134
151
  }
135
- async verifyImplementation(chain, input) {
136
- this.logger(`Verifying ${input.name} implementation at ${input.address} on ${chain}`);
152
+ async verifyImplementation(chain, input, verificationLogger) {
153
+ verificationLogger(`Verifying implementation at ${input.address}`);
154
+ const sourceName = this.contractSourceMap[input.name];
155
+ if (!sourceName) {
156
+ const errorMessage = `Contract '${input.name}' not found in provided build artifact`;
157
+ verificationLogger(errorMessage);
158
+ throw new Error(`[${chain}] ${errorMessage}`);
159
+ }
137
160
  const data = {
138
- sourceCode: this.flattenedSource,
139
- contractname: input.name,
161
+ sourceCode: this.standardInputJson,
162
+ contractname: `${sourceName}:${input.name}`,
140
163
  contractaddress: input.address,
141
164
  // TYPO IS ENFORCED BY API
142
165
  constructorArguements: (0, utils_1.strip0x)(input.constructorArguments ?? ''),
143
166
  ...this.compilerOptions,
144
167
  };
145
- const guid = await this.submitForm(chain, ExplorerApiActions.VERIFY_IMPLEMENTATION, data);
168
+ const guid = await this.submitForm(chain, types_1.ExplorerApiActions.VERIFY_IMPLEMENTATION, verificationLogger, data);
169
+ if (!guid)
170
+ return;
171
+ await this.submitForm(chain, types_1.ExplorerApiActions.CHECK_STATUS, verificationLogger, { guid });
146
172
  const addressUrl = await this.multiProvider.tryGetExplorerAddressUrl(chain, input.address);
147
- // poll for verified status
148
- if (guid) {
149
- try {
150
- await this.submitForm(chain, ExplorerApiActions.CHECK_STATUS, { guid });
151
- this.logger(`Successfully verified ${addressUrl}#code`);
152
- }
153
- catch (error) {
154
- console.error(`Verifying implementation at ${input.address} failed on ${chain}`);
155
- throw error;
156
- }
157
- }
173
+ verificationLogger(`Successfully verified ${addressUrl}#code`);
158
174
  }
159
- async verifyContract(chain, input) {
160
- if (input.address === ethers_1.ethers.constants.AddressZero) {
175
+ async verifyContract(chain, input, logger = this.logger) {
176
+ const verificationLogger = logger.extend(`${chain}:${input.name}`);
177
+ const explorerApi = this.multiProvider.tryGetExplorerApi(chain);
178
+ if (!explorerApi) {
179
+ verificationLogger('No explorer API set, skipping');
180
+ return;
181
+ }
182
+ if (!explorerApi.family) {
183
+ verificationLogger(`No explorer family set, skipping`);
161
184
  return;
162
185
  }
186
+ if (explorerApi.family === chainMetadataTypes_1.ExplorerFamily.Other) {
187
+ verificationLogger(`Unsupported explorer family, skipping`);
188
+ return;
189
+ }
190
+ if (input.address === ethers_1.ethers.constants.AddressZero)
191
+ return;
163
192
  if (Array.isArray(input.constructorArguments)) {
164
- this.logger('Constructor arguments in legacy format, skipping');
193
+ verificationLogger('Constructor arguments in legacy format, skipping');
165
194
  return;
166
195
  }
167
- if (await this.isAlreadyVerified(chain, input)) {
196
+ if (await this.isAlreadyVerified(chain, input, verificationLogger)) {
168
197
  const addressUrl = await this.multiProvider.tryGetExplorerAddressUrl(chain, input.address);
169
- this.logger(`Contract ${input.name} already verified on ${chain} at ${addressUrl}#code`);
170
- // There is a rate limit of 5 requests per second
171
- await (0, utils_1.sleep)(200);
198
+ verificationLogger(`Contract already verified at ${addressUrl}#code`);
199
+ await (0, utils_1.sleep)(200); // There is a rate limit of 5 requests per second
172
200
  return;
173
201
  }
174
- else {
175
- await this.verifyImplementation(chain, input);
176
- }
177
- await this.verifyProxy(chain, input);
202
+ await this.verifyImplementation(chain, input, verificationLogger);
203
+ await this.verifyProxy(chain, input, verificationLogger);
178
204
  }
179
205
  }
180
206
  exports.ContractVerifier = ContractVerifier;
@@ -1 +1 @@
1
- {"version":3,"file":"ContractVerifier.js","sourceRoot":"","sources":["../../../src/deploy/verify/ContractVerifier.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAgC;AAChC,iCAAwC;AACxC,mCAAgC;AAEhC,gDAAsD;AAItD,2DAAwD;AAQxD,IAAK,kBAMJ;AAND,WAAK,kBAAkB;IACrB,qDAA+B,CAAA;IAC/B,gEAA0C,CAAA;IAC1C,wDAAkC,CAAA;IAClC,wDAAkC,CAAA;IAClC,mEAA6C,CAAA;AAC/C,CAAC,EANI,kBAAkB,KAAlB,kBAAkB,QAMtB;AAED,IAAK,iBAMJ;AAND,WAAK,iBAAiB;IACpB,+EAA0D,CAAA;IAC1D,8DAAyC,CAAA;IACzC,8DAAyC,CAAA;IACzC,mIAA8G,CAAA;IAC9G,6JAAwI,CAAA;AAC1I,CAAC,EANI,iBAAiB,KAAjB,iBAAiB,QAMrB;AAED,MAAa,gBAAiB,SAAQ,2BAA+B;IAGnE,YACE,kBAA+C,EAC5B,aAA4B,EAC5B,OAAyB,EACzB,eAAuB,EAAE,kDAAkD;IAC3E,eAAgC;QAEnD,KAAK,CAAC,kBAAkB,CAAC,CAAC;QALP,kBAAa,GAAb,aAAa,CAAe;QAC5B,YAAO,GAAP,OAAO,CAAkB;QACzB,oBAAe,GAAf,eAAe,CAAQ;QACvB,oB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AC,KAAK,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC;IAC3D,CAAC;CACF;AAlSD,4CAkSC"}
@@ -0,0 +1,14 @@
1
+ /// <reference types="debug" />
2
+ import { MultiProvider } from '../../providers/MultiProvider';
3
+ import { ChainMap } from '../../types';
4
+ import { MultiGeneric } from '../../utils/MultiGeneric';
5
+ import { ContractVerifier } from './ContractVerifier';
6
+ import { BuildArtifact, CompilerOptions, VerificationInput } from './types';
7
+ export declare class PostDeploymentContractVerifier extends MultiGeneric<VerificationInput> {
8
+ protected readonly multiProvider: MultiProvider;
9
+ protected logger: import("debug").Debugger;
10
+ protected readonly contractVerifier: ContractVerifier;
11
+ constructor(verificationInputs: ChainMap<VerificationInput>, multiProvider: MultiProvider, apiKeys: ChainMap<string>, buildArtifact: BuildArtifact, licenseType: CompilerOptions['licenseType']);
12
+ verify(targets?: string[]): Promise<PromiseSettledResult<void>[]>;
13
+ }
14
+ //# sourceMappingURL=PostDeploymentContractVerifier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PostDeploymentContractVerifier.d.ts","sourceRoot":"","sources":["../../../src/deploy/verify/PostDeploymentContractVerifier.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5E,qBAAa,8BAA+B,SAAQ,YAAY,CAAC,iBAAiB,CAAC;IAM/E,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa;IALjD,SAAS,CAAC,MAAM,2BAAqD;IACrE,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;gBAGpD,kBAAkB,EAAE,QAAQ,CAAC,iBAAiB,CAAC,EAC5B,aAAa,EAAE,aAAa,EAC/C,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,EACzB,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,eAAe,CAAC,aAAa,CAAC;IAW7C,MAAM,CAAC,OAAO,WAAgB,GAAG,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC;CAmBvE"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PostDeploymentContractVerifier = void 0;
4
+ const debug_1 = require("debug");
5
+ const chainMetadataTypes_1 = require("../../metadata/chainMetadataTypes");
6
+ const MultiGeneric_1 = require("../../utils/MultiGeneric");
7
+ const ContractVerifier_1 = require("./ContractVerifier");
8
+ class PostDeploymentContractVerifier extends MultiGeneric_1.MultiGeneric {
9
+ constructor(verificationInputs, multiProvider, apiKeys, buildArtifact, licenseType) {
10
+ super(verificationInputs);
11
+ this.multiProvider = multiProvider;
12
+ this.logger = (0, debug_1.debug)('hyperlane:PostDeploymentContractVerifier');
13
+ this.contractVerifier = new ContractVerifier_1.ContractVerifier(multiProvider, apiKeys, buildArtifact, licenseType);
14
+ }
15
+ verify(targets = this.chains()) {
16
+ return Promise.allSettled(targets.map(async (chain) => {
17
+ // can check explorer family here to avoid doing these checks for each input in verifier
18
+ const { family } = this.multiProvider.getExplorerApi(chain);
19
+ if (family === chainMetadataTypes_1.ExplorerFamily.Other) {
20
+ this.logger(`Skipping verification for ${chain} due to unsupported explorer family.`);
21
+ return;
22
+ }
23
+ this.logger(`Verifying ${chain}...`);
24
+ for (const input of this.get(chain)) {
25
+ await this.contractVerifier.verifyContract(chain, input, this.logger);
26
+ }
27
+ }));
28
+ }
29
+ }
30
+ exports.PostDeploymentContractVerifier = PostDeploymentContractVerifier;
31
+ //# sourceMappingURL=PostDeploymentContractVerifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PostDeploymentContractVerifier.js","sourceRoot":"","sources":["../../../src/deploy/verify/PostDeploymentContractVerifier.ts"],"names":[],"mappings":";;;AAAA,iCAA8B;AAE9B,0EAAmE;AAGnE,2DAAwD;AAExD,yDAAsD;AAGtD,MAAa,8BAA+B,SAAQ,2BAA+B;IAIjF,YACE,kBAA+C,EAC5B,aAA4B,EAC/C,OAAyB,EACzB,aAA4B,EAC5B,WAA2C;QAE3C,KAAK,CAAC,kBAAkB,CAAC,CAAC;QALP,kBAAa,GAAb,aAAa,CAAe;QALvC,WAAM,GAAG,IAAA,aAAK,EAAC,0CAA0C,CAAC,CAAC;QAWnE,IAAI,CAAC,gBAAgB,GAAG,IAAI,mCAAgB,CAC1C,aAAa,EACb,OAAO,EACP,aAAa,EACb,WAAW,CACZ,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,EAAE;QAC5B,OAAO,OAAO,CAAC,UAAU,CACvB,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YAC1B,wFAAwF;YACxF,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;YAC5D,IAAI,MAAM,KAAK,mCAAc,CAAC,KAAK,EAAE;gBACnC,IAAI,CAAC,MAAM,CACT,6BAA6B,KAAK,sCAAsC,CACzE,CAAC;gBACF,OAAO;aACR;YAED,IAAI,CAAC,MAAM,CAAC,aAAa,KAAK,KAAK,CAAC,CAAC;YACrC,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;gBACnC,MAAM,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;aACvE;QACH,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;CACF;AAvCD,wEAuCC"}
@@ -5,10 +5,67 @@ export type ContractVerificationInput = {
5
5
  isProxy?: boolean;
6
6
  };
7
7
  export type VerificationInput = ContractVerificationInput[];
8
+ export type SolidityStandardJsonInput = {
9
+ sources: {
10
+ [sourceName: string]: {
11
+ content: string;
12
+ };
13
+ };
14
+ };
15
+ export type BuildArtifact = {
16
+ input: SolidityStandardJsonInput;
17
+ solcLongVersion: string;
18
+ };
19
+ export declare enum ExplorerLicenseType {
20
+ NO_LICENSE = "1",
21
+ UNLICENSED = "2",
22
+ MIT = "3",
23
+ GPL2 = "4",
24
+ GPL3 = "5",
25
+ LGPL2 = "6",
26
+ LGPL3 = "7",
27
+ BSD2 = "8",
28
+ BSD3 = "9",
29
+ MPL2 = "10",
30
+ OSL3 = "11",
31
+ APACHE2 = "12",
32
+ AGPL3 = "13",
33
+ BSL = "14"
34
+ }
8
35
  export type CompilerOptions = {
9
- codeformat: 'solidity-single-file' | 'solidity-standard-json-input';
36
+ codeformat: 'solidity-standard-json-input';
10
37
  compilerversion: string;
11
- optimizationUsed: '0' | '1';
12
- runs: string;
38
+ licenseType?: ExplorerLicenseType;
13
39
  };
40
+ export declare enum ExplorerApiActions {
41
+ GETSOURCECODE = "getsourcecode",
42
+ VERIFY_IMPLEMENTATION = "verifysourcecode",
43
+ MARK_PROXY = "verifyproxycontract",
44
+ CHECK_STATUS = "checkverifystatus",
45
+ CHECK_PROXY_STATUS = "checkproxyverification"
46
+ }
47
+ export declare const EXPLORER_GET_ACTIONS: ExplorerApiActions[];
48
+ export declare enum ExplorerApiErrors {
49
+ ALREADY_VERIFIED = "Contract source code already verified",
50
+ ALREADY_VERIFIED_ALT = "Already Verified",
51
+ VERIFICATION_PENDING = "Pending in queue",
52
+ PROXY_FAILED = "A corresponding implementation contract was unfortunately not detected for the proxy address.",
53
+ BYTECODE_MISMATCH = "Fail - Unable to verify. Compiled contract deployment bytecode does NOT match the transaction deployment bytecode.",
54
+ UNABLE_TO_VERIFY = "Fail - Unable to verify",
55
+ UNKNOWN_UID = "Unknown UID"
56
+ }
57
+ export type FormOptions<Action extends ExplorerApiActions> = Action extends ExplorerApiActions.GETSOURCECODE ? {
58
+ address: string;
59
+ } : Action extends ExplorerApiActions.VERIFY_IMPLEMENTATION ? CompilerOptions & {
60
+ contractaddress: string;
61
+ sourceCode: string;
62
+ contractname: string;
63
+ constructorArguements?: string;
64
+ } : Action extends ExplorerApiActions.MARK_PROXY ? {
65
+ address: string;
66
+ } : Action extends ExplorerApiActions.CHECK_STATUS ? {
67
+ guid: string;
68
+ } : Action extends ExplorerApiActions.CHECK_PROXY_STATUS ? {
69
+ guid: string;
70
+ } : never;
14
71
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/deploy/verify/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,yBAAyB,EAAE,CAAC;AAE5D,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,EAAE,sBAAsB,GAAG,8BAA8B,CAAC;IACpE,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,GAAG,GAAG,GAAG,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/deploy/verify/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,yBAAyB,EAAE,CAAC;AAE5D,MAAM,MAAM,yBA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IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,GACD,MAAM,SAAS,kBAAkB,CAAC,UAAU,GAC5C;IACE,OAAO,EAAE,MAAM,CAAC;CACjB,GACD,MAAM,SAAS,kBAAkB,CAAC,YAAY,GAC9C;IACE,IAAI,EAAE,MAAM,CAAC;CACd,GACD,MAAM,SAAS,kBAAkB,CAAC,kBAAkB,GACpD;IACE,IAAI,EAAE,MAAM,CAAC;CACd,GACD,KAAK,CAAC"}
@@ -1,3 +1,45 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ExplorerApiErrors = exports.EXPLORER_GET_ACTIONS = exports.ExplorerApiActions = exports.ExplorerLicenseType = void 0;
4
+ // see https://etherscan.io/contract-license-types
5
+ var ExplorerLicenseType;
6
+ (function (ExplorerLicenseType) {
7
+ ExplorerLicenseType["NO_LICENSE"] = "1";
8
+ ExplorerLicenseType["UNLICENSED"] = "2";
9
+ ExplorerLicenseType["MIT"] = "3";
10
+ ExplorerLicenseType["GPL2"] = "4";
11
+ ExplorerLicenseType["GPL3"] = "5";
12
+ ExplorerLicenseType["LGPL2"] = "6";
13
+ ExplorerLicenseType["LGPL3"] = "7";
14
+ ExplorerLicenseType["BSD2"] = "8";
15
+ ExplorerLicenseType["BSD3"] = "9";
16
+ ExplorerLicenseType["MPL2"] = "10";
17
+ ExplorerLicenseType["OSL3"] = "11";
18
+ ExplorerLicenseType["APACHE2"] = "12";
19
+ ExplorerLicenseType["AGPL3"] = "13";
20
+ ExplorerLicenseType["BSL"] = "14";
21
+ })(ExplorerLicenseType || (exports.ExplorerLicenseType = ExplorerLicenseType = {}));
22
+ var ExplorerApiActions;
23
+ (function (ExplorerApiActions) {
24
+ ExplorerApiActions["GETSOURCECODE"] = "getsourcecode";
25
+ ExplorerApiActions["VERIFY_IMPLEMENTATION"] = "verifysourcecode";
26
+ ExplorerApiActions["MARK_PROXY"] = "verifyproxycontract";
27
+ ExplorerApiActions["CHECK_STATUS"] = "checkverifystatus";
28
+ ExplorerApiActions["CHECK_PROXY_STATUS"] = "checkproxyverification";
29
+ })(ExplorerApiActions || (exports.ExplorerApiActions = ExplorerApiActions = {}));
30
+ exports.EXPLORER_GET_ACTIONS = [
31
+ ExplorerApiActions.CHECK_STATUS,
32
+ ExplorerApiActions.CHECK_PROXY_STATUS,
33
+ ExplorerApiActions.GETSOURCECODE,
34
+ ];
35
+ var ExplorerApiErrors;
36
+ (function (ExplorerApiErrors) {
37
+ ExplorerApiErrors["ALREADY_VERIFIED"] = "Contract source code already verified";
38
+ ExplorerApiErrors["ALREADY_VERIFIED_ALT"] = "Already Verified";
39
+ ExplorerApiErrors["VERIFICATION_PENDING"] = "Pending in queue";
40
+ ExplorerApiErrors["PROXY_FAILED"] = "A corresponding implementation contract was unfortunately not detected for the proxy address.";
41
+ ExplorerApiErrors["BYTECODE_MISMATCH"] = "Fail - Unable to verify. Compiled contract deployment bytecode does NOT match the transaction deployment bytecode.";
42
+ ExplorerApiErrors["UNABLE_TO_VERIFY"] = "Fail - Unable to verify";
43
+ ExplorerApiErrors["UNKNOWN_UID"] = "Unknown UID";
44
+ })(ExplorerApiErrors || (exports.ExplorerApiErrors = ExplorerApiErrors = {}));
3
45
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/deploy/verify/types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/deploy/verify/types.ts"],"names":[],"mappings":";;;AAsBA,kDAAkD;AAClD,IAAY,mBAeX;AAfD,WAAY,mBAAmB;IAC7B,uCAAgB,CAAA;IAChB,uCAAgB,CAAA;IAChB,gCAAS,CAAA;IACT,iCAAU,CAAA;IACV,iCAAU,CAAA;IACV,kCAAW,CAAA;IACX,kCAAW,CAAA;IACX,iCAAU,CAAA;IACV,iCAAU,CAAA;IACV,kCAAW,CAAA;IACX,kCAAW,CAAA;IACX,qCAAc,CAAA;IACd,mCAAY,CAAA;IACZ,iCAAU,CAAA;AACZ,CAAC,EAfW,mBAAmB,mCAAnB,mBAAmB,QAe9B;AAQD,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,qDAA+B,CAAA;IAC/B,gEAA0C,CAAA;IAC1C,wDAAkC,CAAA;IAClC,wDAAkC,CAAA;IAClC,mEAA6C,CAAA;AAC/C,CAAC,EANW,kBAAkB,kCAAlB,kBAAkB,QAM7B;AAEY,QAAA,oBAAoB,GAAG;IAClC,kBAAkB,CAAC,YAAY;IAC/B,kBAAkB,CAAC,kBAAkB;IACrC,kBAAkB,CAAC,aAAa;CACjC,CAAC;AAEF,IAAY,iBAQX;AARD,WAAY,iBAAiB;IAC3B,+EAA0D,CAAA;IAC1D,8DAAyC,CAAA;IACzC,8DAAyC,CAAA;IACzC,mIAA8G,CAAA;IAC9G,6JAAwI,CAAA;IACxI,iEAA4C,CAAA;IAC5C,gDAA2B,CAAA;AAC7B,CAAC,EARW,iBAAiB,iCAAjB,iBAAiB,QAQ5B"}
@@ -1,4 +1,3 @@
1
- import { Address } from '@hyperlane-xyz/utils';
2
1
  import { HyperlaneAppChecker } from '../deploy/HyperlaneAppChecker';
3
2
  import { ChainName } from '../types';
4
3
  import { HyperlaneIgp } from './HyperlaneIgp';
@@ -9,6 +8,5 @@ export declare class HyperlaneIgpChecker extends HyperlaneAppChecker<HyperlaneIg
9
8
  checkBytecodes(chain: ChainName): Promise<void>;
10
9
  checkOverheadInterchainGasPaymaster(local: ChainName): Promise<void>;
11
10
  checkInterchainGasPaymaster(local: ChainName): Promise<void>;
12
- getGasOracleAddress(local: ChainName, remote: ChainName): Address;
13
11
  }
14
12
  //# sourceMappingURL=HyperlaneIgpChecker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HyperlaneIgpChecker.d.ts","sourceRoot":"","sources":["../../src/gas/HyperlaneIgpChecker.ts"],"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