Skip to content

Commit

Permalink
feat!: remove orch.makeLocalAccount
Browse files Browse the repository at this point in the history
- closes: #10106
  • Loading branch information
0xpatrickdev committed Oct 15, 2024
1 parent 9883fcf commit d567331
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,6 @@ Generated by [AVA](https://avajs.dev).
},
],
},
LocalChainAccountShape: Object @match:remotable {
payload: {
label: 'LocalChainAccount',
},
},
OutboundConnectionHandlerI: Object @guard:interfaceGuard {
payload: {
defaultGuards: undefined,
Expand Down
Binary file not shown.
9 changes: 0 additions & 9 deletions packages/orchestration/src/exos/orchestrator.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ import { pickFacet } from '@agoric/vat-data';
import { makeTracer } from '@agoric/internal';
import { Shape as NetworkShape } from '@agoric/network';
import { Fail, q } from '@endo/errors';
import { E } from '@endo/far';
import { M } from '@endo/patterns';
import {
DenomInfoShape,
ChainInfoShape,
DenomAmountShape,
DenomShape,
LocalChainAccountShape,
} from '../typeGuards.js';

/**
Expand All @@ -36,7 +34,6 @@ const trace = makeTracer('Orchestrator');
/** @see {Orchestrator} */
export const OrchestratorI = M.interface('Orchestrator', {
getChain: M.call(M.string()).returns(Vow$(ChainInfoShape)),
makeLocalAccount: M.call().returns(Vow$(LocalChainAccountShape)),
getDenomInfo: M.call(DenomShape).returns(DenomInfoShape),
asAmount: M.call(DenomAmountShape).returns(AmountShape),
});
Expand All @@ -46,7 +43,6 @@ export const OrchestratorI = M.interface('Orchestrator', {
* @param {{
* asyncFlowTools: AsyncFlowTools;
* chainHub: ChainHub;
* localchain: Remote<LocalChain>;
* makeRecorderKit: MakeRecorderKit;
* makeLocalChainFacade: MakeLocalChainFacade;
* makeRemoteChainFacade: MakeRemoteChainFacade;
Expand All @@ -61,7 +57,6 @@ const prepareOrchestratorKit = (
zone,
{
chainHub,
localchain,
makeLocalChainFacade,
makeRemoteChainFacade,
vowTools: { watch, asVow },
Expand Down Expand Up @@ -148,9 +143,6 @@ const prepareOrchestratorKit = (
return vow;
});
},
makeLocalAccount() {
return watch(E(localchain).makeAccount());
},
/** @type {HostOf<Orchestrator['getDenomInfo']>} */
getDenomInfo(denom) {
const denomDetail = chainHub.getAsset(denom);
Expand Down Expand Up @@ -185,7 +177,6 @@ harden(prepareOrchestratorKit);
* @param {{
* asyncFlowTools: AsyncFlowTools;
* chainHub: ChainHub;
* localchain: Remote<LocalChain>;
* makeRecorderKit: MakeRecorderKit;
* makeLocalChainFacade: MakeLocalChainFacade;
* makeRemoteChainFacade: MakeRemoteChainFacade;
Expand Down
9 changes: 2 additions & 7 deletions packages/orchestration/src/orchestration-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ export interface Chain<CI extends ChainInfo> {

// "makeAccount" suggests an operation within a vat
/**
* Creates a new account on the remote chain.
* @returns an object that controls a new remote account on Chain
* Creates a new Orchestration Account on the current Chain.
* @returns an object that controls the account
*/
makeAccount: () => Promise<OrchestrationAccount<CI>>;
// FUTURE supply optional port object; also fetch port object
Expand Down Expand Up @@ -136,11 +136,6 @@ export interface Orchestrator {
(C extends 'agoric' ? AgoricChainMethods : {})
>;

/**
* Make a new local (Agoric) ChainAccount
*/
makeLocalAccount: () => Promise<LocalChainAccount>;

/**
* For a denom, return information about a denom including the equivalent
* local Brand, the Chain on which the denom is held, and the Chain that
Expand Down
1 change: 0 additions & 1 deletion packages/orchestration/src/typeGuards.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ export const CosmosChainInfoShape = M.splitRecord(
export const ChainInfoShape = M.splitRecord({
chainId: M.string(),
});
export const LocalChainAccountShape = M.remotable('LocalChainAccount');
export const DenomShape = M.string();

/** @type {TypedPattern<DenomInfo<any, any>>} */
Expand Down
1 change: 0 additions & 1 deletion packages/orchestration/src/utils/start-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ export const provideOrchestration = (
const makeOrchestrator = prepareOrchestrator(zones.orchestration, {
asyncFlowTools,
chainHub,
localchain: remotePowers.localchain,
makeRecorderKit,
makeLocalChainFacade,
makeRemoteChainFacade,
Expand Down
1 change: 0 additions & 1 deletion packages/orchestration/test/snapshots/exports.test.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Generated by [AVA](https://avajs.dev).
'IBCConnectionInfoShape',
'IBCTransferOptionsShape',
'ICQMsgShape',
'LocalChainAccountShape',
'OutboundConnectionHandlerI',
'Proto3Shape',
'TimestampProtoShape',
Expand Down
Binary file modified packages/orchestration/test/snapshots/exports.test.ts.snap
Binary file not shown.

0 comments on commit d567331

Please sign in to comment.