Migration guide =============== **************************** 0.30.0 Migration guide **************************** Version 0.30.0 of **starknet.py** comes with support for RPC 0.10.2. 0.30.0 Targeted versions ----------------------------- - Starknet - 0.14.2 - RPC - `0.10.2 `_ .. py:currentmodule:: starknet_py.net.client_models 0.30.0 New features ------------------------ 1. New ``response_flags`` parameter added to :meth:`~starknet_py.net.full_node_client.FullNodeClient.get_block_with_txs`, :meth:`~starknet_py.net.full_node_client.FullNodeClient.get_block_with_receipts` and :meth:`~starknet_py.net.full_node_client.FullNodeClient.get_transaction`. Currently supported flag: ``INCLUDE_PROOF_FACTS``. 2. :meth:`~starknet_py.net.full_node_client.FullNodeClient.get_storage_at` accepts a new ``response_flags`` parameter of type :class:`StorageResponseFlag`. When ``INCLUDE_LAST_UPDATE_BLOCK`` is set, the return type changes from ``int`` to :class:`StorageResult` (which includes ``value`` and ``last_update_block``). 3. :meth:`~starknet_py.net.full_node_client.FullNodeClient.trace_block_transactions` accepts a new ``trace_flags`` parameter of type :class:`TraceFlag`. When ``RETURN_INITIAL_READS`` is set, the return type is :class:`BlockTransactionTracesWithInitialReads` instead of ``List[BlockTransactionTrace]``. 4. :meth:`~starknet_py.net.full_node_client.FullNodeClient.get_state_update` accepts a new ``contract_addresses`` parameter. When provided, only state diffs related to those addresses are returned; class declarations are unaffected by this filter. 5. The ``address`` parameter of :meth:`~starknet_py.net.full_node_client.FullNodeClient.get_events` now accepts either a single ``Hash`` or a ``List[Hash]``. 6. :class:`SimulationFlag` has a new value ``RETURN_INITIAL_READS``. When included in ``simulation_flags``, :meth:`~starknet_py.net.full_node_client.FullNodeClient.simulate_transactions` returns :class:`SimulatedTransactionsWithInitialReads` instead of a plain list. 7. Invoke V3 transactions now support optional ``proof_facts`` and ``proof`` fields. These can be passed through: .. py:currentmodule:: starknet_py.net.account.account - :meth:`Account.sign_invoke_v3` - :meth:`Account.execute_v3` .. py:currentmodule:: starknet_py.contract - :meth:`ContractFunction.invoke_v3` - :meth:`PreparedFunctionInvokeV3.invoke` 0.30.0 New types --------------------- .. py:currentmodule:: starknet_py.net.client_models - :class:`TransactionResponseFlag` - flags controlling extra fields in transaction responses. - :class:`StorageResponseFlag` - flags controlling extra fields in storage responses. - :class:`TraceFlag` - flags controlling extra fields in block traces. - :class:`StorageResult` - returned by :meth:`~starknet_py.net.full_node_client.FullNodeClient.get_storage_at` when ``INCLUDE_LAST_UPDATE_BLOCK`` is set; contains ``value`` and ``last_update_block``. - :class:`InitialReads` - set of state values read from the underlying state reader during execution, containing optional ``storage``, ``nonces``, ``class_hashes`` and ``declared_contracts`` lists. - :class:`BlockTransactionTracesWithInitialReads` - block traces response that includes :class:`InitialReads`. - :class:`SimulatedTransactionsWithInitialReads` - simulation response that includes :class:`InitialReads`. 0.30.0 Bugfixes -------------------- .. currentmodule:: starknet_py.net.signer.stark_curve_signer 1. :meth:`KeyPair.generate` uses now a correct value for `Stark curve's order `_ **************************** 0.30.0-rc.0 Migration guide **************************** Version 0.30.0-rc.0 of **starknet.py** comes with support for RPC 0.10.2. 0.30.0-rc.0 Targeted versions ----------------------------- - Starknet - 0.14.2 - RPC - `0.10.2 `_ .. py:currentmodule:: starknet_py.net.client_models 0.30.0-rc.0 New features ------------------------ 1. New ``response_flags`` parameter added to :meth:`~starknet_py.net.full_node_client.FullNodeClient.get_block_with_txs`, :meth:`~starknet_py.net.full_node_client.FullNodeClient.get_block_with_receipts` and :meth:`~starknet_py.net.full_node_client.FullNodeClient.get_transaction`. Currently supported flag: ``INCLUDE_PROOF_FACTS``. 2. :meth:`~starknet_py.net.full_node_client.FullNodeClient.get_storage_at` accepts a new ``response_flags`` parameter of type :class:`StorageResponseFlag`. When ``INCLUDE_LAST_UPDATE_BLOCK`` is set, the return type changes from ``int`` to :class:`StorageResult` (which includes ``value`` and ``last_update_block``). 3. :meth:`~starknet_py.net.full_node_client.FullNodeClient.trace_block_transactions` accepts a new ``trace_flags`` parameter of type :class:`TraceFlag`. When ``RETURN_INITIAL_READS`` is set, the return type is :class:`BlockTransactionTracesWithInitialReads` instead of ``List[BlockTransactionTrace]``. 4. :meth:`~starknet_py.net.full_node_client.FullNodeClient.get_state_update` accepts a new ``contract_addresses`` parameter. When provided, only state diffs related to those addresses are returned; class declarations are unaffected by this filter. 5. The ``address`` parameter of :meth:`~starknet_py.net.full_node_client.FullNodeClient.get_events` now accepts either a single ``Hash`` or a ``List[Hash]``. 6. :class:`SimulationFlag` has a new value ``RETURN_INITIAL_READS``. When included in ``simulation_flags``, :meth:`~starknet_py.net.full_node_client.FullNodeClient.simulate_transactions` returns :class:`SimulatedTransactionsWithInitialReads` instead of a plain list. 7. Invoke V3 transactions now support optional ``proof_facts`` and ``proof`` fields. These can be passed through: .. py:currentmodule:: starknet_py.net.account.account - :meth:`Account.sign_invoke_v3` - :meth:`Account.execute_v3` .. py:currentmodule:: starknet_py.contract - :meth:`ContractFunction.invoke_v3` - :meth:`PreparedFunctionInvokeV3.invoke` 0.30.0-rc.0 New types --------------------- .. py:currentmodule:: starknet_py.net.client_models - :class:`TransactionResponseFlag` - flags controlling extra fields in transaction responses. - :class:`StorageResponseFlag` - flags controlling extra fields in storage responses. - :class:`TraceFlag` - flags controlling extra fields in block traces. - :class:`StorageResult` - returned by :meth:`~starknet_py.net.full_node_client.FullNodeClient.get_storage_at` when ``INCLUDE_LAST_UPDATE_BLOCK`` is set; contains ``value`` and ``last_update_block``. - :class:`InitialReads` - set of state values read from the underlying state reader during execution, containing optional ``storage``, ``nonces``, ``class_hashes`` and ``declared_contracts`` lists. - :class:`BlockTransactionTracesWithInitialReads` - block traces response that includes :class:`InitialReads`. - :class:`SimulatedTransactionsWithInitialReads` - simulation response that includes :class:`InitialReads`. 0.30.0-rc.0 Bugfixes -------------------- .. currentmodule:: starknet_py.net.signer.stark_curve_signer 1. :meth:`KeyPair.generate` uses now a correct value for `Stark curve's order `_ ************************ 0.29.0 Migration guide ************************ Version 0.29.0 of **starknet.py** comes with full support for RPC 0.10.0. It also changes the supported Python version. The **lowest** supported version Python is now 3.10. 0.29.0 Targeted versions ------------------------ - Starknet - `0.14.1 `_ - RPC - `0.10.0 `_ .. py:currentmodule:: starknet_py.net.client_models 1. :class:`BlockHeader`: Added new fields: ``event_commitment``, ``transaction_commitment``, ``receipt_commitment``, ``state_diff_commitment``, ``event_count``, ``transaction_count``, ``state_diff_length``. 2. :class:`StateDiff` has a new optional field ``migrated_compiled_classes``. 3. ``storage_keys`` field in :class:`ContractsStorageKeys` is now of type ``str``. 4. ``old_root`` field in :class:`PreConfirmedBlockStateUpdate` is now optional. 5. Hash function for contract declaration is now automatically selected based on Starknet version: Blake2s for Starknet >= 0.14.1, Poseidon for older versions. 6. :class:`EmittedEvent` has new fields: ``transaction_index`` and ``event_index``. 0.29.0 Bugfixes --------------- 1. Fixed parsing ABI that contains signed integers (e.g. ``i128``). 0.29.0 Dependency changes -------------------------- .. py:currentmodule:: starknet_py.net.signer.ledger_signer 1. When installing extra dependencies needed for :class:`LedgerSigner`, Linux users may have to install additional packages: .. code-block:: bash sudo apt install python3-dev libusb-1.0-0-dev libudev-dev These packages are needed for HIDAPI compilation. Read official `ledgerctl installation guide `_ for more details. **************************** 0.29.0-rc.2 Migration guide **************************** Version 0.29.0-rc.2 changes the supported Python version. The **lowest** supported version Python is now 3.10. 0.29.0-rc.2 Dependency changes ------------------------------- .. py:currentmodule:: starknet_py.net.signer.ledger_signer 1. When installing extra dependencies needed for :class:`LedgerSigner`, Linux users may have to install additional packages: .. code-block:: bash sudo apt install python3-dev libusb-1.0-0-dev libudev-dev These packages are needed for HIDAPI compilation. Read official `ledgerctl installation guide `_ for more details. 0.29.0-rc.2 Breaking changes ----------------------------- .. currentmodule:: starknet_py.hash.class_hash 1. :func:`compute_class_hash`: default value of ``hash_method`` param is now ``HashMethod.BLAKE2S``. *************************** 0.29.0-rc.1 Migration guide *************************** 0.29.0-rc.1 Bugfixes -------------------- 1. Fixed parsing ABI that contains signed integers (e.g. ``i128``). 2. Fixed logic for choosing hash method used in CASM class hash computation. *************************** 0.29.0-rc.0 Migration guide *************************** Version 0.29.0-rc.0 of **starknet.py** comes with support for RPC 0.10.0-rc.1. .. py:currentmodule:: starknet_py.net.client_models 1. :class:`StateDiff` has a new field ``migrated_compiled_classes``. 2. ``storage_keys`` field in :class:`ContractsStorageKeys` is now of type ``str``. 3. ``old_root`` field in :class:`PreConfirmedBlockStateUpdate` is now optional. 4. Hash function for contract declaration is now automatically selected based on node's RPC version: Blake2s for RPC >= 0.10.0-rc.0, Poseidon for older versions. 5. :class:`EmittedEvent` has new fields: ``transaction_index`` and ``event_index``. *************************** 0.28.1 Migration guide *************************** 1. This version adds support for Blake hash used in CASM class hash computation. 0.28.1 Targeted versions ------------------------ - Starknet - `0.14.0 `_ and `0.14.1 `_ - RPC - `0.9.0 `_ 0.28.1 Breaking changes ----------------------- .. py:currentmodule:: starknet_py.hash.compiled_class_hash_objects 1. :meth:`BytecodeSegmentStructure.hash` has new param ``hash_method``. 2. :meth:`BytecodeLeaf.hash` has new param ``hash_method``. 3. :meth:`BytecodeSegmentedNode.hash` has new param ``hash_method``. *************************** 0.28.0 Migration guide *************************** Version 0.28.0 of **starknet.py** comes with full support for RPC 0.9.0. 0.28.0 Targeted versions ------------------------ - Starknet - `0.14.0 `_ - RPC - `0.9.0 `_ ``starknet_py.net.client_models`` Changes ----------------------------------------- .. py:currentmodule:: starknet_py.net.client_models 1. Renamed :class:`PendingBlockHeader` to :class:`PreConfirmedBlockHeader`, changed field ``parent_hash`` to ``block_number``. 2. Renamed :class:`PendingStarknetBlock` to :class:`PreConfirmedStarknetBlock` 3. Renamed :class:`PendingStarknetBlockWithTxHashes` to :class:`PreConfirmedStarknetBlockWithTxHashes` 4. Renamed :class:`PendingStarknetBlockWithReceipts` to :class:`PreConfirmedStarknetBlockWithReceipts` 5. Renamed :class:`PendingBlockStateUpdate` to :class:`PreConfirmedBlockStateUpdate` 6. Enum :class:`BlockStatus` variant ``PENDING`` removed, added ``PRE_CONFIRMED`` 7. Enum :class:`TransactionFinalityStatus`, added variant ``PRE_CONFIRMED`` 8. Enum :class:`TransactionStatus` variant ``REJECTED`` removed, added ``CANDIDATE``, ``PRE_CONFIRMED`` 9. :class:`MessageStatus`: ``finality_status`` field is now of type :class:`TransactionFinalityStatus`. 10. Removed :class:`MessageFinalityStatus`. 11. :class:`BlockStatus`: removed ``REJECTED`` variant. 12. Added ``l1_accepted`` variant for ``BlockTag``. 13. Removed fields ``block_number`` and ``block_hash`` from :class:`TransactionReceipt` 14. Added a dedicated class :class:`TransactionReceiptWithBlockInfo`, a subclass of :class:`TransactionReceipt`, that has non-optional field ``block_number`` and optional field ``block_hash``. ``starknet_py.net.client`` Changes ---------------------------------- .. py:currentmodule:: starknet_py.net.client 1. :meth:`Client.get_storage_proof`: replaced param ``block_id`` with ``block_hash`` and ``block_number``. 2. :meth:`Client.wait_for_tx` will now wait until transaction ``finality_status`` is either ``ACCEPTED_ON_L2`` or ``ACCEPTED_ON_L1``. 3. :meth:`Client.wait_for_tx` will no longer raise ``TransactionRejectedError``, see the method docs for details. 4. :meth:`Client.get_messages_status`: changed ``transaction_hash`` type from ``str`` to ``Hash``. 5. Changed return type of :meth:`Client.get_transaction_receipt` to :class:`~starknet_py.net.client_models.TransactionReceiptWithBlockInfo`. 6. Changed return type of :meth:`Client.wait_for_tx` to :class:`~starknet_py.net.client_models.TransactionReceiptWithBlockInfo`. ``starknet_py.net.websockets.websocket_client`` Changes ------------------------------------------------------- .. py:currentmodule:: starknet_py.net.websockets.websocket_client 1. Removed ``subscribe_pending_transactions`` method and respective notification. 2. Added :meth:`WebsocketClient.subscribe_new_transactions` and :meth:`WebsocketClient.subscribe_new_transaction_receipts` and respective notifications. 3. Added field ``finality_status`` to :meth:`WebsocketClient.subscribe_events`, changed ``NewEventsNotification`` that is used in the handler inner type to contain finalty status. ``starknet_py.net.account.account`` Changes ------------------------------------------- .. py:currentmodule:: starknet_py.net.account.account 1. When no ``token_address`` is specified in the :meth:`Account.get_balance` method, the default token address is now the STRK fee contract instead of ETH. 2. Rename ``FEE_CONTRACT_ADDRESS`` to ``ETH_FEE_CONTRACT_ADDRESS``. ``starknet_py.contract`` Changes ------------------------------------------- .. py:currentmodule:: starknet_py.contract 1. Added missing ``tip`` and ``auto_estimate_tip`` to :meth:`ContractFunction.invoke_v3`. Transaction Tip Support ----------------------- Ability to pass tip for the transaction has been added to following methods. If ``tip`` is not provided, a default value of ``0`` will be used .. py:currentmodule:: starknet_py.contract - :meth:`DeclareResult.deploy_v3` - :meth:`PreparedFunctionInvokeV3.invoke` - :meth:`Contract.declare_v3` - :meth:`Contract.deploy_contract_v3` .. py:currentmodule:: starknet_py.net.account.account - :meth:`Account.sign_invoke_v3` - :meth:`Account.sign_declare_v3` - :meth:`Account.sign_deploy_account_v3` - :meth:`Account.execute_v3` - :meth:`Account.deploy_account_v3` Additionally, dataclasses representing transactions now require passing a tip. No default value is used for tip and it is a required parameter. .. py:currentmodule:: starknet_py.net.models.transaction - :class:`InvokeV3`, tip is now required - :class:`DeclareV3`, tip is now required - :class:`DeployAccountV3`, tip is now required Transaction Tip Estimation -------------------------- .. py:currentmodule:: starknet_py.net.tip 1. Added :func:`estimate_tip` for automatic transaction tip estimation. 2. Added ``auto_estimate_tip`` param to :class:`~starknet_py.net.account.account.Account` and :class:`~starknet_py.contract.Contract` methods that accept a ``tip`` argument. If set to ``True``, median of tips from the ``pre_confirmed`` block will be used to estimate select at tip. Deployment with UDC ------------------- .. py:currentmodule:: starknet_py.net.udc_deployer.deployer 1. Default deployer address in :class:`Deployer` is now the new UDC (``0x02ceed65a4bd731034c01113685c831b01c15d7d432f71afb1cf1634b53a2125``). Other Changes ------------- .. currentmodule:: starknet_py.devnet_utils.devnet_client 1. ``unit`` param in :meth:`DevnetClient.mint` now defaults to ``PriceUnit.FRI``. .. py:currentmodule:: starknet_py.net.signer.eth_signer 2. :class:`EthSigner` implementation has been added. 0.28.0 Bugfixes --------------- .. py:currentmodule:: starknet_py.contract 1. Contracts which include fixed sized array type are now correctly serialized (e.g. when using :meth:`Contract.deploy_contract_v3`) *************************** 0.28.0-rc.4 Migration guide *************************** Version 0.28.0-rc.4 of **starknet.py** comes with support for RPC 0.9.0 (without the support for changes in the Websockets methods). .. currentmodule:: starknet_py.net.client_models 1. Removed fields ``block_number`` and ``block_hash`` from :class:`TransactionReceipt` 2. Added a dedicated class :class:`TransactionReceiptWithBlockInfo`, a subclass of :class:`TransactionReceipt`, that has non-optional field ``block_number`` and optional field ``block_hash``. .. currentmodule:: starknet_py.net.client 3. Changed return type of :meth:`Client.get_transaction_receipt` to :class:`~starknet_py.net.client_models.TransactionReceiptWithBlockInfo`. 4. Changed return type of :meth:`Client.wait_for_tx` to :class:`~starknet_py.net.client_models.TransactionReceiptWithBlockInfo`. *************************** 0.28.0-rc.3 Migration guide *************************** .. py:currentmodule:: starknet_py.net.account.account 1. When no ``token_address`` is specified in the :meth:`Account.get_balance` method, the default token address now defaults to the STRK fee contract instead of ETH. 2. Rename ``FEE_CONTRACT_ADDRESS`` to ``ETH_FEE_CONTRACT_ADDRESS``. .. currentmodule:: starknet_py.devnet_utils.devnet_client 3. ``unit`` param in :meth:`DevnetClient.mint` now defaults to ``PriceUnit.FRI``. .. py:currentmodule:: starknet_py.net.signer.eth_signer 4. :class:`EthSigner` implementation has been added. *************************** 0.28.0-rc.2 Migration guide *************************** Version 0.28.0-rc.2 of **starknet.py** comes with support for RPC 0.9.0-rc.2! .. py:currentmodule:: starknet_py.net.client_models 1. :class:`MessageStatus`: ``finality_status`` field is now of type :class:`TransactionFinalityStatus`. 2. Removed :class:`MessageFinalityStatus`. 3. :class:`BlockStatus`: removed ``REJECTED`` variant. 4. Added ``l1_accepted`` variant for ``BlockTag``. Tip Estimations --------------- .. py:currentmodule:: starknet_py.net.tip 1. :func:`estimate_tip` will now use ``latest`` block instead of ``pre_confirmed`` if no block is provided *************************** 0.28.0-rc.1 Migration guide *************************** Version 0.28.0-rc.1 of **starknet.py** comes with support for automatic transaction tip estimation. Tip Estimation -------------- .. py:currentmodule:: starknet_py.net.tip 1. Added :func:`estimate_tip` for automatic transaction tip estimation. 2. Added ``auto_estimate_tip`` param to :class:`~starknet_py.net.account.account.Account` and :class:`~starknet_py.contract.Contract` methods that accept a ``tip`` argument. If set to ``True``, median of tips from the ``pre_confirmed`` block will be used to estimate select at tip. Deployment via UDC ------------------ .. py:currentmodule:: starknet_py.net.udc_deployer.deployer 1. Default deployer address in :class:`Deployer` is now the new UDC (``0x02ceed65a4bd731034c01113685c831b01c15d7d432f71afb1cf1634b53a2125``). 0.28.0-rc.1 Bugfixes --------------------- .. py:currentmodule:: starknet_py.contract 1. Contracts which include fixed sized array type are now correctly serialized (e.g. when using :meth:`Contract.deploy_contract_v3`) *************************** 0.28.0-rc.0 Migration guide *************************** Version 0.28.0-rc.0 of **starknet.py** comes with support for RPC 0.9.0-rc.1! ``starknet_py.net.client_models`` --------------------------------- .. py:currentmodule:: starknet_py.net.client_models 1. Renamed :class:`PendingBlockHeader` to :class:`PreConfirmedBlockHeader`, changed field ``parent_hash`` to ``block_number``. 2. Renamed :class:`PendingStarknetBlock` to :class:`PreConfirmedStarknetBlock` 3. Renamed :class:`PendingStarknetBlockWithTxHashes` to :class:`PreConfirmedStarknetBlockWithTxHashes` 4. Renamed :class:`PendingStarknetBlockWithReceipts` to :class:`PreConfirmedStarknetBlockWithReceipts` 5. Renamed :class:`PendingBlockStateUpdate` to :class:`PreConfirmedBlockStateUpdate` 6. Enum :class:`BlockStatus` variant ``PENDING`` removed, added ``PRE_CONFIRMED`` 7. Enum :class:`TransactionFinalityStatus`, added variant ``PRE_CONFIRMED`` 8. Enum :class:`TransactionStatus` variant ``REJECTED`` removed, added ``CANDIDATE``, ``PRE_CONFIRMED`` ``starknet_py.net.client`` -------------------------- .. py:currentmodule:: starknet_py.net.client 1. :meth:`Client.get_storage_proof`: replaced param ``block_id`` with ``block_hash`` and ``block_number``. 2. :meth:`Client.wait_for_tx` will now wait until transaction ``finality_status`` is either ``ACCEPTED_ON_L2`` or ``ACCEPTED_ON_L1``. 3. :meth:`Client.wait_for_tx` will no longer raise ``TransactionRejectedError``, see the method docs for details. 4. :meth:`Client.get_messages_status`: changed ``transaction_hash`` type from ``str`` to ``Hash``. Tip Support ----------- Ability to pass tip for the transaction has been added to following methods. If ``tip`` is not provided, a default value of ``0`` will be used .. py:currentmodule:: starknet_py.contract - :meth:`DeclareResult.deploy_v3` - :meth:`PreparedFunctionInvokeV3.invoke` - :meth:`Contract.declare_v3` - :meth:`Contract.deploy_contract_v3` .. py:currentmodule:: starknet_py.net.account.account - :meth:`Account.sign_invoke_v3` - :meth:`Account.sign_declare_v3` - :meth:`Account.sign_deploy_account_v3` - :meth:`Account.execute_v3` - :meth:`Account.deploy_account_v3` Additionally, dataclasses representing transactions now require passing a tip. No default value is used for tip and it is a required parameter. .. py:currentmodule:: starknet_py.net.models.transaction - :class:`InvokeV3`, tip is now required - :class:`DeclareV3`, tip is now required - :class:`DeployAccountV3`, tip is now required ********************** 0.27.0 Migration guide ********************** .. py:currentmodule:: starknet_py.net.signer.ledger_signer 1. Support for clear signing with :class:`LedgerSigner` has been added. It's now the default signing mode (see :class:`LedgerSigningMode`). 2. ``derivation_path_str`` param has been removed from :class:`LedgerSigner` constructor, while ``account_id``, ``application_name`` and ``signing_mode`` params have been added. 0.27.0 Bugfixes --------------- 1. ABI parser supports now fixed size arrays. .. py:currentmodule:: starknet_py.net.client_models 2. ``l1_address`` in :class:`L2ToL1Message` now accepts felts when deserializing. ********************** 0.26.2 Migration guide ********************** .. py:currentmodule:: starknet_py.net.full_node_client 1. If an incompatible RPC version is detected between the node and :class:`FullNodeClient`, a warning will be emitted. ********************** 0.26.1 Migration guide ********************** .. py:currentmodule:: starknet_py.net.client_models 1. Restored ``amount_multiplier`` and ``unit_price_multiplier`` params in :meth:`EstimatedFee.to_resource_bounds()` 2. Using Braavos accounts is temporarily disabled because they don't work with starknet 0.13.5. Please read the `official post `_ for more details. 0.26.1 Bugfixes --------------- 1. In :class:`FunctionInvocation`, ``execution_resources`` field is now of type :class:`InnerCallExecutionResources`. ********************** 0.26.0 Migration guide ********************** Version 0.26.0 of **starknet.py** comes with support for RPC 0.8.1! 0.26.0 Targeted versions ------------------------ - Starknet - `0.13.5 `_ - RPC - `0.8.1 `_ .. py:currentmodule:: starknet_py.net.full_node_client 1. New methods have been added: :meth:`~FullNodeClient.get_storage_proof`, :meth:`~FullNodeClient.get_messages_status` and :meth:`~FullNodeClient.get_compiled_casm`. .. py:currentmodule:: starknet_py.net.client_models 2. ``failure_reason`` field has been added to :class:`TransactionStatusResponse`. 3. ``execution_resources`` and ``is_reverted`` fields have been added to :class:`FunctionInvocation`. .. py:currentmodule:: starknet_py.net.websockets.websocket_client 4. Added :class:`WebsocketClient` which allows to interact with websockets API. 0.26.0 Breaking changes ----------------------- 1. ``l1_resource_bounds`` parameter (in transaction methods) has been renamed to ``resource_bounds``, its type has also changed from :class:`~starknet_py.net.client_models.ResourceBounds` to :class:`~starknet_py.net.client_models.ResourceBoundsMapping`. .. py:currentmodule:: starknet_py.net.client_models 2. :class:`ComputationResources` and :class:`DataResources` have been removed. 3. :class:`ExecutionResources`, :class:`EstimatedFee` have been modified according to new RPC specification. 4. Submitting transactions other than v3 is not possible anymore. 0.26.0 Bugfixes --------------- .. py:currentmodule:: starknet_py.net.executable_models 1. Fixed typo in :class:`TestLessThanOrEqualAddress` class name and schema data key. .. py:currentmodule:: starknet_py.contract 2. Fixed an issue in :meth:`Contract.deploy_contract_v3` where omitting the ``abi`` param caused the node to return an error indicating that the contract was not found. ****************************** 0.26.0-rc.1 Migration guide ****************************** The latest release candidate compatible with Starknet's JSON-RPC v0.8.0. 0.26.0-rc.1 Bugfixes -------------------- .. py:currentmodule:: starknet_py.net.executable_models 1. Fixed typo in :class:`TestLessThanOrEqualAddress` class name and schema data key. .. py:currentmodule:: starknet_py.contract 2. Fixed an issue in :meth:`Contract.deploy_contract_v3` where omitting the ``abi`` param caused the node to return an error indicating that the contract was not found. ****************************** 0.26.0-rc.0 Migration guide ****************************** The latest release candidate compatible with Starknet's JSON-RPC v0.8.0. 0.26.0-rc.0 Targeted versions ------------------------------ - Starknet - `0.13.4 `_ - RPC - `0.8.0 `_ 1. ``l1_resource_bounds`` parameter (in transaction methods) has been renamed to ``resource_bounds``, its type has also changed from :class:`~starknet_py.net.client_models.ResourceBounds` to :class:`~starknet_py.net.client_models.ResourceBoundsMapping`. .. py:currentmodule:: starknet_py.net.full_node_client 2. New methods have been added: :meth:`~FullNodeClient.get_storage_proof`, :meth:`~FullNodeClient.get_messages_status` and :meth:`~FullNodeClient.get_compiled_casm`. .. py:currentmodule:: starknet_py.net.client_models 3. :class:`ComputationResources` and :class:`DataResources` have been removed. 4. :class:`ExecutionResources`, :class:`EstimatedFee` have been modified according to new RPC specification. 5. ``failure_reason`` field has been added to :class:`TransactionStatusResponse`. 6. ``execution_resources`` and ``is_reverted`` fields have been added to :class:`FunctionInvocation`. 7. Submitting transactions other than v3 is not possible anymore. ****************************** 0.25.0 Migration guide ****************************** This version of starknet.py requires Python 3.9 as a minimum version. .. currentmodule:: starknet_py.cairo.data_types 1. Added :class:`NonZeroType` in order to fix parsing ABI which contains Cairo`s `core::zeroable::NonZero `_. 2. Added `SNIP-9 `_ support to :class:`~starknet_py.net.account.account.Account`. Now it's possible to create a :class:`~starknet_py.net.client_models.Call` for outside execution using :meth:`~starknet_py.net.account.account.Account.sign_outside_execution_call`. 3. All methods and classes which use transactions other than v3 are now deprecated. 0.25.0 Minor changes -------------------- 1. Added ``keys`` field to :class:`EventType` which contains the list of event fields marked with ``#[key]`` in Cairo code. ****************************** 0.24.3 Migration guide ****************************** 0.24.3 Minor changes -------------------- 1. Updated `crypto-cpp-py `_ to version ``1.4.5``. .. currentmodule:: starknet_py.net.signer.ledger_signer 2. Ledger support (see :class:`LedgerSigner`) is now optional. To use it, install the package with ``poetry install -E ledger``. ****************************** 0.24.2 Migration guide ****************************** 0.24.2 Minor changes -------------------- .. currentmodule:: starknet_py.net.signer.stark_curve_signer 1. Added :meth:`KeyPair.generate` method which allows to generate key pair based on cryptographically strong pseudo-random number. .. currentmodule:: starknet_py.contract 2. ``abi`` parameter is now optional in :meth:`Contract.deploy_contract_v3`. 3. Added quickfix for ``u96`` parsing for both pre and post ``2.8.0`` Cairo versions. ****************************** 0.24.1 Migration guide ****************************** This version contains a quick fix to parsing ABI for Cairo v2 contracts. Due to new release of compiler, ``u96`` is now compiled to `BoundedInt` in ABI. 0.24.1 Minor changes -------------------- 1. Fixed parsing ABI that contains ``u96`` data type. 2. Fixed ``l1_address`` deserialization in ``L2toL1MessageSchema``. ****************************** 0.24.0 Migration guide ****************************** .. currentmodule:: starknet_py.devnet_utils.devnet_client 1. :class:`DevnetClient` has been implemented to interact with additional features of the `starknet-devnet-rs `_ .. currentmodule:: starknet_py.net.signer.ledger_signer 2. :class:`LedgerSigner` has been implemented to enable signing with Ledger hardware wallet 0.24.0 Targeted versions ------------------------ - Starknet - `0.13.1.1 `_ - RPC - `0.7.1 `_ 0.24.0 Breaking changes ----------------------- .. currentmodule:: starknet_py.net.client_models 1. :class:`CompiledContract` and :class:`ContractClass` have been renamed to :class:`DeprecatedCompiledContract` and :class:`DeprecatedContractClass`. 2. :class:`ContractClassSchema` have been renamed to :class:`DeprecatedContractClassSchema` ****************************** 0.23.0 Migration guide ****************************** Version 0.23.0 of **starknet.py** comes with support for `SNIP-12 `_! 0.23.0 Targeted versions ------------------------ - Starknet - `0.13.1.1 `_ - RPC - `0.7.1 `_ 0.23.0 Breaking changes ----------------------- .. currentmodule:: starknet_py.utils.typed_data 1. :class:`StarkNetDomain` has been renamed to :class:`Domain` 2. :class:`TypedData` field ``domain`` has been changed from ``dict`` to :class:`Domain` 3. :class:`Parameter` is now abstract - :class:`StandardParameter`, :class:`EnumParameter` and :class:`MerkleTreeParameter` should be used 0.23.0 Minor changes ----------------------- .. currentmodule:: starknet_py.net.account.account 1. :meth:`Account.sign_message` now accepts parameter ``typed_data`` as both :class:`~starknet_py.utils.typed_data.TypedData` and :class:`~starknet_py.net.models.typed_data.TypedDataDict` 2. :meth:`Account.verify_message` now accepts parameter ``typed_data`` as both :class:`~starknet_py.utils.typed_data.TypedData` and :class:`~starknet_py.net.models.typed_data.TypedDataDict` 3. :meth:`~starknet_py.net.signer.stark_curve_signer.KeyPair.from_keystore` has been added ****************************** 0.22.0 Migration guide ****************************** 0.22.0 Targeted versions ------------------------ - Starknet - `0.13.1.1 `_ - RPC - `0.7.1 `_ 0.22.0 Breaking changes ----------------------- 1. Support for Goerli has been removed .. currentmodule:: starknet_py.net.models 2. ``StarknetChainId.SEPOLIA_TESTNET`` has been renamed to :class:`StarknetChainId.SEPOLIA` .. currentmodule:: starknet_py.net.account.account 3. Parameter ``chain`` has been removed from the methods :meth:`Account.deploy_account_v1` and :meth:`Account.deploy_account_v3` 4. Parameter ``chain_id`` has been removed from the method :meth:`~Account.get_balance` 5. :class:`~starknet_py.net.client_models.L1HandlerTransactionTrace` field ``execution_resources`` is now required ****************************** 0.21.0 Migration guide ****************************** Version 0.21.0 of **starknet.py** comes with support for RPC 0.7.0! 0.21.0 Targeted versions ------------------------ - Starknet - `0.13.1 `_ - RPC - `0.7.0 `_ 0.21.0 Breaking changes ----------------------- .. currentmodule:: starknet_py.net.client_models 1. :class:`PendingStarknetBlock` and :class:`PendingStarknetBlockWithTxHashes` field ``parent_block_hash`` has been renamed to ``parent_hash`` 2. :class:`StarknetBlockCommon` has been renamed to :class:`BlockHeader` 3. :class:`StarknetBlock` and :class:`StarknetBlockWithTxHashes` fields ``parent_block_hash`` and ``root`` have been renamed to ``parent_hash`` and ``new_root`` respectively 4. :class:`FunctionInvocation` field ``execution_resources`` has been renamed to ``computation_resources`` 0.21.0 Minor changes ----------------------- 1. :class:`EventsChunk` field ``events`` is now a list of :class:`EmittedEvent` instead of :class:`Event` 2. :class:`ExecutionResources` has a new required field ``data_availability`` 3. :class:`InvokeTransactionTrace`, :class:`DeclareTransactionTrace` and :class:`DeployAccountTransactionTrace` have a new required field ``execution_resources`` 4. :class:`EstimatedFee` has new required fields ``data_gas_consumed`` and ``data_gas_price`` 5. :class:`StarknetBlock`, :class:`PendingStarknetBlock`, :class:`StarknetBlockWithTxHashes`, :class:`PendingStarknetBlockWithTxHashes` have new required fields ``l1_data_gas_price`` and ``l1_da_mode`` 6. :class:`SierraContractClass` has an additional propery ``parsed_abi`` ********************** 0.20.0 Migration guide ********************** Version 0.20.0 of **starknet.py** comes with support for Python 3.12! 0.20.0 Targeted versions ------------------------ - Starknet - `0.13.0 `_ - RPC - `0.6.0 `_ 0.20.0 Breaking changes ----------------------- 1. Type of ``l1_handler`` in :class:`~starknet_py.abi.v2.model.Abi` model class for Cairo 2 has been changed from ``Function`` to ``Dict[str, Function]`` 2. In :ref:`Abi` module the code related to Cairo 0 has been moved from ``starknet_py.abi`` to ``starknet_py.abi.v0`` 3. :class:`StarknetEthProxyCheck` has been removed from the Proxy checks ********************** 0.19.0 Migration guide ********************** Version 0.19.0 of **starknet.py** comes with support for RPC 0.6.0! .. currentmodule:: starknet_py.net.client_models New classes added to mirror the recent changes in the RPC v0.6.0 specification include: :class:`ResourceBoundsMapping`, :class:`ResourceBounds`, :class:`PriceUnit`, :class:`FeePayment`, :class:`DAMode`. Changes in the :class:`~starknet_py.net.account.account.Account`: .. currentmodule:: starknet_py.net.account.account - :meth:`~Account.execute` has been renamed to :meth:`~Account.execute_v1` - :meth:`~Account.execute_v3` has been added - :meth:`~Account.deploy_account` has been renamed to :meth:`~Account.deploy_account_v1` - :meth:`~Account.deploy_account_v3` has been added - :meth:`~Account.sign_declare_v3`, :meth:`~Account.sign_deploy_account_v3` and :meth:`~Account.sign_invoke_v3` have been added - :meth:`sign_declare_transaction`, :meth:`sign_declare_v2_transaction`, :meth:`sign_deploy_account_transaction` and :meth:`sign_invoke_transaction` have been renamed to :meth:`~Account.sign_declare_v1`, :meth:`~Account.sign_declare_v2`, :meth:`~Account.sign_deploy_account_v1` and :meth:`~Account.sign_invoke_v1` respectively All new functions with ``v3`` in their name operate similarly to their ``v1`` and ``v2`` counterparts. Unlike their ``v1`` counterparts however, ``v3`` transaction fees are paid in Fri (10^-18 STRK). Therefore, ``max_fee`` parameter, which is typically set in Wei, is not applicable for ``v3`` functions. Instead, ``l1_resource_bounds`` parameter is utilized to limit the Fri amount used. The same applies to the new ``v3`` methods in the :class:`~starknet_py.contract.Contract` class. Changes in the :class:`~starknet_py.net.full_node_client.FullNodeClient`: .. currentmodule:: starknet_py.net.full_node_client - :meth:`~FullNodeClient.estimate_fee` has a new parameter ``skip_validate`` - :meth:`~FullNodeClient.declare` accepts ``transaction`` argument of the type :class:`~starknet_py.net.models.transaction.DeclareV3` - :meth:`~FullNodeClient.send_transaction` accepts ``transaction`` argument of the type :class:`~starknet_py.net.models.transaction.InvokeV3` - :meth:`~FullNodeClient.deploy_account` accepts ``transaction`` argument of the type :class:`~starknet_py.net.models.transaction.DeployAccountV3` Changes in the :class:`~starknet_py.contract.Contract`: .. currentmodule:: starknet_py.contract - :meth:`Contract.declare` has been replaced by :meth:`Contract.declare_v1`, :meth:`Contract.declare_v2` and :meth:`Contract.declare_v3` - :meth:`Contract.deploy_contract` has been replaced by :meth:`Contract.deploy_contract_v1` and :meth:`Contract.deploy_contract_v3`. Optional parameters ``unique`` and ``salt`` have been added to both methods - :meth:`ContractFunction.prepare` has been replaced by :meth:`ContractFunction.prepare_invoke_v1`, :meth:`ContractFunction.prepare_invoke_v3` and :meth:`ContractFunction.prepare_call` - :meth:`ContractFunction.invoke` has been replaced by :meth:`ContractFunction.invoke_v1` and :meth:`ContractFunction.invoke_v3` - :meth:`PreparedFunctionCall` has now only methods :meth:`PreparedFunctionCall.call` and :meth:`PreparedFunctionCall.call_raw` - :meth:`PreparedFunctionInvokeV1` and :meth:`PreparedFunctionInvokeV3` with methods ``invoke`` and ``estimate_fee`` have been added - :meth:`DeclareResult.deploy` has been replaced by :meth:`DeclareResult.deploy_v1` and :meth:`DeclareResult.deploy_v3` 0.19.0 Targeted versions ------------------------ - Starknet - `0.13.0 `_ - RPC - `0.6.0 `_ 0.19.0 Breaking changes ----------------------- Other breaking changes not mentioned above. .. currentmodule:: starknet_py.net.client_models 1. :class:`GatewayClient` all related classes and fields have been removed. 2. Client ``net`` property has been removed. 3. :class:`Declare`, :class:`DeployAccount` and :class:`Invoke` have been renamed to :class:`~starknet_py.net.models.transaction.DeclareV1`, :class:`~starknet_py.net.models.transaction.DeployAccountV1` and :class:`~starknet_py.net.models.transaction.InvokeV1` respectively. 4. :class:`TransactionReceipt` field ``execution_resources`` has been changed from ``dict`` to :class:`ExecutionResources`. 5. :class:`TransactionReceipt` fields ``status`` and ``rejection_reason`` have been removed. 6. :class:`TransactionStatus`, :class:`TransactionExecutionStatus` and :class:`TransactionFinalityStatus` have been changed to have the same structure as in RPC specification. 7. :class:`EstimatedFee` has a new required field ``unit``. 8. :class:`EstimatedFee` field ``gas_usage`` has been renamed to ``gas_consumed``. 9. :class:`FunctionInvocation` has a new required field ``execution_resources``. 10. :class:`ResourcePrice` field ``price_in_strk`` has been renamed to ``price_in_fri`` and has now become required. 11. :class:`ResourceLimits` class has been renamed to :class:`ResourceBounds`. 12. :class:`~starknet_py.net.account.base_account.BaseAccount` and :class:`~starknet_py.net.account.account.Account` property ``supported_transaction_version`` has been removed. 13. ``wait_for_accept`` parameter in :meth:`Client.wait_for_tx` and :meth:`SentTransaction.wait_for_acceptance` has been removed. 14. :class:`InvokeTransaction` has been replaced by :class:`InvokeTransactionV0` and :class:`InvokeTransactionV1`. 15. :class:`DeclareTransaction` has been replaced by :class:`DeclareTransactionV0`, :class:`DeclareTransactionV1` and :class:`DeclareTransactionV3`. 16. :class:`DeployAccountTransaction` has been replaced by :class:`DeployAccountTransactionV1`. 0.19.0 Minor changes -------------------- 1. :class:`L1HandlerTransaction` field ``nonce`` is now required. 2. :class:`TransactionReceipt` fields ``actual_fee``, ``finality_status``, ``execution_status``, ``execution_resources`` and ``type`` are now required. 0.19.0 Development-related changes ---------------------------------- Test execution has been transitioned to the new `starknet-devnet-rs `_. To adapt to this change, it should be installed locally and added to the ``PATH``. Further information regarding this change can be found in the `Development `_ section. ********************** 0.18.3 Migration guide ********************** Version 0.18.3 of **starknet.py** comes with support for RPC 0.5.1! 0.18.3 Targeted versions ------------------------ - Starknet - `0.12.2 `_ - RPC - `0.5.1 `_ 0.18.3 Breaking changes ----------------------- 1. Support for ``TESTNET2`` network has been removed. .. currentmodule:: starknet_py.net.client 2. :meth:`FullNodeClient.get_pending_transactions` method has been removed. It is advised to use :meth:`FullNodeClient.get_block` method with ``block_number="pending"`` argument. .. currentmodule:: starknet_py.net.client_models 3. :class:`PendingStarknetBlock` field ``parent_hash`` is now named ``parent_block_hash``. 4. :class:`FunctionInvocation` fields ``events`` and ``messages`` have been changed from ``List[Event]`` and ``List[L2toL1Message]`` to ``List[OrderedEvent]`` and ``List[OrderedMessage]`` respectively. 5. ``cairo_version`` parameter in :meth:`Account.sign_invoke_transaction` and :meth:`Account.execute` has been removed. 0.18.3 Minor changes -------------------- 1. :class:`StarknetBlock`, :class:`StarknetBlockWithTxHashes`, :class:`PendingStarknetBlock` and :class:`PendingStarknetBlockWithTxHashes` now have two additional fields: ``starknet_version`` and ``l1_gas_price``. 2. :class:`PendingStarknetBlock` and :class:`PendingStarknetBlockWithTxHashes` fields ``timestamp``, ``sequencer_address`` and ``parent_block_hash`` are now required, not optional. 3. :class:`TransactionReceipt` now has an additional field - ``message_hash`` (for ``L1_HANDLER_TXN_RECEIPT``). 4. Most fields in ``TransactionTrace`` classes are now optional. 5. :class:`InvokeTransactionTrace`, :class:`DeclareTransactionTrace`, :class:`DeployAccountTransactionTrace` and :class:`L1HandlerTransactionTrace` classes now have an additional field - ``state_diff``. | .. raw:: html
| ********************** 0.18.2 Migration guide ********************** Version 0.18.2 of **starknet.py** comes with support of `RPC v0.4.0 `_ Trace API! Additionally, you can now `properly` use Cairo1 accounts! ``starknet.py`` automatically checks if your account is in Cairo1 and sets the calldata encoding accordingly. 0.18.2 Targeted versions ------------------------ - Starknet - `0.12.2 `_ - RPC - `0.4.0 `_ 0.18.2 Breaking changes ----------------------- .. currentmodule:: starknet_py.net.client 1. :meth:`Client.get_block_traces` has been renamed to :meth:`Client.trace_block_transactions` in order to match RPC specification. 0.18.2 Deprecations ------------------- .. currentmodule:: starknet_py.net.account.account 1. ``cairo_version`` parameter in :meth:`Account.sign_invoke_transaction` and :meth:`Account.execute` has been deprecated. 0.18.2 Bugfixes --------------- .. currentmodule:: starknet_py.contract 1. Fixed a bug when using ``proxy_config=True`` in :meth:`Contract.from_address` method regarding ``Entry point EntryPointSelector(...) not found in contract``. 0.18.2 Minor changes -------------------- 1. :meth:`Client.trace_block_transactions` return type has been changed from ``BlockTransactionTraces`` to ``Union[BlockTransactionTraces, List[BlockTransactionTrace]]``. .. currentmodule:: starknet_py.net.gateway_client 2. ``include_block`` parameter in :meth:`GatewayClient.get_state_update` now works on gateway mainnet. .. currentmodule:: starknet_py.net.account.account 3. :class:`BaseAccount` interface and :class:`Account` now have an additional **async** property - ``cairo_version``. 0.18.2 Development-related changes ---------------------------------- 1. In order to be able to run tests, you must set some environmental variables: - ``INTEGRATION_RPC_URL`` - ``TESTNET_RPC_URL`` - ``INTEGRATION_ACCOUNT_PRIVATE_KEY`` - ``INTEGRATION_ACCOUNT_ADDRESS`` - ``TESTNET_ACCOUNT_PRIVATE_KEY`` - ``TESTNET_ACCOUNT_ADDRESS`` The best way to do that is to create ``test-variables.env`` file in ``starknet_py/tests/e2e/`` directory, so they can be loaded by the ``python-dotenv`` library. You can find an example file ``test-variables.env.template`` in the same directory with the format of how it should look like. | .. raw:: html
| ********************** 0.18.1 Migration guide ********************** .. currentmodule:: starknet_py.net.gateway_client This version contains a quick fix to :meth:`GatewayClient.get_state_update` method (mainnet wasn't updated to 0.12.2 then). .. currentmodule:: starknet_py.net.account.account Additionally, accounts in Cairo1 are now supported! You can pass additional argument ``cairo_version`` to :meth:`Account.sign_invoke_transaction` method. 0.18.1 Minor changes -------------------- 1. Parameter ``include_block`` in :meth:`GatewayClient.get_state_update` doesn't work on mainnet gateway (an error is thrown). .. currentmodule:: starknet_py.net.account.account 2. :meth:`Account.sign_invoke_transaction` now accepts additional parameter ``cairo_version``, which allows specifying which type of calldata encoding should be used. | .. raw:: html
| ********************** 0.18.0 Migration guide ********************** This version of starknet.py brings support Starknet 0.12.1, 0.12.2 and `RPC v0.4.0 `_! 1. :class:`TransactionReceipt` dataclass properties have been changed (more details in RPC specification linked above). 0.18.0 Deprecations ------------------- .. currentmodule:: starknet_py.net.client_models 1. ``status`` field in :class:`TransactionReceipt` returned by :meth:`FullNodeClient.get_transaction_receipt` has been deprecated. 0.18.0 Minor changes -------------------- .. currentmodule:: starknet_py.net.full_node_client 1. :meth:`FullNodeClient.get_transaction_receipt` now returns two additional fields: ``acceptance_status`` and ``finality_status``. .. currentmodule:: starknet_py.net.client_models 2. Added two fields to :class:`TransactionReceipt` - ``revert_error`` (Gateway) and ``revert_reason`` (FullNode). 3. ``hash`` property in :class:`Transaction` is now optional. 4. Added missing field ``contract_address_salt`` to :class:`DeployTransaction`. .. currentmodule:: starknet_py.net.client 5. Lowered ``check_interval`` parameter default value in :meth:`Client.wait_for_tx` from 5 seconds to 2. .. currentmodule:: starknet_py.net.client_models 6. Added fields to dataclasses that previously were missing (e.g. ``contract_address_salt`` in :class:`DeployTransaction`). .. currentmodule:: starknet_py.cairo.felt 7. :func:`decode_shortstring` now is returned without ``\x00`` in front of the decoded string. .. currentmodule:: starknet_py.net.gateway_client 8. Added two new methods to :class:`GatewayClient` - :meth:`GatewayClient.get_public_key` and :meth:`GatewayClient.get_signature`. 9. :meth:`GatewayClient.get_state_update` now accepts additional parameter - `include_block`. .. currentmodule:: starknet_py.net.signer.stark_curve_signer 10. :class:`KeyPair` and :meth:`KeyPair.from_private_key` now can accept keys in string representation. 0.18.0 Bugfixes --------------- 1. Fixed invalid type in :class:`BlockStateUpdate` from ``StateDiff`` to ``Union[StateDiff, GatewayStateDiff]`` 2. Fixed ``Contract not found`` error in ``AbiResolver`` | .. raw:: html
| ********************** 0.17.0 Migration guide ********************** With Starknet 0.12.0, the ``PENDING`` transaction status has been removed. :class:`Contract` now supports contracts written in **Cairo1** in both old and new syntax. To create an instance of such contract, a keyword parameter ``cairo_version=1`` in the Contract constructor is required. .. note:: Please note that while using the interface with `Cairo1` contracts, it is possible for problems to occur due to some of the types being not yet implemented in the parser. In such case, please open an issue at our `GitHub `_ or contract us on `Starknet Discord server `_ in ``#🐍 | starknet-py`` channel. .. currentmodule:: starknet_py.net.gateway_client :class:`GatewayClient` and Gateway / Feeder Gateway API will become deprecated in the future. As a result, :class:`GatewayClient` won't work and will eventually be removed. Consider migrating to :ref:`FullNodeClient`. .. currentmodule:: starknet_py.net.full_node_client :class:`FullNodeClient` RPC specification has been updated from `v0.3.0-rc1 `_ to `v0.3.0 `_. .. currentmodule:: starknet_py.contract Also, four methods were added to its interface: - :meth:`FullNodeClient.get_block_number` - :meth:`FullNodeClient.get_block_hash_and_number` - :meth:`FullNodeClient.get_chain_id` - :meth:`FullNodeClient.get_syncing_status` 0.17.0 Breaking changes ----------------------- 1. Deprecated function ``compute_invoke_hash`` in :mod:`starknet_py.net.models.transaction` has been removed in favor of :func:`starknet_py.hash.transaction.compute_invoke_transaction_hash`. .. currentmodule:: starknet_py.net.udc_deployer.deployer 2. Removed deprecated ``Deployer.create_deployment_call`` and ``Deployer.create_deployment_call_raw`` in favor of :meth:`Deployer.create_contract_deployment` and :meth:`Deployer.create_contract_deployment_raw`. 3. Removed ``PENDING`` transaction status. 0.17.0 Minor changes -------------------- .. currentmodule:: starknet_py.contract 1. :meth:`DeclareResult.deploy`, :meth:`PreparedFunctionCall.invoke`, :meth:`PreparedFunctionCall.estimate_fee`, :meth:`ContractFunction.invoke`, :meth:`Contract.declare` and :meth:`Contract.deploy_contract` can now accept custom ``nonce`` parameter. .. currentmodule:: starknet_py.net.account.account 2. :meth:`Account.sign_invoke_transaction`, :meth:`Account.sign_declare_transaction`, :meth:`Account.sign_declare_v2`, :meth:`Account.sign_deploy_account_transaction` and :meth:`Account.execute` can now accept custom ``nonce`` parameter. 3. :meth:`Account.get_nonce` can now be parametrized with ``block_number`` or ``block_hash``. 4. :meth:`Account.get_balance` can now be parametrized with ``block_number`` or ``block_hash``. RPC related changes: .. currentmodule:: starknet_py.net.client_models 5. :class:`L2toL1Message` dataclass now has an additional field: ``from_address``. 6. :class:`TransactionReceipt` dataclass now has two additional, optional fields: ``type`` and ``contract_address``. .. currentmodule:: starknet_py.net.full_node_client 7. :meth:`FullNodeClient.get_events` ``keys`` and ``address`` parameters type are now optional. 8. :meth:`FullNodeClient.get_events` ``keys`` parameter can now also accept integers as felts. .. currentmodule:: starknet_py.net.models 9. :class:`StarknetChainId` changed from ``Enum`` to ``IntEnum``. .. currentmodule:: starknet_py.net.client 10. :meth:`Client.wait_for_tx` has a new parameter ``retries`` describing the amount of retries before a time out when querying for a transaction. 0.17.0 Deprecations ------------------- .. currentmodule:: starknet_py.net.client 1. `wait_for_accept` parameter in :meth:`Client.wait_for_tx` and :meth:`SentTransaction.wait_for_acceptance` has been deprecated. 0.17.0 Bugfixes --------------- .. currentmodule:: starknet_py.hash.class_hash 1. Fixed a bug when :func:`compute_class_hash` mutated the ``contract_class`` argument passed to a function. | .. raw:: html
| ********************** 0.16.1 Migration guide ********************** Version 0.16.1 of **starknet.py** brings the long-awaited **Windows** support! Additionally, this release brings support for `RPC v0.3.0rc1 `_! 0.16.1 Breaking changes ----------------------- .. currentmodule:: starknet_py.net.full_node_client 1. :meth:`FullNodeClient.get_events` ``keys`` parameter type is now ``List[List[str]]`` instead of ``List[str]``. 2. :meth:`FullNodeClient.get_state_update` return type has been changed from ``StateUpdate`` to ``Union[BlockStateUpdate, PendingBlockStateUpdate]`` .. currentmodule:: starknet_py.net.client_models 3. :class:`StateDiff` dataclass properties have been changed (more details in RPC specification linked above). 0.16.1 Minor changes -------------------- .. currentmodule:: starknet_py.net.client 1. :meth:`Client.estimate_fee` can take a single transaction or a list of transactions to estimate. | .. raw:: html
| ********************** 0.16.0 Migration guide ********************** Version 0.16.0 of **starknet.py** comes with support for Python 3.8, 3.9, 3.10 and 3.11! The ``cairo-lang`` package has been removed as a dependency. Also, dependencies are now optimized to include only necessary packages. 0.16.0 Bugfixes --------------- .. currentmodule:: starknet_py.net.udc_deployer.deployer 1. Fixed a bug where :meth:`Deployer.create_contract_deployment_raw` would use a random salt, when ``salt = 0`` was passed. 0.16.0 Breaking changes ----------------------- .. currentmodule:: starknet_py.net.account.base_account 1. :meth:`BaseAccount.verify_message` is no longer ``async``. .. currentmodule:: starknet_py.hash.utils 2. Some functions' implementation has been changed to use ``crypto-cpp-py`` package: - :func:`pedersen_hash` - :func:`private_to_stark_key` - :func:`message_signature` - :func:`verify_message_signature` 3. Deprecated ``utils.data_transformer`` module has been removed. Use :ref:`Serializers` module instead. 4. Deprecated ``is_felt_pointer`` and ``is_uint256`` functions have been removed. Use :ref:`TypeParser` class instead. 5. Deprecated ``Compiler`` module has been removed. Use an external compilation tool (e.g. Starknet CLI) instead. 6. Deprecated ``compilation_source`` and ``search_paths`` arguments has been removed from several methods. Use ``compiled_contract`` parameter instead. .. currentmodule:: starknet_py.contract 7. Deprecated ``ContractData.identifier_manager`` has been removed. Use :meth:`ContractData.parsed_abi` instead. .. currentmodule:: starknet_py.net.signer 8. Removed deprecated ``typed_data`` parameter as dict in :meth:`BaseSigner.sign_message`. Use :ref:`TypedData` dataclass from ``starknet_py.utils.typed_data``. 9. ``starknet_py.utils.crypto`` module has been removed. 10. Changed name of ``starknet_py.transaction_exceptions`` to ``starknet_py.transaction_errors`` to match other files. .. admonition:: Potentially breaking changes :class: attention Internal code of :meth:`starknet_py.abi.AbiParser.parse` has changed. It should not affect users but keep in mind that the Contract can have difficulties resolving ABI. If so, please report. | .. raw:: html
| ********************** 0.15.0 Migration guide ********************** 0.15.0 adds initial support for Starknet 0.11.0 and related changes. It also makes the first step to remove the cairo-lang package as starknet.py dependency! Some classes/functions from cairo-lang package are rewritten and are a part of starknet.py: - :ref:`transaction dataclasses ` - ``get_selector_from_name`` and ``get_storage_var_address`` functions - ``DeclaredContract`` is now :ref:`ContractClass ` - ``compute_class_hash`` function Python version -------------- Unfortunately, as a result of adaptation to support `cairo-lang` newest package, **support for Python 3.8.X has been dropped**. The only supported Python version is 3.9. 0.15.0 Deprecations ------------------- - ``compute_invoke_hash`` is deprecated in favour of ``compute_transaction_hash`` - ``starknet_py.common.create_contract_class`` is deprecated in favour of ``starknet_py.common.create_compiled_contract`` - Client :meth:`~starknet_py.net.client.Client.net` property. - :meth:`~starknet_py.net.udc_deployer.deployer.Deployer.create_deployment_call` is deprecated in favour of :meth:`~starknet_py.net.udc_deployer.deployer.Deployer.create_contract_deployment` 0.15.0 Breaking changes ----------------------- 1. ``InvokeFunction`` is replaced by the ``Invoke`` dataclass (behaviour is the same, just the name is changed). 2. Removed from client_models.py: - Invoke, - InvokeFunction, - StarknetTransaction, - AccountTransaction, - ContractClass, - Declare, - DeployAccount. 3. Transaction's ``tx_type`` field is renamed to ``type``. 4. The ``types.py`` is removed (outdated file containing only imports): - import ``decode_shortstring`` and ``encode_shortstring`` from ``starknet_py.cairo.felt``, - import ``Invoke`` and ``Transaction`` from ``starknet_py.net.models.transaction``, - import ``parse_address`` from ``starknet_py.net.models.address``, - import ``net_address_from_net`` from ``starknet_py.net.networks``. 5. Changes in the location of some of the functions: .. list-table:: :widths: 25 25 50 :header-rows: 1 * - Function - Old Path - New Path * - compute_address - starknet_py.net.models.address - starknet_py.hash.address * - compute_transaction_hash, compute_deploy_account_transaction_hash, compute_declare_transaction_hash - starknet_py.utils.crypto.transaction_hash - starknet_py.hash.transaction * - compute_hash_on_elements - starknet_py.utils.crypto.facade - starknet_py.hash.utils * - message_signature - starknet_py.utils.crypto.facade - starknet_py.hash.utils * - pedersen_hash - starknet_py.utils.crypto.facade - starknet_py.hash.utils * - - - * - compute_class_hash - starkware.starknet.core.os.class_hash - starknet_py.hash.class_hash * - get_selector_from_name - starkware.starknet.public.abi - starknet_py.hash.selector * - get_storage_var_address - starkware.starknet.public.abi - starknet_py.hash.storage 6. Removed deprecated ``AccountClient`` 7. Removed support for making transactions with version 0. - Removed ``Deploy`` transaction. - Removed deprecated ``make_declare_tx``. 8. Removed ``client`` argument from Contract :meth:`~starknet_py.contract.Contract.__init__` and :meth:`~starknet_py.contract.Contract.from_address`. Use ``provider`` argument instead. 9. Removed ``net.l1`` L1<>L2 messaging module. 10. Added `chain_id` argument to BaseAccount interface and implementation :meth:`~starknet_py.net.account.base_account.BaseAccount.get_balance` method. 11. Changed Client :meth:`~starknet_py.net.client.Client.get_class_by_hash` return type to ``Union[ContractClass, SierraContractClass]``. 12. Replaced ``contract_address`` with ``sender_address`` in: - :class:`starknet_py.net.client_models.InvokeTransaction` - :class:`starknet_py.net.models.transaction.Invoke` - ``compute_invoke_hash`` 13. Replaced ``BlockStateUpdate.state_diff.declared_contract_hashes`` is now a list of ``DeclaredContractHash`` representing new Cairo classes. Old declared contract classes are still available at ``BlockStateUpdate.state_diff.deprecated_declared_contract_hashes``. 14. Removed ``version`` property from ``PreparedFunctionCall`` class. 15. Removed deprecated ``max_steps`` in :class:`~starknet_py.proxy.contract_abi_resolver.ProxyConfig`. 16. Removed ``supported_transaction_version`` property from ``BaseAccount`` abstract class. Transaction dataclasses ----------------------- All transaction's dataclasses can be imported from the ``starknet_py.net.models.transaction`` module. The main differences between them and those from the Cairo-lang: - ``tx_type`` field is renamed to ``type``, - fields are not validated while creating. All of them can be used as usual. ContractClass ------------- ``DeclaredContract`` has been renamed to ``ContractClass``. There also exists ``CompiledContract`` dataclass, which specifies **abi** attribute to be required. | .. raw:: html
| ********************** 0.14.0 Migration guide ********************** This version deprecates several modules and fixes underlying issues with several others. 0.14.0 Breaking changes ----------------------- 1. Renamed first parameter of :class:`~starknet_py.net.udc_deployer.deployer.ContractDeployment` from ``udc`` to ``call``, that is returned from :meth:`~starknet_py.net.udc_deployer.deployer.Deployer.create_deployment_call`. 0.14.0 Deprecations ------------------- 1. `compiler` module. It will be removed in the future. We recommend transitioning to building contracts through Starknet CLI or external tools and using only compiled contracts with starknet.py. 2. ``utils.data_transformer`` module. It has been replaced with :ref:`serializers` module. Serializers module ------------------ New :ref:`serializers` module has been added in place of old ``data_transformer``. See :ref:`Serialization` guide for more details. auto_estimate ------------- The way **automatic fee estimation is calculated** has changed from ``transaction estimated fee * 1.1`` to ``transaction estimated fee * 1.5`` when using ``auto_estimate`` parameter in API functions (for example :meth:`~starknet_py.net.account.account.Account.execute`, :meth:`~starknet_py.net.account.account.Account.sign_invoke_transaction` or :meth:`~starknet_py.contract.PreparedFunctionCall.invoke`). It was caused by many transactions failing due to low ``max_fee``. .. note:: It is now possible to set the value by which the estimated fee is multiplied, by changing ``ESTIMATED_FEE_MULTIPLIER`` in :class:`~starknet_py.net.account.account.Account`. | .. raw:: html
| ********************** 0.13.0 Migration guide ********************** This version deprecates the :class:`AccountClient `, which is a major change to the starknet.py. It is replaced with new :class:`BaseAccount ` ABC and its default implementation :class:`Account `. Unlike ``AccountClient``, an ``Account`` is not a :class:`Client ` anymore. This means that methods like ``get_storage_at``, ``call_contract`` etc. are not available in the Account interface. However, ``Account`` now exposes a ``.client`` property, which means using an ``Account`` is just as simple as ``AccountClient`` was. For example: .. literalinclude:: ../starknet_py/tests/e2e/docs/migration_guide/test_account_comparison.py :language: python :dedent: 4 :start-after: docs-1: start :end-before: docs-1: end .. literalinclude:: ../starknet_py/tests/e2e/docs/migration_guide/test_account_comparison.py :language: python :dedent: 4 :start-after: docs-2: start :end-before: docs-2: end .. literalinclude:: ../starknet_py/tests/e2e/docs/migration_guide/test_account_comparison.py :language: python :dedent: 4 :start-after: docs-3: start :end-before: docs-3: end Replacing inheritance with composition simplifies the ``Account`` interface and will make maintaining ``Account`` simpler. Changes in the Account interface -------------------------------- 1. Removed ``hash_message`` method. Use :meth:`TypedData.message_hash ` directly instead. 2. ``Account`` doesn't expose a ``net`` property. 3. ``Account`` doesn't accept a ``supported_tx_version`` parameter. It currently always uses version 1. 4. Some parameters like ``max_fee`` or ``auto_estimate`` are now keyword only arguments. They have to be explicitly named like ``account.sign_invoke_transaction(Call(...), max_fee=1000)``. Writing ``account.sign_invoke_transaction(Call(...), 1000)`` will not work. 0.13.0 Deprecations ------------------- 1. Passing a dict to ``BaseSigner.sign_message`` as parameter has been deprecated in favor of :class:`TypedData ` dataclass. 2. Argument ``client`` of ``Contract`.__init__` and ``Contract.from_address`` has been deprecated and replaced with ``provider``. 3. Starknet <> Ethereum Messaging module has been deprecated. 4. ``PreparedFunctionCall.arguments`` has been deprecated to simplify the upcoming ``serialization`` module. 0.13.0 Breaking changes ----------------------- 1. ``version`` parameter has been removed from the most ``Contract`` methods. ``Contract`` will now use version that the ``Account`` or ``AccountClient`` is using. 2. ``DeclareResult`` now only accepts :class:`BaseAccount `. 3. ``invoke_tx`` has been removed from the ``Client.call_contract`` parameters. ``call`` should be used instead. 4. All error messages have been standardized with capitalization at the beginning and a full stop at the end. | .. raw:: html
| ********************** 0.12.0 Migration guide ********************** starknet.py 0.12.0 brings support for the Cairo-lang 0.10.3 and the new TESTNET2 chainId. 0.12.0 Breaking Changes ----------------------- There should not be any breaking changes if you are using the `StarknetChainId` imported from the `starknet_py.net.models`, but if you are importing it from the Cairo-lang package, please switch to the one from starknet.py. | .. raw:: html
| ********************** 0.11.0 Migration guide ********************** Cairo-lang 0.10.3 dropped support for the `Deploy` transaction. To be compatible we had to remove some deprecated features. 0.11.0 Breaking Changes ----------------------- Removed APIs: - `Contract.deploy`. Read more about deployment in the `Deploying contracts `_ section. - `AccountClient.create_account`. `Account creation `_ docs are here to help you! - `Client.deploy` method (from the interface and all implementations) - `make_deploy_tx` - `compute_deploy_hash` - the `Deploy` transaction Invoke Transaction ------------------ Old `InvokeFunction` transaction is now aliased as `Invoke`. We suggest to start using the new `Invoke`. | .. raw:: html
| ********************** 0.9.0 Migration guide ********************** starknet.py 0.9.0 brings support for `RPC 0.2.0 `_, updates :meth:`Contract.from_address` method to work with the newest proxies and removes some deprecated features. 0.9.0 Breaking Changes ---------------------- - Removed deprecated `Account.sign_transaction`. Use new `Account.sign_invoke_transaction`. - Removed deprecated `InvokeFunction` as `call_contract` parameter. Use `Call` class instead. - `StateDiff` has `declared_contract_hashes` instead of `declared_contracts` field (only name has changed). - Support for RPC 0.1.0 has been dropped in favour of RPC 0.2.0. Contract.from_address --------------------- Check out the Guide with the new section :ref:`Resolving proxy contracts` to see how to easily use proxies with the starknet.py. | .. raw:: html
| ********************** 0.8.0 Migration guide ********************** Cairo-lang 0.10.1 brings support for `DEPLOY_ACCOUNT` transactions that will completely replace currently used `DEPLOY` transactions sometime in the future. You should already modify your applications to use new deployment flow to either support deployments using new flow: 1. Declare a contract on Starknet using `Declare` transaction 2. Pre-fund the address of new account with enough tokens to cover transaction costs 3. Send a `DeployAccount` transaction with the pre-funded address or support deploying through syscall or `Universal Deployer Contract `_. 0.8.0 Breaking Changes ---------------------- - `entry_point_selector` has been removed from `v1` transactions. `InvokeTransaction`'s field has been changed to `Optional[int]` - `net.models.address.compute_address` signature has been changed and use of keyword arguments is now mandatory - `Client.estimate_fee` ABC now also accepts `DeployAccount` transaction as `tx` parameter. Custom clients should be updated to reflect this change. 0.8.0 Deprecations ------------------ - `Contract.deploy` has been deprecated in favor of new `DeployAccount` flow - `Client.deploy` has been deprecated | .. raw:: html
| ********************** 0.5.0 Migration guide ********************** ``cairo-lang`` 0.10.0 brings a lot of new exciting changes, like: - new cairo syntax, - new transaction version (1), - new ``__validate__`` endpoint in accounts. ``starknet.py`` 0.5.0 has an experimental support for new features and tries to minimize number of breaking changes for users who want to use the old transaction version (0). Please note that support for this transaction version will be removed in the future. .. note:: There is no need to upgrade ``starknet.py`` to the newest version because the old one is still compatible with Starknet. However, an upgrade is required to use the new features. 0.5.0 Breaking Changes ----------------------- New Cairo syntax ^^^^^^^^^^^^^^^^^^^^^^^ With the update of `cairo-lang `_ to version ``0.10.0``, the syntax of contracts written in cairo changes significantly. You can see the new syntax `here `_. As a result, the **old syntax is no longer supported**. .. note:: This only applies to you if you compile your cairo programs using starknet.py. If you use programs that are already compiled you don't need to worry. For the already existent programs to be compatible with the new Starknet version, they would have to be migrated using ``cairo-migrate`` command from CLI. It is a part of `cairo-lang` package. To migrate old syntax to the old one in place run: .. code-block:: > cairo-migrate FILES_LIST -i See `cairo-lang release notes `_ for more details about the new syntax. Python versions ^^^^^^^^^^^^^^^ We drop support for python 3.7.X, following `cairo-lang` support. You must use python 3.8+ to use starknet.py 0.5.0. InvokeFunction and Declare ^^^^^^^^^^^^^^^^^^^^^^^^^^ A new required parameter, ``nonce``, was added to them. Use ``None`` for transaction version = 0 and a proper nonce value for new transaction version = 1. New Transaction version ----------------------- Cairo 0.10.0 brings a transaction version = 1: - `Deploy` transactions are no longer available, - user accounts need to have `__validate__` and `__validate_declare__` functions, - transactions have different fields, - contracts have a native nonce field available. You can still use the old transaction version, but please note it will be removed in the future. Please refer to deprecation warnings to see required changes. For now both (0 nad 1) transaction versions will be accepted but there will be a ``DeprecationWarning`` while using version 0. AccountClient constructor ------------------------- AccountClient's constructor has a new parameter now. ``supported_tx_version`` is used to differentiate between old and new accounts. It is set to 0 as default so there is no need to set it while using old account. .. note:: In the future versions default value of ``supported_tx_version`` will be changed to 1. This will happen when transaction version = 0 is removed. Deprecated Features ------------------- InvokeFunction as call_contract parameter ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``InvokeFunction`` has been deprecated as a call_contract parameter. Users should use ``Call`` instead. Transaction version 0 ^^^^^^^^^^^^^^^^^^^^^ Although transactions version 0 are still valid, users should switch to Accounts supporting transaction version 1. AccountClient's methods ^^^^^^^^^^^^^^^^^^^^^^^ The following :ref:`AccountClient`'s methods has been deprecated: - :meth:`~starknet_py.net.account.account_client.AccountClient.prepare_invoke_function`, :meth:`~starknet_py.net.account.account_client.AccountClient.sign_invoke_transaction` should be used instead. - :meth:`~starknet_py.net.account.account_client.AccountClient.sign_transaction`, :meth:`~starknet_py.net.account.account_client.AccountClient.sign_invoke_transaction` should be used instead. Unsigned declare transaction ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``make_declare_tx`` is deprecated, because in the future versions of Starknet unsigned declare transactions will not be supported. :meth:`~starknet_py.net.account.account_client.AccountClient.sign_declare_transaction` should be used to create and sign declare transaction. Deploy transaction ^^^^^^^^^^^^^^^^^^ Deploy transactions will not be supported in the future versions of Starknet, so ``make_deploy_tx`` is deprecated. Contracts should be deployed through cairo syscall. | .. raw:: html
| ********************** 0.4.0 Migration guide ********************** 0.4.0 of starknet.py brings multiple changes including breaking changes to API. To ensure smooth migration to this version please familiarize yourself with this migration guide. Overlook of the changes ----------------------- 0.4.0 brings support for the `Starknet rpc interface `_. This required us to introduce some big changes to the clients. API methods has remained mostly the same, but their parameters changed. Also, we've introduced custom dataclasses for every endpoint, that are simplified from these from ``cairo-lang`` library. This provides uniform interface for both Starknet gateway (only supported way of interacting with Starknet in previous starknet.py versions), as well as JSON-RPC. Clients ------- Client has been separated into two specialized modules. * Use ``GatewayClient`` to interact with Starknet like you did in previous starknet.py versions * Use :ref:`FullNodeClient` to interact with JSON-RPC .. note:: It is no longer possible to create an instance of ``Client``. Doing so will cause errors in runtime. API Changes ----------- Client methods has had some of the parameters removed, so it provided uniform interface for both gateway and rpc methods. Please refer to ``GatewayClient`` and :ref:`FullNodeClient` to see what has changed. There is no longer add_transaction method in the Client interface. It was renamed to send_transaction. .. note:: Please note that send_transaction only sends a transaction, it doesn't sign it, even when using AccountClient. Sending transactions -------------------- Sending transactions is currently only supported in ``GatewayClient``. We've also changed the flow of creating transactions through clients: ``Client.deploy`` and ``Client.declare`` no longer accept contract source as their input. Instead they require a prepared transactions. These can be created using ``Transactions`` module .. code-block:: python from starknet_py.transactions.declare import make_declare_tx client = GatewayClient("testnet") contract_source_code = "..." declare_tx = make_declare_tx(compilation_source=contract_source_code) await client.declare(declare_tx) Interface of :ref:`Contract` remains unchanged and it is still the recommended way of using starknet.py AccountClient ------------- :ref:`AccountClient` now implements Client interface: parameters of some of its methods were changed. It also doesn't have add_transaction method (like the rest of the clients). Quick summary about the new methods: - prepare_invoke_function - it can be used to create InvokeFunction from one or few calls (without signature) - sign_transaction - takes list of calls and creates signed InvokeFunction from them - send_transaction - implements Client interface (takes Invoke function and sends it without changes) - execute - can take list of calls, sign them and send Client errors changes --------------------- `BadRequest` class has been removed and replaced with :ref:`Client errors` module and :class:`starknet_py.net.client_errors.ClientError` or more specified errors can now be used for handling client errors. See :ref:`Handling client errors` in guide for an example. Facade.py --------- `sign_calldata` method has been removed entirely. See guide on how how you can now prepare and send transactions to Starknet. Contract changes ---------------- Transaction's status is not checked while invoking through Contract interface, because RPC write API doesn't return "code" parameter. To check if the transaction passed use wait_for_acceptance on InvokeResult.