11//! Contains various tests related to `forge script`.
22
33use crate :: constants:: TEMPLATE_CONTRACT ;
4- use alloy_primitives:: { hex, Address , Bytes } ;
4+ use alloy_primitives:: { address , hex, Address , Bytes } ;
55use anvil:: { spawn, NodeConfig } ;
66use forge_script_sequence:: ScriptSequence ;
77use foundry_test_utils:: {
@@ -2039,8 +2039,7 @@ forgetest_async!(can_deploy_library_create2_different_sender, |prj, cmd| {
20392039
20402040// <https://github.com/foundry-rs/foundry/issues/8993>
20412041forgetest_async ! ( test_broadcast_raw_create2_deployer, |prj, cmd| {
2042- let ( _api, handle) =
2043- spawn( NodeConfig :: test( ) . with_disable_default_create2_deployer( true ) ) . await ;
2042+ let ( api, handle) = spawn( NodeConfig :: test( ) . with_disable_default_create2_deployer( true ) ) . await ;
20442043
20452044 foundry_test_utils:: util:: initialize( prj. root( ) ) ;
20462045 prj. add_script(
@@ -2051,7 +2050,7 @@ import "forge-std/Script.sol";
20512050contract SimpleScript is Script {
20522051 function run() external {
20532052 // send funds to create2 factory deployer
2054- vm.broadcast ();
2053+ vm.startBroadcast ();
20552054 payable(0x3fAB184622Dc19b6109349B94811493BF2a45362).transfer(10000000 gwei);
20562055 // deploy create2 factory
20572056 vm.broadcastRawTransaction(
@@ -2104,6 +2103,12 @@ ONCHAIN EXECUTION COMPLETE & SUCCESSFUL.
21042103
21052104
21062105"# ] ] ) ;
2106+
2107+ assert!( !api
2108+ . get_code( address!( "4e59b44847b379578588920cA78FbF26c0B4956C" ) , Default :: default ( ) )
2109+ . await
2110+ . unwrap( )
2111+ . is_empty( ) ) ;
21072112} ) ;
21082113
21092114forgetest_init ! ( can_get_script_wallets, |prj, cmd| {
0 commit comments