Skip to content

Commit

Permalink
test: improve privateArgsShape
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed May 24, 2024
1 parent eea0f4e commit 730b349
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
5 changes: 3 additions & 2 deletions packages/orchestration/src/examples/stakeAtom.contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/

import { makeTracer, StorageNodeShape } from '@agoric/internal';
import { TimerServiceShape } from '@agoric/time';
import { V as E } from '@agoric/vow/vat.js';
import { prepareRecorderKitMakers } from '@agoric/zoe/src/contractSupport';
import { InvitationShape } from '@agoric/zoe/src/typeGuards.js';
Expand All @@ -22,8 +23,8 @@ export const meta = harden({
privateArgsShape: {
orchestration: M.remotable('orchestration'),
storageNode: StorageNodeShape,
marshaller: M.remotable('Marshaller'),
timer: M.remotable('TimerService'),
marshaller: M.remotable('marshaller'),
timer: TimerServiceShape,
},
});
export const privateArgsShape = meta.privateArgsShape;
Expand Down
11 changes: 6 additions & 5 deletions packages/orchestration/src/examples/swapExample.contract.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { StorageNodeShape } from '@agoric/internal';
import { TimerServiceShape } from '@agoric/time';
import { withdrawFromSeat } from '@agoric/zoe/src/contractSupport/zoeHelpers.js';
import { Far } from '@endo/far';
import { deeplyFulfilled } from '@endo/marshal';
Expand All @@ -18,10 +19,10 @@ import { orcUtils } from '../utils/orc.js';
/** @type {ContractMeta} */
export const meta = {
privateArgsShape: {
localchain: M.any(),
orchestrationService: M.any(),
localchain: M.remotable('localchain'),
orchestrationService: M.or(M.remotable('orchestration'), null),
storageNode: StorageNodeShape,
timerService: M.any(),
timerService: M.or(TimerServiceShape, null),
zone: M.any(),
},
upgradability: 'canUpgrade',
Expand All @@ -41,9 +42,9 @@ export const makeNatAmountShape = (brand, min) =>
* @param {ZCF} zcf
* @param {{
* localchain: Remote<LocalChain>;
* orchestrationService: Remote<OrchestrationService>;
* orchestrationService: Remote<OrchestrationService> | null;
* storageNode: Remote<StorageNode>;
* timerService: Remote<TimerService>;
* timerService: Remote<TimerService> | null;
* zone: Zone;
* }} privateArgs
*/
Expand Down
4 changes: 2 additions & 2 deletions packages/orchestration/src/facade.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ const makeRemoteChainFacade = name => {
*
* @param {{
* zone: Zone;
* timerService: Remote<TimerService>;
* timerService: Remote<TimerService> | null;
* zcf: ZCF;
* storageNode: Remote<StorageNode>;
* orchestrationService: Remote<OrchestrationService>;
* orchestrationService: Remote<OrchestrationService> | null;
* localchain: Remote<LocalChain>;
* }} powers
*/
Expand Down

0 comments on commit 730b349

Please sign in to comment.