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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
use anchor_lang::prelude::borsh::{BorshDeserialize, BorshSerialize};
use anchor_lang::prelude::*;
//use bolt_helpers_system_template::*;

declare_id!("7X4EFsDJ5aYTcEjKzJ94rD8FRKgQeXC89fkpeTS4KaqP");

//#[system_template(max_components = 2)]
#[program]
pub mod bolt_system {
    use super::*;

    pub fn execute(_ctx: Context<SetData>, _args: Vec<u8>) -> Result<Vec<u8>> {
        Ok(Vec::new())
    }

    pub fn execute_2(_ctx: Context<SetData2>, _args: Vec<u8>) -> Result<(Vec<u8>, Vec<u8>)> {
        Ok((Vec::new(), Vec::new()))
    }

    pub fn execute_3(
        _ctx: Context<SetData3>,
        _args: Vec<u8>,
    ) -> Result<(Vec<u8>, Vec<u8>, Vec<u8>)> {
        Ok((Vec::new(), Vec::new(), Vec::new()))
    }

    #[allow(clippy::type_complexity)]
    pub fn execute_4(
        _ctx: Context<SetData4>,
        _args: Vec<u8>,
    ) -> Result<(Vec<u8>, Vec<u8>, Vec<u8>, Vec<u8>)> {
        Ok((Vec::new(), Vec::new(), Vec::new(), Vec::new()))
    }

    #[allow(clippy::type_complexity)]
    pub fn execute_5(
        _ctx: Context<SetData5>,
        _args: Vec<u8>,
    ) -> Result<(Vec<u8>, Vec<u8>, Vec<u8>, Vec<u8>, Vec<u8>)> {
        Ok((Vec::new(), Vec::new(), Vec::new(), Vec::new(), Vec::new()))
    }
}

#[derive(Accounts, BorshDeserialize, BorshSerialize, Clone)]
pub struct SetData<'info> {
    #[account()]
    /// CHECK: unchecked account
    pub component: UncheckedAccount<'info>,
}

#[derive(Accounts, BorshDeserialize, BorshSerialize, Clone)]
pub struct SetData2<'info> {
    #[account()]
    /// CHECK: unchecked account
    pub component1: UncheckedAccount<'info>,
    #[account()]
    /// CHECK: unchecked account
    pub component2: UncheckedAccount<'info>,
}

#[derive(Accounts, BorshDeserialize, BorshSerialize, Clone)]
pub struct SetData3<'info> {
    #[account()]
    /// CHECK: unchecked account
    pub component1: UncheckedAccount<'info>,
    #[account()]
    /// CHECK: unchecked account
    pub component2: UncheckedAccount<'info>,
    #[account()]
    /// CHECK: unchecked account
    pub component3: UncheckedAccount<'info>,
}

#[derive(Accounts, BorshDeserialize, BorshSerialize, Clone)]
pub struct SetData4<'info> {
    #[account()]
    /// CHECK: unchecked account
    pub component1: UncheckedAccount<'info>,
    #[account()]
    /// CHECK: unchecked account
    pub component2: UncheckedAccount<'info>,
    #[account()]
    /// CHECK: unchecked account
    pub component3: UncheckedAccount<'info>,
    #[account()]
    /// CHECK: unchecked account
    pub component4: UncheckedAccount<'info>,
}

#[derive(Accounts, BorshDeserialize, BorshSerialize, Clone)]
pub struct SetData5<'info> {
    #[account()]
    /// CHECK: unchecked account
    pub component1: UncheckedAccount<'info>,
    #[account()]
    /// CHECK: unchecked account
    pub component2: UncheckedAccount<'info>,
    #[account()]
    /// CHECK: unchecked account
    pub component3: UncheckedAccount<'info>,
    #[account()]
    /// CHECK: unchecked account
    pub component4: UncheckedAccount<'info>,
    #[account()]
    /// CHECK: unchecked account
    pub component5: UncheckedAccount<'info>,
}