Because it's repeated in several different transaction types, the Tuple[Address, Tuple[Bytes32, ...]] portion should be promoted to its own type.
Related to Issue #
Fixes #947
How was it fixed?
This PR refactors the access list type used in various transaction classes to reduce redundancy and improve maintainability. Specifically, it introduces a new Access class to represent the access_list structure, which is used in multiple transaction types.
Created a new Access class to encapsulate the account and slots structure.
@slotted_freezable
@dataclass
class Access:
account: Address
slots: Tuple[Bytes32, ...]
Updated Transaction Classes
RLP Encoding and Decoding Adjustments:
Introduced helper functions encode_access_list and decode_access_list to handle the conversion between the new Access type and the previous tuple structure for RLP encoding and decoding.
Updated encode_transaction and decode_transaction functions to use these helpers.
What was wrong?
Because it's repeated in several different transaction types, the
Tuple[Address, Tuple[Bytes32, ...]]
portion should be promoted to its own type.Related to Issue # Fixes #947
How was it fixed?
This PR refactors the access list type used in various transaction classes to reduce redundancy and improve maintainability. Specifically, it introduces a new
Access
class to represent theaccess_list
structure, which is used in multiple transaction types.Created a new Access class to encapsulate the account and slots structure.
Updated Transaction Classes
RLP Encoding and Decoding Adjustments:
Cute Animal Picture