Skip to content

Commit

Permalink
WIP WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Mar 10, 2024
1 parent 0f4f535 commit 05c83d9
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions contract/test/lib-gov-test/puppet-gov.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ const assets = {
),
};

export const installCommitteeContract = async (zoe, produce, bundleCache) => {
const committeeBundle = await bundleCache.load(
assets.committeBundle,
'committee',
);

produce.committee.resolve(E(zoe).install(committeeBundle));
};

/**
* Install governance contracts, with a "puppet" governor for use in tests.
*
Expand All @@ -27,12 +36,7 @@ const assets = {
* @typedef {Awaited<ReturnType<typeof import('@endo/bundle-source/cache.js').makeNodeBundleCache>>} BundleCache
*/
export const installPuppetGovernance = async (zoe, produce, bundleCache) => {
const committeeBundle = await bundleCache.load(
assets.committeBundle,
'committee',
);

produce.committee.resolve(E(zoe).install(committeeBundle));
await installCommitteeContract(zoe, produce, bundleCache);
produce.contractGovernor.resolve(
E(zoe).install(await bundleCache.load(assets.puppetContractGovernor)),
);
Expand Down

0 comments on commit 05c83d9

Please sign in to comment.