From ff6298e47c82bd702f265a277d25c058f40f04fb Mon Sep 17 00:00:00 2001 From: 0xpanoramix Date: Tue, 18 Mar 2025 15:34:25 +0100 Subject: [PATCH 1/5] feat(forge/script): decode execution traces when --json is enabled Signed-off-by: 0xpanoramix --- crates/script/src/execute.rs | 26 ++++++++++++++++++++++---- crates/script/src/lib.rs | 2 +- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/crates/script/src/execute.rs b/crates/script/src/execute.rs index 863044f548b0e..3f108bf552577 100644 --- a/crates/script/src/execute.rs +++ b/crates/script/src/execute.rs @@ -186,8 +186,8 @@ impl PreExecutionState { if let Some(txs) = transactions { // If the user passed a `--sender` don't check anything. - if self.build_data.predeploy_libraries.libraries_count() > 0 && - self.args.evm.sender.is_none() + if self.build_data.predeploy_libraries.libraries_count() > 0 + && self.args.evm.sender.is_none() { for tx in txs.iter() { if tx.transaction.to().is_none() { @@ -386,13 +386,31 @@ impl ExecutedState { } impl PreSimulationState { - pub fn show_json(&self) -> Result<()> { + pub async fn show_json(&self) -> Result<()> { let result = &self.execution_result; + let decoder = &self.execution_artifacts.decoder; + let mut traces = result.traces.clone(); + + for (_, trace) in &mut traces { + decode_trace_arena(trace, decoder).await?; + } + + let result_with_decoded_traces = &ScriptResult { + success: result.success, + gas_used: result.gas_used, + logs: result.logs.clone(), + traces, + labeled_addresses: result.labeled_addresses.clone(), + returned: result.returned.clone(), + transactions: result.transactions.clone(), + breakpoints: result.breakpoints.clone(), + address: result.address, + }; let json_result = JsonResult { logs: decode_console_logs(&result.logs), returns: &self.execution_artifacts.returns, - result, + result: result_with_decoded_traces, }; let json = serde_json::to_string(&json_result)?; sh_println!("{json}")?; diff --git a/crates/script/src/lib.rs b/crates/script/src/lib.rs index 60a68990bbdf7..6d573fdf8e5a6 100644 --- a/crates/script/src/lib.rs +++ b/crates/script/src/lib.rs @@ -266,7 +266,7 @@ impl ScriptArgs { } if shell::is_json() { - pre_simulation.show_json()?; + pre_simulation.show_json().await?; } else { pre_simulation.show_traces().await?; } From 1f7284afd1a4887edc6059e3004e2f32c739479e Mon Sep 17 00:00:00 2001 From: 0xpanoramix Date: Tue, 18 Mar 2025 15:36:20 +0100 Subject: [PATCH 2/5] test(forge/script): update CLI test to match new emitted fields Signed-off-by: 0xpanoramix --- crates/forge/tests/cli/script.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/forge/tests/cli/script.rs b/crates/forge/tests/cli/script.rs index 465d3db337590..a6511f9ec7260 100644 --- a/crates/forge/tests/cli/script.rs +++ b/crates/forge/tests/cli/script.rs @@ -1952,9 +1952,9 @@ contract SimpleScript is Script { ]) .assert_success() .stdout_eq(str![[r#" -{"logs":[],"returns":{"success":{"internal_type":"bool","value":"true"}},"success":true,"raw_logs":[],"traces":[["Deployment",{"arena":[{"parent":null,"children":[],"idx":0,"trace":{"depth":0,"success":true,"caller":"0x1804c8ab1f12e6bbf3894d4083f33e07309d1f38","address":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","maybe_precompile":false,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CREATE","value":"0x0","data":"[..]","output":"[..]","gas_used":"{...}","gas_limit":"{...}","status":"Return","steps":[],"decoded":{"label":null,"return_data":null,"call_data":null}},"logs":[],"ordering":[]}]}],["Execution",{"arena":[{"parent":null,"children":[1,2],"idx":0,"trace":{"depth":0,"success":true,"caller":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","address":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc0406226","output":"0x0000000000000000000000000000000000000000000000000000000000000001","gas_used":"{...}","gas_limit":1073720760,"status":"Return","steps":[],"decoded":{"label":null,"return_data":null,"call_data":null}},"logs":[],"ordering":[{"Call":0},{"Call":1}]},{"parent":0,"children":[],"idx":1,"trace":{"depth":1,"success":true,"caller":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x7fb5297f","output":"0x","gas_used":"{...}","gas_limit":1056940994,"status":"Return","steps":[],"decoded":{"label":null,"return_data":null,"call_data":null}},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":2,"trace":{"depth":1,"success":true,"caller":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","address":"0x0000000000000000000000000000000000000000","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x","output":"0x","gas_used":"{...}","gas_limit":1056940645,"status":"Stop","steps":[],"decoded":{"label":null,"return_data":null,"call_data":null}},"logs":[],"ordering":[]}]}]],"gas_used":"{...}","labeled_addresses":{},"returned":"0x0000000000000000000000000000000000000000000000000000000000000001","address":null} -{"chain":31337,"estimated_gas_price":"{...}","estimated_total_gas_used":"{...}","estimated_amount_required":"{...}","token_symbol":"ETH"} -{"chain":"anvil-hardhat","status":"success","tx_hash":"0x4f78afe915fceb282c7625a68eb350bc0bf78acb59ad893e5c62b710a37f3156","contract_address":null,"block_number":1,"gas_used":"{...}","gas_price":"{...}"} +{"logs":[],"returns":{"success":{"internal_type":"bool","value":"true"}},"success":true,"raw_logs":[],"traces":[["Deployment",{"arena":[{"parent":null,"children":[],"idx":0,"trace":{"depth":0,"success":true,"caller":"0x1804c8ab1f12e6bbf3894d4083f33e07309d1f38","address":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","maybe_precompile":false,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CREATE","value":"0x0","data":"0x60806040526001600c5f6101000a81548160ff0219169083151502179055506001600c60026101000a81548160ff0219169083151502179055503480156043575f5ffd5b50610219806100515f395ff3fe608060405234801561000f575f5ffd5b5060043610610034575f3560e01c8063c040622614610038578063f8ccbf4714610056575b5f5ffd5b610040610074565b60405161004d9190610189565b60405180910390f35b61005e61015c565b60405161006b9190610189565b60405180910390f35b5f7f885cb69240a935d632d79c317109709ecfa91a80626ff3989d68f67f5b1dd12d5f1c73ffffffffffffffffffffffffffffffffffffffff16637fb5297f6040518163ffffffff1660e01b81526004015f604051808303815f87803b1580156100dc575f5ffd5b505af11580156100ee573d5f5f3e3d5ffd5b505050505f73ffffffffffffffffffffffffffffffffffffffff16604051610115906101cf565b5f604051808303815f865af19150503d805f811461014e576040519150601f19603f3d011682016040523d82523d5f602084013e610153565b606091505b50508091505090565b600c60029054906101000a900460ff1681565b5f8115159050919050565b6101838161016f565b82525050565b5f60208201905061019c5f83018461017a565b92915050565b5f81905092915050565b50565b5f6101ba5f836101a2565b91506101c5826101ac565b5f82019050919050565b5f6101d9826101af565b915081905091905056fea264697066735822122061eb8616793029b32224e73d5ea7addb666434a6b82772371046d079e796c69864736f6c634300081b0033","output":"0x608060405234801561000f575f5ffd5b5060043610610034575f3560e01c8063c040622614610038578063f8ccbf4714610056575b5f5ffd5b610040610074565b60405161004d9190610189565b60405180910390f35b61005e61015c565b60405161006b9190610189565b60405180910390f35b5f7f885cb69240a935d632d79c317109709ecfa91a80626ff3989d68f67f5b1dd12d5f1c73ffffffffffffffffffffffffffffffffffffffff16637fb5297f6040518163ffffffff1660e01b81526004015f604051808303815f87803b1580156100dc575f5ffd5b505af11580156100ee573d5f5f3e3d5ffd5b505050505f73ffffffffffffffffffffffffffffffffffffffff16604051610115906101cf565b5f604051808303815f865af19150503d805f811461014e576040519150601f19603f3d011682016040523d82523d5f602084013e610153565b606091505b50508091505090565b600c60029054906101000a900460ff1681565b5f8115159050919050565b6101838161016f565b82525050565b5f60208201905061019c5f83018461017a565b92915050565b5f81905092915050565b50565b5f6101ba5f836101a2565b91506101c5826101ac565b5f82019050919050565b5f6101d9826101af565b915081905091905056fea264697066735822122061eb8616793029b32224e73d5ea7addb666434a6b82772371046d079e796c69864736f6c634300081b0033","gas_used":130034,"gas_limit":1073679100,"status":"Return","steps":[],"decoded":{"label":"SimpleScript","return_data":null,"call_data":null}},"logs":[],"ordering":[]}]}],["Execution",{"arena":[{"parent":null,"children":[1,2],"idx":0,"trace":{"depth":0,"success":true,"caller":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","address":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc0406226","output":"0x0000000000000000000000000000000000000000000000000000000000000001","gas_used":3525,"gas_limit":1073720760,"status":"Return","steps":[],"decoded":{"label":"SimpleScript","return_data":"true","call_data":{"signature":"run()","args":[]}}},"logs":[],"ordering":[{"Call":0},{"Call":1}]},{"parent":0,"children":[],"idx":1,"trace":{"depth":1,"success":true,"caller":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x7fb5297f","output":"0x","gas_used":0,"gas_limit":1056940994,"status":"Return","steps":[],"decoded":{"label":"VM","return_data":null,"call_data":{"signature":"startBroadcast()","args":[]}}},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":2,"trace":{"depth":1,"success":true,"caller":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","address":"0x0000000000000000000000000000000000000000","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x","output":"0x","gas_used":0,"gas_limit":1056940645,"status":"Stop","steps":[],"decoded":{"label":null,"return_data":null,"call_data":{"signature":"fallback()","args":[]}}},"logs":[],"ordering":[]}]}]],"gas_used":24589,"labeled_addresses":{},"returned":"0x0000000000000000000000000000000000000000000000000000000000000001","address":null} +{"chain":31337,"estimated_gas_price":"2.000000001","estimated_total_gas_used":29005,"estimated_amount_required":"0.000058010000029005","token_symbol":"ETH"} +{"chain":"anvil-hardhat","status":"success","tx_hash":"0x4f78afe915fceb282c7625a68eb350bc0bf78acb59ad893e5c62b710a37f3156","contract_address":null,"block_number":1,"gas_used":21000,"gas_price":1000000001} {"status":"success","transactions":"[..]/broadcast/Foo.sol/31337/run-latest.json","sensitive":"[..]/cache/Foo.sol/31337/run-latest.json"} "#]].is_jsonlines()); From 1ecc58aa2e1892133b6282ce60579b1412c53db2 Mon Sep 17 00:00:00 2001 From: 0xpanoramix Date: Tue, 18 Mar 2025 15:51:27 +0100 Subject: [PATCH 3/5] test(forge/script): remove expanded fields from test expected output Signed-off-by: 0xpanoramix --- crates/forge/tests/cli/script.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/forge/tests/cli/script.rs b/crates/forge/tests/cli/script.rs index a6511f9ec7260..ceeb2192593a7 100644 --- a/crates/forge/tests/cli/script.rs +++ b/crates/forge/tests/cli/script.rs @@ -1952,12 +1952,12 @@ contract SimpleScript is Script { ]) .assert_success() .stdout_eq(str![[r#" -{"logs":[],"returns":{"success":{"internal_type":"bool","value":"true"}},"success":true,"raw_logs":[],"traces":[["Deployment",{"arena":[{"parent":null,"children":[],"idx":0,"trace":{"depth":0,"success":true,"caller":"0x1804c8ab1f12e6bbf3894d4083f33e07309d1f38","address":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","maybe_precompile":false,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CREATE","value":"0x0","data":"0x60806040526001600c5f6101000a81548160ff0219169083151502179055506001600c60026101000a81548160ff0219169083151502179055503480156043575f5ffd5b50610219806100515f395ff3fe608060405234801561000f575f5ffd5b5060043610610034575f3560e01c8063c040622614610038578063f8ccbf4714610056575b5f5ffd5b610040610074565b60405161004d9190610189565b60405180910390f35b61005e61015c565b60405161006b9190610189565b60405180910390f35b5f7f885cb69240a935d632d79c317109709ecfa91a80626ff3989d68f67f5b1dd12d5f1c73ffffffffffffffffffffffffffffffffffffffff16637fb5297f6040518163ffffffff1660e01b81526004015f604051808303815f87803b1580156100dc575f5ffd5b505af11580156100ee573d5f5f3e3d5ffd5b505050505f73ffffffffffffffffffffffffffffffffffffffff16604051610115906101cf565b5f604051808303815f865af19150503d805f811461014e576040519150601f19603f3d011682016040523d82523d5f602084013e610153565b606091505b50508091505090565b600c60029054906101000a900460ff1681565b5f8115159050919050565b6101838161016f565b82525050565b5f60208201905061019c5f83018461017a565b92915050565b5f81905092915050565b50565b5f6101ba5f836101a2565b91506101c5826101ac565b5f82019050919050565b5f6101d9826101af565b915081905091905056fea264697066735822122061eb8616793029b32224e73d5ea7addb666434a6b82772371046d079e796c69864736f6c634300081b0033","output":"0x608060405234801561000f575f5ffd5b5060043610610034575f3560e01c8063c040622614610038578063f8ccbf4714610056575b5f5ffd5b610040610074565b60405161004d9190610189565b60405180910390f35b61005e61015c565b60405161006b9190610189565b60405180910390f35b5f7f885cb69240a935d632d79c317109709ecfa91a80626ff3989d68f67f5b1dd12d5f1c73ffffffffffffffffffffffffffffffffffffffff16637fb5297f6040518163ffffffff1660e01b81526004015f604051808303815f87803b1580156100dc575f5ffd5b505af11580156100ee573d5f5f3e3d5ffd5b505050505f73ffffffffffffffffffffffffffffffffffffffff16604051610115906101cf565b5f604051808303815f865af19150503d805f811461014e576040519150601f19603f3d011682016040523d82523d5f602084013e610153565b606091505b50508091505090565b600c60029054906101000a900460ff1681565b5f8115159050919050565b6101838161016f565b82525050565b5f60208201905061019c5f83018461017a565b92915050565b5f81905092915050565b50565b5f6101ba5f836101a2565b91506101c5826101ac565b5f82019050919050565b5f6101d9826101af565b915081905091905056fea264697066735822122061eb8616793029b32224e73d5ea7addb666434a6b82772371046d079e796c69864736f6c634300081b0033","gas_used":130034,"gas_limit":1073679100,"status":"Return","steps":[],"decoded":{"label":"SimpleScript","return_data":null,"call_data":null}},"logs":[],"ordering":[]}]}],["Execution",{"arena":[{"parent":null,"children":[1,2],"idx":0,"trace":{"depth":0,"success":true,"caller":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","address":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc0406226","output":"0x0000000000000000000000000000000000000000000000000000000000000001","gas_used":3525,"gas_limit":1073720760,"status":"Return","steps":[],"decoded":{"label":"SimpleScript","return_data":"true","call_data":{"signature":"run()","args":[]}}},"logs":[],"ordering":[{"Call":0},{"Call":1}]},{"parent":0,"children":[],"idx":1,"trace":{"depth":1,"success":true,"caller":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x7fb5297f","output":"0x","gas_used":0,"gas_limit":1056940994,"status":"Return","steps":[],"decoded":{"label":"VM","return_data":null,"call_data":{"signature":"startBroadcast()","args":[]}}},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":2,"trace":{"depth":1,"success":true,"caller":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","address":"0x0000000000000000000000000000000000000000","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x","output":"0x","gas_used":0,"gas_limit":1056940645,"status":"Stop","steps":[],"decoded":{"label":null,"return_data":null,"call_data":{"signature":"fallback()","args":[]}}},"logs":[],"ordering":[]}]}]],"gas_used":24589,"labeled_addresses":{},"returned":"0x0000000000000000000000000000000000000000000000000000000000000001","address":null} -{"chain":31337,"estimated_gas_price":"2.000000001","estimated_total_gas_used":29005,"estimated_amount_required":"0.000058010000029005","token_symbol":"ETH"} -{"chain":"anvil-hardhat","status":"success","tx_hash":"0x4f78afe915fceb282c7625a68eb350bc0bf78acb59ad893e5c62b710a37f3156","contract_address":null,"block_number":1,"gas_used":21000,"gas_price":1000000001} +{"logs":[],"returns":{"success":{"internal_type":"bool","value":"true"}},"success":true,"raw_logs":[],"traces":[["Deployment",{"arena":[{"parent":null,"children":[],"idx":0,"trace":{"depth":0,"success":true,"caller":"0x1804c8ab1f12e6bbf3894d4083f33e07309d1f38","address":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","maybe_precompile":false,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CREATE","value":"0x0","data":"[..]","output":"[..]","gas_used":"{...}","gas_limit":"{...}","status":"Return","steps":[],"decoded":{"label":"SimpleScript","return_data":null,"call_data":null}},"logs":[],"ordering":[]}]}],["Execution",{"arena":[{"parent":null,"children":[1,2],"idx":0,"trace":{"depth":0,"success":true,"caller":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","address":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc0406226","output":"0x0000000000000000000000000000000000000000000000000000000000000001","gas_used":"{...}","gas_limit":1073720760,"status":"Return","steps":[],"decoded":{"label":"SimpleScript","return_data":"true","call_data":{"signature":"run()","args":[]}}},"logs":[],"ordering":[{"Call":0},{"Call":1}]},{"parent":0,"children":[],"idx":1,"trace":{"depth":1,"success":true,"caller":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x7fb5297f","output":"0x","gas_used":"{...}","gas_limit":1056940994,"status":"Return","steps":[],"decoded":{"label":"VM","return_data":null,"call_data":{"signature":"startBroadcast()","args":[]}}},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":2,"trace":{"depth":1,"success":true,"caller":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","address":"0x0000000000000000000000000000000000000000","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x","output":"0x","gas_used":"{...}","gas_limit":1056940645,"status":"Stop","steps":[],"decoded":{"label":null,"return_data":null,"call_data":{"signature":"fallback()","args":[]}}},"logs":[],"ordering":[]}]}]],"gas_used":"{...}","labeled_addresses":{},"returned":"0x0000000000000000000000000000000000000000000000000000000000000001","address":null} +{"chain":31337,"estimated_gas_price":"{...}","estimated_total_gas_used":"{...}","estimated_amount_required":"{...}","token_symbol":"ETH"} +{"chain":"anvil-hardhat","status":"success","tx_hash":"0x4f78afe915fceb282c7625a68eb350bc0bf78acb59ad893e5c62b710a37f3156","contract_address":null,"block_number":1,"gas_used":"{...}","gas_price":"{...}"} {"status":"success","transactions":"[..]/broadcast/Foo.sol/31337/run-latest.json","sensitive":"[..]/cache/Foo.sol/31337/run-latest.json"} -"#]].is_jsonlines()); + "#]].is_jsonlines()); }); // https://github.com/foundry-rs/foundry/pull/7742 From a1fd705c44a658cd038117d5cfe0aa48cb5ad5aa Mon Sep 17 00:00:00 2001 From: 0xpanoramix Date: Tue, 18 Mar 2025 15:52:10 +0100 Subject: [PATCH 4/5] style(forge/script): fix typo Signed-off-by: 0xpanoramix --- crates/forge/tests/cli/script.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/forge/tests/cli/script.rs b/crates/forge/tests/cli/script.rs index ceeb2192593a7..21f7fe7ab282c 100644 --- a/crates/forge/tests/cli/script.rs +++ b/crates/forge/tests/cli/script.rs @@ -1957,7 +1957,7 @@ contract SimpleScript is Script { {"chain":"anvil-hardhat","status":"success","tx_hash":"0x4f78afe915fceb282c7625a68eb350bc0bf78acb59ad893e5c62b710a37f3156","contract_address":null,"block_number":1,"gas_used":"{...}","gas_price":"{...}"} {"status":"success","transactions":"[..]/broadcast/Foo.sol/31337/run-latest.json","sensitive":"[..]/cache/Foo.sol/31337/run-latest.json"} - "#]].is_jsonlines()); +"#]].is_jsonlines()); }); // https://github.com/foundry-rs/foundry/pull/7742 From 152671098ff9c4527995f99549c7412812f17d4d Mon Sep 17 00:00:00 2001 From: 0xpanoramix Date: Tue, 18 Mar 2025 16:53:26 +0100 Subject: [PATCH 5/5] style(forge/script): revert style changes Signed-off-by: 0xpanoramix --- crates/script/src/execute.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/script/src/execute.rs b/crates/script/src/execute.rs index 3f108bf552577..8d5bea0abb77c 100644 --- a/crates/script/src/execute.rs +++ b/crates/script/src/execute.rs @@ -186,8 +186,8 @@ impl PreExecutionState { if let Some(txs) = transactions { // If the user passed a `--sender` don't check anything. - if self.build_data.predeploy_libraries.libraries_count() > 0 - && self.args.evm.sender.is_none() + if self.build_data.predeploy_libraries.libraries_count() > 0 && + self.args.evm.sender.is_none() { for tx in txs.iter() { if tx.transaction.to().is_none() {