agoric 0.21.2-dev-c27a7e6.0 → 0.21.2-dev-bd19a6f.0
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 +19 -19
- package/src/commands/auction.js +2 -0
- package/src/commands/gov.js +6 -0
- package/src/commands/inter.js +8 -0
- package/src/commands/test-upgrade.js +2 -0
- package/src/lib/bundles.js +1 -1
- package/src/lib/wallet.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agoric",
|
|
3
|
-
"version": "0.21.2-dev-
|
|
3
|
+
"version": "0.21.2-dev-bd19a6f.0+bd19a6f",
|
|
4
4
|
"description": "Manage the Agoric Javascript smart contract platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/main.js",
|
|
@@ -29,28 +29,28 @@
|
|
|
29
29
|
"lint:eslint": "eslint ."
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@agoric/cosmic-swingset": "0.41.4-dev-
|
|
33
|
-
"@agoric/deploy-script-support": "0.10.4-dev-
|
|
32
|
+
"@agoric/cosmic-swingset": "0.41.4-dev-bd19a6f.0+bd19a6f",
|
|
33
|
+
"@agoric/deploy-script-support": "0.10.4-dev-bd19a6f.0+bd19a6f",
|
|
34
34
|
"ava": "^5.3.0",
|
|
35
35
|
"c8": "^9.1.0",
|
|
36
36
|
"dd-trace": "^4.11.1"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@agoric/access-token": "0.4.22-dev-
|
|
40
|
-
"@agoric/cache": "0.3.3-dev-
|
|
41
|
-
"@agoric/casting": "0.4.3-dev-
|
|
42
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
43
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
44
|
-
"@agoric/governance": "0.10.4-dev-
|
|
45
|
-
"@agoric/inter-protocol": "0.16.2-dev-
|
|
46
|
-
"@agoric/internal": "0.3.3-dev-
|
|
47
|
-
"@agoric/network": "0.1.1-dev-
|
|
48
|
-
"@agoric/smart-wallet": "0.5.4-dev-
|
|
49
|
-
"@agoric/store": "0.9.3-dev-
|
|
50
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
51
|
-
"@agoric/vats": "0.15.2-dev-
|
|
52
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
53
|
-
"@agoric/zone": "0.2.3-dev-
|
|
39
|
+
"@agoric/access-token": "0.4.22-dev-bd19a6f.0+bd19a6f",
|
|
40
|
+
"@agoric/cache": "0.3.3-dev-bd19a6f.0+bd19a6f",
|
|
41
|
+
"@agoric/casting": "0.4.3-dev-bd19a6f.0+bd19a6f",
|
|
42
|
+
"@agoric/cosmic-proto": "0.4.1-dev-bd19a6f.0+bd19a6f",
|
|
43
|
+
"@agoric/ertp": "0.16.3-dev-bd19a6f.0+bd19a6f",
|
|
44
|
+
"@agoric/governance": "0.10.4-dev-bd19a6f.0+bd19a6f",
|
|
45
|
+
"@agoric/inter-protocol": "0.16.2-dev-bd19a6f.0+bd19a6f",
|
|
46
|
+
"@agoric/internal": "0.3.3-dev-bd19a6f.0+bd19a6f",
|
|
47
|
+
"@agoric/network": "0.1.1-dev-bd19a6f.0+bd19a6f",
|
|
48
|
+
"@agoric/smart-wallet": "0.5.4-dev-bd19a6f.0+bd19a6f",
|
|
49
|
+
"@agoric/store": "0.9.3-dev-bd19a6f.0+bd19a6f",
|
|
50
|
+
"@agoric/swingset-vat": "0.32.3-dev-bd19a6f.0+bd19a6f",
|
|
51
|
+
"@agoric/vats": "0.15.2-dev-bd19a6f.0+bd19a6f",
|
|
52
|
+
"@agoric/zoe": "0.26.3-dev-bd19a6f.0+bd19a6f",
|
|
53
|
+
"@agoric/zone": "0.2.3-dev-bd19a6f.0+bd19a6f",
|
|
54
54
|
"@confio/relayer": "^0.11.3",
|
|
55
55
|
"@cosmjs/crypto": "^0.32.3",
|
|
56
56
|
"@cosmjs/encoding": "^0.32.3",
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"typeCoverage": {
|
|
102
102
|
"atLeast": 77.36
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "bd19a6f72106d0f0843a48e8a725e8b426132a1e"
|
|
105
105
|
}
|
package/src/commands/auction.js
CHANGED
|
@@ -130,6 +130,8 @@ export const makeAuctionCommand = (
|
|
|
130
130
|
};
|
|
131
131
|
|
|
132
132
|
if (Object.keys(params).length === 0) {
|
|
133
|
+
// InvalidArgumentError is a class constructor, and so
|
|
134
|
+
// must be invoked with `new`.
|
|
133
135
|
throw new InvalidArgumentError(`no parameters given`);
|
|
134
136
|
}
|
|
135
137
|
|
package/src/commands/gov.js
CHANGED
|
@@ -73,6 +73,8 @@ export const makeGovCommand = (_logger, io = {}) => {
|
|
|
73
73
|
const done = found.filter(it => it.instanceName === instanceName);
|
|
74
74
|
if (done.length > 0) {
|
|
75
75
|
console.warn(`invitation to ${instanceName} already accepted`, done);
|
|
76
|
+
// CommanderError is a class constructor, and so
|
|
77
|
+
// must be invoked with `new`.
|
|
76
78
|
throw new CommanderError(1, 'EALREADY', `already accepted`);
|
|
77
79
|
}
|
|
78
80
|
};
|
|
@@ -330,6 +332,8 @@ export const makeGovCommand = (_logger, io = {}) => {
|
|
|
330
332
|
const info = await readLatestHead(
|
|
331
333
|
`published.committees.${opts.pathname}.latestQuestion`,
|
|
332
334
|
).catch(err => {
|
|
335
|
+
// CommanderError is a class constructor, and so
|
|
336
|
+
// must be invoked with `new`.
|
|
333
337
|
throw new CommanderError(1, 'VSTORAGE_FAILURE', err.message);
|
|
334
338
|
});
|
|
335
339
|
|
|
@@ -346,6 +350,8 @@ export const makeGovCommand = (_logger, io = {}) => {
|
|
|
346
350
|
const votingRight = cont.find(it => it.instanceName === opts.instance);
|
|
347
351
|
if (!votingRight) {
|
|
348
352
|
console.debug('continuing ids', cont, 'for', current);
|
|
353
|
+
// CommanderError is a class constructor, and so
|
|
354
|
+
// must be invoked with `new`.
|
|
349
355
|
throw new CommanderError(
|
|
350
356
|
1,
|
|
351
357
|
'NO_INVITATION',
|
package/src/commands/inter.js
CHANGED
|
@@ -218,6 +218,8 @@ export const makeInterCommand = (
|
|
|
218
218
|
try {
|
|
219
219
|
return rawExec(file, args, ...opts);
|
|
220
220
|
} catch (err) {
|
|
221
|
+
// InvalidArgumentError is a class constructor, and so
|
|
222
|
+
// must be invoked with `new`.
|
|
221
223
|
throw new InvalidArgumentError(
|
|
222
224
|
`${err.message}: is ${file} in your $PATH?`,
|
|
223
225
|
);
|
|
@@ -239,6 +241,8 @@ export const makeInterCommand = (
|
|
|
239
241
|
const networkConfig = await getNetworkConfig(env);
|
|
240
242
|
return makeWalletUtils({ fetch, execFileSync, delay }, networkConfig);
|
|
241
243
|
} catch (err) {
|
|
244
|
+
// CommanderError is a class constructor, and so
|
|
245
|
+
// must be invoked with `new`.
|
|
242
246
|
throw new CommanderError(1, 'RPC_FAIL', err.message);
|
|
243
247
|
}
|
|
244
248
|
};
|
|
@@ -431,6 +435,8 @@ inter auction status
|
|
|
431
435
|
const parsePercent = v => {
|
|
432
436
|
const p = Number(v);
|
|
433
437
|
if (!(p >= -100 && p <= 100)) {
|
|
438
|
+
// InvalidArgumentError is a class constructor, and so
|
|
439
|
+
// must be invoked with `new`.
|
|
434
440
|
throw new InvalidArgumentError('must be between -100 and 100');
|
|
435
441
|
}
|
|
436
442
|
return p / 100;
|
|
@@ -498,6 +504,8 @@ inter auction status
|
|
|
498
504
|
const current = await getCurrent(from, { readLatestHead });
|
|
499
505
|
const liveIds = current.liveOffers.map(([i, _s]) => i);
|
|
500
506
|
if (!liveIds.includes(id)) {
|
|
507
|
+
// InvalidArgumentError is a class constructor, and so
|
|
508
|
+
// must be invoked with `new`.
|
|
501
509
|
throw new InvalidArgumentError(
|
|
502
510
|
`${id} not in live offer ids: ${liveIds}`,
|
|
503
511
|
);
|
|
@@ -41,6 +41,8 @@ export const makeTestCommand = (
|
|
|
41
41
|
const networkConfig = await getNetworkConfig(env);
|
|
42
42
|
return makeWalletUtils({ fetch, execFileSync, delay }, networkConfig);
|
|
43
43
|
} catch (err) {
|
|
44
|
+
// CommanderError is a class constructor, and so
|
|
45
|
+
// must be invoked with `new`.
|
|
44
46
|
throw new CommanderError(1, 'RPC_FAIL', err.message);
|
|
45
47
|
}
|
|
46
48
|
};
|
package/src/lib/bundles.js
CHANGED
|
@@ -28,7 +28,7 @@ export const PACKAGE_NAME_RE = /^(?:@[^/]+\/)?[^/]+/;
|
|
|
28
28
|
/** @param {Bundle} bundleObj*/
|
|
29
29
|
export const extractBundleInfo = async bundleObj => {
|
|
30
30
|
if (bundleObj.moduleFormat !== 'endoZipBase64') {
|
|
31
|
-
throw
|
|
31
|
+
throw Error('only endoZipBase64 is supported');
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
const contents = Buffer.from(bundleObj.endoZipBase64, 'base64');
|
package/src/lib/wallet.js
CHANGED
|
@@ -33,7 +33,7 @@ export const getCurrent = async (addr, { readLatestHead }) => {
|
|
|
33
33
|
await readLatestHead(`published.wallet.${addr}.current`)
|
|
34
34
|
);
|
|
35
35
|
if (current === undefined) {
|
|
36
|
-
throw
|
|
36
|
+
throw Error(`undefined current node for ${addr}`);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
// Repair a type misunderstanding seen in the wild.
|