@agoric/solo 0.10.4-dev-c073e81.0.c073e81 → 0.10.4-dev-bee326c.0.bee326c
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/package.json +17 -17
- package/src/chain-cosmos-sdk.js +10 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/solo",
|
|
3
|
-
"version": "0.10.4-dev-
|
|
3
|
+
"version": "0.10.4-dev-bee326c.0.bee326c",
|
|
4
4
|
"description": "Agoric's Solo vat runner",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -22,20 +22,20 @@
|
|
|
22
22
|
"author": "Agoric",
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@agoric/access-token": "0.4.22-dev-
|
|
26
|
-
"@agoric/cache": "0.3.3-dev-
|
|
27
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
28
|
-
"@agoric/cosmic-swingset": "0.41.4-dev-
|
|
29
|
-
"@agoric/internal": "0.3.3-dev-
|
|
30
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
31
|
-
"@agoric/spawner": "0.6.9-dev-
|
|
32
|
-
"@agoric/store": "0.9.3-dev-
|
|
33
|
-
"@agoric/swing-store": "0.9.2-dev-
|
|
34
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
35
|
-
"@agoric/telemetry": "0.6.3-dev-
|
|
36
|
-
"@agoric/time": "0.3.3-dev-
|
|
37
|
-
"@agoric/vats": "0.15.2-dev-
|
|
38
|
-
"@agoric/wallet": "0.18.4-dev-
|
|
25
|
+
"@agoric/access-token": "0.4.22-dev-bee326c.0.bee326c",
|
|
26
|
+
"@agoric/cache": "0.3.3-dev-bee326c.0.bee326c",
|
|
27
|
+
"@agoric/cosmic-proto": "0.4.1-dev-bee326c.0.bee326c",
|
|
28
|
+
"@agoric/cosmic-swingset": "0.41.4-dev-bee326c.0.bee326c",
|
|
29
|
+
"@agoric/internal": "0.3.3-dev-bee326c.0.bee326c",
|
|
30
|
+
"@agoric/notifier": "0.6.3-dev-bee326c.0.bee326c",
|
|
31
|
+
"@agoric/spawner": "0.6.9-dev-bee326c.0.bee326c",
|
|
32
|
+
"@agoric/store": "0.9.3-dev-bee326c.0.bee326c",
|
|
33
|
+
"@agoric/swing-store": "0.9.2-dev-bee326c.0.bee326c",
|
|
34
|
+
"@agoric/swingset-vat": "0.32.3-dev-bee326c.0.bee326c",
|
|
35
|
+
"@agoric/telemetry": "0.6.3-dev-bee326c.0.bee326c",
|
|
36
|
+
"@agoric/time": "0.3.3-dev-bee326c.0.bee326c",
|
|
37
|
+
"@agoric/vats": "0.15.2-dev-bee326c.0.bee326c",
|
|
38
|
+
"@agoric/wallet": "0.18.4-dev-bee326c.0.bee326c",
|
|
39
39
|
"@endo/base64": "^1.0.12",
|
|
40
40
|
"@endo/captp": "^4.4.8",
|
|
41
41
|
"@endo/errors": "^1.2.13",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"ws": "^7.2.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
59
|
+
"@agoric/ertp": "0.16.3-dev-bee326c.0.bee326c",
|
|
60
60
|
"@endo/bundle-source": "^4.1.2",
|
|
61
61
|
"ava": "^5.3.0",
|
|
62
62
|
"c8": "^10.1.3"
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"typeCoverage": {
|
|
81
81
|
"atLeast": 73.92
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "bee326c8bea470c3762ed34f41a9b0b112832b89"
|
|
84
84
|
}
|
package/src/chain-cosmos-sdk.js
CHANGED
|
@@ -200,18 +200,16 @@ export async function connectToChain(
|
|
|
200
200
|
|
|
201
201
|
let goodRpcHref = rpcHrefs[0];
|
|
202
202
|
const runHelper = (args, stdin = undefined) => {
|
|
203
|
-
const fullArgs = [
|
|
204
|
-
...args,
|
|
205
|
-
`--chain-id=${chainID}`,
|
|
206
|
-
`--node=${goodRpcHref}`,
|
|
207
|
-
`--home=${helperDir}`,
|
|
208
|
-
];
|
|
203
|
+
const fullArgs = [...args, `--node=${goodRpcHref}`, `--home=${helperDir}`];
|
|
209
204
|
console.debug(HELPER, ...fullArgs);
|
|
210
205
|
return new Promise(resolve => {
|
|
211
206
|
const proc = execFile(
|
|
212
207
|
HELPER,
|
|
213
208
|
fullArgs,
|
|
214
|
-
{
|
|
209
|
+
{
|
|
210
|
+
maxBuffer: MAX_BUFFER_SIZE,
|
|
211
|
+
env: { ...process.env, AGD_CHAIN_ID: chainID },
|
|
212
|
+
},
|
|
215
213
|
(_error, stdout, stderr) => {
|
|
216
214
|
resolve({ stdout, stderr });
|
|
217
215
|
},
|
|
@@ -305,7 +303,7 @@ export async function connectToChain(
|
|
|
305
303
|
};
|
|
306
304
|
|
|
307
305
|
const subscribeToTxHash = (txHash, cb) => {
|
|
308
|
-
const txQuery = `tm.event = 'Tx'
|
|
306
|
+
const txQuery = `tm.event = 'Tx' AND tx.hash = '${txHash}'`;
|
|
309
307
|
|
|
310
308
|
const bufHash = decodeHex(txHash);
|
|
311
309
|
const b64Hash = encodeBase64(bufHash);
|
|
@@ -328,7 +326,7 @@ export async function connectToChain(
|
|
|
328
326
|
cb(obj.error);
|
|
329
327
|
return;
|
|
330
328
|
}
|
|
331
|
-
if (!obj.result) {
|
|
329
|
+
if (!obj.result || Object.keys(obj.result).length === 0) {
|
|
332
330
|
return;
|
|
333
331
|
}
|
|
334
332
|
let txResult;
|
|
@@ -355,7 +353,7 @@ export async function connectToChain(
|
|
|
355
353
|
// This takes care of BeginBlock/EndBlock events.
|
|
356
354
|
const blockQuery = `tm.event = 'NewBlockHeader' AND storage.path = '${storagePath}'`;
|
|
357
355
|
// We need a separate query for events raised by transactions.
|
|
358
|
-
const txQuery = `tm.event = 'Tx'
|
|
356
|
+
const txQuery = `tm.event = 'Tx' AND storage.path = '${storagePath}'`;
|
|
359
357
|
|
|
360
358
|
// console.info('subscribeToStorage', blockQuery);
|
|
361
359
|
const blockSubscriptionId = sendRPC('subscribe', { query: blockQuery });
|
|
@@ -385,18 +383,14 @@ export async function connectToChain(
|
|
|
385
383
|
// Query for our initial value.
|
|
386
384
|
setCallback(queryId, obj => {
|
|
387
385
|
// console.info(`got ${storagePath} query`, obj);
|
|
388
|
-
if (obj.result
|
|
386
|
+
if (obj.result?.response?.value) {
|
|
389
387
|
// Decode the layers up to the actual storage value.
|
|
390
388
|
const { value: b64JsonStorage, height: heightString } =
|
|
391
389
|
obj.result.response;
|
|
392
390
|
const buf = decodeBase64(b64JsonStorage);
|
|
393
391
|
const { value: storageValue } = QueryDataResponse.decode(buf);
|
|
394
392
|
guardedCb(BigInt(heightString), storageValue);
|
|
395
|
-
} else if (
|
|
396
|
-
obj.result &&
|
|
397
|
-
obj.result.response &&
|
|
398
|
-
obj.result.response.code === 6
|
|
399
|
-
) {
|
|
393
|
+
} else if (obj.result?.response?.code === 6) {
|
|
400
394
|
// No need to try again, just a missing value that our subscription
|
|
401
395
|
// will pick up.
|
|
402
396
|
const { height: heightString } = obj.result.response;
|