@agoric/builders 0.1.1-dev-74ab972.0 → 0.1.1-dev-340ef0d.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/builders",
|
|
3
|
-
"version": "0.1.1-dev-
|
|
3
|
+
"version": "0.1.1-dev-340ef0d.0+340ef0d",
|
|
4
4
|
"description": "Build scripts for proposals to an Agoric chain",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"author": "Agoric",
|
|
24
24
|
"license": "Apache-2.0",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
27
|
-
"@agoric/fast-usdc": "0.1.1-dev-
|
|
28
|
-
"@agoric/internal": "0.3.3-dev-
|
|
29
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
30
|
-
"@agoric/smart-wallet": "0.5.4-dev-
|
|
31
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
32
|
-
"@agoric/vats": "0.15.2-dev-
|
|
33
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
26
|
+
"@agoric/ertp": "0.16.3-dev-340ef0d.0+340ef0d",
|
|
27
|
+
"@agoric/fast-usdc": "0.1.1-dev-340ef0d.0+340ef0d",
|
|
28
|
+
"@agoric/internal": "0.3.3-dev-340ef0d.0+340ef0d",
|
|
29
|
+
"@agoric/notifier": "0.6.3-dev-340ef0d.0+340ef0d",
|
|
30
|
+
"@agoric/smart-wallet": "0.5.4-dev-340ef0d.0+340ef0d",
|
|
31
|
+
"@agoric/vat-data": "0.5.3-dev-340ef0d.0+340ef0d",
|
|
32
|
+
"@agoric/vats": "0.15.2-dev-340ef0d.0+340ef0d",
|
|
33
|
+
"@agoric/zoe": "0.26.3-dev-340ef0d.0+340ef0d",
|
|
34
34
|
"@endo/bundle-source": "^3.5.0",
|
|
35
35
|
"@endo/captp": "^4.4.3",
|
|
36
36
|
"@endo/eventual-send": "^1.2.8",
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
"import-meta-resolve": "^2.2.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@agoric/deploy-script-support": "0.10.4-dev-
|
|
47
|
-
"@agoric/governance": "0.10.4-dev-
|
|
48
|
-
"@agoric/inter-protocol": "0.16.2-dev-
|
|
49
|
-
"@agoric/orchestration": "0.1.1-dev-
|
|
50
|
-
"@agoric/store": "0.9.3-dev-
|
|
51
|
-
"@agoric/swing-store": "0.9.2-dev-
|
|
52
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
53
|
-
"@agoric/time": "0.3.3-dev-
|
|
46
|
+
"@agoric/deploy-script-support": "0.10.4-dev-340ef0d.0+340ef0d",
|
|
47
|
+
"@agoric/governance": "0.10.4-dev-340ef0d.0+340ef0d",
|
|
48
|
+
"@agoric/inter-protocol": "0.16.2-dev-340ef0d.0+340ef0d",
|
|
49
|
+
"@agoric/orchestration": "0.1.1-dev-340ef0d.0+340ef0d",
|
|
50
|
+
"@agoric/store": "0.9.3-dev-340ef0d.0+340ef0d",
|
|
51
|
+
"@agoric/swing-store": "0.9.2-dev-340ef0d.0+340ef0d",
|
|
52
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-340ef0d.0+340ef0d",
|
|
53
|
+
"@agoric/time": "0.3.3-dev-340ef0d.0+340ef0d",
|
|
54
54
|
"@endo/errors": "^1.2.8",
|
|
55
55
|
"ava": "^5.3.0",
|
|
56
56
|
"c8": "^10.1.2"
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"typeCoverage": {
|
|
84
84
|
"atLeast": 90.93
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "340ef0d3a3b0d80ed847fc7a78c805f0c589c7c9"
|
|
87
87
|
}
|
|
@@ -38,6 +38,7 @@ const options = {
|
|
|
38
38
|
},
|
|
39
39
|
chainInfo: { type: 'string' },
|
|
40
40
|
assetInfo: { type: 'string' },
|
|
41
|
+
noNoble: { type: 'boolean', default: false },
|
|
41
42
|
};
|
|
42
43
|
const oraclesUsage = 'use --oracle name:address ...';
|
|
43
44
|
|
|
@@ -57,8 +58,9 @@ const assetInfoUsage =
|
|
|
57
58
|
* oracle?: string[];
|
|
58
59
|
* usdcDenom: string;
|
|
59
60
|
* feedPolicy?: string;
|
|
60
|
-
* chainInfo
|
|
61
|
-
* assetInfo
|
|
61
|
+
* chainInfo?: string;
|
|
62
|
+
* assetInfo?: string;
|
|
63
|
+
* noNoble: boolean;
|
|
62
64
|
* }} FastUSDCOpts
|
|
63
65
|
*/
|
|
64
66
|
|
|
@@ -107,6 +109,7 @@ export default async (homeP, endowments) => {
|
|
|
107
109
|
feedPolicy,
|
|
108
110
|
chainInfo,
|
|
109
111
|
assetInfo,
|
|
112
|
+
noNoble,
|
|
110
113
|
...fees
|
|
111
114
|
},
|
|
112
115
|
} = parseArgs({ args: scriptArgs, options });
|
|
@@ -185,6 +188,7 @@ export default async (homeP, endowments) => {
|
|
|
185
188
|
feedPolicy: parseFeedPolicy(),
|
|
186
189
|
chainInfo: parseChainInfo(),
|
|
187
190
|
assetInfo: parseAssetInfo(),
|
|
191
|
+
noNoble,
|
|
188
192
|
});
|
|
189
193
|
|
|
190
194
|
await writeCoreEval('start-fast-usdc', utils =>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
2
|
+
import { psmProposalBuilder } from '../inter-protocol/add-collateral-core.js';
|
|
3
|
+
|
|
4
|
+
const addUsdOlivesProposalBuilder = async powers => {
|
|
5
|
+
return psmProposalBuilder(powers, {
|
|
6
|
+
anchorOptions: {
|
|
7
|
+
denom: 'ibc/000C0AAAEECAFE111',
|
|
8
|
+
keyword: 'USD_OLIVES',
|
|
9
|
+
decimalPlaces: 6,
|
|
10
|
+
proposedName: 'USD_OLIVES',
|
|
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('add-OLIVES-PSM', addUsdOlivesProposalBuilder);
|
|
19
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { makeTracer } from '@agoric/internal';
|
|
2
|
+
import { E, Far } from '@endo/far';
|
|
3
|
+
import { makeMarshal } from '@endo/marshal';
|
|
4
|
+
|
|
5
|
+
const trace = makeTracer('PublishTestInfo');
|
|
6
|
+
const { Fail } = assert;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @param {BootstrapPowers} powers
|
|
10
|
+
*/
|
|
11
|
+
export const publishTestInfo = async powers => {
|
|
12
|
+
const {
|
|
13
|
+
consume: { agoricNamesAdmin, chainStorage: chainStorageP },
|
|
14
|
+
} = powers;
|
|
15
|
+
|
|
16
|
+
const chainStorage = await chainStorageP;
|
|
17
|
+
if (!chainStorage) {
|
|
18
|
+
trace('no chain storage, not registering chain info');
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
trace('publishing testInfo');
|
|
23
|
+
const agoricNamesNode = E(chainStorage).makeChildNode('agoricNames');
|
|
24
|
+
const testInfoNode = E(agoricNamesNode).makeChildNode('testInfo');
|
|
25
|
+
const { nameAdmin } = await E(agoricNamesAdmin).provideChild('testInfo');
|
|
26
|
+
|
|
27
|
+
trace('registering onUpdate...');
|
|
28
|
+
await E(nameAdmin).onUpdate(
|
|
29
|
+
Far('chain info writer', {
|
|
30
|
+
write(entries) {
|
|
31
|
+
const marshalData = makeMarshal(_val => Fail`data only`);
|
|
32
|
+
const value = JSON.stringify(marshalData.toCapData(entries));
|
|
33
|
+
void E(testInfoNode)
|
|
34
|
+
.setValue(value)
|
|
35
|
+
.catch(() =>
|
|
36
|
+
console.log('cannot update vstorage after write to testInfo'),
|
|
37
|
+
);
|
|
38
|
+
},
|
|
39
|
+
}),
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
trace('writing to testInfo...');
|
|
43
|
+
await E(nameAdmin).update('agoric', {
|
|
44
|
+
isAwesome: 'yes',
|
|
45
|
+
tech: ['HardenedJs', 'Orchestration', 'Async_Execution'],
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
trace('Done.');
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const getManifestForPublishTestInfo = () => {
|
|
52
|
+
return {
|
|
53
|
+
manifest: {
|
|
54
|
+
[publishTestInfo.name]: {
|
|
55
|
+
consume: {
|
|
56
|
+
agoricNamesAdmin: true,
|
|
57
|
+
chainStorage: true,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
65
|
+
export const defaultProposalBuilder = async () =>
|
|
66
|
+
harden({
|
|
67
|
+
// Somewhat unorthodox, source the exports from this builder module
|
|
68
|
+
sourceSpec: '@agoric/builders/scripts/testing/publish-test-info.js',
|
|
69
|
+
getManifestCall: ['getManifestForPublishTestInfo'],
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
73
|
+
export default async (homeP, endowments) => {
|
|
74
|
+
// import dynamically so the module can work in CoreEval environment
|
|
75
|
+
const dspModule = await import('@agoric/deploy-script-support');
|
|
76
|
+
const { makeHelpers } = dspModule;
|
|
77
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
78
|
+
await writeCoreEval('publish-test-info', defaultProposalBuilder);
|
|
79
|
+
};
|
|
@@ -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
|
+
};
|