@agoric/builders 0.1.1-upgrade-16-dev-d45b478.0 → 0.1.1-upgrade-16-dev-0549112.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-upgrade-16-dev-d45b478.0+d45b478",
3
+ "version": "0.1.1-upgrade-16-dev-0549112.0+0549112",
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-upgrade-16-dev-d45b478.0+d45b478",
27
- "@agoric/internal": "0.3.3-upgrade-16-dev-d45b478.0+d45b478",
28
- "@agoric/notifier": "0.6.3-upgrade-16-dev-d45b478.0+d45b478",
29
- "@agoric/smart-wallet": "0.5.4-upgrade-16-dev-d45b478.0+d45b478",
30
- "@agoric/vat-data": "0.5.3-upgrade-16-dev-d45b478.0+d45b478",
31
- "@agoric/vats": "0.15.2-upgrade-16-dev-d45b478.0+d45b478",
32
- "@agoric/zoe": "0.26.3-upgrade-16-dev-d45b478.0+d45b478",
26
+ "@agoric/ertp": "0.16.3-upgrade-16-dev-0549112.0+0549112",
27
+ "@agoric/internal": "0.3.3-upgrade-16-dev-0549112.0+0549112",
28
+ "@agoric/notifier": "0.6.3-upgrade-16-dev-0549112.0+0549112",
29
+ "@agoric/smart-wallet": "0.5.4-upgrade-16-dev-0549112.0+0549112",
30
+ "@agoric/vat-data": "0.5.3-upgrade-16-dev-0549112.0+0549112",
31
+ "@agoric/vats": "0.15.2-upgrade-16-dev-0549112.0+0549112",
32
+ "@agoric/zoe": "0.26.3-upgrade-16-dev-0549112.0+0549112",
33
33
  "@endo/bundle-source": "^3.2.3",
34
34
  "@endo/captp": "^4.2.0",
35
35
  "@endo/eventual-send": "^1.2.2",
@@ -41,14 +41,14 @@
41
41
  "import-meta-resolve": "^2.2.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@agoric/assert": "0.6.1-upgrade-16-dev-d45b478.0+d45b478",
45
- "@agoric/deploy-script-support": "0.10.4-upgrade-16-dev-d45b478.0+d45b478",
46
- "@agoric/governance": "0.10.4-upgrade-16-dev-d45b478.0+d45b478",
47
- "@agoric/inter-protocol": "0.16.2-upgrade-16-dev-d45b478.0+d45b478",
48
- "@agoric/store": "0.9.3-upgrade-16-dev-d45b478.0+d45b478",
49
- "@agoric/swing-store": "0.9.2-upgrade-16-dev-d45b478.0+d45b478",
50
- "@agoric/swingset-liveslots": "0.10.3-upgrade-16-dev-d45b478.0+d45b478",
51
- "@agoric/time": "0.3.3-upgrade-16-dev-d45b478.0+d45b478",
44
+ "@agoric/assert": "0.6.1-upgrade-16-dev-0549112.0+0549112",
45
+ "@agoric/deploy-script-support": "0.10.4-upgrade-16-dev-0549112.0+0549112",
46
+ "@agoric/governance": "0.10.4-upgrade-16-dev-0549112.0+0549112",
47
+ "@agoric/inter-protocol": "0.16.2-upgrade-16-dev-0549112.0+0549112",
48
+ "@agoric/store": "0.9.3-upgrade-16-dev-0549112.0+0549112",
49
+ "@agoric/swing-store": "0.9.2-upgrade-16-dev-0549112.0+0549112",
50
+ "@agoric/swingset-liveslots": "0.10.3-upgrade-16-dev-0549112.0+0549112",
51
+ "@agoric/time": "0.3.3-upgrade-16-dev-0549112.0+0549112",
52
52
  "ava": "^5.3.0",
53
53
  "c8": "^9.1.0"
54
54
  },
@@ -80,5 +80,5 @@
80
80
  "typeCoverage": {
81
81
  "atLeast": 74.36
82
82
  },
83
- "gitHead": "d45b478fe2dd21ff463660522e1998ab3e8bbe65"
83
+ "gitHead": "05491122ee61362c8310a7924ac67f033b02e38f"
84
84
  }
@@ -2,41 +2,33 @@
2
2
 
3
3
  import { DEFAULT_CONTRACT_TERMS } from '../inter-protocol/price-feed-core.js';
4
4
 
5
- const ORACLE_ADDRESSES = [
6
- // XXX These are the oracle addresses. They must be provided before the chain
7
- // is running, which means they must be known ahead of time.
8
- // see https://github.com/Agoric/agoric-3-proposals/issues/5
9
- 'agoric1lu9hh5vgx05hmlpfu47hukershgdxctk6l5s05',
10
- 'agoric15lpnq2mjsdhtztf6khp7mrsq66hyrssspy92pd',
11
- 'agoric1mwm224epc4l3pjcz7qsxnudcuktpynwkmnfqfp',
12
- ];
5
+ const { Fail } = assert;
13
6
 
14
7
  /**
15
8
  * modified copy of ../inter-protocol/price-feed-core.js
16
9
  *
17
10
  * @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder}
18
11
  */
19
- export const priceFeedProposalBuilder = async (
12
+ export const strictPriceFeedProposalBuilder = async (
20
13
  { publishRef, install },
21
- options = {},
14
+ options,
22
15
  ) => {
23
16
  const {
24
17
  AGORIC_INSTANCE_NAME,
25
18
  IN_BRAND_LOOKUP,
26
19
  IN_BRAND_NAME = IN_BRAND_LOOKUP[IN_BRAND_LOOKUP.length - 1],
20
+ ORACLE_ADDRESSES,
27
21
  } = options;
28
22
 
29
- const { GOV1ADDR, GOV2ADDR, GOV3ADDR } = process.env;
30
- const oracleAddresses =
31
- GOV1ADDR || GOV2ADDR || GOV3ADDR
32
- ? [GOV1ADDR, GOV2ADDR, GOV3ADDR].filter(x => x)
33
- : ORACLE_ADDRESSES;
34
- assert(Array.isArray(oracleAddresses), 'oracleAddresses array is required');
23
+ const oracleAddresses = ORACLE_ADDRESSES;
24
+ Array.isArray(oracleAddresses) ||
25
+ Fail`ORACLE_ADDRESSES array is required; got ${oracleAddresses}`;
35
26
 
36
- assert(AGORIC_INSTANCE_NAME, 'AGORIC_INSTANCE_NAME is required');
27
+ AGORIC_INSTANCE_NAME ||
28
+ Fail`AGORIC_INSTANCE_NAME is required; got ${AGORIC_INSTANCE_NAME}`;
37
29
 
38
- assert.equal(IN_BRAND_LOOKUP[0], 'agoricNames');
39
- assert(IN_BRAND_NAME, 'brandIn is required');
30
+ Array.isArray(IN_BRAND_LOOKUP) ||
31
+ Fail`IN_BRAND_NAME array is required; got ${IN_BRAND_LOOKUP}`;
40
32
 
41
33
  return harden({
42
34
  sourceSpec: '@agoric/inter-protocol/src/proposals/price-feed-proposal.js',
@@ -60,3 +52,39 @@ export const priceFeedProposalBuilder = async (
60
52
  ],
61
53
  });
62
54
  };
55
+
56
+ /**
57
+ * @deprecated use `strictPriceFeedProposalBuilder` and specify arguments instead
58
+ * @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder}
59
+ */
60
+ export const deprecatedPriceFeedProposalBuilder = async (powers, options) => {
61
+ console.warn(
62
+ 'deprecated ambient `priceFeedProposalBuilder`; use `strictPriceFeedProposalBuilder` instead',
63
+ );
64
+
65
+ const DEFAULT_ORACLE_ADDRESSES = [
66
+ // XXX These are the oracle addresses. They must be provided before the chain
67
+ // is running, which means they must be known ahead of time.
68
+ // see https://github.com/Agoric/agoric-3-proposals/issues/5
69
+ 'agoric1lu9hh5vgx05hmlpfu47hukershgdxctk6l5s05',
70
+ 'agoric15lpnq2mjsdhtztf6khp7mrsq66hyrssspy92pd',
71
+ 'agoric1mwm224epc4l3pjcz7qsxnudcuktpynwkmnfqfp',
72
+ ];
73
+
74
+ const { GOV1ADDR, GOV2ADDR, GOV3ADDR } = process.env;
75
+ const governanceAddressEnv = [GOV1ADDR, GOV2ADDR, GOV3ADDR].filter(x => x);
76
+ const ORACLE_ADDRESSES = governanceAddressEnv.length
77
+ ? governanceAddressEnv
78
+ : DEFAULT_ORACLE_ADDRESSES;
79
+
80
+ return strictPriceFeedProposalBuilder(powers, {
81
+ ...options,
82
+ ORACLE_ADDRESSES,
83
+ });
84
+ };
85
+
86
+ /**
87
+ * @deprecated use `strictPriceFeedProposalBuilder` and specify arguments instead
88
+ * @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder}
89
+ */
90
+ export const priceFeedProposalBuilder = deprecatedPriceFeedProposalBuilder;
@@ -0,0 +1,13 @@
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/vats/src/proposals/kread-proposal.js',
7
+ getManifestCall: ['getManifestForKread'],
8
+ });
9
+
10
+ export default async (homeP, endowments) => {
11
+ const { writeCoreProposal } = await makeHelpers(homeP, endowments);
12
+ await writeCoreProposal('revive-kread', defaultProposalBuilder);
13
+ };
@@ -3,7 +3,7 @@ import { priceFeedProposalBuilder } from './priceFeedSupport.js';
3
3
 
4
4
  const OPTIONS = {
5
5
  AGORIC_INSTANCE_NAME: 'stATOM-USD price feed',
6
- IN_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'stAtom'],
6
+ IN_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'stATOM'],
7
7
  OUT_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'USD'],
8
8
  };
9
9
 
@@ -3,7 +3,7 @@ import { priceFeedProposalBuilder } from './priceFeedSupport.js';
3
3
 
4
4
  const OPTIONS = {
5
5
  AGORIC_INSTANCE_NAME: 'stkATOM-USD price feed',
6
- IN_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'stkAtom'],
6
+ IN_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'stkATOM'],
7
7
  OUT_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'USD'],
8
8
  };
9
9
 
@@ -1,34 +0,0 @@
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
- { publishRef, install },
6
- options = {},
7
- ) => {
8
- const {
9
- hostConnectionId = 'connection-1',
10
- controllerConnectionId = 'connection-0',
11
- bondDenom = 'uatom',
12
- } = options;
13
- return harden({
14
- sourceSpec: '@agoric/orchestration/src/proposals/start-stakeAtom.js',
15
- getManifestCall: [
16
- 'getManifestForStakeAtom',
17
- {
18
- installKeys: {
19
- stakeIca: publishRef(
20
- install('@agoric/orchestration/src/examples/stakeIca.contract.js'),
21
- ),
22
- },
23
- hostConnectionId,
24
- controllerConnectionId,
25
- bondDenom,
26
- },
27
- ],
28
- });
29
- };
30
-
31
- export default async (homeP, endowments) => {
32
- const { writeCoreEval } = await makeHelpers(homeP, endowments);
33
- await writeCoreEval('start-stakeAtom', defaultProposalBuilder);
34
- };
@@ -1,23 +0,0 @@
1
- // @ts-check
2
- import { makeHelpers } from '@agoric/deploy-script-support';
3
-
4
- /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
5
- export const defaultProposalBuilder = async ({ publishRef, install }) =>
6
- harden({
7
- sourceSpec: '@agoric/orchestration/src/proposals/start-stakeBld.js',
8
- getManifestCall: [
9
- 'getManifestForStakeBld',
10
- {
11
- installKeys: {
12
- stakeBld: publishRef(
13
- install('@agoric/orchestration/src/examples/stakeBld.contract.js'),
14
- ),
15
- },
16
- },
17
- ],
18
- });
19
-
20
- export default async (homeP, endowments) => {
21
- const { writeCoreEval } = await makeHelpers(homeP, endowments);
22
- await writeCoreEval('start-stakeBld', defaultProposalBuilder);
23
- };
@@ -1,20 +0,0 @@
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 ({ publishRef, install }) =>
5
- harden({
6
- sourceSpec: '@agoric/orchestration/src/proposals/orchestration-proposal.js',
7
- getManifestCall: [
8
- 'getManifestForOrchestration',
9
- {
10
- orchestrationRef: publishRef(
11
- install('@agoric/orchestration/src/vat-orchestration.js'),
12
- ),
13
- },
14
- ],
15
- });
16
-
17
- export default async (homeP, endowments) => {
18
- const { writeCoreEval } = await makeHelpers(homeP, endowments);
19
- await writeCoreEval('gov-orchestration', defaultProposalBuilder);
20
- };