Skip to content

Commit

Permalink
chore(fast-usdc): prune testBorrow, testRepay methods
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Dec 3, 2024
1 parent aa7a476 commit d96a45e
Showing 1 changed file with 5 additions and 39 deletions.
44 changes: 5 additions & 39 deletions packages/fast-usdc/src/fast-usdc.contract.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { AssetKind } from '@agoric/ertp';
import {
assertAllDefined,
deeplyFulfilledObject,
makeTracer,
} from '@agoric/internal';
import { assertAllDefined, makeTracer } from '@agoric/internal';
import { observeIteration, subscribeEach } from '@agoric/notifier';
import {
CosmosChainInfoShape,
Expand All @@ -12,20 +8,19 @@ import {
registerChainsAndAssets,
withOrchestration,
} from '@agoric/orchestration';
import { makeZoeTools } from '@agoric/orchestration/src/utils/zoe-tools.js';
import { provideSingleton } from '@agoric/zoe/src/contractSupport/durability.js';
import { prepareRecorderKitMakers } from '@agoric/zoe/src/contractSupport/recorder.js';
import { makeZoeTools } from '@agoric/orchestration/src/utils/zoe-tools.js';
import { depositToSeat } from '@agoric/zoe/src/contractSupport/zoeHelpers.js';
import { E } from '@endo/far';
import { M, objectMap } from '@endo/patterns';
import { M } from '@endo/patterns';
import { prepareAdvancer } from './exos/advancer.js';
import { prepareLiquidityPoolKit } from './exos/liquidity-pool.js';
import { prepareSettler } from './exos/settler.js';
import { prepareStatusManager } from './exos/status-manager.js';
import { prepareTransactionFeedKit } from './exos/transaction-feed.js';
import { defineInertInvitation } from './utils/zoe.js';
import { FastUSDCTermsShape, FeeConfigShape } from './type-guards.js';
import * as flows from './fast-usdc.flows.js';
import { FastUSDCTermsShape, FeeConfigShape } from './type-guards.js';
import { defineInertInvitation } from './utils/zoe.js';

const trace = makeTracer('FastUsdc');

Expand Down Expand Up @@ -151,35 +146,6 @@ export const contract = async (zcf, privateArgs, zone, tools) => {
async makeOperatorInvitation(operatorId) {
return feedKit.creator.makeOperatorInvitation(operatorId);
},
/**
* @param {{ USDC: Amount<'nat'>}} amounts
*/
testBorrow(amounts) {
console.log('🚧🚧 UNTIL: borrow is integrated (#10388) 🚧🚧', amounts);
const { zcfSeat: tmpAssetManagerSeat } = zcf.makeEmptySeatKit();
poolKit.borrower.borrow(tmpAssetManagerSeat, amounts);
return tmpAssetManagerSeat.getCurrentAllocation();
},
/**
*
* @param {RepayAmountKWR} amounts
* @param {RepayPaymentKWR} payments
* @returns {Promise<AmountKeywordRecord>}
*/
async testRepay(amounts, payments) {
console.log('🚧🚧 UNTIL: repay is integrated (#10388) 🚧🚧', amounts);
const { zcfSeat: tmpAssetManagerSeat } = zcf.makeEmptySeatKit();
await depositToSeat(
zcf,
tmpAssetManagerSeat,
await deeplyFulfilledObject(
objectMap(payments, pmt => E(terms.issuers.USDC).getAmountOf(pmt)),
),
payments,
);
poolKit.repayer.repay(tmpAssetManagerSeat, amounts);
return tmpAssetManagerSeat.getCurrentAllocation();
},
});

const publicFacet = zone.exo('Fast USDC Public', undefined, {
Expand Down

0 comments on commit d96a45e

Please sign in to comment.