@@ -23,36 +23,7 @@ extern "C" {
2323#include <stddef.h>
2424#include <stdint.h>
2525
26- #include "parser_txdef_metadata.h"
27-
28- #define GAS_DIMENSIONS 2
29- #define TOKEN_ID_SIZE 32
30- #define ADDRESS_SIZE 28
31- #define MAX_AUTHORIZED_UPDATERS 10
32- #define DEFAULT_SAFE_VEC_LEN 20
33-
34- typedef enum {
35- RUNTIME_BANK ,
36- RUNTIME_SEQUENCER_REGISTRY ,
37- RUNTIME_VALUE_SETTER ,
38- RUNTIME_ATTESTER_INCENTIVES ,
39- RUNTIME_PROVER_INCENTIVES ,
40- RUNTIME_ACCOUNTS ,
41- RUNTIME_UNIQUENESS ,
42- RUNTIME_CHAIN_STATE ,
43- RUNTIME_BLOB_STORAGE ,
44- RUNTIME_PAYMASTER ,
45- RUNTIME_EVM ,
46- RUNTIME_ACCESS_PATTERN ,
47- } runtime_type_t ;
48-
49- typedef enum {
50- BANK_CALL_MESSAGE_CREATE_TOKEN ,
51- BANK_CALL_MESSAGE_TRANSFER ,
52- BANK_CALL_MESSAGE_BURN ,
53- BANK_CALL_MESSAGE_MINT ,
54- BANK_CALL_MESSAGE_FREEZE ,
55- } bank_call_message_type_t ;
26+ #include "metadata_txdef.h"
5627
5728typedef enum {
5829 PAYMASTER_CALL_REGISTER_PAYMASTER ,
@@ -70,61 +41,6 @@ typedef enum {
7041 AUTHORIZED_SEQUENCERS_SOME ,
7142} authorized_sequencers_type_t ;
7243
73- typedef struct {
74- uint64_t hi ;
75- uint64_t lo ;
76- } amount_t ;
77-
78- typedef struct {
79- bytes_t token ;
80- } token_id_t ;
81-
82- typedef struct {
83- amount_t amount ;
84- token_id_t token_id ;
85- } coins_t ;
86-
87- typedef struct {
88- bytes_t address ;
89- } address_t ;
90-
91- typedef struct {
92- uint64_t gas [GAS_DIMENSIONS ];
93- } gas_t ;
94-
95- typedef struct {
96- amount_t gas [GAS_DIMENSIONS ];
97- } gas_u128_t ;
98-
99- // CallMessage structs
100- typedef struct {
101- address_t to ;
102- coins_t coins ;
103- } transfer_t ;
104-
105- typedef struct {
106- coins_t coins ;
107- } burn_t ;
108-
109- typedef struct {
110- coins_t coins ;
111- address_t mint_to_address ;
112- } mint_t ;
113-
114- typedef struct {
115- token_id_t token_id ;
116- } freeze_t ;
117-
118- typedef struct {
119- bank_call_message_type_t type ;
120- union {
121- transfer_t transfer ;
122- burn_t burn ;
123- mint_t mint ;
124- freeze_t freeze ;
125- };
126- } bank_call_message_t ;
127-
12844typedef struct {
12945 bool has_max_fee ;
13046 amount_t max_fee ;
@@ -151,11 +67,6 @@ typedef struct {
15167 } pairs [DEFAULT_SAFE_VEC_LEN ];
15268} payee_policy_list_t ;
15369
154- typedef struct {
155- uint32_t length ;
156- address_t address [DEFAULT_SAFE_VEC_LEN ];
157- } address_list_t ;
158-
15970typedef struct {
16071 authorized_sequencers_type_t type ;
16172 union {
@@ -180,7 +91,8 @@ typedef struct {
18091
18192typedef struct {
18293 address_t payer ;
183- //policy_update_t update;
94+ // TODO: implement this
95+ // policy_update_t update;
18496} paymaster_call_update_policy_t ;
18597
18698typedef struct {
@@ -192,33 +104,6 @@ typedef struct {
192104 };
193105} paymaster_call_message_t ;
194106
195- // Runtime structs
196- typedef struct {
197- runtime_type_t type ;
198- union {
199- bank_call_message_t bank ;
200- paymaster_call_message_t paymaster ;
201- };
202- } runtime_t ;
203- typedef struct {
204- uint64_t max_priority_fee_bips ;
205- amount_t max_fee ;
206- bool has_gas_limit ;
207- gas_t gas_limit ;
208- uint64_t chain_id ;
209- } tx_details_t ;
210-
211- typedef struct {
212- runtime_t runtime_call ;
213- uint64_t generation ;
214- tx_details_t tx_details ;
215- } unsigned_transaction_t ;
216-
217- typedef struct {
218- schema_t schema ;
219- unsigned_transaction_t unsigned_transaction ;
220- } parser_tx_t ;
221-
222107#ifdef __cplusplus
223108}
224109#endif
0 commit comments