@agoric/builders 0.1.1-orchestration-dev-096c4e8.0 → 0.1.1-upgrade-16-dev-8879538.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/index.js CHANGED
@@ -1,2 +0,0 @@
1
- // Ambient types
2
- import '@agoric/network/exported.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/builders",
3
- "version": "0.1.1-orchestration-dev-096c4e8.0+096c4e8",
3
+ "version": "0.1.1-upgrade-16-dev-8879538.0+8879538",
4
4
  "description": "Build scripts for proposals to an Agoric chain",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -23,35 +23,34 @@
23
23
  "author": "Agoric",
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@agoric/ertp": "0.16.3-orchestration-dev-096c4e8.0+096c4e8",
27
- "@agoric/internal": "0.3.3-orchestration-dev-096c4e8.0+096c4e8",
28
- "@agoric/network": "0.1.1-orchestration-dev-096c4e8.0+096c4e8",
29
- "@agoric/notifier": "0.6.3-orchestration-dev-096c4e8.0+096c4e8",
30
- "@agoric/smart-wallet": "0.5.4-orchestration-dev-096c4e8.0+096c4e8",
31
- "@agoric/vat-data": "0.5.3-orchestration-dev-096c4e8.0+096c4e8",
32
- "@agoric/vats": "0.15.2-orchestration-dev-096c4e8.0+096c4e8",
33
- "@agoric/zoe": "0.26.3-orchestration-dev-096c4e8.0+096c4e8",
34
- "@endo/bundle-source": "^3.1.0",
35
- "@endo/captp": "^4.0.4",
36
- "@endo/eventual-send": "^1.1.2",
37
- "@endo/far": "^1.0.4",
38
- "@endo/init": "^1.0.4",
39
- "@endo/marshal": "^1.3.0",
40
- "@endo/promise-kit": "^1.0.4",
41
- "@endo/stream": "^1.1.0",
26
+ "@agoric/ertp": "0.16.3-upgrade-16-dev-8879538.0+8879538",
27
+ "@agoric/internal": "0.3.3-upgrade-16-dev-8879538.0+8879538",
28
+ "@agoric/notifier": "0.6.3-upgrade-16-dev-8879538.0+8879538",
29
+ "@agoric/smart-wallet": "0.5.4-upgrade-16-dev-8879538.0+8879538",
30
+ "@agoric/vat-data": "0.5.3-upgrade-16-dev-8879538.0+8879538",
31
+ "@agoric/vats": "0.15.2-upgrade-16-dev-8879538.0+8879538",
32
+ "@agoric/zoe": "0.26.3-upgrade-16-dev-8879538.0+8879538",
33
+ "@endo/bundle-source": "^3.2.3",
34
+ "@endo/captp": "^4.2.0",
35
+ "@endo/eventual-send": "^1.2.2",
36
+ "@endo/far": "^1.1.2",
37
+ "@endo/init": "^1.1.2",
38
+ "@endo/marshal": "^1.5.0",
39
+ "@endo/promise-kit": "^1.1.2",
40
+ "@endo/stream": "^1.2.2",
42
41
  "import-meta-resolve": "^2.2.1"
43
42
  },
44
43
  "devDependencies": {
45
- "@agoric/assert": "0.6.1-orchestration-dev-096c4e8.0+096c4e8",
46
- "@agoric/deploy-script-support": "0.10.4-orchestration-dev-096c4e8.0+096c4e8",
47
- "@agoric/governance": "0.10.4-orchestration-dev-096c4e8.0+096c4e8",
48
- "@agoric/inter-protocol": "0.16.2-orchestration-dev-096c4e8.0+096c4e8",
49
- "@agoric/store": "0.9.3-orchestration-dev-096c4e8.0+096c4e8",
50
- "@agoric/swing-store": "0.9.2-orchestration-dev-096c4e8.0+096c4e8",
51
- "@agoric/swingset-liveslots": "0.10.3-orchestration-dev-096c4e8.0+096c4e8",
52
- "@agoric/time": "0.3.3-orchestration-dev-096c4e8.0+096c4e8",
44
+ "@agoric/assert": "0.6.1-upgrade-16-dev-8879538.0+8879538",
45
+ "@agoric/deploy-script-support": "0.10.4-upgrade-16-dev-8879538.0+8879538",
46
+ "@agoric/governance": "0.10.4-upgrade-16-dev-8879538.0+8879538",
47
+ "@agoric/inter-protocol": "0.16.2-upgrade-16-dev-8879538.0+8879538",
48
+ "@agoric/store": "0.9.3-upgrade-16-dev-8879538.0+8879538",
49
+ "@agoric/swing-store": "0.9.2-upgrade-16-dev-8879538.0+8879538",
50
+ "@agoric/swingset-liveslots": "0.10.3-upgrade-16-dev-8879538.0+8879538",
51
+ "@agoric/time": "0.3.3-upgrade-16-dev-8879538.0+8879538",
53
52
  "ava": "^5.3.0",
54
- "c8": "^7.13.0"
53
+ "c8": "^9.1.0"
55
54
  },
56
55
  "files": [
57
56
  "CHANGELOG.md",
@@ -66,11 +65,11 @@
66
65
  "access": "public"
67
66
  },
68
67
  "engines": {
69
- "node": ">=14.15.0"
68
+ "node": "^18.12 || ^20.9"
70
69
  },
71
70
  "ava": {
72
71
  "files": [
73
- "test/**/test-*.js"
72
+ "test/**/*.test.*"
74
73
  ],
75
74
  "require": [
76
75
  "@endo/init/debug.js"
@@ -79,7 +78,7 @@
79
78
  "workerThreads": false
80
79
  },
81
80
  "typeCoverage": {
82
- "atLeast": 73.62
81
+ "atLeast": 74.23
83
82
  },
84
- "gitHead": "096c4e8fce80e9a509b0e1a30fda11736c4570e1"
83
+ "gitHead": "8879538cd1d125a08346f02dd5701d0d70c90bb8"
85
84
  }
@@ -3,6 +3,7 @@ import url from 'url';
3
3
  import { makeHelpers } from '@agoric/deploy-script-support';
4
4
  import { E } from '@endo/eventual-send';
5
5
  import { getCopyMapEntries, makeCopyMap } from '@agoric/store';
6
+ /** @import {CopyMap} from '@endo/patterns' */
6
7
 
7
8
  // TODO: CLI options to choose contracts
8
9
  const contractRefs = [
@@ -1,7 +1,7 @@
1
1
  /* global process */
2
2
  import { makeHelpers } from '@agoric/deploy-script-support';
3
3
 
4
- const DEFAULT_CONTRACT_TERMS = {
4
+ export const DEFAULT_CONTRACT_TERMS = {
5
5
  POLL_INTERVAL: 30n,
6
6
  maxSubmissionCount: 1000,
7
7
  minSubmissionCount: 2,
@@ -0,0 +1,34 @@
1
+ import { makeHelpers } from '@agoric/deploy-script-support';
2
+
3
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
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
+ stakeAtom: publishRef(
20
+ install('@agoric/orchestration/src/examples/stakeAtom.contract.js'),
21
+ ),
22
+ },
23
+ hostConnectionId,
24
+ controllerConnectionId,
25
+ bondDenom,
26
+ },
27
+ ],
28
+ });
29
+ };
30
+
31
+ export default async (homeP, endowments) => {
32
+ const { writeCoreProposal } = await makeHelpers(homeP, endowments);
33
+ await writeCoreProposal('start-stakeAtom', defaultProposalBuilder);
34
+ };
@@ -0,0 +1,23 @@
1
+ // @ts-check
2
+ import { makeHelpers } from '@agoric/deploy-script-support';
3
+
4
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
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 { writeCoreProposal } = await makeHelpers(homeP, endowments);
22
+ await writeCoreProposal('start-stakeBld', defaultProposalBuilder);
23
+ };
@@ -0,0 +1,14 @@
1
+ import { makeHelpers } from '@agoric/deploy-script-support';
2
+
3
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
4
+ export const defaultProposalBuilder = async () => {
5
+ return harden({
6
+ sourceSpec: '@agoric/inter-protocol/src/proposals/add-auction.js',
7
+ getManifestCall: ['getManifestForAddAuction'],
8
+ });
9
+ };
10
+
11
+ export default async (homeP, endowments) => {
12
+ const { writeCoreProposal } = await makeHelpers(homeP, endowments);
13
+ await writeCoreProposal('add-auction', defaultProposalBuilder);
14
+ };
@@ -0,0 +1,20 @@
1
+ import { makeHelpers } from '@agoric/deploy-script-support';
2
+
3
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
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 { writeCoreProposal } = await makeHelpers(homeP, endowments);
19
+ await writeCoreProposal('gov-orchestration', defaultProposalBuilder);
20
+ };
@@ -0,0 +1,62 @@
1
+ /* global process */
2
+
3
+ import { DEFAULT_CONTRACT_TERMS } from '../inter-protocol/price-feed-core.js';
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
+ ];
13
+
14
+ /**
15
+ * modified copy of ../inter-protocol/price-feed-core.js
16
+ *
17
+ * @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder}
18
+ */
19
+ export const priceFeedProposalBuilder = async (
20
+ { publishRef, install },
21
+ options = {},
22
+ ) => {
23
+ const {
24
+ AGORIC_INSTANCE_NAME,
25
+ IN_BRAND_LOOKUP,
26
+ IN_BRAND_NAME = IN_BRAND_LOOKUP[IN_BRAND_LOOKUP.length - 1],
27
+ } = options;
28
+
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');
35
+
36
+ assert(AGORIC_INSTANCE_NAME, 'AGORIC_INSTANCE_NAME is required');
37
+
38
+ assert.equal(IN_BRAND_LOOKUP[0], 'agoricNames');
39
+ assert(IN_BRAND_NAME, 'brandIn is required');
40
+
41
+ return harden({
42
+ sourceSpec: '@agoric/inter-protocol/src/proposals/price-feed-proposal.js',
43
+ getManifestCall: [
44
+ 'getManifestForPriceFeed',
45
+ {
46
+ AGORIC_INSTANCE_NAME,
47
+ contractTerms: DEFAULT_CONTRACT_TERMS,
48
+ oracleAddresses,
49
+ IN_BRAND_NAME,
50
+ IN_BRAND_DECIMALS: 6,
51
+ OUT_BRAND_DECIMALS: 4,
52
+ OUT_BRAND_NAME: 'USD',
53
+ priceAggregatorRef: publishRef(
54
+ install(
55
+ '@agoric/inter-protocol/src/price/fluxAggregatorContract.js',
56
+ '../bundles/bundle-fluxAggregatorKit.js',
57
+ ),
58
+ ),
59
+ },
60
+ ],
61
+ });
62
+ };
@@ -0,0 +1,21 @@
1
+ import { makeHelpers } from '@agoric/deploy-script-support';
2
+ import { priceFeedProposalBuilder } from './priceFeedSupport.js';
3
+
4
+ const OPTIONS = {
5
+ AGORIC_INSTANCE_NAME: 'ATOM-USD price feed',
6
+ IN_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'ATOM'],
7
+ OUT_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'USD'],
8
+ };
9
+
10
+ /**
11
+ * @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder}
12
+ */
13
+ export const defaultProposalBuilder = async ({ publishRef, install }) => {
14
+ return priceFeedProposalBuilder({ publishRef, install }, OPTIONS);
15
+ };
16
+
17
+ export default async (homeP, endowments) => {
18
+ const { writeCoreProposal } = await makeHelpers(homeP, endowments);
19
+
20
+ await writeCoreProposal('atomPriceFeed', defaultProposalBuilder);
21
+ };
@@ -0,0 +1,21 @@
1
+ import { makeHelpers } from '@agoric/deploy-script-support';
2
+ import { priceFeedProposalBuilder } from './priceFeedSupport.js';
3
+
4
+ const OPTIONS = {
5
+ AGORIC_INSTANCE_NAME: 'stATOM-USD price feed',
6
+ IN_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'stAtom'],
7
+ OUT_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'USD'],
8
+ };
9
+
10
+ /**
11
+ * @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder}
12
+ */
13
+ export const defaultProposalBuilder = async ({ publishRef, install }) => {
14
+ return priceFeedProposalBuilder({ publishRef, install }, OPTIONS);
15
+ };
16
+
17
+ export default async (homeP, endowments) => {
18
+ const { writeCoreProposal } = await makeHelpers(homeP, endowments);
19
+
20
+ await writeCoreProposal('stAtomPriceFeed', defaultProposalBuilder);
21
+ };
@@ -0,0 +1,21 @@
1
+ import { makeHelpers } from '@agoric/deploy-script-support';
2
+ import { priceFeedProposalBuilder } from './priceFeedSupport.js';
3
+
4
+ const OPTIONS = {
5
+ AGORIC_INSTANCE_NAME: 'stOSMO-USD price feed',
6
+ IN_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'stOSMO'],
7
+ OUT_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'USD'],
8
+ };
9
+
10
+ /**
11
+ * @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder}
12
+ */
13
+ export const defaultProposalBuilder = async ({ publishRef, install }) => {
14
+ return priceFeedProposalBuilder({ publishRef, install }, OPTIONS);
15
+ };
16
+
17
+ export default async (homeP, endowments) => {
18
+ const { writeCoreProposal } = await makeHelpers(homeP, endowments);
19
+
20
+ await writeCoreProposal('stOsmoPriceFeed', defaultProposalBuilder);
21
+ };
@@ -0,0 +1,21 @@
1
+ import { makeHelpers } from '@agoric/deploy-script-support';
2
+ import { priceFeedProposalBuilder } from './priceFeedSupport.js';
3
+
4
+ const OPTIONS = {
5
+ AGORIC_INSTANCE_NAME: 'stTIA-USD price feed',
6
+ IN_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'stTIA'],
7
+ OUT_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'USD'],
8
+ };
9
+
10
+ /**
11
+ * @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder}
12
+ */
13
+ export const defaultProposalBuilder = async ({ publishRef, install }) => {
14
+ return priceFeedProposalBuilder({ publishRef, install }, OPTIONS);
15
+ };
16
+
17
+ export default async (homeP, endowments) => {
18
+ const { writeCoreProposal } = await makeHelpers(homeP, endowments);
19
+
20
+ await writeCoreProposal('stTiaPriceFeed', defaultProposalBuilder);
21
+ };
@@ -0,0 +1,21 @@
1
+ import { makeHelpers } from '@agoric/deploy-script-support';
2
+ import { priceFeedProposalBuilder } from './priceFeedSupport.js';
3
+
4
+ const OPTIONS = {
5
+ AGORIC_INSTANCE_NAME: 'stkATOM-USD price feed',
6
+ IN_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'stkAtom'],
7
+ OUT_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'USD'],
8
+ };
9
+
10
+ /**
11
+ * @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder}
12
+ */
13
+ export const defaultProposalBuilder = async ({ publishRef, install }) => {
14
+ return priceFeedProposalBuilder({ publishRef, install }, OPTIONS);
15
+ };
16
+
17
+ export default async (homeP, endowments) => {
18
+ const { writeCoreProposal } = await makeHelpers(homeP, endowments);
19
+
20
+ await writeCoreProposal('stkATOMPriceFeed', defaultProposalBuilder);
21
+ };
@@ -0,0 +1,18 @@
1
+ import { makeHelpers } from '@agoric/deploy-script-support';
2
+
3
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
4
+ export const defaultProposalBuilder = async ({ publishRef, install }) =>
5
+ harden({
6
+ sourceSpec: '@agoric/vats/src/proposals/zcf-only-proposal.js',
7
+ getManifestCall: [
8
+ 'getManifestForUpgradingZcf',
9
+ {
10
+ zcfRef: publishRef(install('@agoric/zoe/src/contractFacet/vatRoot.js')),
11
+ },
12
+ ],
13
+ });
14
+
15
+ export default async (homeP, endowments) => {
16
+ const { writeCoreProposal } = await makeHelpers(homeP, endowments);
17
+ await writeCoreProposal('upgrade-zcf', defaultProposalBuilder);
18
+ };
@@ -0,0 +1,25 @@
1
+ import { makeHelpers } from '@agoric/deploy-script-support';
2
+
3
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
4
+ export const defaultProposalBuilder = async ({ publishRef, install }) =>
5
+ harden({
6
+ sourceSpec:
7
+ '@agoric/inter-protocol/src/proposals/upgrade-scaledPriceAuthorities.js',
8
+ getManifestCall: [
9
+ 'getManifestForUpgradeScaledPriceAuthorities',
10
+ {
11
+ scaledPARef: publishRef(
12
+ install('@agoric/zoe/src/contracts/scaledPriceAuthority.js'),
13
+ ),
14
+ },
15
+ ],
16
+ });
17
+
18
+ export default async (homeP, endowments) => {
19
+ const { writeCoreProposal } = await makeHelpers(homeP, endowments);
20
+
21
+ await writeCoreProposal(
22
+ 'upgradeScaledPriceAuthorities',
23
+ defaultProposalBuilder,
24
+ );
25
+ };
@@ -0,0 +1,23 @@
1
+ import { makeHelpers } from '@agoric/deploy-script-support';
2
+
3
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
4
+ export const defaultProposalBuilder = async ({ publishRef, install }) =>
5
+ harden({
6
+ sourceSpec: '@agoric/inter-protocol/src/proposals/upgrade-vaults.js',
7
+ getManifestCall: [
8
+ 'getManifestForUpgradeVaults',
9
+ {
10
+ vaultsRef: publishRef(
11
+ install(
12
+ '@agoric/inter-protocol/src/vaultFactory/vaultFactory.js',
13
+ '../bundles/bundle-vaultFactory.js',
14
+ ),
15
+ ),
16
+ },
17
+ ],
18
+ });
19
+
20
+ export default async (homeP, endowments) => {
21
+ const { writeCoreProposal } = await makeHelpers(homeP, endowments);
22
+ await writeCoreProposal('upgrade-vaults', defaultProposalBuilder);
23
+ };
package/tsconfig.json CHANGED
@@ -1,9 +1,7 @@
1
1
  {
2
2
  "extends": "../../tsconfig.json",
3
3
  "compilerOptions": {
4
- "allowSyntheticDefaultImports": true,
5
4
  "checkJs": true,
6
- "maxNodeModuleJsDepth": 2,
7
5
  },
8
6
  "include": [
9
7
  "*.js",