cronos_network/
lib.rs

1pub mod errors;
2pub mod id;
3pub mod pda;
4pub mod state;
5
6mod instructions;
7
8pub use id::ID;
9
10use anchor_lang::prelude::*;
11use cronos_scheduler::responses::ExecResponse;
12use instructions::*;
13
14#[program]
15pub mod cronos_network {
16
17    use super::*;
18
19    pub fn initialize<'info>(ctx: Context<'_, '_, '_, 'info, Initialize<'info>>) -> Result<()> {
20        initialize::handler(ctx)
21    }
22
23    pub fn rotator_turn(ctx: Context<RotatorTurn>) -> Result<()> {
24        rotator_turn::handler(ctx)
25    }
26
27    pub fn node_register<'info>(
28        ctx: Context<'_, '_, '_, 'info, NodeRegister<'info>>,
29    ) -> Result<()> {
30        node_register::handler(ctx)
31    }
32
33    pub fn node_stake(ctx: Context<NodeStake>, amount: u64, delegate: Pubkey) -> Result<()> {
34        node_stake::handler(ctx, amount, delegate)
35    }
36
37    pub fn snapshot_capture(ctx: Context<SnapshotCapture>) -> Result<ExecResponse> {
38        snapshot_capture::handler(ctx)
39    }
40
41    pub fn snapshot_rotate(ctx: Context<SnapshotRotate>) -> Result<ExecResponse> {
42        snapshot_rotate::handler(ctx)
43    }
44
45    pub fn snapshot_start(ctx: Context<SnapshotStart>) -> Result<ExecResponse> {
46        snapshot_start::handler(ctx)
47    }
48}