@@ -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
@@ -63,7 +63,7 @@ def test_build_transaction_with_contract_fallback_function(
63
63
"value" : 0 ,
64
64
"maxFeePerGas" : 2750000000 ,
65
65
"maxPriorityFeePerGas" : 10 ** 9 ,
66
- "chainId" : 131277322940537 ,
66
+ "chainId" : w3 . eth . chain_id ,
67
67
}
68
68
69
69
@@ -81,7 +81,7 @@ def test_build_transaction_with_contract_class_method(
81
81
"value" : 0 ,
82
82
"maxFeePerGas" : 2750000000 ,
83
83
"maxPriorityFeePerGas" : 10 ** 9 ,
84
- "chainId" : 131277322940537 ,
84
+ "chainId" : w3 . eth . chain_id ,
85
85
}
86
86
87
87
@@ -97,7 +97,7 @@ def test_build_transaction_with_contract_default_account_is_set(
97
97
"value" : 0 ,
98
98
"maxFeePerGas" : 2750000000 ,
99
99
"maxPriorityFeePerGas" : 10 ** 9 ,
100
- "chainId" : 131277322940537 ,
100
+ "chainId" : w3 . eth . chain_id ,
101
101
}
102
102
103
103
@@ -116,7 +116,7 @@ def my_gas_price_strategy(w3, transaction_params):
116
116
"data" : "0x5b34b966" ,
117
117
"value" : 0 ,
118
118
"gasPrice" : 5 ,
119
- "chainId" : 131277322940537 ,
119
+ "chainId" : w3 . eth . chain_id ,
120
120
}
121
121
122
122
@@ -154,7 +154,6 @@ def test_build_transaction_with_contract_to_address_supplied_errors(
154
154
"value" : 0 ,
155
155
"maxFeePerGas" : 2750000000 ,
156
156
"maxPriorityFeePerGas" : 1000000000 ,
157
- "chainId" : 131277322940537 ,
158
157
},
159
158
False ,
160
159
),
@@ -167,7 +166,6 @@ def test_build_transaction_with_contract_to_address_supplied_errors(
167
166
"value" : 0 ,
168
167
"maxFeePerGas" : 2750000000 ,
169
168
"maxPriorityFeePerGas" : 1000000000 ,
170
- "chainId" : 131277322940537 ,
171
169
},
172
170
False ,
173
171
),
@@ -179,7 +177,6 @@ def test_build_transaction_with_contract_to_address_supplied_errors(
179
177
"data" : "0x6abbb3b40000000000000000000000000000000000000000000000000000000000000005" , # noqa: E501
180
178
"value" : 0 ,
181
179
"gasPrice" : 22 * 10 ** 8 ,
182
- "chainId" : 131277322940537 ,
183
180
},
184
181
False ,
185
182
),
@@ -192,7 +189,6 @@ def test_build_transaction_with_contract_to_address_supplied_errors(
192
189
"value" : 0 ,
193
190
"maxFeePerGas" : 22 * 10 ** 8 ,
194
191
"maxPriorityFeePerGas" : 22 * 10 ** 8 ,
195
- "chainId" : 131277322940537 ,
196
192
},
197
193
False ,
198
194
),
@@ -206,7 +202,6 @@ def test_build_transaction_with_contract_to_address_supplied_errors(
206
202
"maxFeePerGas" : 2750000000 ,
207
203
"maxPriorityFeePerGas" : 1000000000 ,
208
204
"nonce" : 7 ,
209
- "chainId" : 131277322940537 ,
210
205
},
211
206
True ,
212
207
),
@@ -219,7 +214,6 @@ def test_build_transaction_with_contract_to_address_supplied_errors(
219
214
"value" : 20000 ,
220
215
"maxFeePerGas" : 2750000000 ,
221
216
"maxPriorityFeePerGas" : 1000000000 ,
222
- "chainId" : 131277322940537 ,
223
217
},
224
218
False ,
225
219
),
@@ -247,6 +241,7 @@ def test_build_transaction_with_contract_arguments(
247
241
if skip_testrpc :
248
242
skip_if_testrpc (w3 )
249
243
244
+ expected ["chainId" ] = w3 .eth .chain_id
250
245
txn = build_transaction (
251
246
contract = math_contract ,
252
247
contract_function = "incrementCounter" ,
@@ -276,7 +271,7 @@ async def test_async_build_transaction_not_paying_to_nonpayable_function(
276
271
"value" : 0 ,
277
272
"maxFeePerGas" : 2750000000 ,
278
273
"maxPriorityFeePerGas" : 10 ** 9 ,
279
- "chainId" : 131277322940537 ,
274
+ "chainId" : await async_w3 . eth . chain_id ,
280
275
}
281
276
282
277
@@ -305,7 +300,7 @@ async def test_async_build_transaction_with_contract_no_arguments(
305
300
"value" : 0 ,
306
301
"maxFeePerGas" : 2750000000 ,
307
302
"maxPriorityFeePerGas" : 10 ** 9 ,
308
- "chainId" : 131277322940537 ,
303
+ "chainId" : await async_w3 . eth . chain_id ,
309
304
}
310
305
311
306
@@ -320,7 +315,7 @@ async def test_async_build_transaction_with_contract_fallback_function(
320
315
"value" : 0 ,
321
316
"maxFeePerGas" : 2750000000 ,
322
317
"maxPriorityFeePerGas" : 10 ** 9 ,
323
- "chainId" : 131277322940537 ,
318
+ "chainId" : await async_w3 . eth . chain_id ,
324
319
}
325
320
326
321
@@ -342,7 +337,7 @@ async def test_async_build_transaction_with_contract_class_method(
342
337
"value" : 0 ,
343
338
"maxFeePerGas" : 2750000000 ,
344
339
"maxPriorityFeePerGas" : 10 ** 9 ,
345
- "chainId" : 131277322940537 ,
340
+ "chainId" : await async_w3 . eth . chain_id ,
346
341
}
347
342
348
343
@@ -359,7 +354,7 @@ async def test_async_build_transaction_with_contract_default_account_is_set(
359
354
"value" : 0 ,
360
355
"maxFeePerGas" : 2750000000 ,
361
356
"maxPriorityFeePerGas" : 10 ** 9 ,
362
- "chainId" : 131277322940537 ,
357
+ "chainId" : await async_w3 . eth . chain_id ,
363
358
}
364
359
365
360
@@ -379,7 +374,7 @@ def my_gas_price_strategy(async_w3, transaction_params):
379
374
"data" : "0x5b34b966" ,
380
375
"value" : 0 ,
381
376
"gasPrice" : 5 ,
382
- "chainId" : 131277322940537 ,
377
+ "chainId" : await async_w3 . eth . chain_id ,
383
378
}
384
379
385
380
@@ -420,7 +415,6 @@ async def test_async_build_transaction_with_contract_to_address_supplied_errors(
420
415
"value" : 0 ,
421
416
"maxFeePerGas" : 2750000000 ,
422
417
"maxPriorityFeePerGas" : 1000000000 ,
423
- "chainId" : 131277322940537 ,
424
418
},
425
419
False ,
426
420
),
@@ -433,7 +427,6 @@ async def test_async_build_transaction_with_contract_to_address_supplied_errors(
433
427
"value" : 0 ,
434
428
"maxFeePerGas" : 2750000000 ,
435
429
"maxPriorityFeePerGas" : 1000000000 ,
436
- "chainId" : 131277322940537 ,
437
430
},
438
431
False ,
439
432
),
@@ -445,7 +438,6 @@ async def test_async_build_transaction_with_contract_to_address_supplied_errors(
445
438
"data" : "0x6abbb3b40000000000000000000000000000000000000000000000000000000000000005" , # noqa: E501
446
439
"value" : 0 ,
447
440
"gasPrice" : 22 * 10 ** 8 ,
448
- "chainId" : 131277322940537 ,
449
441
},
450
442
False ,
451
443
),
@@ -458,7 +450,6 @@ async def test_async_build_transaction_with_contract_to_address_supplied_errors(
458
450
"value" : 0 ,
459
451
"maxFeePerGas" : 22 * 10 ** 8 ,
460
452
"maxPriorityFeePerGas" : 22 * 10 ** 8 ,
461
- "chainId" : 131277322940537 ,
462
453
},
463
454
False ,
464
455
),
@@ -472,7 +463,6 @@ async def test_async_build_transaction_with_contract_to_address_supplied_errors(
472
463
"maxFeePerGas" : 2750000000 ,
473
464
"maxPriorityFeePerGas" : 1000000000 ,
474
465
"nonce" : 7 ,
475
- "chainId" : 131277322940537 ,
476
466
},
477
467
True ,
478
468
),
@@ -485,7 +475,6 @@ async def test_async_build_transaction_with_contract_to_address_supplied_errors(
485
475
"value" : 20000 ,
486
476
"maxFeePerGas" : 2750000000 ,
487
477
"maxPriorityFeePerGas" : 1000000000 ,
488
- "chainId" : 131277322940537 ,
489
478
},
490
479
False ,
491
480
),
@@ -513,6 +502,7 @@ async def test_async_build_transaction_with_contract_with_arguments(
513
502
if skip_testrpc :
514
503
async_skip_if_testrpc (async_w3 )
515
504
505
+ expected ["chainId" ] = await async_w3 .eth .chain_id
516
506
txn = await async_build_transaction (
517
507
contract = async_math_contract ,
518
508
contract_function = "incrementCounter" ,
0 commit comments