Skip to main content

Module exploit

Module exploit 

Source

Re-exportsΒ§

use clap::Parser; πŸ”’
use clap::ValueHint; πŸ”’
use eyre::Context; πŸ”’
use eyre::Result; πŸ”’
use eyre::eyre; πŸ”’
use foundry_cli::opts::BuildOpts; πŸ”’
use foundry_cli::utils::LoadConfig; πŸ”’
use foundry_common::provider::mpp::transport::LazyAccountsProvider; πŸ”’
use foundry_common::shell; πŸ”’
use foundry_compilers::utils::source_files_iter; πŸ”’
use foundry_config::impl_figment_convert; πŸ”’
use foundry_evm::constants::CHEATCODE_ADDRESS; πŸ”’
use foundry_evm::constants::HARDHAT_CONSOLE_ADDRESS; πŸ”’
use foundry_evm::constants::MONAD_CHEATCODE_ADDRESS; πŸ”’
use mpp::client::Fetch; πŸ”’
use serde::Serialize; πŸ”’
use serde::Serialize; πŸ”’
use serde_json::Value; πŸ”’
use serde_json::json; πŸ”’
use std::fmt::Write as _; πŸ”’
use std::io::Write as _; πŸ”’
use std::path::Path; πŸ”’
use std::path::PathBuf; πŸ”’
use url::Url; πŸ”’
use crate::cmd::properties::SELECT_ALL_TESTS; πŸ”’
use crate::cmd::properties::Sandbox; πŸ”’
use crate::cmd::properties::TestFile; πŸ”’
use crate::cmd::properties::restrict_config; πŸ”’
use crate::cmd::properties::shorten; πŸ”’
use crate::cmd::properties::stderr; πŸ”’
use crate::cmd::properties::suite_results; πŸ”’
use crate::result::TestResult; πŸ”’
use crate::result::TestStatus; πŸ”’
use crate::traces::CallKind; πŸ”’
use crate::traces::TraceKind; πŸ”’
use crate::workspace::relative_to_root; πŸ”’

StructsΒ§

Chat πŸ”’
ExploitArgs
CLI arguments for forge exploit.
Finding πŸ”’
A test the model wrote that passes, proving its claimed bug.
Report πŸ”’

EnumsΒ§

Run πŸ”’

ConstantsΒ§

DEFAULT_ENDPOINT πŸ”’
Tempo Gateway that serves OpenAI-compatible chat completions paid over MPP.
DEFAULT_MODEL πŸ”’
Model used when none is given.
MAX_SOURCE_BYTES πŸ”’
Longest source file sent to the model.
NO_EXPLOIT πŸ”’
Reply that ends an attempt without a finding.
SYSTEM πŸ”’

FunctionsΒ§

bug_tags πŸ”’
changes_state πŸ”’
Returns whether a test makes a successful plain call, which can change the callee’s state, into a contract other than the test, the cheatcodes of any network, and the console. A test that does not, such as an empty one, one that only reads, or one whose calls all revert, passes whatever the target does. The tests run in another process, so the network’s own list of cheatcode addresses is not at hand.
read_source πŸ”’
run_test πŸ”’
Runs the tests of a model-written file in a fresh copy of the project.
solidity_block πŸ”’