@agoric/builders 0.1.1-upgrade-17-dev-e67cd91.0 → 0.1.1-upgrade-18-dev-d7c994b.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 +28 -28
- package/scripts/inter-protocol/add-STARS.js +1 -0
- package/scripts/inter-protocol/add-collateral-core.js +7 -3
- package/scripts/inter-protocol/init-core.js +2 -1
- package/scripts/inter-protocol/invite-committee-core.js +2 -1
- package/scripts/inter-protocol/price-feed-core.js +1 -1
- package/scripts/inter-protocol/replace-electorate-core.js +115 -0
- package/scripts/inter-protocol/updatePriceFeeds.js +82 -0
- package/scripts/orchestration/init-basic-flows.js +1 -0
- package/scripts/orchestration/init-stakeAtom.js +2 -1
- package/scripts/orchestration/init-stakeBld.js +2 -1
- package/scripts/orchestration/init-stakeOsmo.js +2 -1
- package/scripts/orchestration/write-chain-info.js +14 -0
- package/scripts/pegasus/init-core.js +1 -0
- package/scripts/smart-wallet/build-game1-start.js +1 -0
- package/scripts/smart-wallet/build-wallet-factory2-upgrade.js +1 -0
- package/scripts/smart-wallet/build-walletFactory-upgrade.js +1 -0
- package/scripts/testing/add-LEMONS.js +1 -0
- package/scripts/testing/add-OLIVES.js +1 -0
- package/scripts/testing/append-chain-info.js +1 -3
- package/scripts/testing/fix-buggy-sendAnywhere.js +143 -0
- package/scripts/testing/restart-basic-flows.js +1 -0
- package/scripts/testing/restart-send-anywhere.js +1 -0
- package/scripts/testing/restart-stakeAtom.js +2 -1
- package/scripts/testing/restart-valueVow.js +1 -0
- package/scripts/testing/start-auto-stake-it.js +1 -0
- package/scripts/testing/start-buggy-sendAnywhere.js +143 -0
- package/scripts/testing/start-query-flows.js +1 -0
- package/scripts/testing/start-send-anywhere.js +1 -0
- package/scripts/testing/start-valueVow.js +1 -0
- package/scripts/testing/tweak-chain-info.js +1 -3
- package/scripts/vats/add-auction.js +8 -1
- package/scripts/vats/init-core.js +1 -0
- package/scripts/vats/init-localchain.js +1 -0
- package/scripts/vats/init-network.js +1 -0
- package/scripts/vats/init-orchestration.js +1 -0
- package/scripts/vats/init-transfer.js +1 -0
- package/scripts/vats/probe-zcf-bundle.js +1 -0
- package/scripts/vats/replace-provisioning.js +1 -0
- package/scripts/vats/replace-zoe.js +1 -0
- package/scripts/vats/restart-vats.js +1 -0
- package/scripts/vats/revive-kread.js +1 -0
- package/scripts/vats/test-localchain.js +1 -0
- package/scripts/vats/test-vtransfer.js +1 -0
- package/scripts/vats/updateAtomPriceFeed.js +1 -0
- package/scripts/vats/updateStAtomPriceFeed.js +1 -0
- package/scripts/vats/updateStOsmoPriceFeed.js +1 -0
- package/scripts/vats/updateStTiaPriceFeed.js +1 -0
- package/scripts/vats/updateStkAtomPriceFeed.js +1 -0
- package/scripts/vats/upgrade-bank.js +1 -0
- package/scripts/vats/upgrade-orch-core.js +1 -0
- package/scripts/vats/upgrade-provisionPool.js +1 -0
- package/scripts/vats/upgrade-zcf.js +1 -0
- package/scripts/vats/upgrade-zoe.js +1 -0
- package/scripts/vats/upgradeScaledPriceAuthorities.js +1 -0
- package/scripts/vats/upgradeVaults.js +2 -1
- package/scripts/inter-protocol/deploy-contracts.js +0 -111
|
@@ -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');
|
|
@@ -11,7 +11,7 @@ import { E } from '@endo/far';
|
|
|
11
11
|
const trace = makeTracer('RestartSA', true);
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* @import {start as StartFn} from '@agoric/orchestration/src/examples/
|
|
14
|
+
* @import {start as StartFn} from '@agoric/orchestration/src/examples/stake-ica.contract.js';
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -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');
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file This is for use in tests in a3p-integration
|
|
3
|
+
* Unlike most builder scripts, this one includes the proposal exports as well.
|
|
4
|
+
*/
|
|
5
|
+
import {
|
|
6
|
+
deeplyFulfilledObject,
|
|
7
|
+
makeTracer,
|
|
8
|
+
NonNullish,
|
|
9
|
+
} from '@agoric/internal';
|
|
10
|
+
import { E, Far } from '@endo/far';
|
|
11
|
+
|
|
12
|
+
/// <reference types="@agoric/vats/src/core/types-ambient"/>
|
|
13
|
+
/**
|
|
14
|
+
* @import {Installation} from '@agoric/zoe/src/zoeService/utils.js';
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const trace = makeTracer('StartBuggySA', true);
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @import {start as StartFn} from '@agoric/orchestration/src/examples/send-anywhere.contract.js';
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @param {BootstrapPowers & {
|
|
25
|
+
* installation: {
|
|
26
|
+
* consume: {
|
|
27
|
+
* sendAnywhere: Installation<StartFn>;
|
|
28
|
+
* };
|
|
29
|
+
* };
|
|
30
|
+
* }} powers
|
|
31
|
+
*/
|
|
32
|
+
export const startSendAnywhere = async ({
|
|
33
|
+
consume: {
|
|
34
|
+
agoricNames,
|
|
35
|
+
board,
|
|
36
|
+
chainStorage,
|
|
37
|
+
chainTimerService,
|
|
38
|
+
cosmosInterchainService,
|
|
39
|
+
localchain,
|
|
40
|
+
startUpgradable,
|
|
41
|
+
},
|
|
42
|
+
installation: {
|
|
43
|
+
consume: { sendAnywhere },
|
|
44
|
+
},
|
|
45
|
+
instance: {
|
|
46
|
+
// @ts-expect-error unknown instance
|
|
47
|
+
produce: { sendAnywhere: produceInstance },
|
|
48
|
+
},
|
|
49
|
+
}) => {
|
|
50
|
+
trace(startSendAnywhere.name);
|
|
51
|
+
|
|
52
|
+
const marshaller = await E(board).getReadonlyMarshaller();
|
|
53
|
+
|
|
54
|
+
const privateArgs = await deeplyFulfilledObject(
|
|
55
|
+
harden({
|
|
56
|
+
agoricNames,
|
|
57
|
+
localchain,
|
|
58
|
+
marshaller,
|
|
59
|
+
orchestrationService: cosmosInterchainService,
|
|
60
|
+
storageNode: E(NonNullish(await chainStorage)).makeChildNode(
|
|
61
|
+
'sendAnywhere',
|
|
62
|
+
),
|
|
63
|
+
timerService: chainTimerService,
|
|
64
|
+
}),
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
/** @type {import('@agoric/vats').NameHub} */
|
|
68
|
+
// @ts-expect-error intentional fake
|
|
69
|
+
const agoricNamesHangs = Far('agoricNames that hangs', {
|
|
70
|
+
lookup: async () => {
|
|
71
|
+
trace('agoricNames.lookup being called that will never resolve');
|
|
72
|
+
// BUG: this never resolves
|
|
73
|
+
return new Promise(() => {});
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
const { instance } = await E(startUpgradable)({
|
|
78
|
+
label: 'sendAnywhere',
|
|
79
|
+
installation: sendAnywhere,
|
|
80
|
+
privateArgs: {
|
|
81
|
+
...privateArgs,
|
|
82
|
+
agoricNames: agoricNamesHangs,
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
produceInstance.resolve(instance);
|
|
86
|
+
trace('done');
|
|
87
|
+
};
|
|
88
|
+
harden(startSendAnywhere);
|
|
89
|
+
|
|
90
|
+
export const getManifestForValueVow = ({ restoreRef }, { sendAnywhereRef }) => {
|
|
91
|
+
trace('sendAnywhereRef', sendAnywhereRef);
|
|
92
|
+
return {
|
|
93
|
+
manifest: {
|
|
94
|
+
[startSendAnywhere.name]: {
|
|
95
|
+
consume: {
|
|
96
|
+
agoricNames: true,
|
|
97
|
+
board: true,
|
|
98
|
+
chainStorage: true,
|
|
99
|
+
chainTimerService: true,
|
|
100
|
+
cosmosInterchainService: true,
|
|
101
|
+
localchain: true,
|
|
102
|
+
|
|
103
|
+
startUpgradable: true,
|
|
104
|
+
},
|
|
105
|
+
installation: {
|
|
106
|
+
consume: { sendAnywhere: true },
|
|
107
|
+
},
|
|
108
|
+
instance: {
|
|
109
|
+
produce: { sendAnywhere: true },
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
installations: {
|
|
114
|
+
sendAnywhere: restoreRef(sendAnywhereRef),
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
120
|
+
export const defaultProposalBuilder = async ({ publishRef, install }) =>
|
|
121
|
+
harden({
|
|
122
|
+
// Somewhat unorthodox, source the exports from this builder module
|
|
123
|
+
sourceSpec: '@agoric/builders/scripts/testing/start-buggy-sendAnywhere.js',
|
|
124
|
+
getManifestCall: [
|
|
125
|
+
'getManifestForValueVow',
|
|
126
|
+
{
|
|
127
|
+
sendAnywhereRef: publishRef(
|
|
128
|
+
install(
|
|
129
|
+
'@agoric/orchestration/src/examples/send-anywhere.contract.js',
|
|
130
|
+
),
|
|
131
|
+
),
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
137
|
+
export default async (homeP, endowments) => {
|
|
138
|
+
// import dynamically so the module can work in CoreEval environment
|
|
139
|
+
const dspModule = await import('@agoric/deploy-script-support');
|
|
140
|
+
const { makeHelpers } = dspModule;
|
|
141
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
142
|
+
await writeCoreEval(startSendAnywhere.name, defaultProposalBuilder);
|
|
143
|
+
};
|
|
@@ -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');
|
|
@@ -16,9 +16,6 @@ const chainInfo = {
|
|
|
16
16
|
counterparty: {
|
|
17
17
|
client_id: '07-tendermint-2',
|
|
18
18
|
connection_id: 'connection-1',
|
|
19
|
-
prefix: {
|
|
20
|
-
key_prefix: '',
|
|
21
|
-
},
|
|
22
19
|
},
|
|
23
20
|
state: 3 /* IBCConnectionState.STATE_OPEN */,
|
|
24
21
|
transferChannel: {
|
|
@@ -47,6 +44,7 @@ export const defaultProposalBuilder = async () =>
|
|
|
47
44
|
],
|
|
48
45
|
});
|
|
49
46
|
|
|
47
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
50
48
|
export default async (homeP, endowments) => {
|
|
51
49
|
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
52
50
|
await writeCoreEval('revise-chain-info', defaultProposalBuilder);
|
|
@@ -7,17 +7,24 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
|
|
|
7
7
|
getManifestCall: [
|
|
8
8
|
'getManifestForAddAuction',
|
|
9
9
|
{
|
|
10
|
-
|
|
10
|
+
auctioneerRef: publishRef(
|
|
11
11
|
install(
|
|
12
12
|
'@agoric/inter-protocol/src/auction/auctioneer.js',
|
|
13
13
|
'../../inter-protocol/bundles/bundle-auctioneer.js',
|
|
14
14
|
),
|
|
15
15
|
),
|
|
16
|
+
contractGovernorRef: publishRef(
|
|
17
|
+
install(
|
|
18
|
+
'@agoric/governance/src/contractGovernor.js',
|
|
19
|
+
'../bundles/bundle-contractGovernor.js',
|
|
20
|
+
),
|
|
21
|
+
),
|
|
16
22
|
},
|
|
17
23
|
],
|
|
18
24
|
});
|
|
19
25
|
};
|
|
20
26
|
|
|
27
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
21
28
|
export default async (homeP, endowments) => {
|
|
22
29
|
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
23
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
|
|
|
@@ -7,7 +7,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
|
|
|
7
7
|
getManifestCall: [
|
|
8
8
|
'getManifestForUpgradeVaults',
|
|
9
9
|
{
|
|
10
|
-
|
|
10
|
+
VaultFactoryRef: publishRef(
|
|
11
11
|
install(
|
|
12
12
|
'@agoric/inter-protocol/src/vaultFactory/vaultFactory.js',
|
|
13
13
|
'../bundles/bundle-vaultFactory.js',
|
|
@@ -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
|
-
};
|