@agoric/builders 0.2.0 → 0.2.1-upgrade-23-dev-bd79330.0.bd79330
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 +24 -29
- package/scripts/inter-protocol/add-collateral-core.js +25 -15
- package/scripts/inter-protocol/init-core.js +81 -53
- package/scripts/inter-protocol/invite-committee-core.js +18 -9
- package/scripts/inter-protocol/manual-price-feed.js +6 -2
- package/scripts/inter-protocol/price-feed-core.js +14 -5
- package/scripts/inter-protocol/replace-electorate-core.js +17 -7
- package/scripts/inter-protocol/replace-feeDistributor-combo.js +7 -2
- package/scripts/inter-protocol/replace-feeDistributor.js +7 -2
- package/scripts/inter-protocol/updatePriceFeeds.js +21 -8
- package/scripts/inter-protocol/withdraw-reserve.build.js +7 -2
- package/scripts/inter-protocol/withdraw-vbank-reserve-permit.json +6 -0
- package/scripts/inter-protocol/withdraw-vbank-reserve.js +72 -0
- package/scripts/lib/build-bundle.js +92 -0
- package/scripts/orchestration/axelar-gmp.build.js +4 -2
- package/scripts/orchestration/hook-localchain-msg-send.js +7 -2
- package/scripts/orchestration/init-basic-flows.js +7 -2
- package/scripts/orchestration/init-stakeAtom.js +7 -2
- package/scripts/orchestration/init-stakeBld.js +7 -2
- package/scripts/orchestration/init-stakeOsmo.js +7 -2
- package/scripts/orchestration/write-chain-info.js +7 -2
- package/scripts/pegasus/init-core.js +17 -8
- package/scripts/smart-wallet/build-game1-start.js +20 -7
- package/scripts/smart-wallet/build-wallet-factory2-upgrade.js +7 -2
- package/scripts/smart-wallet/build-walletFactory-upgrade.js +17 -7
- package/scripts/testing/append-chain-info.js +9 -3
- package/scripts/testing/init-auto-stake-it.js +7 -2
- package/scripts/testing/init-send-anywhere.js +7 -2
- package/scripts/testing/init-swap-anything.js +7 -2
- package/scripts/testing/provokeBOYD.js +8 -4
- package/scripts/testing/publish-test-info.js +8 -2
- package/scripts/testing/recorded-retired-instances.js +11 -2
- package/scripts/testing/register-interchain-bank-assets.js +8 -1
- package/scripts/testing/replace-feeDistributor-short.js +7 -2
- package/scripts/testing/restart-axelar-gmp.js +6 -4
- package/scripts/testing/restart-basic-flows.js +6 -4
- package/scripts/testing/restart-send-anywhere.js +6 -4
- package/scripts/testing/restart-stakeAtom.js +6 -4
- package/scripts/testing/restart-valueVow.js +7 -4
- package/scripts/testing/start-query-flows.js +7 -2
- package/scripts/testing/start-valueVow.js +7 -4
- package/scripts/testing/test-upgraded-board.js +7 -2
- package/scripts/testing/tweak-chain-info.js +9 -3
- package/scripts/testing/upgrade-send-anywhere.js +5 -3
- package/scripts/vats/init-core.js +26 -12
- package/scripts/vats/init-localchain.js +7 -2
- package/scripts/vats/init-network.js +7 -2
- package/scripts/vats/init-orchestration.js +7 -2
- package/scripts/vats/init-transfer.js +7 -2
- package/scripts/vats/priceFeedSupport.js +16 -7
- package/scripts/vats/probe-zcf-bundle.js +7 -2
- package/scripts/vats/replace-provisioning.js +7 -2
- package/scripts/vats/replace-zoe.js +7 -2
- package/scripts/vats/restart-vats.js +7 -2
- package/scripts/vats/revive-kread.js +7 -2
- package/scripts/vats/set-core-proposal-env.js +3 -3
- package/scripts/vats/test-localchain.js +7 -2
- package/scripts/vats/test-vtransfer.js +7 -2
- package/scripts/vats/updateAtomPriceFeed.js +7 -2
- package/scripts/vats/updateStAtomPriceFeed.js +7 -2
- package/scripts/vats/updateStOsmoPriceFeed.js +7 -2
- package/scripts/vats/updateStTiaPriceFeed.js +7 -2
- package/scripts/vats/updateStkAtomPriceFeed.js +7 -2
- package/scripts/vats/upgrade-agoricNames.js +7 -2
- package/scripts/vats/upgrade-asset-reserve.js +7 -2
- package/scripts/vats/upgrade-bank.js +7 -2
- package/scripts/vats/upgrade-board.js +7 -2
- package/scripts/vats/upgrade-mintHolder.js +7 -2
- package/scripts/vats/upgrade-orchestration.js +7 -2
- package/scripts/vats/upgrade-paRegistry.js +7 -2
- package/scripts/vats/upgrade-provisionPool-to-BLD.js +7 -2
- package/scripts/vats/upgrade-provisionPool.js +7 -2
- package/scripts/vats/upgrade-psm.js +7 -2
- package/scripts/vats/upgrade-vats.js +7 -2
- package/scripts/vats/upgrade-zcf.js +7 -2
- package/scripts/vats/upgrade-zoe.js +7 -2
- package/scripts/vats/upgradeScaledPriceAuthorities.js +7 -2
- package/tsconfig.json +4 -0
- package/scripts/inter-protocol/add-STARS.js +0 -44
- package/scripts/testing/add-LEMONS.js +0 -24
- package/scripts/testing/add-OLIVES.js +0 -23
- package/scripts/testing/add-USD-LEMONS.js +0 -19
- package/scripts/testing/add-USD-OLIVES.js +0 -19
- package/scripts/testing/upgrade-vaultFactory.js +0 -21
- package/scripts/vats/add-auction.js +0 -31
- package/scripts/vats/upgradeVaults.js +0 -24
package/package.json
CHANGED
|
@@ -1,36 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/builders",
|
|
3
|
-
"version": "0.2.0",
|
|
3
|
+
"version": "0.2.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
4
4
|
"description": "Build scripts for proposals to an Agoric chain",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"repository": "https://github.com/Agoric/agoric-sdk",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"build": "exit 0",
|
|
10
|
-
"build:add-STARS-proposal": "echo This command has been deprecated. Please run this instead: agoric run scripts/inter-protocol/add-STARS.js",
|
|
11
10
|
"build:restart-vats-proposal": "echo This command has been deprecated. Please run this instead: agoric run scripts/vats/restart-vats.js",
|
|
12
11
|
"build:zcf-proposal": "echo This command has been deprecated. Please run this instead: agoric run scripts/vats/replace-zoe.js",
|
|
13
|
-
"prepack": "yarn run -T tsc --build tsconfig.build.json",
|
|
14
|
-
"postpack": "git clean -f '*.d.*ts*' '*.tsbuildinfo'",
|
|
15
12
|
"test": "ava",
|
|
16
13
|
"test:xs": "exit 0",
|
|
17
14
|
"lint-fix": "yarn lint:eslint --fix",
|
|
18
15
|
"lint": "yarn run -T run-s --continue-on-error 'lint:*'",
|
|
19
16
|
"lint:types": "yarn run -T tsc",
|
|
20
|
-
"lint:eslint": "
|
|
17
|
+
"lint:eslint": "node ../../scripts/eslint-repo.mjs ."
|
|
21
18
|
},
|
|
22
19
|
"keywords": [],
|
|
23
20
|
"author": "Agoric",
|
|
24
21
|
"license": "Apache-2.0",
|
|
25
22
|
"dependencies": {
|
|
26
|
-
"@agoric/client-utils": "0.2.0",
|
|
27
|
-
"@agoric/ertp": "0.17.0",
|
|
28
|
-
"@agoric/internal": "0.4.0",
|
|
29
|
-
"@agoric/notifier": "0.7.0",
|
|
30
|
-
"@agoric/smart-wallet": "0.6.0",
|
|
31
|
-
"@agoric/vat-data": "0.6.0",
|
|
32
|
-
"@agoric/vats": "0.16.0",
|
|
33
|
-
"@agoric/zoe": "0.27.0",
|
|
23
|
+
"@agoric/client-utils": "0.2.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
24
|
+
"@agoric/ertp": "0.17.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
25
|
+
"@agoric/internal": "0.4.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
26
|
+
"@agoric/notifier": "0.7.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
27
|
+
"@agoric/smart-wallet": "0.6.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
28
|
+
"@agoric/vat-data": "0.6.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
29
|
+
"@agoric/vats": "0.16.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
30
|
+
"@agoric/zoe": "0.27.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
34
31
|
"@endo/bundle-source": "^4.1.2",
|
|
35
32
|
"@endo/captp": "^4.4.8",
|
|
36
33
|
"@endo/eventual-send": "^1.3.4",
|
|
@@ -44,16 +41,17 @@
|
|
|
44
41
|
"import-meta-resolve": "^4.1.0"
|
|
45
42
|
},
|
|
46
43
|
"devDependencies": {
|
|
47
|
-
"@agoric/deploy-script-support": "0.11.0",
|
|
48
|
-
"@agoric/governance": "0.11.0",
|
|
49
|
-
"@agoric/inter-protocol": "0.17.0",
|
|
50
|
-
"@agoric/orchestration": "0.2.0",
|
|
51
|
-
"@agoric/store": "0.10.0",
|
|
52
|
-
"@agoric/swing-store": "0.10.0",
|
|
53
|
-
"@agoric/swingset-liveslots": "0.11.0",
|
|
54
|
-
"@agoric/
|
|
44
|
+
"@agoric/deploy-script-support": "0.11.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
45
|
+
"@agoric/governance": "0.11.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
46
|
+
"@agoric/inter-protocol": "0.17.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
47
|
+
"@agoric/orchestration": "0.2.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
48
|
+
"@agoric/store": "0.10.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
49
|
+
"@agoric/swing-store": "0.10.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
50
|
+
"@agoric/swingset-liveslots": "0.11.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
51
|
+
"@agoric/swingset-vat": "0.33.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
52
|
+
"@agoric/time": "0.4.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
55
53
|
"@endo/errors": "^1.2.13",
|
|
56
|
-
"ava": "^
|
|
54
|
+
"ava": "^6.4.1",
|
|
57
55
|
"c8": "^10.1.3"
|
|
58
56
|
},
|
|
59
57
|
"files": [
|
|
@@ -61,9 +59,7 @@
|
|
|
61
59
|
"src/",
|
|
62
60
|
"scripts/",
|
|
63
61
|
"tools/",
|
|
64
|
-
"*.json"
|
|
65
|
-
"globals.d.ts",
|
|
66
|
-
"exported.js"
|
|
62
|
+
"*.json"
|
|
67
63
|
],
|
|
68
64
|
"publishConfig": {
|
|
69
65
|
"access": "public"
|
|
@@ -78,11 +74,10 @@
|
|
|
78
74
|
"require": [
|
|
79
75
|
"@endo/init/debug.js"
|
|
80
76
|
],
|
|
81
|
-
"timeout": "20m"
|
|
82
|
-
"workerThreads": false
|
|
77
|
+
"timeout": "20m"
|
|
83
78
|
},
|
|
84
79
|
"typeCoverage": {
|
|
85
|
-
"atLeast": 89.
|
|
80
|
+
"atLeast": 89.7
|
|
86
81
|
},
|
|
87
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "bd79330f78dae2faf9cc3d8b10063567700da07b"
|
|
88
83
|
}
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
/* eslint-env node */
|
|
2
2
|
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
3
3
|
|
|
4
|
+
import { interProtocolBundleSpecs } from '@agoric/inter-protocol/source-spec-registry.js';
|
|
4
5
|
import { getManifestForAddAssetToVault } from '@agoric/inter-protocol/src/proposals/addAssetToVault.js';
|
|
5
6
|
import { getManifestForPsm } from '@agoric/inter-protocol/src/proposals/startPSM.js';
|
|
6
7
|
import { makeInstallCache } from '@agoric/inter-protocol/src/proposals/utils.js';
|
|
8
|
+
import { vatsSourceSpecRegistry } from '@agoric/vats/source-spec-registry.js';
|
|
9
|
+
import { buildBundlePath } from '../lib/build-bundle.js';
|
|
7
10
|
|
|
8
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* @import {CoreEvalBuilder} from '@agoric/deploy-script-support/src/externalTypes.js';
|
|
13
|
+
* @import {InterchainAssetOptions} from '@agoric/inter-protocol/src/proposals/addAssetToVault.js';
|
|
14
|
+
* @import {DeployScriptFunction} from '@agoric/deploy-script-support/src/externalTypes.js';
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/** @type {CoreEvalBuilder} */
|
|
9
18
|
export const defaultProposalBuilder = async (
|
|
10
19
|
{ publishRef, install: install0, wrapInstall },
|
|
11
20
|
{
|
|
@@ -15,7 +24,7 @@ export const defaultProposalBuilder = async (
|
|
|
15
24
|
} = {},
|
|
16
25
|
{ env = process.env } = {},
|
|
17
26
|
) => {
|
|
18
|
-
/** @type {
|
|
27
|
+
/** @type {InterchainAssetOptions} */
|
|
19
28
|
const {
|
|
20
29
|
issuerBoardId = env.INTERCHAIN_ISSUER_BOARD_ID,
|
|
21
30
|
denom = env.INTERCHAIN_DENOM,
|
|
@@ -32,6 +41,11 @@ export const defaultProposalBuilder = async (
|
|
|
32
41
|
}
|
|
33
42
|
|
|
34
43
|
const install = wrapInstall ? wrapInstall(install0) : install0;
|
|
44
|
+
const scaledPriceAuthorityPath = await buildBundlePath(
|
|
45
|
+
import.meta.url,
|
|
46
|
+
'@agoric/zoe/src/contracts/scaledPriceAuthority.js',
|
|
47
|
+
'scaledPriceAuthority',
|
|
48
|
+
);
|
|
35
49
|
|
|
36
50
|
return harden({
|
|
37
51
|
sourceSpec: '@agoric/inter-protocol/src/proposals/addAssetToVault.js',
|
|
@@ -53,7 +67,7 @@ export const defaultProposalBuilder = async (
|
|
|
53
67
|
scaledPriceAuthorityRef: publishRef(
|
|
54
68
|
install(
|
|
55
69
|
'@agoric/zoe/src/contracts/scaledPriceAuthority.js',
|
|
56
|
-
|
|
70
|
+
scaledPriceAuthorityPath,
|
|
57
71
|
{ persist: true },
|
|
58
72
|
),
|
|
59
73
|
),
|
|
@@ -62,7 +76,7 @@ export const defaultProposalBuilder = async (
|
|
|
62
76
|
});
|
|
63
77
|
};
|
|
64
78
|
|
|
65
|
-
/** @type {
|
|
79
|
+
/** @type {CoreEvalBuilder} */
|
|
66
80
|
export const psmProposalBuilder = async (
|
|
67
81
|
{ publishRef, install: install0, wrapInstall },
|
|
68
82
|
{ anchorOptions = /** @type {object} */ ({}) } = {},
|
|
@@ -73,6 +87,10 @@ export const psmProposalBuilder = async (
|
|
|
73
87
|
assert(denom, 'ANCHOR_DENOM is required');
|
|
74
88
|
|
|
75
89
|
const install = wrapInstall ? wrapInstall(install0) : install0;
|
|
90
|
+
const psm = interProtocolBundleSpecs.psm;
|
|
91
|
+
const mintHolder = vatsSourceSpecRegistry.mintHolder;
|
|
92
|
+
const psmPath = await buildBundlePath(import.meta.url, psm);
|
|
93
|
+
const mintHolderPath = await buildBundlePath(import.meta.url, mintHolder);
|
|
76
94
|
|
|
77
95
|
return harden({
|
|
78
96
|
sourceSpec: '@agoric/inter-protocol/src/proposals/startPSM.js',
|
|
@@ -85,17 +103,9 @@ export const psmProposalBuilder = async (
|
|
|
85
103
|
decimalPlaces,
|
|
86
104
|
},
|
|
87
105
|
installKeys: {
|
|
88
|
-
psm: publishRef(
|
|
89
|
-
install(
|
|
90
|
-
'@agoric/inter-protocol/src/psm/psm.js',
|
|
91
|
-
'../bundles/bundle-psm.js',
|
|
92
|
-
),
|
|
93
|
-
),
|
|
106
|
+
psm: publishRef(install(psm.packagePath, psmPath)),
|
|
94
107
|
mintHolder: publishRef(
|
|
95
|
-
install(
|
|
96
|
-
'@agoric/vats/src/mintHolder.js',
|
|
97
|
-
'../../vats/bundles/bundle-mintHolder.js',
|
|
98
|
-
),
|
|
108
|
+
install(mintHolder.packagePath, mintHolderPath),
|
|
99
109
|
),
|
|
100
110
|
},
|
|
101
111
|
},
|
|
@@ -103,7 +113,7 @@ export const psmProposalBuilder = async (
|
|
|
103
113
|
});
|
|
104
114
|
};
|
|
105
115
|
|
|
106
|
-
/** @type {
|
|
116
|
+
/** @type {DeployScriptFunction} */
|
|
107
117
|
export default async (homeP, endowments) => {
|
|
108
118
|
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
109
119
|
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* governance votes (n/a on sim-chain).
|
|
6
6
|
*/
|
|
7
7
|
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
8
|
-
import {
|
|
8
|
+
import { governanceSourceSpecRegistry } from '@agoric/governance/source-spec-registry.js';
|
|
9
|
+
import { interProtocolBundleSpecs } from '@agoric/inter-protocol/source-spec-registry.js';
|
|
9
10
|
|
|
10
11
|
import {
|
|
11
12
|
getManifestForInterProtocol,
|
|
@@ -13,45 +14,67 @@ import {
|
|
|
13
14
|
getManifestForMain,
|
|
14
15
|
} from '@agoric/inter-protocol/src/proposals/core-proposal.js';
|
|
15
16
|
import { makeInstallCache } from '@agoric/inter-protocol/src/proposals/utils.js';
|
|
17
|
+
import { buildBundlePath } from '../lib/build-bundle.js';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @import {CoreEvalBuilder} from '@agoric/deploy-script-support/src/externalTypes.js';
|
|
21
|
+
* @import {DeployScriptFunction} from '@agoric/deploy-script-support/src/externalTypes.js';
|
|
22
|
+
*/
|
|
16
23
|
|
|
17
24
|
// TODO end inter-package filesystem references https://github.com/Agoric/agoric-sdk/issues/8178
|
|
18
25
|
|
|
19
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* @typedef {{
|
|
28
|
+
* sourceSpec?: string;
|
|
29
|
+
* packagePath?: string;
|
|
30
|
+
* bundleName?: string;
|
|
31
|
+
* }} BundleRegistryEntry
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/** @type {Record<string, Record<string, BundleRegistryEntry>>} */
|
|
20
35
|
const installKeyGroups = {
|
|
21
36
|
econCommittee: {
|
|
22
|
-
contractGovernor:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
],
|
|
26
|
-
committee: [
|
|
27
|
-
'@agoric/governance/src/committee.js',
|
|
28
|
-
'../../governance/bundles/bundle-committee.js',
|
|
29
|
-
],
|
|
30
|
-
binaryVoteCounter: [
|
|
31
|
-
'@agoric/governance/src/binaryVoteCounter.js',
|
|
32
|
-
'../../governance/bundles/bundle-binaryVoteCounter.js',
|
|
33
|
-
],
|
|
37
|
+
contractGovernor: governanceSourceSpecRegistry.contractGovernor,
|
|
38
|
+
committee: governanceSourceSpecRegistry.committee,
|
|
39
|
+
binaryVoteCounter: governanceSourceSpecRegistry.binaryVoteCounter,
|
|
34
40
|
},
|
|
35
41
|
main: {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
],
|
|
40
|
-
vaultFactory: [
|
|
41
|
-
'@agoric/inter-protocol/src/vaultFactory/vaultFactory.js',
|
|
42
|
-
'../../inter-protocol/bundles/bundle-vaultFactory.js',
|
|
43
|
-
],
|
|
44
|
-
feeDistributor: [
|
|
45
|
-
'@agoric/inter-protocol/src/feeDistributor.js',
|
|
46
|
-
'../../inter-protocol/bundles/bundle-feeDistributor.js',
|
|
47
|
-
],
|
|
48
|
-
reserve: [
|
|
49
|
-
'@agoric/inter-protocol/src/reserve/assetReserve.js',
|
|
50
|
-
'../../inter-protocol/bundles/bundle-reserve.js',
|
|
51
|
-
],
|
|
42
|
+
vaultFactory: interProtocolBundleSpecs.vaultFactory,
|
|
43
|
+
feeDistributor: interProtocolBundleSpecs.feeDistributor,
|
|
44
|
+
reserve: interProtocolBundleSpecs.reserve,
|
|
52
45
|
},
|
|
53
46
|
};
|
|
54
47
|
|
|
48
|
+
/**
|
|
49
|
+
* @template I
|
|
50
|
+
* @template R
|
|
51
|
+
* @param {object} opts
|
|
52
|
+
* @param {(i: I) => R} opts.publishRef
|
|
53
|
+
* @param {(m: string, b: string, opts?: any) => I} opts.install
|
|
54
|
+
* @param {Record<string, BundleRegistryEntry>} opts.group
|
|
55
|
+
* @param {boolean} [opts.persist]
|
|
56
|
+
*/
|
|
57
|
+
const publishInstallGroup = async ({ publishRef, install, group, persist }) =>
|
|
58
|
+
Object.fromEntries(
|
|
59
|
+
// eslint-disable-next-line @jessie.js/safe-await-separator
|
|
60
|
+
await Promise.all(
|
|
61
|
+
Object.entries(group).map(async ([key, entry]) => {
|
|
62
|
+
const bundlePath = await buildBundlePath(import.meta.url, entry);
|
|
63
|
+
assert(entry.packagePath, `${key} missing packagePath`);
|
|
64
|
+
return [
|
|
65
|
+
key,
|
|
66
|
+
publishRef(
|
|
67
|
+
install(
|
|
68
|
+
entry.packagePath,
|
|
69
|
+
bundlePath,
|
|
70
|
+
persist === undefined ? undefined : { persist },
|
|
71
|
+
),
|
|
72
|
+
),
|
|
73
|
+
];
|
|
74
|
+
}),
|
|
75
|
+
),
|
|
76
|
+
);
|
|
77
|
+
|
|
55
78
|
/**
|
|
56
79
|
* @template I
|
|
57
80
|
* @template R
|
|
@@ -67,12 +90,12 @@ export const committeeProposalBuilder = async (
|
|
|
67
90
|
{ econCommitteeOptions } = {},
|
|
68
91
|
) => {
|
|
69
92
|
const install = wrapInstall ? wrapInstall(install0) : install0;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
93
|
+
const econCommitteeInstallKeys = await publishInstallGroup({
|
|
94
|
+
publishRef,
|
|
95
|
+
install,
|
|
96
|
+
group: installKeyGroups.econCommittee,
|
|
97
|
+
persist: true,
|
|
98
|
+
});
|
|
76
99
|
return harden({
|
|
77
100
|
sourceSpec: '@agoric/inter-protocol/src/proposals/core-proposal.js',
|
|
78
101
|
getManifestCall: [
|
|
@@ -80,7 +103,7 @@ export const committeeProposalBuilder = async (
|
|
|
80
103
|
{
|
|
81
104
|
econCommitteeOptions,
|
|
82
105
|
installKeys: {
|
|
83
|
-
...
|
|
106
|
+
...econCommitteeInstallKeys,
|
|
84
107
|
},
|
|
85
108
|
},
|
|
86
109
|
],
|
|
@@ -103,13 +126,12 @@ export const mainProposalBuilder = async ({
|
|
|
103
126
|
const { VAULT_FACTORY_CONTROLLER_ADDR } = process.env;
|
|
104
127
|
|
|
105
128
|
const install = wrapInstall ? wrapInstall(install0) : install0;
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
);
|
|
129
|
+
const mainInstallKeys = await publishInstallGroup({
|
|
130
|
+
publishRef,
|
|
131
|
+
install,
|
|
132
|
+
group: installKeyGroups.main,
|
|
133
|
+
persist: true,
|
|
134
|
+
});
|
|
113
135
|
return harden({
|
|
114
136
|
sourceSpec: '@agoric/inter-protocol/src/proposals/core-proposal.js',
|
|
115
137
|
getManifestCall: [
|
|
@@ -117,7 +139,7 @@ export const mainProposalBuilder = async ({
|
|
|
117
139
|
{
|
|
118
140
|
vaultFactoryControllerAddress: VAULT_FACTORY_CONTROLLER_ADDR,
|
|
119
141
|
installKeys: {
|
|
120
|
-
...
|
|
142
|
+
...mainInstallKeys,
|
|
121
143
|
},
|
|
122
144
|
},
|
|
123
145
|
],
|
|
@@ -125,7 +147,7 @@ export const mainProposalBuilder = async ({
|
|
|
125
147
|
};
|
|
126
148
|
|
|
127
149
|
// Build proposal for sim-chain etc.
|
|
128
|
-
/** @type {
|
|
150
|
+
/** @type {CoreEvalBuilder} */
|
|
129
151
|
export const defaultProposalBuilder = async (
|
|
130
152
|
{ publishRef, install },
|
|
131
153
|
options = {},
|
|
@@ -149,10 +171,6 @@ export const defaultProposalBuilder = async (
|
|
|
149
171
|
} = {},
|
|
150
172
|
} = options;
|
|
151
173
|
|
|
152
|
-
/** @param {Record<string, [string, string]>} group */
|
|
153
|
-
const publishGroup = group =>
|
|
154
|
-
objectMap(group, ([mod, bundle]) => publishRef(install(mod, bundle)));
|
|
155
|
-
|
|
156
174
|
const anchorOptions = anchorDenom && {
|
|
157
175
|
denom: anchorDenom,
|
|
158
176
|
decimalPlaces: parseInt(anchorDecimalPlaces, 10),
|
|
@@ -164,6 +182,16 @@ export const defaultProposalBuilder = async (
|
|
|
164
182
|
const econCommitteeOptions = {
|
|
165
183
|
committeeSize: parseInt(econCommitteeSize, 10),
|
|
166
184
|
};
|
|
185
|
+
const econCommitteeInstallKeys = await publishInstallGroup({
|
|
186
|
+
publishRef,
|
|
187
|
+
install,
|
|
188
|
+
group: installKeyGroups.econCommittee,
|
|
189
|
+
});
|
|
190
|
+
const mainInstallKeys = await publishInstallGroup({
|
|
191
|
+
publishRef,
|
|
192
|
+
install,
|
|
193
|
+
group: installKeyGroups.main,
|
|
194
|
+
});
|
|
167
195
|
|
|
168
196
|
return harden({
|
|
169
197
|
sourceSpec: '@agoric/inter-protocol/src/proposals/core-proposal.js',
|
|
@@ -176,15 +204,15 @@ export const defaultProposalBuilder = async (
|
|
|
176
204
|
anchorOptions,
|
|
177
205
|
econCommitteeOptions,
|
|
178
206
|
installKeys: {
|
|
179
|
-
...
|
|
180
|
-
...
|
|
207
|
+
...econCommitteeInstallKeys,
|
|
208
|
+
...mainInstallKeys,
|
|
181
209
|
},
|
|
182
210
|
},
|
|
183
211
|
],
|
|
184
212
|
});
|
|
185
213
|
};
|
|
186
214
|
|
|
187
|
-
/** @type {
|
|
215
|
+
/** @type {DeployScriptFunction} */
|
|
188
216
|
export default async (homeP, endowments) => {
|
|
189
217
|
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
190
218
|
|
|
@@ -2,9 +2,16 @@
|
|
|
2
2
|
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
3
3
|
|
|
4
4
|
import { getManifestForInviteCommittee } from '@agoric/inter-protocol/src/proposals/committee-proposal.js';
|
|
5
|
+
import { interProtocolBundleSpecs } from '@agoric/inter-protocol/source-spec-registry.js';
|
|
6
|
+
import { buildBundlePath } from '../lib/build-bundle.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @import {CoreEvalBuilder} from '@agoric/deploy-script-support/src/externalTypes.js';
|
|
10
|
+
* @import {DeployScriptFunction} from '@agoric/deploy-script-support/src/externalTypes.js';
|
|
11
|
+
*/
|
|
5
12
|
|
|
6
13
|
// Build proposal for sim-chain etc.
|
|
7
|
-
/** @type {
|
|
14
|
+
/** @type {CoreEvalBuilder} */
|
|
8
15
|
export const defaultProposalBuilder = async (
|
|
9
16
|
{ publishRef, install },
|
|
10
17
|
options = {},
|
|
@@ -16,6 +23,12 @@ export const defaultProposalBuilder = async (
|
|
|
16
23
|
|
|
17
24
|
assert(voterAddresses, 'ECON_COMMITTEE_ADDRESSES is required');
|
|
18
25
|
|
|
26
|
+
const econCommitteeCharter = interProtocolBundleSpecs.econCommitteeCharter;
|
|
27
|
+
const econCommitteeCharterPath = await buildBundlePath(
|
|
28
|
+
import.meta.url,
|
|
29
|
+
econCommitteeCharter,
|
|
30
|
+
);
|
|
31
|
+
|
|
19
32
|
return harden({
|
|
20
33
|
sourceSpec: '@agoric/inter-protocol/src/proposals/committee-proposal.js',
|
|
21
34
|
getManifestCall: [
|
|
@@ -23,20 +36,16 @@ export const defaultProposalBuilder = async (
|
|
|
23
36
|
{
|
|
24
37
|
voterAddresses,
|
|
25
38
|
econCommitteeCharterRef: publishRef(
|
|
26
|
-
install(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
{
|
|
30
|
-
persist: true,
|
|
31
|
-
},
|
|
32
|
-
),
|
|
39
|
+
install(econCommitteeCharter.packagePath, econCommitteeCharterPath, {
|
|
40
|
+
persist: true,
|
|
41
|
+
}),
|
|
33
42
|
),
|
|
34
43
|
},
|
|
35
44
|
],
|
|
36
45
|
});
|
|
37
46
|
};
|
|
38
47
|
|
|
39
|
-
/** @type {
|
|
48
|
+
/** @type {DeployScriptFunction} */
|
|
40
49
|
export default async (homeP, endowments) => {
|
|
41
50
|
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
42
51
|
await writeCoreEval('gov-invite-committee', defaultProposalBuilder);
|
|
@@ -2,7 +2,11 @@ import { E } from '@endo/far';
|
|
|
2
2
|
import { deeplyFulfilled } from '@endo/marshal';
|
|
3
3
|
import { makeNotifierFromAsyncIterable } from '@agoric/notifier';
|
|
4
4
|
|
|
5
|
-
import process from 'process';
|
|
5
|
+
import process from 'node:process';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @import {Board} from '@agoric/vats';
|
|
9
|
+
*/
|
|
6
10
|
|
|
7
11
|
/**
|
|
8
12
|
* After extracting the oracleAdmins to entries in home.scratch, you can use one
|
|
@@ -22,7 +26,7 @@ import process from 'process';
|
|
|
22
26
|
* E(qn).getUpdateSince()
|
|
23
27
|
*
|
|
24
28
|
* @typedef {{
|
|
25
|
-
* board:
|
|
29
|
+
* board: Board;
|
|
26
30
|
* chainTimerService;
|
|
27
31
|
* scratch;
|
|
28
32
|
* zoe;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
/* eslint-env node */
|
|
2
2
|
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
3
|
+
import { interProtocolBundleSpecs } from '@agoric/inter-protocol/source-spec-registry.js';
|
|
4
|
+
import { buildBundlePath } from '../lib/build-bundle.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @import {CoreEvalBuilder} from '@agoric/deploy-script-support/src/externalTypes.js';
|
|
8
|
+
*/
|
|
3
9
|
|
|
4
10
|
export const DEFAULT_CONTRACT_TERMS = {
|
|
5
11
|
POLL_INTERVAL: 30n,
|
|
@@ -11,7 +17,7 @@ export const DEFAULT_CONTRACT_TERMS = {
|
|
|
11
17
|
maxSubmissionValue: 2n ** 256n,
|
|
12
18
|
};
|
|
13
19
|
|
|
14
|
-
/** @type {
|
|
20
|
+
/** @type {CoreEvalBuilder} */
|
|
15
21
|
export const defaultProposalBuilder = async (
|
|
16
22
|
{ publishRef, install },
|
|
17
23
|
options = {},
|
|
@@ -41,6 +47,12 @@ export const defaultProposalBuilder = async (
|
|
|
41
47
|
assert(OUT_BRAND_NAME);
|
|
42
48
|
}
|
|
43
49
|
|
|
50
|
+
const priceAggregator = interProtocolBundleSpecs.priceAggregator;
|
|
51
|
+
const priceAggregatorPath = await buildBundlePath(
|
|
52
|
+
import.meta.url,
|
|
53
|
+
priceAggregator,
|
|
54
|
+
);
|
|
55
|
+
|
|
44
56
|
return harden({
|
|
45
57
|
sourceSpec: '@agoric/inter-protocol/src/proposals/price-feed-proposal.js',
|
|
46
58
|
getManifestCall: [
|
|
@@ -57,10 +69,7 @@ export const defaultProposalBuilder = async (
|
|
|
57
69
|
brandInRef: brandIn && publishRef(brandIn),
|
|
58
70
|
brandOutRef: brandOut && publishRef(brandOut),
|
|
59
71
|
priceAggregatorRef: publishRef(
|
|
60
|
-
install(
|
|
61
|
-
'@agoric/inter-protocol/src/price/fluxAggregatorContract.js',
|
|
62
|
-
'../bundles/bundle-fluxAggregatorKit.js',
|
|
63
|
-
),
|
|
72
|
+
install(priceAggregator.packagePath, priceAggregatorPath),
|
|
64
73
|
),
|
|
65
74
|
},
|
|
66
75
|
],
|
|
@@ -14,9 +14,17 @@
|
|
|
14
14
|
* agoric run replace-electorate-core.js MAINNET
|
|
15
15
|
*/
|
|
16
16
|
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
17
|
+
import { governanceSourceSpecRegistry } from '@agoric/governance/source-spec-registry.js';
|
|
17
18
|
import { getManifestForReplaceAllElectorates } from '@agoric/inter-protocol/src/proposals/replaceElectorate.js';
|
|
19
|
+
import { buildBundlePath } from '../lib/build-bundle.js';
|
|
18
20
|
|
|
19
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* @import {replaceAllElectorates} from '@agoric/inter-protocol/src/proposals/replaceElectorate.js';
|
|
23
|
+
* @import {CoreEvalBuilder} from '@agoric/deploy-script-support/src/externalTypes.js';
|
|
24
|
+
* @import {DeployScriptFunction} from '@agoric/deploy-script-support/src/externalTypes.js';
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/** @typedef {Parameters<typeof replaceAllElectorates>[1]['options']} ReplaceElectorateOptions */
|
|
20
28
|
|
|
21
29
|
/** @type {Record<string, ReplaceElectorateOptions>} */
|
|
22
30
|
const configurations = {
|
|
@@ -93,7 +101,7 @@ const configurations = {
|
|
|
93
101
|
const { keys } = Object;
|
|
94
102
|
const knownVariants = keys(configurations);
|
|
95
103
|
|
|
96
|
-
/** @type {
|
|
104
|
+
/** @type {CoreEvalBuilder} */
|
|
97
105
|
export const defaultProposalBuilder = async ({ publishRef, install }, opts) => {
|
|
98
106
|
const config = opts.config || configurations[opts.variant];
|
|
99
107
|
if (!config) {
|
|
@@ -102,6 +110,11 @@ export const defaultProposalBuilder = async ({ publishRef, install }, opts) => {
|
|
|
102
110
|
throw Error(error);
|
|
103
111
|
}
|
|
104
112
|
const { committeeName, voterAddresses, highPrioritySendersConfig } = config;
|
|
113
|
+
const committee = governanceSourceSpecRegistry.committee;
|
|
114
|
+
const economicCommitteePath = await buildBundlePath(
|
|
115
|
+
import.meta.url,
|
|
116
|
+
committee,
|
|
117
|
+
);
|
|
105
118
|
console.log(
|
|
106
119
|
'Generating replace committee proposal with config',
|
|
107
120
|
JSON.stringify({
|
|
@@ -119,10 +132,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }, opts) => {
|
|
|
119
132
|
voterAddresses,
|
|
120
133
|
highPrioritySendersConfig,
|
|
121
134
|
economicCommitteeRef: publishRef(
|
|
122
|
-
install(
|
|
123
|
-
'@agoric/governance/src/committee.js',
|
|
124
|
-
'../bundles/bundle-committee.js',
|
|
125
|
-
),
|
|
135
|
+
install(committee.packagePath, economicCommitteePath),
|
|
126
136
|
),
|
|
127
137
|
},
|
|
128
138
|
],
|
|
@@ -131,7 +141,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }, opts) => {
|
|
|
131
141
|
|
|
132
142
|
const Usage = `agoric run replace-electorate-core.js ${[...knownVariants, '<json-config>'].join(' | ')}`;
|
|
133
143
|
|
|
134
|
-
/** @type {
|
|
144
|
+
/** @type {DeployScriptFunction} */
|
|
135
145
|
export default async (homeP, endowments) => {
|
|
136
146
|
const { scriptArgs } = endowments;
|
|
137
147
|
const variantOrConfig = scriptArgs?.[0];
|
|
@@ -2,6 +2,11 @@ import { parseScriptArgs, makeHelpers } from '@agoric/deploy-script-support';
|
|
|
2
2
|
import { getManifestForReplaceFeeDistributor } from '@agoric/inter-protocol/src/proposals/replace-fee-distributor.js';
|
|
3
3
|
import { SECONDS_PER_HOUR } from '@agoric/inter-protocol/src/proposals/econ-behaviors.js';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* @import {CoreEvalBuilder} from '@agoric/deploy-script-support/src/externalTypes.js';
|
|
7
|
+
* @import {DeployScriptFunction} from '@agoric/deploy-script-support/src/externalTypes.js';
|
|
8
|
+
*/
|
|
9
|
+
|
|
5
10
|
const configurations = {
|
|
6
11
|
A3P_INTEGRATION: {
|
|
7
12
|
params: {
|
|
@@ -44,7 +49,7 @@ const configurations = {
|
|
|
44
49
|
const { keys } = Object;
|
|
45
50
|
const knownVariants = keys(configurations);
|
|
46
51
|
|
|
47
|
-
/** @type {
|
|
52
|
+
/** @type {CoreEvalBuilder} */
|
|
48
53
|
export const defaultProposalBuilder = async ({ publishRef, install }, opts) => {
|
|
49
54
|
const config = opts.config || configurations[opts.variant];
|
|
50
55
|
console.log('feeDist OPTS', opts, config);
|
|
@@ -70,7 +75,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }, opts) => {
|
|
|
70
75
|
});
|
|
71
76
|
};
|
|
72
77
|
|
|
73
|
-
/** @type {
|
|
78
|
+
/** @type {DeployScriptFunction} */
|
|
74
79
|
export default async (homeP, endowments) => {
|
|
75
80
|
const name = 'replace-feeDistributor-combo';
|
|
76
81
|
const opts = parseScriptArgs(endowments, name, knownVariants);
|
|
@@ -2,7 +2,12 @@ import { makeHelpers } from '@agoric/deploy-script-support';
|
|
|
2
2
|
import { getManifestForReplaceFeeDistributor } from '@agoric/inter-protocol/src/proposals/replace-fee-distributor.js';
|
|
3
3
|
import { SECONDS_PER_HOUR } from '@agoric/inter-protocol/src/proposals/econ-behaviors.js';
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* @import {CoreEvalBuilder} from '@agoric/deploy-script-support/src/externalTypes.js';
|
|
7
|
+
* @import {DeployScriptFunction} from '@agoric/deploy-script-support/src/externalTypes.js';
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/** @type {CoreEvalBuilder} */
|
|
6
11
|
export const defaultProposalBuilder = async ({ publishRef, install }, opts) => {
|
|
7
12
|
console.log('feeDist OPTS', opts);
|
|
8
13
|
return harden({
|
|
@@ -20,7 +25,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }, opts) => {
|
|
|
20
25
|
});
|
|
21
26
|
};
|
|
22
27
|
|
|
23
|
-
/** @type {
|
|
28
|
+
/** @type {DeployScriptFunction} */
|
|
24
29
|
export default async (homeP, endowments) => {
|
|
25
30
|
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
26
31
|
|