|
1 | 1 | Migration guide |
2 | 2 | =============== |
3 | 3 |
|
| 4 | +********************** |
| 5 | +0.18.2 Migration guide |
| 6 | +********************** |
| 7 | + |
| 8 | +Version 0.18.2 of **starknet.py** comes with support of `RPC v0.4.0 <https://github.com/starkware-libs/starknet-specs/releases/tag/v0.4.0>`_ Trace API! |
| 9 | +Additionally, you can now `properly` use Cairo1 accounts! ``starknet.py`` automatically checks if your account is in Cairo1 and |
| 10 | +sets the calldata encoding accordingly. |
| 11 | + |
| 12 | +0.18.2 Targeted versions |
| 13 | +------------------------ |
| 14 | + |
| 15 | +- Starknet - `0.12.2 <https://community.starknet.io/t/introducing-p2p-authentication-and-mismatch-resolution-in-v0-12-2/97993>`_ |
| 16 | +- RPC - `0.4.0 <https://github.com/starkware-libs/starknet-specs/releases/tag/v0.4.0>`_ |
| 17 | + |
| 18 | +0.18.2 Breaking changes |
| 19 | +----------------------- |
| 20 | + |
| 21 | +.. currentmodule:: starknet_py.net.client |
| 22 | + |
| 23 | +1. :meth:`Client.get_block_traces` has been renamed to :meth:`Client.trace_block_transactions` in order to match RPC specification. |
| 24 | + |
| 25 | + |
| 26 | +0.18.2 Deprecations |
| 27 | +------------------- |
| 28 | + |
| 29 | +.. currentmodule:: starknet_py.net.account.account |
| 30 | + |
| 31 | +1. ``cairo_version`` parameter in :meth:`Account.sign_invoke_transaction` and :meth:`Account.execute` has been deprecated. |
| 32 | + |
| 33 | + |
| 34 | +0.18.2 Bugfixes |
| 35 | +--------------- |
| 36 | + |
| 37 | +.. currentmodule:: starknet_py.contract |
| 38 | + |
| 39 | +1. Fixed a bug when using ``proxy_config=True`` in :meth:`Contract.from_address` method regarding ``Entry point EntryPointSelector(...) not found in contract``. |
| 40 | + |
| 41 | +0.18.2 Minor changes |
| 42 | +-------------------- |
| 43 | + |
| 44 | +1. :meth:`Client.trace_block_transactions` return type has been changed from ``BlockTransactionTraces`` to ``Union[BlockTransactionTraces, List[BlockTransactionTrace]]``. |
| 45 | + |
| 46 | +.. currentmodule:: starknet_py.net.gateway_client |
| 47 | + |
| 48 | +2. ``include_block`` parameter in :meth:`GatewayClient.get_state_update` now works on gateway mainnet. |
| 49 | + |
| 50 | +.. currentmodule:: starknet_py.net.account.account |
| 51 | + |
| 52 | +3. :class:`BaseAccount` interface and :class:`Account` now have an additional **async** property - ``cairo_version``. |
| 53 | + |
| 54 | + |
| 55 | +0.18.2 Development-related changes |
| 56 | +---------------------------------- |
| 57 | + |
| 58 | +1. In order to be able to run tests, you must set some environmental variables: |
| 59 | + |
| 60 | + - ``INTEGRATION_RPC_URL`` |
| 61 | + - ``TESTNET_RPC_URL`` |
| 62 | + - ``INTEGRATION_ACCOUNT_PRIVATE_KEY`` |
| 63 | + - ``INTEGRATION_ACCOUNT_ADDRESS`` |
| 64 | + - ``TESTNET_ACCOUNT_PRIVATE_KEY`` |
| 65 | + - ``TESTNET_ACCOUNT_ADDRESS`` |
| 66 | + |
| 67 | +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. |
| 68 | +You can find an example file ``test-variables.env.template`` in the same directory with the format of how it should look like. |
| 69 | + |
| 70 | + |
| 71 | +| |
| 72 | +
|
| 73 | +.. raw:: html |
| 74 | + |
| 75 | + <hr> |
| 76 | + |
| 77 | +| |
| 78 | +
|
| 79 | +********************** |
| 80 | +0.18.1 Migration guide |
| 81 | +********************** |
| 82 | + |
| 83 | +.. currentmodule:: starknet_py.net.gateway_client |
| 84 | + |
| 85 | +This version contains a quick fix to :meth:`GatewayClient.get_state_update` method (mainnet wasn't updated to 0.12.2 then). |
| 86 | + |
| 87 | +.. currentmodule:: starknet_py.net.account.account |
| 88 | + |
| 89 | +Additionally, accounts in Cairo1 are now supported! You can pass additional argument ``cairo_version`` to :meth:`Account.sign_invoke_transaction` method. |
| 90 | + |
| 91 | + |
| 92 | +0.18.1 Minor changes |
| 93 | +-------------------- |
| 94 | + |
| 95 | +1. Parameter ``include_block`` in :meth:`GatewayClient.get_state_update` doesn't work on mainnet gateway (an error is thrown). |
| 96 | + |
| 97 | +.. currentmodule:: starknet_py.net.account.account |
| 98 | + |
| 99 | +2. :meth:`Account.sign_invoke_transaction` now accepts additional parameter ``cairo_version``, which allows specifying which type of calldata encoding should be used. |
| 100 | + |
| 101 | +| |
| 102 | +
|
| 103 | +.. raw:: html |
| 104 | + |
| 105 | + <hr> |
| 106 | + |
| 107 | +| |
| 108 | +
|
| 109 | + |
4 | 110 | ********************** |
5 | 111 | 0.18.0 Migration guide |
6 | 112 | ********************** |
|
0 commit comments