From 82b245b054c83072d53c98d1787e0ec990ff6151 Mon Sep 17 00:00:00 2001 From: GregTheDev Date: Tue, 22 Jul 2025 18:33:02 +0700 Subject: [PATCH 1/4] feat: add console logging --- Cargo.lock | 6 +++--- crates/cheatcodes/Cargo.toml | 2 +- crates/cheatcodes/src/credible.rs | 10 ++++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 080597f55270f..c95d2ada2cf00 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1553,7 +1553,7 @@ dependencies = [ [[package]] name = "assertion-da-client" version = "0.2.0" -source = "git+https://github.com/phylaxsystems/credible-sdk.git?rev=d17125a#d17125a44eaf1ead0335fbee4a8e1117a43ab79d" +source = "git+https://github.com/phylaxsystems/credible-sdk.git?rev=096a4c0#096a4c0a55ca681736310d92daadb5c805a32a26" dependencies = [ "alloy", "assertion-da-core", @@ -1570,7 +1570,7 @@ dependencies = [ [[package]] name = "assertion-da-core" version = "0.2.0" -source = "git+https://github.com/phylaxsystems/credible-sdk.git?rev=d17125a#d17125a44eaf1ead0335fbee4a8e1117a43ab79d" +source = "git+https://github.com/phylaxsystems/credible-sdk.git?rev=096a4c0#096a4c0a55ca681736310d92daadb5c805a32a26" dependencies = [ "alloy", "serde", @@ -1579,7 +1579,7 @@ dependencies = [ [[package]] name = "assertion-executor" version = "0.2.0" -source = "git+https://github.com/phylaxsystems/credible-sdk.git?rev=d17125a#d17125a44eaf1ead0335fbee4a8e1117a43ab79d" +source = "git+https://github.com/phylaxsystems/credible-sdk.git?rev=096a4c0#096a4c0a55ca681736310d92daadb5c805a32a26" dependencies = [ "alloy", "alloy-consensus", diff --git a/crates/cheatcodes/Cargo.toml b/crates/cheatcodes/Cargo.toml index b307038c5cbe8..41f8de2b7edb4 100644 --- a/crates/cheatcodes/Cargo.toml +++ b/crates/cheatcodes/Cargo.toml @@ -22,7 +22,7 @@ vergen = { workspace = true, default-features = false, features = [ ] } [dependencies] -assertion-executor = { git = "https://github.com/phylaxsystems/credible-sdk.git", rev = "d17125a", features = ["phoundry"]} +assertion-executor = { git = "https://github.com/phylaxsystems/credible-sdk.git", rev = "096a4c0", features = ["phoundry"]} #assertion-executor = { path = "../../../credible-sdk/crates/assertion-executor", features = ["phoundry"]} foundry-cheatcodes-spec.workspace = true diff --git a/crates/cheatcodes/src/credible.rs b/crates/cheatcodes/src/credible.rs index 6638d74dc778d..283a1891fae00 100644 --- a/crates/cheatcodes/src/credible.rs +++ b/crates/cheatcodes/src/credible.rs @@ -207,12 +207,10 @@ pub fn execute_assertion( .first() .expect("Expected 1 assertion to be executed, but got 0"); - for log in assertion_fn_result.as_result().logs() { - if Some(&Console::log::SIGNATURE_HASH) == log.topics().first() { - let decoded_log = Console::log::decode_log(log); - if let Ok(log_data) = decoded_log { - inspector.console_log(&format!("{}", log_data.val)); - } + if !assertion_fn_result.console_logs.is_empty() { + inspector.console_log("Assertion function logs: "); + for log in assertion_fn_result.console_logs.iter() { + inspector.console_log(log); } } From a5effb1d7a723627de2a937afc4ce540dd35f807 Mon Sep 17 00:00:00 2001 From: GregTheDev Date: Tue, 22 Jul 2025 19:47:22 +0700 Subject: [PATCH 2/4] chore: bump assex --- crates/cheatcodes/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/cheatcodes/Cargo.toml b/crates/cheatcodes/Cargo.toml index 41f8de2b7edb4..0d7d3b528c667 100644 --- a/crates/cheatcodes/Cargo.toml +++ b/crates/cheatcodes/Cargo.toml @@ -22,7 +22,7 @@ vergen = { workspace = true, default-features = false, features = [ ] } [dependencies] -assertion-executor = { git = "https://github.com/phylaxsystems/credible-sdk.git", rev = "096a4c0", features = ["phoundry"]} +assertion-executor = { git = "https://github.com/phylaxsystems/credible-sdk.git", rev = "072ca3e", features = ["phoundry"]} #assertion-executor = { path = "../../../credible-sdk/crates/assertion-executor", features = ["phoundry"]} foundry-cheatcodes-spec.workspace = true From a58c32e52a978b808ed1dd65d4c1c51ccf233710 Mon Sep 17 00:00:00 2001 From: GregTheDev Date: Tue, 22 Jul 2025 19:53:01 +0700 Subject: [PATCH 3/4] chore: bump --- Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c95d2ada2cf00..e2d7ee41f1858 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1553,7 +1553,7 @@ dependencies = [ [[package]] name = "assertion-da-client" version = "0.2.0" -source = "git+https://github.com/phylaxsystems/credible-sdk.git?rev=096a4c0#096a4c0a55ca681736310d92daadb5c805a32a26" +source = "git+https://github.com/phylaxsystems/credible-sdk.git?rev=072ca3e#072ca3e19eb312acb980f9eea34a25a534068a1f" dependencies = [ "alloy", "assertion-da-core", @@ -1570,7 +1570,7 @@ dependencies = [ [[package]] name = "assertion-da-core" version = "0.2.0" -source = "git+https://github.com/phylaxsystems/credible-sdk.git?rev=096a4c0#096a4c0a55ca681736310d92daadb5c805a32a26" +source = "git+https://github.com/phylaxsystems/credible-sdk.git?rev=072ca3e#072ca3e19eb312acb980f9eea34a25a534068a1f" dependencies = [ "alloy", "serde", @@ -1579,7 +1579,7 @@ dependencies = [ [[package]] name = "assertion-executor" version = "0.2.0" -source = "git+https://github.com/phylaxsystems/credible-sdk.git?rev=096a4c0#096a4c0a55ca681736310d92daadb5c805a32a26" +source = "git+https://github.com/phylaxsystems/credible-sdk.git?rev=072ca3e#072ca3e19eb312acb980f9eea34a25a534068a1f" dependencies = [ "alloy", "alloy-consensus", From 2b9f72887f478a8b39306f153eb64bc4acc8b4b8 Mon Sep 17 00:00:00 2001 From: GregTheDev Date: Tue, 22 Jul 2025 21:22:30 +0700 Subject: [PATCH 4/4] chore: bump assex --- Cargo.lock | 6 +++--- crates/cheatcodes/Cargo.toml | 2 +- crates/cheatcodes/src/credible.rs | 7 ++----- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e2d7ee41f1858..8835209aed000 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1553,7 +1553,7 @@ dependencies = [ [[package]] name = "assertion-da-client" version = "0.2.0" -source = "git+https://github.com/phylaxsystems/credible-sdk.git?rev=072ca3e#072ca3e19eb312acb980f9eea34a25a534068a1f" +source = "git+https://github.com/phylaxsystems/credible-sdk.git?rev=a7571bb#a7571bb0cdb409aec151d028ff10d4a3d7d0a8be" dependencies = [ "alloy", "assertion-da-core", @@ -1570,7 +1570,7 @@ dependencies = [ [[package]] name = "assertion-da-core" version = "0.2.0" -source = "git+https://github.com/phylaxsystems/credible-sdk.git?rev=072ca3e#072ca3e19eb312acb980f9eea34a25a534068a1f" +source = "git+https://github.com/phylaxsystems/credible-sdk.git?rev=a7571bb#a7571bb0cdb409aec151d028ff10d4a3d7d0a8be" dependencies = [ "alloy", "serde", @@ -1579,7 +1579,7 @@ dependencies = [ [[package]] name = "assertion-executor" version = "0.2.0" -source = "git+https://github.com/phylaxsystems/credible-sdk.git?rev=072ca3e#072ca3e19eb312acb980f9eea34a25a534068a1f" +source = "git+https://github.com/phylaxsystems/credible-sdk.git?rev=a7571bb#a7571bb0cdb409aec151d028ff10d4a3d7d0a8be" dependencies = [ "alloy", "alloy-consensus", diff --git a/crates/cheatcodes/Cargo.toml b/crates/cheatcodes/Cargo.toml index 0d7d3b528c667..2c54a47337c0d 100644 --- a/crates/cheatcodes/Cargo.toml +++ b/crates/cheatcodes/Cargo.toml @@ -22,7 +22,7 @@ vergen = { workspace = true, default-features = false, features = [ ] } [dependencies] -assertion-executor = { git = "https://github.com/phylaxsystems/credible-sdk.git", rev = "072ca3e", features = ["phoundry"]} +assertion-executor = { git = "https://github.com/phylaxsystems/credible-sdk.git", rev = "a7571bb", features = ["phoundry"]} #assertion-executor = { path = "../../../credible-sdk/crates/assertion-executor", features = ["phoundry"]} foundry-cheatcodes-spec.workspace = true diff --git a/crates/cheatcodes/src/credible.rs b/crates/cheatcodes/src/credible.rs index 283a1891fae00..9efb876335d09 100644 --- a/crates/cheatcodes/src/credible.rs +++ b/crates/cheatcodes/src/credible.rs @@ -1,6 +1,6 @@ use crate::{inspector::Ecx, Cheatcode, Cheatcodes, CheatcodesExecutor, CheatsCtxt, Result, Vm::*}; use alloy_primitives::{Bytes, FixedBytes, TxKind}; -use alloy_sol_types::{Revert, SolError, SolEvent, SolValue}; +use alloy_sol_types::{Revert, SolError, SolValue}; use assertion_executor::{ db::{fork_db::ForkDb, DatabaseCommit, DatabaseRef}, primitives::{ @@ -11,10 +11,7 @@ use assertion_executor::{ ExecutorConfig, }; -use foundry_evm_core::{ - abi::console::ds::Console, - backend::{DatabaseError, DatabaseExt}, -}; +use foundry_evm_core::backend::{DatabaseError, DatabaseExt}; use revm::context_interface::{ContextTr, JournalTr}; use std::{ cmp::max,