Skip to content
Open
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
0fad3bf
fix: skip gas estimation on zkSync due to signer requirement
mortezashojaei Jan 20, 2025
de267f5
feat: add technical stack-aware ISM factory deployment with static ad…
mortezashojaei Jan 20, 2025
d576f7e
feat: Add technical stack compatibility check for ISM deployment
mortezashojaei Jan 20, 2025
619e165
docs(changeset): Check for ZKSync contracts and functionalities support
mortezashojaei Jan 20, 2025
fd2ef51
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Jan 21, 2025
d7d7171
Merge remote-tracking branch 'origin/main' into feat/zksync-compatibi…
ljankovic-txfusion Jan 23, 2025
4040fa5
Merge remote-tracking branch 'origin/main' into feat/zksync-compatibi…
ljankovic-txfusion Jan 23, 2025
8b0a49e
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Jan 23, 2025
a5ee211
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Jan 23, 2025
233e950
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Jan 23, 2025
52fe803
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Jan 24, 2025
f6cc068
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Jan 27, 2025
2d6a7dc
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Jan 27, 2025
f35fa92
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Jan 27, 2025
1bd7514
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Jan 29, 2025
8a32f10
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Jan 29, 2025
5d40bb1
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Feb 3, 2025
dab4fd7
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Mar 12, 2025
3c3bebd
chore: update Solidity version in zk-hardhat.config.cts to 0.8.22
ljankovic-txfusion Mar 12, 2025
329245c
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Mar 12, 2025
a70befc
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Mar 18, 2025
50b4d32
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Mar 26, 2025
b2adbba
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Apr 1, 2025
3ebbee1
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Apr 2, 2025
f0861ce
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Apr 2, 2025
0a89e50
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Apr 2, 2025
ce2a4a0
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Apr 4, 2025
84b1cc5
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Apr 8, 2025
6b5d7d8
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Apr 11, 2025
f5e6ece
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Apr 14, 2025
a0f27bf
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Apr 14, 2025
6da082e
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Apr 15, 2025
e1ac233
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Apr 17, 2025
c14248c
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Apr 22, 2025
09ab3b8
refactor: reorganize ISM utility exports and add isStaticIsm function
ljankovic-txfusion Apr 22, 2025
4a0592f
feat: add isHookCompatible function to check hook type compatibility …
ljankovic-txfusion Apr 22, 2025
69d08ce
refactor: move isHookCompatible function to a new file and update ISM…
ljankovic-txfusion Apr 22, 2025
4d46d5c
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Apr 28, 2025
99fb21b
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Apr 29, 2025
6ed0232
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion May 2, 2025
13abf18
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion May 2, 2025
69949a6
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion May 20, 2025
1a597e9
chore: evm e2e with new submitter (#6196)
daniel-savu May 20, 2025
2faf54e
fix: storage diff-check (#6290)
paulbalaji May 20, 2025
d03a8ff
chore: depot docker recommendations (#6258)
paulbalaji May 21, 2025
7aae0ec
feat: setup turborepo (#3899)
paulbalaji May 21, 2025
ac13dde
chore: add cosmos native core cli commands (#6263)
troykessler May 21, 2025
33f88c2
feat(relayer): optimize ccip-read initialization (#6299)
daniel-savu May 21, 2025
0c4037f
fix: require ssl for connection (#6285)
Mo-Hussain May 21, 2025
61cc963
fix: priority gas price overpayments (#6295)
daniel-savu May 21, 2025
5840ad1
chore: update monitor image to include new token standard handling (#…
Mo-Hussain May 21, 2025
db5744e
fix: token metadata handling (#6175)
christopherbrumm May 21, 2025
1c01a4f
fix: Scraper: Fix issue with missing enum invariant for Sealevel (#6298)
ameten May 21, 2025
197fd87
chore: new relayer image (#6304)
daniel-savu May 21, 2025
689ed7c
chore: reduce release-e2e-matrix frequency (#6296)
paulbalaji May 21, 2025
89a7c6f
fix(submitter): Fix transaction fields (#6306)
ameten May 21, 2025
e67cb5f
chore: Upgrade Scraper to latest (#6307)
ameten May 21, 2025
ec1ba92
chore: add `sol`, `ufd`, `fartcoin`& `pengu` (#6249)
christopherbrumm May 21, 2025
6a7feaa
Merge branch 'main' into feat/zksync-verification-classes
mshojaei-txfusion May 22, 2025
f41f766
feat: yaml sorting eslint plugin (#5909)
mshojaei-txfusion May 22, 2025
754f7ba
fix: disable cosmos signers for now (#6309)
troykessler May 22, 2025
4cb0f8f
chore: add routing ism to cosmos native ism module (#6264)
troykessler May 22, 2025
86a8502
chore: change extractPrivateKey info logs to debug logs (#6310)
paulbalaji May 22, 2025
72db0fc
chore: migrate to workspace dependency syntax (#6308)
antigremlin May 22, 2025
67e280d
chore: disable arthera (#6313)
paulbalaji May 22, 2025
2fe1ee8
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
mshojaei-txfusion May 22, 2025
7d5c6b4
chore: share tsconfig.json from a package (#6314)
antigremlin May 22, 2025
9cc195f
fix: Make Solana testnet chunk same as for mainnet (#6311)
ameten May 22, 2025
a1aeb05
feat: may 18 multisig batch (#6259)
paulbalaji May 22, 2025
6e86efa
feat: agent-specific rpc consensus defaults (#6316)
daniel-savu May 22, 2025
c42ea09
feat: may 21 testnet batch (#6300)
paulbalaji May 22, 2025
99e645f
feat: may 20 svm multisig batch (#6283)
paulbalaji May 22, 2025
1838a32
chore: trigger release PR testing automatically (#6318)
paulbalaji May 22, 2025
711ec32
Version Packages (#6302)
github-actions[bot] May 22, 2025
cd510d4
feat: publish with github-hosted runner (#6319)
paulbalaji May 22, 2025
a1635bd
feat: update warp init to generate config with new warp route id (#6230)
ltyu May 22, 2025
ba4deea
Revert "chore: migrate to workspace dependency syntax (#6308)" (#6326)
paulbalaji May 23, 2025
28e19ad
Version Packages (#6327)
github-actions[bot] May 23, 2025
9711466
Merge branch 'main' into feat/zksync-compatibility-check
mshojaei-txfusion May 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/honest-readers-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/sdk': minor
---

Check for ZKSync contracts and functionalities support
48 changes: 40 additions & 8 deletions typescript/sdk/src/core/EvmCoreModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@ import {
proxyFactoryFactories,
} from '../deploy/contracts.js';
import { proxyAdminUpdateTxs } from '../deploy/proxy.js';
import { createDefaultProxyFactoryFactories } from '../deploy/proxyFactoryUtils.js';
import { ProxyFactoryFactoriesAddresses } from '../deploy/types.js';
import { ContractVerifier } from '../deploy/verify/ContractVerifier.js';
import { HookFactories } from '../hook/contracts.js';
import { EvmIsmModule } from '../ism/EvmIsmModule.js';
import { DerivedIsmConfig } from '../ism/EvmIsmReader.js';
import { HyperlaneIsmFactory } from '../ism/HyperlaneIsmFactory.js';
import { IsmConfig } from '../ism/types.js';
import { isStaticDeploymentSupported } from '../ism/utils.js';
import { ChainTechnicalStack } from '../metadata/chainMetadataTypes.js';
import { MultiProvider } from '../providers/MultiProvider.js';
import { AnnotatedEV5Transaction } from '../providers/ProviderType.js';
import { ChainName, ChainNameOrId } from '../types.js';
Expand Down Expand Up @@ -280,14 +284,16 @@ export class EvmCoreModule extends HyperlaneModule<
contractVerifier?: ContractVerifier;
}): Promise<DeployedCoreAddresses> {
const { config, multiProvider, chain, contractVerifier } = params;
const chainName = multiProvider.getChainName(chain);
const { name: chainName, technicalStack } =
multiProvider.getChainMetadata(chain);

const ismFactoryFactories = await EvmCoreModule.deployIsmFactories({
chainName,
config,
multiProvider,
contractVerifier,
});
const ismFactoryFactories: ProxyFactoryFactoriesAddresses =
await this.getIsmFactoryFactories(technicalStack, {
chainName,
config,
multiProvider,
contractVerifier,
});

const ismFactory = new HyperlaneIsmFactory(
attachContractsMap(
Expand Down Expand Up @@ -382,7 +388,6 @@ export class EvmCoreModule extends HyperlaneModule<
// Set Core & extra addresses
return {
...ismFactoryFactories,

proxyAdmin: proxyAdmin.address,
mailbox: mailbox.address,
interchainAccountRouter,
Expand Down Expand Up @@ -487,4 +492,31 @@ export class EvmCoreModule extends HyperlaneModule<
);
return mailbox;
}

/**
* Retrieves the ISM factory factories based on the provided protocol and parameters.
*
* @param protocol - The protocol type to determine if static address set deployment should be skipped.
* @param params - An object containing the parameters needed for ISM factory deployment.
* @param params.chainName - The name of the chain for which the ISM factories are being deployed.
* @param params.config - The core configuration to be used during deployment.
* @param params.multiProvider - The multi-provider instance for interacting with the blockchain.
* @param params.contractVerifier - An optional contract verifier for validating contracts during deployment.
* @returns A promise that resolves to the addresses of the deployed ISM factory factories.
*/
private static async getIsmFactoryFactories(
technicalStack: ChainTechnicalStack | undefined,
params: {
chainName: string;
config: CoreConfig;
multiProvider: MultiProvider;
contractVerifier?: ContractVerifier;
},
): Promise<ProxyFactoryFactoriesAddresses> {
// Check if we should skip static address set deployment
if (!isStaticDeploymentSupported(technicalStack)) {
return createDefaultProxyFactoryFactories();
}
return EvmCoreModule.deployIsmFactories(params);
}
}
8 changes: 8 additions & 0 deletions typescript/sdk/src/core/HyperlaneCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
} from '../contracts/types.js';
import { DerivedHookConfig, EvmHookReader } from '../hook/EvmHookReader.js';
import { DerivedIsmConfig, EvmIsmReader } from '../ism/EvmIsmReader.js';
import { ChainTechnicalStack } from '../metadata/chainMetadataTypes.js';
import { MultiProvider } from '../providers/MultiProvider.js';
import { RouterConfig } from '../router/types.js';
import { ChainMap, ChainName, OwnableConfig } from '../types.js';
Expand Down Expand Up @@ -252,6 +253,13 @@ export class HyperlaneCore extends HyperlaneApp<CoreFactories> {
}

async estimateHandle(message: DispatchedMessage): Promise<string> {
// This estimation is not possible on zksync as it is overriding transaction.from
// transaction.from must be a signer on zksync
if (
this.multiProvider.getChainMetadata(this.getDestination(message))
.technicalStack === ChainTechnicalStack.ZkSync
)
return '0';
return (
await this.getRecipient(message).estimateGas.handle(
message.parsed.origin,
Expand Down
10 changes: 9 additions & 1 deletion typescript/sdk/src/ism/HyperlaneIsmFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ import {
RoutingIsmDelta,
WeightedMultisigIsmConfig,
} from './types.js';
import { routingModuleDelta } from './utils.js';
import { isIsmCompatible, routingModuleDelta } from './utils.js';

const ismFactories = {
[IsmType.PAUSABLE]: new PausableIsm__factory(),
Expand Down Expand Up @@ -149,6 +149,14 @@ export class HyperlaneIsmFactory extends HyperlaneApp<ProxyFactoryFactories> {
}`,
);

const { technicalStack } = this.multiProvider.getChainMetadata(destination);

// For static ISM types it checks whether the technical stack supports static contract deployment
assert(
isIsmCompatible({ chainTechnicalStack: technicalStack, ismType }),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we be checking if the hooks are compatible too?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not run into ever setting static hooks on core-config or warp-config, usually check for static ism is enough. How would we go about deploying static hooks from cli perspective?

Copy link
Copy Markdown

@paulbalaji paulbalaji Apr 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's just a check that we're using storageaggregation instead of staticaggregation hooks on these zk chains, i'm not sure if there are any other static hooks we care about

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah now I understand why I did not catch it the first time, for ISM it says staticAggregationIsm and for hook it just says aggregationHook. You are right! I will include hook type validation

`Technical stack ${technicalStack} is not compatible with ${ismType}`,
);

let contract: DeployedIsmType[typeof ismType];
switch (ismType) {
case IsmType.MESSAGE_ID_MULTISIG:
Expand Down