Skip to content

Commit

Permalink
chore(provisionPool): update core-eval proposal to add governedParamO…
Browse files Browse the repository at this point in the history
…verrides to privateArgs

rel: #10562
  • Loading branch information
Jorge-Lopes committed Nov 28, 2024
1 parent 989a16b commit 7dbc32b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 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,21 @@ export const upgradeProvisionPool = async (
E(electorateCreatorFacet).getPoserInvitation(),
]);

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

const params = await E(publicFacet).getGovernedParams();
return harden({
PerAccountInitialAmount: params.PerAccountInitialAmount.value,
});
};
const governedParamOverrides = await readCurrentGovernedParams();
console.log('governedParamOverrides: ', { governedParamOverrides });

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

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

0 comments on commit 7dbc32b

Please sign in to comment.