Removed unused byte type

This commit is contained in:
Alexandre Paillier
2022-04-13 17:02:33 +02:00
parent 45dfd5d6a6
commit 477046bd43
2 changed files with 3 additions and 27 deletions

View File

@@ -23,7 +23,6 @@ typedef enum
TYPE_SOL_ADDRESS,
TYPE_SOL_BOOL,
TYPE_SOL_STRING,
TYPE_SOL_BYTE,
TYPE_SOL_BYTES_FIX,
TYPE_SOL_BYTES_DYN,
TYPES_COUNT
@@ -68,27 +67,6 @@ typedef enum
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
typedef struct
{
uint16_t length;
char *str;
} t_string;
typedef struct
{
uint16_t size;
uint8_t *ptr;
} t_array;
typedef struct
{
t_string type;
t_string key;
uint8_t bytesize;
t_array array_levels;
} t_struct_field;
// TODO: Move these into a new file
const char *get_struct_name(const uint8_t *ptr, uint8_t *const length);
const uint8_t *get_struct_fields_array(const uint8_t *ptr,

View File

@@ -46,8 +46,7 @@ bool init_sol_typenames(void)
"address", // 2
"bool", // 3
"string", // 4
"byte", // 5
"bytes" // 6
"bytes" // 5
};
// \ref TYPES_COUNT - 1 since we don't include \ref TYPE_CUSTOM
const uint8_t enum_to_idx[TYPES_COUNT - 1][IDX_COUNT] = {
@@ -56,9 +55,8 @@ bool init_sol_typenames(void)
{ TYPE_SOL_ADDRESS, 2 },
{ TYPE_SOL_BOOL, 3 },
{ TYPE_SOL_STRING, 4 },
{ TYPE_SOL_BYTE, 5 },
{ TYPE_SOL_BYTES_FIX, 6 },
{ TYPE_SOL_BYTES_DYN, 6 }
{ TYPE_SOL_BYTES_FIX, 5 },
{ TYPE_SOL_BYTES_DYN, 5 }
};
uint8_t *typename_len_ptr;
char *typename_ptr;