Skip to content

Commit

Permalink
Rename receipt to avoid duplicate meaning of LegacyReceipt
Browse files Browse the repository at this point in the history
  • Loading branch information
etan-status committed Nov 6, 2023
1 parent 559596b commit 86b1d45
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions EIPS/eip-6493.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ class Receipt(StableContainer[MAX_RECEIPT_FIELDS]):
Valid receipt types can be defined using [EIP-7495](./eip-7495.md) `Variant`.

```python
class LegacyReceipt(Variant[Receipt]):
class HomesteadReceipt(Variant[Receipt]):
root: Hash32
gas_used: uint64
contract_address: Optional[ExecutionAddress]
Expand All @@ -425,7 +425,7 @@ class AnyReceipt(OneOf[Receipt]):
if value.status is not None:
return BasicReceipt

return LegacyReceipt
return HomesteadReceipt
```

Future specifications MAY:
Expand Down
2 changes: 1 addition & 1 deletion assets/eip-6493/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def upgrade_rlp_receipt_to_ssz(pre_bytes: bytes,
)

root = pre.post_state_or_status
return LegacyReceipt(
return HomesteadReceipt(
root=root,
gas_used=pre.cumulative_gas_used - prev_cumulative_gas_used,
contract_address=compute_contract_address(
Expand Down
4 changes: 2 additions & 2 deletions assets/eip-6493/ssz_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ class Receipt(StableContainer[MAX_RECEIPT_FIELDS]):
# EIP-658
status: Optional[boolean]

class LegacyReceipt(Variant[Receipt]):
class HomesteadReceipt(Variant[Receipt]):
root: Hash32
gas_used: uint64
contract_address: Optional[ExecutionAddress]
Expand All @@ -306,4 +306,4 @@ def select_variant(cls, value: Receipt) -> Type[Receipt]:
if value.status is not None:
return BasicReceipt

return LegacyReceipt
return HomesteadReceipt

0 comments on commit 86b1d45

Please sign in to comment.