EIP-712 code linting

This commit is contained in:
Alexandre Paillier
2022-07-19 11:49:18 +02:00
parent 0cf21cdf73
commit de9e895ad9
44 changed files with 778 additions and 1402 deletions

View File

@@ -9,41 +9,34 @@
#define MAX_PATH_DEPTH 16
#define MAX_ARRAY_DEPTH 4
typedef struct
{
typedef struct {
uint8_t path_index;
uint8_t size;
} s_array_depth;
} s_array_depth;
typedef enum
{
ROOT_DOMAIN,
ROOT_MESSAGE
} e_root_type;
typedef enum { ROOT_DOMAIN, ROOT_MESSAGE } e_root_type;
typedef struct
{
typedef struct {
uint8_t depth_count;
uint8_t depths[MAX_PATH_DEPTH];
uint8_t array_depth_count;
s_array_depth array_depths[MAX_ARRAY_DEPTH];
const void *root_struct;
e_root_type root_type;
} s_path;
} s_path;
bool path_set_root(const char *const struct_name, uint8_t length);
const void *path_get_field(void);
bool path_advance(void);
bool path_init(void);
void path_deinit(void);
bool path_new_array_depth(const uint8_t *const data,
uint8_t length);
bool path_set_root(const char *const struct_name, uint8_t length);
const void *path_get_field(void);
bool path_advance(void);
bool path_init(void);
void path_deinit(void);
bool path_new_array_depth(const uint8_t *const data, uint8_t length);
e_root_type path_get_root_type(void);
const void *path_get_root(void);
const void *path_get_root(void);
const void *path_get_nth_field(uint8_t n);
const void *path_get_nth_field_to_last(uint8_t n);
uint8_t path_get_depth_count(void);
#endif // HAVE_EIP712_FULL_SUPPORT
#endif // HAVE_EIP712_FULL_SUPPORT
#endif // PATH_H_
#endif // PATH_H_