Skip to main content

Module dispatcher

Module dispatcher 

Source
Expand description

Dispatcher

This module contains the ChiselDispatcher struct, which handles the dispatching of both builtin commands and Solidity snippets.

Re-exportsยง

use crate::executor::InspectResult; ๐Ÿ”’
use crate::prelude::ChiselCommand; ๐Ÿ”’
use crate::prelude::ChiselResult; ๐Ÿ”’
use crate::prelude::ChiselSession; ๐Ÿ”’
use crate::prelude::SessionSourceConfig; ๐Ÿ”’
use crate::prelude::SolidityHelper; ๐Ÿ”’
use crate::source::InvocationRpc; ๐Ÿ”’
use crate::source::SessionSource; ๐Ÿ”’
use alloy_primitives::Address; ๐Ÿ”’
use alloy_primitives::hex; ๐Ÿ”’
use alloy_primitives::hex; ๐Ÿ”’
use eyre::Context; ๐Ÿ”’
use eyre::Result; ๐Ÿ”’
use forge_fmt::FormatterConfig; ๐Ÿ”’
use foundry_cli::utils::fetch_abi_from_etherscan; ๐Ÿ”’
use foundry_common::provider::redact_url; ๐Ÿ”’
use foundry_config::Chain; ๐Ÿ”’
use foundry_config::Config; ๐Ÿ”’
use foundry_config::RpcEndpointUrl; ๐Ÿ”’
use foundry_evm::core::evm::EthEvmNetwork; ๐Ÿ”’
use foundry_evm::core::evm::FoundryEvmNetwork; ๐Ÿ”’
use foundry_evm::decode::decode_console_logs; ๐Ÿ”’
use foundry_evm::executors::ExecutorBuilder; ๐Ÿ”’
use foundry_evm::traces::CallTraceDecoder; ๐Ÿ”’
use foundry_evm::traces::CallTraceDecoderBuilder; ๐Ÿ”’
use foundry_evm::traces::TraceKind; ๐Ÿ”’
use foundry_evm::traces::decode_trace_arena; ๐Ÿ”’
use foundry_evm::traces::identifier::SignaturesIdentifier; ๐Ÿ”’
use foundry_evm::traces::identifier::TraceIdentifiers; ๐Ÿ”’
use foundry_evm::traces::render_trace_arena; ๐Ÿ”’
use foundry_evm_networks::NetworkConfigs; ๐Ÿ”’
use foundry_evm_networks::NetworkVariant; ๐Ÿ”’
use reqwest::Url; ๐Ÿ”’
use solar::parse::lexer::token::RawLiteralKind; ๐Ÿ”’
use solar::parse::lexer::token::RawTokenKind; ๐Ÿ”’
use solar::sema::ast::Base; ๐Ÿ”’
use std::borrow::Cow; ๐Ÿ”’
use std::io::Write; ๐Ÿ”’
use std::ops::ControlFlow; ๐Ÿ”’
use std::path::Path; ๐Ÿ”’
use std::path::PathBuf; ๐Ÿ”’
use std::process::Command; ๐Ÿ”’
use tempfile::Builder; ๐Ÿ”’
use yansi::Paint; ๐Ÿ”’

Structsยง

ChiselDispatcher
Chisel input dispatcher

Constantsยง

CHISEL_CHAR
Chisel character
COMMAND_LEADER
Command leader character
DEFAULT_PROMPT ๐Ÿ”’
PROMPT_ARROW
Prompt arrow character.
PROMPT_ARROW_STR
Prompt arrow string.

Functionsยง

config_network_name ๐Ÿ”’
ensure_fork_network_matches ๐Ÿ”’
ensure_loaded_session_network_matches ๐Ÿ”’
format_source
Helper function that formats solidity source with the given FormatterConfig
network_variant ๐Ÿ”’
preprocess ๐Ÿ”’
Expands the previous result, checksums addresses, and returns whether the input only contained trivia (comments, whitespace).
view_session ๐Ÿ”’
Displays cached source without restoring credentials or building an execution environment.