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:
22
dev/env/node_modules/@nomicfoundation/edr/src/provider/factory.rs
generated
vendored
Executable file
22
dev/env/node_modules/@nomicfoundation/edr/src/provider/factory.rs
generated
vendored
Executable file
@@ -0,0 +1,22 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use edr_napi_core::provider::SyncProviderFactory;
|
||||
use napi_derive::napi;
|
||||
|
||||
#[napi]
|
||||
pub struct ProviderFactory {
|
||||
inner: Arc<dyn SyncProviderFactory>,
|
||||
}
|
||||
|
||||
impl ProviderFactory {
|
||||
/// Returns a reference to the inner provider factory.
|
||||
pub fn as_inner(&self) -> &Arc<dyn SyncProviderFactory> {
|
||||
&self.inner
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Arc<dyn SyncProviderFactory>> for ProviderFactory {
|
||||
fn from(inner: Arc<dyn SyncProviderFactory>) -> Self {
|
||||
Self { inner }
|
||||
}
|
||||
}
|
||||
73
dev/env/node_modules/@nomicfoundation/edr/src/provider/response.rs
generated
vendored
Executable file
73
dev/env/node_modules/@nomicfoundation/edr/src/provider/response.rs
generated
vendored
Executable file
@@ -0,0 +1,73 @@
|
||||
use edr_chain_spec::EvmHaltReason;
|
||||
use edr_napi_core::spec::SolidityTraceData;
|
||||
use edr_solidity::contract_decoder::NestedTraceDecoder as _;
|
||||
use napi::Either;
|
||||
use napi_derive::napi;
|
||||
|
||||
use crate::{
|
||||
cast::TryCast,
|
||||
trace::{solidity_stack_trace::SolidityStackTrace, RawTrace},
|
||||
};
|
||||
|
||||
#[napi]
|
||||
pub struct Response {
|
||||
inner: edr_napi_core::spec::Response<EvmHaltReason>,
|
||||
}
|
||||
|
||||
impl From<edr_napi_core::spec::Response<EvmHaltReason>> for Response {
|
||||
fn from(value: edr_napi_core::spec::Response<EvmHaltReason>) -> Self {
|
||||
Self { inner: value }
|
||||
}
|
||||
}
|
||||
|
||||
#[napi]
|
||||
impl Response {
|
||||
#[doc = "Returns the response data as a JSON string or a JSON object."]
|
||||
#[napi(catch_unwind, getter)]
|
||||
pub fn data(&self) -> Either<String, serde_json::Value> {
|
||||
self.inner.data.clone()
|
||||
}
|
||||
|
||||
// Rust port of https://github.com/NomicFoundation/hardhat/blob/c20bf195a6efdc2d74e778b7a4a7799aac224841/packages/hardhat-core/src/internal/hardhat-network/provider/provider.ts#L590
|
||||
#[doc = "Compute the error stack trace. Return the stack trace if it can be decoded, otherwise returns none. Throws if there was an error computing the stack trace."]
|
||||
#[napi(catch_unwind)]
|
||||
pub fn stack_trace(&self) -> napi::Result<Option<SolidityStackTrace>> {
|
||||
let Some(SolidityTraceData {
|
||||
trace,
|
||||
contract_decoder,
|
||||
}) = &self.inner.solidity_trace
|
||||
else {
|
||||
return Ok(None);
|
||||
};
|
||||
let nested_trace = edr_solidity::nested_tracer::convert_trace_messages_to_nested_trace(
|
||||
trace.as_ref().clone(),
|
||||
)
|
||||
.map_err(|err| napi::Error::from_reason(err.to_string()))?;
|
||||
|
||||
if let Some(vm_trace) = nested_trace {
|
||||
let decoded_trace = contract_decoder
|
||||
.try_to_decode_nested_trace(vm_trace)
|
||||
.map_err(|err| napi::Error::from_reason(err.to_string()))?;
|
||||
let stack_trace = edr_solidity::solidity_tracer::get_stack_trace(decoded_trace)
|
||||
.map_err(|err| napi::Error::from_reason(err.to_string()))?;
|
||||
let stack_trace = stack_trace
|
||||
.into_iter()
|
||||
.map(TryCast::try_cast)
|
||||
.collect::<Result<Vec<_>, _>>()?;
|
||||
|
||||
Ok(Some(stack_trace))
|
||||
} else {
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
|
||||
#[doc = "Returns the raw traces of executed contracts. This maybe contain zero or more traces."]
|
||||
#[napi(catch_unwind, getter)]
|
||||
pub fn traces(&self) -> Vec<RawTrace> {
|
||||
self.inner
|
||||
.traces
|
||||
.iter()
|
||||
.map(|trace| RawTrace::from(trace.clone()))
|
||||
.collect()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user