From 681ae55e43913a6d004b38824ddfebe7e7f29a73 Mon Sep 17 00:00:00 2001 From: danielailie Date: Wed, 13 Nov 2024 16:05:23 +0200 Subject: [PATCH] Fix imports --- src/abi/interaction.local.net.spec.ts | 14 +++++++------- src/abi/interaction.spec.ts | 5 ++--- src/abi/interactionChecker.spec.ts | 2 +- src/abi/smartContract.local.net.spec.ts | 13 ++++++++++--- src/smartContractQueriesController.spec.ts | 6 +++--- src/testutils/contractController.ts | 4 +--- src/testutils/mockNetworkProvider.ts | 4 ++-- src/testutils/utils.ts | 4 +--- .../smartContractTransactionsFactory.spec.ts | 4 +--- .../transactionEventsParser.spec.ts | 10 +++++----- 10 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/abi/interaction.local.net.spec.ts b/src/abi/interaction.local.net.spec.ts index 05b8a810..2f1c286a 100644 --- a/src/abi/interaction.local.net.spec.ts +++ b/src/abi/interaction.local.net.spec.ts @@ -1,20 +1,20 @@ import BigNumber from "bignumber.js"; import { assert } from "chai"; +import { promises } from "fs"; +import { QueryRunnerAdapter } from "../adapters/queryRunnerAdapter"; +import { SmartContractQueriesController } from "../smartContractQueriesController"; import { loadAbiRegistry, loadTestWallets, prepareDeployment, TestWallet } from "../testutils"; import { ContractController } from "../testutils/contractController"; import { createLocalnetProvider } from "../testutils/networkProviders"; import { Transaction } from "../transaction"; import { TransactionComputer } from "../transactionComputer"; +import { TransactionsFactoryConfig } from "../transactionsFactories"; +import { SmartContractTransactionsFactory } from "../transactionsFactories/smartContractTransactionsFactory"; +import { TransactionWatcher } from "../transactionWatcher"; import { Interaction } from "./interaction"; +import { ResultsParser } from "./resultsParser"; import { ReturnCode } from "./returnCode"; import { SmartContract } from "./smartContract"; -import { TransactionsFactoryConfig } from "../transactionsFactories/transactionsFactoryConfig"; -import { SmartContractTransactionsFactory } from "../transactionsFactories/smartContractTransactionsFactory"; -import { promises } from "fs"; -import { ResultsParser } from "./resultsParser"; -import { TransactionWatcher } from "../transactionWatcher"; -import { SmartContractQueriesController } from "../smartContractQueriesController"; -import { QueryRunnerAdapter } from "../adapters/queryRunnerAdapter"; import { ManagedDecimalSignedValue, ManagedDecimalValue } from "./typesystem"; describe("test smart contract interactor", function () { diff --git a/src/abi/interaction.spec.ts b/src/abi/interaction.spec.ts index e88789a9..3e1f5b80 100644 --- a/src/abi/interaction.spec.ts +++ b/src/abi/interaction.spec.ts @@ -1,7 +1,7 @@ -import { ContractQueryResponse } from "../networkProviders"; import BigNumber from "bignumber.js"; import { assert } from "chai"; import { Address } from "../address"; +import { ContractQueryResponse } from "../networkProviders"; import { loadAbiRegistry, loadTestWallets, @@ -16,8 +16,7 @@ import { ContractFunction } from "./function"; import { Interaction } from "./interaction"; import { ReturnCode } from "./returnCode"; import { SmartContract } from "./smartContract"; -import { BigUIntValue, OptionalValue, OptionValue, TokenIdentifierValue, U32Value } from "./typesystem"; -import { BytesValue } from "./typesystem/bytes"; +import { BigUIntValue, BytesValue, OptionalValue, OptionValue, TokenIdentifierValue, U32Value } from "./typesystem"; describe("test smart contract interactor", function () { let dummyAddress = new Address("erd1qqqqqqqqqqqqqpgqak8zt22wl2ph4tswtyc39namqx6ysa2sd8ss4xmlj3"); diff --git a/src/abi/interactionChecker.spec.ts b/src/abi/interactionChecker.spec.ts index 84da7dab..caabab42 100644 --- a/src/abi/interactionChecker.spec.ts +++ b/src/abi/interactionChecker.spec.ts @@ -9,13 +9,13 @@ import { SmartContract } from "./smartContract"; import { BigUIntType, BigUIntValue, + BytesValue, OptionalType, OptionalValue, OptionValue, TokenIdentifierValue, U32Value, } from "./typesystem"; -import { BytesValue } from "./typesystem/bytes"; describe("integration tests: test checker within interactor", function () { let dummyAddress = new Address("erd1qqqqqqqqqqqqqpgqak8zt22wl2ph4tswtyc39namqx6ysa2sd8ss4xmlj3"); diff --git a/src/abi/smartContract.local.net.spec.ts b/src/abi/smartContract.local.net.spec.ts index 99219622..57c5646f 100644 --- a/src/abi/smartContract.local.net.spec.ts +++ b/src/abi/smartContract.local.net.spec.ts @@ -7,15 +7,22 @@ import { prepareDeployment } from "../testutils"; import { createLocalnetProvider } from "../testutils/networkProviders"; import { loadTestWallets, TestWallet } from "../testutils/wallets"; import { TransactionComputer } from "../transactionComputer"; +import { TransactionsFactoryConfig } from "../transactionsFactories"; import { SmartContractTransactionsFactory } from "../transactionsFactories/smartContractTransactionsFactory"; -import { TransactionsFactoryConfig } from "../transactionsFactories/transactionsFactoryConfig"; import { TransactionWatcher } from "../transactionWatcher"; import { decodeUnsignedNumber } from "./codec"; import { ContractFunction } from "./function"; import { ResultsParser } from "./resultsParser"; import { SmartContract } from "./smartContract"; -import { AddressValue, BigUIntValue, OptionalValue, OptionValue, TokenIdentifierValue, U32Value } from "./typesystem"; -import { BytesValue } from "./typesystem/bytes"; +import { + AddressValue, + BigUIntValue, + BytesValue, + OptionalValue, + OptionValue, + TokenIdentifierValue, + U32Value, +} from "./typesystem"; describe("test on local testnet", function () { let alice: TestWallet, bob: TestWallet, carol: TestWallet; diff --git a/src/smartContractQueriesController.spec.ts b/src/smartContractQueriesController.spec.ts index 07bc570d..63c7887a 100644 --- a/src/smartContractQueriesController.spec.ts +++ b/src/smartContractQueriesController.spec.ts @@ -1,12 +1,12 @@ -import { ContractQueryResponse } from "./networkProviders"; import BigNumber from "bignumber.js"; import { assert } from "chai"; +import { AbiRegistry, BigUIntValue, BooleanValue, BytesValue, Tuple, U16Value, U64Value } from "./abi"; import { QueryRunnerAdapter } from "./adapters/queryRunnerAdapter"; +import { ContractQueryResponse } from "./networkProviders"; import { SmartContractQueriesController } from "./smartContractQueriesController"; import { SmartContractQueryResponse } from "./smartContractQuery"; -import { AbiRegistry, BigUIntValue, BooleanValue, BytesValue, Tuple, U16Value, U64Value } from "./smartcontracts"; -import { bigIntToBuffer } from "./smartcontracts/codec/utils"; import { MockNetworkProvider, loadAbiRegistry } from "./testutils"; +import { bigIntToBuffer } from "./tokenOperations/codec"; describe("test smart contract queries controller", () => { describe("createQuery", () => { diff --git a/src/testutils/contractController.ts b/src/testutils/contractController.ts index f72d3079..a053e443 100644 --- a/src/testutils/contractController.ts +++ b/src/testutils/contractController.ts @@ -1,8 +1,6 @@ +import { Interaction, ResultsParser, TypedOutcomeBundle, UntypedOutcomeBundle } from "../abi"; import { ITransactionOnNetwork } from "../interfaceOfNetwork"; import { Logger } from "../logger"; -import { Interaction } from "../smartcontracts/interaction"; -import { TypedOutcomeBundle, UntypedOutcomeBundle } from "../smartcontracts/interface"; -import { ResultsParser } from "../smartcontracts/resultsParser"; import { Transaction } from "../transaction"; import { TransactionWatcher } from "../transactionWatcher"; import { INetworkProvider } from "./networkProviders"; diff --git a/src/testutils/mockNetworkProvider.ts b/src/testutils/mockNetworkProvider.ts index 988d693f..53276a27 100644 --- a/src/testutils/mockNetworkProvider.ts +++ b/src/testutils/mockNetworkProvider.ts @@ -1,4 +1,4 @@ -import { ContractResultItem, ContractResults, TransactionOnNetwork, TransactionStatus } from "../networkProviders"; +import { Query } from "../abi/query"; import { Address } from "../address"; import { AsyncTimer } from "../asyncTimer"; import * as errors from "../errors"; @@ -11,7 +11,7 @@ import { ITransactionOnNetwork, ITransactionStatus, } from "../interfaceOfNetwork"; -import { Query } from "../smartcontracts/query"; +import { ContractResultItem, ContractResults, TransactionOnNetwork, TransactionStatus } from "../networkProviders"; import { Transaction, TransactionHash } from "../transaction"; import { createAccountBalance } from "./utils"; diff --git a/src/testutils/utils.ts b/src/testutils/utils.ts index 349e82f3..0b19c55a 100644 --- a/src/testutils/utils.ts +++ b/src/testutils/utils.ts @@ -1,10 +1,8 @@ import BigNumber from "bignumber.js"; import * as fs from "fs"; import { PathLike } from "fs"; +import { AbiRegistry, Code, SmartContract, TypedValue } from "../abi"; import { IChainID, IGasLimit } from "../interface"; -import { Code } from "../smartcontracts/code"; -import { SmartContract } from "../smartcontracts/smartContract"; -import { AbiRegistry, TypedValue } from "../smartcontracts/typesystem"; import { Transaction } from "../transaction"; import { TransactionWatcher } from "../transactionWatcher"; import { getAxios } from "../utils"; diff --git a/src/transactionsFactories/smartContractTransactionsFactory.spec.ts b/src/transactionsFactories/smartContractTransactionsFactory.spec.ts index 096c37ea..62633f75 100644 --- a/src/transactionsFactories/smartContractTransactionsFactory.spec.ts +++ b/src/transactionsFactories/smartContractTransactionsFactory.spec.ts @@ -1,9 +1,7 @@ import { assert } from "chai"; +import { AbiRegistry, Code, U32Value } from "../abi"; import { Address } from "../address"; import { Err } from "../errors"; -import { U32Value } from "../smartcontracts"; -import { Code } from "../smartcontracts/code"; -import { AbiRegistry } from "../smartcontracts/typesystem/abiRegistry"; import { loadAbiRegistry, loadContractCode } from "../testutils/utils"; import { Token, TokenTransfer } from "../tokens"; import { SmartContractTransactionsFactory } from "./smartContractTransactionsFactory"; diff --git a/src/transactionsOutcomeParsers/transactionEventsParser.spec.ts b/src/transactionsOutcomeParsers/transactionEventsParser.spec.ts index cddc8ea3..6b1a3fa7 100644 --- a/src/transactionsOutcomeParsers/transactionEventsParser.spec.ts +++ b/src/transactionsOutcomeParsers/transactionEventsParser.spec.ts @@ -1,3 +1,8 @@ +import BigNumber from "bignumber.js"; +import { assert } from "chai"; +import { AbiRegistry } from "../abi"; +import { Address } from "../address"; +import { TransactionsConverter } from "../converters/transactionsConverter"; import { ContractResultItem, ContractResults, @@ -7,11 +12,6 @@ import { TransactionLogsOnNetwork, TransactionOnNetwork, } from "../networkProviders"; -import BigNumber from "bignumber.js"; -import { assert } from "chai"; -import { Address } from "../address"; -import { TransactionsConverter } from "../converters/transactionsConverter"; -import { AbiRegistry } from "../smartcontracts"; import { loadAbiRegistry } from "../testutils"; import { TransactionEvent, findEventsByFirstTopic } from "./resources"; import { TransactionEventsParser } from "./transactionEventsParser";