Skip to content

Commit 6f011c3

Browse files
committed
After checking against EELS backend, minor test updates
1 parent e1c257b commit 6f011c3

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
@@ -172,26 +172,26 @@ def test_build_transaction_with_contract_to_address_supplied_errors(
172172
False,
173173
),
174174
( # legacy transaction, explicit gasPrice
175-
{"gasPrice": 22**8},
175+
{"gasPrice": 22 * 10**8},
176176
(5,),
177177
{},
178178
{
179179
"data": "0x6abbb3b40000000000000000000000000000000000000000000000000000000000000005", # noqa: E501
180180
"value": 0,
181-
"gasPrice": 22**8,
181+
"gasPrice": 22 * 10**8,
182182
"chainId": 131277322940537,
183183
},
184184
False,
185185
),
186186
(
187-
{"maxFeePerGas": 22**8, "maxPriorityFeePerGas": 22**8},
187+
{"maxFeePerGas": 22 * 10**8, "maxPriorityFeePerGas": 22 * 10**8},
188188
(5,),
189189
{},
190190
{
191191
"data": "0x6abbb3b40000000000000000000000000000000000000000000000000000000000000005", # noqa: E501
192192
"value": 0,
193-
"maxFeePerGas": 22**8,
194-
"maxPriorityFeePerGas": 22**8,
193+
"maxFeePerGas": 22 * 10**8,
194+
"maxPriorityFeePerGas": 22 * 10**8,
195195
"chainId": 131277322940537,
196196
},
197197
False,
@@ -438,26 +438,26 @@ async def test_async_build_transaction_with_contract_to_address_supplied_errors(
438438
False,
439439
),
440440
( # legacy transaction, explicit gasPrice
441-
{"gasPrice": 22**8},
441+
{"gasPrice": 22 * 10**8},
442442
(5,),
443443
{},
444444
{
445445
"data": "0x6abbb3b40000000000000000000000000000000000000000000000000000000000000005", # noqa: E501
446446
"value": 0,
447-
"gasPrice": 22**8,
447+
"gasPrice": 22 * 10**8,
448448
"chainId": 131277322940537,
449449
},
450450
False,
451451
),
452452
(
453-
{"maxFeePerGas": 22**8, "maxPriorityFeePerGas": 22**8},
453+
{"maxFeePerGas": 22 * 10**8, "maxPriorityFeePerGas": 22 * 10**8},
454454
(5,),
455455
{},
456456
{
457457
"data": "0x6abbb3b40000000000000000000000000000000000000000000000000000000000000005", # noqa: E501
458458
"value": 0,
459-
"maxFeePerGas": 22**8,
460-
"maxPriorityFeePerGas": 22**8,
459+
"maxFeePerGas": 22 * 10**8,
460+
"maxPriorityFeePerGas": 22 * 10**8,
461461
"chainId": 131277322940537,
462462
},
463463
False,

tests/core/contracts/test_contract_estimate_gas.py

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

7575

7676
def test_estimate_gas_accepts_latest_block(w3, math_contract, transact):
77-
gas_estimate = math_contract.functions.counter().estimate_gas(
77+
gas_estimate = math_contract.functions.incrementCounter().estimate_gas(
7878
block_identifier="latest"
7979
)
80-
8180
txn_hash = transact(contract=math_contract, contract_function="incrementCounter")
8281

8382
txn_receipt = w3.eth.wait_for_transaction_receipt(txn_hash)
@@ -183,7 +182,7 @@ async def test_async_estimate_gas_sending_ether_to_nonpayable_function(
183182
async def test_async_estimate_gas_accepts_latest_block(
184183
async_w3, async_math_contract, async_transact
185184
):
186-
gas_estimate = await async_math_contract.functions.counter().estimate_gas(
185+
gas_estimate = await async_math_contract.functions.incrementCounter().estimate_gas(
187186
block_identifier="latest"
188187
)
189188

tests/core/utilities/test_async_transaction.py

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

6969

70-
@pytest.mark.asyncio()
71-
async def test_async_fill_transaction_defaults_nondynamic_tranaction_fee(async_w3):
72-
gasPrice_transaction = {
73-
"gasPrice": 10,
70+
@pytest.mark.asyncio
71+
async def test_async_fill_transaction_defaults_non_dynamic_transaction_fee(async_w3):
72+
gas_price_transaction = {
73+
"gasPrice": 10**9,
7474
}
7575
default_transaction = await async_fill_transaction_defaults(
76-
async_w3, gasPrice_transaction
76+
async_w3, gas_price_transaction
7777
)
78-
7978
assert none_in_dict(DYNAMIC_FEE_TXN_PARAMS, default_transaction)
8079

8180

0 commit comments

Comments
 (0)