Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: integrate zksync on cli #5216

Open
wants to merge 328 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
328 commits
Select commit Hold shift + click to select a range
3a0ceca
merge: update with latest changes from root
mortezashojaei Oct 25, 2024
36e2b00
Merge remote-tracking branch 'origin-root/main'
mortezashojaei Oct 28, 2024
d938378
Merge branch 'feat/zksync-support' into improvement/verification
mortezashojaei Oct 30, 2024
ece0885
fix: linting & refactoring
ljankovic-txfusion Oct 30, 2024
400009e
fix: file not found issue in verification
mortezashojaei Oct 30, 2024
fecdf66
feat: fix etherscan and support zksync etherscan
mortezashojaei Oct 30, 2024
e523e4e
Merge pull request #3 from txfusion/improvement/zksync-support
mshojaei-txfusion Oct 31, 2024
4c3996d
Merge remote-tracking branch 'origin-root/main' into feat/zksync-support
mortezashojaei Oct 31, 2024
1927aea
cleanup: remove unused imports
mortezashojaei Oct 31, 2024
4d03c3e
Merge remote-tracking branch 'origin-txfusion/feat/zksync-support' in…
mortezashojaei Oct 31, 2024
274a778
Merge remote-tracking branch 'origin-txfusion/feat/zksync-support' in…
mortezashojaei Oct 31, 2024
44a8f3c
feat: deployStorageMultisigIsm on HyperlaneIsmFactory
ljankovic-txfusion Oct 31, 2024
e2b0158
Merge pull request #4 from txfusion/temp/merge-root-changes
mshojaei-txfusion Oct 31, 2024
bd472de
Merge remote-tracking branch 'origin-txfusion/feat/zksync-support' in…
mortezashojaei Oct 31, 2024
27bfc90
Merge pull request #1 from txfusion/improvement/verification
mshojaei-txfusion Oct 31, 2024
c103657
feat: static deployment refactor
ljankovic-txfusion Oct 31, 2024
1b737c5
fix: contract verification on warp deploy
ljankovic-txfusion Oct 31, 2024
c72805b
feat: static ISM type & technical stack assertion
ljankovic-txfusion Oct 31, 2024
4e5ed79
perf: check for static ism compatibility
ljankovic-txfusion Nov 1, 2024
eee7d78
fix: cleanup lint issue
mortezashojaei Nov 1, 2024
53042da
minor: comment explains state of zksync explorers support
mortezashojaei Nov 1, 2024
9e9baba
refactor: verification delay based on explorer family
mortezashojaei Nov 1, 2024
264b241
improvement: replace if with assert
mortezashojaei Nov 1, 2024
3755332
fix: test imports
ljankovic-txfusion Nov 1, 2024
915de97
fix: imports and assertion
ljankovic-txfusion Nov 1, 2024
07c3e64
chore: skip e2e zksync tests
ljankovic-txfusion Nov 1, 2024
3b1e97f
minor: change
ljankovic-txfusion Nov 1, 2024
44ca8ef
fix: overrides no longer override contract.initialize
ljankovic-txfusion Nov 1, 2024
b85b075
fix: ExplorerFamily casing & /dist/evm/ -> /core-utils/evm/
ljankovic-txfusion Nov 1, 2024
421071a
fix: dist/evm -> core-utils/evm in all tests
ljankovic-txfusion Nov 1, 2024
b212311
chore: reorg core exports, handing zksync json artifacts
ljankovic-txfusion Nov 4, 2024
2006daf
chore: reduce yarn.lock diff
ljankovic-txfusion Nov 5, 2024
f638c20
fix: skip zksync typechain creation
ljankovic-txfusion Nov 6, 2024
ba0d6ea
feat: Singe/MultiVM signer strategy
ljankovic-txfusion Nov 7, 2024
2bf349b
feat: Deployment strategies & refactoring
ljankovic-txfusion Nov 8, 2024
9c43d1c
fix: e2e test working
ljankovic-txfusion Nov 11, 2024
3602abd
chore: add comments & minor refactoring
ljankovic-txfusion Nov 11, 2024
ce81b48
chore: minor fixes
ljankovic-txfusion Nov 12, 2024
ff2b4c9
Merge remote-tracking branch 'origin-root/main'
ljankovic-txfusion Nov 12, 2024
af97d7f
Merge remote-tracking branch 'origin-root/main'
ljankovic-txfusion Nov 12, 2024
e4839a1
perf: removed unused code and refactoring
ljankovic-txfusion Nov 12, 2024
4abd806
feat: masked pk, refactoring
ljankovic-txfusion Nov 13, 2024
188dced
feat: MultiChainHandler support to extract chains from WarpCoreConfig…
ljankovic-txfusion Nov 14, 2024
0b92c68
chore: refactoring & adding comments
ljankovic-txfusion Nov 15, 2024
ea205dc
Merge remote-tracking branch 'origin/main' into feat/key-command
ljankovic-txfusion Nov 15, 2024
ac6d5c1
feat: relay command chain resolver strategy & refactoring
ljankovic-txfusion Nov 15, 2024
925621c
feat: Signer strategy based on chain's protocol/tech stack
ljankovic-txfusion Nov 18, 2024
a0ea88b
chore: minor refactoring
ljankovic-txfusion Nov 18, 2024
f030f23
Merge remote-tracking branch 'origin/main' into feat/key-command
ljankovic-txfusion Nov 18, 2024
52efa81
add: strategy types for submitter
ljankovic-txfusion Nov 18, 2024
12679af
chore: following naming conventions & comments
ljankovic-txfusion Nov 18, 2024
b7d439b
feat: requiresKey options on strategy `read` command
ljankovic-txfusion Nov 19, 2024
24b9d7a
chore: revert MessageOptionsArgTypes origin & destination optionality
ljankovic-txfusion Nov 19, 2024
60a2ae2
feat: strategy init chain agnostic
ljankovic-txfusion Nov 20, 2024
884db14
feat: logging private key source
ljankovic-txfusion Nov 20, 2024
2cc7ca4
chore: MultiProtocolSignerOptions refactor
ljankovic-txfusion Nov 20, 2024
d7326a6
docs(changeset): Added strategy management CLI commands and MultiProt…
ljankovic-txfusion Nov 20, 2024
05a3d19
refactor: convert dynamic import to static for ethers Interface
ljankovic-txfusion Nov 21, 2024
2afd302
refactor: simplify provider architecture and remove ZKSync specifics
ljankovic-txfusion Nov 21, 2024
92878d5
refactor: use ethers.utils.Interface instead of direct @ethersproject…
ljankovic-txfusion Nov 21, 2024
a9df9e8
feat: integrate zksync-ethers wallet for ZKSync signer strategy
ljankovic-txfusion Nov 21, 2024
6561504
refactor: improve signer management in warp route deploy config creation
ljankovic-txfusion Nov 21, 2024
de879a3
merge: latest changes on main
mortezashojaei Nov 22, 2024
e532b1a
refactor: improve strategy config handling and type safety & sensitiv…
ljankovic-txfusion Nov 22, 2024
afb3b21
refactor: sensitive key function name
ljankovic-txfusion Nov 22, 2024
fc1188a
docs(changeset): Added `isPrivateKeyEvm` function for validating EVM …
ljankovic-txfusion Nov 22, 2024
366aab5
refactor: simplify address validation and reorganize chain utils
ljankovic-txfusion Nov 22, 2024
e6ce0c8
Merge remote-tracking branch 'origin/feat/key-command' into feat/zksy…
ljankovic-txfusion Nov 22, 2024
0b793c7
chore: change cli changeset to minor
ljankovic-txfusion Nov 22, 2024
24b0c55
refactor: update SignerConfig address type to use Address from hyperl…
ljankovic-txfusion Nov 25, 2024
2076ef6
refactor: move CommandType enum to signCommands.ts
ljankovic-txfusion Nov 25, 2024
e61baff
fix: passed key used for setting signer
ljankovic-txfusion Nov 25, 2024
2d08d1e
Merge remote-tracking branch 'origin/main' into feat/key-command
mortezashojaei Nov 27, 2024
92115c0
fix: update getWarpCoreConfigOrExit import on MultiChainResolver
mortezashojaei Nov 27, 2024
c6cc7e9
Merge remote-tracking branch 'origin-root/main'
mortezashojaei Nov 27, 2024
0c8dc01
Merge remote-tracking branch 'origin-root/main' into feat/key-command
mortezashojaei Nov 27, 2024
ccc7df6
fix: no-unused-vars linting issues
mortezashojaei Nov 27, 2024
bdf0107
minor: remove catch unused param
mortezashojaei Nov 27, 2024
e13e08a
Merge branch 'hyperlane-xyz:main' into main
mshojaei-txfusion Nov 28, 2024
2258bbc
Merge branch 'feat/key-command' into feat/zksync-signer-strategy
mortezashojaei Nov 28, 2024
d6c3c75
Merge remote-tracking branch 'origin-root/main' into feat/zksync-sign…
mortezashojaei Nov 28, 2024
0546e10
Merge branch 'hyperlane-xyz:main' into main
mshojaei-txfusion Nov 28, 2024
dd87034
docs(changeset): Added ZKSync signer support using zksync-ethers package
mortezashojaei Nov 28, 2024
2ee37d4
Merge branch 'hyperlane-xyz:main' into main
mshojaei-txfusion Nov 28, 2024
befa5a9
Merge branch 'feat/zksync-signer-strategy' into feat/zksync-support
mortezashojaei Nov 28, 2024
7770bd7
Merge branch 'hyperlane-xyz:main' into main
mshojaei-txfusion Nov 29, 2024
21758af
fix: read multiProtocolSigner from sginer middleware on warp init
mortezashojaei Nov 29, 2024
38310f8
refactor: standardize signer address handling on context
mortezashojaei Dec 4, 2024
6e437c7
feat(cli): Add 'check' command to SIGN_COMMANDS and use signer for co…
mortezashojaei Dec 4, 2024
4820623
fix: handle warp check as a sign command on signer strategies
mortezashojaei Dec 4, 2024
3146e93
fix: handle warp read and warp check as sign command temporary
mortezashojaei Dec 4, 2024
fa2b0e8
chore: fix typo
mortezashojaei Dec 5, 2024
7d6a156
Merge branch 'hyperlane-xyz:main' into main
mshojaei-txfusion Dec 5, 2024
250b2b1
Merge branch 'feat/key-command' into feat/zksync-signer-strategy
mortezashojaei Dec 5, 2024
b90d0f7
Merge branch 'hyperlane-xyz:main' into main
mshojaei-txfusion Dec 5, 2024
80533e1
Merge branch 'main' into feat/key-command
mortezashojaei Dec 5, 2024
293e1b2
Merge branch 'feat/key-command' into feat/zksync-signer-strategy
mortezashojaei Dec 5, 2024
17d3e88
Merge branch 'feat/zksync-signer-strategy' into feat/zksync-support
mortezashojaei Dec 5, 2024
4e3b65c
chore: modify type of signer on context
mortezashojaei Dec 5, 2024
ea2cf3a
Merge branch 'feat/key-command' into feat/zksync-signer-strategy
mortezashojaei Dec 5, 2024
a0fe63d
Merge branch 'feat/zksync-signer-strategy' into feat/zksync-support
mortezashojaei Dec 5, 2024
c33d90f
Merge branch 'hyperlane-xyz:main' into main
mshojaei-txfusion Dec 6, 2024
e3fba6a
Merge branch 'hyperlane-xyz:main' into main
mshojaei-txfusion Dec 9, 2024
a45c50a
Merge branch 'hyperlane-xyz:main' into main
ljankovic-txfusion Dec 10, 2024
b7e3c81
fix: ICA_ROUTING on isIsmStatic
mortezashojaei Dec 10, 2024
86996e1
Merge remote-tracking branch 'origin' into feat/zksync-signer-strategy
ljankovic-txfusion Dec 11, 2024
b118669
Merge branch 'main' of github.com:hyperlane-xyz/hyperlane-monorepo in…
ljankovic-txfusion Dec 11, 2024
394055f
feat: replace Ethers Wallet with ZKSync-specific wallet implementatio…
ljankovic-txfusion Dec 11, 2024
576744b
Merge branch 'hyperlane-xyz:main' into main
ljankovic-txfusion Dec 11, 2024
6c786de
Merge branch 'main' of github.com:hyperlane-xyz/hyperlane-monorepo in…
ljankovic-txfusion Dec 11, 2024
b58434e
refactor(cli): remove unused multiProtocolSigner from warp init command
ljankovic-txfusion Dec 11, 2024
8f7d04d
Merge branch 'hyperlane-xyz:main' into main
ljankovic-txfusion Dec 11, 2024
e16b0e3
Merge branch 'hyperlane-xyz:main' into main
ljankovic-txfusion Dec 12, 2024
b6fc019
Merge branch 'main' into feat/zksync-signer-strategy
ljankovic-txfusion Dec 12, 2024
b89aaa0
Merge remote-tracking branch 'origin/feat/zksync-signer-strategy' int…
ljankovic-txfusion Dec 12, 2024
b8065df
refactor: rename TokenRouterConfig and reorganize type imports
ljankovic-txfusion Dec 12, 2024
fae0a67
refactor: apply mutable storage ISMs commit and reorganize exports
ljankovic-txfusion Dec 12, 2024
94920ae
fix: linting errors and remove duplicate switch cases
ljankovic-txfusion Dec 12, 2024
5f380e5
Merge branch 'hyperlane-xyz:main' into main
ljankovic-txfusion Dec 13, 2024
c9a8598
chore: Update import paths and cleanup script
ljankovic-txfusion Dec 17, 2024
ff15dc6
docs(changeset): ZKSync protocol integration and restructuring typech…
ljankovic-txfusion Dec 17, 2024
885f657
docs(changeset): Support for ZKSync contract deployment and verification
ljankovic-txfusion Dec 17, 2024
6aba349
docs(changeset): Support for ZKSync contracts deployment & verification
ljankovic-txfusion Dec 17, 2024
8ac3b22
Merge branch 'hyperlane-xyz:main' into main
ljankovic-txfusion Dec 17, 2024
231ab4c
Merge remote-tracking branch 'origin/main' into feat/zksync-support
ljankovic-txfusion Dec 17, 2024
c20a620
fix: json-rpc-chain-strategy.yaml for zksync chains
ljankovic-txfusion Dec 17, 2024
6dd6d47
fix: typechain contract factory imports
ljankovic-txfusion Dec 18, 2024
074e7d4
Merge branch 'hyperlane-xyz:main' into main
ljankovic-txfusion Dec 19, 2024
3c4eade
Add Zksync to ContractVerifier
ltyu Jan 7, 2025
8e4cb59
Add Zksync support to PostDeployVerifier
ltyu Jan 7, 2025
b69b369
Split Etherscan constructor getter into a separate function. Add getZ…
ltyu Jan 7, 2025
2461008
docs(changeset): Add ZKSync support to Post Verification (`hyperlane …
ltyu Jan 7, 2025
1d6d163
Remove any
ltyu Jan 7, 2025
b48be06
Merge branch 'hyperlane-xyz:main' into main
mshojaei-txfusion Jan 13, 2025
33240c3
fix: add core:deploy command type and single chain resolver support
ljankovic-txfusion Jan 13, 2025
4bbacac
docs(changeset): Support for CORE_DEPLOY in ChainResolverFactory
ljankovic-txfusion Jan 13, 2025
02b5be6
fix: changeset to minor
ljankovic-txfusion Jan 13, 2025
ed0f5a9
Merge branch 'hyperlane-xyz:main' into main
ljankovic-txfusion Jan 13, 2025
8090e97
Merge branch 'hyperlane-xyz:main' into main
mshojaei-txfusion Jan 13, 2025
3c53d9c
refactor: consolidate chain resolvers by removing SingleChainResolver…
ljankovic-txfusion Jan 13, 2025
b7222ee
chore: remove unused Command Type
ljankovic-txfusion Jan 13, 2025
dc521c0
update: merge with main latest changes
mortezashojaei Jan 13, 2025
3c49d8a
refactor(cli): refine MultiChainResolver implementation
ljankovic-txfusion Jan 13, 2025
d202f8c
chore: update comment
ljankovic-txfusion Jan 13, 2025
bee47f7
Merge pull request #18 from hyperlane-xyz/ltyu/zksync-post-verifier
mshojaei-txfusion Jan 14, 2025
43c9d7a
minor: modify ZkSync spell
mortezashojaei Jan 14, 2025
1453375
refactor: consolidate ISM compatibility logic and static deployment c…
mortezashojaei Jan 14, 2025
6ec202e
Merge pull request #19 from txfusion/improvement/zksync-ism-checks
mshojaei-txfusion Jan 14, 2025
ac65a73
Merge remote-tracking branch 'origin/fix/missing-single-chain-resolve…
mortezashojaei Jan 14, 2025
af971af
Merge branch 'hyperlane-xyz:main' into main
mshojaei-txfusion Jan 15, 2025
079d76d
Merge branch 'main' into feat/zksync-support
mortezashojaei Jan 15, 2025
814bdb0
Merge branch 'hyperlane-xyz:main' into main
mshojaei-txfusion Jan 16, 2025
827fb7c
Merge branch 'hyperlane-xyz:main' into main
mshojaei-txfusion Jan 16, 2025
60bcbe1
Merge branch 'main' into feat/zksync-support
mortezashojaei Jan 16, 2025
b75d2db
revert: zksync wallet to ethers types
ljankovic-txfusion Jan 17, 2025
328d256
chore: minor changes
ljankovic-txfusion Jan 17, 2025
09ec7ac
chore: zksync solidity changes
ljankovic-txfusion Jan 20, 2025
bb0c486
feat: update build artifact processing
ljankovic-txfusion Jan 20, 2025
1014a7c
chore: update changeset to reflect all core changes
ljankovic-txfusion Jan 20, 2025
b048d44
chore: minor cleanup
ljankovic-txfusion Jan 20, 2025
e27dd28
feat: add ZKSync provider support to SDK with types and builder funct…
ljankovic-txfusion Jan 20, 2025
18916cf
docs(changeset): ZKSync Provider types with builders
ljankovic-txfusion Jan 20, 2025
8e6c6f6
feat: ZKSync functions, metadata and types for deployment
ljankovic-txfusion Jan 20, 2025
ae3acc4
Merge branch 'hyperlane-xyz:main' into main
mshojaei-txfusion Jan 20, 2025
cd1eae9
docs(changeset): Added ZKSync specific deployment logic and artifact …
ljankovic-txfusion Jan 20, 2025
b83fb67
feat: ZKSync Provider types for proxy utils
ljankovic-txfusion Jan 20, 2025
8b7cf4b
refactor: improve contract verification classes to support deferent t…
mortezashojaei Jan 20, 2025
a3111ec
feat: add ZKSync contract verification support with custom compiler o…
mortezashojaei Jan 20, 2025
1d20acd
docs(changeset): Add ZKSync contract verification with custom compile…
mortezashojaei Jan 20, 2025
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
92cd601
feat: add ZKSync support on Hyperlane deployer and multiprocider
mortezashojaei Jan 20, 2025
78851e9
feat: add ZKSync artifact support for ISM contract deployments
mortezashojaei Jan 20, 2025
7843524
fix: use deploy contract woth name for hook deployment to support zksync
mortezashojaei Jan 20, 2025
6e19657
docs(changeset): Support for zksync on deployments and verifications
mortezashojaei Jan 20, 2025
097f82a
feat: zksync cli examples
mortezashojaei Jan 20, 2025
956a62b
fix: check for zksync compatiblity before deploy core contracts
mortezashojaei Jan 20, 2025
497c93f
fix: pass missing contract verifier on warp deployments
mortezashojaei Jan 20, 2025
d27b8cb
feat: handle cli tests with zksync
mortezashojaei Jan 20, 2025
c954835
docs(changeset): Add support for zksync based netowrks
mortezashojaei Jan 20, 2025
16a6671
refactor: artifact export script to use async file operations and imp…
ljankovic-txfusion Jan 21, 2025
c7e3fb2
Update .changeset/mighty-terms-rest.md
ljankovic-txfusion Jan 21, 2025
15a1ce4
Merge remote-tracking branch 'origin/feat/core-zksync' into feat/zksy…
ljankovic-txfusion Jan 21, 2025
ced1965
Merge remote-tracking branch 'origin/feat/zksync-sdk-provider' into f…
ljankovic-txfusion Jan 21, 2025
65074e4
Merge remote-tracking branch 'origin/feat/zksync-deployment-functions…
ljankovic-txfusion Jan 21, 2025
19a4cc2
Merge branch 'hyperlane-xyz:main' into main
mshojaei-txfusion Jan 21, 2025
fd2ef51
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Jan 21, 2025
d2039da
Merge remote-tracking branch 'origin/feat/zksync-compatibility-check'…
ljankovic-txfusion Jan 21, 2025
169ab88
Merge remote-tracking branch 'origin/feat/integrate-zksync-on-sdk' in…
ljankovic-txfusion Jan 21, 2025
aec3579
Merge branch 'hyperlane-xyz:main' into main
mshojaei-txfusion Jan 21, 2025
9f42411
Merge branch 'hyperlane-xyz:main' into main
mshojaei-txfusion Jan 21, 2025
7ed09b8
chore: change ZKSync SDK version to minor
ljankovic-txfusion Jan 22, 2025
40521f1
refactor: clean up whitespace and improve code readability in Hyperla…
ljankovic-txfusion Jan 22, 2025
59165bb
Merge branch 'hyperlane-xyz:main' into main
mshojaei-txfusion Jan 22, 2025
783f779
refactor: enhance artifact processing by adding file existence check
ljankovic-txfusion Jan 22, 2025
6a19f8e
chore: update ZKSync support and change versioning for @hyperlane-xyz…
ljankovic-txfusion Jan 22, 2025
e0415e9
refactor: streamline exportBuildArtifact script and update build proc…
ljankovic-txfusion Jan 22, 2025
4befd65
refactor: rename Provider type to NetworkProvider for clarity in prox…
ljankovic-txfusion Jan 22, 2025
3e3c6f5
refactor: rename STATIC_ISM_TYPE to STATIC_ISM_TYPES for consistency …
ljankovic-txfusion Jan 22, 2025
12e2c9d
refactor: convert artifact handling functions to async for improved p…
ljankovic-txfusion Jan 22, 2025
ab346fb
refactor: clean up whitespace in exportBuildArtifact script
ljankovic-txfusion Jan 22, 2025
1058872
Merge branch 'hyperlane-xyz:main' into main
mshojaei-txfusion Jan 22, 2025
793a59b
feat: add prepublishOnly script to automate build and ZKSync processes
ljankovic-txfusion Jan 22, 2025
bf4aa1b
Merge branch 'hyperlane-xyz:main' into main
ljankovic-txfusion Jan 22, 2025
3adda1d
Merge remote-tracking branch 'origin/main' into feat/core-zksync
ljankovic-txfusion Jan 22, 2025
f7d4002
Merge remote-tracking branch 'origin/main' into feat/zksync-sdk-provider
ljankovic-txfusion Jan 22, 2025
d87f76e
Merge remote-tracking branch 'origin/feat/core-zksync' into feat/zksy…
ljankovic-txfusion Jan 22, 2025
541e650
Merge remote-tracking branch 'origin/feat/zksync-sdk-provider' into f…
ljankovic-txfusion Jan 23, 2025
466467f
Merge remote-tracking branch 'origin/feat/zksync-deployment-functions…
ljankovic-txfusion Jan 23, 2025
878719b
Merge branch 'hyperlane-xyz:main' into main
ljankovic-txfusion Jan 23, 2025
d7d7171
Merge remote-tracking branch 'origin/main' into feat/zksync-compatibi…
ljankovic-txfusion Jan 23, 2025
d56e358
Merge remote-tracking branch 'origin/main' into feat/zksync-verificat…
ljankovic-txfusion Jan 23, 2025
4040fa5
Merge remote-tracking branch 'origin/main' into feat/zksync-compatibi…
ljankovic-txfusion Jan 23, 2025
d714f81
Merge remote-tracking branch 'origin/main' into feat/zksync-sdk-provider
ljankovic-txfusion Jan 23, 2025
4dfafc4
Merge remote-tracking branch 'origin/main' into feat/zksync-deploymen…
ljankovic-txfusion Jan 23, 2025
f363a46
Merge remote-tracking branch 'origin/feat/zksync-sdk-provider' into f…
ljankovic-txfusion Jan 23, 2025
42c2c15
Merge remote-tracking branch 'origin/feat/zksync-deployment-functions…
ljankovic-txfusion Jan 23, 2025
8b0a49e
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Jan 23, 2025
28c64c8
Merge remote-tracking branch 'origin/feat/zksync-compatibility-check'…
ljankovic-txfusion Jan 23, 2025
22629d5
Merge remote-tracking branch 'origin/feat/integrate-zksync-on-sdk' in…
ljankovic-txfusion Jan 23, 2025
a4cd60d
Merge branch 'hyperlane-xyz:main' into main
ljankovic-txfusion Jan 23, 2025
436f8e3
Merge remote-tracking branch 'origin/main' into feat/zksync-sdk-provider
ljankovic-txfusion Jan 23, 2025
5ffeaf6
Merge remote-tracking branch 'origin/feat/zksync-sdk-provider' into f…
ljankovic-txfusion Jan 23, 2025
8d93ee6
Merge remote-tracking branch 'origin/feat/zksync-deployment-functions…
ljankovic-txfusion Jan 23, 2025
a5ee211
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Jan 23, 2025
2522b94
Merge remote-tracking branch 'origin/feat/zksync-compatibility-check'…
ljankovic-txfusion Jan 23, 2025
dd22e6b
Merge remote-tracking branch 'origin/feat/integrate-zksync-on-sdk' in…
ljankovic-txfusion Jan 23, 2025
5ddb4de
feat: add ZKSyncTransaction type to TypedTransaction union
ljankovic-txfusion Jan 23, 2025
67369ae
feat: add zksync-ethers dependency to yarn.lock
ljankovic-txfusion Jan 23, 2025
42a1215
fix: await loadAllZKSyncArtifacts in getZKSyncArtifactByContractName …
ljankovic-txfusion Jan 23, 2025
8831a03
Merge remote-tracking branch 'origin/feat/zksync-sdk-provider' into f…
ljankovic-txfusion Jan 23, 2025
e41399e
Merge remote-tracking branch 'origin/feat/zksync-deployment-functions…
ljankovic-txfusion Jan 23, 2025
233e950
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Jan 23, 2025
4c8115a
Merge remote-tracking branch 'origin/feat/zksync-compatibility-check'…
ljankovic-txfusion Jan 23, 2025
cad2dce
Merge branch 'hyperlane-xyz:main' into main
ljankovic-txfusion Jan 24, 2025
3de0c45
Merge branch 'hyperlane-xyz:main' into main
ljankovic-txfusion Jan 24, 2025
be9cc02
Merge branch 'hyperlane-xyz:main' into main
ljankovic-txfusion Jan 24, 2025
85fd722
feat: Add ZKSync solidity support and restructure build artifacts
ljankovic-txfusion Jan 24, 2025
77a0ff9
feat(zksync): introduce core ZKSync artifact management utilities
ljankovic-txfusion Jan 24, 2025
267b93d
fix(zksync): update artifact comments for clarity on build output loc…
ljankovic-txfusion Jan 24, 2025
efd7f2c
chore: remove unnecessary blank line in exportBuildArtifact.sh
ljankovic-txfusion Jan 24, 2025
5d67367
chore: update dependencies in yarn.lock and package.json
ljankovic-txfusion Jan 24, 2025
57b2856
Merge remote-tracking branch 'origin/feat/zksync-solidity' into feat/…
ljankovic-txfusion Jan 24, 2025
bbf963c
Merge remote-tracking branch 'origin/feat/zksync-sdk-provider' into f…
ljankovic-txfusion Jan 24, 2025
9a91eb4
Merge remote-tracking branch 'origin/feat/zksync-deployment-functions…
ljankovic-txfusion Jan 24, 2025
52fe803
Merge remote-tracking branch 'origin/feat/zksync-verification-classes…
ljankovic-txfusion Jan 24, 2025
07e5a6b
Merge remote-tracking branch 'origin/feat/zksync-compatibility-check'…
ljankovic-txfusion Jan 24, 2025
2104475
Merge remote-tracking branch 'origin/feat/integrate-zksync-on-sdk' in…
ljankovic-txfusion Jan 24, 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
11 changes: 11 additions & 0 deletions .changeset/chatty-starfishes-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@hyperlane-xyz/core': minor
---

Add ZKSync support and restructure build artifacts:

- Add ZKSync compilation support
- Restructure typechain directory location to core-utils/typechain
- Add ZKSync-specific artifact generation and exports
- Update build process to handle both standard and ZKSync artifacts
- Add new exports for ZKSync build artifacts and contract types
5 changes: 5 additions & 0 deletions .changeset/eleven-cows-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/sdk': minor
---

Added ZKSync specific deployment logic and artifact related utils
5 changes: 5 additions & 0 deletions .changeset/empty-dingos-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/cli': minor
---

Add support for zksync based netowrks
5 changes: 5 additions & 0 deletions .changeset/fresh-mice-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/sdk': minor
---

Support for zksync on deployments and verifications
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
5 changes: 5 additions & 0 deletions .changeset/mighty-terms-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/sdk': minor
---

ZKSync Provider types with builders
5 changes: 5 additions & 0 deletions .changeset/orange-cats-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/sdk': minor
---

Add ZKSync contract verification with custom compiler options and refactor verification classes
7 changes: 7 additions & 0 deletions solidity/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@ docs
flattened/
buildArtifact.json
fixtures/
# ZKSync
artifacts-zk
cache-zk
core-utils/zksync/artifacts/output
.zksolc-libraries-cache/
typechain-types/
typechain/
2 changes: 2 additions & 0 deletions solidity/core-utils/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './typechain/index.js';
export * from './zksync/index.js';
5 changes: 5 additions & 0 deletions solidity/core-utils/zksync/artifacts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type { ZKSyncArtifact } from './types.js';

// Default empty artifact array when `yarn build:zk` hasn't been run
// This file will be populated with contract artifacts in dist after running the build:zk command
export const zkSyncContractArtifacts: ZKSyncArtifact[] = [] as const;
19 changes: 19 additions & 0 deletions solidity/core-utils/zksync/buildArtifact.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Default empty artifact array when `yarn build:zk` hasn't been run
// This file will be populated with build artifacts in dist/zksync after running the build:zk command
export const buildArtifact = {
solcLongVersion: '',
zk_version: '',
input: {
language: 'Solidity',
sources: {},
settings: {
optimizer: {
enabled: false,
runs: 200,
},
outputSelection: {},
evmVersion: 'london',
remappings: [],
},
},
};
4 changes: 4 additions & 0 deletions solidity/core-utils/zksync/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from './artifacts.js';
export * from './buildArtifact.js';
export * from './utils.js';
export * from './types.js';
11 changes: 11 additions & 0 deletions solidity/core-utils/zksync/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export interface ZKSyncArtifact {
_format: string;
contractName: string;
sourceName: string;
abi: any[];
bytecode: string;
deployedBytecode: string;
linkReferences: Record<string, any>;
deployedLinkReferences: Record<string, any>;
factoryDeps: Record<string, any>;
}
58 changes: 58 additions & 0 deletions solidity/core-utils/zksync/utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { zkSyncContractArtifacts } from './artifacts.js';
import { ZKSyncArtifact } from './types.js';

type ArtifactMap = Record<string, ZKSyncArtifact>;

/**
* @dev Exports the list of artifact names.
* @return An array of artifact names.
*/
export async function getZKSyncArtifactNames(): Promise<string[]> {
return zkSyncContractArtifacts.map((artifact) => artifact.contractName);
}

/**
* @dev Checks if a ZkSync artifact exists by its name.
* @param name The name of the artifact to check.
* @return True if the artifact exists, false otherwise.
*/
export async function artifactExists(name: string): Promise<boolean> {
return zkSyncContractArtifacts.some(
(artifact) => artifact.contractName === name,
);
}

/**
* @dev Loads a ZkSync artifact by its name.
* @param name The name of the artifact to load.
* @return The loaded ZKSyncArtifact or undefined if it cannot be found.
*/
export async function loadZKSyncArtifact(
name: string,
): Promise<ZKSyncArtifact | undefined> {
return zkSyncContractArtifacts.find(
(artifact) => artifact.contractName === name,
);
}

/**
* @dev Loads all ZkSync artifacts into a map.
* @return A map of artifact names to their corresponding ZkSync artifacts.
*/
export async function loadAllZKSyncArtifacts(): Promise<ArtifactMap> {
return zkSyncContractArtifacts.reduce((map, artifact) => {
map[artifact.contractName] = artifact;
return map;
}, {} as ArtifactMap);
}

/**
* @dev Retrieves a specific ZkSync artifact by its name.
* @param name The name of the artifact to retrieve.
* @return The ZkSyncArtifact or undefined if it cannot be found.
*/
export async function getZKSyncArtifactByName(
name: string,
): Promise<ZKSyncArtifact | undefined> {
return loadZKSyncArtifact(name);
}
39 changes: 39 additions & 0 deletions solidity/exportBuildArtifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,42 @@ else
echo 'Failed to process build artifact with jq'
exit 1
fi

# ZKSYNC

if [ "$ZKSYNC" = "true" ]; then
# Define the artifacts directory
artifactsDir="./artifacts-zk/build-info"
# Define the output file
outputFileJson="./dist/zksync/buildArtifact.json"
outputFileJs="./dist/zksync/buildArtifact.js"
outputFileTsd="./dist/zksync/buildArtifact.d.ts"

# log that we're in the script
echo 'Finding and processing ZKSync hardhat build artifact...'

# Find most recently modified JSON build artifact
if [ "$(uname)" = "Darwin" ]; then
# for local flow
jsonFiles=$(find "$artifactsDir" -type f -name "*.json" -exec stat -f "%m %N" {} \; | sort -rn | head -n 1 | cut -d' ' -f2-)
else
# for CI flow
jsonFiles=$(find "$artifactsDir" -type f -name "*.json" -exec stat -c "%Y %n" {} \; | sort -rn | head -n 1 | cut -d' ' -f2-)
fi

if [ ! -f "$jsonFiles" ]; then
echo 'Failed to find ZKSync build artifact'
exit 1
fi

# Extract required keys and write to outputFile
if jq -c '{input, solcLongVersion, zk_version: .output.zk_version}' "$jsonFiles" >"$outputFileJson"; then
echo "export const buildArtifact = " >"$outputFileJs"
cat "$outputFileJson" >>"$outputFileJs"
echo "export const buildArtifact: any" >"$outputFileTsd"
echo 'Finished processing ZKSync build artifact.'
else
echo 'Failed to process ZKSync build artifact with jq'
exit 1
fi
fi
174 changes: 174 additions & 0 deletions solidity/generate-artifact-exports.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
import { promises as fs } from 'fs';
import { basename, dirname, join } from 'path';
import { glob } from 'typechain';
import { fileURLToPath } from 'url';

const cwd = process.cwd();
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

const ROOT_OUTPUT_DIR = join(__dirname, 'dist/zksync/');
const ARTIFACTS_OUTPUT_DIR = join(ROOT_OUTPUT_DIR, 'artifacts');

/**
* @notice Templates for TypeScript artifact generation
*/
const TEMPLATES = {
JS_ARTIFACT: `\
export const {name} = {artifact};
`,

DTS_ARTIFACT: `\
import type { ZKSyncArtifact } from '../types.js';

export declare const {name}: ZKSyncArtifact;
`,

JS_INDEX: `\
{imports}

export const zkSyncContractArtifacts = [
{exports}
];
`,

DTS_INDEX: `\
import type { ZKSyncArtifact } from './types.js';

export declare const zkSyncContractArtifacts: readonly ZKSyncArtifact[];
`,
};

class ArtifactGenerator {
constructor() {
this.processedFiles = new Set();
}

/**
* @notice Retrieves paths of all relevant artifact files
* @dev Excludes debug files and build-info directory
* @return {string[]} Array of file paths matching the glob pattern
*/
getArtifactPaths() {
return glob(cwd, [
`!./artifacts-zk/!(build-info)/**/*.dbg.json`,
`./artifacts-zk/!(build-info)/**/+([a-zA-Z0-9_]).json`,
]);
}

/**
* @notice Creates the output directory if it doesn't exist
*/
async createOutputDirectory() {
await fs.mkdir(ARTIFACTS_OUTPUT_DIR, { recursive: true });
}

/**
* @notice Reads and parses a JSON artifact file
* @param filePath Path to the artifact file
* @return {Promise<Object>} Parsed JSON content
*/
async readArtifactFile(filePath) {
const content = await fs.readFile(filePath, 'utf-8');
return JSON.parse(content);
}

/**
* @notice Generates JavaScript content for a contract artifact
*/
generateJavaScriptContent(name, artifact) {
return TEMPLATES.JS_ARTIFACT.replace('{name}', name).replace(
'{artifact}',
JSON.stringify(artifact, null, 2),
);
}

/**
* @notice Generates TypeScript declaration content for a contract artifact
*/
generateDeclarationContent(name) {
return TEMPLATES.DTS_ARTIFACT.replace('{name}', name);
}

/**
* @notice Generates index file contents
*/
generateIndexContents(artifactNames) {
const imports = artifactNames
.map((name) => `import { ${name} } from './artifacts/${name}.js';`)
.join('\n');
const exports = artifactNames.map((name) => ` ${name},`).join('\n');

const jsContent = TEMPLATES.JS_INDEX.replace('{imports}', imports).replace(
'{exports}',
exports,
);

const dtsContent = TEMPLATES.DTS_INDEX.replace(
'{imports}',
imports,
).replace('{exports}', exports);

return { jsContent, dtsContent };
}

/**
* @notice Processes a single artifact file
*/
async processArtifact(filePath) {
const name = basename(filePath, '.json');

if (this.processedFiles.has(name)) {
return;
}

const artifact = await this.readArtifactFile(filePath);

// Generate and write .js file
const jsContent = this.generateJavaScriptContent(name, artifact);
await fs.writeFile(
join(ROOT_OUTPUT_DIR, 'artifacts', `${name}.js`),
jsContent,
);

// Generate and write .d.ts file
const dtsContent = this.generateDeclarationContent(name);
await fs.writeFile(
join(ROOT_OUTPUT_DIR, 'artifacts', `${name}.d.ts`),
dtsContent,
);

this.processedFiles.add(name);
}

async generate() {
try {
await this.createOutputDirectory();

const artifactPaths = this.getArtifactPaths();

for (const filePath of artifactPaths) {
await this.processArtifact(filePath);
}

const processedNames = Array.from(this.processedFiles);

// Generate and write index files
const { jsContent, dtsContent } =
this.generateIndexContents(processedNames);

await fs.writeFile(join(ROOT_OUTPUT_DIR, 'artifacts.js'), jsContent);
await fs.writeFile(join(ROOT_OUTPUT_DIR, 'artifacts.d.ts'), dtsContent);

console.log(
`Successfully processed ${processedNames.length} zksync artifacts`,
);
} catch (error) {
console.error('Error processing zksync artifacts:', error);
throw error;
}
}
}

const generator = new ArtifactGenerator();
generator.generate().catch(console.error);
2 changes: 1 addition & 1 deletion solidity/hardhat.config.cts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {
currency: 'USD',
},
typechain: {
outDir: './types',
outDir: './core-utils/typechain',
target: 'ethers-v5',
alwaysGenerateOverloads: true,
node16Modules: true,
Expand Down
Loading
Loading