Skip to content

Commit ed76c8b

Browse files
authored
refactor(PSM!): make PSM use zcf.atomicRearrange() (#7903)
closes: #6678 refs: #7900 ## Description update PSM to use `zcf.atomicRearrange()`. This change must not be pushed to the chain before #7900. ### Security Considerations None ### Scaling Considerations None ### Documentation Considerations None ### Testing Considerations None ### Release considerations This requires a change to Zoe (#7900). Since PSM gets upgraded separately from Zoe, this is staged as a separate PR. Once #7900 is on chain, this update can be made, even if it's in the same release cycle, as long as Zoe is upgraded first. This change is independent of changes to other contracts.
2 parents d4f2864 + e245d6a commit ed76c8b

File tree

1 file changed

+2
-5
lines changed
  • packages/inter-protocol/src/psm

1 file changed

+2
-5
lines changed

packages/inter-protocol/src/psm/psm.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
import { StorageNodeShape } from '@agoric/internal';
1515
import { M, prepareExo, provide } from '@agoric/vat-data';
1616
import {
17-
atomicRearrange,
1817
atomicTransfer,
1918
ceilMultiplyBy,
2019
floorDivideBy,
@@ -273,8 +272,7 @@ export const start = async (zcf, privateArgs, baggage) => {
273272
const maxAnchor = floorMultiplyBy(afterFee, anchorPerMinted);
274273
AmountMath.isGTE(maxAnchor, wanted) ||
275274
Fail`wanted ${wanted} is more than ${given} minus fees ${fee}`;
276-
atomicRearrange(
277-
zcf,
275+
zcf.atomicRearrange(
278276
harden([
279277
[seat, stage, { In: afterFee }, { Minted: afterFee }],
280278
[seat, feePool, { In: fee }, { Minted: fee }],
@@ -305,8 +303,7 @@ export const start = async (zcf, privateArgs, baggage) => {
305303
Fail`wanted ${wanted} is more than ${given} minus fees ${fee}`;
306304
mintMinted(asStable);
307305
try {
308-
atomicRearrange(
309-
zcf,
306+
zcf.atomicRearrange(
310307
harden([
311308
[seat, anchorPool, { In: given }, { Anchor: given }],
312309
[stage, seat, { Minted: afterFee }, { Out: afterFee }],

0 commit comments

Comments
 (0)