Trait clockwork_sdk::state::ThreadAccount
source · pub trait ThreadAccount {
fn pubkey(&self) -> Pubkey;
fn init(
&mut self,
authority: Pubkey,
id: String,
kickoff_instruction: InstructionData,
trigger: Trigger
) -> Result<(), Error>;
fn exec(
&mut self,
account_infos: &[AccountInfo<'_>],
bump: u8,
fee: &mut Account<'_, Fee>,
penalty: &mut Account<'_, Penalty>,
pool: &Account<'_, Pool>,
signatory: &mut Signer<'_>,
worker: &Account<'_, Worker>
) -> Result<(), Error>;
fn kickoff(
&mut self,
remaining_accounts: &[AccountInfo<'_>]
) -> Result<(), Error>;
fn realloc(&mut self) -> Result<(), Error>;
fn update(&mut self, settings: ThreadSettings) -> Result<(), Error>;
}Expand description
Trait for reading and writing to a thread account.
Required Methods§
sourcefn init(
&mut self,
authority: Pubkey,
id: String,
kickoff_instruction: InstructionData,
trigger: Trigger
) -> Result<(), Error>
fn init(
&mut self,
authority: Pubkey,
id: String,
kickoff_instruction: InstructionData,
trigger: Trigger
) -> Result<(), Error>
Initialize the account to hold thread object.
sourcefn exec(
&mut self,
account_infos: &[AccountInfo<'_>],
bump: u8,
fee: &mut Account<'_, Fee>,
penalty: &mut Account<'_, Penalty>,
pool: &Account<'_, Pool>,
signatory: &mut Signer<'_>,
worker: &Account<'_, Worker>
) -> Result<(), Error>
fn exec(
&mut self,
account_infos: &[AccountInfo<'_>],
bump: u8,
fee: &mut Account<'_, Fee>,
penalty: &mut Account<'_, Penalty>,
pool: &Account<'_, Pool>,
signatory: &mut Signer<'_>,
worker: &Account<'_, Worker>
) -> Result<(), Error>
Execute the next instruction on the thread.