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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#[macro_use]
extern crate version;
pub mod errors;
pub mod state;
mod instructions;
use anchor_lang::prelude::*;
use clockwork_utils::CrateInfo;
use instructions::*;
use state::*;
declare_id!("3XXuUFfweXBwFgFfYaejLvZE4cGZiHgKiGfMtdxNzYmv");
#[program]
pub mod thread_program {
use super::*;
pub fn get_crate_info(ctx: Context<GetCrateInfo>) -> Result<CrateInfo> {
get_crate_info::handler(ctx)
}
pub fn thread_exec(ctx: Context<ThreadExec>) -> Result<()> {
thread_exec::handler(ctx)
}
pub fn thread_create(
ctx: Context<ThreadCreate>,
id: String,
kickoff_instruction: InstructionData,
trigger: Trigger,
) -> Result<()> {
thread_create::handler(ctx, id, kickoff_instruction, trigger)
}
pub fn thread_delete(ctx: Context<ThreadDelete>) -> Result<()> {
thread_delete::handler(ctx)
}
pub fn thread_kickoff(ctx: Context<ThreadKickoff>) -> Result<()> {
thread_kickoff::handler(ctx)
}
pub fn thread_pause(ctx: Context<ThreadPause>) -> Result<()> {
thread_pause::handler(ctx)
}
pub fn thread_resume(ctx: Context<ThreadResume>) -> Result<()> {
thread_resume::handler(ctx)
}
pub fn thread_stop(ctx: Context<ThreadStop>) -> Result<()> {
thread_stop::handler(ctx)
}
pub fn thread_update(ctx: Context<ThreadUpdate>, settings: ThreadSettings) -> Result<()> {
thread_update::handler(ctx, settings)
}
pub fn thread_withdraw(ctx: Context<ThreadWithdraw>, amount: u64) -> Result<()> {
thread_withdraw::handler(ctx, amount)
}
}