@@ -22,7 +22,7 @@ def test_build_transaction_not_paying_to_nonpayable_function(
22
22
"value" : 0 ,
23
23
"maxFeePerGas" : 2750000000 ,
24
24
"maxPriorityFeePerGas" : 10 ** 9 ,
25
- "chainId" : 131277322940537 ,
25
+ "chainId" : w3 . eth . chain_id ,
26
26
}
27
27
28
28
@@ -49,7 +49,7 @@ def test_build_transaction_with_contract_no_arguments(
49
49
"value" : 0 ,
50
50
"maxFeePerGas" : 2750000000 ,
51
51
"maxPriorityFeePerGas" : 10 ** 9 ,
52
- "chainId" : 131277322940537 ,
52
+ "chainId" : w3 . eth . chain_id ,
53
53
}
54
54
55
55
@@ -77,7 +77,7 @@ def test_build_transaction_with_contract_fallback_function(
77
77
"value" : 0 ,
78
78
"maxFeePerGas" : 2750000000 ,
79
79
"maxPriorityFeePerGas" : 10 ** 9 ,
80
- "chainId" : 131277322940537 ,
80
+ "chainId" : w3 . eth . chain_id ,
81
81
}
82
82
83
83
@@ -95,7 +95,7 @@ def test_build_transaction_with_contract_class_method(
95
95
"value" : 0 ,
96
96
"maxFeePerGas" : 2750000000 ,
97
97
"maxPriorityFeePerGas" : 10 ** 9 ,
98
- "chainId" : 131277322940537 ,
98
+ "chainId" : w3 . eth . chain_id ,
99
99
}
100
100
101
101
@@ -111,7 +111,7 @@ def test_build_transaction_with_contract_default_account_is_set(
111
111
"value" : 0 ,
112
112
"maxFeePerGas" : 2750000000 ,
113
113
"maxPriorityFeePerGas" : 10 ** 9 ,
114
- "chainId" : 131277322940537 ,
114
+ "chainId" : w3 . eth . chain_id ,
115
115
}
116
116
117
117
@@ -130,7 +130,7 @@ def my_gas_price_strategy(w3, transaction_params):
130
130
"data" : "0x5b34b966" ,
131
131
"value" : 0 ,
132
132
"gasPrice" : 5 ,
133
- "chainId" : 131277322940537 ,
133
+ "chainId" : w3 . eth . chain_id ,
134
134
}
135
135
136
136
@@ -168,7 +168,6 @@ def test_build_transaction_with_contract_to_address_supplied_errors(
168
168
"value" : 0 ,
169
169
"maxFeePerGas" : 2750000000 ,
170
170
"maxPriorityFeePerGas" : 1000000000 ,
171
- "chainId" : 131277322940537 ,
172
171
},
173
172
False ,
174
173
),
@@ -181,7 +180,6 @@ def test_build_transaction_with_contract_to_address_supplied_errors(
181
180
"value" : 0 ,
182
181
"maxFeePerGas" : 2750000000 ,
183
182
"maxPriorityFeePerGas" : 1000000000 ,
184
- "chainId" : 131277322940537 ,
185
183
},
186
184
False ,
187
185
),
@@ -193,7 +191,6 @@ def test_build_transaction_with_contract_to_address_supplied_errors(
193
191
"data" : "0x6abbb3b40000000000000000000000000000000000000000000000000000000000000005" , # noqa: E501
194
192
"value" : 0 ,
195
193
"gasPrice" : 22 * 10 ** 8 ,
196
- "chainId" : 131277322940537 ,
197
194
},
198
195
False ,
199
196
),
@@ -206,7 +203,6 @@ def test_build_transaction_with_contract_to_address_supplied_errors(
206
203
"value" : 0 ,
207
204
"maxFeePerGas" : 22 * 10 ** 8 ,
208
205
"maxPriorityFeePerGas" : 22 * 10 ** 8 ,
209
- "chainId" : 131277322940537 ,
210
206
},
211
207
False ,
212
208
),
@@ -220,7 +216,6 @@ def test_build_transaction_with_contract_to_address_supplied_errors(
220
216
"maxFeePerGas" : 2750000000 ,
221
217
"maxPriorityFeePerGas" : 1000000000 ,
222
218
"nonce" : 7 ,
223
- "chainId" : 131277322940537 ,
224
219
},
225
220
True ,
226
221
),
@@ -233,7 +228,6 @@ def test_build_transaction_with_contract_to_address_supplied_errors(
233
228
"value" : 20000 ,
234
229
"maxFeePerGas" : 2750000000 ,
235
230
"maxPriorityFeePerGas" : 1000000000 ,
236
- "chainId" : 131277322940537 ,
237
231
},
238
232
False ,
239
233
),
@@ -261,6 +255,7 @@ def test_build_transaction_with_contract_arguments(
261
255
if skip_testrpc :
262
256
skip_if_testrpc (w3 )
263
257
258
+ expected ["chainId" ] = w3 .eth .chain_id
264
259
txn = build_transaction (
265
260
contract = math_contract ,
266
261
contract_function = "incrementCounter" ,
@@ -290,7 +285,7 @@ async def test_async_build_transaction_not_paying_to_nonpayable_function(
290
285
"value" : 0 ,
291
286
"maxFeePerGas" : 2750000000 ,
292
287
"maxPriorityFeePerGas" : 10 ** 9 ,
293
- "chainId" : 131277322940537 ,
288
+ "chainId" : await async_w3 . eth . chain_id ,
294
289
}
295
290
296
291
@@ -319,7 +314,7 @@ async def test_async_build_transaction_with_contract_no_arguments(
319
314
"value" : 0 ,
320
315
"maxFeePerGas" : 2750000000 ,
321
316
"maxPriorityFeePerGas" : 10 ** 9 ,
322
- "chainId" : 131277322940537 ,
317
+ "chainId" : await async_w3 . eth . chain_id ,
323
318
}
324
319
325
320
@@ -349,7 +344,7 @@ async def test_async_build_transaction_with_contract_fallback_function(
349
344
"value" : 0 ,
350
345
"maxFeePerGas" : 2750000000 ,
351
346
"maxPriorityFeePerGas" : 10 ** 9 ,
352
- "chainId" : 131277322940537 ,
347
+ "chainId" : await async_w3 . eth . chain_id ,
353
348
}
354
349
355
350
@@ -371,7 +366,7 @@ async def test_async_build_transaction_with_contract_class_method(
371
366
"value" : 0 ,
372
367
"maxFeePerGas" : 2750000000 ,
373
368
"maxPriorityFeePerGas" : 10 ** 9 ,
374
- "chainId" : 131277322940537 ,
369
+ "chainId" : await async_w3 . eth . chain_id ,
375
370
}
376
371
377
372
@@ -388,7 +383,7 @@ async def test_async_build_transaction_with_contract_default_account_is_set(
388
383
"value" : 0 ,
389
384
"maxFeePerGas" : 2750000000 ,
390
385
"maxPriorityFeePerGas" : 10 ** 9 ,
391
- "chainId" : 131277322940537 ,
386
+ "chainId" : await async_w3 . eth . chain_id ,
392
387
}
393
388
394
389
@@ -408,7 +403,7 @@ def my_gas_price_strategy(async_w3, transaction_params):
408
403
"data" : "0x5b34b966" ,
409
404
"value" : 0 ,
410
405
"gasPrice" : 5 ,
411
- "chainId" : 131277322940537 ,
406
+ "chainId" : await async_w3 . eth . chain_id ,
412
407
}
413
408
414
409
@@ -449,7 +444,6 @@ async def test_async_build_transaction_with_contract_to_address_supplied_errors(
449
444
"value" : 0 ,
450
445
"maxFeePerGas" : 2750000000 ,
451
446
"maxPriorityFeePerGas" : 1000000000 ,
452
- "chainId" : 131277322940537 ,
453
447
},
454
448
False ,
455
449
),
@@ -462,7 +456,6 @@ async def test_async_build_transaction_with_contract_to_address_supplied_errors(
462
456
"value" : 0 ,
463
457
"maxFeePerGas" : 2750000000 ,
464
458
"maxPriorityFeePerGas" : 1000000000 ,
465
- "chainId" : 131277322940537 ,
466
459
},
467
460
False ,
468
461
),
@@ -474,7 +467,6 @@ async def test_async_build_transaction_with_contract_to_address_supplied_errors(
474
467
"data" : "0x6abbb3b40000000000000000000000000000000000000000000000000000000000000005" , # noqa: E501
475
468
"value" : 0 ,
476
469
"gasPrice" : 22 * 10 ** 8 ,
477
- "chainId" : 131277322940537 ,
478
470
},
479
471
False ,
480
472
),
@@ -487,7 +479,6 @@ async def test_async_build_transaction_with_contract_to_address_supplied_errors(
487
479
"value" : 0 ,
488
480
"maxFeePerGas" : 22 * 10 ** 8 ,
489
481
"maxPriorityFeePerGas" : 22 * 10 ** 8 ,
490
- "chainId" : 131277322940537 ,
491
482
},
492
483
False ,
493
484
),
@@ -501,7 +492,6 @@ async def test_async_build_transaction_with_contract_to_address_supplied_errors(
501
492
"maxFeePerGas" : 2750000000 ,
502
493
"maxPriorityFeePerGas" : 1000000000 ,
503
494
"nonce" : 7 ,
504
- "chainId" : 131277322940537 ,
505
495
},
506
496
True ,
507
497
),
@@ -514,7 +504,6 @@ async def test_async_build_transaction_with_contract_to_address_supplied_errors(
514
504
"value" : 20000 ,
515
505
"maxFeePerGas" : 2750000000 ,
516
506
"maxPriorityFeePerGas" : 1000000000 ,
517
- "chainId" : 131277322940537 ,
518
507
},
519
508
False ,
520
509
),
@@ -542,6 +531,7 @@ async def test_async_build_transaction_with_contract_with_arguments(
542
531
if skip_testrpc :
543
532
async_skip_if_testrpc (async_w3 )
544
533
534
+ expected ["chainId" ] = await async_w3 .eth .chain_id
545
535
txn = await async_build_transaction (
546
536
contract = async_math_contract ,
547
537
contract_function = "incrementCounter" ,
0 commit comments