Skip to content

Commit

Permalink
use two distinct transaction types in test
Browse files Browse the repository at this point in the history
  • Loading branch information
tkumor3 committed Feb 9, 2024
1 parent 6e5c4b2 commit 62d9b98
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions starknet_py/tests/e2e/account/account_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,27 +120,20 @@ async def test_account_estimate_fee_for_declare_transaction(

@pytest.mark.asyncio
async def test_account_estimate_fee_for_transactions(
account, map_compiled_contract, abi_types_compiled_contract_and_class_hash
account, map_compiled_contract, map_contract
):
nonce = await account.get_nonce(block_hash="pending")
print(nonce)
declare_tx = await account.sign_declare_v1(
compiled_contract=map_compiled_contract, max_fee=MAX_FEE
)

(
compiled_contract,
compiled_class_hash,
) = abi_types_compiled_contract_and_class_hash

declare_tx2 = await account.sign_declare_v3(
compiled_contract=compiled_contract,
compiled_class_hash=compiled_class_hash,
inveke_tx = await account.sign_invoke_v3(
Call(map_contract.address, get_selector_from_name("put"), [3, 4]),
l1_resource_bounds=MAX_RESOURCE_BOUNDS_L1,
nonce=(declare_tx.nonce + 1),
)

estimated_fee = await account.estimate_fee(tx=[declare_tx, declare_tx2])
estimated_fee = await account.estimate_fee(tx=[declare_tx, inveke_tx])

assert isinstance(estimated_fee[0], EstimatedFee)
assert isinstance(estimated_fee[1], EstimatedFee)
Expand Down

0 comments on commit 62d9b98

Please sign in to comment.