2024-07-03 12:48:56 +00:00
|
|
|
from typing import Dict, Set
|
2024-06-28 13:51:20 +00:00
|
|
|
|
|
|
|
from .base import BaseSpecBuilder
|
2024-07-03 11:27:20 +00:00
|
|
|
from ..constants import EIP7732
|
2024-06-28 13:51:20 +00:00
|
|
|
|
|
|
|
|
2024-07-03 11:27:20 +00:00
|
|
|
class EIP7732SpecBuilder(BaseSpecBuilder):
|
|
|
|
fork: str = EIP7732
|
2024-06-28 13:51:20 +00:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def imports(cls, preset_name: str):
|
|
|
|
return f'''
|
2024-07-03 10:53:04 +00:00
|
|
|
from eth2spec.electra import {preset_name} as electra
|
2024-06-28 13:51:20 +00:00
|
|
|
'''
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def hardcoded_custom_type_dep_constants(cls, spec_object) -> Dict[str, str]:
|
|
|
|
return {
|
|
|
|
'PTC_SIZE': spec_object.preset_vars['PTC_SIZE'].value,
|
|
|
|
'MAX_PAYLOAD_ATTESTATIONS': spec_object.preset_vars['MAX_PAYLOAD_ATTESTATIONS'].value,
|
2024-07-03 11:27:20 +00:00
|
|
|
}
|
2024-07-03 12:48:56 +00:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def deprecate_constants(cls) -> Set[str]:
|
|
|
|
return set([
|
|
|
|
'EXECUTION_PAYLOAD_GINDEX',
|
|
|
|
])
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def deprecate_presets(cls) -> Set[str]:
|
|
|
|
return set([
|
|
|
|
'KZG_COMMITMENT_INCLUSION_PROOF_DEPTH',
|
|
|
|
])
|