1pub mod anchor;
2pub mod errors;
3pub mod id;
4pub mod payer;
5pub mod state;
6
7mod instructions;
8
9pub use id::ID;
10
11use anchor_lang::prelude::*;
12use instructions::*;
13use state::*;
14
15#[program]
16pub mod clockwork_crank {
17 use super::*;
18
19 pub fn config_update(ctx: Context<ConfigUpdate>, settings: ConfigSettings) -> Result<()> {
20 config_update::handler(ctx, settings)
21 }
22
23 pub fn initialize(ctx: Context<Initialize>, worker_pool: Pubkey) -> Result<()> {
24 initialize::handler(ctx, worker_pool)
25 }
26
27 pub fn queue_crank(ctx: Context<QueueCrank>) -> Result<()> {
28 queue_crank::handler(ctx)
29 }
30
31 pub fn queue_create(
32 ctx: Context<QueueCreate>,
33 id: String,
34 kickoff_instruction: InstructionData,
35 trigger: Trigger,
36 ) -> Result<()> {
37 queue_create::handler(ctx, id, kickoff_instruction, trigger)
38 }
39
40 pub fn queue_delete(ctx: Context<QueueDelete>) -> Result<()> {
41 queue_delete::handler(ctx)
42 }
43
44 pub fn queue_pause(ctx: Context<QueuePause>) -> Result<()> {
45 queue_pause::handler(ctx)
46 }
47
48 pub fn queue_resume(ctx: Context<QueueResume>) -> Result<()> {
49 queue_resume::handler(ctx)
50 }
51
52 pub fn queue_update(
53 ctx: Context<QueueUpdate>,
54 kickoff_instruction: Option<InstructionData>,
55 trigger: Option<Trigger>,
56 ) -> Result<()> {
57 queue_update::handler(ctx, kickoff_instruction, trigger)
58 }
59
60 pub fn queue_withdraw(ctx: Context<QueueWithdraw>, amount: u64) -> Result<()> {
61 queue_withdraw::handler(ctx, amount)
62 }
63}