solana_sdk/
native_loader.rs1use solana_account::{
4 Account, AccountSharedData, InheritableAccountFields, DUMMY_INHERITABLE_ACCOUNT_FIELDS,
5};
6
7crate::declare_id!("NativeLoader1111111111111111111111111111111");
8
9pub fn create_loadable_account_with_fields(
11 name: &str,
12 (lamports, rent_epoch): InheritableAccountFields,
13) -> AccountSharedData {
14 AccountSharedData::from(Account {
15 lamports,
16 owner: id(),
17 data: name.as_bytes().to_vec(),
18 executable: true,
19 rent_epoch,
20 })
21}
22
23pub fn create_loadable_account_for_test(name: &str) -> AccountSharedData {
24 create_loadable_account_with_fields(name, DUMMY_INHERITABLE_ACCOUNT_FIELDS)
25}