Skip to content

Commit e17ca49

Browse files
Merge remote-tracking branch 'origin/feat/integrate-zksync-on-sdk' into feat/integrate-zksync-on-cli
2 parents 9e2a756 + ccbea78 commit e17ca49

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

typescript/sdk/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"ethers": "^5.7.2",
2222
"pino": "^8.19.0",
2323
"viem": "^2.21.45",
24+
"zksync-ethers": "^5.10.0",
2425
"zod": "^3.21.2"
2526
},
2627
"devDependencies": {
@@ -48,8 +49,7 @@
4849
"ts-node": "^10.8.0",
4950
"tsx": "^4.19.1",
5051
"typescript": "5.3.3",
51-
"yaml": "2.4.5",
52-
"zksync-ethers": "^5.10.0"
52+
"yaml": "2.4.5"
5353
},
5454
"type": "module",
5555
"exports": {

typescript/sdk/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ export {
211211
moduleCanCertainlyVerify,
212212
isStaticDeploymentSupported,
213213
isIsmCompatible,
214+
isStaticIsm,
214215
} from './ism/utils.js';
215216
export {
216217
AgentChainMetadata,

typescript/sdk/src/ism/utils.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,16 @@ export function collectValidators(
537537
return new Set(validators);
538538
}
539539

540+
/**
541+
* Checks if the given ISM type requires static deployment
542+
*
543+
* @param {IsmType} ismType - The type of Interchain Security Module (ISM)
544+
* @returns {boolean} True if the ISM type requires static deployment, false otherwise
545+
*/
546+
export function isStaticIsm(ismType: IsmType): boolean {
547+
return STATIC_ISM_TYPES.includes(ismType);
548+
}
549+
540550
/**
541551
* Determines if static ISM deployment is supported on a given chain's technical stack
542552
* @dev Currently, only ZkSync does not support static deployments
@@ -566,7 +576,7 @@ export function isIsmCompatible({
566576
ismType: IsmType;
567577
}): boolean {
568578
// Skip compatibility check for non-static ISMs as they're always supported
569-
if (!STATIC_ISM_TYPES.includes(ismType)) return true;
579+
if (!isStaticIsm(ismType)) return true;
570580

571581
return isStaticDeploymentSupported(chainTechnicalStack);
572582
}

0 commit comments

Comments
 (0)