Files
solana/sdk/src/native_loader.rs
Ryo Onodera 164b7895b3 Tiny add_native_program bug fixes with cleanups (#14042)
* Tiny add_native_program bug fixes with cleanups

* Fix typo
2020-12-11 11:03:31 +09:00

15 lines
387 B
Rust

use crate::account::Account;
crate::declare_id!("NativeLoader1111111111111111111111111111111");
/// Create an executable account with the given shared object name.
pub fn create_loadable_account(name: &str, lamports: u64) -> Account {
Account {
lamports,
owner: id(),
data: name.as_bytes().to_vec(),
executable: true,
rent_epoch: 0,
}
}