2024-04-09 12:49:58 -06:00
|
|
|
from typing import Dict
|
2023-06-26 18:01:56 +08:00
|
|
|
from .base import BaseSpecBuilder
|
2024-02-16 12:29:00 +08:00
|
|
|
from ..constants import ELECTRA
|
2023-06-26 18:01:56 +08:00
|
|
|
|
|
|
|
|
2024-02-16 12:29:00 +08:00
|
|
|
class ElectraSpecBuilder(BaseSpecBuilder):
|
|
|
|
fork: str = ELECTRA
|
2023-06-26 18:01:56 +08:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def imports(cls, preset_name: str):
|
|
|
|
return f'''
|
|
|
|
from eth2spec.deneb import {preset_name} as deneb
|
|
|
|
'''
|
2024-04-09 12:49:58 -06:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def hardcoded_ssz_dep_constants(cls) -> Dict[str, str]:
|
|
|
|
return {
|
2024-07-09 20:15:31 +02:00
|
|
|
'FINALIZED_ROOT_GINDEX_ELECTRA': 'GeneralizedIndex(169)',
|
|
|
|
'CURRENT_SYNC_COMMITTEE_GINDEX_ELECTRA': 'GeneralizedIndex(86)',
|
|
|
|
'NEXT_SYNC_COMMITTEE_GINDEX_ELECTRA': 'GeneralizedIndex(87)',
|
2024-04-09 12:49:58 -06:00
|
|
|
}
|