diff --git a/contract/package.json b/contract/package.json index 6f0a9cb..980d68e 100644 --- a/contract/package.json +++ b/contract/package.json @@ -10,7 +10,7 @@ "@agoric/governance": "0.6.0", "@agoric/nat": "4.1.0", "@agoric/notifier": "0.4.0", - "@agoric/run-protocol": "0.11.0", + "@agoric/inter-protocol": "0.13.1", "@agoric/store": "0.7.1", "@agoric/swingset-vat": "0.27.0", "@agoric/vats": "0.9.0", diff --git a/contract/src/interest.js b/contract/src/interest.js index 2bf9692..b632dd4 100644 --- a/contract/src/interest.js +++ b/contract/src/interest.js @@ -2,7 +2,7 @@ import { AmountMath } from '@agoric/ertp'; import { assert, details as X } from '@agoric/assert'; -import { makeInterestCalculator, calculateCompoundedInterest } from '@agoric/run-protocol/src/interest.js'; +import { makeInterestCalculator, calculateCompoundedInterest } from '@agoric/inter-protocol/src/interest.js'; export const SECONDS_PER_YEAR = 60n * 60n * 24n * 365n; export const BASIS_POINTS = 10000n; diff --git a/contract/src/lendingPool/assertionHelper.js b/contract/src/lendingPool/assertionHelper.js index 5955a33..4ffc614 100644 --- a/contract/src/lendingPool/assertionHelper.js +++ b/contract/src/lendingPool/assertionHelper.js @@ -1,5 +1,5 @@ import { assert, details as X, q } from '@agoric/assert'; -import { makeTracer } from '@agoric/run-protocol/src/makeTracer.js'; +import { makeTracer } from '@agoric/inter-protocol/src/makeTracer.js'; import { AmountMath } from '@agoric/ertp'; const trace = makeTracer('LendingPool'); diff --git a/contract/src/lendingPool/debtsPerCollateral.js b/contract/src/lendingPool/debtsPerCollateral.js index bd302da..b03cf0c 100644 --- a/contract/src/lendingPool/debtsPerCollateral.js +++ b/contract/src/lendingPool/debtsPerCollateral.js @@ -7,7 +7,7 @@ import { makeRatioFromAmounts, } from '@agoric/zoe/src/contractSupport/index.js'; import { liquidationDetailTerms, liquidate } from './liquidation.js'; -import { makeTracer } from '@agoric/run-protocol/src/makeTracer.js'; +import { makeTracer } from '@agoric/inter-protocol/src/makeTracer.js'; import { ratioGTE } from '@agoric/zoe/src/contractSupport/ratio.js'; import { makeLiquidationObserver } from './liquidationObserver.js'; import { makeLoanStoreUtils } from './loanStoreUtils.js'; diff --git a/contract/src/lendingPool/lendingPool.js b/contract/src/lendingPool/lendingPool.js index c5ce798..d46094f 100644 --- a/contract/src/lendingPool/lendingPool.js +++ b/contract/src/lendingPool/lendingPool.js @@ -6,7 +6,7 @@ import '@agoric/zoe/src/contracts/exported.js'; import { E } from '@endo/far'; import '@agoric/governance/src/exported.js'; import { AmountMath, AssetKind } from '@agoric/ertp'; -import { makeTracer } from '@agoric/run-protocol/src/makeTracer.js'; +import { makeTracer } from '@agoric/inter-protocol/src/makeTracer.js'; import { makeScalarMap } from '@agoric/store'; import { assertProposalShape } from '@agoric/zoe/src/contractSupport/index.js'; import { makeRatioFromAmounts } from '@agoric/zoe/src/contractSupport/ratio.js'; diff --git a/contract/src/lendingPool/liquidateMinimum.js b/contract/src/lendingPool/liquidateMinimum.js index edaea8b..5508d92 100644 --- a/contract/src/lendingPool/liquidateMinimum.js +++ b/contract/src/lendingPool/liquidateMinimum.js @@ -7,7 +7,7 @@ import { import { AmountMath } from '@agoric/ertp'; import { Far, E } from '@endo/far'; -import { makeTracer } from '@agoric/run-protocol/src/makeTracer.js'; +import { makeTracer } from '@agoric/inter-protocol/src/makeTracer.js'; const trace = makeTracer('LiqMin'); diff --git a/contract/src/lendingPool/liquidation.js b/contract/src/lendingPool/liquidation.js index 5c0aeaf..adfd86f 100644 --- a/contract/src/lendingPool/liquidation.js +++ b/contract/src/lendingPool/liquidation.js @@ -4,7 +4,7 @@ import { E } from '@endo/far'; import { AmountMath } from '@agoric/ertp'; import { makeRatio, offerTo } from '@agoric/zoe/src/contractSupport/index.js'; -import { makeTracer } from '@agoric/run-protocol/src/makeTracer.js'; +import { makeTracer } from '@agoric/inter-protocol/src/makeTracer.js'; const trace = makeTracer('LIQ'); diff --git a/contract/src/lendingPool/liquidationObserver.js b/contract/src/lendingPool/liquidationObserver.js index 8bf2dc7..670564a 100644 --- a/contract/src/lendingPool/liquidationObserver.js +++ b/contract/src/lendingPool/liquidationObserver.js @@ -11,7 +11,7 @@ import { getAmountOut } from '@agoric/zoe/src/contractSupport/index.js'; import { getAmountIn } from '@agoric/zoe/src/contractSupport/priceQuote.js'; import { Nat } from '@agoric/nat'; import { E } from '@endo/far'; -import { makeTracer } from '@agoric/run-protocol/src/makeTracer.js'; +import { makeTracer } from '@agoric/inter-protocol/src/makeTracer.js'; const tracer = makeTracer('LiquidationObserver'); diff --git a/contract/src/lendingPool/loan.js b/contract/src/lendingPool/loan.js index 6d9e58d..e8324f4 100644 --- a/contract/src/lendingPool/loan.js +++ b/contract/src/lendingPool/loan.js @@ -13,11 +13,11 @@ import { import { assert } from '@agoric/assert'; import { AmountMath } from '@agoric/ertp'; import { Far } from '@endo/marshal'; -import { makeTracer } from '@agoric/run-protocol/src/makeTracer.js'; +import { makeTracer } from '@agoric/inter-protocol/src/makeTracer.js'; import { calculateCurrentDebt, reverseInterest, -} from '@agoric/run-protocol/src/interest-math.js'; +} from '@agoric/inter-protocol/src/interest-math.js'; import { makeLoanKit } from './loanKit.js'; import { assertDebtDeltaNotZero, diff --git a/contract/src/lendingPool/loanStoreUtils.js b/contract/src/lendingPool/loanStoreUtils.js index c7a0289..fe7d461 100644 --- a/contract/src/lendingPool/loanStoreUtils.js +++ b/contract/src/lendingPool/loanStoreUtils.js @@ -1,7 +1,7 @@ import { keyEQ, keyLT } from '@agoric/store'; import { AmountMath } from '@agoric/ertp'; -import { toVaultKey } from '@agoric/run-protocol/src/vaultFactory/storeUtils.js'; -import { makeOrderedVaultStore } from '@agoric/run-protocol/src/vaultFactory/orderedVaultStore.js'; +import { toVaultKey } from '@agoric/inter-protocol/src/vaultFactory/storeUtils.js'; +import { makeOrderedVaultStore } from '@agoric/inter-protocol/src/vaultFactory/orderedVaultStore.js'; import { LoanPhase } from './loan.js' /** diff --git a/contract/src/lendingPool/poolManager.js b/contract/src/lendingPool/poolManager.js index 3586ed5..28b7ef8 100644 --- a/contract/src/lendingPool/poolManager.js +++ b/contract/src/lendingPool/poolManager.js @@ -10,7 +10,7 @@ import { makeNotifierKit, observeNotifier } from '@agoric/notifier'; import { AmountMath } from '@agoric/ertp'; import { Far } from '@endo/marshal'; import { makeScalarMap } from '@agoric/store'; -import { makeTracer } from '@agoric/run-protocol/src/makeTracer.js'; +import { makeTracer } from '@agoric/inter-protocol/src/makeTracer.js'; import { RECORDING_PERIOD_KEY, LIQUIDATION_MARGIN_KEY, diff --git a/contract/src/lendingPool/priceManager.js b/contract/src/lendingPool/priceManager.js index 98469e5..ea5e553 100644 --- a/contract/src/lendingPool/priceManager.js +++ b/contract/src/lendingPool/priceManager.js @@ -3,7 +3,7 @@ import '@agoric/zoe/exported.js'; import { makeScalarMap } from '@agoric/store'; import { Far } from '@endo/marshal'; import { Nat } from '@agoric/nat'; -import { E } from '@agoric/eventual-send'; +import { E } from '@endo/far'; import { AmountMath } from '@agoric/ertp'; /** diff --git a/contract/src/lendingPool/priceManagerContract.js b/contract/src/lendingPool/priceManagerContract.js index 46fee92..f37f0a4 100644 --- a/contract/src/lendingPool/priceManagerContract.js +++ b/contract/src/lendingPool/priceManagerContract.js @@ -4,7 +4,7 @@ import { AmountMath, AssetKind, makeIssuerKit } from '@agoric/ertp'; import { Nat } from '@agoric/nat'; import '@agoric/zoe/exported.js'; import { makeScalarMap } from '@agoric/store'; -import { E } from '@agoric/eventual-send'; +import { E } from '@endo/far'; /** * This the place where we wrap the PriceManager inside a vat. diff --git a/contract/test/lendingPool/setup.js b/contract/test/lendingPool/setup.js index a0f2567..2d3c180 100644 --- a/contract/test/lendingPool/setup.js +++ b/contract/test/lendingPool/setup.js @@ -9,12 +9,12 @@ import { makeFakeVatAdmin } from '@agoric/zoe/tools/fakeVatAdmin.js'; import { makeZoeKit } from '@agoric/zoe'; import buildManualTimer from '@agoric/zoe/tools/manualTimer.js'; import { makeAgoricNamesAccess, makePromiseSpace } from '@agoric/vats/src/core/utils.js'; -import * as Collect from '@agoric/run-protocol/src/collect.js'; +import * as Collect from '@agoric/inter-protocol/src/collect.js'; import committeeBundle from '@agoric/governance/bundles/bundle-committee.js'; import contractGovernorBundle from '@agoric/governance/bundles/bundle-contractGovernor.js'; import binaryVoteCounterBundle from '@agoric/governance/bundles/bundle-binaryVoteCounter.js'; import * as utils from '@agoric/vats/src/core/utils.js'; -import { makeAmmTerms } from '@agoric/run-protocol/src/vpool-xyk-amm/params.js'; +import { makeAmmTerms } from '@agoric/inter-protocol/src/vpool-xyk-amm/params.js'; import { AmountMath } from '@agoric/ertp'; import { makeRatio } from '@agoric/zoe/src/contractSupport/index.js'; import { makeGovernedTerms } from '../../src/lendingPool/params.js'; diff --git a/contract/test/lendingPool/test-lendingPool.js b/contract/test/lendingPool/test-lendingPool.js index c8eed4c..78fdca4 100644 --- a/contract/test/lendingPool/test-lendingPool.js +++ b/contract/test/lendingPool/test-lendingPool.js @@ -1,10 +1,8 @@ // @ts-check -import { makeTracer } from '@agoric/run-protocol/src/makeTracer.js'; - -const trace = makeTracer('TestST'); - -import { test as unknownTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; // swingset-vat to zoe +import { makeTracer } from '@agoric/inter-protocol/src/makeTracer.js'; import '@agoric/zoe/exported.js'; +import '@agoric/zoe/tools/prepare-test-env.js'; +import test from 'ava'; import { deeplyFulfilled } from '@endo/marshal'; import { E } from '@endo/far'; @@ -19,15 +17,13 @@ import { makePromiseKit } from '@endo/promise-kit'; import { makeScriptedPriceAuthority } from '@agoric/zoe/tools/scriptedPriceAuthority.js'; import { makePriceManager } from '../../src/lendingPool/priceManager.js'; import { - depositMoney, - addPool, makeRates, setupAssets, - borrow, makeMarketStateChecker, getPoolMetadata, calculateUnderlyingFromProtocol, - calculateProtocolFromUnderlying, splitCollateral, adjust, closeLoan, + calculateProtocolFromUnderlying, + splitCollateral, } from './helpers.js'; import { @@ -37,21 +33,21 @@ import { setupAmmAndElectorate, } from './setup.js'; import { SECONDS_PER_YEAR } from '../../src/interest.js'; -import * as Collect from '@agoric/run-protocol/src/collect.js'; -import { unsafeMakeBundleCache } from '@agoric/run-protocol/test/bundleTool.js'; +import * as Collect from '@agoric/inter-protocol/src/collect.js'; +import { unsafeMakeBundleCache } from '@agoric/swingset-vat/tools/bundleTool.js'; import { makeManualPriceAuthority } from '@agoric/zoe/tools/manualPriceAuthority.js'; import { LoanPhase } from '../../src/lendingPool/loan.js'; import { oneMinus } from '@agoric/zoe/src/contractSupport/ratio.js'; import { makeLendingPoolAssertions } from './lendingPoolAssertions.js'; import { ADJUST_PROPOSAL_TYPE, makeLendingPoolScenarioHelpers, POOL_TYPES } from './lendingPoolScenrioHelpers.js'; -const test = unknownTest; +const trace = makeTracer('TestST'); const contractRoots = { faucet: './faucet.js', liquidate: '../../src/lendingPool/liquidateMinimum.js', LendingPool: '../../src/lendingPool/lendingPool.js', - amm: '@agoric/run-protocol/src/vpool-xyk-amm/multipoolMarketMaker.js', + amm: '@agoric/inter-protocol/src/vpool-xyk-amm/multipoolMarketMaker.js', }; const BASIS_POINTS = 10000n;