@hardkas/bridge-local 0.7.3-alpha → 0.7.5-alpha
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.
- package/dist/index.js +9 -3
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -79,7 +79,9 @@ async function resolveBridgeLocalContext(options) {
|
|
|
79
79
|
return {
|
|
80
80
|
source: "explicit",
|
|
81
81
|
l1: { walletName: from, address: l1Address },
|
|
82
|
-
l2: {
|
|
82
|
+
l2: {
|
|
83
|
+
address: toIgra.startsWith("0x") ? toIgra : `0x${toIgra}`
|
|
84
|
+
},
|
|
83
85
|
bridgeMode: "local-simulated"
|
|
84
86
|
};
|
|
85
87
|
}
|
|
@@ -101,13 +103,17 @@ async function resolveBridgeLocalContext(options) {
|
|
|
101
103
|
}
|
|
102
104
|
function validateAndFormatSession(session, source, config) {
|
|
103
105
|
if (session.bridge.mode !== "local-simulated") {
|
|
104
|
-
throw new Error(
|
|
106
|
+
throw new Error(
|
|
107
|
+
`Session "${session.name}" has bridge mode "${session.bridge.mode}". Only "local-simulated" is supported in this command.`
|
|
108
|
+
);
|
|
105
109
|
}
|
|
106
110
|
const accounts = listHardkasAccounts(config.config);
|
|
107
111
|
const l1Found = accounts.find((a) => a.name === session.l1.wallet);
|
|
108
112
|
const l2Found = accounts.find((a) => a.name === session.l2.account);
|
|
109
113
|
if (!l1Found) {
|
|
110
|
-
throw new Error(
|
|
114
|
+
throw new Error(
|
|
115
|
+
`Session "${session.name}" refers to missing L1 wallet "${session.l1.wallet}".`
|
|
116
|
+
);
|
|
111
117
|
}
|
|
112
118
|
return {
|
|
113
119
|
source,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hardkas/bridge-local",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.5-alpha",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
".": "./dist/index.js"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@hardkas/artifacts": "0.7.
|
|
12
|
-
"@hardkas/config": "0.7.
|
|
13
|
-
"@hardkas/
|
|
14
|
-
"@hardkas/
|
|
15
|
-
"@hardkas/tx-builder": "0.7.
|
|
16
|
-
"@hardkas/sessions": "0.7.
|
|
11
|
+
"@hardkas/artifacts": "0.7.5-alpha",
|
|
12
|
+
"@hardkas/config": "0.7.5-alpha",
|
|
13
|
+
"@hardkas/accounts": "0.7.5-alpha",
|
|
14
|
+
"@hardkas/core": "0.7.5-alpha",
|
|
15
|
+
"@hardkas/tx-builder": "0.7.5-alpha",
|
|
16
|
+
"@hardkas/sessions": "0.7.5-alpha"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"tsup": "^8.3.5",
|