@agoric/builders 0.1.1-dev-3825031.0 → 0.1.1-dev-a27f724.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/builders",
3
- "version": "0.1.1-dev-3825031.0+3825031",
3
+ "version": "0.1.1-dev-a27f724.0+a27f724",
4
4
  "description": "Build scripts for proposals to an Agoric chain",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -23,14 +23,14 @@
23
23
  "author": "Agoric",
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@agoric/ertp": "0.16.3-dev-3825031.0+3825031",
27
- "@agoric/fast-usdc": "0.1.1-dev-3825031.0+3825031",
28
- "@agoric/internal": "0.3.3-dev-3825031.0+3825031",
29
- "@agoric/notifier": "0.6.3-dev-3825031.0+3825031",
30
- "@agoric/smart-wallet": "0.5.4-dev-3825031.0+3825031",
31
- "@agoric/vat-data": "0.5.3-dev-3825031.0+3825031",
32
- "@agoric/vats": "0.15.2-dev-3825031.0+3825031",
33
- "@agoric/zoe": "0.26.3-dev-3825031.0+3825031",
26
+ "@agoric/ertp": "0.16.3-dev-a27f724.0+a27f724",
27
+ "@agoric/fast-usdc": "0.1.1-dev-a27f724.0+a27f724",
28
+ "@agoric/internal": "0.3.3-dev-a27f724.0+a27f724",
29
+ "@agoric/notifier": "0.6.3-dev-a27f724.0+a27f724",
30
+ "@agoric/smart-wallet": "0.5.4-dev-a27f724.0+a27f724",
31
+ "@agoric/vat-data": "0.5.3-dev-a27f724.0+a27f724",
32
+ "@agoric/vats": "0.15.2-dev-a27f724.0+a27f724",
33
+ "@agoric/zoe": "0.26.3-dev-a27f724.0+a27f724",
34
34
  "@endo/bundle-source": "^3.5.1",
35
35
  "@endo/captp": "^4.4.4",
36
36
  "@endo/eventual-send": "^1.3.0",
@@ -43,14 +43,14 @@
43
43
  "import-meta-resolve": "^4.1.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@agoric/deploy-script-support": "0.10.4-dev-3825031.0+3825031",
47
- "@agoric/governance": "0.10.4-dev-3825031.0+3825031",
48
- "@agoric/inter-protocol": "0.16.2-dev-3825031.0+3825031",
49
- "@agoric/orchestration": "0.1.1-dev-3825031.0+3825031",
50
- "@agoric/store": "0.9.3-dev-3825031.0+3825031",
51
- "@agoric/swing-store": "0.9.2-dev-3825031.0+3825031",
52
- "@agoric/swingset-liveslots": "0.10.3-dev-3825031.0+3825031",
53
- "@agoric/time": "0.3.3-dev-3825031.0+3825031",
46
+ "@agoric/deploy-script-support": "0.10.4-dev-a27f724.0+a27f724",
47
+ "@agoric/governance": "0.10.4-dev-a27f724.0+a27f724",
48
+ "@agoric/inter-protocol": "0.16.2-dev-a27f724.0+a27f724",
49
+ "@agoric/orchestration": "0.1.1-dev-a27f724.0+a27f724",
50
+ "@agoric/store": "0.9.3-dev-a27f724.0+a27f724",
51
+ "@agoric/swing-store": "0.9.2-dev-a27f724.0+a27f724",
52
+ "@agoric/swingset-liveslots": "0.10.3-dev-a27f724.0+a27f724",
53
+ "@agoric/time": "0.3.3-dev-a27f724.0+a27f724",
54
54
  "@endo/errors": "^1.2.9",
55
55
  "ava": "^5.3.0",
56
56
  "c8": "^10.1.2"
@@ -83,5 +83,5 @@
83
83
  "typeCoverage": {
84
84
  "atLeast": 91.57
85
85
  },
86
- "gitHead": "38250315cedf68dc801b75bee867818a3846fae7"
86
+ "gitHead": "a27f724ae4134ac3b4c094d604afbab58f447b2d"
87
87
  }
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Usage:
3
+ * agoric run fast-usdc-reconfigure.build.js [--agoricToNoble <IBCChannelInfo>]
4
+ *
5
+ * channel info defaults to mainnet configuration (see update-noble-ica.core.js)
6
+ */
7
+ import { makeHelpers } from '@agoric/deploy-script-support';
8
+ import { getManifestForUpdateNobleICA } from '@agoric/fast-usdc/src/update-noble-ica.core.js';
9
+ import { IBCConnectionInfoShape } from '@agoric/orchestration';
10
+ import { mustMatch } from '@endo/patterns';
11
+ import { parseArgs } from 'node:util';
12
+
13
+ /**
14
+ * @import {CoreEvalBuilder, DeployScriptFunction} from '@agoric/deploy-script-support/src/externalTypes.js'
15
+ * @import {IBCConnectionInfo} from '@agoric/orchestration'
16
+ * @import {Passable} from '@endo/marshal'
17
+ */
18
+
19
+ /**
20
+ * @param {Parameters<CoreEvalBuilder>[0]} powers
21
+ * @param {{ agoricToNoble?: IBCConnectionInfo } & Passable} options
22
+ * @satisfies {CoreEvalBuilder}
23
+ */
24
+ export const proposalBuilder = async ({ publishRef, install }, options) => {
25
+ return harden({
26
+ sourceSpec: '@agoric/fast-usdc/src/update-noble-ica.core.js',
27
+ /** @type {[string, Parameters<typeof getManifestForUpdateNobleICA>[1]]} */
28
+ getManifestCall: [
29
+ getManifestForUpdateNobleICA.name,
30
+ {
31
+ options,
32
+ installKeys: {
33
+ fastUsdc: publishRef(
34
+ install('@agoric/fast-usdc/src/fast-usdc.contract.js'),
35
+ ),
36
+ },
37
+ },
38
+ ],
39
+ });
40
+ };
41
+
42
+ /**
43
+ * @param {string[]} [args]
44
+ * @returns {{ agoricToNoble?: IBCConnectionInfo } & Passable}
45
+ */
46
+ const parseConnection = args => {
47
+ /** @type {{ values: { agoricToNoble?: string } }} */
48
+ const {
49
+ values: { agoricToNoble: connJSON },
50
+ } = parseArgs({
51
+ args,
52
+ options: { agoricToNoble: { type: 'string' } },
53
+ });
54
+ if (!connJSON) return {};
55
+ /** @type {IBCConnectionInfo & Passable} */
56
+ const conn = harden(JSON.parse(connJSON));
57
+ mustMatch(conn, IBCConnectionInfoShape);
58
+ return harden({ agoricToNoble: conn });
59
+ };
60
+
61
+ /** @type {DeployScriptFunction} */
62
+ export default async (homeP, endowments) => {
63
+ const { writeCoreEval } = await makeHelpers(homeP, endowments);
64
+
65
+ await writeCoreEval('eval-fast-usdc-reconfigure', utils =>
66
+ proposalBuilder(utils, parseConnection(endowments.scriptArgs)),
67
+ );
68
+ };