Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .prettierrc.json5
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{
// Keep network definitions readable on wide lines
files: [
'packages/portfolio-contract/src/network/network.prod.ts',
'packages/portfolio-contract/tools/network/network.prod.ts',
'packages/portfolio-contract/test/network/test-network.ts',
],
options: {
Expand Down
2 changes: 1 addition & 1 deletion multichain-testing/scripts/ymax-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
type ProposalType,
type TargetAllocation,
} from '@aglocal/portfolio-contract/src/type-guards.ts';
import { makePortfolioSteps } from '@aglocal/portfolio-contract/src/plan-transfers.ts';
import { makePortfolioSteps } from '@aglocal/portfolio-contract/tools/plan-transfers.ts';
import { makePortfolioQuery } from '@aglocal/portfolio-contract/tools/portfolio-actors.ts';
import {
axelarConfigTestnet,
Expand Down
7 changes: 4 additions & 3 deletions packages/portfolio-contract/test/network/buildGraph.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import test from 'ava';
import { Far } from '@endo/marshal';
import { AmountMath } from '@agoric/ertp';
import type { NetworkSpec } from '../../src/network/network-spec.js';
import { makeGraphFromDefinition } from '../../src/network/buildGraph.js';
import { planRebalanceFlow } from '../../src/plan-solve.js';

import { gasEstimator } from '../mocks.js';
import type { NetworkSpec } from '../../tools/network/network-spec.js';
import { makeGraphFromDefinition } from '../../tools/network/buildGraph.js';
import { planRebalanceFlow } from '../../tools/plan-solve.js';

const brand = Far('TestBrand') as any;
const feeBrand = Far('TestFeeBrand') as any;
Expand Down
2 changes: 1 addition & 1 deletion packages/portfolio-contract/test/network/test-network.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable camelcase */

import type { SupportedChain } from '@agoric/portfolio-api/src/constants.js';
import type { NetworkSpec } from '../../src/network/network-spec.js';
import type { NetworkSpec } from '../../tools/network/network-spec.js';
import type { PoolKey } from '../../src/type-guards.js';
import type { AssetPlaceRef } from '../../src/type-guards-steps.js';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AmountMath, type Brand } from '@agoric/ertp';
import { Far } from '@endo/pass-style';
import type { TargetAllocation } from '@aglocal/portfolio-contract/src/type-guards.js';
import { makeTracer } from '@agoric/internal';
import { planDepositTransfers } from '../src/plan-transfers.ts';
import { planDepositTransfers } from '../tools/plan-transfers.ts';

const brand = Far('mock brand') as Brand<'nat'>;
const trace = makeTracer('planDepositTransfers');
Expand Down
2 changes: 1 addition & 1 deletion packages/portfolio-contract/test/portfolio.flows.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ import {
type ProposalType,
type StatusFor,
} from '../src/type-guards.ts';
import { makePortfolioSteps } from '../src/plan-transfers.ts';
import { makePortfolioSteps } from '../tools/plan-transfers.ts';
import { decodeFunctionCall } from './abi-utils.ts';
import {
axelarIdsMock,
Expand Down
6 changes: 3 additions & 3 deletions packages/portfolio-contract/test/rebalance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import { Far } from '@endo/marshal';
import type {
NetworkSpec,
TransferProtocol,
} from '../src/network/network-spec.js';
import { planRebalanceFlow } from '../src/plan-solve.js';
import type { FlowEdge, RebalanceMode } from '../src/plan-solve.js';
} from '../tools/network/network-spec.js';
import { planRebalanceFlow } from '../tools/plan-solve.js';
import type { FlowEdge, RebalanceMode } from '../tools/plan-solve.js';
import type { PoolKey } from '../src/type-guards.js';
import type { AssetPlaceRef } from '../src/type-guards-steps.js';
import { TEST_NETWORK } from './network/test-network.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ import { provideLazyMap } from '@agoric/internal/src/js-utils.js';

import type { NetworkSpec } from './network/network-spec.js';
import type { RebalanceGraph, LpModel } from './plan-solve.js';
import { PoolPlaces, type PoolKey, type PoolPlaceInfo } from './type-guards.js';
import {
PoolPlaces,
type PoolKey,
type PoolPlaceInfo,
} from '../src/type-guards.js';

/**
* Build human-readable diagnostics for infeasible models.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import type { NatAmount, Amount } from '@agoric/ertp/src/types.js';
import { partialMap } from '@agoric/internal/src/js-utils.js';

import { buildBaseGraph, type FlowEdge } from '../plan-solve.js';
import { PoolPlaces, type PoolKey } from '../type-guards.js';
import type { AssetPlaceRef } from '../type-guards-steps.js';
import { PoolPlaces, type PoolKey } from '../../src/type-guards.js';
import type { AssetPlaceRef } from '../../src/type-guards-steps.js';

import type { NetworkSpec } from './network-spec.js';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import type {
SupportedChain,
} from '@agoric/portfolio-api/src/constants.js';

import type { PoolKey } from '../type-guards.js';
import type { AssetPlaceRef } from '../type-guards-steps.js';
import type { PoolKey } from '../../src/type-guards.js';
import type { AssetPlaceRef } from '../../src/type-guards-steps.js';

// Control and transfer planes
export type ControlProtocol = 'ibc' | 'axelar' | 'local';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import type { Amount } from '@agoric/ertp';
import type { RebalanceGraph, FlowEdge } from '../plan-solve.js';
import type { AssetPlaceRef, MovementDesc } from '../type-guards-steps.js';
import type {
AssetPlaceRef,
MovementDesc,
} from '../../src/type-guards-steps.js';

/** Weight selector: cheapest => variableFee, fastest => timeFixed, default 1 */
const edgeWeight = (e: FlowEdge, mode: 'cheapest' | 'fastest') => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AmountMath } from '@agoric/ertp';
import type { Brand, NatAmount } from '@agoric/ertp/src/types.js';
import type { PoolKey } from '@aglocal/portfolio-contract/src/type-guards';
import type { AssetPlaceRef } from './type-guards-steps.ts';
import type { AssetPlaceRef } from '../src/type-guards-steps.ts';

/**
* Compare two nat-based amounts of the same brand.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
typedEntries,
} from '@agoric/internal';
import { AxelarChain } from '@agoric/portfolio-api/src/constants.js';
import { PoolPlaces, type PoolKey } from './type-guards.js';
import type { AssetPlaceRef, MovementDesc } from './type-guards-steps.js';
import { PoolPlaces, type PoolKey } from '../src/type-guards.js';
import type { AssetPlaceRef, MovementDesc } from '../src/type-guards-steps.js';
import type {
FeeMode,
NetworkSpec,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
} from '@agoric/portfolio-api/src/constants.js';
import { throwRedacted as Fail } from '@endo/errors';
import { objectMap } from '@endo/patterns';
import type { MovementDesc } from './type-guards-steps.ts';
import type { MovementDesc } from '../src/type-guards-steps.ts';
import { planRebalanceFlow } from './plan-solve.js';
import { PROD_NETWORK } from './network/network.prod.js';
/**
Expand Down
10 changes: 5 additions & 5 deletions services/ymax-planner/src/plan-deposit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ import {
type PoolPlaceInfo,
type StatusFor,
} from '@aglocal/portfolio-contract/src/type-guards.js';
import { makePortfolioQuery } from '@aglocal/portfolio-contract/tools/portfolio-actors.js';
import type { VstorageKit } from '@agoric/client-utils';
import { AmountMath } from '@agoric/ertp/src/amountMath.js';
import type { Brand, NatAmount } from '@agoric/ertp/src/types.js';
import { Fail, q, X } from '@endo/errors';
import { makePortfolioQuery } from '@aglocal/portfolio-contract/tools/portfolio-actors.js';
// import { TEST_NETWORK } from '@aglocal/portfolio-contract/test/network/test-network.js';
import { PROD_NETWORK } from '@aglocal/portfolio-contract/src/network/network.prod.js';
import { planRebalanceFlow } from '@aglocal/portfolio-contract/src/plan-solve.js';
import type {
AssetPlaceRef,
MovementDesc,
} from '@aglocal/portfolio-contract/src/type-guards-steps.js';
import type { NetworkSpec } from '@aglocal/portfolio-contract/src/network/network-spec.js';
import type { Chain, Pool, SpectrumClient } from './spectrum-client.js';
import type { NetworkSpec } from '@aglocal/portfolio-contract/tools/network/network-spec.js';
import { PROD_NETWORK } from '@aglocal/portfolio-contract/tools/network/network.prod.js';
import { planRebalanceFlow } from '@aglocal/portfolio-contract/tools/plan-solve.js';
import type { CosmosRestClient } from './cosmos-rest-client.js';
import { type GasEstimator } from './gas-estimation.ts';
import type { Chain, Pool, SpectrumClient } from './spectrum-client.js';

const getOwn = <O, K extends PropertyKey>(
obj: O,
Expand Down
Loading