Skip to content

Commit 5851f12

Browse files
committed
comment documentation test to check if that is what affects test account balance
1 parent aceded7 commit 5851f12

File tree

1 file changed

+56
-56
lines changed

1 file changed

+56
-56
lines changed
Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,69 @@
1-
import pytest
1+
# import pytest
22

3-
from starknet_py.net.account.account import Account
4-
from starknet_py.net.client_models import TransactionFinalityStatus
3+
# from starknet_py.net.account.account import Account
4+
# from starknet_py.net.client_models import TransactionFinalityStatus
55

66

7-
@pytest.mark.asyncio
8-
async def test_account_outside_execution_any_caller(
9-
client,
10-
argent_account_class_hash,
11-
deployed_balance_contract,
12-
deploy_account_details_factory,
13-
):
14-
# pylint: disable=import-outside-toplevel,too-many-locals
15-
address, key_pair, salt, class_hash = await deploy_account_details_factory.get(
16-
class_hash=argent_account_class_hash, argent_calldata=True
17-
)
7+
# @pytest.mark.asyncio
8+
# async def test_account_outside_execution_any_caller(
9+
# client,
10+
# argent_account_class_hash,
11+
# deployed_balance_contract,
12+
# deploy_account_details_factory,
13+
# ):
14+
# # pylint: disable=import-outside-toplevel,too-many-locals
15+
# address, key_pair, salt, class_hash = await deploy_account_details_factory.get(
16+
# class_hash=argent_account_class_hash, argent_calldata=True
17+
# )
1818

19-
deploy_result = await Account.deploy_account_v1(
20-
address=address,
21-
class_hash=class_hash,
22-
salt=salt,
23-
key_pair=key_pair,
24-
client=client,
25-
constructor_calldata=[key_pair.public_key, 0],
26-
max_fee=int(1e18),
27-
)
28-
await deploy_result.wait_for_acceptance()
29-
account = deploy_result.account
19+
# deploy_result = await Account.deploy_account_v1(
20+
# address=address,
21+
# class_hash=class_hash,
22+
# salt=salt,
23+
# key_pair=key_pair,
24+
# client=client,
25+
# constructor_calldata=[key_pair.public_key, 0],
26+
# max_fee=int(1e18),
27+
# )
28+
# await deploy_result.wait_for_acceptance()
29+
# account = deploy_result.account
3030

31-
# docs: start
32-
import datetime
31+
# # docs: start
32+
# import datetime
3333

34-
from starknet_py.constants import ANY_CALLER
35-
from starknet_py.hash.selector import get_selector_from_name
36-
from starknet_py.net.client_models import Call, ExecutionTimeBounds
34+
# from starknet_py.constants import ANY_CALLER
35+
# from starknet_py.hash.selector import get_selector_from_name
36+
# from starknet_py.net.client_models import Call, ExecutionTimeBounds
3737

38-
# Create a call to increase the balance by 100. That will be executed
39-
# as part of external execution
38+
# # Create a call to increase the balance by 100. That will be executed
39+
# # as part of external execution
4040

41-
increase_balance_call = Call(
42-
to_addr=deployed_balance_contract.address,
43-
selector=get_selector_from_name("increase_balance"),
44-
calldata=[0],
45-
)
41+
# increase_balance_call = Call(
42+
# to_addr=deployed_balance_contract.address,
43+
# selector=get_selector_from_name("increase_balance"),
44+
# calldata=[0],
45+
# )
4646

47-
# Create a special signed execution call. This call can now be executed by
48-
# the caller specified. In this case, caller is ANY_CALLER, a special constant
49-
# that allows any caller to execute the call.
50-
call = await account.sign_outside_execution_call(
51-
calls=[
52-
increase_balance_call,
53-
],
54-
execution_time_bounds=ExecutionTimeBounds(
55-
execute_after=datetime.datetime.now() - datetime.timedelta(hours=1),
56-
execute_before=datetime.datetime.now() + datetime.timedelta(hours=1),
57-
),
58-
caller=ANY_CALLER,
59-
)
47+
# # Create a special signed execution call. This call can now be executed by
48+
# # the caller specified. In this case, caller is ANY_CALLER, a special constant
49+
# # that allows any caller to execute the call.
50+
# call = await account.sign_outside_execution_call(
51+
# calls=[
52+
# increase_balance_call,
53+
# ],
54+
# execution_time_bounds=ExecutionTimeBounds(
55+
# execute_after=datetime.datetime.now() - datetime.timedelta(hours=1),
56+
# execute_before=datetime.datetime.now() + datetime.timedelta(hours=1),
57+
# ),
58+
# caller=ANY_CALLER,
59+
# )
6060

61-
# Execute the call as a normal invoke transaction
62-
tx = await account.execute_v1(calls=[call], max_fee=int(1e18))
63-
await account.client.wait_for_tx(tx.transaction_hash)
61+
# # Execute the call as a normal invoke transaction
62+
# tx = await account.execute_v1(calls=[call], max_fee=int(1e18))
63+
# await account.client.wait_for_tx(tx.transaction_hash)
6464

65-
# docs: end
65+
# # docs: end
6666

67-
receipt = await account.client.get_transaction_receipt(tx_hash=tx.transaction_hash)
67+
# receipt = await account.client.get_transaction_receipt(tx_hash=tx.transaction_hash)
6868

69-
assert receipt.finality_status == TransactionFinalityStatus.ACCEPTED_ON_L2
69+
# assert receipt.finality_status == TransactionFinalityStatus.ACCEPTED_ON_L2

0 commit comments

Comments
 (0)