@@ -54,7 +54,8 @@ def test_build_transaction_not_paying_to_nonpayable_function(
54
54
'to' : payable_tester_contract .address ,
55
55
'data' : '0xe4cb8f5c' ,
56
56
'value' : 0 ,
57
- 'gasPrice' : 10 ** 9 ,
57
+ 'maxFeePerGas' : 2750000000 ,
58
+ 'maxPriorityFeePerGas' : 10 ** 9 ,
58
59
'chainId' : 61 ,
59
60
}
60
61
@@ -75,7 +76,8 @@ def test_build_transaction_with_contract_no_arguments(web3, math_contract, build
75
76
'to' : math_contract .address ,
76
77
'data' : '0xd09de08a' ,
77
78
'value' : 0 ,
78
- 'gasPrice' : 10 ** 9 ,
79
+ 'maxFeePerGas' : 2750000000 ,
80
+ 'maxPriorityFeePerGas' : 10 ** 9 ,
79
81
'chainId' : 61 ,
80
82
}
81
83
@@ -86,7 +88,8 @@ def test_build_transaction_with_contract_fallback_function(web3, fallback_functi
86
88
'to' : fallback_function_contract .address ,
87
89
'data' : '0x' ,
88
90
'value' : 0 ,
89
- 'gasPrice' : 10 ** 9 ,
91
+ 'maxFeePerGas' : 2750000000 ,
92
+ 'maxPriorityFeePerGas' : 10 ** 9 ,
90
93
'chainId' : 61 ,
91
94
}
92
95
@@ -105,7 +108,8 @@ def test_build_transaction_with_contract_class_method(
105
108
'to' : math_contract .address ,
106
109
'data' : '0xd09de08a' ,
107
110
'value' : 0 ,
108
- 'gasPrice' : 10 ** 9 ,
111
+ 'maxFeePerGas' : 2750000000 ,
112
+ 'maxPriorityFeePerGas' : 10 ** 9 ,
109
113
'chainId' : 61 ,
110
114
}
111
115
@@ -119,7 +123,8 @@ def test_build_transaction_with_contract_default_account_is_set(
119
123
'to' : math_contract .address ,
120
124
'data' : '0xd09de08a' ,
121
125
'value' : 0 ,
122
- 'gasPrice' : 10 ** 9 ,
126
+ 'maxFeePerGas' : 2750000000 ,
127
+ 'maxPriorityFeePerGas' : 10 ** 9 ,
123
128
'chainId' : 61 ,
124
129
}
125
130
@@ -162,38 +167,50 @@ def test_build_transaction_with_contract_to_address_supplied_errors(web3,
162
167
(
163
168
{}, (5 ,), {}, {
164
169
'data' : '0x7cf5dab00000000000000000000000000000000000000000000000000000000000000005' , # noqa: E501
165
- 'value' : 0 , 'gasPrice' : 10 ** 9 , 'chainId' : 61 ,
170
+ 'value' : 0 , 'maxFeePerGas' : 2750000000 , 'maxPriorityFeePerGas' : 1000000000 ,
171
+ 'chainId' : 61 ,
166
172
}, False
167
173
),
168
174
(
169
175
{'gas' : 800000 }, (5 ,), {}, {
170
176
'data' : '0x7cf5dab00000000000000000000000000000000000000000000000000000000000000005' , # noqa: E501
171
- 'value' : 0 , 'gasPrice' : 10 ** 9 , 'chainId' : 61 ,
177
+ 'value' : 0 , 'maxFeePerGas' : 2750000000 , 'maxPriorityFeePerGas' : 1000000000 ,
178
+ 'chainId' : 61 ,
179
+ }, False
180
+ ),
181
+ ( # legacy transaction, explicit gasPrice
182
+ {'gasPrice' : 22 ** 8 }, (5 ,), {}, {
183
+ 'data' : '0x7cf5dab00000000000000000000000000000000000000000000000000000000000000005' , # noqa: E501
184
+ 'value' : 0 , 'gasPrice' : 22 ** 8 , 'chainId' : 61 ,
172
185
}, False
173
186
),
174
187
(
175
- {'gasPrice ' : 10 ** 9 }, (5 ,), {}, {
188
+ {'maxFeePerGas ' : 22 ** 8 , 'maxPriorityFeePerGas' : 22 ** 8 }, (5 ,), {}, {
176
189
'data' : '0x7cf5dab00000000000000000000000000000000000000000000000000000000000000005' , # noqa: E501
177
- 'value' : 0 , 'gasPrice' : 10 ** 9 , 'chainId' : 61 ,
190
+ 'value' : 0 , 'maxFeePerGas' : 22 ** 8 , 'maxPriorityFeePerGas' : 22 ** 8 ,
191
+ 'chainId' : 61 ,
178
192
}, False
179
193
),
180
194
(
181
195
{'nonce' : 7 }, (5 ,), {}, {
182
196
'data' : '0x7cf5dab00000000000000000000000000000000000000000000000000000000000000005' , # noqa: E501
183
- 'value' : 0 , 'gasPrice' : 10 ** 9 , 'nonce' : 7 , 'chainId' : 61 ,
197
+ 'value' : 0 , 'maxFeePerGas' : 2750000000 , 'maxPriorityFeePerGas' : 1000000000 ,
198
+ 'nonce' : 7 , 'chainId' : 61 ,
184
199
}, True
185
200
),
186
201
(
187
202
{'value' : 20000 }, (5 ,), {}, {
188
203
'data' : '0x7cf5dab00000000000000000000000000000000000000000000000000000000000000005' , # noqa: E501
189
- 'value' : 20000 , 'gasPrice' : 10 ** 9 , 'chainId' : 61 ,
204
+ 'value' : 20000 , 'maxFeePerGas' : 2750000000 , 'maxPriorityFeePerGas' : 1000000000 ,
205
+ 'chainId' : 61 ,
190
206
}, False
191
207
),
192
208
),
193
209
ids = [
194
210
'Standard' ,
195
211
'Explicit Gas' ,
196
212
'Explicit Gas Price' ,
213
+ 'Explicit Dynamic Fees' ,
197
214
'Explicit Nonce' ,
198
215
'With Value' ,
199
216
]
0 commit comments