pub fn random() -> Result<Self> {
        let private_key = gen_private_key();
        let public_key = private_key.public_key();
        let address = account_address::from_public_key(&public_key);
        let storage = AccountStorage::new(StorageInstance::new_cache_instance());
        Self::create(private_key.into(), Some(address), "".to_string(), storage)
            .map_err(|e| e.into())
    }
///Generate a random account for test.
Generate a random account for test.
Generate a random account for test .
pub fn random() -> Result<Self> {
        let private_key = gen_private_key();
        let public_key = private_key.public_key();
        let address = account_address::from_public_key(&public_key);
        let storage = AccountStorage::new(StorageInstance::new_cache_instance());
        Self::create(private_key.into(), Some(address), "".to_string(), storage)
            .map_err(|e| e.into())
    }
pub fn random ( ) -> Result < Self > { let private_key = gen_private_key ( ) ; let public_key = private_key . public_key ( ) ; let address = account_address :: from_public_key ( & public_key ) ; let storage = AccountStorage :: new ( StorageInstance :: new_cache_instance ( ) ) ; Self :: create ( private_key . into ( ) , Some ( address ) , " " . to_string ( ) , storage ) . map_err ( | e | e . into ( ) ) }
Generate a random account for test.
Generate a random account for test .