@@ -9,11 +9,9 @@ import { E } from '@agoric/eventual-send';
9
9
import { Far } from '@endo/marshal' ;
10
10
import { assert , details as X } from '@agoric/assert' ;
11
11
12
- import { makeZoeKit } from '../../../src/zoeService/zoe.js' ;
13
12
import buildManualTimer from '../../../tools/manualTimer.js' ;
14
13
import { setup } from '../setupBasicMints.js' ;
15
14
import { setupMixed } from '../setupMixedMints.js' ;
16
- import fakeVatAdmin from '../../../tools/fakeVatAdmin.js' ;
17
15
18
16
const filename = new URL ( import . meta. url ) . pathname ;
19
17
const dirname = path . dirname ( filename ) ;
@@ -22,7 +20,8 @@ const auctionRoot = `${dirname}/../../../src/contracts/auction/index.js`;
22
20
23
21
test ( 'zoe - secondPriceAuction w/ 3 bids' , async t => {
24
22
t . plan ( 15 ) ;
25
- const { moolaKit, simoleanKit, moola, simoleans, zoe } = setup ( ) ;
23
+ const { moolaKit, simoleanKit, moola, simoleans, zoe, vatAdminState } =
24
+ setup ( ) ;
26
25
27
26
const makeAlice = async ( timer , moolaPayment ) => {
28
27
const moolaPurse = await E ( moolaKit . issuer ) . makeEmptyPurse ( ) ;
@@ -32,7 +31,8 @@ test('zoe - secondPriceAuction w/ 3 bids', async t => {
32
31
// pack the contract
33
32
const bundle = await bundleSource ( auctionRoot ) ;
34
33
// install the contract
35
- const installationP = E ( zoe ) . install ( bundle ) ;
34
+ vatAdminState . installBundle ( 'b1-auction' , bundle ) ;
35
+ const installationP = E ( zoe ) . installBundleID ( 'b1-auction' ) ;
36
36
return installationP ;
37
37
} ,
38
38
startInstance : async installation => {
@@ -247,8 +247,7 @@ test('zoe - secondPriceAuction w/ 3 bids', async t => {
247
247
248
248
test ( 'zoe - secondPriceAuction - alice tries to exit' , async t => {
249
249
t . plan ( 12 ) ;
250
- const { moolaR, simoleanR, moola, simoleans } = setup ( ) ;
251
- const { zoeService : zoe } = makeZoeKit ( fakeVatAdmin ) ;
250
+ const { moolaR, simoleanR, moola, simoleans, zoe, vatAdminState } = setup ( ) ;
252
251
253
252
// Setup Alice
254
253
const aliceMoolaPayment = moolaR . mint . mintPayment ( moola ( 1n ) ) ;
@@ -268,7 +267,8 @@ test('zoe - secondPriceAuction - alice tries to exit', async t => {
268
267
// Pack the contract.
269
268
const bundle = await bundleSource ( auctionRoot ) ;
270
269
271
- const installation = await E ( zoe ) . install ( bundle ) ;
270
+ vatAdminState . installBundle ( 'b1-auction' , bundle ) ;
271
+ const installation = await E ( zoe ) . installBundleID ( 'b1-auction' ) ;
272
272
const issuerKeywordRecord = harden ( {
273
273
Asset : moolaR . issuer ,
274
274
Ask : simoleanR . issuer ,
@@ -401,8 +401,7 @@ test('zoe - secondPriceAuction - alice tries to exit', async t => {
401
401
402
402
test ( 'zoe - secondPriceAuction - all bidders try to exit' , async t => {
403
403
t . plan ( 10 ) ;
404
- const { moolaR, simoleanR, moola, simoleans } = setup ( ) ;
405
- const { zoeService : zoe } = makeZoeKit ( fakeVatAdmin ) ;
404
+ const { moolaR, simoleanR, moola, simoleans, zoe, vatAdminState } = setup ( ) ;
406
405
407
406
// Setup Alice
408
407
const aliceMoolaPayment = moolaR . mint . mintPayment ( moola ( 1n ) ) ;
@@ -418,8 +417,8 @@ test('zoe - secondPriceAuction - all bidders try to exit', async t => {
418
417
419
418
// Pack the contract.
420
419
const bundle = await bundleSource ( auctionRoot ) ;
421
-
422
- const installation = await E ( zoe ) . install ( bundle ) ;
420
+ vatAdminState . installBundle ( 'b1-auction' , bundle ) ;
421
+ const installation = await E ( zoe ) . installBundleID ( 'b1-auction' ) ;
423
422
const issuerKeywordRecord = harden ( {
424
423
Asset : moolaR . issuer ,
425
424
Ask : simoleanR . issuer ,
@@ -526,8 +525,16 @@ test('zoe - secondPriceAuction - all bidders try to exit', async t => {
526
525
// Three bidders with (fungible) moola bid for a CryptoCat
527
526
test ( 'zoe - secondPriceAuction non-fungible asset' , async t => {
528
527
t . plan ( 30 ) ;
529
- const { ccIssuer, moolaIssuer, ccMint, moolaMint, cryptoCats, moola, zoe } =
530
- setupMixed ( ) ;
528
+ const {
529
+ ccIssuer,
530
+ moolaIssuer,
531
+ ccMint,
532
+ moolaMint,
533
+ cryptoCats,
534
+ moola,
535
+ zoe,
536
+ vatAdminState,
537
+ } = setupMixed ( ) ;
531
538
const invitationIssuer = await E ( zoe ) . getInvitationIssuer ( ) ;
532
539
533
540
// Setup Alice
@@ -554,8 +561,8 @@ test('zoe - secondPriceAuction non-fungible asset', async t => {
554
561
555
562
// Pack the contract.
556
563
const bundle = await bundleSource ( auctionRoot ) ;
557
-
558
- const installation = await E ( zoe ) . install ( bundle ) ;
564
+ vatAdminState . installBundle ( 'b1-auction' , bundle ) ;
565
+ const installation = await E ( zoe ) . installBundleID ( 'b1-auction' ) ;
559
566
const issuerKeywordRecord = harden ( {
560
567
Asset : ccIssuer ,
561
568
Ask : moolaIssuer ,
@@ -812,7 +819,8 @@ test('zoe - secondPriceAuction non-fungible asset', async t => {
812
819
813
820
test ( 'zoe - firstPriceAuction w/ 3 bids' , async t => {
814
821
t . plan ( 15 ) ;
815
- const { moolaKit, simoleanKit, moola, simoleans, zoe } = setup ( ) ;
822
+ const { moolaKit, simoleanKit, moola, simoleans, zoe, vatAdminState } =
823
+ setup ( ) ;
816
824
817
825
const makeAlice = async ( timer , moolaPayment ) => {
818
826
const moolaPurse = await E ( moolaKit . issuer ) . makeEmptyPurse ( ) ;
@@ -822,7 +830,8 @@ test('zoe - firstPriceAuction w/ 3 bids', async t => {
822
830
// pack the contract
823
831
const bundle = await bundleSource ( auctionRoot ) ;
824
832
// install the contract
825
- const installationP = E ( zoe ) . install ( bundle ) ;
833
+ vatAdminState . installBundle ( 'b1-auction' , bundle ) ;
834
+ const installationP = E ( zoe ) . installBundleID ( 'b1-auction' ) ;
826
835
return installationP ;
827
836
} ,
828
837
startInstance : async installation => {
0 commit comments