Skip to content

Commit

Permalink
#1 Update assets
Browse files Browse the repository at this point in the history
  • Loading branch information
anilhelvaci committed Dec 12, 2023
1 parent 2fcdd43 commit 7101185
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion proposals/64:crabble-start/assets/bundle-contract.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion proposals/64:crabble-start/assets/bundle-governor.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion proposals/64:crabble-start/assets/crabble-permit.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"agoricNames": true,
"zoe": true,
"namesByAddressAdmin": true,
"startMyGovernedUpgradable": true,
"startCrabbleGovernedUpgradable": true,
"startUpgradable": true
},
"installation": {
Expand Down
16 changes: 8 additions & 8 deletions proposals/64:crabble-start/assets/crabbleCoreEval.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ const startCommittee = async (
namesByAddressAdmin,
startUpgradable,
},
installation: { consume: { committee: committeeInstallationP } },
installation: {
consume: { committee: committeeInstallationP },
},
instance: { produce: produceInstance },
},
config,
Expand Down Expand Up @@ -114,7 +116,7 @@ const startCommittee = async (
* consume: {
* zoe: Promise<ZoeService>;
* board: ERef<XMPORT('@agoric/vats').Board>,
* startMyGovernedUpgradable: Promise<Function>,
* startCrabbleGovernedUpgradable: Promise<Function>,
* chainTimerService: ERef<XMPORT('@agoric/time/src/types').TimerService>;
* agoricNames: ERef<XMPORT('@agoric/vats').NameHub>;
* },
Expand All @@ -128,15 +130,13 @@ const startCommittee = async (
* }>} committeeInfoP
*/
const startCrabble = async (powers, config, crabbleNode, committeeInfoP) => {
// eslint-disable-next-line
const contractBundleID = "b1-46f82a8b8348f7c2dcae1ddc1ace085f5f489d493f7df24ce8f2334199b21eeb9ed848de5e2814f200ba47470ff3bd83b08d74055da2a454f94c2a0c565bf557";
// eslint-disable-next-line
const governorBundleID = "b1-bde789b8f6623f2352dc2d4a781f39066bbb63366602ac3c70943760418a9c7e63b8d9cfad6c8601e418ec5dfd29f1b62b2419bd2cd7f5907f59a62aff37e332";
const contractBundleID = "b1-145f84363c784c96bc5a5d456edf1853bf2bb04388a250f010a53234b333af46d8d08e3c58d6e3bac61c45b18e82a09199938466616016a22d9191448f8e505c";
const governorBundleID = "b1-d67b9ac5100bf45a3369d393fe2cb38e0718f770cac936292a18270ed331865ffa817719f5c6ceacdb1a580572d71084db0545e8e13efaee38c7df76f51f756c";

const {
consume: {
board,
startMyGovernedUpgradable,
startCrabbleGovernedUpgradable,
zoe: zoeI, // only used for installation, not for startInstance
chainTimerService,
agoricNames: agoricNamesP,
Expand Down Expand Up @@ -203,7 +203,7 @@ const startCrabble = async (powers, config, crabbleNode, committeeInfoP) => {
});

logger('Starting governor, governed...');
const kit = await E(startMyGovernedUpgradable)({
const kit = await E(startCrabbleGovernedUpgradable)({
installation: contractInstallation,
committeeCreatorFacet,
contractGovernor: governorInstallation,
Expand Down
2 changes: 1 addition & 1 deletion proposals/64:crabble-start/assets/gov-permit.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"zoe": true
},
"produce": {
"startMyGovernedUpgradable": true
"startCrabbleGovernedUpgradable": true
}
}
22 changes: 12 additions & 10 deletions proposals/64:crabble-start/assets/govStarting.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const ParamTypes = /** @type {const} */ ({
const { fromEntries, entries } = Object;

/** @type { <T extends Record<string, ERef<any>>>(obj: T) => Promise<{ [K in keyof T]: Awaited<T[K]>}> } */
const allValues = async obj => {
const allValues = async (obj) => {
const es = await Promise.all(
entries(obj).map(async ([k, v]) => [k, await v]),
);
Expand Down Expand Up @@ -59,7 +59,7 @@ const logger = (message) => {
* }} govArgs
* @returns {Promise<GovernanceFacetKit<SF>>}
*/
const startMyGovernedInstance = async (
const startCrabbleGovernedInstance = async (
{
zoe,
governedContractInstallation,
Expand Down Expand Up @@ -147,13 +147,13 @@ const startMyGovernedInstance = async (
/**
* @param {BootstrapSpace & {
* produce: {
* startMyGovernedUpgradable: Producer<Function>;
* startCrabbleGovernedUpgradable: Producer<Function>;
* };
* }} powers
*/
const produceStartMyGovernedUpgradable = async ({
const produceStartCrabbleGovernedUpgradable = async ({
consume: { chainTimerService, governedContractKits, diagnostics, zoe },
produce, // startMyGovernedUpgradable
produce, // startCrabbleGovernedUpgradable
}) => {
logger('Producing governed upgradable...');
/**
Expand All @@ -176,8 +176,8 @@ const produceStartMyGovernedUpgradable = async ({
label,
}) => {
const contractKits = await governedContractKits;
logger('Init startMyGovernedInstance...');
const facets = await startMyGovernedInstance(
logger('Init startCrabbleGovernedInstance...');
const facets = await startCrabbleGovernedInstance(
{
zoe,
governedContractInstallation: installation,
Expand Down Expand Up @@ -207,10 +207,12 @@ const produceStartMyGovernedUpgradable = async ({
return facets;
};

produce.startMyGovernedUpgradable.resolve(harden(startGovernedUpgradable));
produce.startCrabbleGovernedUpgradable.resolve(
harden(startGovernedUpgradable),
);
logger('Done.');
};
harden(produceStartMyGovernedUpgradable);
harden(produceStartCrabbleGovernedUpgradable);

// script completion value
produceStartMyGovernedUpgradable;
produceStartCrabbleGovernedUpgradable;

0 comments on commit 7101185

Please sign in to comment.