Skip to content

Commit

Permalink
chore(types): boot tool driver types
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg authored and FUDCo committed Dec 8, 2023
1 parent 8f806bf commit 881bf9d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions packages/boot/tools/drivers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ export const makePriceFeedDriver = async (
},
};
};
harden(makePriceFeedDriver);
export type PriceFeedDriver = Awaited<ReturnType<typeof makePriceFeedDriver>>;

export const makeGovernanceDriver = async (
testKit: SwingsetTestKit,
Expand Down Expand Up @@ -318,6 +320,8 @@ export const makeGovernanceDriver = async (
ecMembers,
};
};
harden(makeGovernanceDriver);
export type GovernanceDriver = Awaited<ReturnType<typeof makeGovernanceDriver>>;

export const makeZoeDriver = async (testKit: SwingsetTestKit) => {
const { EV } = testKit.runUtils;
Expand Down Expand Up @@ -402,3 +406,5 @@ export const makeZoeDriver = async (testKit: SwingsetTestKit) => {
},
};
};
harden(makeZoeDriver);
export type ZoeDriver = Awaited<ReturnType<typeof makeZoeDriver>>;
10 changes: 5 additions & 5 deletions packages/boot/tools/liquidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ import {
} from '@agoric/vats/tools/board-utils.js';
import { Offers } from '@agoric/inter-protocol/src/clientSupport.js';
import type { ExecutionContext } from 'ava';
import { makeSwingsetTestKit } from './supports.ts';
import { type SwingsetTestKit, makeSwingsetTestKit } from './supports.ts';
import {
type GovernanceDriver,
type PriceFeedDriver,
type WalletFactoryDriver,
makeGovernanceDriver,
makePriceFeedDriver,
makeWalletFactoryDriver,
Expand Down Expand Up @@ -76,10 +79,7 @@ export const makeLiquidationTestKit = async ({
governanceDriver: GovernanceDriver;
t: Pick<ExecutionContext, 'like'>;
}) => {
const priceFeedDrivers = {} as Record<
string,
Awaited<ReturnType<typeof makePriceFeedDriver>>
>;
const priceFeedDrivers = {} as Record<string, PriceFeedDriver>;

console.timeLog('DefaultTestContext', 'priceFeedDriver');

Expand Down

0 comments on commit 881bf9d

Please sign in to comment.