Skip to content

Commit 8c906b2

Browse files
Change type of l1_address to Felt (#1608) [skip ci]
1 parent 4b1ea7f commit 8c906b2

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

docs/migration_guide.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ Migration guide
1515

1616
1. ABI parser supports now fixed size arrays.
1717

18+
.. py:currentmodule:: starknet_py.net.client_models
19+
20+
2. ``l1_address`` in :class:`L2ToL1Message` now accepts felts when deserializing.
21+
1822
**********************
1923
0.26.2 Migration guide
2024
**********************

starknet_py/net/schemas/common.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,6 @@ class Felt(NumberAsHex):
8989
REGEX_PATTERN = r"^0x(0|[a-fA-F1-9]{1}[a-fA-F0-9]{0,62})$"
9090

9191

92-
class EthAddress(NumberAsHex):
93-
"""
94-
Field used to serialize and deserialize ETH address type.
95-
"""
96-
97-
MAX_VALUE = 2**160
98-
REGEX_PATTERN = r"^0x[a-fA-F0-9]{40}$"
99-
100-
10192
class Uint64(NumberAsHex):
10293
"""
10394
Field used to serialize and deserialize RPC u64 type.

starknet_py/net/schemas/rpc/transactions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
)
2929
from starknet_py.net.schemas.common import (
3030
DAModeField,
31-
EthAddress,
3231
ExecutionStatusField,
3332
Felt,
3433
FinalityStatusField,
@@ -47,7 +46,7 @@
4746

4847
class L2toL1MessageSchema(Schema):
4948
l2_address = Felt(data_key="from_address", required=True)
50-
l1_address = EthAddress(data_key="to_address", required=True)
49+
l1_address = Felt(data_key="to_address", required=True)
5150
payload = fields.List(Felt(), data_key="payload", required=True)
5251

5352
@post_load

0 commit comments

Comments
 (0)