Skip to content

Commit

Permalink
chore(types): use Remote
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed May 24, 2024
1 parent dbad354 commit eea0f4e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
10 changes: 5 additions & 5 deletions packages/orchestration/src/examples/swapExample.contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { orcUtils } from '../utils/orc.js';
* @import {Orchestrator, IcaAccount, CosmosValidatorAddress} from '../types.js'
* @import {TimerService} from '@agoric/time';
* @import {LocalChain} from '@agoric/vats/src/localchain.js';
* @import {ERef} from '@endo/far'
* @import {Remote} from '@agoric/internal';
* @import {OrchestrationService} from '../service.js';
* @import {Zone} from '@agoric/zone';
*/
Expand Down Expand Up @@ -40,10 +40,10 @@ export const makeNatAmountShape = (brand, min) =>
/**
* @param {ZCF} zcf
* @param {{
* localchain: ERef<LocalChain>;
* orchestrationService: ERef<OrchestrationService>;
* storageNode: ERef<StorageNode>;
* timerService: ERef<TimerService>;
* localchain: Remote<LocalChain>;
* orchestrationService: Remote<OrchestrationService>;
* storageNode: Remote<StorageNode>;
* timerService: Remote<TimerService>;
* zone: Zone;
* }} privateArgs
*/
Expand Down
10 changes: 5 additions & 5 deletions packages/orchestration/src/examples/unbondExample.contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ import { makeOrchestrationFacade } from '../facade.js';
* @import {Orchestrator, IcaAccount, CosmosValidatorAddress} from '../types.js'
* @import {TimerService} from '@agoric/time';
* @import {LocalChain} from '@agoric/vats/src/localchain.js';
* @import {ERef} from '@endo/far'
* @import {Remote} from '@agoric/internal';
* @import {OrchestrationService} from '../service.js';
* @import {Zone} from '@agoric/zone';
*/

/**
* @param {ZCF} zcf
* @param {{
* localchain: ERef<LocalChain>;
* orchestrationService: ERef<OrchestrationService>;
* storageNode: ERef<StorageNode>;
* timerService: ERef<TimerService>;
* localchain: Remote<LocalChain>;
* orchestrationService: Remote<OrchestrationService>;
* storageNode: Remote<StorageNode>;
* timerService: Remote<TimerService>;
* zone: Zone;
* }} privateArgs
*/
Expand Down
12 changes: 6 additions & 6 deletions packages/orchestration/src/facade.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { E } from '@endo/far';
* @import {Zone} from '@agoric/zone';
* @import {TimerService} from '@agoric/time';
* @import {LocalChain} from '@agoric/vats/src/localchain.js';
* @import {ERef} from '@endo/far';
* @import {Remote} from '@agoric/internal';
* @import {OrchestrationService} from './service.js';
* @import {Chain, ChainInfo, OrchestrationAccount, Orchestrator} from './types.js';
*/
Expand All @@ -15,7 +15,7 @@ import { E } from '@endo/far';
const anyVal = null;

/**
* @param {ERef<LocalChain>} localchain
* @param {Remote<LocalChain>} localchain
* @returns {Chain}
*/
const makeLocalChainFacade = localchain => {
Expand Down Expand Up @@ -134,11 +134,11 @@ const makeRemoteChainFacade = name => {
*
* @param {{
* zone: Zone;
* timerService: ERef<TimerService>;
* timerService: Remote<TimerService>;
* zcf: ZCF;
* storageNode: ERef<StorageNode>;
* orchestrationService: ERef<OrchestrationService>;
* localchain: ERef<LocalChain>;
* storageNode: Remote<StorageNode>;
* orchestrationService: Remote<OrchestrationService>;
* localchain: Remote<LocalChain>;
* }} powers
*/
export const makeOrchestrationFacade = ({
Expand Down
3 changes: 2 additions & 1 deletion packages/orchestration/src/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {

/**
* @import { Zone } from '@agoric/base-zone';
* @import {Remote} from '@agoric/internal';
* @import { Port, PortAllocator } from '@agoric/network';
* @import { IBCConnectionID } from '@agoric/vats';
* @import { ICQConnection, IcaAccount, ICQConnectionKit } from './types.js';
Expand All @@ -21,7 +22,7 @@ const { Fail, bare } = assert;

/**
* @typedef {object} OrchestrationPowers
* @property {ERef<PortAllocator>} portAllocator
* @property {Remote<PortAllocator>} portAllocator
*/

/**
Expand Down

0 comments on commit eea0f4e

Please sign in to comment.