Skip to content

Commit

Permalink
chore(vats): update GOVERNANCE_ACTIONS_MANIFEST
Browse files Browse the repository at this point in the history
 - shareEconomyBundles
 - EconomyBootstrapPowers type tweaks
  • Loading branch information
dckc committed Jan 31, 2022
1 parent a889f38 commit d864c78
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 11 deletions.
24 changes: 24 additions & 0 deletions packages/vats/src/core/chain-behaviors.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import {
makeSubscriptionKit,
observeIteration,
} from '@agoric/notifier';
import {
governanceBundles,
economyBundles,
ammBundle,
} from '@agoric/run-protocol/src/importedBundles.js';

import { makeBridgeManager as makeBridgeManagerKit } from '../bridge.js';

Expand Down Expand Up @@ -167,3 +172,22 @@ export const connectChainFaucet = async ({ consume: { client } }) => {
return E(client).assignBundle({ faucet: makeFaucet });
};
harden(connectChainFaucet);

/** @param {BootstrapPowers} powers */
export const shareEconomyBundles = async ({
produce: {
ammBundle: ammP,
getRUNBundle,
vaultBundles,
governanceBundles: govP,
},
}) => {
govP.resolve(governanceBundles);
ammP.resolve(ammBundle);
vaultBundles.resolve({
VaultFactory: economyBundles.VaultFactory,
liquidate: economyBundles.liquidate,
});
getRUNBundle.resolve(economyBundles.getRUN);
};
harden(shareEconomyBundles);
50 changes: 39 additions & 11 deletions packages/vats/src/core/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,36 +129,64 @@ export const SIM_CHAIN_BOOTSTRAP_MANIFEST = harden({
});

export const GOVERNANCE_ACTIONS_MANIFEST = harden({
shareEconomyBundles: {
produce: {
ammBundle: true,
getRUNBundle: true,
vaultBundles: true,
governanceBundles: true,
},
},
startEconomicCommittee: {
consume: { agoricNames: true, nameAdmins: true, zoe: true },
consume: {
agoricNames: true,
nameAdmins: true,
zoe: true,
governanceBundles: true,
},
produce: { economicCommitteeCreatorFacet: true },
},
startVaultFactory: {
setupAmm: {
consume: {
chainTimerService: true,
agoricNames: true,
nameAdmins: true,
board: true,
chainTimerService: true,
loadVat: true,
zoe: true,
feeMintAccess: true,
},
produce: {
priceAuthorityAdmin: true,
economicCommitteeCreatorFacet: true,
ammBundle: true,
},
produce: { ammCreatorFacet: true, ammGovernorCreatorFacet: true },
},
installEconomicGovernance: {
startPriceAuthority: {
consume: { loadVat: true },
produce: { priceAuthority: true, priceAuthorityAdmin: true },
},
startVaultFactory: {
consume: {
zoe: true,
feeMintAccess: true,
agoricNames: true,
vaultBundles: true,
nameAdmins: true,
chainTimerService: true,
zoe: true,
priceAuthority: true,
economicCommitteeCreatorFacet: true,
},
produce: {
vaultFactoryCreator: true,
vaultFactoryGovernorCreator: true,
vaultFactoryVoteCreator: true,
},
},
configureVaultFactoryUI: {
consume: { agoricNames: true, nameAdmins: true, board: true, zoe: true },
},
startGetRun: {
consume: {
zoe: true,
feeMintAccess: true,
agoricNames: true,
getRUNBundle: true,
chainTimerService: true,
nameAdmins: true,
bridgeManager: true,
Expand Down
2 changes: 2 additions & 0 deletions packages/vats/src/core/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
* chainTimerService: ERef<TimerService>,
* economicCommitteeCreatorFacet: ERef<CommitteeElectorateCreatorFacet>,
* ammBundle: ERef<{ moduleFormat: string }>,
* getRUNBundle: ERef<{ moduleFormat: string }>,
* vaultBundles: ERef<Record<string, { moduleFormat: string }>>,
* feeMintAccess: ERef<FeeMintAccess>,
* governanceBundles: ERef<Record<string, { moduleFormat: string }>>,
Expand All @@ -115,6 +116,7 @@
* chainTimerService: Producer<ERef<TimerService>>,
* economicCommitteeCreatorFacet: Producer<CommitteeElectorateCreatorFacet>,
* ammBundle: Producer<{ moduleFormat: string }>,
* getRUNBundle: Producer<{ moduleFormat: string }>,
* vaultBundles: Producer<Record<string, { moduleFormat: string }>>,
* governanceBundles: Producer<Record<string, { moduleFormat: string }>>,
* feeMintAccess: Producer<FeeMintAccess>,
Expand Down

0 comments on commit d864c78

Please sign in to comment.