@agoric/builders 0.1.1-other-dev-3eb1a1d.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 +38 -37
- package/scripts/inter-protocol/replace-feeDistributor-combo.js +82 -0
- package/scripts/inter-protocol/replace-feeDistributor.js +12 -4
- package/scripts/inter-protocol/updatePriceFeeds.js +11 -1
- 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 +11 -2
- package/scripts/orchestration/init-stakeAtom.js +11 -2
- package/scripts/orchestration/init-stakeOsmo.js +11 -2
- 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 +4 -2
- 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 +7 -1
- package/scripts/testing/restart-axelar-gmp.js +94 -0
- package/scripts/testing/start-query-flows.js +43 -23
- package/scripts/testing/test-upgraded-board.js +15 -0
- package/scripts/testing/tweak-chain-info.js +7 -2
- package/scripts/testing/{fix-buggy-sendAnywhere.js → upgrade-send-anywhere.js} +14 -18
- package/scripts/testing/upgrade-vaultFactory.js +21 -0
- package/scripts/vats/upgrade-agoricNames.js +21 -0
- package/scripts/vats/upgrade-asset-reserve.js +21 -0
- package/scripts/vats/upgrade-bank.js +2 -2
- 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-psm.js +19 -0
- package/scripts/vats/upgrade-vats.js +49 -0
- package/index.js +0 -0
- package/scripts/fast-usdc/init-fast-usdc.js +0 -242
- package/scripts/testing/start-auto-stake-it.js +0 -128
- package/scripts/testing/start-buggy-sendAnywhere.js +0 -143
- package/scripts/testing/start-send-anywhere.js +0 -136
- package/scripts/vats/upgrade-orch-core.js +0 -24
|
@@ -0,0 +1,94 @@
|
|
|
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 } from '@endo/far';
|
|
11
|
+
|
|
12
|
+
/// <reference types="@agoric/vats/src/core/types-ambient"/>
|
|
13
|
+
|
|
14
|
+
const trace = makeTracer('StartAxelarGmp', true);
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @import {start as StartFn} from '@agoric/orchestration/src/examples/axelar-gmp.contract.js';
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @param {BootstrapPowers} powers
|
|
22
|
+
*/
|
|
23
|
+
export const restartAxelarGmp = async ({
|
|
24
|
+
consume: {
|
|
25
|
+
agoricNames,
|
|
26
|
+
board,
|
|
27
|
+
chainStorage,
|
|
28
|
+
chainTimerService,
|
|
29
|
+
cosmosInterchainService,
|
|
30
|
+
localchain,
|
|
31
|
+
contractKits,
|
|
32
|
+
},
|
|
33
|
+
instance: instances,
|
|
34
|
+
}) => {
|
|
35
|
+
trace(restartAxelarGmp.name);
|
|
36
|
+
|
|
37
|
+
const marshaller = await E(board).getReadonlyMarshaller();
|
|
38
|
+
const privateArgs = await deeplyFulfilledObject(
|
|
39
|
+
harden({
|
|
40
|
+
agoricNames,
|
|
41
|
+
localchain,
|
|
42
|
+
marshaller,
|
|
43
|
+
orchestrationService: cosmosInterchainService,
|
|
44
|
+
storageNode: E(NonNullish(await chainStorage)).makeChildNode('axelarGmp'),
|
|
45
|
+
timerService: chainTimerService,
|
|
46
|
+
}),
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
// @ts-expect-error unknown instance
|
|
50
|
+
const instance = await instances.consume.axelarGmp;
|
|
51
|
+
trace('instance', instance);
|
|
52
|
+
/** @type {StartedInstanceKit<StartFn>} */
|
|
53
|
+
const kit = /** @type {any} */ (await E(contractKits).get(instance));
|
|
54
|
+
|
|
55
|
+
await E(kit.adminFacet).restartContract(privateArgs);
|
|
56
|
+
trace('done');
|
|
57
|
+
};
|
|
58
|
+
harden(restartAxelarGmp);
|
|
59
|
+
|
|
60
|
+
export const getManifest = () => {
|
|
61
|
+
return {
|
|
62
|
+
manifest: {
|
|
63
|
+
[restartAxelarGmp.name]: {
|
|
64
|
+
consume: {
|
|
65
|
+
agoricNames: true,
|
|
66
|
+
board: true,
|
|
67
|
+
chainTimerService: true,
|
|
68
|
+
chainStorage: true,
|
|
69
|
+
cosmosInterchainService: true,
|
|
70
|
+
localchain: true,
|
|
71
|
+
contractKits: true,
|
|
72
|
+
},
|
|
73
|
+
instance: {
|
|
74
|
+
consume: { axelarGmp: true },
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
82
|
+
export const defaultProposalBuilder = async () =>
|
|
83
|
+
harden({
|
|
84
|
+
sourceSpec: '@agoric/builders/scripts/testing/restart-axelar-gmp.js',
|
|
85
|
+
getManifestCall: [getManifest.name],
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
89
|
+
export default async (homeP, endowments) => {
|
|
90
|
+
const dspModule = await import('@agoric/deploy-script-support');
|
|
91
|
+
const { makeHelpers } = dspModule;
|
|
92
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
93
|
+
await writeCoreEval(restartAxelarGmp.name, defaultProposalBuilder);
|
|
94
|
+
};
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
import { deeplyFulfilledObject, makeTracer } from '@agoric/internal';
|
|
8
8
|
import { makeStorageNodeChild } from '@agoric/internal/src/lib-chainStorage.js';
|
|
9
9
|
import { E } from '@endo/far';
|
|
10
|
+
import { parseChainHubOpts } from '../orchestration/helpers.js';
|
|
10
11
|
|
|
11
12
|
/**
|
|
13
|
+
* @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration';
|
|
12
14
|
* @import {QueryFlowsSF as StartFn} from '@agoric/orchestration/src/fixtures/query-flows.contract.js';
|
|
13
15
|
*/
|
|
14
16
|
|
|
@@ -28,25 +30,34 @@ const trace = makeTracer(contractName, true);
|
|
|
28
30
|
* };
|
|
29
31
|
* };
|
|
30
32
|
* }} powers
|
|
33
|
+
* @param {{
|
|
34
|
+
* options: {
|
|
35
|
+
* chainInfo: Record<string, CosmosChainInfo>;
|
|
36
|
+
* assetInfo: [Denom, DenomDetail & { brandKey?: string }][];
|
|
37
|
+
* };
|
|
38
|
+
* }} config
|
|
31
39
|
*/
|
|
32
|
-
export const startQueryFlows = async (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
export const startQueryFlows = async (
|
|
41
|
+
{
|
|
42
|
+
consume: {
|
|
43
|
+
agoricNames,
|
|
44
|
+
board,
|
|
45
|
+
chainStorage,
|
|
46
|
+
chainTimerService,
|
|
47
|
+
cosmosInterchainService,
|
|
48
|
+
localchain,
|
|
49
|
+
startUpgradable,
|
|
50
|
+
},
|
|
51
|
+
installation: {
|
|
52
|
+
consume: { [contractName]: installation },
|
|
53
|
+
},
|
|
54
|
+
instance: {
|
|
55
|
+
// @ts-expect-error unknown instance
|
|
56
|
+
produce: { [contractName]: produceInstance },
|
|
57
|
+
},
|
|
48
58
|
},
|
|
49
|
-
|
|
59
|
+
{ options: { chainInfo, assetInfo } },
|
|
60
|
+
) => {
|
|
50
61
|
trace(`start ${contractName}`);
|
|
51
62
|
|
|
52
63
|
const storageNode = await makeStorageNodeChild(chainStorage, contractName);
|
|
@@ -60,6 +71,8 @@ export const startQueryFlows = async ({
|
|
|
60
71
|
privateArgs: await deeplyFulfilledObject(
|
|
61
72
|
harden({
|
|
62
73
|
agoricNames,
|
|
74
|
+
assetInfo,
|
|
75
|
+
chainInfo,
|
|
63
76
|
orchestrationService: cosmosInterchainService,
|
|
64
77
|
localchain,
|
|
65
78
|
storageNode,
|
|
@@ -76,7 +89,7 @@ harden(startQueryFlows);
|
|
|
76
89
|
|
|
77
90
|
export const getManifestForContract = (
|
|
78
91
|
{ restoreRef },
|
|
79
|
-
{ installKeys,
|
|
92
|
+
{ installKeys, options },
|
|
80
93
|
) => {
|
|
81
94
|
return {
|
|
82
95
|
manifest: {
|
|
@@ -106,7 +119,10 @@ export const getManifestForContract = (
|
|
|
106
119
|
};
|
|
107
120
|
|
|
108
121
|
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
109
|
-
export const defaultProposalBuilder = async (
|
|
122
|
+
export const defaultProposalBuilder = async (
|
|
123
|
+
{ publishRef, install },
|
|
124
|
+
options,
|
|
125
|
+
) => {
|
|
110
126
|
return harden({
|
|
111
127
|
// Somewhat unorthodox, source the exports from this builder module
|
|
112
128
|
sourceSpec: '@agoric/builders/scripts/testing/start-query-flows.js',
|
|
@@ -120,6 +136,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
|
|
|
120
136
|
),
|
|
121
137
|
),
|
|
122
138
|
},
|
|
139
|
+
options,
|
|
123
140
|
},
|
|
124
141
|
],
|
|
125
142
|
});
|
|
@@ -127,9 +144,12 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
|
|
|
127
144
|
|
|
128
145
|
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
129
146
|
export default async (homeP, endowments) => {
|
|
130
|
-
// import dynamically so the
|
|
131
|
-
const
|
|
132
|
-
const {
|
|
147
|
+
// import dynamically so the modules can work in CoreEval environment
|
|
148
|
+
const { makeHelpers } = await import('@agoric/deploy-script-support');
|
|
149
|
+
const { scriptArgs } = endowments;
|
|
150
|
+
const opts = parseChainHubOpts(scriptArgs);
|
|
133
151
|
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
134
|
-
await writeCoreEval(startQueryFlows.name,
|
|
152
|
+
await writeCoreEval(startQueryFlows.name, utils =>
|
|
153
|
+
defaultProposalBuilder(utils, opts),
|
|
154
|
+
);
|
|
135
155
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
2
|
+
import { getManifestForTestUpgradedBoard } from '@agoric/vats/src/proposals/testUpgradedBoard.js';
|
|
3
|
+
|
|
4
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
5
|
+
export const defaultProposalBuilder = async () =>
|
|
6
|
+
harden({
|
|
7
|
+
sourceSpec: '@agoric/vats/src/proposals/testUpgradedBoard.js',
|
|
8
|
+
getManifestCall: [getManifestForTestUpgradedBoard.name],
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
12
|
+
export default async (homeP, endowments) => {
|
|
13
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
14
|
+
await writeCoreEval('testUpgradedBoard', defaultProposalBuilder);
|
|
15
|
+
};
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
/// <reference types="ses" />
|
|
2
2
|
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
3
3
|
|
|
4
|
-
/** @type {Record<string, import('@agoric/orchestration
|
|
4
|
+
/** @type {Record<string, import('@agoric/orchestration').ChainInfo>} */
|
|
5
5
|
const chainInfo = {
|
|
6
6
|
agoric: {
|
|
7
|
+
bech32Prefix: 'agoric',
|
|
7
8
|
chainId: 'agoric-4',
|
|
9
|
+
namespace: 'cosmos',
|
|
10
|
+
reference: 'agoric-4',
|
|
8
11
|
},
|
|
9
12
|
hot: {
|
|
10
|
-
|
|
13
|
+
bech32Prefix: 'hot',
|
|
11
14
|
chainId: 'hot-1',
|
|
12
15
|
connections: {
|
|
13
16
|
'cosmoshub-4': {
|
|
@@ -29,6 +32,8 @@ const chainInfo = {
|
|
|
29
32
|
},
|
|
30
33
|
},
|
|
31
34
|
},
|
|
35
|
+
namespace: 'cosmos',
|
|
36
|
+
reference: 'hot-1',
|
|
32
37
|
},
|
|
33
38
|
};
|
|
34
39
|
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
makeTracer,
|
|
8
8
|
NonNullish,
|
|
9
9
|
} from '@agoric/internal';
|
|
10
|
-
import { E
|
|
10
|
+
import { E } from '@endo/far';
|
|
11
11
|
|
|
12
12
|
/// <reference types="@agoric/vats/src/core/types-ambient"/>
|
|
13
13
|
/**
|
|
14
14
|
* @import {Installation, Instance} from '@agoric/zoe/src/zoeService/utils.js';
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
const trace = makeTracer('
|
|
17
|
+
const trace = makeTracer('UpgradeSA', true);
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* @import {start as StartFn} from '@agoric/orchestration/src/examples/send-anywhere.contract.js';
|
|
@@ -30,7 +30,7 @@ const trace = makeTracer('FixBuggySA', true);
|
|
|
30
30
|
* }} powers
|
|
31
31
|
* @param {...any} rest
|
|
32
32
|
*/
|
|
33
|
-
export const
|
|
33
|
+
export const upgradeSendAnywhere = async (
|
|
34
34
|
{
|
|
35
35
|
consume: {
|
|
36
36
|
agoricNames,
|
|
@@ -45,7 +45,7 @@ export const fixSendAnywhere = async (
|
|
|
45
45
|
},
|
|
46
46
|
{ options: { sendAnywhereRef } },
|
|
47
47
|
) => {
|
|
48
|
-
trace(
|
|
48
|
+
trace(upgradeSendAnywhere.name);
|
|
49
49
|
|
|
50
50
|
const saInstance = await instances.consume.sendAnywhere;
|
|
51
51
|
trace('saInstance', saInstance);
|
|
@@ -53,28 +53,24 @@ export const fixSendAnywhere = async (
|
|
|
53
53
|
|
|
54
54
|
const marshaller = await E(board).getReadonlyMarshaller();
|
|
55
55
|
|
|
56
|
-
// This apparently pointless wrapper is to maintain structural parity
|
|
57
|
-
// with the buggy core-eval's wrapper to make lookup() hang.
|
|
58
|
-
const agoricNamesResolves = Far('agoricNames that resolves', {
|
|
59
|
-
lookup: async (...args) => {
|
|
60
|
-
return E(agoricNames).lookup(...args);
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
|
|
64
56
|
const privateArgs = await deeplyFulfilledObject(
|
|
65
57
|
harden({
|
|
66
|
-
agoricNames
|
|
58
|
+
agoricNames,
|
|
67
59
|
localchain,
|
|
68
60
|
marshaller,
|
|
69
61
|
orchestrationService: cosmosInterchainService,
|
|
70
62
|
storageNode: E(NonNullish(await chainStorage)).makeChildNode(
|
|
71
|
-
'
|
|
63
|
+
'send-anywhere',
|
|
72
64
|
),
|
|
73
65
|
timerService: chainTimerService,
|
|
66
|
+
// undefined so `registerKnownChainsAndAssets` does not run again
|
|
67
|
+
chainInfo: undefined,
|
|
68
|
+
assetInfo: undefined,
|
|
74
69
|
}),
|
|
75
70
|
);
|
|
76
71
|
|
|
77
72
|
trace('upgrading...');
|
|
73
|
+
trace('ref', sendAnywhereRef);
|
|
78
74
|
await E(saKit.adminFacet).upgradeContract(
|
|
79
75
|
sendAnywhereRef.bundleID,
|
|
80
76
|
privateArgs,
|
|
@@ -82,13 +78,13 @@ export const fixSendAnywhere = async (
|
|
|
82
78
|
|
|
83
79
|
trace('done');
|
|
84
80
|
};
|
|
85
|
-
harden(
|
|
81
|
+
harden(upgradeSendAnywhere);
|
|
86
82
|
|
|
87
83
|
export const getManifestForValueVow = ({ restoreRef }, { sendAnywhereRef }) => {
|
|
88
84
|
console.log('sendAnywhereRef', sendAnywhereRef);
|
|
89
85
|
return {
|
|
90
86
|
manifest: {
|
|
91
|
-
[
|
|
87
|
+
[upgradeSendAnywhere.name]: {
|
|
92
88
|
consume: {
|
|
93
89
|
agoricNames: true,
|
|
94
90
|
board: true,
|
|
@@ -120,7 +116,7 @@ export const getManifestForValueVow = ({ restoreRef }, { sendAnywhereRef }) => {
|
|
|
120
116
|
export const defaultProposalBuilder = async ({ publishRef, install }) =>
|
|
121
117
|
harden({
|
|
122
118
|
// Somewhat unorthodox, source the exports from this builder module
|
|
123
|
-
sourceSpec: '@agoric/builders/scripts/testing/
|
|
119
|
+
sourceSpec: '@agoric/builders/scripts/testing/upgrade-send-anywhere.js',
|
|
124
120
|
getManifestCall: [
|
|
125
121
|
'getManifestForValueVow',
|
|
126
122
|
{
|
|
@@ -139,5 +135,5 @@ export default async (homeP, endowments) => {
|
|
|
139
135
|
const dspModule = await import('@agoric/deploy-script-support');
|
|
140
136
|
const { makeHelpers } = dspModule;
|
|
141
137
|
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
142
|
-
await writeCoreEval(
|
|
138
|
+
await writeCoreEval(upgradeSendAnywhere.name, defaultProposalBuilder);
|
|
143
139
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
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/upgrade-vaultFactory-proposal.js',
|
|
7
|
+
getManifestCall: [
|
|
8
|
+
'getManifestForVaultFactoryUpgrade',
|
|
9
|
+
{
|
|
10
|
+
contractRef: publishRef(
|
|
11
|
+
install('@agoric/inter-protocol/src/vaultFactory/vaultFactory.js'),
|
|
12
|
+
),
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
18
|
+
export default async (homeP, endowments) => {
|
|
19
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
20
|
+
await writeCoreEval('upgrade-vaults', defaultProposalBuilder);
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
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/upgrade-agoricNames-proposal.js',
|
|
7
|
+
getManifestCall: [
|
|
8
|
+
'getManifestForUpgradingAgoricNames',
|
|
9
|
+
{
|
|
10
|
+
agoricNamesRef: publishRef(
|
|
11
|
+
install('@agoric/vats/src/vat-agoricNames.js'),
|
|
12
|
+
),
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
18
|
+
export default async (homeP, endowments) => {
|
|
19
|
+
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
|
|
20
|
+
await writeCoreProposal('upgrade-agoricNames', defaultProposalBuilder);
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
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/upgrade-asset-reserve-proposal.js',
|
|
7
|
+
getManifestCall: [
|
|
8
|
+
'getManifestForUpgradingAssetReserve',
|
|
9
|
+
{
|
|
10
|
+
assetReserveRef: publishRef(
|
|
11
|
+
install('@agoric/inter-protocol/src/reserve/assetReserve.js'),
|
|
12
|
+
),
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
18
|
+
export default async (homeP, endowments) => {
|
|
19
|
+
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
|
|
20
|
+
await writeCoreProposal('upgrade-asset-reserve', defaultProposalBuilder);
|
|
21
|
+
};
|
|
@@ -14,6 +14,6 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
|
|
|
14
14
|
|
|
15
15
|
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
16
16
|
export default async (homeP, endowments) => {
|
|
17
|
-
const {
|
|
18
|
-
await
|
|
17
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
18
|
+
await writeCoreEval('upgrade-bank', defaultProposalBuilder);
|
|
19
19
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
2
|
+
import { getManifestForUpgradingBoard } from '@agoric/vats/src/proposals/upgrade-board-proposal.js';
|
|
3
|
+
|
|
4
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
5
|
+
export const defaultProposalBuilder = async ({ publishRef, install }) =>
|
|
6
|
+
harden({
|
|
7
|
+
sourceSpec: '@agoric/vats/src/proposals/upgrade-board-proposal.js',
|
|
8
|
+
getManifestCall: [
|
|
9
|
+
getManifestForUpgradingBoard.name,
|
|
10
|
+
{
|
|
11
|
+
boardRef: publishRef(install('@agoric/vats/src/vat-board.js')),
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
17
|
+
export default async (homeP, endowments) => {
|
|
18
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
19
|
+
await writeCoreEval('upgrade-board', defaultProposalBuilder);
|
|
20
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { makeHelpers, parseScriptArgs } from '@agoric/deploy-script-support';
|
|
2
|
+
import { getManifestForUpgradingMintHolder } from '@agoric/vats/src/proposals/upgrade-mintHolder-proposal.js';
|
|
3
|
+
|
|
4
|
+
const configurations = {
|
|
5
|
+
A3P_INTEGRATION: {
|
|
6
|
+
labelList: [
|
|
7
|
+
'USDC_axl',
|
|
8
|
+
'USDT_grv',
|
|
9
|
+
'DAI_axl',
|
|
10
|
+
'DAI_grv',
|
|
11
|
+
'stATOM',
|
|
12
|
+
'USDC_grv',
|
|
13
|
+
'ATOM',
|
|
14
|
+
'USDT_axl',
|
|
15
|
+
'USDC',
|
|
16
|
+
'BLD',
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
MAINNET: {
|
|
20
|
+
labelList: [
|
|
21
|
+
'USDT',
|
|
22
|
+
'USDT_axl',
|
|
23
|
+
'USDT_grv',
|
|
24
|
+
'USDC',
|
|
25
|
+
'USDC_axl',
|
|
26
|
+
'USDC_grv',
|
|
27
|
+
'DAI_axl',
|
|
28
|
+
'DAI_grv',
|
|
29
|
+
'ATOM',
|
|
30
|
+
'stATOM',
|
|
31
|
+
'stkATOM',
|
|
32
|
+
'stTIA',
|
|
33
|
+
'stOSMO',
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
DEVNET: {
|
|
37
|
+
labelList: [
|
|
38
|
+
'stATOM3',
|
|
39
|
+
'stATOM',
|
|
40
|
+
'dATOM',
|
|
41
|
+
'stOSMO',
|
|
42
|
+
'stkATOM',
|
|
43
|
+
'stATOM2',
|
|
44
|
+
'STOSMO',
|
|
45
|
+
'stTIA',
|
|
46
|
+
'ATOM',
|
|
47
|
+
'AUSD',
|
|
48
|
+
'USDT_grv',
|
|
49
|
+
'USDC_axl',
|
|
50
|
+
'USDC_grv',
|
|
51
|
+
'USDT_axl',
|
|
52
|
+
'BLD',
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
EMERYNET: {
|
|
56
|
+
labelList: [
|
|
57
|
+
'ATOM',
|
|
58
|
+
'USDT',
|
|
59
|
+
'DAI_axl',
|
|
60
|
+
'DAI_grv',
|
|
61
|
+
'USDC_axl',
|
|
62
|
+
'stOSMO',
|
|
63
|
+
'stATOM',
|
|
64
|
+
'stkATOM',
|
|
65
|
+
'stOSMO2',
|
|
66
|
+
'ToyUSD',
|
|
67
|
+
'BLD',
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const { keys } = Object;
|
|
73
|
+
const knownVariants = keys(configurations);
|
|
74
|
+
|
|
75
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
76
|
+
export const defaultProposalBuilder = async ({ publishRef, install }, opts) => {
|
|
77
|
+
const config = opts.config || configurations[opts.variant];
|
|
78
|
+
if (!config) {
|
|
79
|
+
const error = `Unknown variant "${opts.variant}". Expected one of ${knownVariants.join(', ')}`;
|
|
80
|
+
console.error(error);
|
|
81
|
+
throw Error(error);
|
|
82
|
+
}
|
|
83
|
+
const { labelList } = config;
|
|
84
|
+
|
|
85
|
+
return harden({
|
|
86
|
+
sourceSpec: '@agoric/vats/src/proposals/upgrade-mintHolder-proposal.js',
|
|
87
|
+
getManifestCall: [
|
|
88
|
+
getManifestForUpgradingMintHolder.name,
|
|
89
|
+
{
|
|
90
|
+
labelList,
|
|
91
|
+
contractRef: publishRef(install('@agoric/vats/src/mintHolder.js')),
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
98
|
+
export default async (homeP, endowments) => {
|
|
99
|
+
const opts = parseScriptArgs(endowments, 'upgrade-mintHolder', knownVariants);
|
|
100
|
+
|
|
101
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
102
|
+
await writeCoreEval(`upgrade-mintHolder`, utils =>
|
|
103
|
+
defaultProposalBuilder(utils, opts),
|
|
104
|
+
);
|
|
105
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
2
|
+
import { upgradeVatsProposalBuilder } from './upgrade-vats.js';
|
|
3
|
+
|
|
4
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
5
|
+
export const defaultProposalBuilder = async powers => {
|
|
6
|
+
const bundleRecord = {
|
|
7
|
+
ibc: '@agoric/vats/src/vat-ibc.js',
|
|
8
|
+
network: '@agoric/vats/src/vat-network.js',
|
|
9
|
+
localchain: '@agoric/vats/src/vat-localchain.js',
|
|
10
|
+
transfer: '@agoric/vats/src/vat-transfer.js',
|
|
11
|
+
orchestration: '@agoric/orchestration/src/vat-orchestration.js',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
return upgradeVatsProposalBuilder(powers, bundleRecord);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
18
|
+
export default async (homeP, endowments) => {
|
|
19
|
+
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
|
|
20
|
+
await writeCoreProposal('upgrade-orchestration', defaultProposalBuilder);
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
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/upgrade-paRegistry-proposal.js',
|
|
7
|
+
getManifestCall: [
|
|
8
|
+
'getManifestForUpgradingRegistry',
|
|
9
|
+
{
|
|
10
|
+
registryRef: publishRef(
|
|
11
|
+
install('@agoric/vats/src/vat-priceAuthority.js'),
|
|
12
|
+
),
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
18
|
+
export default async (homeP, endowments) => {
|
|
19
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
20
|
+
await writeCoreEval('upgrade-paRegistry', defaultProposalBuilder);
|
|
21
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
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/vats/src/proposals/upgrade-provisionPool-to-BLD-proposal.js',
|
|
8
|
+
getManifestCall: [
|
|
9
|
+
'getManifestForUpgradingProvisionPool',
|
|
10
|
+
{
|
|
11
|
+
provisionPoolRef: publishRef(
|
|
12
|
+
install('@agoric/inter-protocol/src/provisionPool.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 { writeCoreProposal } = await makeHelpers(homeP, endowments);
|
|
21
|
+
await writeCoreProposal(
|
|
22
|
+
'upgrade-provision-pool-to-BLD',
|
|
23
|
+
defaultProposalBuilder,
|
|
24
|
+
);
|
|
25
|
+
};
|
|
@@ -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/upgrade-psm-proposal.js',
|
|
7
|
+
getManifestCall: [
|
|
8
|
+
'getManifestForUpgradingPSM',
|
|
9
|
+
{
|
|
10
|
+
psmRef: publishRef(install('@agoric/inter-protocol/src/psm/psm.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-psm', defaultProposalBuilder);
|
|
19
|
+
};
|