Skip to content

Commit

Permalink
lint: cleanup imports
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Nov 6, 2024
1 parent bd97f95 commit 8582373
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 34 deletions.
2 changes: 1 addition & 1 deletion packages/agoric-cli/src/commands/gov.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// @ts-check
/* eslint-disable func-names */
/* global globalThis, process, setTimeout */
import { getNetworkConfig, makeRpcUtils } from '@agoric/client-utils';
import { execFileSync as execFileSyncAmbient } from 'child_process';
import { Command, CommanderError } from 'commander';
import { normalizeAddressWithOptions, pollBlocks } from '../lib/chain.js';
import { getNetworkConfig, makeRpcUtils } from '@agoric/client-utils';
import {
findContinuingIds,
getCurrent,
Expand Down
15 changes: 7 additions & 8 deletions packages/agoric-cli/src/commands/inter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@

// @ts-check
import { CommanderError, InvalidArgumentError } from 'commander';
// TODO: should get M from endo https://github.com/Agoric/agoric-sdk/issues/7090
import { makeOfferSpecShape } from '@agoric/inter-protocol/src/auction/auctionBook.js';
import { Offers } from '@agoric/inter-protocol/src/clientSupport.js';
import { objectMap } from '@agoric/internal';
import { M, matches } from '@agoric/store';

import { normalizeAddressWithOptions, pollBlocks } from '../lib/chain.js';
import {
asBoardRemote,
bigintReplacer,
getNetworkConfig,
makeAmountFormatter,
} from '@agoric/client-utils';
import { getNetworkConfig } from '@agoric/client-utils';
import { makeOfferSpecShape } from '@agoric/inter-protocol/src/auction/auctionBook.js';
import { Offers } from '@agoric/inter-protocol/src/clientSupport.js';
import { objectMap } from '@agoric/internal';
import { M, matches } from '@endo/patterns';

import { normalizeAddressWithOptions, pollBlocks } from '../lib/chain.js';
import {
getCurrent,
makeWalletUtils,
Expand Down
12 changes: 6 additions & 6 deletions packages/agoric-cli/src/commands/oracle.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
// @ts-check
/* eslint-disable func-names */
/* eslint-env node */
import {
bigintReplacer,
getNetworkConfig,
makeRpcUtils,
storageHelper,
} from '@agoric/client-utils';
import { Offers } from '@agoric/inter-protocol/src/clientSupport.js';
import { oracleBrandFeedName } from '@agoric/inter-protocol/src/proposals/utils.js';
import { Fail } from '@endo/errors';
Expand All @@ -9,12 +15,6 @@ import * as cp from 'child_process';
import { Command } from 'commander';
import { inspect } from 'util';
import { normalizeAddressWithOptions } from '../lib/chain.js';
import { bigintReplacer } from '@agoric/client-utils';
import {
getNetworkConfig,
makeRpcUtils,
storageHelper,
} from '@agoric/client-utils';
import {
getCurrent,
makeWalletUtils,
Expand Down
2 changes: 1 addition & 1 deletion packages/agoric-cli/src/commands/perf.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import {
import { Command } from 'commander';
import fs from 'fs';
import { exit } from 'process';
import { networkConfig } from '@agoric/client-utils';
import { slotToRemotable } from '@agoric/internal/src/storage-test-utils.js';
import { boardSlottingMarshaller } from '@agoric/vats/tools/board-utils.js';
import { makeLeaderOptions } from '../lib/casting.js';
import {
execSwingsetTransaction,
normalizeAddressWithOptions,
} from '../lib/chain.js';
import { networkConfig } from '@agoric/client-utils';

// tight for perf testing but less than this tends to hang.
const SLEEP_SECONDS = 0.1;
Expand Down
5 changes: 2 additions & 3 deletions packages/agoric-cli/src/commands/psm.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// @ts-check
/* eslint-disable func-names */
/* eslint-env node */
import { Command } from 'commander';
import { asPercent, makeRpcUtils, storageHelper } from '@agoric/client-utils';
import { Offers } from '@agoric/inter-protocol/src/clientSupport.js';
import { asPercent } from '@agoric/client-utils';
import { makeRpcUtils, storageHelper } from '@agoric/client-utils';
import { Command } from 'commander';
import { outputExecuteOfferAction } from '../lib/wallet.js';

// Adapted from https://gist.github.com/dckc/8b5b2f16395cb4d7f2ff340e0bc6b610#file-psm-tool
Expand Down
3 changes: 1 addition & 2 deletions packages/agoric-cli/src/commands/test-upgrade.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// @ts-check
/* eslint-env node */
import { bigintReplacer, getNetworkConfig } from '@agoric/client-utils';
import { Fail } from '@endo/errors';
import { CommanderError } from 'commander';
import { normalizeAddressWithOptions } from '../lib/chain.js';
import { bigintReplacer } from '@agoric/client-utils';
import { getNetworkConfig } from '@agoric/client-utils';
import { makeWalletUtils, sendAction } from '../lib/wallet.js';

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/agoric-cli/src/commands/vaults.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// @ts-check
/* eslint-disable func-names */
/* eslint-env node */
import { Command } from 'commander';
import { makeRpcUtils } from '@agoric/client-utils';
import {
lookupOfferIdForVault,
Offers,
} from '@agoric/inter-protocol/src/clientSupport.js';
import { Command } from 'commander';
import { normalizeAddressWithOptions } from '../lib/chain.js';
import { makeRpcUtils } from '@agoric/client-utils';
import { getCurrent, outputExecuteOfferAction } from '../lib/wallet.js';

/**
Expand Down
10 changes: 7 additions & 3 deletions packages/agoric-cli/src/commands/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ import {
makeLeader,
makeLeaderFromRpcAddresses,
} from '@agoric/casting';
import {
fmtRecordOfLines,
makeRpcUtils,
networkConfig,
summarize,
} from '@agoric/client-utils';
import { execFileSync } from 'child_process';
import fs from 'fs';
import util from 'util';
import { execFileSync } from 'child_process';
import { fmtRecordOfLines, summarize } from '@agoric/client-utils';
import { makeRpcUtils, networkConfig } from '@agoric/client-utils';

import { makeLeaderOptions } from '../lib/casting.js';
import {
Expand Down
4 changes: 2 additions & 2 deletions packages/agoric-cli/src/lib/wallet.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// @ts-check
/* eslint-env node */

import { Fail } from '@endo/errors';
import { iterateReverse } from '@agoric/casting';
import { makeWalletStateCoalescer } from '@agoric/smart-wallet/src/utils.js';
import { boardSlottingMarshaller, makeRpcUtils } from '@agoric/client-utils';
import { makeWalletStateCoalescer } from '@agoric/smart-wallet/src/utils.js';
import { Fail } from '@endo/errors';
import { execSwingsetTransaction, pollBlocks, pollTx } from './chain.js';

/**
Expand Down
9 changes: 3 additions & 6 deletions packages/agoric-cli/test/inter-cli.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
/* eslint-env node */
import '@endo/init';
import test from 'ava';
import { createCommand, CommanderError } from 'commander';
import { CommanderError, createCommand } from 'commander';

import { Far } from '@endo/far';
import { boardSlottingMarshaller, makeFromBoard } from '@agoric/client-utils';
import { makeParseAmount } from '@agoric/inter-protocol/src/clientSupport.js';
import {
boardSlottingMarshaller,
makeFromBoard,
} from '../../client-utils/src/rpc.js';
import { Far } from '@endo/far';

import { fmtBid, makeInterCommand } from '../src/commands/inter.js';

Expand Down

0 comments on commit 8582373

Please sign in to comment.