@agoric/builders 0.1.1-dev-0d3bd96.0 → 0.1.1-dev-bcab39d.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.
Files changed (56) hide show
  1. package/package.json +17 -17
  2. package/scripts/inter-protocol/add-STARS.js +1 -0
  3. package/scripts/inter-protocol/add-collateral-core.js +6 -2
  4. package/scripts/inter-protocol/init-core.js +1 -0
  5. package/scripts/inter-protocol/invite-committee-core.js +1 -0
  6. package/scripts/inter-protocol/replace-electorate-core.js +2 -0
  7. package/scripts/inter-protocol/updatePriceFeeds.js +3 -1
  8. package/scripts/orchestration/init-basic-flows.js +1 -0
  9. package/scripts/orchestration/init-stakeAtom.js +1 -0
  10. package/scripts/orchestration/init-stakeBld.js +1 -0
  11. package/scripts/orchestration/init-stakeOsmo.js +1 -0
  12. package/scripts/orchestration/write-chain-info.js +1 -0
  13. package/scripts/pegasus/init-core.js +1 -0
  14. package/scripts/smart-wallet/build-game1-start.js +1 -0
  15. package/scripts/smart-wallet/build-wallet-factory2-upgrade.js +1 -0
  16. package/scripts/smart-wallet/build-walletFactory-upgrade.js +1 -0
  17. package/scripts/testing/add-LEMONS.js +1 -0
  18. package/scripts/testing/add-OLIVES.js +1 -0
  19. package/scripts/testing/append-chain-info.js +1 -0
  20. package/scripts/testing/fix-buggy-sendAnywhere.js +1 -0
  21. package/scripts/testing/restart-basic-flows.js +1 -0
  22. package/scripts/testing/restart-send-anywhere.js +1 -0
  23. package/scripts/testing/restart-stakeAtom.js +1 -0
  24. package/scripts/testing/restart-valueVow.js +1 -0
  25. package/scripts/testing/start-auto-stake-it.js +1 -0
  26. package/scripts/testing/start-buggy-sendAnywhere.js +1 -0
  27. package/scripts/testing/start-query-flows.js +1 -0
  28. package/scripts/testing/start-send-anywhere.js +1 -0
  29. package/scripts/testing/start-valueVow.js +1 -0
  30. package/scripts/testing/tweak-chain-info.js +1 -0
  31. package/scripts/vats/add-auction.js +1 -0
  32. package/scripts/vats/init-core.js +1 -0
  33. package/scripts/vats/init-localchain.js +1 -0
  34. package/scripts/vats/init-network.js +1 -0
  35. package/scripts/vats/init-orchestration.js +1 -0
  36. package/scripts/vats/init-transfer.js +1 -0
  37. package/scripts/vats/probe-zcf-bundle.js +1 -0
  38. package/scripts/vats/replace-provisioning.js +1 -0
  39. package/scripts/vats/replace-zoe.js +1 -0
  40. package/scripts/vats/restart-vats.js +1 -0
  41. package/scripts/vats/revive-kread.js +1 -0
  42. package/scripts/vats/test-localchain.js +1 -0
  43. package/scripts/vats/test-vtransfer.js +1 -0
  44. package/scripts/vats/updateAtomPriceFeed.js +1 -0
  45. package/scripts/vats/updateStAtomPriceFeed.js +1 -0
  46. package/scripts/vats/updateStOsmoPriceFeed.js +1 -0
  47. package/scripts/vats/updateStTiaPriceFeed.js +1 -0
  48. package/scripts/vats/updateStkAtomPriceFeed.js +1 -0
  49. package/scripts/vats/upgrade-bank.js +1 -0
  50. package/scripts/vats/upgrade-orch-core.js +1 -0
  51. package/scripts/vats/upgrade-provisionPool.js +1 -0
  52. package/scripts/vats/upgrade-zcf.js +1 -0
  53. package/scripts/vats/upgrade-zoe.js +1 -0
  54. package/scripts/vats/upgradeScaledPriceAuthorities.js +1 -0
  55. package/scripts/vats/upgradeVaults.js +1 -0
  56. package/scripts/inter-protocol/deploy-contracts.js +0 -111
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/builders",
3
- "version": "0.1.1-dev-0d3bd96.0+0d3bd96",
3
+ "version": "0.1.1-dev-bcab39d.0+bcab39d",
4
4
  "description": "Build scripts for proposals to an Agoric chain",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -23,13 +23,13 @@
23
23
  "author": "Agoric",
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@agoric/ertp": "0.16.3-dev-0d3bd96.0+0d3bd96",
27
- "@agoric/internal": "0.3.3-dev-0d3bd96.0+0d3bd96",
28
- "@agoric/notifier": "0.6.3-dev-0d3bd96.0+0d3bd96",
29
- "@agoric/smart-wallet": "0.5.4-dev-0d3bd96.0+0d3bd96",
30
- "@agoric/vat-data": "0.5.3-dev-0d3bd96.0+0d3bd96",
31
- "@agoric/vats": "0.15.2-dev-0d3bd96.0+0d3bd96",
32
- "@agoric/zoe": "0.26.3-dev-0d3bd96.0+0d3bd96",
26
+ "@agoric/ertp": "0.16.3-dev-bcab39d.0+bcab39d",
27
+ "@agoric/internal": "0.3.3-dev-bcab39d.0+bcab39d",
28
+ "@agoric/notifier": "0.6.3-dev-bcab39d.0+bcab39d",
29
+ "@agoric/smart-wallet": "0.5.4-dev-bcab39d.0+bcab39d",
30
+ "@agoric/vat-data": "0.5.3-dev-bcab39d.0+bcab39d",
31
+ "@agoric/vats": "0.15.2-dev-bcab39d.0+bcab39d",
32
+ "@agoric/zoe": "0.26.3-dev-bcab39d.0+bcab39d",
33
33
  "@endo/bundle-source": "^3.4.2",
34
34
  "@endo/captp": "^4.4.2",
35
35
  "@endo/eventual-send": "^1.2.7",
@@ -41,14 +41,14 @@
41
41
  "import-meta-resolve": "^2.2.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@agoric/deploy-script-support": "0.10.4-dev-0d3bd96.0+0d3bd96",
45
- "@agoric/governance": "0.10.4-dev-0d3bd96.0+0d3bd96",
46
- "@agoric/inter-protocol": "0.16.2-dev-0d3bd96.0+0d3bd96",
47
- "@agoric/orchestration": "0.1.1-dev-0d3bd96.0+0d3bd96",
48
- "@agoric/store": "0.9.3-dev-0d3bd96.0+0d3bd96",
49
- "@agoric/swing-store": "0.9.2-dev-0d3bd96.0+0d3bd96",
50
- "@agoric/swingset-liveslots": "0.10.3-dev-0d3bd96.0+0d3bd96",
51
- "@agoric/time": "0.3.3-dev-0d3bd96.0+0d3bd96",
44
+ "@agoric/deploy-script-support": "0.10.4-dev-bcab39d.0+bcab39d",
45
+ "@agoric/governance": "0.10.4-dev-bcab39d.0+bcab39d",
46
+ "@agoric/inter-protocol": "0.16.2-dev-bcab39d.0+bcab39d",
47
+ "@agoric/orchestration": "0.1.1-dev-bcab39d.0+bcab39d",
48
+ "@agoric/store": "0.9.3-dev-bcab39d.0+bcab39d",
49
+ "@agoric/swing-store": "0.9.2-dev-bcab39d.0+bcab39d",
50
+ "@agoric/swingset-liveslots": "0.10.3-dev-bcab39d.0+bcab39d",
51
+ "@agoric/time": "0.3.3-dev-bcab39d.0+bcab39d",
52
52
  "@endo/errors": "^1.2.7",
53
53
  "ava": "^5.3.0",
54
54
  "c8": "^9.1.0"
@@ -81,5 +81,5 @@
81
81
  "typeCoverage": {
82
82
  "atLeast": 82.43
83
83
  },
84
- "gitHead": "0d3bd96bd798aba61517950818a4c989b6dcb22f"
84
+ "gitHead": "bcab39d18519bc8edf27ba0c3b59da34812cc134"
85
85
  }
@@ -36,6 +36,7 @@ const starsOraclesProposalBuilder = async powers => {
36
36
  });
37
37
  };
38
38
 
39
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
39
40
  export default async (homeP, endowments) => {
40
41
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
41
42
  await writeCoreEval('add-STARS', starsVaultProposalBuilder);
@@ -103,6 +103,7 @@ export const psmProposalBuilder = async (
103
103
  });
104
104
  };
105
105
 
106
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
106
107
  export default async (homeP, endowments) => {
107
108
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
108
109
 
@@ -112,7 +113,10 @@ export default async (homeP, endowments) => {
112
113
 
113
114
  await writeCoreEval('gov-add-collateral', defaultProposalBuilder);
114
115
  await writeCoreEval('gov-start-psm', opts =>
115
- // @ts-expect-error XXX makeInstallCache types
116
- psmProposalBuilder({ ...opts, wrapInstall: tool.wrapInstall }),
116
+ psmProposalBuilder({
117
+ ...opts,
118
+ // @ts-expect-error XXX makeInstallCache types
119
+ wrapInstall: tool.wrapInstall,
120
+ }),
117
121
  );
118
122
  };
@@ -184,6 +184,7 @@ export const defaultProposalBuilder = async (
184
184
  });
185
185
  };
186
186
 
187
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
187
188
  export default async (homeP, endowments) => {
188
189
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
189
190
 
@@ -36,6 +36,7 @@ export const defaultProposalBuilder = async (
36
36
  });
37
37
  };
38
38
 
39
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
39
40
  export default async (homeP, endowments) => {
40
41
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
41
42
  await writeCoreEval('gov-invite-committee', defaultProposalBuilder);
@@ -95,6 +95,8 @@ const configurations = {
95
95
 
96
96
  const { keys } = Object;
97
97
  const Usage = `agoric run replace-electorate-core.js ${keys(configurations).join(' | ')}`;
98
+
99
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
98
100
  export default async (homeP, endowments) => {
99
101
  const { scriptArgs } = endowments;
100
102
  const variant = scriptArgs?.[0];
@@ -66,9 +66,11 @@ export const defaultProposalBuilder = async ({ publishRef, install }, opts) => {
66
66
  const { keys } = Object;
67
67
  const Usage = `agoric run updatePriceFeed.js ${keys(configurations).join(' | ')}`;
68
68
 
69
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
69
70
  export default async (homeP, endowments) => {
70
71
  const { scriptArgs } = endowments;
71
- const config = configurations[scriptArgs?.[0]];
72
+ assert(scriptArgs, 'expected script args endowment');
73
+ const config = configurations[scriptArgs[0]];
72
74
  if (!config) {
73
75
  console.error(Usage);
74
76
  process.exit(1);
@@ -20,6 +20,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
20
20
  });
21
21
  };
22
22
 
23
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
23
24
  export default async (homeP, endowments) => {
24
25
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
25
26
  await writeCoreEval(startBasicFlows.name, defaultProposalBuilder);
@@ -17,6 +17,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
17
17
  });
18
18
  };
19
19
 
20
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
20
21
  export default async (homeP, endowments) => {
21
22
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
22
23
  await writeCoreEval('start-stakeAtom', defaultProposalBuilder);
@@ -17,6 +17,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
17
17
  ],
18
18
  });
19
19
 
20
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
20
21
  export default async (homeP, endowments) => {
21
22
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
22
23
  await writeCoreEval('start-stakeBld', defaultProposalBuilder);
@@ -17,6 +17,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
17
17
  });
18
18
  };
19
19
 
20
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
20
21
  export default async (homeP, endowments) => {
21
22
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
22
23
  await writeCoreEval('start-stakeOsmo', defaultProposalBuilder);
@@ -7,6 +7,7 @@ export const defaultProposalBuilder = async () =>
7
7
  getManifestCall: ['getManifestForChainInfo'],
8
8
  });
9
9
 
10
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
10
11
  export default async (homeP, endowments) => {
11
12
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
12
13
  await writeCoreEval('gov-orchestration', defaultProposalBuilder);
@@ -17,6 +17,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
17
17
  ],
18
18
  });
19
19
 
20
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
20
21
  export default async (homeP, endowments) => {
21
22
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
22
23
  await writeCoreEval('gov-pegasus', defaultProposalBuilder);
@@ -27,6 +27,7 @@ const game1ProposalBuilder = async ({ publishRef, install }) => {
27
27
  });
28
28
  };
29
29
 
30
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
30
31
  export default async (homeP, endowments) => {
31
32
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
32
33
  await writeCoreEval('start-game1', game1ProposalBuilder);
@@ -22,6 +22,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
22
22
  ],
23
23
  });
24
24
 
25
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
25
26
  export default async (homeP, endowments) => {
26
27
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
27
28
  await writeCoreEval('upgrade-wallet-factory', defaultProposalBuilder);
@@ -28,6 +28,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
28
28
  });
29
29
  };
30
30
 
31
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
31
32
  export default async (homeP, endowments) => {
32
33
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
33
34
  await writeCoreEval('upgrade-walletFactory', defaultProposalBuilder);
@@ -17,6 +17,7 @@ const starsVaultProposalBuilder = async powers => {
17
17
  });
18
18
  };
19
19
 
20
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
20
21
  export default async (homeP, endowments) => {
21
22
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
22
23
  await writeCoreEval('add-STARS-collateral', starsVaultProposalBuilder);
@@ -16,6 +16,7 @@ const stars2VaultProposalBuilder = async powers => {
16
16
  });
17
17
  };
18
18
 
19
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
19
20
  export default async (homeP, endowments) => {
20
21
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
21
22
  await writeCoreEval('add-STARS2-collateral', stars2VaultProposalBuilder);
@@ -41,6 +41,7 @@ export const defaultProposalBuilder = async () =>
41
41
  ],
42
42
  });
43
43
 
44
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
44
45
  export default async (homeP, endowments) => {
45
46
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
46
47
  await writeCoreEval('revise-chain-info', defaultProposalBuilder);
@@ -133,6 +133,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
133
133
  ],
134
134
  });
135
135
 
136
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
136
137
  export default async (homeP, endowments) => {
137
138
  // import dynamically so the module can work in CoreEval environment
138
139
  const dspModule = await import('@agoric/deploy-script-support');
@@ -91,6 +91,7 @@ export const defaultProposalBuilder = async () =>
91
91
  getManifestCall: [getManifest.name],
92
92
  });
93
93
 
94
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
94
95
  export default async (homeP, endowments) => {
95
96
  // import dynamically so the module can work in CoreEval environment
96
97
  const dspModule = await import('@agoric/deploy-script-support');
@@ -91,6 +91,7 @@ export const defaultProposalBuilder = async () =>
91
91
  getManifestCall: [getManifest.name],
92
92
  });
93
93
 
94
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
94
95
  export default async (homeP, endowments) => {
95
96
  // import dynamically so the module can work in CoreEval environment
96
97
  const dspModule = await import('@agoric/deploy-script-support');
@@ -81,6 +81,7 @@ export const defaultProposalBuilder = async () =>
81
81
  getManifestCall: [getManifest.name],
82
82
  });
83
83
 
84
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
84
85
  export default async (homeP, endowments) => {
85
86
  // import dynamically so the module can work in CoreEval environment
86
87
  const dspModule = await import('@agoric/deploy-script-support');
@@ -72,6 +72,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
72
72
  ],
73
73
  });
74
74
 
75
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
75
76
  export default async (homeP, endowments) => {
76
77
  // import dynamically so the module can work in CoreEval environment
77
78
  const dspModule = await import('@agoric/deploy-script-support');
@@ -118,6 +118,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
118
118
  });
119
119
  };
120
120
 
121
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
121
122
  export default async (homeP, endowments) => {
122
123
  // import dynamically so the module can work in CoreEval environment
123
124
  const dspModule = await import('@agoric/deploy-script-support');
@@ -133,6 +133,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
133
133
  ],
134
134
  });
135
135
 
136
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
136
137
  export default async (homeP, endowments) => {
137
138
  // import dynamically so the module can work in CoreEval environment
138
139
  const dspModule = await import('@agoric/deploy-script-support');
@@ -125,6 +125,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
125
125
  });
126
126
  };
127
127
 
128
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
128
129
  export default async (homeP, endowments) => {
129
130
  // import dynamically so the module can work in CoreEval environment
130
131
  const dspModule = await import('@agoric/deploy-script-support');
@@ -126,6 +126,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
126
126
  ],
127
127
  });
128
128
 
129
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
129
130
  export default async (homeP, endowments) => {
130
131
  // import dynamically so the module can work in CoreEval environment
131
132
  const dspModule = await import('@agoric/deploy-script-support');
@@ -83,6 +83,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
83
83
  ],
84
84
  });
85
85
 
86
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
86
87
  export default async (homeP, endowments) => {
87
88
  // import dynamically so the module can work in CoreEval environment
88
89
  const dspModule = await import('@agoric/deploy-script-support');
@@ -44,6 +44,7 @@ export const defaultProposalBuilder = async () =>
44
44
  ],
45
45
  });
46
46
 
47
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
47
48
  export default async (homeP, endowments) => {
48
49
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
49
50
  await writeCoreEval('revise-chain-info', defaultProposalBuilder);
@@ -24,6 +24,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
24
24
  });
25
25
  };
26
26
 
27
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
27
28
  export default async (homeP, endowments) => {
28
29
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
29
30
  await writeCoreEval('add-auction', defaultProposalBuilder);
@@ -25,6 +25,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
25
25
  ],
26
26
  });
27
27
 
28
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
28
29
  export default async (homeP, endowments) => {
29
30
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
30
31
  await writeCoreEval('gov-vats', defaultProposalBuilder);
@@ -14,6 +14,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
14
14
  ],
15
15
  });
16
16
 
17
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
17
18
  export default async (homeP, endowments) => {
18
19
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
19
20
  await writeCoreEval('gov-localchain', defaultProposalBuilder);
@@ -13,6 +13,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
13
13
  ],
14
14
  });
15
15
 
16
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
16
17
  export default async (homeP, endowments) => {
17
18
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
18
19
  await writeCoreEval('gov-network', defaultProposalBuilder);
@@ -14,6 +14,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
14
14
  ],
15
15
  });
16
16
 
17
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
17
18
  export default async (homeP, endowments) => {
18
19
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
19
20
  await writeCoreEval('gov-orchestration', defaultProposalBuilder);
@@ -12,6 +12,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
12
12
  ],
13
13
  });
14
14
 
15
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
15
16
  export default async (homeP, endowments) => {
16
17
  const { writeCoreProposal } = await makeHelpers(homeP, endowments);
17
18
  await writeCoreProposal('gov-transfer', defaultProposalBuilder);
@@ -16,6 +16,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
16
16
  ],
17
17
  });
18
18
 
19
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
19
20
  export default async (homeP, endowments) => {
20
21
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
21
22
  await writeCoreEval('probeZcfBundle', defaultProposalBuilder);
@@ -17,6 +17,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
17
17
  ],
18
18
  });
19
19
 
20
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
20
21
  export default async (homeP, endowments) => {
21
22
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
22
23
  await writeCoreEval('gov-provisioning', defaultProposalBuilder);
@@ -13,6 +13,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
13
13
  ],
14
14
  });
15
15
 
16
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
16
17
  export default async (homeP, endowments) => {
17
18
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
18
19
  await writeCoreEval('replace-zcf', defaultProposalBuilder);
@@ -19,6 +19,7 @@ export const defaultProposalBuilder = async () => {
19
19
  });
20
20
  };
21
21
 
22
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
22
23
  export default async (homeP, endowments) => {
23
24
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
24
25
  await writeCoreEval('restart-vats', defaultProposalBuilder);
@@ -7,6 +7,7 @@ export const defaultProposalBuilder = async () =>
7
7
  getManifestCall: ['getManifestForKread'],
8
8
  });
9
9
 
10
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
10
11
  export default async (homeP, endowments) => {
11
12
  const { writeCoreProposal } = await makeHelpers(homeP, endowments);
12
13
  await writeCoreProposal('revive-kread', defaultProposalBuilder);
@@ -12,6 +12,7 @@ export const defaultProposalBuilder = async _powers =>
12
12
  ],
13
13
  });
14
14
 
15
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
15
16
  export default async (homeP, endowments) => {
16
17
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
17
18
  await writeCoreEval('test-localchain', defaultProposalBuilder);
@@ -12,6 +12,7 @@ export const defaultProposalBuilder = async _powers =>
12
12
  ],
13
13
  });
14
14
 
15
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
15
16
  export default async (homeP, endowments) => {
16
17
  const { writeCoreProposal } = await makeHelpers(homeP, endowments);
17
18
  await writeCoreProposal('test-vtransfer', defaultProposalBuilder);
@@ -14,6 +14,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
14
14
  return priceFeedProposalBuilder({ publishRef, install }, OPTIONS);
15
15
  };
16
16
 
17
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
17
18
  export default async (homeP, endowments) => {
18
19
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
19
20
 
@@ -14,6 +14,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
14
14
  return priceFeedProposalBuilder({ publishRef, install }, OPTIONS);
15
15
  };
16
16
 
17
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
17
18
  export default async (homeP, endowments) => {
18
19
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
19
20
 
@@ -14,6 +14,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
14
14
  return priceFeedProposalBuilder({ publishRef, install }, OPTIONS);
15
15
  };
16
16
 
17
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
17
18
  export default async (homeP, endowments) => {
18
19
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
19
20
 
@@ -14,6 +14,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
14
14
  return priceFeedProposalBuilder({ publishRef, install }, OPTIONS);
15
15
  };
16
16
 
17
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
17
18
  export default async (homeP, endowments) => {
18
19
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
19
20
 
@@ -14,6 +14,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
14
14
  return priceFeedProposalBuilder({ publishRef, install }, OPTIONS);
15
15
  };
16
16
 
17
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
17
18
  export default async (homeP, endowments) => {
18
19
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
19
20
 
@@ -12,6 +12,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
12
12
  ],
13
13
  });
14
14
 
15
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
15
16
  export default async (homeP, endowments) => {
16
17
  const { writeCoreProposal } = await makeHelpers(homeP, endowments);
17
18
  await writeCoreProposal('upgrade-bank', defaultProposalBuilder);
@@ -17,6 +17,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
17
17
  ],
18
18
  });
19
19
 
20
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
20
21
  export default async (homeP, endowments) => {
21
22
  const { writeCoreProposal } = await makeHelpers(homeP, endowments);
22
23
  await writeCoreProposal('upgrade-network', defaultProposalBuilder);
@@ -14,6 +14,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
14
14
  ],
15
15
  });
16
16
 
17
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
17
18
  export default async (homeP, endowments) => {
18
19
  const { writeCoreProposal } = await makeHelpers(homeP, endowments);
19
20
  await writeCoreProposal('upgrade-provision-pool', defaultProposalBuilder);
@@ -12,6 +12,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
12
12
  ],
13
13
  });
14
14
 
15
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
15
16
  export default async (homeP, endowments) => {
16
17
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
17
18
  await writeCoreEval('upgrade-zcf', defaultProposalBuilder);
@@ -12,6 +12,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
12
12
  ],
13
13
  });
14
14
 
15
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
15
16
  export default async (homeP, endowments) => {
16
17
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
17
18
  await writeCoreEval('upgrade-zoe', defaultProposalBuilder);
@@ -15,6 +15,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
15
15
  ],
16
16
  });
17
17
 
18
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
18
19
  export default async (homeP, endowments) => {
19
20
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
20
21
 
@@ -17,6 +17,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
17
17
  ],
18
18
  });
19
19
 
20
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
20
21
  export default async (homeP, endowments) => {
21
22
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
22
23
  await writeCoreEval('upgrade-vaults', defaultProposalBuilder);
@@ -1,111 +0,0 @@
1
- #!/usr/bin/env node
2
- import url from 'url';
3
- import { makeHelpers } from '@agoric/deploy-script-support';
4
- import { E } from '@endo/eventual-send';
5
- import { getCopyMapEntries, makeCopyMap } from '@agoric/store';
6
- /** @import {CopyMap} from '@endo/patterns' */
7
-
8
- // TODO: CLI options to choose contracts
9
- const contractRefs = [
10
- '../../governance/bundles/bundle-contractGovernor.js',
11
- '../../governance/bundles/bundle-committee.js',
12
- '../../governance/bundles/bundle-binaryVoteCounter.js',
13
- '../bundles/bundle-vaultFactory.js',
14
- '../bundles/bundle-reserve.js',
15
- '../bundles/bundle-psm.js',
16
- '../bundles/bundle-auctioneer.js',
17
- '../../vats/bundles/bundle-mintHolder.js',
18
- ];
19
- const contractRoots = contractRefs.map(ref =>
20
- url.fileURLToPath(new URL(ref, import.meta.url)),
21
- );
22
-
23
- /** @type {<T>(store: any, key: string, make: () => T) => Promise<T>} */
24
- const provideWhen = async (store, key, make) => {
25
- const found = await E(store).get(key);
26
- if (found) {
27
- return found;
28
- }
29
- const value = make();
30
- await E(store).set(key, value);
31
- return value;
32
- };
33
-
34
- export default async (homeP, endowments) => {
35
- const home = await homeP;
36
- const { zoe, scratch, board } = home;
37
-
38
- const { installInPieces, getBundlerMaker } = await makeHelpers(
39
- homeP,
40
- endowments,
41
- );
42
- const bundler = E(getBundlerMaker({ log: console.log })).makeBundler({
43
- zoe,
44
- });
45
-
46
- console.log('getting installCache...');
47
- /**
48
- * @type {CopyMap<
49
- * string,
50
- * { installation: Installation; boardId: string; path?: string }
51
- * >}
52
- */
53
- const initial = await provideWhen(scratch, 'installCache', () =>
54
- makeCopyMap([]),
55
- );
56
- console.log('initially:', initial.payload.keys.length, 'entries');
57
-
58
- // ISSUE: getCopyMapEntries of CopyMap<K, V> loses K, V.
59
- /**
60
- * @type {Map<
61
- * string,
62
- * { installation: Installation; boardId: string; path?: string }
63
- * >}
64
- */
65
- const working = new Map(getCopyMapEntries(initial));
66
-
67
- let added = 0;
68
-
69
- /** @type {EndoZipBase64Bundle[]} */
70
- const bundles = await Promise.all(
71
- contractRoots.map(path => import(path).then(m => m.default)),
72
- );
73
-
74
- let ix = 0;
75
- for await (const bundle of bundles) {
76
- const sha512 = bundle.endoZipBase64Sha512;
77
- if (working.has(bundle.endoZipBase64Sha512)) {
78
- console.log('hit:', { path: contractRefs[ix], sha512 });
79
- } else {
80
- console.log('miss:', {
81
- path: contractRefs[ix],
82
- length: bundle.endoZipBase64.length,
83
- sha512,
84
- });
85
- const installation = await installInPieces(bundle, bundler, {
86
- persist: true,
87
- });
88
- const boardId = await E(board).getId(installation);
89
- working.set(sha512, { installation, boardId, path: contractRefs[ix] });
90
- added += 1;
91
- }
92
- ix += 1;
93
- }
94
-
95
- const final = makeCopyMap(working);
96
- assert.equal(final.payload.keys.length, working.size);
97
- await (added > 0 && E(home.scratch).set('installCache', final));
98
- console.log({
99
- initial: initial.payload.keys.length,
100
- added,
101
- total: working.size,
102
- });
103
-
104
- const items = [...working.entries()]
105
- .map(([sha512, { boardId, path }]) => ({ sha512, boardId, path }))
106
- .sort();
107
- const boardId = await E(board).getId(JSON.stringify(items));
108
- console.log({
109
- boardId,
110
- });
111
- };