fn franklin_txs() -> Vec<SignedFranklinTx> {
    let transfer_1 = Transfer::new(
        42,
        Address::random(),
        Address::random(),
        0,
        100u32.into(),
        10u32.into(),
        10,
        None,
    );

    let transfer_2 = Transfer::new(
        4242,
        Address::random(),
        Address::random(),
        0,
        500u32.into(),
        20u32.into(),
        11,
        None,
    );

    let withdraw = Withdraw::new(
        33,
        Address::random(),
        Address::random(),
        0,
        100u32.into(),
        10u32.into(),
        12,
        None,
    );

    let change_pubkey = ChangePubKey {
        account_id: 123,
        account: Address::random(),
        new_pk_hash: Default::default(),
        nonce: 13,
        eth_signature: None,
    };

    let txs = [
        FranklinTx::Transfer(Box::new(transfer_1)),
        FranklinTx::Transfer(Box::new(transfer_2)),
        FranklinTx::Withdraw(Box::new(withdraw)),
        FranklinTx::ChangePubKey(Box::new(change_pubkey)),
    ];

    let mut rng = XorShiftRng::from_seed([1, 2, 3, 4]);

    txs.iter()
        .map(|tx| {
            let test_message = format!("test message {}", rng.gen::<u32>());

            SignedFranklinTx {
                tx: tx.clone(),
                eth_sign_data: Some(get_eth_sing_data(test_message)),
            }
        })
        .collect()
}
/// Generates several different `SignedFranlinTx` objects.
Generates several different `SignedFranlinTx` objects.
Generates several different ` SignedFranlinTx ` objects .
fn franklin_txs() -> Vec<SignedFranklinTx> {
    let transfer_1 = Transfer::new(
        42,
        Address::random(),
        Address::random(),
        0,
        100u32.into(),
        10u32.into(),
        10,
        None,
    );
    let transfer_2 = Transfer::new(
        4242,
        Address::random(),
        Address::random(),
        0,
        500u32.into(),
        20u32.into(),
        11,
        None,
    );
    let withdraw = Withdraw::new(
        33,
        Address::random(),
        Address::random(),
        0,
        100u32.into(),
        10u32.into(),
        12,
        None,
    );
    let change_pubkey = ChangePubKey {
        account_id: 123,
        account: Address::random(),
        new_pk_hash: Default::default(),
        nonce: 13,
        eth_signature: None,
    };
    let txs = [
        FranklinTx::Transfer(Box::new(transfer_1)),
        FranklinTx::Transfer(Box::new(transfer_2)),
        FranklinTx::Withdraw(Box::new(withdraw)),
        FranklinTx::ChangePubKey(Box::new(change_pubkey)),
    ];
    let mut rng = XorShiftRng::from_seed([1, 2, 3, 4]);
    txs.iter()
        .map(|tx| {
            let test_message = format!("test message {}", rng.gen::<u32>());
            SignedFranklinTx {
                tx: tx.clone(),
                eth_sign_data: Some(get_eth_sing_data(test_message)),
            }
        })
        .collect()
}
fn franklin_txs ( ) -> Vec < SignedFranklinTx > { let transfer_1 = Transfer :: new ( 42 , Address :: random ( ) , Address :: random ( ) , 0 , 100u32 . into ( ) , 10u32 . into ( ) , 10 , None , ) ; let transfer_2 = Transfer :: new ( 4242 , Address :: random ( ) , Address :: random ( ) , 0 , 500u32 . into ( ) , 20u32 . into ( ) , 11 , None , ) ; let withdraw = Withdraw :: new ( 33 , Address :: random ( ) , Address :: random ( ) , 0 , 100u32 . into ( ) , 10u32 . into ( ) , 12 , None , ) ; let change_pubkey = ChangePubKey { account_id : 123 , account : Address :: random ( ) , new_pk_hash : Default :: default ( ) , nonce : 13 , eth_signature : None , } ; let txs = [ FranklinTx :: Transfer ( Box :: new ( transfer_1 ) ) , FranklinTx :: Transfer ( Box :: new ( transfer_2 ) ) , FranklinTx :: Withdraw ( Box :: new ( withdraw ) ) , FranklinTx :: ChangePubKey ( Box :: new ( change_pubkey ) ) , ] ; let mut rng = XorShiftRng :: from_seed ( [ 1 , 2 , 3 , 4 ] ) ; txs . iter ( ) . map ( | tx | { let test_message = format ! ( " " rng gen u32 ( ) ) ; SignedFranklinTx { tx : tx . clone ( ) , eth_sign_data : Some ( get_eth_sing_data ( test_message ) ) , } } ) . collect ( ) }
Generates several different `SignedFranlinTx` objects.
Generates several different ` SignedFranlinTx ` objects .