Skip to content

Commit

Permalink
chore: attempting to run
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris-Hibbert committed Feb 20, 2024
1 parent 42e81f8 commit 66e3202
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 103 deletions.
90 changes: 0 additions & 90 deletions a3p-integration/proposals/a:upgrade-next/repairs.test.js

This file was deleted.

10 changes: 5 additions & 5 deletions packages/vats/src/proposals/probeZcfBundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ const probeZcfBundleCap = async (
options,
) => {
console.log('probeZcfBundle start');
const { zoeRef, zcfRef, walletRef } = options.options;
const { zoeRef, zcfRef } = options.options;

const { adminNode, root: zoeRoot } = await E(vatStore).get('zoe');
const zoeConfigFacet = await E(zoeRoot).getZoeConfigFacet();

// STEP 1: upgrade WF again; see what ZCF bundle was used //////////////////
// STEP 1: restart WF; see what ZCF bundle was used //////////////////

const WALLET_STORAGE_PATH_SEGMENT = 'wallet';
const [walletBridgeManager, walletStorageNode, ppFacets] = await Promise.all([
Expand All @@ -38,7 +38,7 @@ const probeZcfBundleCap = async (
};

const { adminFacet } = await walletFactoryStartResult;
await E(adminFacet).upgradeContract(walletRef.bundleID, privateArgs);
await E(adminFacet).restartContract(privateArgs);

// STEP 2: Set the ZCF bundle ////////////////////////
await E(zoeConfigFacet).updateZcfBundleId(zcfRef.bundleID);
Expand All @@ -50,8 +50,8 @@ const probeZcfBundleCap = async (
const zoeBundleCap = await E(vatAdminSvc).getBundleCap(zoeRef.bundleID);
await E(adminNode).upgrade(zoeBundleCap, {});

// STEP 4: Upgrade WF again ////////////////////////
await E(adminFacet).upgradeContract(walletRef.bundleID, privateArgs);
// STEP 4: restart WF ////////////////////////
await E(adminFacet).restartContract(privateArgs);

// ////// See which zcf bundle was used //////////
};
Expand Down
17 changes: 9 additions & 8 deletions scripts/generate-a3p-submission.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@ set -ueo pipefail

sdkroot=$(cd -- "$(dirname "$0")/.." >/dev/null && pwd)

cd $sdkroot
cd "$sdkroot"

buildSubmission() {
proposalName=$1
a3pProposal=$2
output=${3:-$proposalName}
submissionName=${4:-submission}

yarn agoric run packages/builders/scripts/vats/$1.js
yarn agoric run "packages/builders/scripts/vats/$proposalName.js"

mkdir -p $sdkroot/a3p-integration/proposals/$2/submission
cp $(grep -oh '/.*b1-.*.json' $sdkroot/$1*) a3p-integration/proposals/$2/submission
mv $sdkroot/$1* a3p-integration/proposals/$2/submission
submissionDir="a3p-integration/proposals/$a3pProposal/$submissionName"
mkdir -p "$submissionDir"
cp $(grep -oh '/.*b1-.*.json' "$output"*) "$submissionDir"
mv "$output"* "$submissionDir"
}

buildSubmission restart-vats "b:restart-vats"

## clean anything already there
#rm -f $sdkroot/a3p-integration/proposals/$probe_SUBMISSION/*
buildSubmission probe-zcf-bundle "a:upgrade-next" probeZcfBundle probe-submission

0 comments on commit 66e3202

Please sign in to comment.