Skip to content

Commit

Permalink
chore: complete #1194 Problem 2c
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Aug 16, 2020
1 parent 9fc1fc7 commit 01df7cf
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 12 deletions.
8 changes: 5 additions & 3 deletions packages/swingset-runner/demo/zoeTests/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { E } from '@agoric/eventual-send';
import { makeIssuerKit } from '@agoric/ertp';
import buildManualTimer from './manualTimer';

import { makePrintLog } from './printLog';

/* eslint-disable import/no-unresolved, import/extensions */
import automaticRefundBundle from './bundle-automaticRefund';
import coveredCallBundle from './bundle-coveredCall';
Expand Down Expand Up @@ -86,7 +88,7 @@ const makeVats = (log, vats, zoe, installations, startingValues) => {
return harden(result);
};

export function buildRootObject(vatPowers, vatParameters) {
export function buildRootObject(_vatPowers, vatParameters) {
const obj0 = {
async bootstrap(vats, devices) {
const vatAdminSvc = await E(vats.vatAdmin).createVatAdminService(
Expand Down Expand Up @@ -118,12 +120,12 @@ export function buildRootObject(vatPowers, vatParameters) {
throw Error(
`Cannot find startingValues for ${testName} in ${JSON.stringify(
vatParameters,
)} or ${JSON.stringify(vatPowers)}`,
)} or ${JSON.stringify(_vatPowers)}`,
);
}

const { aliceP, bobP, carolP, daveP } = makeVats(
vatPowers.testLog,
makePrintLog(),
vats,
zoe,
installations,
Expand Down
6 changes: 4 additions & 2 deletions packages/swingset-runner/demo/zoeTests/vat-alice.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { E } from '@agoric/eventual-send';
import { makeLocalAmountMath } from '@agoric/ertp';
import { showPurseBalance, setupIssuers } from './helpers';

import { makePrintLog } from './printLog';

const build = async (log, zoe, issuers, payments, installations, timer) => {
const { moola, simoleans, purses } = await setupIssuers(zoe, issuers);
const [moolaPurseP, simoleanPurseP] = purses;
Expand Down Expand Up @@ -444,8 +446,8 @@ const build = async (log, zoe, issuers, payments, installations, timer) => {
});
};

export function buildRootObject(vatPowers) {
export function buildRootObject(_vatPowers) {
return harden({
build: (...args) => build(vatPowers.testLog, ...args),
build: (...args) => build(makePrintLog(), ...args),
});
}
6 changes: 4 additions & 2 deletions packages/swingset-runner/demo/zoeTests/vat-bob.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { sameStructure } from '@agoric/same-structure';
import { makeLocalAmountMath } from '@agoric/ertp';
import { showPurseBalance, setupIssuers } from './helpers';

import { makePrintLog } from './printLog';

const build = async (log, zoe, issuers, payments, installations, timer) => {
const {
moola,
Expand Down Expand Up @@ -532,8 +534,8 @@ const build = async (log, zoe, issuers, payments, installations, timer) => {
});
};

export function buildRootObject(vatPowers) {
export function buildRootObject(_vatPowers) {
return harden({
build: (...args) => build(vatPowers.testLog, ...args),
build: (...args) => build(makePrintLog(), ...args),
});
}
6 changes: 4 additions & 2 deletions packages/swingset-runner/demo/zoeTests/vat-carol.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { assert, details } from '@agoric/assert';
import { sameStructure } from '@agoric/same-structure';
import { showPurseBalance, setupIssuers } from './helpers';

import { makePrintLog } from './printLog';

const build = async (log, zoe, issuers, payments, installations) => {
const { moola, simoleans, purses } = await setupIssuers(zoe, issuers);
const [moolaPurseP, simoleanPurseP] = purses;
Expand Down Expand Up @@ -63,8 +65,8 @@ const build = async (log, zoe, issuers, payments, installations) => {
});
};

export function buildRootObject(vatPowers) {
export function buildRootObject(_vatPowers) {
return harden({
build: (...args) => build(vatPowers.testLog, ...args),
build: (...args) => build(makePrintLog(), ...args),
});
}
6 changes: 4 additions & 2 deletions packages/swingset-runner/demo/zoeTests/vat-dave.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { assert, details } from '@agoric/assert';
import { sameStructure } from '@agoric/same-structure';
import { showPurseBalance, setupIssuers } from './helpers';

import { makePrintLog } from './printLog';

const build = async (log, zoe, issuers, payments, installations, timer) => {
const {
moola,
Expand Down Expand Up @@ -180,8 +182,8 @@ const build = async (log, zoe, issuers, payments, installations, timer) => {
});
};

export function buildRootObject(vatPowers) {
export function buildRootObject(_vatPowers) {
return harden({
build: (...args) => build(vatPowers.testLog, ...args),
build: (...args) => build(makePrintLog(), ...args),
});
}
2 changes: 1 addition & 1 deletion packages/swingset-runner/demo/zoeTests/vat-zoe.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// noinspection ES6PreferShortImport
import { makeZoe } from '@agoric/zoe';

export function buildRootObject(_vatPowers) {
export function buildRootObject(__vatPowers) {
return harden({
buildZoe: vatAdminSvc => makeZoe(vatAdminSvc),
});
Expand Down

0 comments on commit 01df7cf

Please sign in to comment.