diff --git a/scripts/function_puller.py b/scripts/function_puller.py index 36dd5b81f..26671bafc 100644 --- a/scripts/function_puller.py +++ b/scripts/function_puller.py @@ -74,15 +74,14 @@ def get_spec(file_name: str) -> SpecObject: row[i] = row[i].strip().strip('`') if '`' in row[i]: row[i] = row[i][:row[i].find('`')] - if row[1].startswith('uint') or row[1].startswith('Bytes'): + is_constant_def = True + if row[0][0] not in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_': + is_constant_def = False + for c in row[0]: + if c not in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789': + is_constant_def = False + if is_constant_def: + constants[row[0]] = row[1].replace('**TBD**', '0x1234567890123456789012345678901234567890') + elif row[1].startswith('uint') or row[1].startswith('Bytes'): custom_types[row[0]] = row[1] - else: - eligible = True - if row[0][0] not in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_': - eligible = False - for c in row[0]: - if c not in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789': - eligible = False - if eligible: - constants[row[0]] = row[1].replace('**TBD**', '0x1234567890123456789012345678901234567890') return functions, custom_types, constants, ssz_objects, inserts