Skip to content

Commit ab785e1

Browse files
authored
Make execution_resources required in L1HandlerTransactionTrace (#1348) [skip ci]
1 parent 9a27c8a commit ab785e1

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

docs/migration_guide.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ Migration guide
55
0.22.0 Migration guide
66
******************************
77

8-
Version 0.22.0 of **starknet.py**
8+
0.22.0 Targeted versions
9+
------------------------
10+
11+
- Starknet - `0.13.1.1 <https://docs.starknet.io/documentation/starknet_versions/version_notes/#version0.13.1.1>`_
12+
- RPC - `0.7.1 <https://github.com/starkware-libs/starknet-specs/releases/tag/v0.7.1>`_
913

1014
0.22.0 Breaking changes
1115
-----------------------
@@ -20,7 +24,7 @@ Version 0.22.0 of **starknet.py**
2024

2125
3. Parameter ``chain`` has been removed from the methods :meth:`Account.deploy_account_v1` and :meth:`Account.deploy_account_v3`
2226
4. Parameter ``chain_id`` has been removed from the method :meth:`~Account.get_balance`
23-
27+
5. :class:`~starknet_py.net.client_models.L1HandlerTransactionTrace` field ``execution_resources`` is now required
2428

2529

2630
******************************

starknet_py/net/client_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ class L1HandlerTransactionTrace:
10231023
Dataclass representing a transaction trace of an L1_HANDLER transaction.
10241024
"""
10251025

1026-
execution_resources: Optional[ExecutionResources]
1026+
execution_resources: ExecutionResources
10271027
function_invocation: FunctionInvocation
10281028
state_diff: Optional[StateDiff] = None
10291029

starknet_py/net/schemas/rpc.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -965,9 +965,8 @@ def make_dataclass(self, data, **kwargs) -> DeployAccountTransactionTrace:
965965

966966

967967
class L1HandlerTransactionTraceSchema(Schema):
968-
# TODO (#1323): Explain with starknet, because spec doesn't contain execution_resources
969968
execution_resources = fields.Nested(
970-
ExecutionResourcesSchema(), data_key="execution_resources", load_default=None
969+
ExecutionResourcesSchema(), data_key="execution_resources", required=True
971970
)
972971

973972
function_invocation = fields.Nested(

starknet_py/tests/e2e/tests_on_networks/trace_api_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ async def test_trace_transaction_l1_handler(client_sepolia_integration):
123123
assert (type(tx)) is L1HandlerTransaction
124124
assert type(trace) is L1HandlerTransactionTrace
125125
assert trace.function_invocation is not None
126+
assert trace.execution_resources is not None
126127

127128

128129
@pytest.mark.asyncio

0 commit comments

Comments
 (0)