@agoric/builders 0.1.1-orchestration-dev-096c4e8.0 → 0.1.1-other-dev-fbe72e7.0.fbe72e7
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 +39 -36
- package/scripts/inter-protocol/add-STARS.js +8 -7
- package/scripts/inter-protocol/add-collateral-core.js +12 -8
- package/scripts/inter-protocol/init-core.js +6 -5
- package/scripts/inter-protocol/invite-committee-core.js +5 -4
- package/scripts/inter-protocol/manual-price-feed.js +4 -0
- package/scripts/inter-protocol/price-feed-core.js +5 -5
- package/scripts/inter-protocol/replace-electorate-core.js +163 -0
- package/scripts/inter-protocol/replace-feeDistributor-combo.js +82 -0
- package/scripts/inter-protocol/replace-feeDistributor.js +36 -0
- package/scripts/inter-protocol/updatePriceFeeds.js +128 -0
- package/scripts/inter-protocol/withdraw-reserve.build.js +68 -0
- package/scripts/orchestration/axelar-gmp.build.js +81 -0
- package/scripts/orchestration/get-chain-config.js +121 -0
- package/scripts/orchestration/helpers.js +46 -0
- package/scripts/orchestration/hook-localchain-msg-send.js +30 -0
- package/scripts/orchestration/init-basic-flows.js +36 -0
- package/scripts/orchestration/init-stakeAtom.js +33 -0
- package/scripts/orchestration/init-stakeBld.js +24 -0
- package/scripts/orchestration/init-stakeOsmo.js +33 -0
- package/scripts/orchestration/write-chain-info.js +14 -0
- package/scripts/pegasus/init-core.js +4 -3
- package/scripts/smart-wallet/build-game1-start.js +5 -4
- package/scripts/smart-wallet/build-wallet-factory2-upgrade.js +4 -3
- package/scripts/smart-wallet/build-walletFactory-upgrade.js +4 -3
- package/scripts/testing/add-LEMONS.js +24 -0
- package/scripts/testing/add-OLIVES.js +23 -0
- package/scripts/testing/add-USD-LEMONS.js +19 -0
- package/scripts/testing/add-USD-OLIVES.js +19 -0
- package/scripts/testing/append-chain-info.js +50 -0
- package/scripts/testing/init-auto-stake-it.js +42 -0
- package/scripts/testing/init-send-anywhere.js +36 -0
- package/scripts/testing/init-swap-anything.js +36 -0
- package/scripts/testing/provokeBOYD.js +54 -0
- package/scripts/testing/publish-test-info.js +79 -0
- package/scripts/testing/recorded-retired-instances.js +81 -0
- package/scripts/testing/register-interchain-bank-assets.js +199 -0
- package/scripts/testing/replace-feeDistributor-short.js +33 -0
- package/scripts/testing/restart-axelar-gmp.js +94 -0
- package/scripts/testing/restart-basic-flows.js +101 -0
- package/scripts/testing/restart-send-anywhere.js +101 -0
- package/scripts/testing/restart-stakeAtom.js +91 -0
- package/scripts/testing/restart-valueVow.js +82 -0
- package/scripts/testing/start-query-flows.js +155 -0
- package/scripts/testing/start-valueVow.js +93 -0
- package/scripts/testing/test-upgraded-board.js +15 -0
- package/scripts/testing/tweak-chain-info.js +56 -0
- package/scripts/testing/upgrade-send-anywhere.js +139 -0
- package/scripts/testing/upgrade-vaultFactory.js +21 -0
- package/scripts/vats/add-auction.js +31 -0
- package/scripts/vats/init-core.js +4 -3
- package/scripts/vats/init-localchain.js +4 -3
- package/scripts/vats/init-network.js +4 -3
- package/scripts/vats/init-orchestration.js +21 -0
- package/scripts/vats/init-transfer.js +19 -0
- package/scripts/vats/priceFeedSupport.js +90 -0
- package/scripts/vats/probe-zcf-bundle.js +4 -3
- package/scripts/vats/replace-provisioning.js +4 -3
- package/scripts/vats/replace-zoe.js +4 -3
- package/scripts/vats/restart-vats.js +4 -3
- package/scripts/vats/revive-kread.js +14 -0
- package/scripts/vats/test-localchain.js +4 -3
- package/scripts/vats/test-vtransfer.js +19 -0
- package/scripts/vats/updateAtomPriceFeed.js +22 -0
- package/scripts/vats/updateStAtomPriceFeed.js +22 -0
- package/scripts/vats/updateStOsmoPriceFeed.js +22 -0
- package/scripts/vats/updateStTiaPriceFeed.js +22 -0
- package/scripts/vats/updateStkAtomPriceFeed.js +22 -0
- package/scripts/vats/upgrade-agoricNames.js +21 -0
- package/scripts/vats/upgrade-asset-reserve.js +21 -0
- package/scripts/vats/upgrade-bank.js +19 -0
- package/scripts/vats/upgrade-board.js +20 -0
- package/scripts/vats/upgrade-mintHolder.js +105 -0
- package/scripts/vats/upgrade-orchestration.js +21 -0
- package/scripts/vats/upgrade-paRegistry.js +21 -0
- package/scripts/vats/upgrade-provisionPool-to-BLD.js +25 -0
- package/scripts/vats/upgrade-provisionPool.js +21 -0
- package/scripts/vats/upgrade-psm.js +19 -0
- package/scripts/vats/upgrade-vats.js +49 -0
- package/scripts/vats/upgrade-zcf.js +19 -0
- package/scripts/vats/upgrade-zoe.js +4 -3
- package/scripts/vats/upgradeScaledPriceAuthorities.js +23 -0
- package/scripts/vats/upgradeVaults.js +24 -0
- package/tsconfig.json +0 -2
- package/index.js +0 -2
- package/scripts/inter-protocol/deploy-contracts.js +0 -110
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
2
|
+
export const upgradeVatsProposalBuilder = async (
|
|
3
|
+
{ publishRef, install },
|
|
4
|
+
vatNameToEntrypoint,
|
|
5
|
+
) => {
|
|
6
|
+
if (!vatNameToEntrypoint) {
|
|
7
|
+
throw Error('Missing vatNameToEntrypoint');
|
|
8
|
+
}
|
|
9
|
+
return harden({
|
|
10
|
+
sourceSpec: '@agoric/vats/src/proposals/upgrade-vats-generic-proposal.js',
|
|
11
|
+
getManifestCall: [
|
|
12
|
+
'getManifestForUpgradingVats',
|
|
13
|
+
{
|
|
14
|
+
bundleRefs: Object.fromEntries(
|
|
15
|
+
Object.entries(vatNameToEntrypoint).map(
|
|
16
|
+
([name, entrypoint]) =>
|
|
17
|
+
/** @type {const} */ ([name, publishRef(install(entrypoint))]),
|
|
18
|
+
),
|
|
19
|
+
),
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
26
|
+
export const upgradeZoeContractsProposalBuilder = async (
|
|
27
|
+
{ publishRef, install },
|
|
28
|
+
contractKitSpecs,
|
|
29
|
+
) => {
|
|
30
|
+
if (!contractKitSpecs) {
|
|
31
|
+
throw Error('Missing contractKitSpecs');
|
|
32
|
+
}
|
|
33
|
+
return harden({
|
|
34
|
+
sourceSpec: '@agoric/vats/src/proposals/upgrade-vats-generic-proposal.js',
|
|
35
|
+
getManifestCall: [
|
|
36
|
+
'getManifestForUpgradingZoeContractKits',
|
|
37
|
+
{
|
|
38
|
+
contractKitSpecs,
|
|
39
|
+
/** @type {{ [bundleName: string]: VatSourceRef }} */
|
|
40
|
+
installationBundleRefs: Object.fromEntries(
|
|
41
|
+
contractKitSpecs.map(({ bundleName, entrypoint }) => [
|
|
42
|
+
bundleName,
|
|
43
|
+
publishRef(install(entrypoint)),
|
|
44
|
+
]),
|
|
45
|
+
),
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
});
|
|
49
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
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/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
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
16
|
+
export default async (homeP, endowments) => {
|
|
17
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
18
|
+
await writeCoreEval('upgrade-zcf', defaultProposalBuilder);
|
|
19
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
2
2
|
|
|
3
|
-
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').
|
|
3
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
4
4
|
export const defaultProposalBuilder = async ({ publishRef, install }) =>
|
|
5
5
|
harden({
|
|
6
6
|
sourceSpec: '@agoric/vats/src/proposals/upgrade-zoe-proposal.js',
|
|
@@ -12,7 +12,8 @@ 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
|
-
const {
|
|
17
|
-
await
|
|
17
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
18
|
+
await writeCoreEval('upgrade-zoe', defaultProposalBuilder);
|
|
18
19
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
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:
|
|
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
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
19
|
+
export default async (homeP, endowments) => {
|
|
20
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
21
|
+
|
|
22
|
+
await writeCoreEval('upgradeScaledPriceAuthorities', defaultProposalBuilder);
|
|
23
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
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/inter-protocol/src/proposals/upgrade-vaults.js',
|
|
7
|
+
getManifestCall: [
|
|
8
|
+
'getManifestForUpgradeVaults',
|
|
9
|
+
{
|
|
10
|
+
VaultFactoryRef: publishRef(
|
|
11
|
+
install(
|
|
12
|
+
'@agoric/inter-protocol/src/vaultFactory/vaultFactory.js',
|
|
13
|
+
'../bundles/bundle-vaultFactory.js',
|
|
14
|
+
),
|
|
15
|
+
),
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
21
|
+
export default async (homeP, endowments) => {
|
|
22
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
23
|
+
await writeCoreEval('upgrade-vaults', defaultProposalBuilder);
|
|
24
|
+
};
|
package/tsconfig.json
CHANGED
package/index.js
DELETED
|
@@ -1,110 +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
|
-
|
|
7
|
-
// TODO: CLI options to choose contracts
|
|
8
|
-
const contractRefs = [
|
|
9
|
-
'../../governance/bundles/bundle-contractGovernor.js',
|
|
10
|
-
'../../governance/bundles/bundle-committee.js',
|
|
11
|
-
'../../governance/bundles/bundle-binaryVoteCounter.js',
|
|
12
|
-
'../bundles/bundle-vaultFactory.js',
|
|
13
|
-
'../bundles/bundle-reserve.js',
|
|
14
|
-
'../bundles/bundle-psm.js',
|
|
15
|
-
'../bundles/bundle-auctioneer.js',
|
|
16
|
-
'../../vats/bundles/bundle-mintHolder.js',
|
|
17
|
-
];
|
|
18
|
-
const contractRoots = contractRefs.map(ref =>
|
|
19
|
-
url.fileURLToPath(new URL(ref, import.meta.url)),
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
/** @type {<T>(store: any, key: string, make: () => T) => Promise<T>} */
|
|
23
|
-
const provideWhen = async (store, key, make) => {
|
|
24
|
-
const found = await E(store).get(key);
|
|
25
|
-
if (found) {
|
|
26
|
-
return found;
|
|
27
|
-
}
|
|
28
|
-
const value = make();
|
|
29
|
-
await E(store).set(key, value);
|
|
30
|
-
return value;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export default async (homeP, endowments) => {
|
|
34
|
-
const home = await homeP;
|
|
35
|
-
const { zoe, scratch, board } = home;
|
|
36
|
-
|
|
37
|
-
const { installInPieces, getBundlerMaker } = await makeHelpers(
|
|
38
|
-
homeP,
|
|
39
|
-
endowments,
|
|
40
|
-
);
|
|
41
|
-
const bundler = E(getBundlerMaker({ log: console.log })).makeBundler({
|
|
42
|
-
zoe,
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
console.log('getting installCache...');
|
|
46
|
-
/**
|
|
47
|
-
* @type {CopyMap<
|
|
48
|
-
* string,
|
|
49
|
-
* { installation: Installation; boardId: string; path?: string }
|
|
50
|
-
* >}
|
|
51
|
-
*/
|
|
52
|
-
const initial = await provideWhen(scratch, 'installCache', () =>
|
|
53
|
-
makeCopyMap([]),
|
|
54
|
-
);
|
|
55
|
-
console.log('initially:', initial.payload.keys.length, 'entries');
|
|
56
|
-
|
|
57
|
-
// ISSUE: getCopyMapEntries of CopyMap<K, V> loses K, V.
|
|
58
|
-
/**
|
|
59
|
-
* @type {Map<
|
|
60
|
-
* string,
|
|
61
|
-
* { installation: Installation; boardId: string; path?: string }
|
|
62
|
-
* >}
|
|
63
|
-
*/
|
|
64
|
-
const working = new Map(getCopyMapEntries(initial));
|
|
65
|
-
|
|
66
|
-
let added = 0;
|
|
67
|
-
|
|
68
|
-
/** @type {EndoZipBase64Bundle[]} */
|
|
69
|
-
const bundles = await Promise.all(
|
|
70
|
-
contractRoots.map(path => import(path).then(m => m.default)),
|
|
71
|
-
);
|
|
72
|
-
|
|
73
|
-
let ix = 0;
|
|
74
|
-
for await (const bundle of bundles) {
|
|
75
|
-
const sha512 = bundle.endoZipBase64Sha512;
|
|
76
|
-
if (working.has(bundle.endoZipBase64Sha512)) {
|
|
77
|
-
console.log('hit:', { path: contractRefs[ix], sha512 });
|
|
78
|
-
} else {
|
|
79
|
-
console.log('miss:', {
|
|
80
|
-
path: contractRefs[ix],
|
|
81
|
-
length: bundle.endoZipBase64.length,
|
|
82
|
-
sha512,
|
|
83
|
-
});
|
|
84
|
-
const installation = await installInPieces(bundle, bundler, {
|
|
85
|
-
persist: true,
|
|
86
|
-
});
|
|
87
|
-
const boardId = await E(board).getId(installation);
|
|
88
|
-
working.set(sha512, { installation, boardId, path: contractRefs[ix] });
|
|
89
|
-
added += 1;
|
|
90
|
-
}
|
|
91
|
-
ix += 1;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
const final = makeCopyMap(working);
|
|
95
|
-
assert.equal(final.payload.keys.length, working.size);
|
|
96
|
-
await (added > 0 && E(home.scratch).set('installCache', final));
|
|
97
|
-
console.log({
|
|
98
|
-
initial: initial.payload.keys.length,
|
|
99
|
-
added,
|
|
100
|
-
total: working.size,
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
const items = [...working.entries()]
|
|
104
|
-
.map(([sha512, { boardId, path }]) => ({ sha512, boardId, path }))
|
|
105
|
-
.sort();
|
|
106
|
-
const boardId = await E(board).getId(JSON.stringify(items));
|
|
107
|
-
console.log({
|
|
108
|
-
boardId,
|
|
109
|
-
});
|
|
110
|
-
};
|