@agoric/builders 0.1.1-upgrade-16-dev-d45b478.0 → 0.1.1-upgrade-16-dev-5e17008.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +17 -17
- package/scripts/vats/priceFeedSupport.js +47 -19
- package/scripts/vats/revive-kread.js +13 -0
- package/scripts/vats/updateStAtomPriceFeed.js +1 -1
- package/scripts/vats/updateStkAtomPriceFeed.js +1 -1
- package/scripts/orchestration/init-stakeAtom.js +0 -34
- package/scripts/orchestration/init-stakeBld.js +0 -23
- package/scripts/vats/init-orchestration.js +0 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/builders",
|
|
3
|
-
"version": "0.1.1-upgrade-16-dev-
|
|
3
|
+
"version": "0.1.1-upgrade-16-dev-5e17008.0+5e17008",
|
|
4
4
|
"description": "Build scripts for proposals to an Agoric chain",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"author": "Agoric",
|
|
24
24
|
"license": "Apache-2.0",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@agoric/ertp": "0.16.3-upgrade-16-dev-
|
|
27
|
-
"@agoric/internal": "0.3.3-upgrade-16-dev-
|
|
28
|
-
"@agoric/notifier": "0.6.3-upgrade-16-dev-
|
|
29
|
-
"@agoric/smart-wallet": "0.5.4-upgrade-16-dev-
|
|
30
|
-
"@agoric/vat-data": "0.5.3-upgrade-16-dev-
|
|
31
|
-
"@agoric/vats": "0.15.2-upgrade-16-dev-
|
|
32
|
-
"@agoric/zoe": "0.26.3-upgrade-16-dev-
|
|
26
|
+
"@agoric/ertp": "0.16.3-upgrade-16-dev-5e17008.0+5e17008",
|
|
27
|
+
"@agoric/internal": "0.3.3-upgrade-16-dev-5e17008.0+5e17008",
|
|
28
|
+
"@agoric/notifier": "0.6.3-upgrade-16-dev-5e17008.0+5e17008",
|
|
29
|
+
"@agoric/smart-wallet": "0.5.4-upgrade-16-dev-5e17008.0+5e17008",
|
|
30
|
+
"@agoric/vat-data": "0.5.3-upgrade-16-dev-5e17008.0+5e17008",
|
|
31
|
+
"@agoric/vats": "0.15.2-upgrade-16-dev-5e17008.0+5e17008",
|
|
32
|
+
"@agoric/zoe": "0.26.3-upgrade-16-dev-5e17008.0+5e17008",
|
|
33
33
|
"@endo/bundle-source": "^3.2.3",
|
|
34
34
|
"@endo/captp": "^4.2.0",
|
|
35
35
|
"@endo/eventual-send": "^1.2.2",
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"import-meta-resolve": "^2.2.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@agoric/assert": "0.6.1-upgrade-16-dev-
|
|
45
|
-
"@agoric/deploy-script-support": "0.10.4-upgrade-16-dev-
|
|
46
|
-
"@agoric/governance": "0.10.4-upgrade-16-dev-
|
|
47
|
-
"@agoric/inter-protocol": "0.16.2-upgrade-16-dev-
|
|
48
|
-
"@agoric/store": "0.9.3-upgrade-16-dev-
|
|
49
|
-
"@agoric/swing-store": "0.9.2-upgrade-16-dev-
|
|
50
|
-
"@agoric/swingset-liveslots": "0.10.3-upgrade-16-dev-
|
|
51
|
-
"@agoric/time": "0.3.3-upgrade-16-dev-
|
|
44
|
+
"@agoric/assert": "0.6.1-upgrade-16-dev-5e17008.0+5e17008",
|
|
45
|
+
"@agoric/deploy-script-support": "0.10.4-upgrade-16-dev-5e17008.0+5e17008",
|
|
46
|
+
"@agoric/governance": "0.10.4-upgrade-16-dev-5e17008.0+5e17008",
|
|
47
|
+
"@agoric/inter-protocol": "0.16.2-upgrade-16-dev-5e17008.0+5e17008",
|
|
48
|
+
"@agoric/store": "0.9.3-upgrade-16-dev-5e17008.0+5e17008",
|
|
49
|
+
"@agoric/swing-store": "0.9.2-upgrade-16-dev-5e17008.0+5e17008",
|
|
50
|
+
"@agoric/swingset-liveslots": "0.10.3-upgrade-16-dev-5e17008.0+5e17008",
|
|
51
|
+
"@agoric/time": "0.3.3-upgrade-16-dev-5e17008.0+5e17008",
|
|
52
52
|
"ava": "^5.3.0",
|
|
53
53
|
"c8": "^9.1.0"
|
|
54
54
|
},
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"typeCoverage": {
|
|
81
81
|
"atLeast": 74.36
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "5e1700835993739016a08936193644c1ae5abb13"
|
|
84
84
|
}
|
|
@@ -2,41 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
import { DEFAULT_CONTRACT_TERMS } from '../inter-protocol/price-feed-core.js';
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
// XXX These are the oracle addresses. They must be provided before the chain
|
|
7
|
-
// is running, which means they must be known ahead of time.
|
|
8
|
-
// see https://github.com/Agoric/agoric-3-proposals/issues/5
|
|
9
|
-
'agoric1lu9hh5vgx05hmlpfu47hukershgdxctk6l5s05',
|
|
10
|
-
'agoric15lpnq2mjsdhtztf6khp7mrsq66hyrssspy92pd',
|
|
11
|
-
'agoric1mwm224epc4l3pjcz7qsxnudcuktpynwkmnfqfp',
|
|
12
|
-
];
|
|
5
|
+
const { Fail } = assert;
|
|
13
6
|
|
|
14
7
|
/**
|
|
15
8
|
* modified copy of ../inter-protocol/price-feed-core.js
|
|
16
9
|
*
|
|
17
10
|
* @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder}
|
|
18
11
|
*/
|
|
19
|
-
export const
|
|
12
|
+
export const strictPriceFeedProposalBuilder = async (
|
|
20
13
|
{ publishRef, install },
|
|
21
|
-
options
|
|
14
|
+
options,
|
|
22
15
|
) => {
|
|
23
16
|
const {
|
|
24
17
|
AGORIC_INSTANCE_NAME,
|
|
25
18
|
IN_BRAND_LOOKUP,
|
|
26
19
|
IN_BRAND_NAME = IN_BRAND_LOOKUP[IN_BRAND_LOOKUP.length - 1],
|
|
20
|
+
ORACLE_ADDRESSES,
|
|
27
21
|
} = options;
|
|
28
22
|
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
? [GOV1ADDR, GOV2ADDR, GOV3ADDR].filter(x => x)
|
|
33
|
-
: ORACLE_ADDRESSES;
|
|
34
|
-
assert(Array.isArray(oracleAddresses), 'oracleAddresses array is required');
|
|
23
|
+
const oracleAddresses = ORACLE_ADDRESSES;
|
|
24
|
+
Array.isArray(oracleAddresses) ||
|
|
25
|
+
Fail`ORACLE_ADDRESSES array is required; got ${oracleAddresses}`;
|
|
35
26
|
|
|
36
|
-
|
|
27
|
+
AGORIC_INSTANCE_NAME ||
|
|
28
|
+
Fail`AGORIC_INSTANCE_NAME is required; got ${AGORIC_INSTANCE_NAME}`;
|
|
37
29
|
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
Array.isArray(IN_BRAND_LOOKUP) ||
|
|
31
|
+
Fail`IN_BRAND_NAME array is required; got ${IN_BRAND_LOOKUP}`;
|
|
40
32
|
|
|
41
33
|
return harden({
|
|
42
34
|
sourceSpec: '@agoric/inter-protocol/src/proposals/price-feed-proposal.js',
|
|
@@ -60,3 +52,39 @@ export const priceFeedProposalBuilder = async (
|
|
|
60
52
|
],
|
|
61
53
|
});
|
|
62
54
|
};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated use `strictPriceFeedProposalBuilder` and specify arguments instead
|
|
58
|
+
* @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder}
|
|
59
|
+
*/
|
|
60
|
+
export const deprecatedPriceFeedProposalBuilder = async (powers, options) => {
|
|
61
|
+
console.warn(
|
|
62
|
+
'deprecated ambient `priceFeedProposalBuilder`; use `strictPriceFeedProposalBuilder` instead',
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
const DEFAULT_ORACLE_ADDRESSES = [
|
|
66
|
+
// XXX These are the oracle addresses. They must be provided before the chain
|
|
67
|
+
// is running, which means they must be known ahead of time.
|
|
68
|
+
// see https://github.com/Agoric/agoric-3-proposals/issues/5
|
|
69
|
+
'agoric1lu9hh5vgx05hmlpfu47hukershgdxctk6l5s05',
|
|
70
|
+
'agoric15lpnq2mjsdhtztf6khp7mrsq66hyrssspy92pd',
|
|
71
|
+
'agoric1mwm224epc4l3pjcz7qsxnudcuktpynwkmnfqfp',
|
|
72
|
+
];
|
|
73
|
+
|
|
74
|
+
const { GOV1ADDR, GOV2ADDR, GOV3ADDR } = process.env;
|
|
75
|
+
const governanceAddressEnv = [GOV1ADDR, GOV2ADDR, GOV3ADDR].filter(x => x);
|
|
76
|
+
const ORACLE_ADDRESSES = governanceAddressEnv.length
|
|
77
|
+
? governanceAddressEnv
|
|
78
|
+
: DEFAULT_ORACLE_ADDRESSES;
|
|
79
|
+
|
|
80
|
+
return strictPriceFeedProposalBuilder(powers, {
|
|
81
|
+
...options,
|
|
82
|
+
ORACLE_ADDRESSES,
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @deprecated use `strictPriceFeedProposalBuilder` and specify arguments instead
|
|
88
|
+
* @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder}
|
|
89
|
+
*/
|
|
90
|
+
export const priceFeedProposalBuilder = deprecatedPriceFeedProposalBuilder;
|
|
@@ -0,0 +1,13 @@
|
|
|
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 () =>
|
|
5
|
+
harden({
|
|
6
|
+
sourceSpec: '@agoric/vats/src/proposals/kread-proposal.js',
|
|
7
|
+
getManifestCall: ['getManifestForKread'],
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export default async (homeP, endowments) => {
|
|
11
|
+
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
|
|
12
|
+
await writeCoreProposal('revive-kread', defaultProposalBuilder);
|
|
13
|
+
};
|
|
@@ -3,7 +3,7 @@ import { priceFeedProposalBuilder } from './priceFeedSupport.js';
|
|
|
3
3
|
|
|
4
4
|
const OPTIONS = {
|
|
5
5
|
AGORIC_INSTANCE_NAME: 'stATOM-USD price feed',
|
|
6
|
-
IN_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', '
|
|
6
|
+
IN_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'stATOM'],
|
|
7
7
|
OUT_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'USD'],
|
|
8
8
|
};
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ import { priceFeedProposalBuilder } from './priceFeedSupport.js';
|
|
|
3
3
|
|
|
4
4
|
const OPTIONS = {
|
|
5
5
|
AGORIC_INSTANCE_NAME: 'stkATOM-USD price feed',
|
|
6
|
-
IN_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', '
|
|
6
|
+
IN_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'stkATOM'],
|
|
7
7
|
OUT_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'USD'],
|
|
8
8
|
};
|
|
9
9
|
|
|
@@ -1,34 +0,0 @@
|
|
|
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 (
|
|
5
|
-
{ publishRef, install },
|
|
6
|
-
options = {},
|
|
7
|
-
) => {
|
|
8
|
-
const {
|
|
9
|
-
hostConnectionId = 'connection-1',
|
|
10
|
-
controllerConnectionId = 'connection-0',
|
|
11
|
-
bondDenom = 'uatom',
|
|
12
|
-
} = options;
|
|
13
|
-
return harden({
|
|
14
|
-
sourceSpec: '@agoric/orchestration/src/proposals/start-stakeAtom.js',
|
|
15
|
-
getManifestCall: [
|
|
16
|
-
'getManifestForStakeAtom',
|
|
17
|
-
{
|
|
18
|
-
installKeys: {
|
|
19
|
-
stakeIca: publishRef(
|
|
20
|
-
install('@agoric/orchestration/src/examples/stakeIca.contract.js'),
|
|
21
|
-
),
|
|
22
|
-
},
|
|
23
|
-
hostConnectionId,
|
|
24
|
-
controllerConnectionId,
|
|
25
|
-
bondDenom,
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export default async (homeP, endowments) => {
|
|
32
|
-
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
33
|
-
await writeCoreEval('start-stakeAtom', defaultProposalBuilder);
|
|
34
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
3
|
-
|
|
4
|
-
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
5
|
-
export const defaultProposalBuilder = async ({ publishRef, install }) =>
|
|
6
|
-
harden({
|
|
7
|
-
sourceSpec: '@agoric/orchestration/src/proposals/start-stakeBld.js',
|
|
8
|
-
getManifestCall: [
|
|
9
|
-
'getManifestForStakeBld',
|
|
10
|
-
{
|
|
11
|
-
installKeys: {
|
|
12
|
-
stakeBld: publishRef(
|
|
13
|
-
install('@agoric/orchestration/src/examples/stakeBld.contract.js'),
|
|
14
|
-
),
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
],
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
export default async (homeP, endowments) => {
|
|
21
|
-
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
22
|
-
await writeCoreEval('start-stakeBld', defaultProposalBuilder);
|
|
23
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
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/orchestration/src/proposals/orchestration-proposal.js',
|
|
7
|
-
getManifestCall: [
|
|
8
|
-
'getManifestForOrchestration',
|
|
9
|
-
{
|
|
10
|
-
orchestrationRef: publishRef(
|
|
11
|
-
install('@agoric/orchestration/src/vat-orchestration.js'),
|
|
12
|
-
),
|
|
13
|
-
},
|
|
14
|
-
],
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export default async (homeP, endowments) => {
|
|
18
|
-
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
19
|
-
await writeCoreEval('gov-orchestration', defaultProposalBuilder);
|
|
20
|
-
};
|