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 Wallet for ChainTechnicalStack-Specific Transaction Signing #4914

Open
wants to merge 77 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
dedaa34
merge with main repo latest changes
mortezashojaei Oct 16, 2024
4f541e3
Merge remote-tracking branch 'origin-root/main'
mortezashojaei Oct 22, 2024
f10e542
Merge remote-tracking branch 'origin-root/main'
mortezashojaei Oct 25, 2024
36e2b00
Merge remote-tracking branch 'origin-root/main'
mortezashojaei Oct 28, 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
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
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
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
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
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
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
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/ten-spiders-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/cli': patch
---

Added ZKSync signer support using zksync-ethers package
3 changes: 2 additions & 1 deletion typescript/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"eslint-plugin-import": "^2.31.0",
"mocha": "^10.2.0",
"prettier": "^2.8.8",
"typescript": "5.3.3"
"typescript": "5.3.3",
"zksync-ethers": "^5.10.0"
},
"scripts": {
"hyperlane": "node ./dist/cli.js",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { password } from '@inquirer/prompts';
import { Signer, Wallet } from 'ethers';
import { Wallet as ZKSyncWallet } from 'zksync-ethers';

import {
ChainName,
Expand Down Expand Up @@ -57,7 +58,6 @@ class EthereumSignerStrategy extends BaseMultiProtocolSigner {
}

// 99% overlap with EthereumSignerStrategy for the sake of keeping MultiProtocolSignerFactory clean
// TODO: import ZKSync signer
class ZKSyncSignerStrategy extends BaseMultiProtocolSigner {
async getSignerConfig(chain: ChainName): Promise<SignerConfig> {
const submitter = this.config[chain]?.submitter as {
Expand All @@ -74,6 +74,6 @@ class ZKSyncSignerStrategy extends BaseMultiProtocolSigner {
}

getSigner(config: SignerConfig): Signer {
return new Wallet(config.privateKey);
return new ZKSyncWallet(config.privateKey);
}
}
14 changes: 13 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7398,6 +7398,7 @@ __metadata:
typescript: "npm:5.3.3"
yaml: "npm:2.4.5"
yargs: "npm:^17.7.2"
zksync-ethers: "npm:^5.10.0"
zod: "npm:^3.21.2"
zod-validation-error: "npm:^3.3.0"
zx: "npm:^8.1.4"
Expand Down Expand Up @@ -22700,7 +22701,7 @@ __metadata:
languageName: node
linkType: hard

"ethers@npm:^5.1.0, ethers@npm:^5.3.1, ethers@npm:^5.7.0, ethers@npm:^5.7.1, ethers@npm:^5.7.2":
"ethers@npm:^5.1.0, ethers@npm:^5.3.1, ethers@npm:^5.7.0, ethers@npm:^5.7.1, ethers@npm:^5.7.2, ethers@npm:~5.7.0":
version: 5.7.2
resolution: "ethers@npm:5.7.2"
dependencies:
Expand Down Expand Up @@ -37993,6 +37994,17 @@ __metadata:
languageName: node
linkType: hard

"zksync-ethers@npm:^5.10.0":
version: 5.10.0
resolution: "zksync-ethers@npm:5.10.0"
dependencies:
ethers: "npm:~5.7.0"
peerDependencies:
ethers: ~5.7.0
checksum: 10/826719e2e40731e1104cf8a0c16c758526de6ca9e907d0483eb5bd80b635f02e3cce012115b75d68976a8dd746d63d4f83d576cc3bddc18a02a49d2bc023347f
languageName: node
linkType: hard

"zksync-web3@npm:^0.14.3":
version: 0.14.4
resolution: "zksync-web3@npm:0.14.4"
Expand Down
Loading