diff --git a/packages/vats/src/proposals/upgrade-provisionPool-proposal.js b/packages/vats/src/proposals/upgrade-provisionPool-proposal.js index 9d31c752607..39ae27df3fb 100644 --- a/packages/vats/src/proposals/upgrade-provisionPool-proposal.js +++ b/packages/vats/src/proposals/upgrade-provisionPool-proposal.js @@ -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 @@ -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(