Skip to content

Commit 43fe421

Browse files
committed
After checking against EELS backend, minor test updates
1 parent 117b728 commit 43fe421

File tree

3 files changed

+17
-19
lines changed

3 files changed

+17
-19
lines changed

tests/core/contracts/test_contract_build_transaction.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -186,26 +186,26 @@ def test_build_transaction_with_contract_to_address_supplied_errors(
186186
False,
187187
),
188188
( # legacy transaction, explicit gasPrice
189-
{"gasPrice": 22**8},
189+
{"gasPrice": 22 * 10**8},
190190
(5,),
191191
{},
192192
{
193193
"data": "0x6abbb3b40000000000000000000000000000000000000000000000000000000000000005", # noqa: E501
194194
"value": 0,
195-
"gasPrice": 22**8,
195+
"gasPrice": 22 * 10**8,
196196
"chainId": 131277322940537,
197197
},
198198
False,
199199
),
200200
(
201-
{"maxFeePerGas": 22**8, "maxPriorityFeePerGas": 22**8},
201+
{"maxFeePerGas": 22 * 10**8, "maxPriorityFeePerGas": 22 * 10**8},
202202
(5,),
203203
{},
204204
{
205205
"data": "0x6abbb3b40000000000000000000000000000000000000000000000000000000000000005", # noqa: E501
206206
"value": 0,
207-
"maxFeePerGas": 22**8,
208-
"maxPriorityFeePerGas": 22**8,
207+
"maxFeePerGas": 22 * 10**8,
208+
"maxPriorityFeePerGas": 22 * 10**8,
209209
"chainId": 131277322940537,
210210
},
211211
False,
@@ -467,26 +467,26 @@ async def test_async_build_transaction_with_contract_to_address_supplied_errors(
467467
False,
468468
),
469469
( # legacy transaction, explicit gasPrice
470-
{"gasPrice": 22**8},
470+
{"gasPrice": 22 * 10**8},
471471
(5,),
472472
{},
473473
{
474474
"data": "0x6abbb3b40000000000000000000000000000000000000000000000000000000000000005", # noqa: E501
475475
"value": 0,
476-
"gasPrice": 22**8,
476+
"gasPrice": 22 * 10**8,
477477
"chainId": 131277322940537,
478478
},
479479
False,
480480
),
481481
(
482-
{"maxFeePerGas": 22**8, "maxPriorityFeePerGas": 22**8},
482+
{"maxFeePerGas": 22 * 10**8, "maxPriorityFeePerGas": 22 * 10**8},
483483
(5,),
484484
{},
485485
{
486486
"data": "0x6abbb3b40000000000000000000000000000000000000000000000000000000000000005", # noqa: E501
487487
"value": 0,
488-
"maxFeePerGas": 22**8,
489-
"maxPriorityFeePerGas": 22**8,
488+
"maxFeePerGas": 22 * 10**8,
489+
"maxPriorityFeePerGas": 22 * 10**8,
490490
"chainId": 131277322940537,
491491
},
492492
False,

tests/core/contracts/test_contract_estimate_gas.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,9 @@ def test_estimate_gas_sending_ether_to_nonpayable_function(
8787

8888

8989
def test_estimate_gas_accepts_latest_block(w3, math_contract, transact):
90-
gas_estimate = math_contract.functions.counter().estimate_gas(
90+
gas_estimate = math_contract.functions.incrementCounter().estimate_gas(
9191
block_identifier="latest"
9292
)
93-
9493
txn_hash = transact(contract=math_contract, contract_function="incrementCounter")
9594

9695
txn_receipt = w3.eth.wait_for_transaction_receipt(txn_hash)
@@ -196,7 +195,7 @@ async def test_async_estimate_gas_sending_ether_to_nonpayable_function(
196195
async def test_async_estimate_gas_accepts_latest_block(
197196
async_w3, async_math_contract, async_transact
198197
):
199-
gas_estimate = await async_math_contract.functions.counter().estimate_gas(
198+
gas_estimate = await async_math_contract.functions.incrementCounter().estimate_gas(
200199
block_identifier="latest"
201200
)
202201

tests/core/utilities/test_async_transaction.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,14 @@ async def test_async_fill_transaction_defaults_for_all_params(async_w3):
7474
}
7575

7676

77-
@pytest.mark.asyncio()
78-
async def test_async_fill_transaction_defaults_nondynamic_tranaction_fee(async_w3):
79-
gasPrice_transaction = {
80-
"gasPrice": 10,
77+
@pytest.mark.asyncio
78+
async def test_async_fill_transaction_defaults_non_dynamic_transaction_fee(async_w3):
79+
gas_price_transaction = {
80+
"gasPrice": 10**9,
8181
}
8282
default_transaction = await async_fill_transaction_defaults(
83-
async_w3, gasPrice_transaction
83+
async_w3, gas_price_transaction
8484
)
85-
8685
assert none_in_dict(DYNAMIC_FEE_TXN_PARAMS, default_transaction)
8786

8887

0 commit comments

Comments
 (0)