-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(zoe): get ZCF bundlecap from vatAdminService
Zoe needs access to the vatAdminSvc, to create a new ZCF vat to host each contract. `makeZoeKit()` provides an optional argument to control which bundle is used for this purpose. This 4th argument was a string, defaulting to 'zcf', and relied upon `E(vatAdminSvc).createVatByName` (which is going away). To move everything closer to bundlecaps, the `makeZoeKit()` optional argument now takes `{ name }` or `{ id }` or `{ bundlecap }`, instead of only a name. Zoe uses the new `E(vatAdminSvc).getNamedBundleCap()` to convert a name into a bundlecap, but in the future I expect our chain-side bootstrap() to call `makeZoeKit()` with a specific bundlecap. In the long run, I'm trying to make room for Zoe to accomodate multiple versions of ZCF, each indexed by its bundlecap. Non-swingset-based zoe-using unit tests generally use `fakeVatAdmin.js` to build a mock `vatAdminSvc`. This commit changes `fakeVatAdmin.js` to include an additional `zcfBundlecap` export, which is an empty marker object that serves as a stand-in for the bundlecap. The fake `vatAdminSvc` can accept this fake `zcfBundlecap`, and will evaluate the ZCF code appropriately. However the fake `vatAdminSvc` also knows how to convert the default `'zcf'` name into that bundlecap, so downstream code should not need to change. Code that uses `makeZoeKit()` and provides the optional fourth argument needs to be updated to the new signature. This commit changes all such instances in the current codebase. refs #4487
- Loading branch information
Showing
9 changed files
with
61 additions
and
39 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
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
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