@agoric/builders 0.1.1-dev-56d1c14.0 → 0.1.1-dev-86e3b2d.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-86e3b2d.0+86e3b2d",
|
|
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-86e3b2d.0+86e3b2d",
|
|
27
|
+
"@agoric/fast-usdc": "0.1.1-dev-86e3b2d.0+86e3b2d",
|
|
28
|
+
"@agoric/internal": "0.3.3-dev-86e3b2d.0+86e3b2d",
|
|
29
|
+
"@agoric/notifier": "0.6.3-dev-86e3b2d.0+86e3b2d",
|
|
30
|
+
"@agoric/smart-wallet": "0.5.4-dev-86e3b2d.0+86e3b2d",
|
|
31
|
+
"@agoric/vat-data": "0.5.3-dev-86e3b2d.0+86e3b2d",
|
|
32
|
+
"@agoric/vats": "0.15.2-dev-86e3b2d.0+86e3b2d",
|
|
33
|
+
"@agoric/zoe": "0.26.3-dev-86e3b2d.0+86e3b2d",
|
|
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-86e3b2d.0+86e3b2d",
|
|
47
|
+
"@agoric/governance": "0.10.4-dev-86e3b2d.0+86e3b2d",
|
|
48
|
+
"@agoric/inter-protocol": "0.16.2-dev-86e3b2d.0+86e3b2d",
|
|
49
|
+
"@agoric/orchestration": "0.1.1-dev-86e3b2d.0+86e3b2d",
|
|
50
|
+
"@agoric/store": "0.9.3-dev-86e3b2d.0+86e3b2d",
|
|
51
|
+
"@agoric/swing-store": "0.9.2-dev-86e3b2d.0+86e3b2d",
|
|
52
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-86e3b2d.0+86e3b2d",
|
|
53
|
+
"@agoric/time": "0.3.3-dev-86e3b2d.0+86e3b2d",
|
|
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": "86e3b2d6a2bd916d1a4012e8229fea8414228501"
|
|
87
87
|
}
|
|
@@ -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
|
+
};
|