Skip to content

Commit

Permalink
refactor: remove new-api as intermediary folder
Browse files Browse the repository at this point in the history
  • Loading branch information
kanej committed Sep 6, 2023
1 parent 087bbc7 commit a6f2dee
Show file tree
Hide file tree
Showing 195 changed files with 311 additions and 311 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionError } from "../errors";
import { IgnitionError } from "./errors";

Check failure on line 1 in packages/core/src/build-module.ts

View workflow job for this annotation

GitHub Actions / Lint the project

There should be no empty line within import group

import { ModuleConstructor } from "./internal/module-builder";
import { IgnitionModule, IgnitionModuleResult } from "./types/module";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionValidationError } from "../errors";
import { IgnitionValidationError } from "./errors";

Check failure on line 1 in packages/core/src/deploy.ts

View workflow job for this annotation

GitHub Actions / Lint the project

There should be no empty line within import group

import {
DEFAULT_AUTOMINE_REQUIRED_CONFIRMATIONS,
Expand Down
28 changes: 14 additions & 14 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
export * from "./errors";
export { buildModule } from "./new-api/build-module";
export { deploy } from "./new-api/deploy";
export { formatSolidityParameter } from "./new-api/internal/formatters";
export { plan } from "./new-api/plan";
export { StoredDeploymentSerializer } from "./new-api/stored-deployment-serializer";
export * from "./new-api/type-guards";
export * from "./new-api/types/artifact";
export * from "./new-api/types/deploy";
export * from "./new-api/types/execution-events";
export * from "./new-api/types/module";
export * from "./new-api/types/module-builder";
export * from "./new-api/types/provider";
export * from "./new-api/types/serialized-deployment";
export { wipe } from "./new-api/wipe";
export { buildModule } from "./build-module";
export { deploy } from "./deploy";
export { formatSolidityParameter } from "./internal/formatters";
export { plan } from "./plan";
export { StoredDeploymentSerializer } from "./stored-deployment-serializer";
export * from "./type-guards";
export * from "./types/artifact";
export * from "./types/deploy";
export * from "./types/execution-events";
export * from "./types/module";
export * from "./types/module-builder";
export * from "./types/provider";
export * from "./types/serialized-deployment";
export { wipe } from "./wipe";
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import assert from "assert";
import { inspect } from "util";

import { IgnitionError, IgnitionValidationError } from "../../errors";
import { IgnitionError, IgnitionValidationError } from "../errors";
import {
isAccountRuntimeValue,
isAddressResolvableFuture,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type {
import {
IgnitionValidationError,
UnsupportedOperationError,
} from "../../../errors";
} from "../../errors";
import { Artifact } from "../../types/artifact";
import { ArgumentType, SolidityParameterType } from "../../types/module";
import { assertIgnitionInvariant } from "../utils/assertions";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionError } from "../../../errors";
import { IgnitionError } from "../../errors";
import { ArtifactResolver } from "../../types/artifact";
import { DeploymentParameters } from "../../types/deploy";
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionError } from "../../../../../errors";
import { IgnitionError } from "../../../../errors";
import { assertIgnitionInvariant } from "../../../utils/assertions";
import { JsonRpcClient } from "../../jsonrpc-client";
import { TransactionTrackingTimer } from "../../transaction-tracking-timer";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionError } from "../../../errors";
import { IgnitionError } from "../../errors";
import { EIP1193Provider } from "../../types/provider";

import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @file
*/

import { IgnitionValidationError } from "../../../errors";
import { IgnitionValidationError } from "../../errors";
import { Artifact } from "../../types/artifact";

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionError } from "../../../errors";
import { IgnitionError } from "../../errors";

import { JsonRpcClient } from "./jsonrpc-client";
import { DeploymentState } from "./types/deployment-state";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionError } from "../../../errors";
import { IgnitionError } from "../../errors";
import { ArtifactResolver } from "../../types/artifact";
import { DeploymentParameters } from "../../types/deploy";
import { Future, IgnitionModule } from "../../types/module";
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionError } from "../../../errors";
import { IgnitionError } from "../../errors";

export function assertIgnitionInvariant(
invariant: boolean,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionValidationError } from "../../../../errors";
import { IgnitionValidationError } from "../../../errors";
import { isArtifactType } from "../../../type-guards";
import { ArtifactResolver } from "../../../types/artifact";
import { NamedContractAtFuture } from "../../../types/module";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionValidationError } from "../../../../errors";
import { IgnitionValidationError } from "../../../errors";
import { isArtifactType } from "../../../type-guards";
import { ArtifactResolver } from "../../../types/artifact";
import { NamedContractCallFuture } from "../../../types/module";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionValidationError } from "../../../../errors";
import { IgnitionValidationError } from "../../../errors";
import { isArtifactType } from "../../../type-guards";
import { ArtifactResolver } from "../../../types/artifact";
import { NamedContractDeploymentFuture } from "../../../types/module";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionValidationError } from "../../../../errors";
import { IgnitionValidationError } from "../../../errors";
import { isArtifactType } from "../../../type-guards";
import { ArtifactResolver } from "../../../types/artifact";
import { NamedLibraryDeploymentFuture } from "../../../types/module";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionValidationError } from "../../../../errors";
import { IgnitionValidationError } from "../../../errors";
import { isArtifactType } from "../../../type-guards";
import { ArtifactResolver } from "../../../types/artifact";
import { NamedStaticCallFuture } from "../../../types/module";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionValidationError } from "../../../../errors";
import { IgnitionValidationError } from "../../../errors";
import { isArtifactType } from "../../../type-guards";
import { ArtifactResolver } from "../../../types/artifact";
import { ReadEventArgumentFuture } from "../../../types/module";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionValidationError } from "../../../../errors";
import { IgnitionValidationError } from "../../../errors";
import { isModuleParameterRuntimeValue } from "../../../type-guards";
import { ArtifactResolver } from "../../../types/artifact";
import { DeploymentParameters } from "../../../types/deploy";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionValidationError } from "../../../../errors";
import { IgnitionValidationError } from "../../../errors";
import {
isAccountRuntimeValue,
isModuleParameterRuntimeValue,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionValidationError } from "../../../../errors";
import { IgnitionValidationError } from "../../../errors";
import { isModuleParameterRuntimeValue } from "../../../type-guards";
import { ArtifactResolver } from "../../../types/artifact";
import { DeploymentParameters } from "../../../types/deploy";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionValidationError } from "../../../../errors";
import { IgnitionValidationError } from "../../../errors";
import {
isAccountRuntimeValue,
isModuleParameterRuntimeValue,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionValidationError } from "../../../../errors";
import { IgnitionValidationError } from "../../../errors";
import {
isAccountRuntimeValue,
isModuleParameterRuntimeValue,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionValidationError } from "../../../../errors";
import { IgnitionValidationError } from "../../../errors";
import {
isAccountRuntimeValue,
isModuleParameterRuntimeValue,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionValidationError } from "../../../../errors";
import { IgnitionValidationError } from "../../../errors";
import {
isAccountRuntimeValue,
isModuleParameterRuntimeValue,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionValidationError } from "../../../errors";
import { IgnitionValidationError } from "../../errors";
import { isFuture, isRuntimeValue } from "../../type-guards";
import {
AccountRuntimeValue,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionValidationError } from "../../../errors";
import { IgnitionValidationError } from "../../errors";
import { ArtifactResolver } from "../../types/artifact";
import {
DeploymentResultType,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionValidationError } from "../../../errors";
import { IgnitionValidationError } from "../../errors";
import { ArtifactResolver } from "../../types/artifact";
import {
DeploymentParameters,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionError } from "../../errors";
import { IgnitionError } from "../errors";

import { DeploymentLoader } from "./deployment-loader/types";
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
SerializedStoredDeployment,
StoredDeployment,
StoredDeploymentSerializer,
} from "../ui-helpers";
} from "./ui-helpers";

import { validateStageOne } from "./internal/validation/validateStageOne";
import { ArtifactResolver } from "./types/artifact";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IgnitionError } from "../errors";
import { IgnitionError } from "./errors";

Check failure on line 1 in packages/core/src/stored-deployment-serializer.ts

View workflow job for this annotation

GitHub Actions / Lint the project

There should be no empty line within import group

import {
AccountRuntimeValueImplementation,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions packages/core/src/ui-helpers.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export {
StoredDeploymentDeserializer,
StoredDeploymentSerializer,
} from "./new-api/stored-deployment-serializer";
export * from "./new-api/type-guards";
export * from "./new-api/types/module";
export * from "./new-api/types/serialized-deployment";
export { formatSolidityParameter } from "./new-api/internal/formatters";
} from "./stored-deployment-serializer";
export * from "./type-guards";
export * from "./types/module";
export * from "./types/serialized-deployment";
export { formatSolidityParameter } from "./internal/formatters";
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { Artifact } from "../../../../src";
import {
encodeArtifactDeploymentData,
encodeArtifactFunctionCall,
} from "../../../../src/new-api/internal/new-execution/abi";
import { EIP1193JsonRpcClient } from "../../../../src/new-api/internal/new-execution/jsonrpc-client";
} from "../../../../src/internal/new-execution/abi";
import { EIP1193JsonRpcClient } from "../../../../src/internal/new-execution/jsonrpc-client";
import {
NetworkFees,
TransactionReceiptStatus,
} from "../../../../src/new-api/internal/new-execution/types/jsonrpc";
import { assertIgnitionInvariant } from "../../../../src/new-api/internal/utils/assertions";
} from "../../../../src/internal/new-execution/types/jsonrpc";
import { assertIgnitionInvariant } from "../../../../src/internal/utils/assertions";
import { useHardhatProject } from "../../../helpers/hardhat-projects";

describe("JSON-RPC client", function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { assert } from "chai";
import {
encodeArtifactDeploymentData,
encodeArtifactFunctionCall,
} from "../src/new-api/internal/new-execution/abi";
import { EIP1193JsonRpcClient } from "../src/new-api/internal/new-execution/jsonrpc-client";
} from "../src/internal/new-execution/abi";
import { EIP1193JsonRpcClient } from "../src/internal/new-execution/jsonrpc-client";
import {
callEncodingFixtures,
deploymentFixturesArtifacts,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/helpers/execution-result-fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// We use Hardhat artifacts here, that's why we import this type
import { Artifact } from "hardhat/types";

import { RawStaticCallResult } from "../../src/new-api/internal/new-execution/types/jsonrpc";
import { RawStaticCallResult } from "../../src/internal/new-execution/types/jsonrpc";

export const staticCallResultFixtures: {
[contractName: string]: { [functionName: string]: RawStaticCallResult };
Expand Down
10 changes: 5 additions & 5 deletions packages/core/test/new-api/batcher.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/* eslint-disable import/no-unused-modules */
import { assert } from "chai";

import { buildModule } from "../../src/new-api/build-module";
import { Batcher } from "../../src/new-api/internal/batcher";
import { DeploymentState } from "../../src/new-api/internal/new-execution/types/deployment-state";
import { buildModule } from "../../src/build-module";
import { Batcher } from "../../src/internal/batcher";
import { DeploymentState } from "../../src/internal/new-execution/types/deployment-state";
import {
DeploymentExecutionState,
ExecutionSateType,
ExecutionStatus,
} from "../../src/new-api/internal/new-execution/types/execution-state";
import { FutureType, IgnitionModule } from "../../src/new-api/types/module";
} from "../../src/internal/new-execution/types/execution-state";
import { FutureType, IgnitionModule } from "../../src/types/module";

describe("batcher", () => {
const exampleDeploymentState: DeploymentExecutionState = {
Expand Down
16 changes: 8 additions & 8 deletions packages/core/test/new-api/call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
import { assert } from "chai";

import { Artifact } from "../../src";
import { buildModule } from "../../src/new-api/build-module";
import { buildModule } from "../../src/build-module";
import {
AccountRuntimeValueImplementation,
ModuleParameterRuntimeValueImplementation,
NamedContractCallFutureImplementation,
} from "../../src/new-api/internal/module";
import { getFuturesFromModule } from "../../src/new-api/internal/utils/get-futures-from-module";
import { FutureType } from "../../src/new-api/types/module";
} from "../../src/internal/module";
import { getFuturesFromModule } from "../../src/internal/utils/get-futures-from-module";
import { FutureType } from "../../src/types/module";

import { assertInstanceOf, setupMockArtifactResolver } from "./helpers";

Expand Down Expand Up @@ -467,12 +467,12 @@ describe("call", () => {
});

describe("stage one", () => {
let vm: typeof import("../../src/new-api/internal/validation/stageOne/validateNamedContractCall");
let vm: typeof import("../../src/internal/validation/stageOne/validateNamedContractCall");
let validateNamedContractCall: typeof vm.validateNamedContractCall;

before(async () => {
vm = await import(
"../../src/new-api/internal/validation/stageOne/validateNamedContractCall"
"../../src/internal/validation/stageOne/validateNamedContractCall"
);

validateNamedContractCall = vm.validateNamedContractCall;
Expand Down Expand Up @@ -622,12 +622,12 @@ describe("call", () => {
});

describe("stage two", () => {
let vm: typeof import("../../src/new-api/internal/validation/stageTwo/validateNamedContractCall");
let vm: typeof import("../../src/internal/validation/stageTwo/validateNamedContractCall");
let validateNamedContractCall: typeof vm.validateNamedContractCall;

before(async () => {
vm = await import(
"../../src/new-api/internal/validation/stageTwo/validateNamedContractCall"
"../../src/internal/validation/stageTwo/validateNamedContractCall"
);

validateNamedContractCall = vm.validateNamedContractCall;
Expand Down
16 changes: 8 additions & 8 deletions packages/core/test/new-api/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
import { assert } from "chai";

import { Artifact } from "../../src";
import { buildModule } from "../../src/new-api/build-module";
import { buildModule } from "../../src/build-module";
import {
AccountRuntimeValueImplementation,
ModuleParameterRuntimeValueImplementation,
NamedContractDeploymentFutureImplementation,
} from "../../src/new-api/internal/module";
import { getFuturesFromModule } from "../../src/new-api/internal/utils/get-futures-from-module";
import { FutureType } from "../../src/new-api/types/module";
} from "../../src/internal/module";
import { getFuturesFromModule } from "../../src/internal/utils/get-futures-from-module";
import { FutureType } from "../../src/types/module";

import { assertInstanceOf, setupMockArtifactResolver } from "./helpers";

Expand Down Expand Up @@ -452,12 +452,12 @@ describe("contract", () => {
});

describe("stage one", () => {
let vm: typeof import("../../src/new-api/internal/validation/stageOne/validateNamedContractDeployment");
let vm: typeof import("../../src/internal/validation/stageOne/validateNamedContractDeployment");
let validateNamedContractDeployment: typeof vm.validateNamedContractDeployment;

before(async () => {
vm = await import(
"../../src/new-api/internal/validation/stageOne/validateNamedContractDeployment"
"../../src/internal/validation/stageOne/validateNamedContractDeployment"
);

validateNamedContractDeployment = vm.validateNamedContractDeployment;
Expand Down Expand Up @@ -510,12 +510,12 @@ describe("contract", () => {
});

describe("stage two", () => {
let vm: typeof import("../../src/new-api/internal/validation/stageTwo/validateNamedContractDeployment");
let vm: typeof import("../../src/internal/validation/stageTwo/validateNamedContractDeployment");
let validateNamedContractDeployment: typeof vm.validateNamedContractDeployment;

before(async () => {
vm = await import(
"../../src/new-api/internal/validation/stageTwo/validateNamedContractDeployment"
"../../src/internal/validation/stageTwo/validateNamedContractDeployment"
);

validateNamedContractDeployment = vm.validateNamedContractDeployment;
Expand Down
Loading

0 comments on commit a6f2dee

Please sign in to comment.