@agoric/orchestration 0.1.1-dev-71db129.0 → 0.1.1-dev-1dcae57.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 +15 -15
- package/src/proposals/orchestration-proposal.d.ts +31 -29
- package/src/proposals/orchestration-proposal.d.ts.map +1 -1
- package/src/proposals/orchestration-proposal.js +74 -1
- package/src/proposals/start-stakeBld.d.ts +1 -2
- package/src/proposals/start-stakeBld.d.ts.map +1 -1
- package/src/proposals/start-stakeBld.js +1 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/orchestration",
|
|
3
|
-
"version": "0.1.1-dev-
|
|
3
|
+
"version": "0.1.1-dev-1dcae57.0+1dcae57",
|
|
4
4
|
"description": "Chain abstraction for Agoric's orchestration clients",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@agoric/assert": "0.6.1-dev-
|
|
35
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
36
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
37
|
-
"@agoric/internal": "0.3.3-dev-
|
|
38
|
-
"@agoric/network": "0.1.1-dev-
|
|
39
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
40
|
-
"@agoric/store": "0.9.3-dev-
|
|
41
|
-
"@agoric/time": "0.3.3-dev-
|
|
42
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
43
|
-
"@agoric/vats": "0.15.2-dev-
|
|
44
|
-
"@agoric/vow": "0.1.1-dev-
|
|
45
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
46
|
-
"@agoric/zone": "0.2.3-dev-
|
|
34
|
+
"@agoric/assert": "0.6.1-dev-1dcae57.0+1dcae57",
|
|
35
|
+
"@agoric/cosmic-proto": "0.4.1-dev-1dcae57.0+1dcae57",
|
|
36
|
+
"@agoric/ertp": "0.16.3-dev-1dcae57.0+1dcae57",
|
|
37
|
+
"@agoric/internal": "0.3.3-dev-1dcae57.0+1dcae57",
|
|
38
|
+
"@agoric/network": "0.1.1-dev-1dcae57.0+1dcae57",
|
|
39
|
+
"@agoric/notifier": "0.6.3-dev-1dcae57.0+1dcae57",
|
|
40
|
+
"@agoric/store": "0.9.3-dev-1dcae57.0+1dcae57",
|
|
41
|
+
"@agoric/time": "0.3.3-dev-1dcae57.0+1dcae57",
|
|
42
|
+
"@agoric/vat-data": "0.5.3-dev-1dcae57.0+1dcae57",
|
|
43
|
+
"@agoric/vats": "0.15.2-dev-1dcae57.0+1dcae57",
|
|
44
|
+
"@agoric/vow": "0.1.1-dev-1dcae57.0+1dcae57",
|
|
45
|
+
"@agoric/zoe": "0.26.3-dev-1dcae57.0+1dcae57",
|
|
46
|
+
"@agoric/zone": "0.2.3-dev-1dcae57.0+1dcae57",
|
|
47
47
|
"@endo/base64": "^1.0.5",
|
|
48
48
|
"@endo/far": "^1.1.2",
|
|
49
49
|
"@endo/marshal": "^1.5.0",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"typeCoverage": {
|
|
85
85
|
"atLeast": 97.1
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "1dcae570fe7dc9d0ad3cda650b9209f392261d15"
|
|
88
88
|
}
|
|
@@ -94,7 +94,7 @@ export function setupOrchestrationVat({ consume: { loadCriticalVat, portAllocato
|
|
|
94
94
|
bootMsg?: {
|
|
95
95
|
type: string;
|
|
96
96
|
chainID: string;
|
|
97
|
-
storagePort: number;
|
|
97
|
+
storagePort: number; /** @type {OrchestrationVats} */
|
|
98
98
|
supplyCoins: {
|
|
99
99
|
denom: string;
|
|
100
100
|
amount: string;
|
|
@@ -206,18 +206,9 @@ export function setupOrchestrationVat({ consume: { loadCriticalVat, portAllocato
|
|
|
206
206
|
agoricNames: Promise<{
|
|
207
207
|
getNameHub: () => import("@agoric/vats").NameHub<any>;
|
|
208
208
|
getNameHubKit: () => import("@agoric/vats").NameHubKit;
|
|
209
|
-
publishNameHubs: (nameStorage: ERef<
|
|
210
|
-
/**
|
|
211
|
-
* @param {BootstrapPowers & {
|
|
212
|
-
* consume: {
|
|
213
|
-
* orchestration: OrchestrationService;
|
|
214
|
-
* };
|
|
215
|
-
* }} powers
|
|
216
|
-
* @param {object} _options
|
|
217
|
-
*/
|
|
218
|
-
StorageNode>, vatBoard: ERef<BoardVat>, kinds: string[]) => Promise<void>;
|
|
209
|
+
publishNameHubs: (nameStorage: ERef<StorageNode>, vatBoard: ERef<BoardVat>, kinds: string[]) => Promise<void>;
|
|
219
210
|
provideInertBrand: (keyword: string, displayInfo: DisplayInfo) => any;
|
|
220
|
-
} & import("@endo/
|
|
211
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
221
212
|
getNameHub: () => import("@agoric/vats").NameHub<any>;
|
|
222
213
|
getNameHubKit: () => import("@agoric/vats").NameHubKit;
|
|
223
214
|
publishNameHubs: (nameStorage: ERef<StorageNode>, vatBoard: ERef<BoardVat>, kinds: string[]) => Promise<void>;
|
|
@@ -225,10 +216,10 @@ export function setupOrchestrationVat({ consume: { loadCriticalVat, portAllocato
|
|
|
225
216
|
}>>;
|
|
226
217
|
board: Promise<{
|
|
227
218
|
getBoard: () => import("@endo/exo").Guarded<{
|
|
228
|
-
getId(value: import("@endo/
|
|
229
|
-
getValue(id: BoardId): import("@endo/
|
|
219
|
+
getId(value: import("@endo/marshal").RemotableObject): string;
|
|
220
|
+
getValue(id: BoardId): import("@endo/marshal").RemotableObject;
|
|
230
221
|
lookup(...path: string[]): Promise<any>;
|
|
231
|
-
has(val: import("@endo/
|
|
222
|
+
has(val: import("@endo/marshal").RemotableObject): boolean;
|
|
232
223
|
ids(): string[];
|
|
233
224
|
getPublishingMarshaller(): import("@endo/exo").Guarded<{
|
|
234
225
|
toCapData(val: any): import("@endo/marshal").CapData<string>;
|
|
@@ -245,12 +236,12 @@ export function setupOrchestrationVat({ consume: { loadCriticalVat, portAllocato
|
|
|
245
236
|
}>;
|
|
246
237
|
makePublishingRecorderKit: <T>(storageNode: StorageNode | Awaited<import("@endo/far").FarRef<StorageNode>>, valueShape?: import("@agoric/zoe/src/contractSupport/recorder.js").TypedMatcher<T> | undefined) => import("@agoric/zoe/src/contractSupport/recorder.js").RecorderKit<T>;
|
|
247
238
|
makeReadOnlyRecorderKit: <T>(storageNode: StorageNode | Awaited<import("@endo/far").FarRef<StorageNode>>, valueShape?: import("@agoric/zoe/src/contractSupport/recorder.js").TypedMatcher<T> | undefined) => import("@agoric/zoe/src/contractSupport/recorder.js").RecorderKit<T>;
|
|
248
|
-
} & import("@endo/
|
|
239
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
249
240
|
getBoard: () => import("@endo/exo").Guarded<{
|
|
250
|
-
getId(value: import("@endo/
|
|
251
|
-
getValue(id: BoardId): import("@endo/
|
|
241
|
+
getId(value: import("@endo/marshal").RemotableObject): string;
|
|
242
|
+
getValue(id: BoardId): import("@endo/marshal").RemotableObject;
|
|
252
243
|
lookup(...path: string[]): Promise<any>;
|
|
253
|
-
has(val: import("@endo/
|
|
244
|
+
has(val: import("@endo/marshal").RemotableObject): boolean;
|
|
254
245
|
ids(): string[];
|
|
255
246
|
getPublishingMarshaller(): import("@endo/exo").Guarded<{
|
|
256
247
|
toCapData(val: any): import("@endo/marshal").CapData<string>;
|
|
@@ -294,6 +285,7 @@ export function setupOrchestrationVat({ consume: { loadCriticalVat, portAllocato
|
|
|
294
285
|
orchestrationRef: VatSourceRef;
|
|
295
286
|
};
|
|
296
287
|
}): Promise<void>;
|
|
288
|
+
export function initChainInfo({ consume: { agoricNamesAdmin, chainStorage: chainStorageP }, }: BootstrapPowers): Promise<void>;
|
|
297
289
|
export function addOrchestrationToClient({ consume: { client, orchestration } }: WellKnownSpaces & PromiseSpaceOf<ChainBootstrapSpaceT & {
|
|
298
290
|
vatAdminSvc: VatAdminSvc;
|
|
299
291
|
}, {}, {
|
|
@@ -390,7 +382,7 @@ export function addOrchestrationToClient({ consume: { client, orchestration } }:
|
|
|
390
382
|
bootMsg?: {
|
|
391
383
|
type: string;
|
|
392
384
|
chainID: string;
|
|
393
|
-
storagePort: number;
|
|
385
|
+
storagePort: number; /** @type {OrchestrationVats} */
|
|
394
386
|
supplyCoins: {
|
|
395
387
|
denom: string;
|
|
396
388
|
amount: string;
|
|
@@ -504,7 +496,7 @@ export function addOrchestrationToClient({ consume: { client, orchestration } }:
|
|
|
504
496
|
getNameHubKit: () => import("@agoric/vats").NameHubKit;
|
|
505
497
|
publishNameHubs: (nameStorage: ERef<StorageNode>, vatBoard: ERef<BoardVat>, kinds: string[]) => Promise<void>;
|
|
506
498
|
provideInertBrand: (keyword: string, displayInfo: DisplayInfo) => any;
|
|
507
|
-
} & import("@endo/
|
|
499
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
508
500
|
getNameHub: () => import("@agoric/vats").NameHub<any>;
|
|
509
501
|
getNameHubKit: () => import("@agoric/vats").NameHubKit;
|
|
510
502
|
publishNameHubs: (nameStorage: ERef<StorageNode>, vatBoard: ERef<BoardVat>, kinds: string[]) => Promise<void>;
|
|
@@ -512,10 +504,10 @@ export function addOrchestrationToClient({ consume: { client, orchestration } }:
|
|
|
512
504
|
}>>;
|
|
513
505
|
board: Promise<{
|
|
514
506
|
getBoard: () => import("@endo/exo").Guarded<{
|
|
515
|
-
getId(value: import("@endo/
|
|
516
|
-
getValue(id: BoardId): import("@endo/
|
|
507
|
+
getId(value: import("@endo/marshal").RemotableObject): string;
|
|
508
|
+
getValue(id: BoardId): import("@endo/marshal").RemotableObject;
|
|
517
509
|
lookup(...path: string[]): Promise<any>;
|
|
518
|
-
has(val: import("@endo/
|
|
510
|
+
has(val: import("@endo/marshal").RemotableObject): boolean;
|
|
519
511
|
ids(): string[];
|
|
520
512
|
getPublishingMarshaller(): import("@endo/exo").Guarded<{
|
|
521
513
|
toCapData(val: any): import("@endo/marshal").CapData<string>;
|
|
@@ -532,12 +524,12 @@ export function addOrchestrationToClient({ consume: { client, orchestration } }:
|
|
|
532
524
|
}>;
|
|
533
525
|
makePublishingRecorderKit: <T>(storageNode: StorageNode | Awaited<import("@endo/far").FarRef<StorageNode>>, valueShape?: import("@agoric/zoe/src/contractSupport/recorder.js").TypedMatcher<T> | undefined) => import("@agoric/zoe/src/contractSupport/recorder.js").RecorderKit<T>;
|
|
534
526
|
makeReadOnlyRecorderKit: <T>(storageNode: StorageNode | Awaited<import("@endo/far").FarRef<StorageNode>>, valueShape?: import("@agoric/zoe/src/contractSupport/recorder.js").TypedMatcher<T> | undefined) => import("@agoric/zoe/src/contractSupport/recorder.js").RecorderKit<T>;
|
|
535
|
-
} & import("@endo/
|
|
527
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
536
528
|
getBoard: () => import("@endo/exo").Guarded<{
|
|
537
|
-
getId(value: import("@endo/
|
|
538
|
-
getValue(id: BoardId): import("@endo/
|
|
529
|
+
getId(value: import("@endo/marshal").RemotableObject): string;
|
|
530
|
+
getValue(id: BoardId): import("@endo/marshal").RemotableObject;
|
|
539
531
|
lookup(...path: string[]): Promise<any>;
|
|
540
|
-
has(val: import("@endo/
|
|
532
|
+
has(val: import("@endo/marshal").RemotableObject): boolean;
|
|
541
533
|
ids(): string[];
|
|
542
534
|
getPublishingMarshaller(): import("@endo/exo").Guarded<{
|
|
543
535
|
toCapData(val: any): import("@endo/marshal").CapData<string>;
|
|
@@ -581,12 +573,22 @@ export function getManifestForOrchestration(_powers: any, { orchestrationRef }:
|
|
|
581
573
|
consume: {
|
|
582
574
|
loadCriticalVat: boolean;
|
|
583
575
|
portAllocator: string;
|
|
576
|
+
agoricNamesAdmin?: undefined;
|
|
577
|
+
chainStorage?: undefined;
|
|
584
578
|
};
|
|
585
579
|
produce: {
|
|
586
580
|
orchestration: string;
|
|
587
581
|
orchestrationKit: string;
|
|
588
582
|
orchestrationVat: string;
|
|
589
583
|
};
|
|
584
|
+
} | {
|
|
585
|
+
consume: {
|
|
586
|
+
agoricNamesAdmin: boolean;
|
|
587
|
+
chainStorage: boolean;
|
|
588
|
+
loadCriticalVat?: undefined;
|
|
589
|
+
portAllocator?: undefined;
|
|
590
|
+
};
|
|
591
|
+
produce?: undefined;
|
|
590
592
|
};
|
|
591
593
|
};
|
|
592
594
|
options: {
|
|
@@ -609,7 +611,7 @@ export type OrchestrationVats = {
|
|
|
609
611
|
}>>;
|
|
610
612
|
};
|
|
611
613
|
}>;
|
|
612
|
-
} & import("@endo/
|
|
614
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
613
615
|
makeOrchestrationKit(initialPowers?: Partial<import("../service.js").OrchestrationPowers> | undefined): import("@endo/exo").GuardedKit<{
|
|
614
616
|
self: {
|
|
615
617
|
allocateICAControllerPort(): Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestration-proposal.d.ts","sourceRoot":"","sources":["orchestration-proposal.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"orchestration-proposal.d.ts","sourceRoot":"","sources":["orchestration-proposal.js"],"names":[],"mappings":"AAgCO;;;;;;;;;;;;;;;;;wCAWL,eAAY;mIAyFV,eACE,GAAE;gBAAE,SAAc;oBAAE,iBAEf,KAAM,UAAU,eAAe,CAAC,CAAC,CAAA;iBAAE,CAAC;aAC3C;2DAcI,eAAe;8LAMjB,eACH;yFAS+5D,cAAc,kBAAoB;gBAAC,QAAS,CAAC,EAAC,uBAAwB,CAAA;aAAE;oMAAskF,eAAe;gNAA2gB,Y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AQ,CAAC,GAAG,CAAC,CAAC;QACnC,gBAAsB,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;QACtC,gBAAsB,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;KACjC;YAEK;IAAE,OAAO,EAAE;QAAE,gBAAgB,EAAE,YAAY,CAAA;KAAE,CAAA;CAAE,iBAsCzD;AAkDM,+FAFI,eAAe,iBAYzB;AAWM;;;;;;;;;;;;;;;;;;;;;;;;;;wBA+Bu8D,CAAC;;;;;;;;;;;;;;;;;;;;uBAA23O,CAAC;sCAA6B,CAAC;gCAAqB,CAAC;;;;;;;;6CARv3S,IAAF;;;6CAQu6G,IAAI;;oHAAyH,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDA1H9jH,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yCAuEvB,GAAE;;;;gBAmD+1B,SAAS;gBAA0C,SAAS;gBAA0D,QAAQ;gBAA6E,UAAU;;6FAAk2B,SAAS;;;;wFAAspB,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kHAApyE,MAAM;gHAAN,MAAM;;;;;;;;;;;;;;;;;;;;;kHAAN,MAAM;gHAAN,MAAM;;;;;;;;;;;;;;;;;;;aAjClS,MAAM,iBAOhB;AAEM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBL"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { makeTracer } from '@agoric/internal';
|
|
2
|
+
import { E, Far } from '@endo/far';
|
|
3
|
+
import { makeMarshal } from '@endo/marshal';
|
|
4
|
+
import { Fail } from '@agoric/assert';
|
|
5
|
+
import { registerChainNamespace } from '../chain-info.js';
|
|
6
|
+
|
|
7
|
+
const trace = makeTracer('CoreEvalOrchestration', true);
|
|
2
8
|
|
|
3
9
|
/**
|
|
4
10
|
* @import {PortAllocator} from '@agoric/network';
|
|
@@ -58,6 +64,67 @@ export const setupOrchestrationVat = async (
|
|
|
58
64
|
orchestrationKitP.resolve(newOrchestrationKit);
|
|
59
65
|
};
|
|
60
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Similar to publishAgoricNamesToChainStorage but publishes a node per chain
|
|
69
|
+
* instead of one list of entries
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @param {ERef<import('@agoric/vats').NameHubKit['nameAdmin']>} agoricNamesAdmin
|
|
74
|
+
* @param {ERef<StorageNode | null>} chainStorageP
|
|
75
|
+
*/
|
|
76
|
+
|
|
77
|
+
const publishChainInfoToChainStorage = async (
|
|
78
|
+
agoricNamesAdmin,
|
|
79
|
+
chainStorageP,
|
|
80
|
+
) => {
|
|
81
|
+
const chainStorage = await chainStorageP;
|
|
82
|
+
if (!chainStorage) {
|
|
83
|
+
console.warn('no chain storage, not registering chain info');
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const chainNamesNode = E(
|
|
88
|
+
E(chainStorage).makeChildNode('agoricNames'),
|
|
89
|
+
).makeChildNode('chain');
|
|
90
|
+
const { nameAdmin } = await E(agoricNamesAdmin).provideChild('chain');
|
|
91
|
+
|
|
92
|
+
await E(nameAdmin).onUpdate(
|
|
93
|
+
// XXX will live on the heap in the bootstrap vat. When we upgrade or kill
|
|
94
|
+
// that this handler will sever and vat-agoricNames will need to be upgraded
|
|
95
|
+
// to allow changing the handler, or to use pubsub mechanics instead.
|
|
96
|
+
Far('chain info writer', {
|
|
97
|
+
write(entries) {
|
|
98
|
+
// chainInfo has no cap data but we need to marshal bigints
|
|
99
|
+
const marshalData = makeMarshal(_val => Fail`data only`);
|
|
100
|
+
for (const [chainName, info] of entries) {
|
|
101
|
+
// XXX writes even if the entry hasn't changed
|
|
102
|
+
const chainNode = E(chainNamesNode).makeChildNode(chainName);
|
|
103
|
+
void E(chainNode).setValue(
|
|
104
|
+
JSON.stringify(marshalData.toCapData(info)),
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
}),
|
|
109
|
+
);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* @param {BootstrapPowers} powers
|
|
114
|
+
*/
|
|
115
|
+
export const initChainInfo = async ({
|
|
116
|
+
consume: { agoricNamesAdmin, chainStorage: chainStorageP },
|
|
117
|
+
}) => {
|
|
118
|
+
trace('init-chainInfo');
|
|
119
|
+
|
|
120
|
+
// First set up callback to write updates to vstorage
|
|
121
|
+
await publishChainInfoToChainStorage(agoricNamesAdmin, chainStorageP);
|
|
122
|
+
|
|
123
|
+
// Now register the names
|
|
124
|
+
await registerChainNamespace(agoricNamesAdmin, trace);
|
|
125
|
+
};
|
|
126
|
+
harden(initChainInfo);
|
|
127
|
+
|
|
61
128
|
/**
|
|
62
129
|
* @param {BootstrapPowers & {
|
|
63
130
|
* consume: {
|
|
@@ -86,6 +153,12 @@ export const getManifestForOrchestration = (_powers, { orchestrationRef }) => ({
|
|
|
86
153
|
orchestrationVat: 'orchestrationVat',
|
|
87
154
|
},
|
|
88
155
|
},
|
|
156
|
+
[initChainInfo.name]: {
|
|
157
|
+
consume: {
|
|
158
|
+
agoricNamesAdmin: true,
|
|
159
|
+
chainStorage: true,
|
|
160
|
+
},
|
|
161
|
+
},
|
|
89
162
|
},
|
|
90
163
|
options: {
|
|
91
164
|
orchestrationRef,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function startStakeBld({ consume: { agoricNames: agoricNamesP,
|
|
1
|
+
export function startStakeBld({ consume: { agoricNames: agoricNamesP, board, chainStorage, chainTimerService: chainTimerServiceP, localchain, startUpgradable, }, installation: { consume: { stakeBld }, }, instance: { produce: { stakeBld: produceInstance }, }, issuer: { consume: { [Stake.symbol]: stakeIssuer }, }, }: BootstrapPowers & {
|
|
2
2
|
installation: {
|
|
3
3
|
consume: {
|
|
4
4
|
stakeBld: Installation<(zcf: ZCF, privateArgs: {
|
|
@@ -140,7 +140,6 @@ export function getManifestForStakeBld({ restoreRef }: {
|
|
|
140
140
|
[x: string]: {
|
|
141
141
|
consume: {
|
|
142
142
|
agoricNames: boolean;
|
|
143
|
-
agoricNamesAdmin: boolean;
|
|
144
143
|
board: boolean;
|
|
145
144
|
chainStorage: boolean;
|
|
146
145
|
chainTimerService: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-stakeBld.d.ts","sourceRoot":"","sources":["start-stakeBld.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"start-stakeBld.d.ts","sourceRoot":"","sources":["start-stakeBld.js"],"names":[],"mappings":"AAkBO,6TAVI,eAAe,GAAG;IAC5B,YAAgB,EAAE;QAClB,OAAa,EAAE;YACf,QAAgB,EAAE,YAAY,OA0BT,GAAG;;;;;0CAgCS,MAAM,KAAK,CAAC;yCAkBrC,QAAQ,KAAK,CAAC,mBACG,OAAO;yCAegP,OAAO,KAAK,CAAC;;;uCAAgiB,EAAE;;;mCAAg0E,OAAO,sBAAsB,EAAE,SAAS;;;wCAAyqB,OAAO,sBAAsB,EAAE,SAAS,EAAE;;;;;;;;;;;;;;;wBA5D/1H,OAAO,kBAAkB,EAAE,OAAO;;;;;;;;;;;2EA4D01C,OAAO,KAAK,CAAC;;;6EAAid,OAAO,KAAK,CAAC;;;;;;;;;;;2EAAs4B,OAAO,KAAK,CAAC;;;6EAA+yB,OAAO,KAAK,CAAC;6CAhBzkH,QAAQ,KAAK,CAAC,mBACG,OAAO;6CAegP,OAAO,KAAK,CAAC;;;2CAAgiB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA1FtzB,CAAC;SACH,CAAC;KACH,CAAC;CACH,iBAwDH;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BN;sBApGqB,gCAAgC"}
|
|
@@ -2,7 +2,6 @@ import { makeTracer } from '@agoric/internal';
|
|
|
2
2
|
import { makeStorageNodeChild } from '@agoric/internal/src/lib-chainStorage.js';
|
|
3
3
|
import { Stake } from '@agoric/internal/src/tokens.js';
|
|
4
4
|
import { E } from '@endo/far';
|
|
5
|
-
import { registerChainNamespace } from '../chain-info.js';
|
|
6
5
|
|
|
7
6
|
const trace = makeTracer('StartStakeBld', true);
|
|
8
7
|
|
|
@@ -20,7 +19,6 @@ const trace = makeTracer('StartStakeBld', true);
|
|
|
20
19
|
export const startStakeBld = async ({
|
|
21
20
|
consume: {
|
|
22
21
|
agoricNames: agoricNamesP,
|
|
23
|
-
agoricNamesAdmin,
|
|
24
22
|
board,
|
|
25
23
|
chainStorage,
|
|
26
24
|
chainTimerService: chainTimerServiceP,
|
|
@@ -40,9 +38,6 @@ export const startStakeBld = async ({
|
|
|
40
38
|
const VSTORAGE_PATH = 'stakeBld';
|
|
41
39
|
trace('startStakeBld');
|
|
42
40
|
|
|
43
|
-
// Assumes this is the first proposal to need/provide `chain` namespace
|
|
44
|
-
await registerChainNamespace(agoricNamesAdmin, trace);
|
|
45
|
-
|
|
46
41
|
const storageNode = await makeStorageNodeChild(chainStorage, VSTORAGE_PATH);
|
|
47
42
|
|
|
48
43
|
// NB: committee must only publish what it intended to be public
|
|
@@ -64,7 +59,6 @@ export const startStakeBld = async ({
|
|
|
64
59
|
issuerKeywordRecord: harden({ In: await stakeIssuer }),
|
|
65
60
|
terms: {},
|
|
66
61
|
privateArgs: {
|
|
67
|
-
// BEFOREPUSh populate agoricNames with 'agoric' info and test in a3p
|
|
68
62
|
agoricNames,
|
|
69
63
|
localchain: await localchain,
|
|
70
64
|
timerService,
|
|
@@ -75,6 +69,7 @@ export const startStakeBld = async ({
|
|
|
75
69
|
|
|
76
70
|
const { instance } = await E(startUpgradable)(startOpts);
|
|
77
71
|
produceInstance.resolve(instance);
|
|
72
|
+
trace('done');
|
|
78
73
|
};
|
|
79
74
|
harden(startStakeBld);
|
|
80
75
|
|
|
@@ -84,7 +79,6 @@ export const getManifestForStakeBld = ({ restoreRef }, { installKeys }) => {
|
|
|
84
79
|
[startStakeBld.name]: {
|
|
85
80
|
consume: {
|
|
86
81
|
agoricNames: true,
|
|
87
|
-
agoricNamesAdmin: true,
|
|
88
82
|
board: true,
|
|
89
83
|
chainStorage: true,
|
|
90
84
|
chainTimerService: true,
|