Line data Source code
1 : /* Automatically generated nanopb header */
2 : /* Generated by nanopb-0.4.9.1 */
3 :
4 : #ifndef PB_ORG_SOLANA_SEALEVEL_V1_INVOKE_PB_H_INCLUDED
5 : #define PB_ORG_SOLANA_SEALEVEL_V1_INVOKE_PB_H_INCLUDED
6 :
7 : #include "../../../../ballet/nanopb/pb_firedancer.h"
8 : #include "context.pb.h"
9 : #include "metadata.pb.h"
10 :
11 : #if PB_PROTO_HEADER_VERSION != 40
12 : #error Regenerate this file with the current version of nanopb generator.
13 : #endif
14 :
15 : /* Struct definitions */
16 : typedef struct fd_exec_test_instr_acct {
17 : /* Selects an account in an external list */
18 : uint32_t index;
19 : bool is_writable;
20 : bool is_signer;
21 : } fd_exec_test_instr_acct_t;
22 :
23 : /* The execution context of a program invocation (aka instruction).
24 : Contains all required information to independently replay an instruction.
25 : Also includes partial transaction context. */
26 : typedef struct fd_exec_test_instr_context {
27 : /* The address of the program invoked. (32 bytes) */
28 : pb_byte_t program_id[32];
29 : /* Account state accessed by the instruction. This may include
30 : indirect accesses like sysvars. */
31 : pb_size_t accounts_count;
32 : struct fd_exec_test_acct_state *accounts;
33 : /* Account access list for this instruction (refers to above accounts list) */
34 : pb_size_t instr_accounts_count;
35 : struct fd_exec_test_instr_acct *instr_accounts;
36 : /* The input data passed to program execution. */
37 : pb_bytes_array_t *data;
38 : uint64_t cu_avail;
39 : /* Active feature set */
40 : bool has_features;
41 : fd_exec_test_feature_set_t features;
42 : } fd_exec_test_instr_context_t;
43 :
44 : /* The results of executing an InstrContext. */
45 : typedef struct fd_exec_test_instr_effects {
46 : /* result is zero if the instruction executed succesfully.
47 : Otherwise, a non-zero error code. Error codes are not relevant to
48 : consensus. */
49 : int32_t result;
50 : /* Some error cases additionally have a custom error code. Unlike
51 : the expected_result, this is stable across clients. */
52 : uint32_t custom_err;
53 : /* Copies of accounts that were changed. May be in an arbitrary
54 : order. The pubkey of each account is unique in this list. Each
55 : account address modified here must also be in the
56 : InstrContext. */
57 : pb_size_t modified_accounts_count;
58 : struct fd_exec_test_acct_state *modified_accounts;
59 : uint64_t cu_avail;
60 : /* Instruction return data. */
61 : pb_bytes_array_t *return_data;
62 : } fd_exec_test_instr_effects_t;
63 :
64 : /* An instruction processing test fixture. */
65 : typedef struct fd_exec_test_instr_fixture {
66 : bool has_metadata;
67 : fd_exec_test_fixture_metadata_t metadata;
68 : bool has_input;
69 : fd_exec_test_instr_context_t input;
70 : bool has_output;
71 : fd_exec_test_instr_effects_t output;
72 : } fd_exec_test_instr_fixture_t;
73 :
74 :
75 : #ifdef __cplusplus
76 : extern "C" {
77 : #endif
78 :
79 : /* Initializer values for message structs */
80 : #define FD_EXEC_TEST_INSTR_ACCT_INIT_DEFAULT {0, 0, 0}
81 0 : #define FD_EXEC_TEST_INSTR_CONTEXT_INIT_DEFAULT {{0}, 0, NULL, 0, NULL, NULL, 0, false, FD_EXEC_TEST_FEATURE_SET_INIT_DEFAULT}
82 : #define FD_EXEC_TEST_INSTR_EFFECTS_INIT_DEFAULT {0, 0, 0, NULL, 0, NULL}
83 : #define FD_EXEC_TEST_INSTR_FIXTURE_INIT_DEFAULT {false, FD_EXEC_TEST_FIXTURE_METADATA_INIT_DEFAULT, false, FD_EXEC_TEST_INSTR_CONTEXT_INIT_DEFAULT, false, FD_EXEC_TEST_INSTR_EFFECTS_INIT_DEFAULT}
84 : #define FD_EXEC_TEST_INSTR_ACCT_INIT_ZERO {0, 0, 0}
85 0 : #define FD_EXEC_TEST_INSTR_CONTEXT_INIT_ZERO {{0}, 0, NULL, 0, NULL, NULL, 0, false, FD_EXEC_TEST_FEATURE_SET_INIT_ZERO}
86 : #define FD_EXEC_TEST_INSTR_EFFECTS_INIT_ZERO {0, 0, 0, NULL, 0, NULL}
87 : #define FD_EXEC_TEST_INSTR_FIXTURE_INIT_ZERO {false, FD_EXEC_TEST_FIXTURE_METADATA_INIT_ZERO, false, FD_EXEC_TEST_INSTR_CONTEXT_INIT_ZERO, false, FD_EXEC_TEST_INSTR_EFFECTS_INIT_ZERO}
88 :
89 : /* Field tags (for use in manual encoding/decoding) */
90 : #define FD_EXEC_TEST_INSTR_ACCT_INDEX_TAG 1
91 : #define FD_EXEC_TEST_INSTR_ACCT_IS_WRITABLE_TAG 2
92 : #define FD_EXEC_TEST_INSTR_ACCT_IS_SIGNER_TAG 3
93 : #define FD_EXEC_TEST_INSTR_CONTEXT_PROGRAM_ID_TAG 1
94 : #define FD_EXEC_TEST_INSTR_CONTEXT_ACCOUNTS_TAG 3
95 : #define FD_EXEC_TEST_INSTR_CONTEXT_INSTR_ACCOUNTS_TAG 4
96 : #define FD_EXEC_TEST_INSTR_CONTEXT_DATA_TAG 5
97 : #define FD_EXEC_TEST_INSTR_CONTEXT_CU_AVAIL_TAG 6
98 : #define FD_EXEC_TEST_INSTR_CONTEXT_FEATURES_TAG 10
99 : #define FD_EXEC_TEST_INSTR_EFFECTS_RESULT_TAG 1
100 : #define FD_EXEC_TEST_INSTR_EFFECTS_CUSTOM_ERR_TAG 2
101 : #define FD_EXEC_TEST_INSTR_EFFECTS_MODIFIED_ACCOUNTS_TAG 3
102 : #define FD_EXEC_TEST_INSTR_EFFECTS_CU_AVAIL_TAG 4
103 : #define FD_EXEC_TEST_INSTR_EFFECTS_RETURN_DATA_TAG 5
104 : #define FD_EXEC_TEST_INSTR_FIXTURE_METADATA_TAG 1
105 : #define FD_EXEC_TEST_INSTR_FIXTURE_INPUT_TAG 2
106 : #define FD_EXEC_TEST_INSTR_FIXTURE_OUTPUT_TAG 3
107 :
108 : /* Struct field encoding specification for nanopb */
109 : #define FD_EXEC_TEST_INSTR_ACCT_FIELDLIST(X, a) \
110 : X(a, STATIC, SINGULAR, UINT32, index, 1) \
111 : X(a, STATIC, SINGULAR, BOOL, is_writable, 2) \
112 : X(a, STATIC, SINGULAR, BOOL, is_signer, 3)
113 : #define FD_EXEC_TEST_INSTR_ACCT_CALLBACK NULL
114 : #define FD_EXEC_TEST_INSTR_ACCT_DEFAULT NULL
115 :
116 : #define FD_EXEC_TEST_INSTR_CONTEXT_FIELDLIST(X, a) \
117 : X(a, STATIC, SINGULAR, FIXED_LENGTH_BYTES, program_id, 1) \
118 : X(a, POINTER, REPEATED, MESSAGE, accounts, 3) \
119 : X(a, POINTER, REPEATED, MESSAGE, instr_accounts, 4) \
120 : X(a, POINTER, SINGULAR, BYTES, data, 5) \
121 : X(a, STATIC, SINGULAR, UINT64, cu_avail, 6) \
122 : X(a, STATIC, OPTIONAL, MESSAGE, features, 10)
123 : #define FD_EXEC_TEST_INSTR_CONTEXT_CALLBACK NULL
124 : #define FD_EXEC_TEST_INSTR_CONTEXT_DEFAULT NULL
125 : #define fd_exec_test_instr_context_t_accounts_MSGTYPE fd_exec_test_acct_state_t
126 : #define fd_exec_test_instr_context_t_instr_accounts_MSGTYPE fd_exec_test_instr_acct_t
127 : #define fd_exec_test_instr_context_t_features_MSGTYPE fd_exec_test_feature_set_t
128 :
129 : #define FD_EXEC_TEST_INSTR_EFFECTS_FIELDLIST(X, a) \
130 : X(a, STATIC, SINGULAR, INT32, result, 1) \
131 : X(a, STATIC, SINGULAR, UINT32, custom_err, 2) \
132 : X(a, POINTER, REPEATED, MESSAGE, modified_accounts, 3) \
133 : X(a, STATIC, SINGULAR, UINT64, cu_avail, 4) \
134 : X(a, POINTER, SINGULAR, BYTES, return_data, 5)
135 : #define FD_EXEC_TEST_INSTR_EFFECTS_CALLBACK NULL
136 : #define FD_EXEC_TEST_INSTR_EFFECTS_DEFAULT NULL
137 : #define fd_exec_test_instr_effects_t_modified_accounts_MSGTYPE fd_exec_test_acct_state_t
138 :
139 : #define FD_EXEC_TEST_INSTR_FIXTURE_FIELDLIST(X, a) \
140 : X(a, STATIC, OPTIONAL, MESSAGE, metadata, 1) \
141 : X(a, STATIC, OPTIONAL, MESSAGE, input, 2) \
142 : X(a, STATIC, OPTIONAL, MESSAGE, output, 3)
143 : #define FD_EXEC_TEST_INSTR_FIXTURE_CALLBACK NULL
144 : #define FD_EXEC_TEST_INSTR_FIXTURE_DEFAULT NULL
145 : #define fd_exec_test_instr_fixture_t_metadata_MSGTYPE fd_exec_test_fixture_metadata_t
146 : #define fd_exec_test_instr_fixture_t_input_MSGTYPE fd_exec_test_instr_context_t
147 : #define fd_exec_test_instr_fixture_t_output_MSGTYPE fd_exec_test_instr_effects_t
148 :
149 : extern const pb_msgdesc_t fd_exec_test_instr_acct_t_msg;
150 : extern const pb_msgdesc_t fd_exec_test_instr_context_t_msg;
151 : extern const pb_msgdesc_t fd_exec_test_instr_effects_t_msg;
152 : extern const pb_msgdesc_t fd_exec_test_instr_fixture_t_msg;
153 :
154 : /* Defines for backwards compatibility with code written before nanopb-0.4.0 */
155 : #define FD_EXEC_TEST_INSTR_ACCT_FIELDS &fd_exec_test_instr_acct_t_msg
156 0 : #define FD_EXEC_TEST_INSTR_CONTEXT_FIELDS &fd_exec_test_instr_context_t_msg
157 : #define FD_EXEC_TEST_INSTR_EFFECTS_FIELDS &fd_exec_test_instr_effects_t_msg
158 : #define FD_EXEC_TEST_INSTR_FIXTURE_FIELDS &fd_exec_test_instr_fixture_t_msg
159 :
160 : /* Maximum encoded size of messages (where known) */
161 : /* fd_exec_test_InstrContext_size depends on runtime parameters */
162 : /* fd_exec_test_InstrEffects_size depends on runtime parameters */
163 : /* fd_exec_test_InstrFixture_size depends on runtime parameters */
164 : #define FD_EXEC_TEST_INSTR_ACCT_SIZE 10
165 : #define ORG_SOLANA_SEALEVEL_V1_INVOKE_PB_H_MAX_SIZE FD_EXEC_TEST_INSTR_ACCT_SIZE
166 :
167 : /* Mapping from canonical names (mangle_names or overridden package name) */
168 : #define org_solana_sealevel_v1_InstrAcct fd_exec_test_InstrAcct
169 : #define org_solana_sealevel_v1_InstrContext fd_exec_test_InstrContext
170 : #define org_solana_sealevel_v1_InstrEffects fd_exec_test_InstrEffects
171 : #define org_solana_sealevel_v1_InstrFixture fd_exec_test_InstrFixture
172 : #define ORG_SOLANA_SEALEVEL_V1_INSTR_ACCT_INIT_DEFAULT FD_EXEC_TEST_INSTR_ACCT_INIT_DEFAULT
173 : #define ORG_SOLANA_SEALEVEL_V1_INSTR_CONTEXT_INIT_DEFAULT FD_EXEC_TEST_INSTR_CONTEXT_INIT_DEFAULT
174 : #define ORG_SOLANA_SEALEVEL_V1_INSTR_EFFECTS_INIT_DEFAULT FD_EXEC_TEST_INSTR_EFFECTS_INIT_DEFAULT
175 : #define ORG_SOLANA_SEALEVEL_V1_INSTR_FIXTURE_INIT_DEFAULT FD_EXEC_TEST_INSTR_FIXTURE_INIT_DEFAULT
176 : #define ORG_SOLANA_SEALEVEL_V1_INSTR_ACCT_INIT_ZERO FD_EXEC_TEST_INSTR_ACCT_INIT_ZERO
177 : #define ORG_SOLANA_SEALEVEL_V1_INSTR_CONTEXT_INIT_ZERO FD_EXEC_TEST_INSTR_CONTEXT_INIT_ZERO
178 : #define ORG_SOLANA_SEALEVEL_V1_INSTR_EFFECTS_INIT_ZERO FD_EXEC_TEST_INSTR_EFFECTS_INIT_ZERO
179 : #define ORG_SOLANA_SEALEVEL_V1_INSTR_FIXTURE_INIT_ZERO FD_EXEC_TEST_INSTR_FIXTURE_INIT_ZERO
180 :
181 : #ifdef __cplusplus
182 : } /* extern "C" */
183 : #endif
184 :
185 : #endif
|