@@ -868,22 +868,6 @@ def build_transaction(self, transaction: Optional[TxParams] = None) -> TxParams:
868
868
built_transaction = self ._build_transaction (transaction )
869
869
return transactions .fill_transaction_defaults (self .w3 , built_transaction )
870
870
871
- @combomethod
872
- @deprecated_for ("build_transaction" )
873
- def buildTransaction (self , transaction : Optional [TxParams ] = None ) -> TxParams :
874
- """
875
- Build the transaction dictionary without sending
876
- """
877
- return self .build_transaction (transaction )
878
-
879
- @combomethod
880
- @deprecated_for ("estimate_gas" )
881
- def estimateGas (
882
- self , transaction : Optional [TxParams ] = None ,
883
- block_identifier : Optional [BlockIdentifier ] = None
884
- ) -> int :
885
- return self .estimate_gas (transaction , block_identifier )
886
-
887
871
@combomethod
888
872
def estimate_gas (
889
873
self , transaction : Optional [TxParams ] = None ,
@@ -924,7 +908,7 @@ async def estimate_gas(
924
908
925
909
926
910
class ConciseMethod :
927
- ALLOWED_MODIFIERS = {'call' , 'estimateGas ' , 'transact' , 'buildTransaction ' }
911
+ ALLOWED_MODIFIERS = {'call' , 'estimate_gas ' , 'transact' , 'build_transaction ' }
928
912
929
913
def __init__ (
930
914
self , function : 'ContractFunction' ,
@@ -1178,9 +1162,9 @@ def _estimate_gas(
1178
1162
estimate_gas_transaction = cast (TxParams , dict (** transaction ))
1179
1163
1180
1164
if 'data' in estimate_gas_transaction :
1181
- raise ValueError ("Cannot set 'data' field in estimateGas transaction" )
1165
+ raise ValueError ("Cannot set 'data' field in estimate_gas transaction" )
1182
1166
if 'to' in estimate_gas_transaction :
1183
- raise ValueError ("Cannot set to in estimateGas transaction" )
1167
+ raise ValueError ("Cannot set to in estimate_gas transaction" )
1184
1168
1185
1169
if self .address :
1186
1170
estimate_gas_transaction .setdefault ('to' , self .address )
@@ -1191,7 +1175,7 @@ def _estimate_gas(
1191
1175
if 'to' not in estimate_gas_transaction :
1192
1176
if isinstance (self , type ):
1193
1177
raise ValueError (
1194
- "When using `Contract.estimateGas ` from a contract factory "
1178
+ "When using `Contract.estimate_gas ` from a contract factory "
1195
1179
"you must provide a `to` address with the transaction"
1196
1180
)
1197
1181
else :
@@ -1211,7 +1195,7 @@ def _build_transaction(self, transaction: Optional[TxParams] = None) -> TxParams
1211
1195
1212
1196
if not self .address and 'to' not in built_transaction :
1213
1197
raise ValueError (
1214
- "When using `ContractFunction.buildTransaction ` from a contract factory "
1198
+ "When using `ContractFunction.build_transaction ` from a contract factory "
1215
1199
"you must provide a `to` address with the transaction"
1216
1200
)
1217
1201
if self .address and 'to' in built_transaction :
@@ -1339,13 +1323,6 @@ def estimate_gas(
1339
1323
** self .kwargs
1340
1324
)
1341
1325
1342
- @deprecated_for ("estimate_gas" )
1343
- def estimateGas (
1344
- self , transaction : Optional [TxParams ] = None ,
1345
- block_identifier : Optional [BlockIdentifier ] = None
1346
- ) -> int :
1347
- return self .estimate_gas (transaction , block_identifier )
1348
-
1349
1326
def build_transaction (self , transaction : Optional [TxParams ] = None ) -> TxParams :
1350
1327
1351
1328
built_transaction = self ._build_transaction (transaction )
@@ -1360,10 +1337,6 @@ def build_transaction(self, transaction: Optional[TxParams] = None) -> TxParams:
1360
1337
** self .kwargs
1361
1338
)
1362
1339
1363
- @deprecated_for ("build_transaction" )
1364
- def buildTransaction (self , transaction : Optional [TxParams ] = None ) -> TxParams :
1365
- return self .build_transaction (transaction )
1366
-
1367
1340
1368
1341
class AsyncContractFunction (BaseContractFunction ):
1369
1342
@@ -2224,7 +2197,7 @@ def estimate_gas_for_function(
2224
2197
** kwargs : Any ) -> int :
2225
2198
"""Estimates gas cost a function call would take.
2226
2199
2227
- Don't call this directly, instead use :meth:`Contract.estimateGas `
2200
+ Don't call this directly, instead use :meth:`Contract.estimate_gas `
2228
2201
on your contract instance.
2229
2202
"""
2230
2203
estimate_transaction = prepare_transaction (
@@ -2253,7 +2226,7 @@ async def async_estimate_gas_for_function(
2253
2226
** kwargs : Any ) -> int :
2254
2227
"""Estimates gas cost a function call would take.
2255
2228
2256
- Don't call this directly, instead use :meth:`Contract.estimateGas `
2229
+ Don't call this directly, instead use :meth:`Contract.estimate_gas `
2257
2230
on your contract instance.
2258
2231
"""
2259
2232
estimate_transaction = prepare_transaction (
@@ -2281,7 +2254,7 @@ def build_transaction_for_function(
2281
2254
** kwargs : Any ) -> TxParams :
2282
2255
"""Builds a dictionary with the fields required to make the given transaction
2283
2256
2284
- Don't call this directly, instead use :meth:`Contract.buildTransaction `
2257
+ Don't call this directly, instead use :meth:`Contract.build_transaction `
2285
2258
on your contract instance.
2286
2259
"""
2287
2260
prepared_transaction = prepare_transaction (
@@ -2311,7 +2284,7 @@ async def async_build_transaction_for_function(
2311
2284
** kwargs : Any ) -> TxParams :
2312
2285
"""Builds a dictionary with the fields required to make the given transaction
2313
2286
2314
- Don't call this directly, instead use :meth:`Contract.buildTransaction `
2287
+ Don't call this directly, instead use :meth:`Contract.build_transaction `
2315
2288
on your contract instance.
2316
2289
"""
2317
2290
prepared_transaction = prepare_transaction (
0 commit comments