1
1
import { AssetKind } from '@agoric/ertp' ;
2
- import {
3
- assertAllDefined ,
4
- deeplyFulfilledObject ,
5
- makeTracer ,
6
- } from '@agoric/internal' ;
2
+ import { assertAllDefined , makeTracer } from '@agoric/internal' ;
7
3
import { observeIteration , subscribeEach } from '@agoric/notifier' ;
8
4
import {
9
5
CosmosChainInfoShape ,
@@ -12,20 +8,19 @@ import {
12
8
registerChainsAndAssets ,
13
9
withOrchestration ,
14
10
} from '@agoric/orchestration' ;
11
+ import { makeZoeTools } from '@agoric/orchestration/src/utils/zoe-tools.js' ;
15
12
import { provideSingleton } from '@agoric/zoe/src/contractSupport/durability.js' ;
16
13
import { prepareRecorderKitMakers } from '@agoric/zoe/src/contractSupport/recorder.js' ;
17
- import { makeZoeTools } from '@agoric/orchestration/src/utils/zoe-tools.js' ;
18
- import { depositToSeat } from '@agoric/zoe/src/contractSupport/zoeHelpers.js' ;
19
14
import { E } from '@endo/far' ;
20
- import { M , objectMap } from '@endo/patterns' ;
15
+ import { M } from '@endo/patterns' ;
21
16
import { prepareAdvancer } from './exos/advancer.js' ;
22
17
import { prepareLiquidityPoolKit } from './exos/liquidity-pool.js' ;
23
18
import { prepareSettler } from './exos/settler.js' ;
24
19
import { prepareStatusManager } from './exos/status-manager.js' ;
25
20
import { prepareTransactionFeedKit } from './exos/transaction-feed.js' ;
26
- import { defineInertInvitation } from './utils/zoe.js' ;
27
- import { FastUSDCTermsShape , FeeConfigShape } from './type-guards.js' ;
28
21
import * as flows from './fast-usdc.flows.js' ;
22
+ import { FastUSDCTermsShape , FeeConfigShape } from './type-guards.js' ;
23
+ import { defineInertInvitation } from './utils/zoe.js' ;
29
24
30
25
const trace = makeTracer ( 'FastUsdc' ) ;
31
26
@@ -151,35 +146,6 @@ export const contract = async (zcf, privateArgs, zone, tools) => {
151
146
async makeOperatorInvitation ( operatorId ) {
152
147
return feedKit . creator . makeOperatorInvitation ( operatorId ) ;
153
148
} ,
154
- /**
155
- * @param {{ USDC: Amount<'nat'>} } amounts
156
- */
157
- testBorrow ( amounts ) {
158
- console . log ( '🚧🚧 UNTIL: borrow is integrated (#10388) 🚧🚧' , amounts ) ;
159
- const { zcfSeat : tmpAssetManagerSeat } = zcf . makeEmptySeatKit ( ) ;
160
- poolKit . borrower . borrow ( tmpAssetManagerSeat , amounts ) ;
161
- return tmpAssetManagerSeat . getCurrentAllocation ( ) ;
162
- } ,
163
- /**
164
- *
165
- * @param {RepayAmountKWR } amounts
166
- * @param {RepayPaymentKWR } payments
167
- * @returns {Promise<AmountKeywordRecord> }
168
- */
169
- async testRepay ( amounts , payments ) {
170
- console . log ( '🚧🚧 UNTIL: repay is integrated (#10388) 🚧🚧' , amounts ) ;
171
- const { zcfSeat : tmpAssetManagerSeat } = zcf . makeEmptySeatKit ( ) ;
172
- await depositToSeat (
173
- zcf ,
174
- tmpAssetManagerSeat ,
175
- await deeplyFulfilledObject (
176
- objectMap ( payments , pmt => E ( terms . issuers . USDC ) . getAmountOf ( pmt ) ) ,
177
- ) ,
178
- payments ,
179
- ) ;
180
- poolKit . repayer . repay ( tmpAssetManagerSeat , amounts ) ;
181
- return tmpAssetManagerSeat . getCurrentAllocation ( ) ;
182
- } ,
183
149
} ) ;
184
150
185
151
const publicFacet = zone . exo ( 'Fast USDC Public' , undefined , {
0 commit comments