Skip to content

Commit

Permalink
provideAccount --> makeAccount
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Apr 22, 2024
1 parent 807136e commit be153d2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const prepareStakingAccountHolder = (baggage, makeRecorderKit, zcf) => {
return this.state.topicKit.recorder;
},
// TODO move this beneath the Orchestration abstraction,
// to the OrchestrationAccount provided by provideAccount()
// to the OrchestrationAccount provided by makeAccount()
/**
* _Assumes users has already sent funds to their ICA, until #9193
* @param {string} validatorAddress
Expand Down
4 changes: 2 additions & 2 deletions packages/orchestration/src/contracts/swapExample.contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export const start = async (zcf, privateArgs) => {
!AmountMath.isEmpty(give.USDC) || Fail`Must provide USDC.`;

const [celestiaAccount, localAccount] = await Promise.all([
E(celestia).provideAccount('main'),
E(agoric).provideAccount('main'),
E(celestia).makeAccount(),
E(agoric).makeAccount(),
]);

const tiaAddress = await E(
Expand Down
11 changes: 3 additions & 8 deletions packages/orchestration/src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,12 @@ interface QueryResult {}
*/
export interface Chain {
getChainInfo: () => Promise<ChainInfo>;
// TODO change this to makeAccount(), letting the scope handle naming
/**
* Provide (get or make) an account on the chain. The account is a
* named account associated with the current orchestrator instance
* (typically associated with a specific seat). If an account for this `Chain`
* with the provided `petName` already exists, it is returned,
* otherwise a new account is created on the remote Chain.
* @param petName
* Make an account on the chain, associated with the current orchestrator
* instance (typically associated with a specific seat).
* @returns the account that controls the
*/
provideAccount: (petName?: string) => Promise<OrchestrationAccount>;
makeAccount: () => Promise<OrchestrationAccount>;
/* query external chain state */
query: (queries: Proto3JSONMsg[]) => Promise<Iterable<QueryResult>>;

Expand Down

0 comments on commit be153d2

Please sign in to comment.