@agoric/builders 0.1.1-upgrade-17-dev-a890aea.0 → 0.1.1-upgrade-18-dev-ef001c0.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 (57) hide show
  1. package/package.json +28 -28
  2. package/scripts/inter-protocol/add-STARS.js +1 -0
  3. package/scripts/inter-protocol/add-collateral-core.js +7 -3
  4. package/scripts/inter-protocol/init-core.js +2 -1
  5. package/scripts/inter-protocol/invite-committee-core.js +2 -1
  6. package/scripts/inter-protocol/price-feed-core.js +1 -1
  7. package/scripts/inter-protocol/replace-electorate-core.js +150 -0
  8. package/scripts/inter-protocol/updatePriceFeeds.js +111 -0
  9. package/scripts/orchestration/init-basic-flows.js +1 -0
  10. package/scripts/orchestration/init-stakeAtom.js +2 -1
  11. package/scripts/orchestration/init-stakeBld.js +2 -1
  12. package/scripts/orchestration/init-stakeOsmo.js +2 -1
  13. package/scripts/orchestration/write-chain-info.js +14 -0
  14. package/scripts/pegasus/init-core.js +1 -0
  15. package/scripts/smart-wallet/build-game1-start.js +1 -0
  16. package/scripts/smart-wallet/build-wallet-factory2-upgrade.js +1 -0
  17. package/scripts/smart-wallet/build-walletFactory-upgrade.js +1 -0
  18. package/scripts/testing/add-LEMONS.js +1 -0
  19. package/scripts/testing/add-OLIVES.js +1 -0
  20. package/scripts/testing/append-chain-info.js +1 -3
  21. package/scripts/testing/fix-buggy-sendAnywhere.js +143 -0
  22. package/scripts/testing/restart-basic-flows.js +1 -0
  23. package/scripts/testing/restart-send-anywhere.js +1 -0
  24. package/scripts/testing/restart-stakeAtom.js +2 -1
  25. package/scripts/testing/restart-valueVow.js +1 -0
  26. package/scripts/testing/start-auto-stake-it.js +1 -0
  27. package/scripts/testing/start-buggy-sendAnywhere.js +143 -0
  28. package/scripts/testing/start-query-flows.js +1 -0
  29. package/scripts/testing/start-send-anywhere.js +1 -0
  30. package/scripts/testing/start-valueVow.js +1 -0
  31. package/scripts/testing/tweak-chain-info.js +1 -3
  32. package/scripts/vats/add-auction.js +8 -1
  33. package/scripts/vats/init-core.js +1 -0
  34. package/scripts/vats/init-localchain.js +1 -0
  35. package/scripts/vats/init-network.js +1 -0
  36. package/scripts/vats/init-orchestration.js +1 -0
  37. package/scripts/vats/init-transfer.js +1 -0
  38. package/scripts/vats/probe-zcf-bundle.js +1 -0
  39. package/scripts/vats/replace-provisioning.js +1 -0
  40. package/scripts/vats/replace-zoe.js +1 -0
  41. package/scripts/vats/restart-vats.js +1 -0
  42. package/scripts/vats/revive-kread.js +1 -0
  43. package/scripts/vats/test-localchain.js +1 -0
  44. package/scripts/vats/test-vtransfer.js +1 -0
  45. package/scripts/vats/updateAtomPriceFeed.js +1 -0
  46. package/scripts/vats/updateStAtomPriceFeed.js +1 -0
  47. package/scripts/vats/updateStOsmoPriceFeed.js +1 -0
  48. package/scripts/vats/updateStTiaPriceFeed.js +1 -0
  49. package/scripts/vats/updateStkAtomPriceFeed.js +1 -0
  50. package/scripts/vats/upgrade-bank.js +1 -0
  51. package/scripts/vats/upgrade-orch-core.js +1 -0
  52. package/scripts/vats/upgrade-provisionPool.js +1 -0
  53. package/scripts/vats/upgrade-zcf.js +1 -0
  54. package/scripts/vats/upgrade-zoe.js +1 -0
  55. package/scripts/vats/upgradeScaledPriceAuthorities.js +1 -0
  56. package/scripts/vats/upgradeVaults.js +2 -1
  57. 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-upgrade-17-dev-a890aea.0+a890aea",
3
+ "version": "0.1.1-upgrade-18-dev-ef001c0.0+ef001c0",
4
4
  "description": "Build scripts for proposals to an Agoric chain",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -11,7 +11,7 @@
11
11
  "build:restart-vats-proposal": "echo This command has been deprecated. Please run this instead: agoric run scripts/vats/restart-vats.js",
12
12
  "build:zcf-proposal": "echo This command has been deprecated. Please run this instead: agoric run scripts/vats/replace-zoe.js",
13
13
  "prepack": "tsc --build tsconfig.build.json",
14
- "postpack": "git clean -f '*.d.ts*'",
14
+ "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'",
15
15
  "test": "ava",
16
16
  "test:xs": "exit 0",
17
17
  "lint-fix": "yarn lint:eslint --fix",
@@ -23,33 +23,33 @@
23
23
  "author": "Agoric",
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@agoric/ertp": "0.16.3-upgrade-17-dev-a890aea.0+a890aea",
27
- "@agoric/internal": "0.3.3-upgrade-17-dev-a890aea.0+a890aea",
28
- "@agoric/notifier": "0.6.3-upgrade-17-dev-a890aea.0+a890aea",
29
- "@agoric/smart-wallet": "0.5.4-upgrade-17-dev-a890aea.0+a890aea",
30
- "@agoric/vat-data": "0.5.3-upgrade-17-dev-a890aea.0+a890aea",
31
- "@agoric/vats": "0.15.2-upgrade-17-dev-a890aea.0+a890aea",
32
- "@agoric/zoe": "0.26.3-upgrade-17-dev-a890aea.0+a890aea",
33
- "@endo/bundle-source": "^3.4.0",
34
- "@endo/captp": "^4.3.0",
35
- "@endo/eventual-send": "^1.2.5",
36
- "@endo/far": "^1.1.5",
37
- "@endo/init": "^1.1.4",
38
- "@endo/marshal": "^1.5.3",
39
- "@endo/promise-kit": "^1.1.5",
40
- "@endo/stream": "^1.2.5",
26
+ "@agoric/ertp": "0.16.3-upgrade-18-dev-ef001c0.0+ef001c0",
27
+ "@agoric/internal": "0.3.3-upgrade-18-dev-ef001c0.0+ef001c0",
28
+ "@agoric/notifier": "0.6.3-upgrade-18-dev-ef001c0.0+ef001c0",
29
+ "@agoric/smart-wallet": "0.5.4-upgrade-18-dev-ef001c0.0+ef001c0",
30
+ "@agoric/vat-data": "0.5.3-upgrade-18-dev-ef001c0.0+ef001c0",
31
+ "@agoric/vats": "0.15.2-upgrade-18-dev-ef001c0.0+ef001c0",
32
+ "@agoric/zoe": "0.26.3-upgrade-18-dev-ef001c0.0+ef001c0",
33
+ "@endo/bundle-source": "^3.4.2",
34
+ "@endo/captp": "^4.4.2",
35
+ "@endo/eventual-send": "^1.2.7",
36
+ "@endo/far": "^1.1.8",
37
+ "@endo/init": "^1.1.6",
38
+ "@endo/marshal": "^1.6.1",
39
+ "@endo/promise-kit": "^1.1.7",
40
+ "@endo/stream": "^1.2.7",
41
41
  "import-meta-resolve": "^2.2.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@agoric/deploy-script-support": "0.10.4-upgrade-17-dev-a890aea.0+a890aea",
45
- "@agoric/governance": "0.10.4-upgrade-17-dev-a890aea.0+a890aea",
46
- "@agoric/inter-protocol": "0.16.2-upgrade-17-dev-a890aea.0+a890aea",
47
- "@agoric/orchestration": "0.1.1-upgrade-17-dev-a890aea.0+a890aea",
48
- "@agoric/store": "0.9.3-upgrade-17-dev-a890aea.0+a890aea",
49
- "@agoric/swing-store": "0.9.2-upgrade-17-dev-a890aea.0+a890aea",
50
- "@agoric/swingset-liveslots": "0.10.3-upgrade-17-dev-a890aea.0+a890aea",
51
- "@agoric/time": "0.3.3-upgrade-17-dev-a890aea.0+a890aea",
52
- "@endo/errors": "^1.2.5",
44
+ "@agoric/deploy-script-support": "0.10.4-upgrade-18-dev-ef001c0.0+ef001c0",
45
+ "@agoric/governance": "0.10.4-upgrade-18-dev-ef001c0.0+ef001c0",
46
+ "@agoric/inter-protocol": "0.16.2-upgrade-18-dev-ef001c0.0+ef001c0",
47
+ "@agoric/orchestration": "0.1.1-upgrade-18-dev-ef001c0.0+ef001c0",
48
+ "@agoric/store": "0.9.3-upgrade-18-dev-ef001c0.0+ef001c0",
49
+ "@agoric/swing-store": "0.9.2-upgrade-18-dev-ef001c0.0+ef001c0",
50
+ "@agoric/swingset-liveslots": "0.10.3-upgrade-18-dev-ef001c0.0+ef001c0",
51
+ "@agoric/time": "0.3.3-upgrade-18-dev-ef001c0.0+ef001c0",
52
+ "@endo/errors": "^1.2.7",
53
53
  "ava": "^5.3.0",
54
54
  "c8": "^9.1.0"
55
55
  },
@@ -79,7 +79,7 @@
79
79
  "workerThreads": false
80
80
  },
81
81
  "typeCoverage": {
82
- "atLeast": 81.8
82
+ "atLeast": 82.43
83
83
  },
84
- "gitHead": "a890aea9fb60e71b80a7e04a2ab08aa80db85fdb"
84
+ "gitHead": "ef001c015ac66ff65840bee1f7fd3847e999154d"
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);
@@ -1,4 +1,4 @@
1
- /* global process */
1
+ /* eslint-env node */
2
2
  import { makeHelpers } from '@agoric/deploy-script-support';
3
3
 
4
4
  import { getManifestForAddAssetToVault } from '@agoric/inter-protocol/src/proposals/addAssetToVault.js';
@@ -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
  };
@@ -1,4 +1,4 @@
1
- /* global process */
1
+ /* eslint-env node */
2
2
  /**
3
3
  * @file can be run with `agoric deploy` after a chain is running (depends on
4
4
  * chain state) Only works with "local" chain and not sim-chain b/c it needs
@@ -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
 
@@ -1,4 +1,4 @@
1
- /* global process */
1
+ /* eslint-env node */
2
2
  import { makeHelpers } from '@agoric/deploy-script-support';
3
3
 
4
4
  import { getManifestForInviteCommittee } from '@agoric/inter-protocol/src/proposals/committee-proposal.js';
@@ -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);
@@ -1,4 +1,4 @@
1
- /* global process */
1
+ /* eslint-env node */
2
2
  import { makeHelpers } from '@agoric/deploy-script-support';
3
3
 
4
4
  export const DEFAULT_CONTRACT_TERMS = {
@@ -0,0 +1,150 @@
1
+ /**
2
+ * @file build core eval script to replace EC committee and charter
3
+ * Usage:
4
+ * To run this script, use the following command format in the CLI:
5
+ * agoric run replace-electorate-core.js [ENVIRONMENT]
6
+ * where [ENVIRONMENT] is one of the following:
7
+ * - MAINNET
8
+ * - DEVNET
9
+ * - A3P_INTEGRATION
10
+ * - BOOTSTRAP_TEST
11
+ *
12
+ * Example:
13
+ * agoric run replace-electorate-core.js MAINNET
14
+ */
15
+ import { makeHelpers } from '@agoric/deploy-script-support';
16
+ import { getManifestForReplaceAllElectorates } from '@agoric/inter-protocol/src/proposals/replaceElectorate.js';
17
+
18
+ /** @typedef {Parameters<typeof import('@agoric/inter-protocol/src/proposals/replaceElectorate.js').replaceAllElectorates>[1]['options']} ReplaceElectorateOptions */
19
+
20
+ /** @type {Record<string, ReplaceElectorateOptions>} */
21
+ const configurations = {
22
+ MAINNET: {
23
+ committeeName: 'Economic Committee',
24
+ voterAddresses: {
25
+ 'Chloe White': 'agoric1d4228cvelf8tj65f4h7n2td90sscavln2283h5',
26
+ 'Chris Berg': 'agoric13p9adwk0na5npfq64g22l6xucvqdmu3xqe70wq',
27
+ 'Joe Clark': 'agoric1zayxg4e9vd0es9c9jlpt36qtth255txjp6a8yc',
28
+ },
29
+ highPrioritySendersConfig: {
30
+ addressesToAdd: [],
31
+ addressesToRemove: [
32
+ 'agoric1gx9uu7y6c90rqruhesae2t7c2vlw4uyyxlqxrx',
33
+ 'agoric14543m33dr28x7qhwc558hzlj9szwhzwzpcmw6a',
34
+ 'agoric1el6zqs8ggctj5vwyukyk4fh50wcpdpwgugd5l5',
35
+ ],
36
+ },
37
+ },
38
+ DEVNET: {
39
+ committeeName: 'Economic Committee',
40
+ voterAddresses: {
41
+ gov1: 'agoric1ldmtatp24qlllgxmrsjzcpe20fvlkp448zcuce',
42
+ gov2: 'agoric140dmkrz2e42ergjj7gyvejhzmjzurvqeq82ang',
43
+ gov4: 'agoric1f0h5zgxyg3euxsqzs0506uj4cmu56y30pqx46s',
44
+ },
45
+ highPrioritySendersConfig: {
46
+ addressesToAdd: ['agoric1f0h5zgxyg3euxsqzs0506uj4cmu56y30pqx46s'],
47
+ addressesToRemove: ['agoric1w8wktaur4zf8qmmtn3n7x3r0jhsjkjntcm3u6h'],
48
+ },
49
+ },
50
+ A3P_INTEGRATION: {
51
+ committeeName: 'Economic Committee',
52
+ voterAddresses: {
53
+ gov1: 'agoric1ee9hr0jyrxhy999y755mp862ljgycmwyp4pl7q',
54
+ gov2: 'agoric1wrfh296eu2z34p6pah7q04jjuyj3mxu9v98277',
55
+ gov4: 'agoric1c9gyu460lu70rtcdp95vummd6032psmpdx7wdy',
56
+ },
57
+ highPrioritySendersConfig: {
58
+ addressesToAdd: ['agoric1c9gyu460lu70rtcdp95vummd6032psmpdx7wdy'],
59
+ addressesToRemove: ['agoric1ydzxwh6f893jvpaslmaz6l8j2ulup9a7x8qvvq'],
60
+ },
61
+ },
62
+ BOOTSTRAP_TEST: {
63
+ committeeName: 'Economic Committee',
64
+ voterAddresses: {
65
+ gov1: 'agoric1gx9uu7y6c90rqruhesae2t7c2vlw4uyyxlqxrx',
66
+ gov2: 'agoric1d4228cvelf8tj65f4h7n2td90sscavln2283h5',
67
+ gov3: 'agoric14543m33dr28x7qhwc558hzlj9szwhzwzpcmw6a',
68
+ },
69
+ highPrioritySendersConfig: {
70
+ addressesToAdd: [],
71
+ addressesToRemove: [
72
+ 'agoric13p9adwk0na5npfq64g22l6xucvqdmu3xqe70wq',
73
+ 'agoric1el6zqs8ggctj5vwyukyk4fh50wcpdpwgugd5l5',
74
+ 'agoric1zayxg4e9vd0es9c9jlpt36qtth255txjp6a8yc',
75
+ ],
76
+ },
77
+ },
78
+ };
79
+
80
+ const { keys } = Object;
81
+ const knownVariants = keys(configurations);
82
+
83
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
84
+ export const defaultProposalBuilder = async ({ publishRef, install }, opts) => {
85
+ const config = opts.config || configurations[opts.variant];
86
+ if (!config) {
87
+ const error = `Unknown variant "${opts.variant}". Expected one of ${knownVariants.join(', ')}`;
88
+ console.error(error);
89
+ throw Error(error);
90
+ }
91
+ const { committeeName, voterAddresses, highPrioritySendersConfig } = config;
92
+ console.log(
93
+ 'Generating replace committee proposal with config',
94
+ JSON.stringify({
95
+ committeeName,
96
+ voterAddresses,
97
+ highPrioritySendersConfig,
98
+ }),
99
+ );
100
+ return harden({
101
+ sourceSpec: '@agoric/inter-protocol/src/proposals/replaceElectorate.js',
102
+ getManifestCall: [
103
+ getManifestForReplaceAllElectorates.name,
104
+ {
105
+ committeeName,
106
+ voterAddresses,
107
+ highPrioritySendersConfig,
108
+ economicCommitteeRef: publishRef(
109
+ install(
110
+ '@agoric/governance/src/committee.js',
111
+ '../bundles/bundle-committee.js',
112
+ ),
113
+ ),
114
+ },
115
+ ],
116
+ });
117
+ };
118
+
119
+ const Usage = `agoric run replace-electorate-core.js ${[...knownVariants, '<json-config>'].join(' | ')}`;
120
+
121
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
122
+ export default async (homeP, endowments) => {
123
+ const { scriptArgs } = endowments;
124
+ const variantOrConfig = scriptArgs?.[0];
125
+ console.log('replace-electorate-core.js', variantOrConfig);
126
+
127
+ const opts = {};
128
+
129
+ if (typeof variantOrConfig === 'string') {
130
+ if (variantOrConfig[0] === '{') {
131
+ try {
132
+ opts.config = JSON.parse(variantOrConfig);
133
+ } catch (err) {
134
+ throw Error(`Failed to parse config argument ${variantOrConfig}`);
135
+ }
136
+ } else {
137
+ opts.variant = variantOrConfig;
138
+ }
139
+ } else {
140
+ console.error(Usage);
141
+ throw Error(Usage);
142
+ }
143
+
144
+ const { writeCoreEval } = await makeHelpers(homeP, endowments);
145
+
146
+ await writeCoreEval(
147
+ `replace-committee-${opts.variant || 'from-config'}`,
148
+ utils => defaultProposalBuilder(utils, opts),
149
+ );
150
+ };
@@ -0,0 +1,111 @@
1
+ import { makeHelpers } from '@agoric/deploy-script-support';
2
+ import { getManifestForPriceFeeds } from '@agoric/inter-protocol/src/proposals/deploy-price-feeds.js';
3
+
4
+ /** @import {PriceFeedConfig} from '@agoric/inter-protocol/src/proposals/deploy-price-feeds.js'; */
5
+
6
+ /** @type {Record<string, PriceFeedConfig>} */
7
+ const configurations = {
8
+ A3P_INTEGRATION: {
9
+ oracleAddresses: [
10
+ 'agoric1ee9hr0jyrxhy999y755mp862ljgycmwyp4pl7q', // GOV1
11
+ 'agoric1wrfh296eu2z34p6pah7q04jjuyj3mxu9v98277', // GOV2
12
+ 'agoric1ydzxwh6f893jvpaslmaz6l8j2ulup9a7x8qvvq', // GOV3
13
+ ],
14
+ inBrandNames: ['ATOM', 'stATOM'],
15
+ },
16
+ MAINNET: {
17
+ oracleAddresses: [
18
+ 'agoric144rrhh4m09mh7aaffhm6xy223ym76gve2x7y78', // DSRV
19
+ 'agoric19d6gnr9fyp6hev4tlrg87zjrzsd5gzr5qlfq2p', // Stakin
20
+ 'agoric19uscwxdac6cf6z7d5e26e0jm0lgwstc47cpll8', // 01node
21
+ 'agoric1krunjcqfrf7la48zrvdfeeqtls5r00ep68mzkr', // Simply Staking
22
+ 'agoric1n4fcxsnkxe4gj6e24naec99hzmc4pjfdccy5nj', // P2P
23
+ ],
24
+ inBrandNames: ['ATOM', 'stATOM', 'stOSMO', 'stTIA', 'stkATOM'],
25
+ contractTerms: { minSubmissionCount: 3 },
26
+ },
27
+ DEVNET: {
28
+ oracleAddresses: [
29
+ 'agoric1lw4e4aas9q84tq0q92j85rwjjjapf8dmnllnft', // DSRV
30
+ 'agoric1zj6vrrrjq4gsyr9lw7dplv4vyejg3p8j2urm82', // Stakin
31
+ 'agoric1ra0g6crtsy6r3qnpu7ruvm7qd4wjnznyzg5nu4', // 01node
32
+ 'agoric1qj07c7vfk3knqdral0sej7fa6eavkdn8vd8etf', // Simply Staking
33
+ 'agoric10vjkvkmpp9e356xeh6qqlhrny2htyzp8hf88fk', // P2P
34
+ ],
35
+ inBrandNames: ['ATOM', 'stTIA', 'stkATOM'],
36
+ },
37
+ };
38
+
39
+ const { keys } = Object;
40
+ const knownVariants = keys(configurations);
41
+
42
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
43
+ export const defaultProposalBuilder = async ({ publishRef, install }, opts) => {
44
+ const config = opts.config || configurations[opts.variant];
45
+ if (!config) {
46
+ const error = `Unknown variant "${opts.variant}". Expected one of ${knownVariants.join(', ')}`;
47
+ console.error(error);
48
+ throw Error(error);
49
+ }
50
+ const { oracleAddresses, inBrandNames, contractTerms } = config;
51
+ console.log(
52
+ 'Generating price feeds update proposal with config',
53
+ JSON.stringify({ oracleAddresses, inBrandNames, contractTerms }),
54
+ );
55
+ return harden({
56
+ sourceSpec: '@agoric/inter-protocol/src/proposals/deploy-price-feeds.js',
57
+ getManifestCall: [
58
+ getManifestForPriceFeeds.name,
59
+ {
60
+ oracleAddresses,
61
+ inBrandNames,
62
+ contractTerms,
63
+ priceAggregatorRef: publishRef(
64
+ install(
65
+ '@agoric/inter-protocol/src/price/fluxAggregatorContract.js',
66
+ '../bundles/bundle-fluxAggregatorKit.js',
67
+ ),
68
+ ),
69
+ scaledPARef: publishRef(
70
+ install(
71
+ '@agoric/zoe/src/contracts/scaledPriceAuthority.js',
72
+ '../bundles/bundle-scaledPriceAuthority.js',
73
+ ),
74
+ ),
75
+ },
76
+ ],
77
+ });
78
+ };
79
+
80
+ const Usage = `agoric run updatePriceFeeds.js ${[...knownVariants, '<json-config>'].join(' | ')}`;
81
+
82
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
83
+ export default async (homeP, endowments) => {
84
+ const { scriptArgs } = endowments;
85
+ const variantOrConfig = scriptArgs?.[0];
86
+ console.log('updatePriceFeeds.js', variantOrConfig);
87
+
88
+ const opts = {};
89
+
90
+ if (typeof variantOrConfig === 'string') {
91
+ if (variantOrConfig[0] === '{') {
92
+ try {
93
+ opts.config = JSON.parse(variantOrConfig);
94
+ } catch (err) {
95
+ throw Error(`Failed to parse config argument ${variantOrConfig}`);
96
+ }
97
+ } else {
98
+ opts.variant = variantOrConfig;
99
+ }
100
+ } else {
101
+ console.error(Usage);
102
+ throw Error(Usage);
103
+ }
104
+
105
+ const { writeCoreEval } = await makeHelpers(homeP, endowments);
106
+
107
+ await writeCoreEval(
108
+ `gov-price-feeds-${opts.variant || 'from-config'}`,
109
+ utils => defaultProposalBuilder(utils, opts),
110
+ );
111
+ };
@@ -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);
@@ -9,7 +9,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
9
9
  {
10
10
  installKeys: {
11
11
  stakeIca: publishRef(
12
- install('@agoric/orchestration/src/examples/stakeIca.contract.js'),
12
+ install('@agoric/orchestration/src/examples/stake-ica.contract.js'),
13
13
  ),
14
14
  },
15
15
  },
@@ -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);
@@ -10,13 +10,14 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
10
10
  {
11
11
  installKeys: {
12
12
  stakeBld: publishRef(
13
- install('@agoric/orchestration/src/examples/stakeBld.contract.js'),
13
+ install('@agoric/orchestration/src/examples/stake-bld.contract.js'),
14
14
  ),
15
15
  },
16
16
  },
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);
@@ -9,7 +9,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
9
9
  {
10
10
  installKeys: {
11
11
  stakeIca: publishRef(
12
- install('@agoric/orchestration/src/examples/stakeIca.contract.js'),
12
+ install('@agoric/orchestration/src/examples/stake-ica.contract.js'),
13
13
  ),
14
14
  },
15
15
  },
@@ -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);
@@ -0,0 +1,14 @@
1
+ import { makeHelpers } from '@agoric/deploy-script-support';
2
+
3
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
4
+ export const defaultProposalBuilder = async () =>
5
+ harden({
6
+ sourceSpec: '@agoric/orchestration/src/proposals/init-chain-info.js',
7
+ getManifestCall: ['getManifestForChainInfo'],
8
+ });
9
+
10
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
11
+ export default async (homeP, endowments) => {
12
+ const { writeCoreEval } = await makeHelpers(homeP, endowments);
13
+ await writeCoreEval('gov-orchestration', defaultProposalBuilder);
14
+ };
@@ -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);
@@ -13,9 +13,6 @@ const chainInfo = {
13
13
  counterparty: {
14
14
  client_id: '07-tendermint-2',
15
15
  connection_id: 'connection-1',
16
- prefix: {
17
- key_prefix: '',
18
- },
19
16
  },
20
17
  state: 3 /* IBCConnectionState.STATE_OPEN */,
21
18
  transferChannel: {
@@ -44,6 +41,7 @@ export const defaultProposalBuilder = async () =>
44
41
  ],
45
42
  });
46
43
 
44
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
47
45
  export default async (homeP, endowments) => {
48
46
  const { writeCoreEval } = await makeHelpers(homeP, endowments);
49
47
  await writeCoreEval('revise-chain-info', defaultProposalBuilder);