From e73a9988e43da315ee289a468083b648a65c5d6a Mon Sep 17 00:00:00 2001 From: georgi-l95 Date: Fri, 10 Jan 2025 15:38:59 +0200 Subject: [PATCH 1/5] chore: Switch license declarations to SPDX Signed-off-by: georgi-l95 --- .github/workflows/flow-pr-title-check.yaml | 16 +--- .../workflows/flow-pull-request-checks.yaml | 16 +--- ...low-pull-request-smoke-tests-on-macos.yaml | 16 +--- .github/workflows/flow-semantic-release.yml | 2 + .github/workflows/publish-npm-package.yaml | 2 + src/Errors/LocalNodeErrors.ts | 18 +--- src/configuration/types/IAccountProps.ts | 24 +----- src/configuration/types/IPrivateKey.ts | 18 +--- src/configuration/types/ITokenProps.ts | 18 +--- src/constants.ts | 18 +--- src/controller/IObserver.ts | 18 +--- src/controller/StateController.ts | 18 +--- src/data/ConfigurationData.ts | 18 +--- src/data/StateData.ts | 18 +--- src/index.ts | 86 +------------------ src/services/Bootstrapper.ts | 19 +--- src/services/CLIService.ts | 18 +--- src/services/ClientService.ts | 18 +--- src/services/ConnectionService.ts | 18 +--- src/services/DockerService.ts | 18 +--- src/services/IService.ts | 18 +--- src/services/LoggerService.ts | 19 +--- src/services/ServiceLocator.ts | 18 +--- src/state/AccountCreationState.ts | 18 +--- src/state/AttachState.ts | 18 +--- src/state/CleanUpState.ts | 18 +--- src/state/IState.ts | 18 +--- src/state/InitState.ts | 18 +--- src/state/NetworkPrepState.ts | 18 +--- src/state/RecoveryState.ts | 18 +--- src/state/ResourceCreationState.ts | 18 +--- src/state/StartState.ts | 18 +--- src/state/StopState.ts | 18 +--- src/types/AccountType.ts | 18 +--- src/types/CLIOptions.ts | 18 +--- src/types/EventType.ts | 18 +--- src/types/NetworkConfiguration.ts | 18 +--- src/types/StateConfiguration.ts | 18 +--- src/types/VerboseLevel.ts | 18 +--- src/utils/AccountUtils.ts | 19 +--- src/utils/FileSystemUtils.ts | 18 +--- src/utils/RetryUtils.ts | 18 +--- src/utils/SafeDockerNetworkRemover.ts | 18 +--- src/utils/TokenUtils.ts | 19 +--- src/utils/config.ts | 18 +--- src/utils/debounce.ts | 18 +--- test/cypress/src/client.js | 4 + test/smoke/test/Smoke.js | 4 + test/testUtils.ts | 4 + test/unit/controller/StateController.spec.ts | 18 +--- test/unit/states/AccountCreationState.spec.ts | 18 +--- test/unit/states/CleanUpState.spec.ts | 18 +--- test/unit/states/InitState.spec.ts | 18 +--- .../unit/states/ResourceCreationState.spec.ts | 18 +--- test/unit/states/StopState.spec.ts | 18 +--- test/unit/states/networkPrepState.spec.ts | 18 +--- test/unit/states/recoveryState.spec.ts | 18 +--- test/unit/states/startState.spec.ts | 18 +--- test/unit/testBed.ts | 19 +--- test/unit/utils/AccountUtils.spec.ts | 18 +--- test/unit/utils/RetryUtils.spec.ts | 18 +--- .../utils/SafeDockerNetworkRemover.spec.ts | 18 +--- test/unit/utils/TokenUtils.spec.ts | 18 +--- 63 files changed, 81 insertions(+), 1052 deletions(-) diff --git a/.github/workflows/flow-pr-title-check.yaml b/.github/workflows/flow-pr-title-check.yaml index 11184f87..8a63c068 100644 --- a/.github/workflows/flow-pr-title-check.yaml +++ b/.github/workflows/flow-pr-title-check.yaml @@ -1,18 +1,4 @@ -## -# Copyright (C) 2023-2024 Hedera Hashgraph, LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -## +# SPDX-License-Identifier: Apache-2.0 name: "PR Title Check" on: diff --git a/.github/workflows/flow-pull-request-checks.yaml b/.github/workflows/flow-pull-request-checks.yaml index 79df3899..b7a82fb3 100644 --- a/.github/workflows/flow-pull-request-checks.yaml +++ b/.github/workflows/flow-pull-request-checks.yaml @@ -1,18 +1,4 @@ -## -# Copyright (C) 2023-2024 Hedera Hashgraph, LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -## +# SPDX-License-Identifier: Apache-2.0 name: "PR Checks" on: diff --git a/.github/workflows/flow-pull-request-smoke-tests-on-macos.yaml b/.github/workflows/flow-pull-request-smoke-tests-on-macos.yaml index 1f6e8ce1..d9352589 100644 --- a/.github/workflows/flow-pull-request-smoke-tests-on-macos.yaml +++ b/.github/workflows/flow-pull-request-smoke-tests-on-macos.yaml @@ -1,18 +1,4 @@ -## -# Copyright (C) 2024 Hedera Hashgraph, LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -## +# SPDX-License-Identifier: Apache-2.0 name: "Smoke Tests on GitHub MacOS Runner" on: diff --git a/.github/workflows/flow-semantic-release.yml b/.github/workflows/flow-semantic-release.yml index 3f91006a..b1c2ca15 100644 --- a/.github/workflows/flow-semantic-release.yml +++ b/.github/workflows/flow-semantic-release.yml @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + name: Publish Semantic Release on: diff --git a/.github/workflows/publish-npm-package.yaml b/.github/workflows/publish-npm-package.yaml index 9fb40223..ae0f229e 100644 --- a/.github/workflows/publish-npm-package.yaml +++ b/.github/workflows/publish-npm-package.yaml @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + name: Publish Package to npmjs on: release: diff --git a/src/Errors/LocalNodeErrors.ts b/src/Errors/LocalNodeErrors.ts index ad2c746a..5902a07d 100644 --- a/src/Errors/LocalNodeErrors.ts +++ b/src/Errors/LocalNodeErrors.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ /** diff --git a/src/configuration/types/IAccountProps.ts b/src/configuration/types/IAccountProps.ts index 79962fe7..8feb88d9 100644 --- a/src/configuration/types/IAccountProps.ts +++ b/src/configuration/types/IAccountProps.ts @@ -1,27 +1,7 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { IPrivateKey } from './IPrivateKey'; -export interface IAccountProps { - balance: number; - privateKey?: IPrivateKey; - associatedTokens?: string[]; -} +// ... existing code ... diff --git a/src/configuration/types/IPrivateKey.ts b/src/configuration/types/IPrivateKey.ts index b680cb77..688d033e 100644 --- a/src/configuration/types/IPrivateKey.ts +++ b/src/configuration/types/IPrivateKey.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { PrivateKey } from '@hashgraph/sdk'; diff --git a/src/configuration/types/ITokenProps.ts b/src/configuration/types/ITokenProps.ts index 93c15be7..6a4c51a1 100644 --- a/src/configuration/types/ITokenProps.ts +++ b/src/configuration/types/ITokenProps.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { IPrivateKey } from './IPrivateKey'; diff --git a/src/constants.ts b/src/constants.ts index beb13655..a8a46878 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ export const CONTAINERS = [ diff --git a/src/controller/IObserver.ts b/src/controller/IObserver.ts index f50744aa..82aa4b0e 100644 --- a/src/controller/IObserver.ts +++ b/src/controller/IObserver.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { EventType } from '../types/EventType'; diff --git a/src/controller/StateController.ts b/src/controller/StateController.ts index c338a055..61065eef 100644 --- a/src/controller/StateController.ts +++ b/src/controller/StateController.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { CHECK_FAIL, CHECK_SUCCESS } from '../constants'; diff --git a/src/data/ConfigurationData.ts b/src/data/ConfigurationData.ts index e1739625..f7646277 100644 --- a/src/data/ConfigurationData.ts +++ b/src/data/ConfigurationData.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { NetworkConfiguration } from '../types/NetworkConfiguration'; diff --git a/src/data/StateData.ts b/src/data/StateData.ts index 47afb4b9..93127e26 100644 --- a/src/data/StateData.ts +++ b/src/data/StateData.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { AccountCreationState } from '../state/AccountCreationState'; diff --git a/src/index.ts b/src/index.ts index 361fcda4..cfc5b8b3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,89 +1,7 @@ #!/usr/bin/env node /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ -import { Bootstrapper } from "./services/Bootstrapper"; -import yargs from 'yargs'; -import { hideBin } from 'yargs/helpers'; -import { StateController } from "./controller/StateController"; -import { CLIService } from "./services/CLIService"; - -/** - * This script is the entry point for the Hedera Local Node CLI. - * It provides several commands to manage the local Hedera network. - */ -yargs(hideBin(process.argv)) - .command( - "start [accounts]", - "Starts the local hedera network.", - (yargs: yargs.Argv<{}>) => { - CLIService.loadStartupOptions(yargs); - }, - async () => await new StateController("start").startStateMachine() - ) - .command( - "stop", - "Stops the local hedera network and delete all the existing data.", - (yargs: yargs.Argv<{}>) => { - CLIService.loadStopOptions(yargs); - }, - async () => await new StateController("stop").startStateMachine() - ) - .command( - "restart [accounts]", - "Restart the local hedera network.", - (yargs: yargs.Argv<{}>) => { - CLIService.loadStartupOptions(yargs); - }, - async () => await new StateController("restart").startStateMachine() - ) - .command( - "generate-accounts [accounts]", - "Generates the specified number of accounts [default: 10]", - (yargs: yargs.Argv<{}>) => { - CLIService.loadAccountOptions(yargs); - }, - async () => await new StateController("accountCreation").startStateMachine() - ) - .middleware(Bootstrapper.initialize) - .demandCommand() - .strictCommands() - .recommendCommands() - .epilogue( - ` - Requirements: - - Node.js >= v20.11.0 - Node version check: node -v - - NPM >= v10.2.4 - NPM version check: npm -v - - Docker >= v27.3.1 - Docker version check: docker -v - - Docker Compose => v2.29.7 - Docker Compose version check: docker compose version - - * Ensure the gRPC FUSE for file sharing setting is disabled in the docker settings and VirtioFS is enabled - * Ensure the following configurations are set at minimum in Docker Settings -> Resources and are available for use - CPUs: 6 - Memory: 8 GB - Swap: 1 GB - Disk Image Size: 64 GB` - ) - .parse(); +// ... existing code ... diff --git a/src/services/Bootstrapper.ts b/src/services/Bootstrapper.ts index 5ccf2caa..1387498b 100644 --- a/src/services/Bootstrapper.ts +++ b/src/services/Bootstrapper.ts @@ -1,23 +1,8 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ + import yargs from 'yargs'; import { CLIService } from './CLIService'; import { ClientService } from './ClientService'; diff --git a/src/services/CLIService.ts b/src/services/CLIService.ts index f463f62b..86b10ca5 100644 --- a/src/services/CLIService.ts +++ b/src/services/CLIService.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import yargs, { ArgumentsCamelCase, Argv } from 'yargs'; diff --git a/src/services/ClientService.ts b/src/services/ClientService.ts index 66ca503c..ac39b6aa 100644 --- a/src/services/ClientService.ts +++ b/src/services/ClientService.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { Client } from '@hashgraph/sdk'; diff --git a/src/services/ConnectionService.ts b/src/services/ConnectionService.ts index 273b217e..6a5ac2da 100644 --- a/src/services/ConnectionService.ts +++ b/src/services/ConnectionService.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import net from 'net'; diff --git a/src/services/DockerService.ts b/src/services/DockerService.ts index 3d1bb85b..f0d932a2 100644 --- a/src/services/DockerService.ts +++ b/src/services/DockerService.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import Dockerode from 'dockerode'; diff --git a/src/services/IService.ts b/src/services/IService.ts index 5d081953..d697f75b 100644 --- a/src/services/IService.ts +++ b/src/services/IService.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ /** diff --git a/src/services/LoggerService.ts b/src/services/LoggerService.ts index 03b4479c..fbc76b17 100644 --- a/src/services/LoggerService.ts +++ b/src/services/LoggerService.ts @@ -1,23 +1,8 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ + import { CHECK_FAIL, CHECK_WARN, diff --git a/src/services/ServiceLocator.ts b/src/services/ServiceLocator.ts index 56ba3bf3..6e5d04af 100644 --- a/src/services/ServiceLocator.ts +++ b/src/services/ServiceLocator.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { IService } from './IService'; diff --git a/src/state/AccountCreationState.ts b/src/state/AccountCreationState.ts index 09b2cbad..5c1f23a9 100644 --- a/src/state/AccountCreationState.ts +++ b/src/state/AccountCreationState.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import path from 'path'; diff --git a/src/state/AttachState.ts b/src/state/AttachState.ts index 0e22f15b..899a8702 100644 --- a/src/state/AttachState.ts +++ b/src/state/AttachState.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { IOBserver } from '../controller/IObserver'; diff --git a/src/state/CleanUpState.ts b/src/state/CleanUpState.ts index 52617d9e..89a910e7 100644 --- a/src/state/CleanUpState.ts +++ b/src/state/CleanUpState.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { readFileSync, writeFileSync, existsSync } from 'fs'; diff --git a/src/state/IState.ts b/src/state/IState.ts index 9694153b..0b1091fe 100644 --- a/src/state/IState.ts +++ b/src/state/IState.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { IOBserver } from '../controller/IObserver'; diff --git a/src/state/InitState.ts b/src/state/InitState.ts index ce6874a4..a47d0e9f 100644 --- a/src/state/InitState.ts +++ b/src/state/InitState.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import semver from'semver'; diff --git a/src/state/NetworkPrepState.ts b/src/state/NetworkPrepState.ts index 544c1ab4..c96c7e2c 100644 --- a/src/state/NetworkPrepState.ts +++ b/src/state/NetworkPrepState.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { Client, FileContentsQuery } from '@hashgraph/sdk'; diff --git a/src/state/RecoveryState.ts b/src/state/RecoveryState.ts index f6476859..6e231fb4 100644 --- a/src/state/RecoveryState.ts +++ b/src/state/RecoveryState.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { IOBserver } from '../controller/IObserver'; diff --git a/src/state/ResourceCreationState.ts b/src/state/ResourceCreationState.ts index b40aec63..1aabdfc1 100644 --- a/src/state/ResourceCreationState.ts +++ b/src/state/ResourceCreationState.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { TokenId, TokenType } from '@hashgraph/sdk'; diff --git a/src/state/StartState.ts b/src/state/StartState.ts index bcc5318c..37e8f972 100644 --- a/src/state/StartState.ts +++ b/src/state/StartState.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import shell from 'shelljs'; diff --git a/src/state/StopState.ts b/src/state/StopState.ts index 96ea14aa..cfb3829b 100644 --- a/src/state/StopState.ts +++ b/src/state/StopState.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import shell from 'shelljs'; diff --git a/src/types/AccountType.ts b/src/types/AccountType.ts index d0d471ef..2845be26 100644 --- a/src/types/AccountType.ts +++ b/src/types/AccountType.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { Hbar, PrivateKey } from '@hashgraph/sdk'; diff --git a/src/types/CLIOptions.ts b/src/types/CLIOptions.ts index cfbc9dd8..6effd167 100644 --- a/src/types/CLIOptions.ts +++ b/src/types/CLIOptions.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ /** diff --git a/src/types/EventType.ts b/src/types/EventType.ts index d068de22..2ec96cbe 100644 --- a/src/types/EventType.ts +++ b/src/types/EventType.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ /** diff --git a/src/types/NetworkConfiguration.ts b/src/types/NetworkConfiguration.ts index 4f37a5b0..efb7f9d3 100644 --- a/src/types/NetworkConfiguration.ts +++ b/src/types/NetworkConfiguration.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ /** diff --git a/src/types/StateConfiguration.ts b/src/types/StateConfiguration.ts index 19b425a9..2459bcbc 100644 --- a/src/types/StateConfiguration.ts +++ b/src/types/StateConfiguration.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { IState } from "../state/IState"; diff --git a/src/types/VerboseLevel.ts b/src/types/VerboseLevel.ts index 017b4e69..026ae901 100644 --- a/src/types/VerboseLevel.ts +++ b/src/types/VerboseLevel.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ /** diff --git a/src/utils/AccountUtils.ts b/src/utils/AccountUtils.ts index 64e095b1..175f564d 100644 --- a/src/utils/AccountUtils.ts +++ b/src/utils/AccountUtils.ts @@ -1,23 +1,8 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ + import { AccountCreateTransaction, AccountId, diff --git a/src/utils/FileSystemUtils.ts b/src/utils/FileSystemUtils.ts index 2135bd11..72f8f304 100644 --- a/src/utils/FileSystemUtils.ts +++ b/src/utils/FileSystemUtils.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { homedir } from 'os'; diff --git a/src/utils/RetryUtils.ts b/src/utils/RetryUtils.ts index 336881fe..96e763ce 100644 --- a/src/utils/RetryUtils.ts +++ b/src/utils/RetryUtils.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ export class RetryUtils { diff --git a/src/utils/SafeDockerNetworkRemover.ts b/src/utils/SafeDockerNetworkRemover.ts index a8ed1819..ecbf6aa7 100644 --- a/src/utils/SafeDockerNetworkRemover.ts +++ b/src/utils/SafeDockerNetworkRemover.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import shell from 'shelljs'; diff --git a/src/utils/TokenUtils.ts b/src/utils/TokenUtils.ts index 23f388c0..706b3236 100644 --- a/src/utils/TokenUtils.ts +++ b/src/utils/TokenUtils.ts @@ -1,23 +1,8 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ + import { AccountId, Client, diff --git a/src/utils/config.ts b/src/utils/config.ts index efea2e9a..22a5bf28 100644 --- a/src/utils/config.ts +++ b/src/utils/config.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { join } from 'path'; diff --git a/src/utils/debounce.ts b/src/utils/debounce.ts index a976fc3d..036598cd 100644 --- a/src/utils/debounce.ts +++ b/src/utils/debounce.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ /** diff --git a/test/cypress/src/client.js b/test/cypress/src/client.js index a2db7d79..c9cf408a 100644 --- a/test/cypress/src/client.js +++ b/test/cypress/src/client.js @@ -1,3 +1,7 @@ +/*- + * SPDX-License-Identifier: Apache-2.0 + */ + import { Client, AccountId, diff --git a/test/smoke/test/Smoke.js b/test/smoke/test/Smoke.js index 93a2c34a..a96db8e7 100644 --- a/test/smoke/test/Smoke.js +++ b/test/smoke/test/Smoke.js @@ -1,3 +1,7 @@ +/*- + * SPDX-License-Identifier: Apache-2.0 + */ + const { expect } = require("chai"); const hre = require("hardhat"); diff --git a/test/testUtils.ts b/test/testUtils.ts index 1fc230ad..ca2523bf 100644 --- a/test/testUtils.ts +++ b/test/testUtils.ts @@ -1,3 +1,7 @@ +/*- + * SPDX-License-Identifier: Apache-2.0 + */ + import { PrivateKey } from '@hashgraph/sdk'; import { IPrivateKey, KeyType } from '../src/configuration/types/IPrivateKey'; diff --git a/test/unit/controller/StateController.spec.ts b/test/unit/controller/StateController.spec.ts index 5179c058..41cca430 100644 --- a/test/unit/controller/StateController.spec.ts +++ b/test/unit/controller/StateController.spec.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { expect, assert } from 'chai'; diff --git a/test/unit/states/AccountCreationState.spec.ts b/test/unit/states/AccountCreationState.spec.ts index 3ef1a013..febfb4c0 100644 --- a/test/unit/states/AccountCreationState.spec.ts +++ b/test/unit/states/AccountCreationState.spec.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { expect } from 'chai'; diff --git a/test/unit/states/CleanUpState.spec.ts b/test/unit/states/CleanUpState.spec.ts index 9112ce9f..c71d72e0 100644 --- a/test/unit/states/CleanUpState.spec.ts +++ b/test/unit/states/CleanUpState.spec.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023-2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { expect } from 'chai'; diff --git a/test/unit/states/InitState.spec.ts b/test/unit/states/InitState.spec.ts index 3ec4f3d4..cf047113 100644 --- a/test/unit/states/InitState.spec.ts +++ b/test/unit/states/InitState.spec.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { expect } from 'chai'; diff --git a/test/unit/states/ResourceCreationState.spec.ts b/test/unit/states/ResourceCreationState.spec.ts index d8a9ac1f..0d79fc72 100644 --- a/test/unit/states/ResourceCreationState.spec.ts +++ b/test/unit/states/ResourceCreationState.spec.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { expect } from 'chai'; diff --git a/test/unit/states/StopState.spec.ts b/test/unit/states/StopState.spec.ts index 5687e03e..61522f9e 100644 --- a/test/unit/states/StopState.spec.ts +++ b/test/unit/states/StopState.spec.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { expect } from 'chai'; diff --git a/test/unit/states/networkPrepState.spec.ts b/test/unit/states/networkPrepState.spec.ts index 13ee232e..fb9247ac 100644 --- a/test/unit/states/networkPrepState.spec.ts +++ b/test/unit/states/networkPrepState.spec.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { expect } from 'chai'; diff --git a/test/unit/states/recoveryState.spec.ts b/test/unit/states/recoveryState.spec.ts index fea6cd22..d565cf2d 100644 --- a/test/unit/states/recoveryState.spec.ts +++ b/test/unit/states/recoveryState.spec.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { expect } from 'chai'; diff --git a/test/unit/states/startState.spec.ts b/test/unit/states/startState.spec.ts index 3fe5f776..be9f1fcc 100644 --- a/test/unit/states/startState.spec.ts +++ b/test/unit/states/startState.spec.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { expect } from 'chai'; diff --git a/test/unit/testBed.ts b/test/unit/testBed.ts index 6d9c6ad9..03dd1025 100644 --- a/test/unit/testBed.ts +++ b/test/unit/testBed.ts @@ -1,22 +1,7 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ + import sinon from 'sinon'; import shell from 'shelljs'; import { LoggerService } from '../../src/services/LoggerService'; diff --git a/test/unit/utils/AccountUtils.spec.ts b/test/unit/utils/AccountUtils.spec.ts index c8e69558..b9b11b95 100644 --- a/test/unit/utils/AccountUtils.spec.ts +++ b/test/unit/utils/AccountUtils.spec.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { AccountUtils } from '../../../src/utils/AccountUtils'; diff --git a/test/unit/utils/RetryUtils.spec.ts b/test/unit/utils/RetryUtils.spec.ts index d65ad5a1..b9aeb2e3 100644 --- a/test/unit/utils/RetryUtils.spec.ts +++ b/test/unit/utils/RetryUtils.spec.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { createStubInstance, SinonSpy, SinonStubbedInstance, spy, stub } from 'sinon'; diff --git a/test/unit/utils/SafeDockerNetworkRemover.spec.ts b/test/unit/utils/SafeDockerNetworkRemover.spec.ts index 94393cee..20ca7475 100644 --- a/test/unit/utils/SafeDockerNetworkRemover.spec.ts +++ b/test/unit/utils/SafeDockerNetworkRemover.spec.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { expect } from 'chai'; diff --git a/test/unit/utils/TokenUtils.spec.ts b/test/unit/utils/TokenUtils.spec.ts index c5feba1d..e3d9366a 100644 --- a/test/unit/utils/TokenUtils.spec.ts +++ b/test/unit/utils/TokenUtils.spec.ts @@ -1,21 +1,5 @@ /*- - * - * Hedera Local Node - * - * Copyright (C) 2023 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * + * SPDX-License-Identifier: Apache-2.0 */ import { SinonSpy, SinonStub } from 'sinon'; From 1af915dfef62f0e875c01e1dc504251719fb7aef Mon Sep 17 00:00:00 2001 From: georgi-l95 Date: Fri, 10 Jan 2025 17:23:45 +0200 Subject: [PATCH 2/5] chore: fix errors Signed-off-by: georgi-l95 --- src/configuration/types/IAccountProps.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/configuration/types/IAccountProps.ts b/src/configuration/types/IAccountProps.ts index 8feb88d9..db1303b9 100644 --- a/src/configuration/types/IAccountProps.ts +++ b/src/configuration/types/IAccountProps.ts @@ -4,4 +4,8 @@ import { IPrivateKey } from './IPrivateKey'; -// ... existing code ... +export interface IAccountProps { + balance: number; + privateKey?: IPrivateKey; + associatedTokens?: string[]; +} From dcd99bb5522c510447fbdc086b87483ce21f7ea5 Mon Sep 17 00:00:00 2001 From: georgi-l95 Date: Fri, 10 Jan 2025 17:28:27 +0200 Subject: [PATCH 3/5] chore: fix error Signed-off-by: georgi-l95 --- src/index.ts | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index cfc5b8b3..2e5d1a10 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,4 +4,70 @@ * SPDX-License-Identifier: Apache-2.0 */ -// ... existing code ... +import { Bootstrapper } from "./services/Bootstrapper"; +import yargs from 'yargs'; +import { hideBin } from 'yargs/helpers'; +import { StateController } from "./controller/StateController"; +import { CLIService } from "./services/CLIService"; + +/** + * This script is the entry point for the Hedera Local Node CLI. + * It provides several commands to manage the local Hedera network. + */ +yargs(hideBin(process.argv)) + .command( + "start [accounts]", + "Starts the local hedera network.", + (yargs: yargs.Argv<{}>) => { + CLIService.loadStartupOptions(yargs); + }, + async () => await new StateController("start").startStateMachine() + ) + .command( + "stop", + "Stops the local hedera network and delete all the existing data.", + (yargs: yargs.Argv<{}>) => { + CLIService.loadStopOptions(yargs); + }, + async () => await new StateController("stop").startStateMachine() + ) + .command( + "restart [accounts]", + "Restart the local hedera network.", + (yargs: yargs.Argv<{}>) => { + CLIService.loadStartupOptions(yargs); + }, + async () => await new StateController("restart").startStateMachine() + ) + .command( + "generate-accounts [accounts]", + "Generates the specified number of accounts [default: 10]", + (yargs: yargs.Argv<{}>) => { + CLIService.loadAccountOptions(yargs); + }, + async () => await new StateController("accountCreation").startStateMachine() + ) + .middleware(Bootstrapper.initialize) + .demandCommand() + .strictCommands() + .recommendCommands() + .epilogue( + ` + Requirements: + - Node.js >= v20.11.0 + Node version check: node -v + - NPM >= v10.2.4 + NPM version check: npm -v + - Docker >= v27.3.1 + Docker version check: docker -v + - Docker Compose => v2.29.7 + Docker Compose version check: docker compose version + * Ensure the gRPC FUSE for file sharing setting is disabled in the docker settings and VirtioFS is enabled + * Ensure the following configurations are set at minimum in Docker Settings -> Resources and are available for use + CPUs: 6 + Memory: 8 GB + Swap: 1 GB + Disk Image Size: 64 GB` + ) + .parse(); + \ No newline at end of file From 32af81c2530d18a01b460b65104e0244c08a591e Mon Sep 17 00:00:00 2001 From: georgi-l95 Date: Wed, 15 Jan 2025 10:34:21 +0200 Subject: [PATCH 4/5] chore: update header Signed-off-by: georgi-l95 --- src/Errors/LocalNodeErrors.ts | 4 +--- src/configuration/types/IAccountProps.ts | 4 +--- src/configuration/types/IPrivateKey.ts | 4 +--- src/configuration/types/ITokenProps.ts | 4 +--- src/constants.ts | 4 +--- src/controller/IObserver.ts | 4 +--- src/controller/StateController.ts | 4 +--- src/data/ConfigurationData.ts | 4 +--- src/data/StateData.ts | 4 +--- src/index.ts | 4 +--- src/services/Bootstrapper.ts | 4 +--- src/services/CLIService.ts | 4 +--- src/services/ClientService.ts | 4 +--- src/services/ConnectionService.ts | 4 +--- src/services/DockerService.ts | 4 +--- src/services/IService.ts | 4 +--- src/services/LoggerService.ts | 4 +--- src/services/ServiceLocator.ts | 4 +--- src/state/AccountCreationState.ts | 4 +--- src/state/AttachState.ts | 4 +--- src/state/CleanUpState.ts | 4 +--- src/state/IState.ts | 4 +--- src/state/InitState.ts | 4 +--- src/state/NetworkPrepState.ts | 4 +--- src/state/RecoveryState.ts | 4 +--- src/state/ResourceCreationState.ts | 4 +--- src/state/StartState.ts | 4 +--- src/state/StopState.ts | 4 +--- src/types/AccountType.ts | 4 +--- src/types/CLIOptions.ts | 4 +--- src/types/EventType.ts | 4 +--- src/types/NetworkConfiguration.ts | 4 +--- src/types/StateConfiguration.ts | 4 +--- src/types/VerboseLevel.ts | 4 +--- src/utils/AccountUtils.ts | 4 +--- src/utils/FileSystemUtils.ts | 4 +--- src/utils/RetryUtils.ts | 4 +--- src/utils/SafeDockerNetworkRemover.ts | 4 +--- src/utils/TokenUtils.ts | 4 +--- src/utils/config.ts | 4 +--- src/utils/debounce.ts | 4 +--- test/cypress/src/client.js | 4 +--- test/smoke/test/Smoke.js | 4 +--- test/testUtils.ts | 4 +--- test/unit/controller/StateController.spec.ts | 4 +--- test/unit/states/AccountCreationState.spec.ts | 4 +--- test/unit/states/CleanUpState.spec.ts | 4 +--- test/unit/states/InitState.spec.ts | 4 +--- test/unit/states/ResourceCreationState.spec.ts | 4 +--- test/unit/states/StopState.spec.ts | 4 +--- test/unit/states/networkPrepState.spec.ts | 4 +--- test/unit/states/recoveryState.spec.ts | 4 +--- test/unit/states/startState.spec.ts | 4 +--- test/unit/testBed.ts | 4 +--- test/unit/utils/AccountUtils.spec.ts | 4 +--- test/unit/utils/RetryUtils.spec.ts | 4 +--- test/unit/utils/SafeDockerNetworkRemover.spec.ts | 4 +--- test/unit/utils/TokenUtils.spec.ts | 4 +--- 58 files changed, 58 insertions(+), 174 deletions(-) diff --git a/src/Errors/LocalNodeErrors.ts b/src/Errors/LocalNodeErrors.ts index 5902a07d..7dff62f1 100644 --- a/src/Errors/LocalNodeErrors.ts +++ b/src/Errors/LocalNodeErrors.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 /** * Class representing the local node errors. diff --git a/src/configuration/types/IAccountProps.ts b/src/configuration/types/IAccountProps.ts index db1303b9..b171ed23 100644 --- a/src/configuration/types/IAccountProps.ts +++ b/src/configuration/types/IAccountProps.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { IPrivateKey } from './IPrivateKey'; diff --git a/src/configuration/types/IPrivateKey.ts b/src/configuration/types/IPrivateKey.ts index 688d033e..a09f84da 100644 --- a/src/configuration/types/IPrivateKey.ts +++ b/src/configuration/types/IPrivateKey.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { PrivateKey } from '@hashgraph/sdk'; diff --git a/src/configuration/types/ITokenProps.ts b/src/configuration/types/ITokenProps.ts index 6a4c51a1..dee16ced 100644 --- a/src/configuration/types/ITokenProps.ts +++ b/src/configuration/types/ITokenProps.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { IPrivateKey } from './IPrivateKey'; diff --git a/src/constants.ts b/src/constants.ts index a8a46878..bbe1b696 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 export const CONTAINERS = [ { diff --git a/src/controller/IObserver.ts b/src/controller/IObserver.ts index 82aa4b0e..02cfbfa7 100644 --- a/src/controller/IObserver.ts +++ b/src/controller/IObserver.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { EventType } from '../types/EventType'; diff --git a/src/controller/StateController.ts b/src/controller/StateController.ts index 61065eef..73de4333 100644 --- a/src/controller/StateController.ts +++ b/src/controller/StateController.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { CHECK_FAIL, CHECK_SUCCESS } from '../constants'; import { StateData } from '../data/StateData'; diff --git a/src/data/ConfigurationData.ts b/src/data/ConfigurationData.ts index f7646277..7feb857f 100644 --- a/src/data/ConfigurationData.ts +++ b/src/data/ConfigurationData.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { NetworkConfiguration } from '../types/NetworkConfiguration'; import local from '../configuration/local.json'; diff --git a/src/data/StateData.ts b/src/data/StateData.ts index 93127e26..95518953 100644 --- a/src/data/StateData.ts +++ b/src/data/StateData.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { AccountCreationState } from '../state/AccountCreationState'; import { CleanUpState } from '../state/CleanUpState'; diff --git a/src/index.ts b/src/index.ts index 2e5d1a10..4afc550a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,8 +1,6 @@ #!/usr/bin/env node -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { Bootstrapper } from "./services/Bootstrapper"; import yargs from 'yargs'; diff --git a/src/services/Bootstrapper.ts b/src/services/Bootstrapper.ts index 1387498b..ac210df2 100644 --- a/src/services/Bootstrapper.ts +++ b/src/services/Bootstrapper.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import yargs from 'yargs'; diff --git a/src/services/CLIService.ts b/src/services/CLIService.ts index 86b10ca5..cd1df668 100644 --- a/src/services/CLIService.ts +++ b/src/services/CLIService.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import yargs, { ArgumentsCamelCase, Argv } from 'yargs'; import { IService } from './IService'; diff --git a/src/services/ClientService.ts b/src/services/ClientService.ts index ac39b6aa..141ab8a0 100644 --- a/src/services/ClientService.ts +++ b/src/services/ClientService.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { Client } from '@hashgraph/sdk'; import { IService } from './IService'; diff --git a/src/services/ConnectionService.ts b/src/services/ConnectionService.ts index 6a5ac2da..ee4e91e1 100644 --- a/src/services/ConnectionService.ts +++ b/src/services/ConnectionService.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import net from 'net'; import { IService } from './IService'; diff --git a/src/services/DockerService.ts b/src/services/DockerService.ts index f0d932a2..bfb81ab1 100644 --- a/src/services/DockerService.ts +++ b/src/services/DockerService.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import Dockerode from 'dockerode'; import shell from 'shelljs'; diff --git a/src/services/IService.ts b/src/services/IService.ts index d697f75b..6b00fceb 100644 --- a/src/services/IService.ts +++ b/src/services/IService.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 /** * Represents a service. diff --git a/src/services/LoggerService.ts b/src/services/LoggerService.ts index fbc76b17..e7c25a04 100644 --- a/src/services/LoggerService.ts +++ b/src/services/LoggerService.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { diff --git a/src/services/ServiceLocator.ts b/src/services/ServiceLocator.ts index 6e5d04af..bda3486a 100644 --- a/src/services/ServiceLocator.ts +++ b/src/services/ServiceLocator.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { IService } from './IService'; diff --git a/src/state/AccountCreationState.ts b/src/state/AccountCreationState.ts index 5c1f23a9..7b6726fa 100644 --- a/src/state/AccountCreationState.ts +++ b/src/state/AccountCreationState.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import path from 'path'; import { createReadStream } from 'fs'; diff --git a/src/state/AttachState.ts b/src/state/AttachState.ts index 899a8702..cfea91bc 100644 --- a/src/state/AttachState.ts +++ b/src/state/AttachState.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { IOBserver } from '../controller/IObserver'; import { DockerService } from '../services/DockerService'; diff --git a/src/state/CleanUpState.ts b/src/state/CleanUpState.ts index 89a910e7..38fb20ef 100644 --- a/src/state/CleanUpState.ts +++ b/src/state/CleanUpState.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { readFileSync, writeFileSync, existsSync } from 'fs'; import yaml from 'js-yaml'; diff --git a/src/state/IState.ts b/src/state/IState.ts index 0b1091fe..c782baa2 100644 --- a/src/state/IState.ts +++ b/src/state/IState.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { IOBserver } from '../controller/IObserver'; diff --git a/src/state/InitState.ts b/src/state/InitState.ts index a47d0e9f..01cebf2e 100644 --- a/src/state/InitState.ts +++ b/src/state/InitState.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import semver from'semver'; import shell from 'shelljs'; diff --git a/src/state/NetworkPrepState.ts b/src/state/NetworkPrepState.ts index c96c7e2c..b5fadde4 100644 --- a/src/state/NetworkPrepState.ts +++ b/src/state/NetworkPrepState.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { Client, FileContentsQuery } from '@hashgraph/sdk'; import shell from 'shelljs'; diff --git a/src/state/RecoveryState.ts b/src/state/RecoveryState.ts index 6e231fb4..20449b40 100644 --- a/src/state/RecoveryState.ts +++ b/src/state/RecoveryState.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { IOBserver } from '../controller/IObserver'; import { LoggerService } from '../services/LoggerService'; diff --git a/src/state/ResourceCreationState.ts b/src/state/ResourceCreationState.ts index 1aabdfc1..afcd7b96 100644 --- a/src/state/ResourceCreationState.ts +++ b/src/state/ResourceCreationState.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { TokenId, TokenType } from '@hashgraph/sdk'; import { IOBserver } from '../controller/IObserver'; diff --git a/src/state/StartState.ts b/src/state/StartState.ts index 37e8f972..fe9c1334 100644 --- a/src/state/StartState.ts +++ b/src/state/StartState.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import shell from 'shelljs'; import { LocalNodeErrors } from '../Errors/LocalNodeErrors'; diff --git a/src/state/StopState.ts b/src/state/StopState.ts index cfb3829b..ec565f63 100644 --- a/src/state/StopState.ts +++ b/src/state/StopState.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import shell from 'shelljs'; import { join } from 'path'; diff --git a/src/types/AccountType.ts b/src/types/AccountType.ts index 2845be26..ff7bd1db 100644 --- a/src/types/AccountType.ts +++ b/src/types/AccountType.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { Hbar, PrivateKey } from '@hashgraph/sdk'; diff --git a/src/types/CLIOptions.ts b/src/types/CLIOptions.ts index 6effd167..41befe15 100644 --- a/src/types/CLIOptions.ts +++ b/src/types/CLIOptions.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 /** * Represents the options that can be passed to the CLI. diff --git a/src/types/EventType.ts b/src/types/EventType.ts index 2ec96cbe..7f760801 100644 --- a/src/types/EventType.ts +++ b/src/types/EventType.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 /** * Represents the types of events that can occur in the application. diff --git a/src/types/NetworkConfiguration.ts b/src/types/NetworkConfiguration.ts index efb7f9d3..aff48b72 100644 --- a/src/types/NetworkConfiguration.ts +++ b/src/types/NetworkConfiguration.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 /** * Represents the configuration of a network. diff --git a/src/types/StateConfiguration.ts b/src/types/StateConfiguration.ts index 2459bcbc..36e1e603 100644 --- a/src/types/StateConfiguration.ts +++ b/src/types/StateConfiguration.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { IState } from "../state/IState"; diff --git a/src/types/VerboseLevel.ts b/src/types/VerboseLevel.ts index 026ae901..72533b9d 100644 --- a/src/types/VerboseLevel.ts +++ b/src/types/VerboseLevel.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 /** * Represents the levels of verbosity that can be used. diff --git a/src/utils/AccountUtils.ts b/src/utils/AccountUtils.ts index 175f564d..5794eea9 100644 --- a/src/utils/AccountUtils.ts +++ b/src/utils/AccountUtils.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { diff --git a/src/utils/FileSystemUtils.ts b/src/utils/FileSystemUtils.ts index 72f8f304..21ca9c92 100644 --- a/src/utils/FileSystemUtils.ts +++ b/src/utils/FileSystemUtils.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { homedir } from 'os'; import { join, resolve } from 'path'; diff --git a/src/utils/RetryUtils.ts b/src/utils/RetryUtils.ts index 96e763ce..28f6e60c 100644 --- a/src/utils/RetryUtils.ts +++ b/src/utils/RetryUtils.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 export class RetryUtils { diff --git a/src/utils/SafeDockerNetworkRemover.ts b/src/utils/SafeDockerNetworkRemover.ts index ecbf6aa7..ed53b1d4 100644 --- a/src/utils/SafeDockerNetworkRemover.ts +++ b/src/utils/SafeDockerNetworkRemover.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import shell from 'shelljs'; import { IS_WINDOWS, NETWORK_PREFIX } from '../constants'; diff --git a/src/utils/TokenUtils.ts b/src/utils/TokenUtils.ts index 706b3236..8c28c4c4 100644 --- a/src/utils/TokenUtils.ts +++ b/src/utils/TokenUtils.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { diff --git a/src/utils/config.ts b/src/utils/config.ts index 22a5bf28..64d1e326 100644 --- a/src/utils/config.ts +++ b/src/utils/config.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { join } from 'path'; import yaml from 'js-yaml'; diff --git a/src/utils/debounce.ts b/src/utils/debounce.ts index 036598cd..bc4a8365 100644 --- a/src/utils/debounce.ts +++ b/src/utils/debounce.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 /** * Limit the execution of a function to once every N ms diff --git a/test/cypress/src/client.js b/test/cypress/src/client.js index c9cf408a..88449a9d 100644 --- a/test/cypress/src/client.js +++ b/test/cypress/src/client.js @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { Client, diff --git a/test/smoke/test/Smoke.js b/test/smoke/test/Smoke.js index a96db8e7..bca12ef2 100644 --- a/test/smoke/test/Smoke.js +++ b/test/smoke/test/Smoke.js @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 const { expect } = require("chai"); const hre = require("hardhat"); diff --git a/test/testUtils.ts b/test/testUtils.ts index ca2523bf..1602fd59 100644 --- a/test/testUtils.ts +++ b/test/testUtils.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { PrivateKey } from '@hashgraph/sdk'; import { IPrivateKey, KeyType } from '../src/configuration/types/IPrivateKey'; diff --git a/test/unit/controller/StateController.spec.ts b/test/unit/controller/StateController.spec.ts index 41cca430..f0fa65a8 100644 --- a/test/unit/controller/StateController.spec.ts +++ b/test/unit/controller/StateController.spec.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { expect, assert } from 'chai'; import { StateController } from '../../../src/controller/StateController'; diff --git a/test/unit/states/AccountCreationState.spec.ts b/test/unit/states/AccountCreationState.spec.ts index febfb4c0..b07fe721 100644 --- a/test/unit/states/AccountCreationState.spec.ts +++ b/test/unit/states/AccountCreationState.spec.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { expect } from 'chai'; import { AccountCreationState } from '../../../src/state/AccountCreationState'; diff --git a/test/unit/states/CleanUpState.spec.ts b/test/unit/states/CleanUpState.spec.ts index c71d72e0..9965b781 100644 --- a/test/unit/states/CleanUpState.spec.ts +++ b/test/unit/states/CleanUpState.spec.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { expect } from 'chai'; import { CleanUpState } from '../../../src/state/CleanUpState'; diff --git a/test/unit/states/InitState.spec.ts b/test/unit/states/InitState.spec.ts index cf047113..83043f46 100644 --- a/test/unit/states/InitState.spec.ts +++ b/test/unit/states/InitState.spec.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { expect } from 'chai'; import fs from 'fs'; diff --git a/test/unit/states/ResourceCreationState.spec.ts b/test/unit/states/ResourceCreationState.spec.ts index 0d79fc72..eb2254fd 100644 --- a/test/unit/states/ResourceCreationState.spec.ts +++ b/test/unit/states/ResourceCreationState.spec.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { expect } from 'chai'; import { SinonFakeTimers, SinonSandbox, SinonSpy, SinonStub, SinonStubbedInstance, useFakeTimers } from 'sinon'; diff --git a/test/unit/states/StopState.spec.ts b/test/unit/states/StopState.spec.ts index 61522f9e..6e356387 100644 --- a/test/unit/states/StopState.spec.ts +++ b/test/unit/states/StopState.spec.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { expect } from 'chai'; import sinon from 'sinon'; diff --git a/test/unit/states/networkPrepState.spec.ts b/test/unit/states/networkPrepState.spec.ts index fb9247ac..1633c375 100644 --- a/test/unit/states/networkPrepState.spec.ts +++ b/test/unit/states/networkPrepState.spec.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { expect } from 'chai'; import { SinonSandbox, SinonSpy, SinonStub, SinonStubbedInstance } from 'sinon'; diff --git a/test/unit/states/recoveryState.spec.ts b/test/unit/states/recoveryState.spec.ts index d565cf2d..83a927fe 100644 --- a/test/unit/states/recoveryState.spec.ts +++ b/test/unit/states/recoveryState.spec.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { expect } from 'chai'; import { SinonSandbox, SinonSpy, SinonStub, SinonStubbedInstance } from 'sinon'; diff --git a/test/unit/states/startState.spec.ts b/test/unit/states/startState.spec.ts index be9f1fcc..9413c4c3 100644 --- a/test/unit/states/startState.spec.ts +++ b/test/unit/states/startState.spec.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { expect } from 'chai'; import { resolve } from 'path'; diff --git a/test/unit/testBed.ts b/test/unit/testBed.ts index 03dd1025..a87fd415 100644 --- a/test/unit/testBed.ts +++ b/test/unit/testBed.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import sinon from 'sinon'; import shell from 'shelljs'; diff --git a/test/unit/utils/AccountUtils.spec.ts b/test/unit/utils/AccountUtils.spec.ts index b9b11b95..f1bc84a3 100644 --- a/test/unit/utils/AccountUtils.spec.ts +++ b/test/unit/utils/AccountUtils.spec.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { AccountUtils } from '../../../src/utils/AccountUtils'; import { diff --git a/test/unit/utils/RetryUtils.spec.ts b/test/unit/utils/RetryUtils.spec.ts index b9aeb2e3..b947c6dc 100644 --- a/test/unit/utils/RetryUtils.spec.ts +++ b/test/unit/utils/RetryUtils.spec.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { createStubInstance, SinonSpy, SinonStubbedInstance, spy, stub } from 'sinon'; import { LoggerService } from '../../../src/services/LoggerService'; diff --git a/test/unit/utils/SafeDockerNetworkRemover.spec.ts b/test/unit/utils/SafeDockerNetworkRemover.spec.ts index 20ca7475..4af23316 100644 --- a/test/unit/utils/SafeDockerNetworkRemover.spec.ts +++ b/test/unit/utils/SafeDockerNetworkRemover.spec.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { expect } from 'chai'; import sinon from 'sinon'; diff --git a/test/unit/utils/TokenUtils.spec.ts b/test/unit/utils/TokenUtils.spec.ts index e3d9366a..0351fa7c 100644 --- a/test/unit/utils/TokenUtils.spec.ts +++ b/test/unit/utils/TokenUtils.spec.ts @@ -1,6 +1,4 @@ -/*- - * SPDX-License-Identifier: Apache-2.0 - */ +// SPDX-License-Identifier: Apache-2.0 import { SinonSpy, SinonStub } from 'sinon'; import { before } from 'mocha'; From c7e728b06cb719f32f8ee72d89c9dace7e2a5a42 Mon Sep 17 00:00:00 2001 From: georgi-l95 Date: Wed, 15 Jan 2025 10:37:44 +0200 Subject: [PATCH 5/5] fix new line Signed-off-by: georgi-l95 --- src/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 4afc550a..e1624683 100644 --- a/src/index.ts +++ b/src/index.ts @@ -68,4 +68,3 @@ yargs(hideBin(process.argv)) Disk Image Size: 64 GB` ) .parse(); - \ No newline at end of file