fn create_receiver_account(
    home: &Home,
    client: &BlockingClient,
    factory: &TransactionFactory,
) -> Result<LocalAccount> {
    let mut treasury_account = account::get_treasury_account(client, home.get_root_key_path());
    let receiver_account_key = generate_key::load_key(home.get_test_key_path());
    let public_key = receiver_account_key.public_key();
    let address = AuthenticationKey::ed25519(&public_key).derived_address();
    let receiver_account = LocalAccount::new(address, receiver_account_key, 0);
    account::create_account_onchain(&mut treasury_account, &receiver_account, factory, client)?;

    Ok(receiver_account)
}
// Set up a new test account
Set up a new test account
Set up a new test account
fn create_receiver_account(
    home: &Home,
    client: &BlockingClient,
    factory: &TransactionFactory,
) -> Result<LocalAccount> {
    let mut treasury_account = account::get_treasury_account(client, home.get_root_key_path());
    let receiver_account_key = generate_key::load_key(home.get_test_key_path());
    let public_key = receiver_account_key.public_key();
    let address = AuthenticationKey::ed25519(&public_key).derived_address();
    let receiver_account = LocalAccount::new(address, receiver_account_key, 0);
    account::create_account_onchain(&mut treasury_account, &receiver_account, factory, client)?;
    Ok(receiver_account)
}
fn create_receiver_account ( home : & Home , client : & BlockingClient , factory : & TransactionFactory , ) -> Result < LocalAccount > { let mut treasury_account = account :: get_treasury_account ( client , home . get_root_key_path ( ) ) ; let receiver_account_key = generate_key :: load_key ( home . get_test_key_path ( ) ) ; let public_key = receiver_account_key . public_key ( ) ; let address = AuthenticationKey :: ed25519 ( & public_key ) . derived_address ( ) ; let receiver_account = LocalAccount :: new ( address , receiver_account_key , 0 ) ; account :: create_account_onchain ( & mut treasury_account , & receiver_account , factory , client ) ? ; Ok ( receiver_account ) }
Set up a new test account
Set up a new test account
home
&Home
client
&BlockingClient
factory
&TransactionFactory
home
&Home
client
&BlockingClient
factory
&TransactionFactory