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

@@ -6,26 +6,19 @@
#include <stdint.h>
#include <stdbool.h>
#define IS_DYN(type) (((type) == TYPE_SOL_STRING) || ((type) == TYPE_SOL_BYTES_DYN))
#define IS_DYN(type) (((type) == TYPE_SOL_STRING) || ((type) == TYPE_SOL_BYTES_DYN))
typedef enum
{
FHS_IDLE,
FHS_WAITING_FOR_MORE
} e_field_hashing_state;
typedef enum { FHS_IDLE, FHS_WAITING_FOR_MORE } e_field_hashing_state;
typedef struct
{
uint16_t remaining_size;
uint8_t state; // e_field_hashing_state
} s_field_hashing;
typedef struct {
uint16_t remaining_size;
uint8_t state; // e_field_hashing_state
} s_field_hashing;
bool field_hash_init(void);
void field_hash_deinit(void);
bool field_hash(const uint8_t *data,
uint8_t data_length,
bool partial);
bool field_hash(const uint8_t *data, uint8_t data_length, bool partial);
#endif // HAVE_EIP712_FULL_SUPPORT
#endif // HAVE_EIP712_FULL_SUPPORT
#endif // FIELD_HASH_H_
#endif // FIELD_HASH_H_