Skip to content

Commit bf9d0df

Browse files
committed
Fix tests
1 parent 87adcb2 commit bf9d0df

File tree

4 files changed

+16
-23
lines changed

4 files changed

+16
-23
lines changed

starknet_py/tests/e2e/fixtures/clients.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,3 @@
66
@pytest.fixture(name="client", scope="package")
77
def create_full_node_client(devnet) -> FullNodeClient:
88
return FullNodeClient(node_url=devnet + "/rpc")
9-
10-
11-
@pytest.fixture(name="client_fork_mode", scope="package")
12-
def create_full_node_client_fork_mode(devnet_fork_mode) -> FullNodeClient:
13-
return FullNodeClient(node_url=devnet_fork_mode + "/rpc")

starknet_py/tests/e2e/tests_on_networks/client_devnet/fixtures/clients.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,3 @@
66
@pytest.fixture(name="devnet_client", scope="package")
77
def create_devnet_client(devnet) -> DevnetClient:
88
return DevnetClient(node_url=devnet + "/rpc")
9-
10-
11-
@pytest.fixture(name="devnet_client_fork_mode", scope="package")
12-
def create_devnet_client_fork_mode(devnet_forking_mode) -> DevnetClient:
13-
return DevnetClient(node_url=devnet_forking_mode + "/rpc")
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/sh
22

3-
curl -d '{"action":"press-and-release"}' http://127.0.0.1:5000/button/right # Go to version screen
4-
curl -d '{"action":"press-and-release"}' http://127.0.0.1:5000/button/right # Go to settings screen
5-
curl -d '{"action":"press-and-release"}' http://127.0.0.1:5000/button/both # Go to blind signing screen
6-
curl -d '{"action":"press-and-release"}' http://127.0.0.1:5000/button/both # Allow blind signing
7-
curl -d '{"action":"press-and-release"}' http://127.0.0.1:5000/button/left # Go to "Back" screen
8-
curl -d '{"action":"press-and-release"}' http://127.0.0.1:5000/button/both # Return to main screen
3+
curl -d '{"action":"press-and-release"}' http://127.0.0.1:5001/button/right # Go to version screen
4+
curl -d '{"action":"press-and-release"}' http://127.0.0.1:5001/button/right # Go to settings screen
5+
curl -d '{"action":"press-and-release"}' http://127.0.0.1:5001/button/both # Go to blind signing screen
6+
curl -d '{"action":"press-and-release"}' http://127.0.0.1:5001/button/both # Allow blind signing
7+
curl -d '{"action":"press-and-release"}' http://127.0.0.1:5001/button/left # Go to "Back" screen
8+
curl -d '{"action":"press-and-release"}' http://127.0.0.1:5001/button/both # Return to main screen

starknet_py/tests/unit/signer/test_ledger_signer.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from starknet_py.tests.e2e.fixtures.accounts import mint_token_on_devnet
1212
from starknet_py.tests.e2e.fixtures.constants import (
1313
MAX_RESOURCE_BOUNDS,
14+
MAX_RESOURCE_BOUNDS_L1,
1415
STRK_FEE_CONTRACT_ADDRESS,
1516
)
1617

@@ -197,7 +198,7 @@ async def _get_account_balance_strk(client: FullNodeClient, address: int):
197198
platform == "win32",
198199
reason="Testing Ledger is skipped on Windows due to different Speculos setup.",
199200
)
200-
async def test_deploy_account_and_transfer(client_fork_mode):
201+
async def test_deploy_account_and_transfer(client):
201202
# pylint: disable=import-outside-toplevel, reimported, redefined-outer-name, too-many-locals
202203
# docs-deploy-account-and-transfer: start
203204
from starknet_py.contract import Contract
@@ -208,15 +209,15 @@ async def test_deploy_account_and_transfer(client_fork_mode):
208209

209210
rpc_client = FullNodeClient(node_url="https://your.node.url")
210211
# docs-deploy-account-and-transfer: end
211-
rpc_client = client_fork_mode
212+
rpc_client = client
212213
# docs-deploy-account-and-transfer: start
213214
signer = LedgerSigner(
214215
chain_id=StarknetChainId.SEPOLIA,
215216
)
216217
# argent v0.4.0 class hash
217-
class_hash = 0x36078334509B514626504EDC9FB252328D1A240E4E948BEF8D0C08DFF45927F
218-
salt = 2
219-
calldata = [0, signer.public_key, 1]
218+
class_hash = 0x061DAC032F228ABEF9C6626F995015233097AE253A7F72D68552DB02F2971B8F
219+
salt = 1
220+
calldata = [signer.public_key]
220221
address = compute_address(
221222
salt=salt,
222223
class_hash=class_hash,
@@ -243,7 +244,7 @@ async def test_deploy_account_and_transfer(client_fork_mode):
243244
class_hash=class_hash,
244245
contract_address_salt=salt,
245246
constructor_calldata=calldata,
246-
auto_estimate=True,
247+
l1_resource_bounds=MAX_RESOURCE_BOUNDS_L1,
247248
)
248249

249250
await rpc_client.deploy_account(signed_tx)
@@ -258,7 +259,9 @@ async def test_deploy_account_and_transfer(client_fork_mode):
258259
provider=account, address=STRK_FEE_CONTRACT_ADDRESS
259260
)
260261
invocation = await contract.functions["transfer"].invoke_v3(
261-
recipient_address, 100, auto_estimate=True
262+
recipient_address,
263+
100,
264+
l1_resource_bounds=MAX_RESOURCE_BOUNDS_L1,
262265
)
263266
await invocation.wait_for_acceptance()
264267
# docs-deploy-account-and-transfer: end

0 commit comments

Comments
 (0)