-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All existing tests in governance, zoe, boot, and inter-protocol pass. deployment tests are next
- Loading branch information
1 parent
52bc8ec
commit 8f9233f
Showing
72 changed files
with
2,223 additions
and
2,627 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...de-test/upgrade-test-scripts/agoric-upgrade-11/contract-upgrade/vault-upgrade-permit.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"consume": { | ||
"vatAdminSvc": true, | ||
"vaultFactoryKit": true, | ||
"chainStorage": true | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
...ade-test/upgrade-test-scripts/agoric-upgrade-11/contract-upgrade/vaults-upgrade-script.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// to turn on ts-check: | ||
/* global E */ | ||
|
||
// import { E } from "@endo/far"; | ||
|
||
const GOV_BUNDLE_ID = 'b1-'; | ||
const VAULTS_BUNDLE_ID = 'b1-'; | ||
|
||
console.info('Vaults upgrade: evaluating script'); | ||
|
||
/* | ||
* Test an upgrade of the VaultFactory and its governing contract. | ||
*/ | ||
const upgradeVaultFactory = async powers => { | ||
console.info('upgrade vaultFactory'); | ||
const { | ||
consume: { | ||
chainStorage, | ||
vatAdminSvc, | ||
vaultFactoryKit: { | ||
governorAdminFacet, | ||
adminFacet: vaultsAdminFacet, | ||
instance, | ||
privateArgs, | ||
}, | ||
}, | ||
} = powers; | ||
|
||
const newGovernorBundleCap = await E(vatAdminSvc).getBundleCap(GOV_BUNDLE_ID); | ||
const newVaultsBundleCap = await E(vatAdminSvc).getBundleCap( | ||
VAULTS_BUNDLE_ID, | ||
); | ||
|
||
// consider modifying privateArgs. | ||
await E(governorAdminFacet).upgrade(newGovernorBundleCap, {}); | ||
|
||
// not write, but perhaps visible? | ||
const storageNode = await E(chainStorage).makeChildNode('vaults'); | ||
await E(vaultsAdminFacet).upgrade(newVaultsBundleCap, { storageNode }); | ||
}; | ||
|
||
upgradeVaultFactory; |
51 changes: 51 additions & 0 deletions
51
packages/deployment/upgrade-test/upgrade-test-scripts/agoric-upgrade-11/more_actions.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/bash | ||
|
||
. ./upgrade-test-scripts/env_setup.sh | ||
|
||
# Enable debugging | ||
set -x | ||
|
||
# CWD is agoric-sdk | ||
upgrade11=./upgrade-test-scripts/agoric-upgrade-11 | ||
|
||
yarn --silent bundle-source --cache-json /tmp packages/governance/src/contractGovernor.js contractGovernor-upgrade | ||
yarn --silent bundle-source --cache-json /tmp packages/inter-protocol/src/psm/psm.js psm-upgrade | ||
yarn --silent bundle-source --cache-json /tmp packages/inter-protocol/src/reserve/reserve.js reserve-upgrade | ||
yarn --silent bundle-source --cache-json /tmp packages/inter-protocol/src/auction/auctioneer.js auctioneer-upgrade | ||
yarn --silent bundle-source --cache-json /tmp packages/inter-protocol/src/vaultFactory/vaultFactory.js vaultFactory-upgrade | ||
|
||
# fluxAggregator, smartWallet | ||
|
||
# Start by upgrading the governance facet, which will do a null upgrad on the | ||
# contract, and then upgrade the contract itself. | ||
|
||
|
||
GOV_HASH=`jq -r .endoZipBase64Sha512 /tmp/bundle-contractGovernor-upgrade.json | ||
echo bundle-contractGovernor-upgrade.json $GOV_HASH | ||
PSM_HASH=`jq -r .endoZipBase64Sha512 /tmp/bundle-psm-upgrade.json | ||
echo bundle-psm-upgrade.json $PSM_HASH | ||
RESERVE_HASH=`jq -r .endoZipBase64Sha512 /tmp/bundle-reserve-upgrade.json | ||
echo bundle-reserve-upgrade.json $RESERVE_HASH | ||
AUCTIONEER_HASH=`jq -r .endoZipBase64Sha512 /tmp/bundle-auctioneer-upgrade.json | ||
echo bundle-auctioneer-upgrade.json $AUCTIONEER_HASH | ||
VAULTS_HASH=`jq -r .endozipbase64sha512 /tmp/bundle-vaultfactory-upgrade.json | ||
echo bundle-vaultfactory-upgrade.json $vaults_hash | ||
# grep for hashes in upgrade scripts | ||
echo +++++ install bundles +++++ | ||
for f in /tmp/bundle-[a-v]*-upgrade.json; do | ||
echo installing $f | ||
agd tx swingset install-bundle "@$f" \ | ||
--from gov1 --keyring-backend=test --gas=auto \ | ||
--chain-id=agoriclocal -bblock --yes | ||
done | ||
# upgrade the vaultFactory's governing contract, then upgrade the vaultFactory | ||
# itself. | ||
echo +++++ upgrade VaultFactory +++++ | ||
$upgrade11/zoe-full-upgrade/zcf-upgrade-driver.sh | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.