mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-19 07:26:47 +00:00
comments
This commit is contained in:
@@ -18,24 +18,7 @@ use spl_token::state::Mint;
|
||||
|
||||
use crate::utils::{create_pda, AccountDeserialize, Discriminator};
|
||||
|
||||
/// Initialize sets up the Ore program. Its responsibilities include:
|
||||
/// 1. Initialize the 8 bus accounts.
|
||||
/// 2. Initialize the treasury account.
|
||||
/// 3. Initialize the Ore mint account.
|
||||
/// 4. Initialize the mint metadata account.
|
||||
/// 5. Initialize the treasury token account.
|
||||
/// 6. Set the signer as the program admin.
|
||||
///
|
||||
/// Safety requirements:
|
||||
/// - Initialize is a permissionless instruction and can be called by anyone.
|
||||
/// - Can only succeed once for the entire lifetime of the program.
|
||||
/// - Can only succeed if all provided PDAs match their expected values.
|
||||
/// - Can only succeed if provided system program, token program,
|
||||
/// associated token program, metadata program, and rent sysvar are valid.
|
||||
///
|
||||
/// Discussion
|
||||
/// - The signer of this instruction is set as the program admin and the
|
||||
/// upgrade authority of the mint metadata account.
|
||||
/// Initialize sets up the ORE program to begin mining.
|
||||
pub fn process_initialize<'a, 'info>(
|
||||
accounts: &'a [AccountInfo<'info>],
|
||||
data: &[u8],
|
||||
|
||||
Reference in New Issue
Block a user