pub fn output_signed_updates() {
        let t = async {
            let signer: ethers::signers::LocalWallet =
                "1111111111111111111111111111111111111111111111111111111111111111"
                    .parse()
                    .unwrap();

            let mut test_cases: Vec<Value> = Vec::new();

            // test suite
            for i in 1..=3 {
                let signed_update = Update {
                    home_domain: 1000,
                    new_root: H256::repeat_byte(i + 1),
                    previous_root: H256::repeat_byte(i),
                }
                .sign_with(&signer)
                .await
                .expect("!sign_with");

                test_cases.push(json!({
                    "homeDomain": signed_update.update.home_domain,
                    "oldRoot": signed_update.update.previous_root,
                    "newRoot": signed_update.update.new_root,
                    "signature": signed_update.signature,
                    "signer": signer.address(),
                }))
            }

            let json = json!(test_cases).to_string();

            let mut file = OpenOptions::new()
                .write(true)
                .create(true)
                .truncate(true)
                .open(find_vector("signedUpdate.json"))
                .expect("Failed to open/create file");

            file.write_all(json.as_bytes())
                .expect("Failed to write to file");
        };

        tokio::runtime::Builder::new_current_thread()
            .enable_all()
            .build()
            .unwrap()
            .block_on(t)
    }
/// Outputs signed update test cases in /vector/signedUpdate.json
Outputs signed update test cases in /vector/signedUpdate.json
Outputs signed update test cases in / vector / signedUpdate . json
pub fn output_signed_updates() {
        let t = async {
            let signer: ethers::signers::LocalWallet =
                "1111111111111111111111111111111111111111111111111111111111111111"
                    .parse()
                    .unwrap();
            let mut test_cases: Vec<Value> = Vec::new();
            // test suite
            for i in 1..=3 {
                let signed_update = Update {
                    home_domain: 1000,
                    new_root: H256::repeat_byte(i + 1),
                    previous_root: H256::repeat_byte(i),
                }
                .sign_with(&signer)
                .await
                .expect("!sign_with");
                test_cases.push(json!({
                    "homeDomain": signed_update.update.home_domain,
                    "oldRoot": signed_update.update.previous_root,
                    "newRoot": signed_update.update.new_root,
                    "signature": signed_update.signature,
                    "signer": signer.address(),
                }))
            }
            let json = json!(test_cases).to_string();
            let mut file = OpenOptions::new()
                .write(true)
                .create(true)
                .truncate(true)
                .open(find_vector("signedUpdate.json"))
                .expect("Failed to open/create file");
            file.write_all(json.as_bytes())
                .expect("Failed to write to file");
        };
        tokio::runtime::Builder::new_current_thread()
            .enable_all()
            .build()
            .unwrap()
            .block_on(t)
    }
pub fn output_signed_updates ( ) { let t = async { let signer : ethers :: signers :: LocalWallet = " " . parse ( ) . unwrap ( ) ; let mut test_cases : Vec < Value > = Vec :: new ( ) ; // test suite for i in 1 ..= 3 { let signed_update = Update { home_domain : 1000 , new_root : H256 :: repeat_byte ( i + 1 ) , previous_root : H256 :: repeat_byte ( i ) , } . sign_with ( & signer ) . await . expect ( " " ) ; test_cases . push ( json ! ( { " " signed_update update home_domain " " signed_update update previous_root " " signed_update update new_root " " signed_update signature " " signer address ( ) } ) ) } let json = json ! ( test_cases ) . to_string ( ) ; let mut file = OpenOptions :: new ( ) . write ( true ) . create ( true ) . truncate ( true ) . open ( find_vector ( " " ) ) . expect ( " " ) ; file . write_all ( json . as_bytes ( ) ) . expect ( " " ) ; } ; tokio :: runtime :: Builder :: new_current_thread ( ) . enable_all ( ) . build ( ) . unwrap ( ) . block_on ( t ) }
Outputs signed update test cases in /vector/signedUpdate.json
Outputs signed update test cases in / vector / signedUpdate . json