Skip to main content

Module session

Module session 

Source
Expand description

ChiselSession

This module contains the ChiselSession struct, which is the top-level wrapper for a serializable REPL session.

Re-exportsยง

use crate::prelude::SessionSource; ๐Ÿ”’
use crate::prelude::SessionSourceConfig; ๐Ÿ”’
use eyre::Result; ๐Ÿ”’
use foundry_cli::utils::parse_json; ๐Ÿ”’
use foundry_evm::core::evm::FoundryEvmNetwork; ๐Ÿ”’
use foundry_evm::executors::ExecutorBuilder; ๐Ÿ”’
use serde::Deserialize; ๐Ÿ”’
use serde::Deserialize; ๐Ÿ”’
use serde::Serialize; ๐Ÿ”’
use serde::Serialize; ๐Ÿ”’
use std::fs; ๐Ÿ”’
use std::fs::File; ๐Ÿ”’
use std::io::Read; ๐Ÿ”’
use std::io::Write; ๐Ÿ”’
use std::path::Path; ๐Ÿ”’
use std::path::PathBuf; ๐Ÿ”’
use time::OffsetDateTime; ๐Ÿ”’
use time::format_description; ๐Ÿ”’
use std::os::unix::fs::DirBuilderExt; ๐Ÿ”’ Unix
use std::os::unix::fs::PermissionsExt; ๐Ÿ”’ Unix

Structsยง

ChiselSession
A Chisel REPL Session

Functionsยง

validate_session_id ๐Ÿ”’
Rejects a session id that would let chisel-<id>.json escape the cache directory when concatenated into a path (e.g. ../../etc/cron.d/evil, which yields the literal path component chisel-.., followed by a real .. component once the id itself contains a /). Also rejects : to prevent targeting Windows Alternate Data Streams (ADS).