Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
f91b77c
update gateway trace dataclass
tomek0123456789 Aug 24, 2023
6f3a960
add methods
tomek0123456789 Aug 25, 2023
e6c1ebf
fix enum fields deserialization
tomek0123456789 Aug 30, 2023
9eebe39
add testnet fixtures
tomek0123456789 Aug 30, 2023
ff99670
fix fields in FunctionInvocation
tomek0123456789 Aug 30, 2023
070b37b
add docstrings, hack get_block_traces in fullnode
tomek0123456789 Aug 30, 2023
1dee87b
bump devnet to 0.6.2
tomek0123456789 Sep 4, 2023
9603b03
format
tomek0123456789 Sep 4, 2023
cb1a881
fix fields
tomek0123456789 Sep 4, 2023
0f356c0
hack on simulateTransactions block_hash parameter
tomek0123456789 Sep 4, 2023
f8e7b48
tests touches
tomek0123456789 Sep 4, 2023
70b24d2
Merge branch 'development' of https://github.com/software-mansion/sta…
tomek0123456789 Sep 4, 2023
36d71cf
fix tests for 0.6.2 devnet
tomek0123456789 Sep 6, 2023
5d96231
fix trace api methods
tomek0123456789 Sep 6, 2023
83fc38a
add tests to trace api
tomek0123456789 Sep 6, 2023
9d37066
fix tests
tomek0123456789 Sep 6, 2023
d2fec4f
remove unused import
tomek0123456789 Sep 6, 2023
822ca1e
fix hashes in tests
tomek0123456789 Sep 7, 2023
3f0cc00
fix trace api tests
tomek0123456789 Sep 7, 2023
3b06e67
skip invalid 0.12.2 test
tomek0123456789 Sep 7, 2023
654863f
format
tomek0123456789 Sep 7, 2023
5a96d23
fix test
tomek0123456789 Sep 7, 2023
089c91c
fix test again...
tomek0123456789 Sep 7, 2023
eb4bdad
change weird formatting
tomek0123456789 Sep 7, 2023
6f07cd7
satisfy codecov
tomek0123456789 Sep 8, 2023
a9f1865
review changes
tomek0123456789 Sep 8, 2023
dca0b7f
docs update
tomek0123456789 Sep 8, 2023
1662050
Merge branch 'development' into tomek/981-trace-api
tomek0123456789 Sep 8, 2023
2772aab
fix poetry.lock
tomek0123456789 Sep 8, 2023
dc49188
format
tomek0123456789 Sep 8, 2023
048d885
change node urls to envs
tomek0123456789 Sep 11, 2023
4fc0fac
set env vars in all test runs
tomek0123456789 Sep 11, 2023
b2e3c81
add todo
tomek0123456789 Sep 12, 2023
88815aa
change some variables to be environmental-dependent
tomek0123456789 Sep 12, 2023
e87642c
fix CI secret variables
tomek0123456789 Sep 12, 2023
52f6589
fix docs
tomek0123456789 Sep 12, 2023
3342009
add todos
tomek0123456789 Sep 12, 2023
1972a66
add todo
tomek0123456789 Sep 12, 2023
7f7b2c0
change flags in simulateTransactions to enum
tomek0123456789 Sep 12, 2023
101438f
refactor💀r
tomek0123456789 Sep 12, 2023
62f11c2
add todo
tomek0123456789 Sep 13, 2023
9393df1
change integration tests directory name, fixtures are lazy
tomek0123456789 Sep 13, 2023
9cc58a9
update checks
tomek0123456789 Sep 13, 2023
346fc29
move trace api devnet tests to full_node_test.py
tomek0123456789 Sep 13, 2023
d00d616
update docs
tomek0123456789 Sep 13, 2023
95f667e
update docs tests to not include testnet client
tomek0123456789 Sep 13, 2023
eb0b707
lint :^)
tomek0123456789 Sep 13, 2023
26efad0
rename X_NODE_URL to X_RPC_URL
tomek0123456789 Sep 14, 2023
59c16c1
change fixture name
tomek0123456789 Sep 14, 2023
0c97986
turn dict into class in InvokeTransactionTrace
tomek0123456789 Sep 14, 2023
c8044ad
CONTRACT_COMPILED_DIR -> CONTRACTS_COMPILED_V0_DIR
tomek0123456789 Sep 14, 2023
ee82930
fix duplicate class
tomek0123456789 Sep 14, 2023
1dcaa9e
update test
tomek0123456789 Sep 14, 2023
cfc875d
rename class
tomek0123456789 Sep 14, 2023
9678b18
wtf juno
tomek0123456789 Sep 14, 2023
b89dea7
update migration guide
tomek0123456789 Sep 15, 2023
7eaa9b1
update migration guide
tomek0123456789 Sep 15, 2023
63255a1
raise warning when manifest-path not found
tomek0123456789 Sep 18, 2023
756ae97
more info in development docs
tomek0123456789 Sep 18, 2023
e51d6ed
change workflow name
tomek0123456789 Sep 18, 2023
e560677
info in warning
tomek0123456789 Sep 18, 2023
f5b6e37
change comments
tomek0123456789 Sep 18, 2023
0739828
change comments
tomek0123456789 Sep 18, 2023
02cb5a8
update scripts
tomek0123456789 Sep 18, 2023
84da461
docs development update
tomek0123456789 Sep 18, 2023
3c0016c
formatting
tomek0123456789 Sep 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,22 @@ jobs:
uses: codecov/codecov-action@v3

# ---------------------------------------------------------- #
# ..................RUN-TESTS-INTEGRATION................... #
# ..................RUN-TESTS-ON-NETWORKS................... #
# ---------------------------------------------------------- #

run-tests-integration:
name: Tests on integration
run-tests-on-networks:
name: Tests on networks (testnet and integration)
needs: setup-tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
env:
INTEGRATION_RPC_URL: ${{ secrets.INTEGRATION_RPC_URL }}
TESTNET_RPC_URL: ${{ secrets.TESTNET_RPC_URL }}
INTEGRATION_ACCOUNT_PRIVATE_KEY: ${{ secrets.INTEGRATION_ACCOUNT_PRIVATE_KEY }}
INTEGRATION_ACCOUNT_ADDRESS: ${{ secrets.INTEGRATION_ACCOUNT_ADDRESS }}
TESTNET_ACCOUNT_PRIVATE_KEY: ${{ secrets.TESTNET_ACCOUNT_PRIVATE_KEY }}
TESTNET_ACCOUNT_ADDRESS: ${{ secrets.TESTNET_ACCOUNT_ADDRESS }}
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -281,8 +288,8 @@ jobs:

- name: Run tests
run: |
poetry run poe test_ci_integration_full_node
poetry run poe test_ci_integration_gateway
poetry run poe test_ci_on_networks_full_node
poetry run poe test_ci_on_networks_gateway

- name: Generate coverage in XML
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,4 @@ cython_debug/

# Cairo1 compiler manifest
/starknet_py/tests/e2e/manifest-path
/starknet_py/tests/e2e/test-variables.env
18 changes: 18 additions & 0 deletions docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,31 @@ Make sure running ``poetry run python --version`` returns ``Python 3.9.x``.
Setup
-----

In order to run Cairo1 devnet tests and compile contracts in Cairo1 via poetry command,
you need to create ``manifest-path`` file in ``starknet_py/tests/e2e/`` directory and pass the path in it to Cairo compiler.
An example file - ``manifest-path.template`` is in the same directory. Additional info can be found in `devnet docs <https://0xspaceshard.github.io/starknet-devnet/docs/guide/cairo1-support>`_.

In order to be able to run tests on testnet and integration networks (``starknet_py/tests/e2e/tests_on_networks/``), 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.

.. code-block:: bash

# Install dependencies
poetry install

# Compile contracts
poe compile_contracts
poe compile_contracts_v1
poe compile_contracts_v2

# Make sure everything was installed properly
poe test
Expand Down
85 changes: 85 additions & 0 deletions docs/migration_guide.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,91 @@
Migration guide
===============

**********************
0.18.2 Migration guide
**********************

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!

0.18.2 Targeted versions
------------------------

- Starknet - `0.12.2 <https://community.starknet.io/t/introducing-p2p-authentication-and-mismatch-resolution-in-v0-12-2/97993>`_
- RPC - `0.4.0 <https://github.com/starkware-libs/starknet-specs/releases/tag/v0.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 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.


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

<hr>

|

**********************
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

<hr>

|


**********************
0.18.0 Migration guide
**********************
Expand Down
Loading