1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
pub mod errors;
pub mod id;
pub mod state;

mod instructions;

pub use id::ID;

use anchor_lang::prelude::*;
use clockwork_scheduler::response::TaskResponse;
use instructions::*;

#[program]
pub mod clockwork_network {

    use super::*;

    pub fn entry_close(ctx: Context<EntryClose>) -> Result<TaskResponse> {
        entry_close::handler(ctx)
    }

    pub fn initialize<'info>(ctx: Context<'_, '_, '_, 'info, Initialize<'info>>) -> Result<()> {
        initialize::handler(ctx)
    }

    pub fn rotator_turn(ctx: Context<RotatorTurn>) -> Result<()> {
        rotator_turn::handler(ctx)
    }

    pub fn node_register<'info>(
        ctx: Context<'_, '_, '_, 'info, NodeRegister<'info>>,
    ) -> Result<()> {
        node_register::handler(ctx)
    }

    pub fn node_stake(ctx: Context<NodeStake>, amount: u64) -> Result<()> {
        node_stake::handler(ctx, amount)
    }

    pub fn snapshot_capture(ctx: Context<SnapshotCapture>) -> Result<TaskResponse> {
        snapshot_capture::handler(ctx)
    }

    pub fn snapshot_close(ctx: Context<SnapshotClose>) -> Result<TaskResponse> {
        snapshot_close::handler(ctx)
    }

    pub fn snapshot_rotate(ctx: Context<SnapshotRotate>) -> Result<TaskResponse> {
        snapshot_rotate::handler(ctx)
    }

    pub fn snapshot_start(ctx: Context<SnapshotStart>) -> Result<TaskResponse> {
        snapshot_start::handler(ctx)
    }
}