@@ -6,7 +6,7 @@ use anvil::{spawn, NodeConfig};
66use forge_script_sequence:: ScriptSequence ;
77use foundry_test_utils:: {
88 rpc,
9- util:: { OutputExt , OTHER_SOLC_VERSION , SOLC_VERSION } ,
9+ util:: { OTHER_SOLC_VERSION , SOLC_VERSION } ,
1010 ScriptOutcome , ScriptTester ,
1111} ;
1212use regex:: Regex ;
@@ -2037,114 +2037,6 @@ forgetest_async!(can_deploy_library_create2_different_sender, |prj, cmd| {
20372037 . await ;
20382038} ) ;
20392039
2040- forgetest_async ! ( test_zk_can_execute_script_with_arguments, |prj, cmd| {
2041- #[ derive( serde:: Deserialize , Debug ) ]
2042- #[ allow( dead_code) ]
2043- struct ZkTransactions {
2044- transactions: Vec <ZkTransaction >,
2045- }
2046-
2047- #[ derive( serde:: Deserialize , Debug ) ]
2048- #[ allow( dead_code) ]
2049- struct ZkTransaction {
2050- zk: Zk ,
2051- }
2052-
2053- #[ derive( serde:: Deserialize , Debug ) ]
2054- #[ serde( rename_all = "camelCase" ) ]
2055- #[ allow( dead_code) ]
2056- struct Zk {
2057- #[ serde( default ) ]
2058- factory_deps: Vec <Vec <u8 >>,
2059- }
2060-
2061- let node = foundry_test_utils:: ZkSyncNode :: start( ) ;
2062-
2063- cmd. args( [ "init" , "--force" ] ) . arg( prj. root( ) ) ;
2064- cmd. assert_success( ) ;
2065- cmd. forge_fuse( ) ;
2066-
2067- prj. add_script(
2068- "Deploy.s.sol" ,
2069- r#"
2070- pragma solidity ^0.8.18;
2071-
2072- import {Script} from "forge-std/Script.sol";
2073-
2074- contract Greeter {
2075- string name;
2076- uint256 age;
2077-
2078- event Greet(string greet);
2079-
2080- function greeting(string memory _name) public returns (string memory) {
2081- name = _name;
2082- string memory greet = string(abi.encodePacked("Hello ", _name));
2083- emit Greet(greet);
2084- return greet;
2085- }
2086-
2087- function setAge(uint256 _age) public {
2088- age = _age;
2089- }
2090-
2091- function getAge() public view returns (uint256) {
2092- return age;
2093- }
2094- }
2095-
2096- contract DeployScript is Script {
2097- Greeter greeter;
2098- string greeting;
2099-
2100- function run() external {
2101- // test is using old Vm.sol interface, so we call manually
2102- address(vm).call(abi.encodeWithSignature("zkVm(bool)", true));
2103-
2104- vm.startBroadcast();
2105- greeter = new Greeter();
2106- greeter.greeting("john");
2107- greeter.setAge(123);
2108- vm.stopBroadcast();
2109- }
2110- }
2111- "# ,
2112- )
2113- . unwrap( ) ;
2114-
2115- cmd. arg( "script" ) . args( [
2116- "--zksync" ,
2117- "DeployScript" ,
2118- "--broadcast" ,
2119- "--private-key" ,
2120- "0x3d3cbc973389cb26f657686445bcc75662b415b656078503592ac8c1abb8810e" ,
2121- "--chain" ,
2122- "260" ,
2123- "--gas-estimate-multiplier" ,
2124- "310" ,
2125- "--rpc-url" ,
2126- node. url( ) . as_str( ) ,
2127- "--slow" ,
2128- "--evm-version" ,
2129- "shanghai" ,
2130- ] ) ;
2131-
2132- cmd. assert_success( )
2133- . get_output( )
2134- . stdout_lossy( )
2135- . contains( "ONCHAIN EXECUTION COMPLETE & SUCCESSFUL" ) ;
2136-
2137- let run_latest = foundry_common:: fs:: json_files( prj. root( ) . join( "broadcast" ) . as_path( ) )
2138- . find( |file| file. ends_with( "run-latest.json" ) )
2139- . expect( "No broadcast artifacts" ) ;
2140-
2141- let content = foundry_common:: fs:: read_to_string( run_latest) . unwrap( ) ;
2142-
2143- let transactions: ZkTransactions = serde_json:: from_str( & content) . unwrap( ) ;
2144- let transactions = transactions. transactions;
2145- assert_eq!( transactions. len( ) , 3 ) ;
2146- } ) ;
2147-
21482040// <https://github.com/foundry-rs/foundry/issues/8993>
21492041forgetest_async ! ( test_broadcast_raw_create2_deployer, |prj, cmd| {
21502042 let ( _api, handle) =
0 commit comments