-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: uprade 18 cherrypicks round 5 (#10676)
### Description Cherry-picks the following commits from master: - #10672 (3b478fb) - #10668 (a74161c) - #10680 (c883c39, 1581127) No new upgrade name has been added. Done partially via git cherry-pick and via the following rebase-todo: ``` # PR #10680 Branch Record-instances-that-will-be-replaced-so-we-can-manage-them-10680- label base-Record-instances-that-will-be-replaced-so-we-can-manage-them-10680- pick c883c39 feat: record instances that will be replaced so we can manage them pick 1581127 refactor: provideRetiredInstances label pr-10680--Record-instances-that-will-be-replaced-so-we-can-manage-them-10680- reset base-Record-instances-that-will-be-replaced-so-we-can-manage-them-10680- merge -C d35659b pr-10680--Record-instances-that-will-be-replaced-so-we-can-manage-them-10680- # Record instances that will be replaced so we can manage them (#10680) ```
- Loading branch information
Showing
14 changed files
with
254 additions
and
46 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
restart-valueVow | ||
start-valueVow | ||
localchaintest-submission | ||
recorded-instances-submission |
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
11 changes: 11 additions & 0 deletions
11
a3p-integration/proposals/z:acceptance/recorded-retired.test.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,11 @@ | ||
import test from 'ava'; | ||
|
||
import { evalBundles } from '@agoric/synthetic-chain'; | ||
|
||
const SUBMISSION_DIR = 'recorded-instances-submission'; | ||
|
||
test(`recorded instances in u18`, async t => { | ||
const result = await evalBundles(SUBMISSION_DIR); | ||
console.log('recorded retired instance result:', result); | ||
t.pass('checked names'); | ||
}); |
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
73 changes: 73 additions & 0 deletions
73
packages/builders/scripts/testing/recorded-retired-instances.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,73 @@ | ||
import { makeTracer } from '@agoric/internal'; | ||
import { E } from '@endo/far'; | ||
|
||
const trace = makeTracer('RecordedRetired', true); | ||
|
||
/** | ||
* @param {BootstrapPowers & | ||
* PromiseSpaceOf<{ retiredContractInstances: MapStore<string, Instance>; | ||
* }> | ||
* } powers | ||
*/ | ||
export const testRecordedRetiredInstances = async ({ | ||
consume: { | ||
contractKits, | ||
// governedContractKits, | ||
retiredContractInstances: retiredContractInstancesP, | ||
}, | ||
}) => { | ||
trace('Start'); | ||
const retiredContractInstances = await retiredContractInstancesP; | ||
|
||
const auctionIDs = Array.from(retiredContractInstances.keys()).filter(k => | ||
k.startsWith('auction'), | ||
); | ||
assert(auctionIDs); | ||
assert(auctionIDs.length === 1); | ||
const auctionInstance = retiredContractInstances.get(auctionIDs[0]); | ||
trace({ auctionInstance }); | ||
// I don't know why it's neither in governedContractKits nor contractKits | ||
// assert(await E(governedContractKits).get(auctionInstance)); | ||
|
||
const committeeIDs = Array.from(retiredContractInstances.keys()).filter(k => | ||
k.startsWith('economicCommittee'), | ||
); | ||
assert(committeeIDs); | ||
assert(committeeIDs.length === 1); | ||
const committeeInstance = retiredContractInstances.get(committeeIDs[0]); | ||
assert(await E(contractKits).get(committeeInstance)); | ||
|
||
trace('done'); | ||
}; | ||
harden(testRecordedRetiredInstances); | ||
|
||
export const getManifestForRecordedRetiredInstances = () => { | ||
return { | ||
manifest: { | ||
[testRecordedRetiredInstances.name]: { | ||
consume: { | ||
contractKits: true, | ||
// governedContractKits: true, | ||
retiredContractInstances: true, | ||
}, | ||
}, | ||
}, | ||
}; | ||
}; | ||
|
||
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */ | ||
export const defaultProposalBuilder = async () => | ||
harden({ | ||
sourceSpec: | ||
'@agoric/builders/scripts/testing/recorded-retired-instances.js', | ||
getManifestCall: ['getManifestForRecordedRetiredInstances', {}], | ||
}); | ||
|
||
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */ | ||
export default async (homeP, endowments) => { | ||
// import dynamically so the module can work in CoreEval environment | ||
const dspModule = await import('@agoric/deploy-script-support'); | ||
const { makeHelpers } = dspModule; | ||
const { writeCoreEval } = await makeHelpers(homeP, endowments); | ||
await writeCoreEval('recorded-retired', defaultProposalBuilder); | ||
}; |
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
Oops, something went wrong.