@agoric/zoe 0.26.3-dev-ecf2d8e.0 → 0.26.3-other-dev-70beeb7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1179 -0
- package/README.md +7 -7
- package/bundles/bundle-contractFacet-js-meta.json +319 -543
- package/bundles/bundle-contractFacet.d.ts +3 -3
- package/bundles/bundle-contractFacet.js +1 -1
- package/exported.js +1 -1
- package/package.json +23 -30
- package/src/cleanProposal.js +2 -2
- package/src/contractFacet/internal-types.d.ts +2 -2
- package/src/contractFacet/internal-types.d.ts.map +1 -1
- package/src/contractFacet/internal-types.js +1 -1
- package/src/contractFacet/types.d.ts +191 -0
- package/src/contractFacet/types.d.ts.map +1 -0
- package/src/contractFacet/types.js +256 -0
- package/src/contractFacet/vatRoot.d.ts +1 -1
- package/src/contractFacet/vatRoot.d.ts.map +1 -1
- package/src/contractFacet/zcfMint.d.ts +1 -1
- package/src/contractFacet/zcfMint.d.ts.map +1 -1
- package/src/contractFacet/zcfMint.js +1 -2
- package/src/contractFacet/zcfSeat.d.ts.map +1 -1
- package/src/contractFacet/zcfSeat.js +3 -105
- package/src/contractFacet/zcfZygote.d.ts +1 -1
- package/src/contractFacet/zcfZygote.d.ts.map +1 -1
- package/src/contractFacet/zcfZygote.js +33 -78
- package/src/contractSupport/atomicTransfer.d.ts +6 -0
- package/src/contractSupport/atomicTransfer.d.ts.map +1 -1
- package/src/contractSupport/atomicTransfer.js +90 -5
- package/src/contractSupport/bondingCurves.js +2 -2
- package/src/contractSupport/durability.d.ts +2 -2
- package/src/contractSupport/durability.d.ts.map +1 -1
- package/src/contractSupport/durability.js +3 -3
- package/src/contractSupport/priceAuthority.d.ts +1 -16
- package/src/contractSupport/priceAuthority.d.ts.map +1 -1
- package/src/contractSupport/priceAuthority.js +1 -3
- package/src/contractSupport/priceAuthorityInitial.d.ts.map +1 -1
- package/src/contractSupport/priceAuthorityInitial.js +0 -1
- package/src/contractSupport/priceAuthorityQuoteMint.d.ts +1 -1
- package/src/contractSupport/priceAuthorityQuoteMint.d.ts.map +1 -1
- package/src/contractSupport/priceAuthorityTransform.d.ts.map +1 -1
- package/src/contractSupport/priceAuthorityTransform.js +3 -2
- package/src/contractSupport/recorder.d.ts +4 -4
- package/src/contractSupport/recorder.d.ts.map +1 -1
- package/src/contractSupport/safeMath.d.ts +7 -7
- package/src/contractSupport/safeMath.d.ts.map +1 -1
- package/src/contractSupport/topics.d.ts +1 -1
- package/src/contractSupport/topics.d.ts.map +1 -1
- package/src/contractSupport/zoeHelpers.d.ts +1 -1
- package/src/contractSupport/zoeHelpers.d.ts.map +1 -1
- package/src/contractSupport/zoeHelpers.js +11 -5
- package/src/contracts/atomicSwap.d.ts +1 -1
- package/src/contracts/auction/firstPriceLogic.d.ts.map +1 -1
- package/src/contracts/auction/firstPriceLogic.js +7 -5
- package/src/contracts/auction/index.d.ts +23 -1
- package/src/contracts/auction/index.d.ts.map +1 -1
- package/src/contracts/auction/index.js +0 -1
- package/src/contracts/auction/secondPriceLogic.d.ts.map +1 -1
- package/src/contracts/auction/secondPriceLogic.js +3 -1
- package/src/contracts/automaticRefund.d.ts +3 -3
- package/src/contracts/autoswap.d.ts.map +1 -1
- package/src/contracts/autoswap.js +7 -4
- package/src/contracts/barterExchange.d.ts +2 -2
- package/src/contracts/barterExchange.d.ts.map +1 -1
- package/src/contracts/barterExchange.js +3 -2
- package/src/contracts/callSpread/calculateShares.d.ts +7 -0
- package/src/contracts/callSpread/calculateShares.d.ts.map +1 -1
- package/src/contracts/callSpread/fundedCallSpread.d.ts +1 -1
- package/src/contracts/callSpread/fundedCallSpread.d.ts.map +1 -1
- package/src/contracts/callSpread/fundedCallSpread.js +3 -1
- package/src/contracts/callSpread/payoffHandler.d.ts.map +1 -1
- package/src/contracts/callSpread/payoffHandler.js +0 -1
- package/src/contracts/callSpread/percent.d.ts +2 -0
- package/src/contracts/callSpread/percent.d.ts.map +1 -1
- package/src/contracts/callSpread/pricedCallSpread.d.ts +4 -4
- package/src/contracts/callSpread/pricedCallSpread.d.ts.map +1 -1
- package/src/contracts/callSpread/pricedCallSpread.js +3 -2
- package/src/contracts/coveredCall-durable.d.ts +3 -3
- package/src/contracts/coveredCall.d.ts +1 -1
- package/src/contracts/loan/borrow.d.ts.map +1 -1
- package/src/contracts/loan/borrow.js +3 -1
- package/src/contracts/loan/close.d.ts.map +1 -1
- package/src/contracts/loan/close.js +6 -2
- package/src/contracts/loan/index.d.ts +1 -1
- package/src/contracts/loan/liquidate.d.ts +12 -1
- package/src/contracts/loan/liquidate.d.ts.map +1 -1
- package/src/contracts/loan/liquidate.js +1 -3
- package/src/contracts/loan/scheduleLiquidation.d.ts.map +1 -1
- package/src/contracts/loan/scheduleLiquidation.js +0 -1
- package/src/contracts/loan/types.d.ts +1 -0
- package/src/contracts/loan/types.d.ts.map +1 -1
- package/src/contracts/loan/types.js +7 -0
- package/src/contracts/mintPayments.d.ts +6 -14
- package/src/contracts/mintPayments.d.ts.map +1 -1
- package/src/contracts/mintPayments.js +1 -1
- package/src/contracts/oracle.d.ts +2 -2
- package/src/contracts/oracle.d.ts.map +1 -1
- package/src/contracts/oracle.js +0 -3
- package/src/contracts/priceAggregator.d.ts +12 -2
- package/src/contracts/priceAggregator.d.ts.map +1 -1
- package/src/contracts/priceAggregator.js +2 -3
- package/src/contracts/scaledPriceAuthority.d.ts +1 -1
- package/src/contracts/scaledPriceAuthority.d.ts.map +1 -1
- package/src/contracts/scaledPriceAuthority.js +0 -2
- package/src/contracts/sellItems.d.ts +1 -1
- package/src/contracts/sellItems.d.ts.map +1 -1
- package/src/contracts/sellItems.js +3 -2
- package/src/contracts/simpleExchange.d.ts +2 -2
- package/src/instanceRecordStorage.d.ts +1 -1
- package/src/instanceRecordStorage.d.ts.map +1 -1
- package/src/internal-types.d.ts +3 -3
- package/src/internal-types.d.ts.map +1 -1
- package/src/internal-types.js +1 -1
- package/src/issuerStorage.d.ts +1 -1
- package/src/makeHandle.d.ts +1 -1
- package/src/makeHandle.d.ts.map +1 -1
- package/src/typeGuards.d.ts +20 -118
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +1 -7
- package/src/zoeService/escrowStorage.d.ts +1 -1
- package/src/zoeService/feeMint.d.ts +5 -5
- package/src/zoeService/feeMint.d.ts.map +1 -1
- package/src/zoeService/installationStorage.d.ts +1 -1
- package/src/zoeService/instanceAdminStorage.d.ts +2 -2
- package/src/zoeService/instanceAdminStorage.d.ts.map +1 -1
- package/src/zoeService/instanceAdminStorage.js +0 -1
- package/src/zoeService/internal-types.d.ts +2 -2
- package/src/zoeService/internal-types.d.ts.map +1 -1
- package/src/zoeService/internal-types.js +1 -1
- package/src/zoeService/makeInvitation.d.ts +1 -1
- package/src/zoeService/makeInvitation.d.ts.map +1 -1
- package/src/zoeService/offer/offer.d.ts.map +1 -1
- package/src/zoeService/offer/offer.js +3 -2
- package/src/zoeService/startInstance.d.ts +1 -1
- package/src/zoeService/startInstance.d.ts.map +1 -1
- package/src/zoeService/startInstance.js +23 -20
- package/src/zoeService/types.d.ts +1 -1
- package/src/zoeService/types.d.ts.map +1 -1
- package/src/zoeService/utils.d.ts +2 -2
- package/src/zoeService/zoe.d.ts +1 -11
- package/src/zoeService/zoe.d.ts.map +1 -1
- package/src/zoeService/zoe.js +1 -24
- package/src/zoeService/zoeSeat.d.ts +1 -1
- package/src/zoeService/zoeSeat.d.ts.map +1 -1
- package/src/zoeService/zoeSeat.js +0 -1
- package/src/zoeService/zoeStorageManager.d.ts +1 -1
- package/src/zoeService/zoeStorageManager.d.ts.map +1 -1
- package/src/zoeService/zoeStorageManager.js +2 -7
- package/tools/fakePriceAuthority.d.ts.map +1 -1
- package/tools/fakePriceAuthority.js +2 -0
- package/tools/manualPriceAuthority.d.ts.map +1 -1
- package/tools/manualPriceAuthority.js +0 -1
- package/tools/manualTimer.js +1 -1
- package/tools/prepare-test-env.js +1 -1
- package/tools/priceAuthorityRegistry.d.ts +1 -1
- package/tools/priceAuthorityRegistry.d.ts.map +1 -1
- package/tools/scriptedOracle.d.ts +2 -2
- package/tools/scriptedPriceAuthority.d.ts.map +1 -1
- package/tools/scriptedPriceAuthority.js +0 -1
- package/tools/setup-zoe.d.ts +0 -5
- package/tools/setup-zoe.d.ts.map +1 -1
- package/src/contractFacet/reallocate.d.ts +0 -3
- package/src/contractFacet/reallocate.d.ts.map +0 -1
- package/src/contractFacet/reallocate.js +0 -94
- package/src/contractFacet/types-ambient.d.ts +0 -247
- package/src/contractFacet/types-ambient.js +0 -1
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
/* eslint @typescript-eslint/no-floating-promises: "warn" */
|
|
2
1
|
import {
|
|
3
2
|
makeScalarBigWeakMapStore,
|
|
4
|
-
prepareExoClass,
|
|
5
|
-
prepareExoClassKit,
|
|
6
|
-
provide,
|
|
7
3
|
provideDurableMapStore,
|
|
8
4
|
provideDurableWeakMapStore,
|
|
5
|
+
prepareExoClassKit,
|
|
6
|
+
provide,
|
|
7
|
+
prepareExoClass,
|
|
9
8
|
} from '@agoric/vat-data';
|
|
10
9
|
import { E } from '@endo/eventual-send';
|
|
11
10
|
import { AmountMath } from '@agoric/ertp';
|
|
@@ -20,8 +19,6 @@ import {
|
|
|
20
19
|
SeatDataShape,
|
|
21
20
|
SeatShape,
|
|
22
21
|
} from '../typeGuards.js';
|
|
23
|
-
import { makeAllocationMap } from './reallocate.js';
|
|
24
|
-
import { TransferPartShape } from '../contractSupport/atomicTransfer.js';
|
|
25
22
|
|
|
26
23
|
const { Fail } = assert;
|
|
27
24
|
|
|
@@ -217,10 +214,6 @@ export const createSeatManager = (
|
|
|
217
214
|
|
|
218
215
|
return isOfferSafe(state.proposal, reallocation);
|
|
219
216
|
},
|
|
220
|
-
/**
|
|
221
|
-
* @deprecated switch to zcf.atomicRearrange()
|
|
222
|
-
* @param {AmountKeywordRecord} amountKeywordRecord
|
|
223
|
-
*/
|
|
224
217
|
incrementBy(amountKeywordRecord) {
|
|
225
218
|
const { self } = this;
|
|
226
219
|
assertActive(self);
|
|
@@ -234,10 +227,6 @@ export const createSeatManager = (
|
|
|
234
227
|
);
|
|
235
228
|
return amountKeywordRecord;
|
|
236
229
|
},
|
|
237
|
-
/**
|
|
238
|
-
* @deprecated switch to zcf.atomicRearrange()
|
|
239
|
-
* @param {AmountKeywordRecord} amountKeywordRecord
|
|
240
|
-
*/
|
|
241
230
|
decrementBy(amountKeywordRecord) {
|
|
242
231
|
const { self } = this;
|
|
243
232
|
assertActive(self);
|
|
@@ -276,7 +265,6 @@ export const createSeatManager = (
|
|
|
276
265
|
const ZcfSeatManagerIKit = harden({
|
|
277
266
|
seatManager: M.interface('ZcfSeatManager', {
|
|
278
267
|
makeZCFSeat: M.call(SeatDataShape).returns(M.remotable('zcfSeat')),
|
|
279
|
-
atomicRearrange: M.call(M.arrayOf(TransferPartShape)).returns(),
|
|
280
268
|
reallocate: M.call(M.remotable('zcfSeat'), M.remotable('zcfSeat'))
|
|
281
269
|
.rest(M.arrayOf(M.remotable('zcfSeat')))
|
|
282
270
|
.returns(),
|
|
@@ -301,96 +289,6 @@ export const createSeatManager = (
|
|
|
301
289
|
return zcfSeat;
|
|
302
290
|
},
|
|
303
291
|
|
|
304
|
-
/**
|
|
305
|
-
* Rearrange the allocations according to the transfer descriptions.
|
|
306
|
-
* This is a set of changes to allocations that must satisfy several
|
|
307
|
-
* constraints. If these constraints are all met, then the reallocation
|
|
308
|
-
* happens atomically. Otherwise, it does not happen at all.
|
|
309
|
-
*
|
|
310
|
-
* The conditions
|
|
311
|
-
* * All the mentioned seats are still live,
|
|
312
|
-
* * No outstanding stagings for any of the mentioned seats. Stagings
|
|
313
|
-
* have been deprecated in favor or atomicRearrange. To prevent
|
|
314
|
-
* confusion, for each reallocation, it can only be expressed in
|
|
315
|
-
* the old way or the new way, but not a mixture.
|
|
316
|
-
* * Offer safety
|
|
317
|
-
* * Overall conservation
|
|
318
|
-
*
|
|
319
|
-
* The overall transfer is expressed as an array of `TransferPart`. Each
|
|
320
|
-
* individual `TransferPart` is one of
|
|
321
|
-
* - A transfer from a `fromSeat` to a `toSeat`. Specify both toAmount
|
|
322
|
-
* and fromAmount to change keywords, otherwise only fromAmount is required.
|
|
323
|
-
* - A taking from a `fromSeat`'s allocation. See the `fromOnly` helper.
|
|
324
|
-
* - A giving into a `toSeat`'s allocation. See the `toOnly` helper.
|
|
325
|
-
*
|
|
326
|
-
* @param {TransferPart[]} transfers
|
|
327
|
-
*/
|
|
328
|
-
atomicRearrange(transfers) {
|
|
329
|
-
const newAllocations = makeAllocationMap(transfers);
|
|
330
|
-
|
|
331
|
-
// ////// All Seats are active /////////////////////////////////
|
|
332
|
-
for (const [seat] of newAllocations) {
|
|
333
|
-
assertActive(seat);
|
|
334
|
-
!seat.hasStagedAllocation() ||
|
|
335
|
-
Fail`Cannot mix atomicRearrange with seat stagings: ${seat}`;
|
|
336
|
-
zcfSeatToSeatHandle.has(seat) ||
|
|
337
|
-
Fail`The seat ${seat} was not recognized`;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
// ////// Ensure that rights are conserved overall /////////////
|
|
341
|
-
|
|
342
|
-
// convert array of keywordAmountRecords to 1-level array of Amounts
|
|
343
|
-
const flattenAmounts = allocations =>
|
|
344
|
-
allocations.flatMap(Object.values);
|
|
345
|
-
const previousAmounts = flattenAmounts(
|
|
346
|
-
newAllocations.map(([seat]) => seat.getCurrentAllocation()),
|
|
347
|
-
);
|
|
348
|
-
const newAmounts = flattenAmounts(
|
|
349
|
-
newAllocations.map(([_, allocation]) => allocation),
|
|
350
|
-
);
|
|
351
|
-
assertRightsConserved(previousAmounts, newAmounts);
|
|
352
|
-
|
|
353
|
-
// ////// Ensure that offer safety holds ///////////////////////
|
|
354
|
-
for (const [seat, allocation] of newAllocations) {
|
|
355
|
-
isOfferSafe(seat.getProposal(), allocation) ||
|
|
356
|
-
Fail`Offer safety was violated by the proposed allocation: ${allocation}. Proposal was ${seat.getProposal()}`;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
const seatHandleAllocations = newAllocations.map(
|
|
360
|
-
([seat, allocation]) => {
|
|
361
|
-
const seatHandle = zcfSeatToSeatHandle.get(seat);
|
|
362
|
-
return { allocation, seatHandle };
|
|
363
|
-
},
|
|
364
|
-
);
|
|
365
|
-
try {
|
|
366
|
-
// No side effects above. All conditions checked which could have
|
|
367
|
-
// caused us to reject this reallocation. Notice that the current
|
|
368
|
-
// allocations are captured in seatHandleAllocations, so there must
|
|
369
|
-
// be no awaits between that assignment and here.
|
|
370
|
-
//
|
|
371
|
-
// COMMIT POINT
|
|
372
|
-
//
|
|
373
|
-
// The effects must succeed atomically. The call to
|
|
374
|
-
// replaceAllocations() will be processed in the order of updates
|
|
375
|
-
// from ZCF to Zoe. Its effects must occur immediately in Zoe on
|
|
376
|
-
// reception, and must not fail.
|
|
377
|
-
//
|
|
378
|
-
// Commit the new allocations (currentAllocation is replaced
|
|
379
|
-
// for each of the seats) and inform Zoe of the new allocation.
|
|
380
|
-
|
|
381
|
-
for (const [seat, allocation] of newAllocations) {
|
|
382
|
-
activeZCFSeats.set(seat, allocation);
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
// we don't wait for the results here. As described in
|
|
386
|
-
// docs/zoe-zcf.md, The initial allocation to a seat originates with
|
|
387
|
-
// Zoe, but *all subsequent updates come from ZCF to Zoe*.
|
|
388
|
-
void E(zoeInstanceAdmin).replaceAllocations(seatHandleAllocations);
|
|
389
|
-
} catch (err) {
|
|
390
|
-
shutdownWithFailure(err);
|
|
391
|
-
throw err;
|
|
392
|
-
}
|
|
393
|
-
},
|
|
394
292
|
reallocate(/** @type {ZCFSeat[]} */ ...seats) {
|
|
395
293
|
seats.forEach(assertActive);
|
|
396
294
|
seats.forEach(assertStagedAllocation);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export function makeZCFZygote(powers: VatPowers, zoeService: ERef<ZoeService>, invitationIssuer: Issuer<'set'>, testJigSetter: TestJigSetter, contractBundleCap: BundleCap, zcfBaggage?: MapStore<string,
|
|
1
|
+
export function makeZCFZygote(powers: VatPowers, zoeService: ERef<ZoeService>, invitationIssuer: Issuer<'set'>, testJigSetter: TestJigSetter, contractBundleCap: BundleCap, zcfBaggage?: MapStore<string, unknown>): Promise<ZCFZygote>;
|
|
2
2
|
export type IssuerOptionsRecord = import('@agoric/ertp').IssuerOptionsRecord;
|
|
3
3
|
//# sourceMappingURL=zcfZygote.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zcfZygote.d.ts","sourceRoot":"","sources":["zcfZygote.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"zcfZygote.d.ts","sourceRoot":"","sources":["zcfZygote.js"],"names":[],"mappings":"AAiDO,sCARI,SAAS,cACT,KAAK,UAAU,CAAC,oBAChB,OAAO,KAAK,CAAC,iBACb,aAAa,qBACb,SAAS,2CAEP,QAAQ,SAAS,CAAC,CAyZ9B;kCAxaa,OAAO,cAAc,EAAE,mBAAmB"}
|
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
import { E } from '@endo/eventual-send';
|
|
2
|
+
import { passStyleOf, Remotable } from '@endo/marshal';
|
|
2
3
|
import { AssetKind } from '@agoric/ertp';
|
|
4
|
+
import { makePromiseKit } from '@endo/promise-kit';
|
|
3
5
|
import { assertPattern, mustMatch } from '@agoric/store';
|
|
4
6
|
import {
|
|
5
7
|
canBeDurable,
|
|
6
8
|
M,
|
|
7
9
|
makeScalarBigMapStore,
|
|
10
|
+
provideDurableMapStore,
|
|
8
11
|
prepareExo,
|
|
9
12
|
prepareExoClass,
|
|
10
|
-
provideDurableMapStore,
|
|
11
13
|
} from '@agoric/vat-data';
|
|
12
|
-
import { E } from '@endo/eventual-send';
|
|
13
|
-
import { passStyleOf, Remotable } from '@endo/marshal';
|
|
14
|
-
import { makePromiseKit } from '@endo/promise-kit';
|
|
15
14
|
|
|
16
15
|
import { objectMap } from '@agoric/internal';
|
|
17
16
|
import { cleanProposal } from '../cleanProposal.js';
|
|
18
|
-
import { handlePKitWarning } from '../handleWarning.js';
|
|
19
|
-
import { makeInstanceRecordStorage } from '../instanceRecordStorage.js';
|
|
20
|
-
import { provideIssuerStorage } from '../issuerStorage.js';
|
|
21
|
-
import { defineDurableHandle } from '../makeHandle.js';
|
|
22
17
|
import { evalContractBundle } from './evalContractCode.js';
|
|
23
18
|
import { makeMakeExiter } from './exit.js';
|
|
24
|
-
import {
|
|
19
|
+
import { defineDurableHandle } from '../makeHandle.js';
|
|
20
|
+
import { provideIssuerStorage } from '../issuerStorage.js';
|
|
25
21
|
import { createSeatManager } from './zcfSeat.js';
|
|
22
|
+
import { makeInstanceRecordStorage } from '../instanceRecordStorage.js';
|
|
23
|
+
import { handlePKitWarning } from '../handleWarning.js';
|
|
24
|
+
import { makeOfferHandlerStorage } from './offerHandlerStorage.js';
|
|
26
25
|
|
|
27
26
|
import '../internal-types.js';
|
|
28
27
|
import './internal-types.js';
|
|
@@ -211,25 +210,6 @@ export const makeZCFZygote = async (
|
|
|
211
210
|
});
|
|
212
211
|
const handleOfferObj = makeHandleOfferObj(taker);
|
|
213
212
|
|
|
214
|
-
/**
|
|
215
|
-
* @type {() => Promise<
|
|
216
|
-
* | {
|
|
217
|
-
* buildRootObject: any;
|
|
218
|
-
* start: undefined;
|
|
219
|
-
* meta: undefined;
|
|
220
|
-
* }
|
|
221
|
-
* | {
|
|
222
|
-
* prepare: ContractStartFn;
|
|
223
|
-
* customTermsShape?: Pick<ContractMeta, 'customTermsShape'>,
|
|
224
|
-
* privateArgsShape?: Pick<ContractMeta, 'privateArgsShape'>,
|
|
225
|
-
* }
|
|
226
|
-
* | {
|
|
227
|
-
* buildRootObject: undefined;
|
|
228
|
-
* start: ContractStartFn;
|
|
229
|
-
* meta?: ContractMeta;
|
|
230
|
-
* }
|
|
231
|
-
* >}
|
|
232
|
-
*/
|
|
233
213
|
const evaluateContract = () => {
|
|
234
214
|
let bundle;
|
|
235
215
|
if (passStyleOf(contractBundleCap) === 'remotable') {
|
|
@@ -242,44 +222,22 @@ export const makeZCFZygote = async (
|
|
|
242
222
|
return evalContractBundle(bundle);
|
|
243
223
|
};
|
|
244
224
|
// evaluate the contract (either the first version, or an upgrade)
|
|
245
|
-
const
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
return {
|
|
258
|
-
start: bundleResult.prepare,
|
|
259
|
-
meta: {
|
|
260
|
-
upgradability: 'canUpgrade',
|
|
261
|
-
customTermsShape: bundleResult.customTermsShape,
|
|
262
|
-
privateArgsShape: bundleResult.privateArgsShape,
|
|
263
|
-
},
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
// normal behavior
|
|
267
|
-
return bundleResult;
|
|
268
|
-
})();
|
|
269
|
-
//#endregion
|
|
270
|
-
|
|
271
|
-
if (start === undefined) {
|
|
272
|
-
if ('buildRootObject' in bundleResult) {
|
|
273
|
-
// diagnose a common mistake
|
|
274
|
-
throw Fail`Did you provide a vat bundle instead of a contract bundle?`;
|
|
275
|
-
}
|
|
276
|
-
throw Fail`contract exports missing start`;
|
|
225
|
+
const {
|
|
226
|
+
start,
|
|
227
|
+
buildRootObject,
|
|
228
|
+
privateArgsShape,
|
|
229
|
+
customTermsShape,
|
|
230
|
+
prepare,
|
|
231
|
+
} = await evaluateContract();
|
|
232
|
+
|
|
233
|
+
if (start === undefined && prepare === undefined) {
|
|
234
|
+
buildRootObject === undefined ||
|
|
235
|
+
Fail`Did you provide a vat bundle instead of a contract bundle?`;
|
|
236
|
+
Fail`contract exports missing start/prepare`;
|
|
277
237
|
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
meta.upgradability &&
|
|
282
|
-
['canBeUpgraded', 'canUpgrade'].includes(meta.upgradability);
|
|
238
|
+
!start ||
|
|
239
|
+
!prepare ||
|
|
240
|
+
Fail`contract must provide exactly one of "start" and "prepare"`;
|
|
283
241
|
|
|
284
242
|
/** @type {ZCF} */
|
|
285
243
|
// Using Remotable rather than Far because there are too many complications
|
|
@@ -287,7 +245,6 @@ export const makeZCFZygote = async (
|
|
|
287
245
|
// accept raw functions. assert cannot be a valid passable! (It's a function
|
|
288
246
|
// and has members.)
|
|
289
247
|
const zcf = Remotable('Alleged: zcf', undefined, {
|
|
290
|
-
atomicRearrange: transfers => seatManager.atomicRearrange(transfers),
|
|
291
248
|
reallocate: (...seats) => seatManager.reallocate(...seats),
|
|
292
249
|
assertUniqueKeyword: kwd => getInstanceRecHolder().assertUniqueKeyword(kwd),
|
|
293
250
|
saveIssuer: async (issuerP, keyword) => {
|
|
@@ -343,7 +300,6 @@ export const makeZCFZygote = async (
|
|
|
343
300
|
const terms = getInstanceRecHolder().getTerms();
|
|
344
301
|
|
|
345
302
|
// If the contract provided customTermsShape, validate the customTerms.
|
|
346
|
-
const { customTermsShape } = meta;
|
|
347
303
|
if (customTermsShape) {
|
|
348
304
|
const { brands: _b, issuers: _i, ...customTerms } = terms;
|
|
349
305
|
mustMatch(harden(customTerms), customTermsShape, 'customTerms');
|
|
@@ -416,13 +372,13 @@ export const makeZCFZygote = async (
|
|
|
416
372
|
instantiateIssuerStorage(issuerStorageFromZoe);
|
|
417
373
|
zcfBaggage.init('instanceRecHolder', instanceRecHolder);
|
|
418
374
|
|
|
419
|
-
const
|
|
375
|
+
const startFn = start || prepare;
|
|
420
376
|
if (privateArgsShape) {
|
|
421
377
|
mustMatch(privateArgs, privateArgsShape, 'privateArgs');
|
|
422
378
|
}
|
|
423
379
|
// start a contract for the first time
|
|
424
380
|
return E.when(
|
|
425
|
-
|
|
381
|
+
startFn(zcf, privateArgs, contractBaggage),
|
|
426
382
|
({
|
|
427
383
|
creatorFacet = undefined,
|
|
428
384
|
publicFacet = undefined,
|
|
@@ -431,16 +387,18 @@ export const makeZCFZygote = async (
|
|
|
431
387
|
}) => {
|
|
432
388
|
const unexpectedKeys = Object.keys(unexpected);
|
|
433
389
|
unexpectedKeys.length === 0 ||
|
|
434
|
-
Fail`contract
|
|
390
|
+
Fail`contract ${
|
|
391
|
+
prepare ? 'prepare' : 'start'
|
|
392
|
+
} returned unrecognized properties ${unexpectedKeys}`;
|
|
435
393
|
|
|
436
394
|
const areDurable = objectMap(
|
|
437
395
|
{ creatorFacet, publicFacet, creatorInvitation },
|
|
438
396
|
canBeDurable,
|
|
439
397
|
);
|
|
440
398
|
const allDurable = Object.values(areDurable).every(Boolean);
|
|
441
|
-
if (
|
|
399
|
+
if (prepare) {
|
|
442
400
|
allDurable ||
|
|
443
|
-
Fail`
|
|
401
|
+
Fail`values from prepare() must be durable ${areDurable}`;
|
|
444
402
|
}
|
|
445
403
|
|
|
446
404
|
if (allDurable) {
|
|
@@ -460,21 +418,18 @@ export const makeZCFZygote = async (
|
|
|
460
418
|
},
|
|
461
419
|
|
|
462
420
|
restartContract: async (privateArgs = undefined) => {
|
|
463
|
-
|
|
464
|
-
meta.upgradability === 'canUpgrade' || Fail`contract cannot upgrade`;
|
|
465
|
-
}
|
|
421
|
+
prepare || Fail`prepare must be defined to upgrade a contract`;
|
|
466
422
|
zoeInstanceAdmin = zcfBaggage.get('zcfInstanceAdmin');
|
|
467
423
|
instanceRecHolder = zcfBaggage.get('instanceRecHolder');
|
|
468
424
|
initSeatMgrAndMintKind();
|
|
469
425
|
|
|
470
|
-
const { privateArgsShape } = meta;
|
|
471
426
|
if (privateArgsShape) {
|
|
472
427
|
mustMatch(privateArgs, privateArgsShape, 'privateArgs');
|
|
473
428
|
}
|
|
474
429
|
|
|
475
430
|
// restart an upgradeable contract
|
|
476
431
|
return E.when(
|
|
477
|
-
|
|
432
|
+
prepare(zcf, privateArgs, contractBaggage),
|
|
478
433
|
({
|
|
479
434
|
creatorFacet = undefined,
|
|
480
435
|
publicFacet = undefined,
|
|
@@ -3,4 +3,10 @@ export function atomicRearrange(zcf: ZCF, transfers: TransferPart[]): void;
|
|
|
3
3
|
export function fromOnly(fromSeat: ZCFSeat, fromAmounts: AmountKeywordRecord): TransferPart;
|
|
4
4
|
export function toOnly(toSeat: ZCFSeat, toAmounts: AmountKeywordRecord): TransferPart;
|
|
5
5
|
export function atomicTransfer(zcf: ZCF, fromSeat?: ZCFSeat | undefined, toSeat?: ZCFSeat | undefined, fromAmounts?: AmountKeywordRecord | undefined, toAmounts?: AmountKeywordRecord | undefined): void;
|
|
6
|
+
export type TransferPart = [
|
|
7
|
+
fromSeat?: ZCFSeat,
|
|
8
|
+
toSeat?: ZCFSeat,
|
|
9
|
+
fromAmounts?: AmountKeywordRecord,
|
|
10
|
+
toAmounts?: AmountKeywordRecord
|
|
11
|
+
];
|
|
6
12
|
//# sourceMappingURL=atomicTransfer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atomicTransfer.d.ts","sourceRoot":"","sources":["atomicTransfer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"atomicTransfer.d.ts","sourceRoot":"","sources":["atomicTransfer.js"],"names":[],"mappings":"AAMA,iEAGE;AAgDK,qCAHI,GAAG,aACH,cAAc,QA+ExB;AAcM,mCAJI,OAAO,eACP,mBAAmB,gBAIc;AAcrC,+BAJI,OAAO,aACP,mBAAmB,gBAIqB;AAW5C,oCANI,GAAG,kKAYiE;2BAzKlE;IACZ,QAAY,CAAC,EAAE,OAAO;IACtB,MAAU,CAAC,EAAE,OAAO;IACpB,WAAe,CAAC,EAAE,mBAAmB;IACrC,SAAa,CAAC,EAAE,mBAAmB;CAChC"}
|
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
import { M } from '@agoric/store';
|
|
1
|
+
import { mustMatch, M } from '@agoric/store';
|
|
2
|
+
import { assertRightsConserved } from '../contractFacet/rightsConservation.js';
|
|
2
3
|
import { AmountKeywordRecordShape, SeatShape } from '../typeGuards.js';
|
|
3
4
|
|
|
5
|
+
const { Fail, quote: q } = assert;
|
|
6
|
+
|
|
4
7
|
export const TransferPartShape = M.splitArray(
|
|
5
8
|
harden([M.opt(SeatShape), M.opt(SeatShape), M.opt(AmountKeywordRecordShape)]),
|
|
6
9
|
harden([M.opt(AmountKeywordRecordShape)]),
|
|
7
10
|
);
|
|
8
11
|
|
|
12
|
+
/**
|
|
13
|
+
* @typedef {[
|
|
14
|
+
* fromSeat?: ZCFSeat,
|
|
15
|
+
* toSeat?: ZCFSeat,
|
|
16
|
+
* fromAmounts?: AmountKeywordRecord,
|
|
17
|
+
* toAmounts?: AmountKeywordRecord
|
|
18
|
+
* ]} TransferPart
|
|
19
|
+
*/
|
|
20
|
+
|
|
9
21
|
/**
|
|
10
22
|
* Asks Zoe (via zcf) to rearrange the allocations among the seats
|
|
11
23
|
* mentioned. This is a set of changes to allocations that must satisfy
|
|
@@ -40,13 +52,86 @@ export const TransferPartShape = M.splitArray(
|
|
|
40
52
|
* which will remain helpers. These helper are for convenience
|
|
41
53
|
* in expressing atomic rearrangements clearly.
|
|
42
54
|
*
|
|
43
|
-
* @deprecated use the zcf builtin instead
|
|
44
|
-
*
|
|
45
55
|
* @param {ZCF} zcf
|
|
46
56
|
* @param {TransferPart[]} transfers
|
|
47
57
|
*/
|
|
48
58
|
export const atomicRearrange = (zcf, transfers) => {
|
|
49
|
-
|
|
59
|
+
mustMatch(transfers, M.arrayOf(M.array()), 'transfers');
|
|
60
|
+
const uniqueSeatSet = new Set();
|
|
61
|
+
for (const [
|
|
62
|
+
fromSeat = undefined,
|
|
63
|
+
toSeat = undefined,
|
|
64
|
+
fromAmounts = undefined,
|
|
65
|
+
toAmounts = undefined,
|
|
66
|
+
] of transfers) {
|
|
67
|
+
if (fromSeat) {
|
|
68
|
+
if (!fromAmounts) {
|
|
69
|
+
throw Fail`Transfer from ${fromSeat} must say how much`;
|
|
70
|
+
}
|
|
71
|
+
uniqueSeatSet.add(fromSeat);
|
|
72
|
+
if (toSeat) {
|
|
73
|
+
// Conserved transfer between seats
|
|
74
|
+
if (toAmounts) {
|
|
75
|
+
// distinct amounts, so we check conservation.
|
|
76
|
+
assertRightsConserved(
|
|
77
|
+
Object.values(fromAmounts),
|
|
78
|
+
Object.values(toAmounts),
|
|
79
|
+
);
|
|
80
|
+
} // else fromAmounts will be used as toAmounts
|
|
81
|
+
uniqueSeatSet.add(toSeat);
|
|
82
|
+
} else {
|
|
83
|
+
// Transfer only from fromSeat
|
|
84
|
+
!toAmounts ||
|
|
85
|
+
Fail`Transfer without toSeat cannot have toAmounts ${toAmounts}`;
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
toSeat || Fail`Transfer must have at least one of fromSeat or toSeat`;
|
|
89
|
+
// Transfer only to toSeat
|
|
90
|
+
!fromAmounts ||
|
|
91
|
+
Fail`Transfer without fromSeat cannot have fromAmounts ${fromAmounts}`;
|
|
92
|
+
toAmounts || Fail`Transfer to ${toSeat} must say how much`;
|
|
93
|
+
uniqueSeatSet.add(toSeat);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const uniqueSeats = harden([...uniqueSeatSet.keys()]);
|
|
98
|
+
for (const seat of uniqueSeats) {
|
|
99
|
+
!seat.hasStagedAllocation() ||
|
|
100
|
+
Fail`Cannot mix atomicRearrange with seat stagings: ${seat}`;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// At this point the basic shape has been validated
|
|
104
|
+
|
|
105
|
+
try {
|
|
106
|
+
for (const [
|
|
107
|
+
fromSeat = undefined,
|
|
108
|
+
toSeat = undefined,
|
|
109
|
+
fromAmounts = undefined,
|
|
110
|
+
toAmounts = toSeat && fromAmounts,
|
|
111
|
+
] of transfers) {
|
|
112
|
+
if (fromSeat && fromAmounts) {
|
|
113
|
+
// testing both just to satisfy the type checker
|
|
114
|
+
fromSeat.decrementBy(fromAmounts);
|
|
115
|
+
}
|
|
116
|
+
if (toSeat && toAmounts) {
|
|
117
|
+
// testing both just to satisfy the type checker
|
|
118
|
+
toSeat.incrementBy(toAmounts);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Perhaps deprecate this >= 2 restriction?
|
|
123
|
+
uniqueSeats.length >= 2 ||
|
|
124
|
+
Fail`Can only commit a reallocation among at least 2 seats: ${q(
|
|
125
|
+
uniqueSeats.length,
|
|
126
|
+
)}`;
|
|
127
|
+
// Take it apart and put it back together to satisfy the type checker
|
|
128
|
+
const [seat0, seat1, ...restSeats] = uniqueSeats;
|
|
129
|
+
zcf.reallocate(seat0, seat1, ...restSeats);
|
|
130
|
+
} finally {
|
|
131
|
+
for (const seat of uniqueSeats) {
|
|
132
|
+
seat.clear();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
50
135
|
};
|
|
51
136
|
|
|
52
137
|
/**
|
|
@@ -94,4 +179,4 @@ export const atomicTransfer = (
|
|
|
94
179
|
toSeat = undefined,
|
|
95
180
|
fromAmounts = undefined,
|
|
96
181
|
toAmounts = undefined,
|
|
97
|
-
) =>
|
|
182
|
+
) => atomicRearrange(zcf, harden([[fromSeat, toSeat, fromAmounts, toAmounts]]));
|
|
@@ -27,7 +27,7 @@ const BASIS_POINTS = 10000n; // TODO change to 10_000n once tooling copes.
|
|
|
27
27
|
* pool of the kind of asset sent in
|
|
28
28
|
* @param {any} outputReserve - the value in the liquidity
|
|
29
29
|
* pool of the kind of asset to be sent out
|
|
30
|
-
* @param {bigint} [feeBasisPoints] - the fee taken in
|
|
30
|
+
* @param {bigint} [feeBasisPoints=30n] - the fee taken in
|
|
31
31
|
* basis points. The default is 0.3% or 30 basis points. The fee
|
|
32
32
|
* is taken from inputValue
|
|
33
33
|
* @returns {NatValue} outputValue - the current price, in value form
|
|
@@ -66,7 +66,7 @@ export const getInputPrice = (
|
|
|
66
66
|
* pool of the asset being spent
|
|
67
67
|
* @param {any} outputReserve - the value in the liquidity
|
|
68
68
|
* pool of the kind of asset to be sent out
|
|
69
|
-
* @param {bigint} [feeBasisPoints] - the fee taken in
|
|
69
|
+
* @param {bigint} [feeBasisPoints=30n] - the fee taken in
|
|
70
70
|
* basis points. The default is 0.3% or 30 basis points. The fee is taken from
|
|
71
71
|
* outputValue
|
|
72
72
|
* @returns {NatValue} inputValue - the value of input required to purchase output
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function makeEphemeraProvider<E extends {}, K extends {} = any>(init: (key: K) => E): (key: K) => E;
|
|
2
|
-
export function provideEmptySeat(zcf: ZCF, baggage: MapStore<string,
|
|
2
|
+
export function provideEmptySeat(zcf: ZCF, baggage: MapStore<string, unknown>, name: string): ZCFSeat;
|
|
3
3
|
export function provideAll<T extends Record<string, () => ERef<any>>>(baggage: MapStore<string, any>, thunks: T): Promise<{ [K in keyof T]: Awaited<ReturnType<T[K]>>; }>;
|
|
4
|
-
export function provideSingleton<T extends () => ERef<any>>(mapStore: MapStore<string,
|
|
4
|
+
export function provideSingleton<T extends () => ERef<any>>(mapStore: MapStore<string, unknown>, key: string, makeValue: T, withValue?: ((value: Awaited<ReturnType<T>>) => void) | undefined): Promise<Awaited<ReturnType<T>>>;
|
|
5
5
|
//# sourceMappingURL=durability.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"durability.d.ts","sourceRoot":"","sources":["durability.js"],"names":[],"mappings":"AAaO,2GAkBN;AAWM,sCALI,GAAG,
|
|
1
|
+
{"version":3,"file":"durability.d.ts","sourceRoot":"","sources":["durability.js"],"names":[],"mappings":"AAaO,2GAkBN;AAWM,sCALI,GAAG,4CAEH,MAAM,GACJ,OAAO,CAInB;AAiCM,0DAL4B,KAAK,GAAG,CAAC,YACjC,SAAS,MAAM,EAAE,GAAG,CAAC,sEAyB/B;AAgBM,iDAPa,KAAK,GAAG,CAAC,4CAElB,MAAM,gEAE6B,IAAI,gDAejD"}
|
|
@@ -113,9 +113,9 @@ harden(provideAll);
|
|
|
113
113
|
* @returns {Promise<Awaited<ReturnType<T>>>}
|
|
114
114
|
*/
|
|
115
115
|
export const provideSingleton = (mapStore, key, makeValue, withValue) => {
|
|
116
|
-
const stored =
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
const stored =
|
|
117
|
+
mapStore.has(key) ||
|
|
118
|
+
E.when(makeValue(), v => mapStore.init(key, harden(v)));
|
|
119
119
|
|
|
120
120
|
return E.when(stored, () => {
|
|
121
121
|
const value = mapStore.get(key);
|
|
@@ -16,22 +16,7 @@ export function makeOnewayPriceAuthorityKit(opts: {
|
|
|
16
16
|
actualBrandIn: Brand<'nat'>;
|
|
17
17
|
actualBrandOut: Brand<'nat'>;
|
|
18
18
|
}): PriceAuthorityKit;
|
|
19
|
-
export const PriceAuthorityI: import("@endo/patterns").InterfaceGuard
|
|
20
|
-
getQuoteIssuer: import("@endo/patterns").MethodGuard;
|
|
21
|
-
getTimerService: import("@endo/patterns").MethodGuard;
|
|
22
|
-
quoteGiven: import("@endo/patterns").MethodGuard;
|
|
23
|
-
quoteWanted: import("@endo/patterns").MethodGuard;
|
|
24
|
-
makeQuoteNotifier: import("@endo/patterns").MethodGuard;
|
|
25
|
-
quoteAtTime: import("@endo/patterns").MethodGuard;
|
|
26
|
-
quoteWhenLT: import("@endo/patterns").MethodGuard;
|
|
27
|
-
quoteWhenLTE: import("@endo/patterns").MethodGuard;
|
|
28
|
-
quoteWhenGTE: import("@endo/patterns").MethodGuard;
|
|
29
|
-
quoteWhenGT: import("@endo/patterns").MethodGuard;
|
|
30
|
-
mutableQuoteWhenLT: import("@endo/patterns").MethodGuard;
|
|
31
|
-
mutableQuoteWhenLTE: import("@endo/patterns").MethodGuard;
|
|
32
|
-
mutableQuoteWhenGTE: import("@endo/patterns").MethodGuard;
|
|
33
|
-
mutableQuoteWhenGT: import("@endo/patterns").MethodGuard;
|
|
34
|
-
}>;
|
|
19
|
+
export const PriceAuthorityI: import("@endo/patterns").InterfaceGuard;
|
|
35
20
|
export type CompareAmount = (amount: Amount, amountLimit: Amount) => boolean;
|
|
36
21
|
export type Trigger = (createInstantQuote: PriceQuoteCreate) => Promise<void>;
|
|
37
22
|
//# sourceMappingURL=priceAuthority.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceAuthority.d.ts","sourceRoot":"","sources":["priceAuthority.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"priceAuthority.d.ts","sourceRoot":"","sources":["priceAuthority.js"],"names":[],"mappings":"AA6DA;;;;;;;;;GASG;AACH;IAR+B,WAAW,EAA/B,OAAO,KAAK,CAAC;IACiB,QAAQ,EAAtC,KAAK,SAAS,OAAO,CAAC,CAAC;IACmC,KAAK,EAA/D,KAAK,OAAO,wBAAwB,EAAE,YAAY,CAAC;IAC5B,WAAW,EAAlC,gBAAgB;IACG,aAAa,EAAhC,MAAM,KAAK,CAAC;IACO,cAAc,EAAjC,MAAM,KAAK,CAAC;IACV,iBAAiB,CA6S7B;AAxUD,sEAiBG;qCA3CQ,MAAM,eACN,MAAM,KACJ,OAAO;2CAiBT,gBAAgB,KACd,QAAQ,IAAI,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
/// <reference types="@agoric/time/src/types.d.ts" />
|
|
1
|
+
/// <reference path="../../../time/src/types.d.ts" />
|
|
3
2
|
|
|
4
3
|
import { E } from '@endo/eventual-send';
|
|
5
4
|
import { Far } from '@endo/marshal';
|
|
@@ -337,7 +336,6 @@ export function makeOnewayPriceAuthorityKit(opts) {
|
|
|
337
336
|
deadline,
|
|
338
337
|
Far('wakeObj', {
|
|
339
338
|
async wake(timestamp) {
|
|
340
|
-
await null;
|
|
341
339
|
try {
|
|
342
340
|
const quoteP = createQuote(calcAmountOut => ({
|
|
343
341
|
amountIn,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceAuthorityInitial.d.ts","sourceRoot":"","sources":["priceAuthorityInitial.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"priceAuthorityInitial.d.ts","sourceRoot":"","sources":["priceAuthorityInitial.js"],"names":[],"mappings":"AA2BO,oDAPI,KAAK,kBACL,cAAc,aACd,KAAK,KAAK,KAAK,CAAC,CAAC,WACjB,MAAM,KAAK,CAAC,YACZ,MAAM,KAAK,CAAC,GACV,cAAc,CAyF1B;uBAtGyB,OAAO,qBAAqB,EAAE,KAAK,CAAC,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function provideQuoteMint(baggage: MapStore<string,
|
|
1
|
+
export function provideQuoteMint(baggage: MapStore<string, unknown>): Mint<"set">;
|
|
2
2
|
//# sourceMappingURL=priceAuthorityQuoteMint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceAuthorityQuoteMint.d.ts","sourceRoot":"","sources":["priceAuthorityQuoteMint.js"],"names":[],"mappings":"AAWO,
|
|
1
|
+
{"version":3,"file":"priceAuthorityQuoteMint.d.ts","sourceRoot":"","sources":["priceAuthorityQuoteMint.js"],"names":[],"mappings":"AAWO,kFAsBN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceAuthorityTransform.d.ts","sourceRoot":"","sources":["priceAuthorityTransform.js"],"names":[],"mappings":"AAiBO,sCARI,MAAM,KAAK,CAAC,YACZ,OAAO,KAAK,CAAC,aACb,OAAO,KAAK,CAAC,SACb,KAAK,OAAO,wBAAwB,EAAE,YAAY,CAAC,aACnD,OAAO,cAAc,EAAE,SAAS,aAChC,KAAK,KAAK,KAAK,CAAC,CAAC,GACf,QAAQ,UAAU,CAAC,CAmB/B;AAeM;IAX4B,SAAS,EAAjC,KAAK,KAAK,KAAK,CAAC,CAAC;IACU,oBAAoB,EAA/C,KAAK,cAAc,CAAC;IACD,aAAa,EAAhC,MAAM,KAAK,CAAC;IACO,cAAc,EAAjC,MAAM,KAAK,CAAC;IACQ,aAAa;IACb,cAAc;IACgB,kBAAkB,eAAzD,OAAO,KAAK,CAAC,KAAK,OAAO,KAAK,CAAC;IACS,mBAAmB,gBAA1D,OAAO,KAAK,CAAC,KAAK,OAAO,KAAK,CAAC;IACa,uBAAuB,qBAA9D,OAAO,KAAK,CAAC,KAAK,OAAO,KAAK,CAAC;IACS,wBAAwB,sBAA/D,OAAO,KAAK,CAAC,KAAK,OAAO,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"priceAuthorityTransform.d.ts","sourceRoot":"","sources":["priceAuthorityTransform.js"],"names":[],"mappings":"AAiBO,sCARI,MAAM,KAAK,CAAC,YACZ,OAAO,KAAK,CAAC,aACb,OAAO,KAAK,CAAC,SACb,KAAK,OAAO,wBAAwB,EAAE,YAAY,CAAC,aACnD,OAAO,cAAc,EAAE,SAAS,aAChC,KAAK,KAAK,KAAK,CAAC,CAAC,GACf,QAAQ,UAAU,CAAC,CAmB/B;AAeM;IAX4B,SAAS,EAAjC,KAAK,KAAK,KAAK,CAAC,CAAC;IACU,oBAAoB,EAA/C,KAAK,cAAc,CAAC;IACD,aAAa,EAAhC,MAAM,KAAK,CAAC;IACO,cAAc,EAAjC,MAAM,KAAK,CAAC;IACQ,aAAa;IACb,cAAc;IACgB,kBAAkB,eAAzD,OAAO,KAAK,CAAC,KAAK,OAAO,KAAK,CAAC;IACS,mBAAmB,gBAA1D,OAAO,KAAK,CAAC,KAAK,OAAO,KAAK,CAAC;IACa,uBAAuB,qBAA9D,OAAO,KAAK,CAAC,KAAK,OAAO,KAAK,CAAC;IACS,wBAAwB,sBAA/D,OAAO,KAAK,CAAC,KAAK,OAAO,KAAK,CAAC;4BA6N3D;uBAtQyB,OAAO,qBAAqB,EAAE,KAAK,CAAC,CAAC,CAAC"}
|
|
@@ -87,8 +87,9 @@ export const makePriceAuthorityTransform = async ({
|
|
|
87
87
|
sourceBrandOut,
|
|
88
88
|
);
|
|
89
89
|
|
|
90
|
-
const { value: sourceQuoteValue } =
|
|
91
|
-
|
|
90
|
+
const { value: sourceQuoteValue } = await E(sourceQuoteIssuer).getAmountOf(
|
|
91
|
+
sourceQuotePayment,
|
|
92
|
+
);
|
|
92
93
|
|
|
93
94
|
sourceQuoteValue.length === 1 ||
|
|
94
95
|
Fail`sourceQuoteValue.length ${sourceQuoteValue.length} is not 1`;
|