@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/builders",
|
|
3
|
-
"version": "0.1.1-
|
|
3
|
+
"version": "0.1.1-other-dev-fbe72e7.0.fbe72e7",
|
|
4
4
|
"description": "Build scripts for proposals to an Agoric chain",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -10,48 +10,51 @@
|
|
|
10
10
|
"build:add-STARS-proposal": "echo This command has been deprecated. Please run this instead: agoric run scripts/inter-protocol/add-STARS.js",
|
|
11
11
|
"build:restart-vats-proposal": "echo This command has been deprecated. Please run this instead: agoric run scripts/vats/restart-vats.js",
|
|
12
12
|
"build:zcf-proposal": "echo This command has been deprecated. Please run this instead: agoric run scripts/vats/replace-zoe.js",
|
|
13
|
-
"prepack": "tsc --build tsconfig.build.json",
|
|
14
|
-
"postpack": "git clean -f '*.d
|
|
13
|
+
"prepack": "yarn run -T tsc --build tsconfig.build.json",
|
|
14
|
+
"postpack": "git clean -f '*.d.*ts*' '*.tsbuildinfo'",
|
|
15
15
|
"test": "ava",
|
|
16
16
|
"test:xs": "exit 0",
|
|
17
17
|
"lint-fix": "yarn lint:eslint --fix",
|
|
18
|
-
"lint": "run-s --continue-on-error lint:*",
|
|
19
|
-
"lint:types": "tsc",
|
|
20
|
-
"lint:eslint": "eslint ."
|
|
18
|
+
"lint": "yarn run -T run-s --continue-on-error 'lint:*'",
|
|
19
|
+
"lint:types": "yarn run -T tsc",
|
|
20
|
+
"lint:eslint": "yarn run -T eslint ."
|
|
21
21
|
},
|
|
22
22
|
"keywords": [],
|
|
23
23
|
"author": "Agoric",
|
|
24
24
|
"license": "Apache-2.0",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@agoric/
|
|
27
|
-
"@agoric/
|
|
28
|
-
"@agoric/
|
|
29
|
-
"@agoric/notifier": "0.6.3-
|
|
30
|
-
"@agoric/smart-wallet": "0.5.4-
|
|
31
|
-
"@agoric/vat-data": "0.5.3-
|
|
32
|
-
"@agoric/vats": "0.15.2-
|
|
33
|
-
"@agoric/zoe": "0.26.3-
|
|
34
|
-
"@endo/bundle-source": "^
|
|
35
|
-
"@endo/captp": "^4.
|
|
36
|
-
"@endo/eventual-send": "^1.
|
|
37
|
-
"@endo/far": "^1.
|
|
38
|
-
"@endo/init": "^1.
|
|
39
|
-
"@endo/marshal": "^1.
|
|
40
|
-
"@endo/
|
|
41
|
-
"@endo/
|
|
42
|
-
"
|
|
26
|
+
"@agoric/client-utils": "0.1.1-other-dev-fbe72e7.0.fbe72e7",
|
|
27
|
+
"@agoric/ertp": "0.16.3-other-dev-fbe72e7.0.fbe72e7",
|
|
28
|
+
"@agoric/internal": "0.3.3-other-dev-fbe72e7.0.fbe72e7",
|
|
29
|
+
"@agoric/notifier": "0.6.3-other-dev-fbe72e7.0.fbe72e7",
|
|
30
|
+
"@agoric/smart-wallet": "0.5.4-other-dev-fbe72e7.0.fbe72e7",
|
|
31
|
+
"@agoric/vat-data": "0.5.3-other-dev-fbe72e7.0.fbe72e7",
|
|
32
|
+
"@agoric/vats": "0.15.2-other-dev-fbe72e7.0.fbe72e7",
|
|
33
|
+
"@agoric/zoe": "0.26.3-other-dev-fbe72e7.0.fbe72e7",
|
|
34
|
+
"@endo/bundle-source": "^4.1.2",
|
|
35
|
+
"@endo/captp": "^4.4.8",
|
|
36
|
+
"@endo/eventual-send": "^1.3.4",
|
|
37
|
+
"@endo/far": "^1.1.14",
|
|
38
|
+
"@endo/init": "^1.1.12",
|
|
39
|
+
"@endo/marshal": "^1.8.0",
|
|
40
|
+
"@endo/nat": "^5.1.3",
|
|
41
|
+
"@endo/patterns": "^1.7.0",
|
|
42
|
+
"@endo/promise-kit": "^1.1.13",
|
|
43
|
+
"@endo/stream": "^1.2.13",
|
|
44
|
+
"import-meta-resolve": "^4.1.0"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|
|
45
|
-
"@agoric/
|
|
46
|
-
"@agoric/
|
|
47
|
-
"@agoric/
|
|
48
|
-
"@agoric/
|
|
49
|
-
"@agoric/store": "0.9.3-
|
|
50
|
-
"@agoric/swing-store": "0.9.2-
|
|
51
|
-
"@agoric/swingset-liveslots": "0.10.3-
|
|
52
|
-
"@agoric/time": "0.3.3-
|
|
47
|
+
"@agoric/deploy-script-support": "0.10.4-other-dev-fbe72e7.0.fbe72e7",
|
|
48
|
+
"@agoric/governance": "0.10.4-other-dev-fbe72e7.0.fbe72e7",
|
|
49
|
+
"@agoric/inter-protocol": "0.16.2-other-dev-fbe72e7.0.fbe72e7",
|
|
50
|
+
"@agoric/orchestration": "0.1.1-other-dev-fbe72e7.0.fbe72e7",
|
|
51
|
+
"@agoric/store": "0.9.3-other-dev-fbe72e7.0.fbe72e7",
|
|
52
|
+
"@agoric/swing-store": "0.9.2-other-dev-fbe72e7.0.fbe72e7",
|
|
53
|
+
"@agoric/swingset-liveslots": "0.10.3-other-dev-fbe72e7.0.fbe72e7",
|
|
54
|
+
"@agoric/time": "0.3.3-other-dev-fbe72e7.0.fbe72e7",
|
|
55
|
+
"@endo/errors": "^1.2.13",
|
|
53
56
|
"ava": "^5.3.0",
|
|
54
|
-
"c8": "^
|
|
57
|
+
"c8": "^10.1.3"
|
|
55
58
|
},
|
|
56
59
|
"files": [
|
|
57
60
|
"CHANGELOG.md",
|
|
@@ -66,11 +69,11 @@
|
|
|
66
69
|
"access": "public"
|
|
67
70
|
},
|
|
68
71
|
"engines": {
|
|
69
|
-
"node": "
|
|
72
|
+
"node": "^20.9 || ^22.11"
|
|
70
73
|
},
|
|
71
74
|
"ava": {
|
|
72
75
|
"files": [
|
|
73
|
-
"test
|
|
76
|
+
"test/**/*.test.*"
|
|
74
77
|
],
|
|
75
78
|
"require": [
|
|
76
79
|
"@endo/init/debug.js"
|
|
@@ -79,7 +82,7 @@
|
|
|
79
82
|
"workerThreads": false
|
|
80
83
|
},
|
|
81
84
|
"typeCoverage": {
|
|
82
|
-
"atLeast":
|
|
85
|
+
"atLeast": 89.94
|
|
83
86
|
},
|
|
84
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "fbe72e72107f9997f788674e668c660d92ec4492"
|
|
85
88
|
}
|
|
@@ -2,8 +2,8 @@ import { makeHelpers } from '@agoric/deploy-script-support';
|
|
|
2
2
|
import { defaultProposalBuilder as vaultProposalBuilder } from './add-collateral-core.js';
|
|
3
3
|
import { defaultProposalBuilder as oraclesProposalBuilder } from './price-feed-core.js';
|
|
4
4
|
|
|
5
|
-
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').
|
|
6
|
-
|
|
5
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
6
|
+
const starsVaultProposalBuilder = async powers => {
|
|
7
7
|
return vaultProposalBuilder(powers, {
|
|
8
8
|
interchainAssetOptions: {
|
|
9
9
|
// Values for the Stargaze token on Osmosis
|
|
@@ -17,8 +17,8 @@ export const starsVaultProposalBuilder = async powers => {
|
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').
|
|
21
|
-
|
|
20
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
21
|
+
const starsOraclesProposalBuilder = async powers => {
|
|
22
22
|
return oraclesProposalBuilder(powers, {
|
|
23
23
|
AGORIC_INSTANCE_NAME: `STARS-USD price feed`,
|
|
24
24
|
IN_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'STARS'],
|
|
@@ -36,8 +36,9 @@ export const starsOraclesProposalBuilder = async powers => {
|
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
39
40
|
export default async (homeP, endowments) => {
|
|
40
|
-
const {
|
|
41
|
-
await
|
|
42
|
-
await
|
|
41
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
42
|
+
await writeCoreEval('add-STARS', starsVaultProposalBuilder);
|
|
43
|
+
await writeCoreEval('add-STARS-oracles', starsOraclesProposalBuilder);
|
|
43
44
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* eslint-env node */
|
|
2
2
|
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
3
3
|
|
|
4
4
|
import { getManifestForAddAssetToVault } from '@agoric/inter-protocol/src/proposals/addAssetToVault.js';
|
|
5
5
|
import { getManifestForPsm } from '@agoric/inter-protocol/src/proposals/startPSM.js';
|
|
6
6
|
import { makeInstallCache } from '@agoric/inter-protocol/src/proposals/utils.js';
|
|
7
7
|
|
|
8
|
-
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').
|
|
8
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
9
9
|
export const defaultProposalBuilder = async (
|
|
10
10
|
{ publishRef, install: install0, wrapInstall },
|
|
11
11
|
{
|
|
@@ -62,7 +62,7 @@ export const defaultProposalBuilder = async (
|
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').
|
|
65
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
66
66
|
export const psmProposalBuilder = async (
|
|
67
67
|
{ publishRef, install: install0, wrapInstall },
|
|
68
68
|
{ anchorOptions = /** @type {object} */ ({}) } = {},
|
|
@@ -103,16 +103,20 @@ export const psmProposalBuilder = async (
|
|
|
103
103
|
});
|
|
104
104
|
};
|
|
105
105
|
|
|
106
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
106
107
|
export default async (homeP, endowments) => {
|
|
107
|
-
const {
|
|
108
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
108
109
|
|
|
109
110
|
const tool = await makeInstallCache(homeP, {
|
|
110
111
|
loadBundle: spec => import(spec),
|
|
111
112
|
});
|
|
112
113
|
|
|
113
|
-
await
|
|
114
|
-
await
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
await writeCoreEval('gov-add-collateral', defaultProposalBuilder);
|
|
115
|
+
await writeCoreEval('gov-start-psm', opts =>
|
|
116
|
+
psmProposalBuilder({
|
|
117
|
+
...opts,
|
|
118
|
+
// @ts-expect-error XXX makeInstallCache types
|
|
119
|
+
wrapInstall: tool.wrapInstall,
|
|
120
|
+
}),
|
|
117
121
|
);
|
|
118
122
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* eslint-env node */
|
|
2
2
|
/**
|
|
3
3
|
* @file can be run with `agoric deploy` after a chain is running (depends on
|
|
4
4
|
* chain state) Only works with "local" chain and not sim-chain b/c it needs
|
|
@@ -125,7 +125,7 @@ export const mainProposalBuilder = async ({
|
|
|
125
125
|
};
|
|
126
126
|
|
|
127
127
|
// Build proposal for sim-chain etc.
|
|
128
|
-
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').
|
|
128
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
129
129
|
export const defaultProposalBuilder = async (
|
|
130
130
|
{ publishRef, install },
|
|
131
131
|
options = {},
|
|
@@ -184,18 +184,19 @@ export const defaultProposalBuilder = async (
|
|
|
184
184
|
});
|
|
185
185
|
};
|
|
186
186
|
|
|
187
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
187
188
|
export default async (homeP, endowments) => {
|
|
188
|
-
const {
|
|
189
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
189
190
|
|
|
190
191
|
const tool = await makeInstallCache(homeP, {
|
|
191
192
|
loadBundle: spec => import(spec),
|
|
192
193
|
});
|
|
193
194
|
await Promise.all([
|
|
194
|
-
|
|
195
|
+
writeCoreEval('gov-econ-committee', opts =>
|
|
195
196
|
// @ts-expect-error XXX makeInstallCache types
|
|
196
197
|
committeeProposalBuilder({ ...opts, wrapInstall: tool.wrapInstall }),
|
|
197
198
|
),
|
|
198
|
-
|
|
199
|
+
writeCoreEval('gov-amm-vaults-etc', opts =>
|
|
199
200
|
// @ts-expect-error XXX makeInstallCache types
|
|
200
201
|
mainProposalBuilder({ ...opts, wrapInstall: tool.wrapInstall }),
|
|
201
202
|
),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* eslint-env node */
|
|
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
5
|
|
|
6
6
|
// Build proposal for sim-chain etc.
|
|
7
|
-
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').
|
|
7
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
8
8
|
export const defaultProposalBuilder = async (
|
|
9
9
|
{ publishRef, install },
|
|
10
10
|
options = {},
|
|
@@ -36,7 +36,8 @@ export const defaultProposalBuilder = async (
|
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
39
40
|
export default async (homeP, endowments) => {
|
|
40
|
-
const {
|
|
41
|
-
await
|
|
41
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
42
|
+
await writeCoreEval('gov-invite-committee', defaultProposalBuilder);
|
|
42
43
|
};
|
|
@@ -48,6 +48,7 @@ export default async function priceAuthorityFromNotifier(
|
|
|
48
48
|
|
|
49
49
|
if (!aggregatorInstance) {
|
|
50
50
|
console.log('Autodetecting aggregator instance...');
|
|
51
|
+
// @ts-expect-error inspecific Home type
|
|
51
52
|
const purse = E(home.wallet).getPurse('Default Zoe invite purse');
|
|
52
53
|
const { value } = await E(purse).getCurrentAmount();
|
|
53
54
|
const invitations = value.filter(
|
|
@@ -81,6 +82,7 @@ export default async function priceAuthorityFromNotifier(
|
|
|
81
82
|
};
|
|
82
83
|
|
|
83
84
|
console.log('Getting wallet bridge...');
|
|
85
|
+
// @ts-expect-error inspecific Home type
|
|
84
86
|
const bridge = await E(home.wallet).getBridge();
|
|
85
87
|
|
|
86
88
|
// Consume an aggregator invitation for this instance.
|
|
@@ -94,6 +96,7 @@ export default async function priceAuthorityFromNotifier(
|
|
|
94
96
|
() => {},
|
|
95
97
|
);
|
|
96
98
|
|
|
99
|
+
// @ts-expect-error inspecific Home type
|
|
97
100
|
const walletAdmin = E(home.wallet).getAdminFacet();
|
|
98
101
|
|
|
99
102
|
console.log('=====================================================');
|
|
@@ -111,6 +114,7 @@ export default async function priceAuthorityFromNotifier(
|
|
|
111
114
|
const orKey = `offerResult ${id}`;
|
|
112
115
|
await E(home.scratch).set(
|
|
113
116
|
orKey,
|
|
117
|
+
// @ts-expect-error inspecific Home type
|
|
114
118
|
E(home.wallet).lookup('offerResult', id),
|
|
115
119
|
);
|
|
116
120
|
console.log(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* eslint-env node */
|
|
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,
|
|
@@ -11,7 +11,7 @@ const DEFAULT_CONTRACT_TERMS = {
|
|
|
11
11
|
maxSubmissionValue: 2n ** 256n,
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').
|
|
14
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
15
15
|
export const defaultProposalBuilder = async (
|
|
16
16
|
{ publishRef, install },
|
|
17
17
|
options = {},
|
|
@@ -84,7 +84,7 @@ export const createGov = async (homeP, endowments) => {
|
|
|
84
84
|
|
|
85
85
|
const oracleAddresses = ORACLE_ADDRESSES.split(',');
|
|
86
86
|
|
|
87
|
-
const {
|
|
87
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
88
88
|
|
|
89
89
|
const inLookup = JSON.parse(IN_BRAND_LOOKUP);
|
|
90
90
|
const outLookup = JSON.parse(OUT_BRAND_LOOKUP);
|
|
@@ -98,7 +98,7 @@ export const createGov = async (homeP, endowments) => {
|
|
|
98
98
|
brandIn: lookup(inLookup).catch(() => undefined),
|
|
99
99
|
brandOut: lookup(outLookup).catch(() => undefined),
|
|
100
100
|
});
|
|
101
|
-
await
|
|
101
|
+
await writeCoreEval('gov-price-feed', proposalBuilder); // gov-price-feed.js gov-price-feed-permit.json
|
|
102
102
|
};
|
|
103
103
|
|
|
104
104
|
export default createGov;
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file build core eval script to replace EC committee and charter
|
|
3
|
+
* Usage:
|
|
4
|
+
* To run this script, use the following command format in the CLI:
|
|
5
|
+
* agoric run replace-electorate-core.js [ENVIRONMENT]
|
|
6
|
+
* where [ENVIRONMENT] is one of the following:
|
|
7
|
+
* - MAINNET
|
|
8
|
+
* - DEVNET
|
|
9
|
+
* - EMERYNET
|
|
10
|
+
* - A3P_INTEGRATION
|
|
11
|
+
* - BOOTSTRAP_TEST
|
|
12
|
+
*
|
|
13
|
+
* Example:
|
|
14
|
+
* agoric run replace-electorate-core.js MAINNET
|
|
15
|
+
*/
|
|
16
|
+
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
17
|
+
import { getManifestForReplaceAllElectorates } from '@agoric/inter-protocol/src/proposals/replaceElectorate.js';
|
|
18
|
+
|
|
19
|
+
/** @typedef {Parameters<typeof import('@agoric/inter-protocol/src/proposals/replaceElectorate.js').replaceAllElectorates>[1]['options']} ReplaceElectorateOptions */
|
|
20
|
+
|
|
21
|
+
/** @type {Record<string, ReplaceElectorateOptions>} */
|
|
22
|
+
const configurations = {
|
|
23
|
+
MAINNET: {
|
|
24
|
+
committeeName: 'Economic Committee',
|
|
25
|
+
voterAddresses: {
|
|
26
|
+
'Chloe White': 'agoric1d4228cvelf8tj65f4h7n2td90sscavln2283h5',
|
|
27
|
+
'Chris Berg': 'agoric13p9adwk0na5npfq64g22l6xucvqdmu3xqe70wq',
|
|
28
|
+
'Joe Clark': 'agoric1zayxg4e9vd0es9c9jlpt36qtth255txjp6a8yc',
|
|
29
|
+
},
|
|
30
|
+
highPrioritySendersConfig: {
|
|
31
|
+
addressesToAdd: [],
|
|
32
|
+
addressesToRemove: [
|
|
33
|
+
'agoric1gx9uu7y6c90rqruhesae2t7c2vlw4uyyxlqxrx',
|
|
34
|
+
'agoric14543m33dr28x7qhwc558hzlj9szwhzwzpcmw6a',
|
|
35
|
+
'agoric1el6zqs8ggctj5vwyukyk4fh50wcpdpwgugd5l5',
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
DEVNET: {
|
|
40
|
+
committeeName: 'Economic Committee',
|
|
41
|
+
voterAddresses: {
|
|
42
|
+
gov1: 'agoric1ldmtatp24qlllgxmrsjzcpe20fvlkp448zcuce',
|
|
43
|
+
gov2: 'agoric140dmkrz2e42ergjj7gyvejhzmjzurvqeq82ang',
|
|
44
|
+
gov4: 'agoric1f0h5zgxyg3euxsqzs0506uj4cmu56y30pqx46s',
|
|
45
|
+
},
|
|
46
|
+
highPrioritySendersConfig: {
|
|
47
|
+
addressesToAdd: ['agoric1f0h5zgxyg3euxsqzs0506uj4cmu56y30pqx46s'],
|
|
48
|
+
addressesToRemove: ['agoric1w8wktaur4zf8qmmtn3n7x3r0jhsjkjntcm3u6h'],
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
EMERYNET: {
|
|
52
|
+
committeeName: 'Economic Committee',
|
|
53
|
+
voterAddresses: {
|
|
54
|
+
gov1: 'agoric1ldmtatp24qlllgxmrsjzcpe20fvlkp448zcuce',
|
|
55
|
+
gov2: 'agoric140dmkrz2e42ergjj7gyvejhzmjzurvqeq82ang',
|
|
56
|
+
gov4: 'agoric1f0h5zgxyg3euxsqzs0506uj4cmu56y30pqx46s',
|
|
57
|
+
},
|
|
58
|
+
highPrioritySendersConfig: {
|
|
59
|
+
addressesToAdd: ['agoric1f0h5zgxyg3euxsqzs0506uj4cmu56y30pqx46s'],
|
|
60
|
+
addressesToRemove: ['agoric1w8wktaur4zf8qmmtn3n7x3r0jhsjkjntcm3u6h'],
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
A3P_INTEGRATION: {
|
|
64
|
+
committeeName: 'Economic Committee',
|
|
65
|
+
voterAddresses: {
|
|
66
|
+
gov1: 'agoric1ee9hr0jyrxhy999y755mp862ljgycmwyp4pl7q',
|
|
67
|
+
gov2: 'agoric1wrfh296eu2z34p6pah7q04jjuyj3mxu9v98277',
|
|
68
|
+
gov4: 'agoric1c9gyu460lu70rtcdp95vummd6032psmpdx7wdy',
|
|
69
|
+
},
|
|
70
|
+
highPrioritySendersConfig: {
|
|
71
|
+
addressesToAdd: ['agoric1c9gyu460lu70rtcdp95vummd6032psmpdx7wdy'],
|
|
72
|
+
addressesToRemove: ['agoric1ydzxwh6f893jvpaslmaz6l8j2ulup9a7x8qvvq'],
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
BOOTSTRAP_TEST: {
|
|
76
|
+
committeeName: 'Economic Committee',
|
|
77
|
+
voterAddresses: {
|
|
78
|
+
gov1: 'agoric1gx9uu7y6c90rqruhesae2t7c2vlw4uyyxlqxrx',
|
|
79
|
+
gov2: 'agoric1d4228cvelf8tj65f4h7n2td90sscavln2283h5',
|
|
80
|
+
gov3: 'agoric14543m33dr28x7qhwc558hzlj9szwhzwzpcmw6a',
|
|
81
|
+
},
|
|
82
|
+
highPrioritySendersConfig: {
|
|
83
|
+
addressesToAdd: [],
|
|
84
|
+
addressesToRemove: [
|
|
85
|
+
'agoric13p9adwk0na5npfq64g22l6xucvqdmu3xqe70wq',
|
|
86
|
+
'agoric1el6zqs8ggctj5vwyukyk4fh50wcpdpwgugd5l5',
|
|
87
|
+
'agoric1zayxg4e9vd0es9c9jlpt36qtth255txjp6a8yc',
|
|
88
|
+
],
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const { keys } = Object;
|
|
94
|
+
const knownVariants = keys(configurations);
|
|
95
|
+
|
|
96
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
97
|
+
export const defaultProposalBuilder = async ({ publishRef, install }, opts) => {
|
|
98
|
+
const config = opts.config || configurations[opts.variant];
|
|
99
|
+
if (!config) {
|
|
100
|
+
const error = `Unknown variant "${opts.variant}". Expected one of ${knownVariants.join(', ')}`;
|
|
101
|
+
console.error(error);
|
|
102
|
+
throw Error(error);
|
|
103
|
+
}
|
|
104
|
+
const { committeeName, voterAddresses, highPrioritySendersConfig } = config;
|
|
105
|
+
console.log(
|
|
106
|
+
'Generating replace committee proposal with config',
|
|
107
|
+
JSON.stringify({
|
|
108
|
+
committeeName,
|
|
109
|
+
voterAddresses,
|
|
110
|
+
highPrioritySendersConfig,
|
|
111
|
+
}),
|
|
112
|
+
);
|
|
113
|
+
return harden({
|
|
114
|
+
sourceSpec: '@agoric/inter-protocol/src/proposals/replaceElectorate.js',
|
|
115
|
+
getManifestCall: [
|
|
116
|
+
getManifestForReplaceAllElectorates.name,
|
|
117
|
+
{
|
|
118
|
+
committeeName,
|
|
119
|
+
voterAddresses,
|
|
120
|
+
highPrioritySendersConfig,
|
|
121
|
+
economicCommitteeRef: publishRef(
|
|
122
|
+
install(
|
|
123
|
+
'@agoric/governance/src/committee.js',
|
|
124
|
+
'../bundles/bundle-committee.js',
|
|
125
|
+
),
|
|
126
|
+
),
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
const Usage = `agoric run replace-electorate-core.js ${[...knownVariants, '<json-config>'].join(' | ')}`;
|
|
133
|
+
|
|
134
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
135
|
+
export default async (homeP, endowments) => {
|
|
136
|
+
const { scriptArgs } = endowments;
|
|
137
|
+
const variantOrConfig = scriptArgs?.[0];
|
|
138
|
+
console.log('replace-electorate-core.js', variantOrConfig);
|
|
139
|
+
|
|
140
|
+
const opts = {};
|
|
141
|
+
|
|
142
|
+
if (typeof variantOrConfig === 'string') {
|
|
143
|
+
if (variantOrConfig[0] === '{') {
|
|
144
|
+
try {
|
|
145
|
+
opts.config = JSON.parse(variantOrConfig);
|
|
146
|
+
} catch (err) {
|
|
147
|
+
throw Error(`Failed to parse config argument ${variantOrConfig}`);
|
|
148
|
+
}
|
|
149
|
+
} else {
|
|
150
|
+
opts.variant = variantOrConfig;
|
|
151
|
+
}
|
|
152
|
+
} else {
|
|
153
|
+
console.error(Usage);
|
|
154
|
+
throw Error(Usage);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
158
|
+
|
|
159
|
+
await writeCoreEval(
|
|
160
|
+
`replace-committee-${opts.variant || 'from-config'}`,
|
|
161
|
+
utils => defaultProposalBuilder(utils, opts),
|
|
162
|
+
);
|
|
163
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { parseScriptArgs, makeHelpers } from '@agoric/deploy-script-support';
|
|
2
|
+
import { getManifestForReplaceFeeDistributor } from '@agoric/inter-protocol/src/proposals/replace-fee-distributor.js';
|
|
3
|
+
import { SECONDS_PER_HOUR } from '@agoric/inter-protocol/src/proposals/econ-behaviors.js';
|
|
4
|
+
|
|
5
|
+
const configurations = {
|
|
6
|
+
A3P_INTEGRATION: {
|
|
7
|
+
params: {
|
|
8
|
+
collectionInterval: 30n,
|
|
9
|
+
keywordShares: {
|
|
10
|
+
RewardDistributor: 0n,
|
|
11
|
+
Reserve: 1n,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
MAINNET: {
|
|
16
|
+
params: {
|
|
17
|
+
collectionInterval: 1n * SECONDS_PER_HOUR,
|
|
18
|
+
keywordShares: {
|
|
19
|
+
RewardDistributor: 0n,
|
|
20
|
+
Reserve: 1n,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
DEVNET: {
|
|
25
|
+
params: {
|
|
26
|
+
collectionInterval: 1n * SECONDS_PER_HOUR,
|
|
27
|
+
keywordShares: {
|
|
28
|
+
RewardDistributor: 0n,
|
|
29
|
+
Reserve: 1n,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
EMERYNET: {
|
|
34
|
+
params: {
|
|
35
|
+
collectionInterval: 1n * SECONDS_PER_HOUR,
|
|
36
|
+
keywordShares: {
|
|
37
|
+
RewardDistributor: 0n,
|
|
38
|
+
Reserve: 1n,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const { keys } = Object;
|
|
45
|
+
const knownVariants = keys(configurations);
|
|
46
|
+
|
|
47
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
48
|
+
export const defaultProposalBuilder = async ({ publishRef, install }, opts) => {
|
|
49
|
+
const config = opts.config || configurations[opts.variant];
|
|
50
|
+
console.log('feeDist OPTS', opts, config);
|
|
51
|
+
if (!config) {
|
|
52
|
+
const error = `Unknown variant "${opts.variant}". Expected one of ${knownVariants.join(', ')}`;
|
|
53
|
+
console.error(error);
|
|
54
|
+
throw Error(error);
|
|
55
|
+
}
|
|
56
|
+
const { params } = config;
|
|
57
|
+
|
|
58
|
+
return harden({
|
|
59
|
+
sourceSpec:
|
|
60
|
+
'@agoric/inter-protocol/src/proposals/replace-fee-distributor.js',
|
|
61
|
+
getManifestCall: [
|
|
62
|
+
getManifestForReplaceFeeDistributor.name,
|
|
63
|
+
{
|
|
64
|
+
feeDistributorRef: publishRef(
|
|
65
|
+
install('@agoric/inter-protocol/src/feeDistributor.js'),
|
|
66
|
+
),
|
|
67
|
+
...params,
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
74
|
+
export default async (homeP, endowments) => {
|
|
75
|
+
const name = 'replace-feeDistributor-combo';
|
|
76
|
+
const opts = parseScriptArgs(endowments, name, knownVariants);
|
|
77
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
78
|
+
|
|
79
|
+
await writeCoreEval('replace-feeDistributor', utils =>
|
|
80
|
+
defaultProposalBuilder(utils, opts),
|
|
81
|
+
);
|
|
82
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
2
|
+
import { getManifestForReplaceFeeDistributor } from '@agoric/inter-protocol/src/proposals/replace-fee-distributor.js';
|
|
3
|
+
import { SECONDS_PER_HOUR } from '@agoric/inter-protocol/src/proposals/econ-behaviors.js';
|
|
4
|
+
|
|
5
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
6
|
+
export const defaultProposalBuilder = async ({ publishRef, install }, opts) => {
|
|
7
|
+
console.log('feeDist OPTS', opts);
|
|
8
|
+
return harden({
|
|
9
|
+
sourceSpec:
|
|
10
|
+
'@agoric/inter-protocol/src/proposals/replace-fee-distributor.js',
|
|
11
|
+
getManifestCall: [
|
|
12
|
+
getManifestForReplaceFeeDistributor.name,
|
|
13
|
+
{
|
|
14
|
+
feeDistributorRef: publishRef(
|
|
15
|
+
install('@agoric/inter-protocol/src/feeDistributor.js'),
|
|
16
|
+
),
|
|
17
|
+
...opts,
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
24
|
+
export default async (homeP, endowments) => {
|
|
25
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
26
|
+
|
|
27
|
+
await writeCoreEval('replace-feeDistributor', utils =>
|
|
28
|
+
defaultProposalBuilder(utils, {
|
|
29
|
+
collectionInterval: 1n * SECONDS_PER_HOUR,
|
|
30
|
+
keywordShares: {
|
|
31
|
+
RewardDistributor: 0n,
|
|
32
|
+
Reserve: 1n,
|
|
33
|
+
},
|
|
34
|
+
}),
|
|
35
|
+
);
|
|
36
|
+
};
|