Skip to content

Commit e545cdf

Browse files
committed
add some more doc comments
1 parent 9b69cbd commit e545cdf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

builtins/src/prototype.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
1+
//! Prototype layouts for builtins.
2+
13
use {
24
crate::core_bpf_migration::CoreBpfMigrationConfig,
35
solana_program_runtime::invoke_context::BuiltinFunctionWithContext, solana_pubkey::Pubkey,
46
};
57

68
/// Transitions of built-in programs at epoch boundaries when features are activated.
79
pub struct BuiltinPrototype {
10+
/// Configurations for migrating the builtin to Core BPF.
811
pub core_bpf_migration_config: Option<CoreBpfMigrationConfig>,
12+
/// Feature ID that enables the builtin program.
13+
/// If None, the built-in program is always enabled.
914
pub enable_feature_id: Option<Pubkey>,
15+
/// The program's ID.
1016
pub program_id: Pubkey,
17+
/// The program's name, ie "system_program".
1118
pub name: &'static str,
19+
/// The program's entrypoint function.
1220
pub entrypoint: BuiltinFunctionWithContext,
1321
}
1422

@@ -29,7 +37,10 @@ impl std::fmt::Debug for BuiltinPrototype {
2937
/// is reserved.
3038
#[derive(Debug)]
3139
pub struct StatelessBuiltinPrototype {
40+
/// Configurations for migrating the stateless builtin to Core BPF.
3241
pub core_bpf_migration_config: Option<CoreBpfMigrationConfig>,
42+
/// The program's ID.
3343
pub program_id: Pubkey,
44+
/// The program's name, ie "feature_gate_program".
3445
pub name: &'static str,
3546
}

0 commit comments

Comments
 (0)