@agoric/builders 0.2.0-u17.0 → 0.2.0-u18.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 (58) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/package.json +28 -28
  3. package/scripts/inter-protocol/add-STARS.js +1 -0
  4. package/scripts/inter-protocol/add-collateral-core.js +7 -3
  5. package/scripts/inter-protocol/init-core.js +2 -1
  6. package/scripts/inter-protocol/invite-committee-core.js +2 -1
  7. package/scripts/inter-protocol/price-feed-core.js +1 -1
  8. package/scripts/inter-protocol/replace-electorate-core.js +163 -0
  9. package/scripts/inter-protocol/updatePriceFeeds.js +118 -0
  10. package/scripts/orchestration/init-basic-flows.js +1 -0
  11. package/scripts/orchestration/init-stakeAtom.js +2 -1
  12. package/scripts/orchestration/init-stakeBld.js +2 -1
  13. package/scripts/orchestration/init-stakeOsmo.js +2 -1
  14. package/scripts/orchestration/write-chain-info.js +14 -0
  15. package/scripts/pegasus/init-core.js +1 -0
  16. package/scripts/smart-wallet/build-game1-start.js +1 -0
  17. package/scripts/smart-wallet/build-wallet-factory2-upgrade.js +1 -0
  18. package/scripts/smart-wallet/build-walletFactory-upgrade.js +1 -0
  19. package/scripts/testing/add-LEMONS.js +1 -0
  20. package/scripts/testing/add-OLIVES.js +1 -0
  21. package/scripts/testing/append-chain-info.js +1 -3
  22. package/scripts/testing/fix-buggy-sendAnywhere.js +143 -0
  23. package/scripts/testing/restart-basic-flows.js +1 -0
  24. package/scripts/testing/restart-send-anywhere.js +1 -0
  25. package/scripts/testing/restart-stakeAtom.js +2 -1
  26. package/scripts/testing/restart-valueVow.js +1 -0
  27. package/scripts/testing/start-auto-stake-it.js +1 -0
  28. package/scripts/testing/start-buggy-sendAnywhere.js +143 -0
  29. package/scripts/testing/start-query-flows.js +1 -0
  30. package/scripts/testing/start-send-anywhere.js +1 -0
  31. package/scripts/testing/start-valueVow.js +1 -0
  32. package/scripts/testing/tweak-chain-info.js +1 -3
  33. package/scripts/vats/add-auction.js +8 -1
  34. package/scripts/vats/init-core.js +1 -0
  35. package/scripts/vats/init-localchain.js +1 -0
  36. package/scripts/vats/init-network.js +1 -0
  37. package/scripts/vats/init-orchestration.js +1 -0
  38. package/scripts/vats/init-transfer.js +1 -0
  39. package/scripts/vats/probe-zcf-bundle.js +1 -0
  40. package/scripts/vats/replace-provisioning.js +1 -0
  41. package/scripts/vats/replace-zoe.js +1 -0
  42. package/scripts/vats/restart-vats.js +1 -0
  43. package/scripts/vats/revive-kread.js +1 -0
  44. package/scripts/vats/test-localchain.js +1 -0
  45. package/scripts/vats/test-vtransfer.js +1 -0
  46. package/scripts/vats/updateAtomPriceFeed.js +1 -0
  47. package/scripts/vats/updateStAtomPriceFeed.js +1 -0
  48. package/scripts/vats/updateStOsmoPriceFeed.js +1 -0
  49. package/scripts/vats/updateStTiaPriceFeed.js +1 -0
  50. package/scripts/vats/updateStkAtomPriceFeed.js +1 -0
  51. package/scripts/vats/upgrade-bank.js +1 -0
  52. package/scripts/vats/upgrade-orch-core.js +1 -0
  53. package/scripts/vats/upgrade-provisionPool.js +1 -0
  54. package/scripts/vats/upgrade-zcf.js +1 -0
  55. package/scripts/vats/upgrade-zoe.js +1 -0
  56. package/scripts/vats/upgradeScaledPriceAuthorities.js +1 -0
  57. package/scripts/vats/upgradeVaults.js +2 -1
  58. package/scripts/inter-protocol/deploy-contracts.js +0 -111
@@ -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
- };