refactor: move brother_node development artifact to dev/test-nodes subdirectory
Development Artifact Cleanup: ✅ BROTHER_NODE REORGANIZATION: Moved development test node to appropriate location - dev/test-nodes/brother_node/: Moved from root directory for better organization - Contains development configuration, test logs, and test chain data - No impact on production systems - purely development/testing artifact ✅ DEVELOPMENT ARTIFACTS IDENTIFIED: - Chain ID: aitbc-brother-chain (test/development chain) - Ports: 8010 (P2P) and 8011 (RPC) - different from production - Environment: .env file with test configuration - Logs: rpc.log and node.log from development testing session (March 15, 2026) ✅ ROOT DIRECTORY CLEANUP: Removed development clutter from production directory - brother_node/ moved to dev/test-nodes/brother_node/ - Root directory now contains only production-ready components - Development artifacts properly organized in dev/ subdirectory DIRECTORY STRUCTURE IMPROVEMENT: 📁 dev/test-nodes/: Development and testing node configurations 🏗️ Root Directory: Clean production structure with only essential components 🧪 Development Isolation: Test environments separated from production BENEFITS: ✅ Clean Production Directory: No development artifacts in root ✅ Better Organization: Development nodes grouped in dev/ subdirectory ✅ Clear Separation: Production vs development environments clearly distinguished ✅ Maintainability: Easier to identify and manage development components RESULT: Successfully moved brother_node development artifact to dev/test-nodes/ subdirectory, cleaning up the root directory while preserving development testing environment for future use.
This commit is contained in:
2108
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/descriptors.d.ts
generated
vendored
Executable file
2108
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/descriptors.d.ts
generated
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/descriptors.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/descriptors.d.ts.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"descriptors.d.ts","sourceRoot":"","sources":["../../src/descriptors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;;;OAOG;IACH,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAskFT,CAAC"}
|
||||
2732
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/descriptors.js
generated
vendored
Executable file
2732
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/descriptors.js
generated
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/descriptors.js.map
generated
vendored
Executable file
1
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/descriptors.js.map
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
66
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/errors.d.ts
generated
vendored
Executable file
66
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/errors.d.ts
generated
vendored
Executable file
@@ -0,0 +1,66 @@
|
||||
import type { ErrorDescriptor } from "./descriptors.js";
|
||||
import { CustomError } from "@nomicfoundation/hardhat-utils/error";
|
||||
import { ERRORS } from "./descriptors.js";
|
||||
export type ErrorMessageTemplateValue = string | number | boolean | bigint | undefined | null | ErrorMessageTemplateValue[] | {
|
||||
toString(): string;
|
||||
};
|
||||
export type MessagetTemplateArguments<MessageTemplateT extends string> = MessageTemplateT extends `${string}{${infer Tag}}${infer Rest}` ? {
|
||||
[K in Tag | keyof MessagetTemplateArguments<Rest>]: ErrorMessageTemplateValue;
|
||||
} : {};
|
||||
export type HardhatErrorConstructorArguments<ErrorDescriptorT extends ErrorDescriptor> = keyof MessagetTemplateArguments<ErrorDescriptorT["messageTemplate"]> extends never ? [ErrorDescriptorT, Error?] : [
|
||||
ErrorDescriptorT,
|
||||
MessagetTemplateArguments<ErrorDescriptorT["messageTemplate"]>,
|
||||
Error?
|
||||
];
|
||||
export declare const ERROR_PREFIX = "HHE";
|
||||
/**
|
||||
* An error thrown by Hardhat. This error is meant to be thrown by Hardhat
|
||||
* itself, and internal plugins. For errors thrown by community plugins, see
|
||||
* `HardhatPluginError`.
|
||||
*/
|
||||
export declare class HardhatError<ErrorDescriptorT extends ErrorDescriptor = ErrorDescriptor> extends CustomError {
|
||||
#private;
|
||||
static readonly ERRORS: typeof ERRORS;
|
||||
constructor(...[errorDescriptor, messageArgumentsOrParentError, parentError,]: HardhatErrorConstructorArguments<ErrorDescriptorT>);
|
||||
static isHardhatError(other: unknown): other is HardhatError<ErrorDescriptor>;
|
||||
static isHardhatError<ErrorDescriptorT extends ErrorDescriptor>(other: unknown, descriptor?: ErrorDescriptorT): other is HardhatError<ErrorDescriptorT>;
|
||||
get number(): number;
|
||||
get pluginId(): string | undefined;
|
||||
get descriptor(): ErrorDescriptor;
|
||||
get messageArguments(): MessagetTemplateArguments<ErrorDescriptorT["messageTemplate"]>;
|
||||
get errorCode(): string;
|
||||
get formattedMessage(): string;
|
||||
}
|
||||
/**
|
||||
* An error thrown by a Hardhat plugin. This error is meant to be thrown by
|
||||
* community plugins to signal that something went wrong.
|
||||
*/
|
||||
export declare class HardhatPluginError extends CustomError {
|
||||
readonly pluginId: string;
|
||||
constructor(pluginId: string, message: string, parentError?: Error);
|
||||
static isHardhatPluginError(other: unknown): other is HardhatPluginError;
|
||||
}
|
||||
/**
|
||||
* Asserts an internal invariant.
|
||||
*
|
||||
* @param invariant The condition to check.
|
||||
* @param message A message to show if the condition is false.
|
||||
*/
|
||||
export declare function assertHardhatInvariant(invariant: boolean, message: string): asserts invariant;
|
||||
/**
|
||||
* This function applies error messages templates like this:
|
||||
*
|
||||
* - Template is a string which contains a variable tags. A variable tag is a
|
||||
* a variable name surrounded by %. Eg: %plugin1%
|
||||
* - A variable name is a string of alphanumeric ascii characters.
|
||||
* - Every variable tag is replaced by its value.
|
||||
* - %% is replaced by %.
|
||||
* - Values can't contain variable tags.
|
||||
* - If a variable is not present in the template, but present in the values
|
||||
* object, an error is thrown.
|
||||
*
|
||||
* @param template The template string.
|
||||
* @param values A map of variable names to their values.
|
||||
*/
|
||||
export declare function applyErrorMessageTemplate(template: string, values: Record<string, ErrorMessageTemplateValue>): string;
|
||||
//# sourceMappingURL=errors.d.ts.map
|
||||
1
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/errors.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/errors.d.ts.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAGnE,OAAO,EAAE,MAAM,EAAoB,MAAM,kBAAkB,CAAC;AAE5D,MAAM,MAAM,yBAAyB,GACjC,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,GACN,SAAS,GACT,IAAI,GACJ,yBAAyB,EAAE,GAC3B;IAAE,QAAQ,IAAI,MAAM,CAAA;CAAE,CAAC;AAE3B,MAAM,MAAM,yBAAyB,CAAC,gBAAgB,SAAS,MAAM,IACnE,gBAAgB,SAAS,GAAG,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mB,SAAQ,WAAW;aAE/B,QAAQ,EAAE,MAAM;gBAAhB,QAAQ,EAAE,MAAM,EAChC,OAAO,EAAE,MAAM,EACf,WAAW,CAAC,EAAE,KAAK;WAaP,oBAAoB,CAChC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,kBAAkB;CAY/B;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,OAAO,EAClB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,SAAS,CAInB;AAMD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,GAChD,MAAM,CAsBR"}
|
||||
164
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/errors.js
generated
vendored
Executable file
164
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/errors.js
generated
vendored
Executable file
@@ -0,0 +1,164 @@
|
||||
import { CustomError } from "@nomicfoundation/hardhat-utils/error";
|
||||
import { isObject } from "@nomicfoundation/hardhat-utils/lang";
|
||||
import { ERRORS, ERROR_CATEGORIES } from "./descriptors.js";
|
||||
export const ERROR_PREFIX = "HHE";
|
||||
const IS_HARDHAT_ERROR_PROPERTY_NAME = "_isHardhatError";
|
||||
const IS_HARDHAT_PLUGIN_ERROR_PROPERTY_NAME = "_isHardhatPluginError";
|
||||
/**
|
||||
* An error thrown by Hardhat. This error is meant to be thrown by Hardhat
|
||||
* itself, and internal plugins. For errors thrown by community plugins, see
|
||||
* `HardhatPluginError`.
|
||||
*/
|
||||
export class HardhatError extends CustomError {
|
||||
static ERRORS = ERRORS;
|
||||
#descriptor;
|
||||
#arguments;
|
||||
#errorCode;
|
||||
#formattedMessage;
|
||||
constructor(...[errorDescriptor, messageArgumentsOrParentError, parentError,]) {
|
||||
const errorCode = getErrorCode(errorDescriptor);
|
||||
const formattedMessage = messageArgumentsOrParentError === undefined ||
|
||||
messageArgumentsOrParentError instanceof Error
|
||||
? errorDescriptor.messageTemplate
|
||||
: applyErrorMessageTemplate(errorDescriptor.messageTemplate, messageArgumentsOrParentError);
|
||||
super(`${errorCode}: ${formattedMessage}`, parentError instanceof Error
|
||||
? parentError
|
||||
: messageArgumentsOrParentError instanceof Error
|
||||
? messageArgumentsOrParentError
|
||||
: undefined);
|
||||
this.#descriptor = errorDescriptor;
|
||||
this.#errorCode = errorCode;
|
||||
this.#formattedMessage = formattedMessage;
|
||||
if (messageArgumentsOrParentError === undefined ||
|
||||
messageArgumentsOrParentError instanceof Error) {
|
||||
/* eslint-disable @typescript-eslint/consistent-type-assertions --
|
||||
Typescript inference get's lost here, but we know that if we didn't get
|
||||
arguments, it's because the error doesn't have any. */
|
||||
this.#arguments = {};
|
||||
}
|
||||
else {
|
||||
this.#arguments = messageArgumentsOrParentError;
|
||||
}
|
||||
// As this package is going to be used from most of our packages, there's a
|
||||
// change of users having multiple versions of it. If that happens, they may
|
||||
// have multiple `HardhatError` classes, so we can't reliably use
|
||||
// `instanceof` to check if an error is a `HardhatError`. We define a
|
||||
// pseudo-private field to use it for it. While this is not bulletproof, it
|
||||
// should be enough for our case, as we won't be changing this class often.
|
||||
Object.defineProperty(this, IS_HARDHAT_ERROR_PROPERTY_NAME, {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: false,
|
||||
value: true,
|
||||
});
|
||||
}
|
||||
static isHardhatError(other, descriptor) {
|
||||
if (!isObject(other)) {
|
||||
return false;
|
||||
}
|
||||
const isHardhatErrorProperty = Object.getOwnPropertyDescriptor(other, IS_HARDHAT_ERROR_PROPERTY_NAME);
|
||||
return (isHardhatErrorProperty?.value === true &&
|
||||
// If an error descriptor is provided, check if its number matches the Hardhat error number
|
||||
(descriptor === undefined
|
||||
? true
|
||||
: "number" in other && other.number === descriptor.number));
|
||||
}
|
||||
get number() {
|
||||
return this.#descriptor.number;
|
||||
}
|
||||
get pluginId() {
|
||||
for (const category of Object.values(ERROR_CATEGORIES)) {
|
||||
const isWithinCategoryRange = this.#descriptor.number >= category.min &&
|
||||
this.#descriptor.number <= category.max;
|
||||
if (isWithinCategoryRange) {
|
||||
return category.pluginId;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
get descriptor() {
|
||||
return this.#descriptor;
|
||||
}
|
||||
get messageArguments() {
|
||||
return this.#arguments;
|
||||
}
|
||||
get errorCode() {
|
||||
return this.#errorCode;
|
||||
}
|
||||
get formattedMessage() {
|
||||
return this.#formattedMessage;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* An error thrown by a Hardhat plugin. This error is meant to be thrown by
|
||||
* community plugins to signal that something went wrong.
|
||||
*/
|
||||
export class HardhatPluginError extends CustomError {
|
||||
pluginId;
|
||||
constructor(pluginId, message, parentError) {
|
||||
super(message, parentError);
|
||||
this.pluginId = pluginId;
|
||||
// See `HardhatError` constructor for an explanation of this property.
|
||||
Object.defineProperty(this, IS_HARDHAT_PLUGIN_ERROR_PROPERTY_NAME, {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: false,
|
||||
value: true,
|
||||
});
|
||||
}
|
||||
static isHardhatPluginError(other) {
|
||||
if (!isObject(other)) {
|
||||
return false;
|
||||
}
|
||||
const isHardhatPluginErrorProperty = Object.getOwnPropertyDescriptor(other, IS_HARDHAT_PLUGIN_ERROR_PROPERTY_NAME);
|
||||
return isHardhatPluginErrorProperty?.value === true;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Asserts an internal invariant.
|
||||
*
|
||||
* @param invariant The condition to check.
|
||||
* @param message A message to show if the condition is false.
|
||||
*/
|
||||
export function assertHardhatInvariant(invariant, message) {
|
||||
if (!invariant) {
|
||||
throw new HardhatError(ERRORS.CORE.INTERNAL.ASSERTION_ERROR, { message });
|
||||
}
|
||||
}
|
||||
function getErrorCode(errorDescriptor) {
|
||||
return `${ERROR_PREFIX}${errorDescriptor.number}`;
|
||||
}
|
||||
/**
|
||||
* This function applies error messages templates like this:
|
||||
*
|
||||
* - Template is a string which contains a variable tags. A variable tag is a
|
||||
* a variable name surrounded by %. Eg: %plugin1%
|
||||
* - A variable name is a string of alphanumeric ascii characters.
|
||||
* - Every variable tag is replaced by its value.
|
||||
* - %% is replaced by %.
|
||||
* - Values can't contain variable tags.
|
||||
* - If a variable is not present in the template, but present in the values
|
||||
* object, an error is thrown.
|
||||
*
|
||||
* @param template The template string.
|
||||
* @param values A map of variable names to their values.
|
||||
*/
|
||||
export function applyErrorMessageTemplate(template, values) {
|
||||
return template.replaceAll(/{(.*?)}/g, (_match, variableName) => {
|
||||
const rawValue = values[variableName];
|
||||
if (rawValue === undefined) {
|
||||
return "undefined";
|
||||
}
|
||||
if (rawValue === null) {
|
||||
return "null";
|
||||
}
|
||||
if (typeof rawValue === "bigint") {
|
||||
return `${rawValue}n`;
|
||||
}
|
||||
if (Array.isArray(rawValue)) {
|
||||
return JSON.stringify(rawValue);
|
||||
}
|
||||
return rawValue.toString();
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=errors.js.map
|
||||
1
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/errors.js.map
generated
vendored
Executable file
1
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/errors.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAE/D,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAiC5D,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC;AAElC,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;AACzD,MAAM,qCAAqC,GAAG,uBAAuB,CAAC;AAEtE;;;;GAIG;AACH,MAAM,OAAO,YAEX,SAAQ,WAAW;IACZ,MAAM,CAAU,MAAM,GAAk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AW,CAAC;QACrB,CAAC;QAED,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;YACtB,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;YACjC,OAAO,GAAG,QAAQ,GAAG,CAAC;QACxB,CAAC;QAED,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC5B,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QAClC,CAAC;QAED,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC,CAAC,CAAC;AACL,CAAC"}
|
||||
3
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/index.d.ts
generated
vendored
Executable file
3
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/index.d.ts
generated
vendored
Executable file
@@ -0,0 +1,3 @@
|
||||
export type { ErrorDescriptor } from "./descriptors.js";
|
||||
export { HardhatError, HardhatPluginError, assertHardhatInvariant, } from "./errors.js";
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/index.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/index.d.ts.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,aAAa,CAAC"}
|
||||
2
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/index.js
generated
vendored
Executable file
2
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/index.js
generated
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
export { HardhatError, HardhatPluginError, assertHardhatInvariant, } from "./errors.js";
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/index.js.map
generated
vendored
Executable file
1
dev/env/node_modules/@nomicfoundation/hardhat-errors/dist/src/index.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,aAAa,CAAC"}
|
||||
Reference in New Issue
Block a user