Skip to content

Commit

Permalink
chore(provisionPool): update core-eval proposal to include directorPa…
Browse files Browse the repository at this point in the history
…ramOverrides

rel: #10562
  • Loading branch information
Jorge-Lopes committed Nov 28, 2024
1 parent 7aaed27 commit ae3d15c
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion packages/vats/src/proposals/upgrade-provisionPool-proposal.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const upgradeProvisionPool = async (
provisionPoolStartResultP,
instancePrivateArgsP,
]);
const { adminFacet, instance } = provisionPoolStartResult;
const { adminFacet, instance, publicFacet } = provisionPoolStartResult;

const [originalPrivateArgs, poserInvitation] = await Promise.all([
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
Expand All @@ -38,9 +38,23 @@ export const upgradeProvisionPool = async (
E(electorateCreatorFacet).getPoserInvitation(),
]);

const readCurrentDirectorParams = async () => {
await null;

/* params object should be fetched from the getElectorateSubscription
* publicFacet method on a next incarnation */
const params = await E(publicFacet).getGovernedParams();
return harden({
PerAccountInitialAmount: params.PerAccountInitialAmount.value,
});
};
const directorParamOverrides = await readCurrentDirectorParams();
console.log('directorParamOverrides: ', { directorParamOverrides });

const newPrivateArgs = harden({
...originalPrivateArgs,
initialPoserInvitation: poserInvitation,
directorParamOverrides,
});

const upgradeResult = await E(adminFacet).upgradeContract(
Expand Down

0 comments on commit ae3d15c

Please sign in to comment.