solana/sdk/src/native_loader.rs

16 lines
420 B
Rust
Raw Normal View History

2020-01-28 16:11:22 -08:00
use crate::{account::Account, hash::Hash};
2018-12-03 13:31:11 -08:00
crate::declare_id!("NativeLoader1111111111111111111111111111111");
2019-02-13 19:43:56 -08:00
/// Create an executable account with the given shared object name.
pub fn create_loadable_account(name: &str) -> Account {
2019-02-13 19:43:56 -08:00
Account {
2019-03-05 16:28:14 -08:00
lamports: 1,
owner: id(),
data: name.as_bytes().to_vec(),
2019-02-13 19:43:56 -08:00
executable: true,
rent_epoch: 0,
2019-09-20 13:21:12 -07:00
hash: Hash::default(),
2019-02-13 19:43:56 -08:00
}
}