web3 6.20.2__py3-none-any.whl → 7.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. ens/__init__.py +13 -2
  2. ens/_normalization.py +2 -17
  3. ens/async_ens.py +33 -21
  4. ens/base_ens.py +3 -1
  5. ens/ens.py +16 -11
  6. ens/exceptions.py +16 -29
  7. ens/specs/nf.json +1 -1
  8. ens/specs/normalization_spec.json +1 -1
  9. ens/utils.py +52 -63
  10. web3/__init__.py +20 -24
  11. web3/_utils/abi.py +115 -271
  12. web3/_utils/async_transactions.py +7 -4
  13. web3/_utils/batching.py +217 -0
  14. web3/_utils/blocks.py +6 -2
  15. web3/_utils/caching.py +128 -5
  16. web3/_utils/compat/__init__.py +2 -3
  17. web3/_utils/contract_sources/compile_contracts.py +1 -1
  18. web3/_utils/contract_sources/contract_data/arrays_contract.py +3 -3
  19. web3/_utils/contract_sources/contract_data/bytes_contracts.py +5 -5
  20. web3/_utils/contract_sources/contract_data/constructor_contracts.py +7 -7
  21. web3/_utils/contract_sources/contract_data/contract_caller_tester.py +3 -3
  22. web3/_utils/contract_sources/contract_data/emitter_contract.py +3 -3
  23. web3/_utils/contract_sources/contract_data/event_contracts.py +5 -5
  24. web3/_utils/contract_sources/contract_data/extended_resolver.py +3 -3
  25. web3/_utils/contract_sources/contract_data/fallback_function_contract.py +3 -3
  26. web3/_utils/contract_sources/contract_data/function_name_tester_contract.py +3 -3
  27. web3/_utils/contract_sources/contract_data/math_contract.py +3 -3
  28. web3/_utils/contract_sources/contract_data/offchain_lookup.py +3 -3
  29. web3/_utils/contract_sources/contract_data/offchain_resolver.py +3 -3
  30. web3/_utils/contract_sources/contract_data/panic_errors_contract.py +3 -3
  31. web3/_utils/contract_sources/contract_data/payable_tester.py +3 -3
  32. web3/_utils/contract_sources/contract_data/receive_function_contracts.py +5 -5
  33. web3/_utils/contract_sources/contract_data/reflector_contracts.py +3 -3
  34. web3/_utils/contract_sources/contract_data/revert_contract.py +3 -3
  35. web3/_utils/contract_sources/contract_data/simple_resolver.py +3 -3
  36. web3/_utils/contract_sources/contract_data/storage_contract.py +3 -3
  37. web3/_utils/contract_sources/contract_data/string_contract.py +3 -3
  38. web3/_utils/contract_sources/contract_data/tuple_contracts.py +5 -5
  39. web3/_utils/contracts.py +130 -236
  40. web3/_utils/datatypes.py +5 -1
  41. web3/_utils/decorators.py +13 -23
  42. web3/_utils/empty.py +1 -1
  43. web3/_utils/encoding.py +16 -12
  44. web3/_utils/ens.py +2 -1
  45. web3/_utils/error_formatters_utils.py +5 -3
  46. web3/_utils/events.py +66 -69
  47. web3/_utils/fee_utils.py +1 -3
  48. web3/_utils/filters.py +24 -22
  49. web3/_utils/formatters.py +2 -2
  50. web3/_utils/http.py +5 -3
  51. web3/_utils/http_session_manager.py +303 -0
  52. web3/_utils/math.py +14 -15
  53. web3/_utils/method_formatters.py +34 -36
  54. web3/_utils/module.py +2 -1
  55. web3/_utils/module_testing/__init__.py +0 -3
  56. web3/_utils/module_testing/eth_module.py +695 -643
  57. web3/_utils/module_testing/module_testing_utils.py +61 -34
  58. web3/_utils/module_testing/persistent_connection_provider.py +56 -25
  59. web3/_utils/module_testing/utils.py +258 -0
  60. web3/_utils/module_testing/web3_module.py +438 -17
  61. web3/_utils/normalizers.py +13 -11
  62. web3/_utils/rpc_abi.py +5 -32
  63. web3/_utils/threads.py +8 -7
  64. web3/_utils/transactions.py +14 -12
  65. web3/_utils/type_conversion.py +5 -1
  66. web3/_utils/validation.py +17 -17
  67. web3/auto/gethdev.py +7 -2
  68. web3/beacon/__init__.py +6 -1
  69. web3/beacon/async_beacon.py +9 -5
  70. web3/beacon/{main.py → beacon.py} +7 -5
  71. web3/contract/__init__.py +7 -0
  72. web3/contract/async_contract.py +47 -46
  73. web3/contract/base_contract.py +183 -158
  74. web3/contract/contract.py +49 -43
  75. web3/contract/utils.py +203 -59
  76. web3/datastructures.py +79 -31
  77. web3/eth/__init__.py +7 -0
  78. web3/eth/async_eth.py +39 -51
  79. web3/eth/base_eth.py +17 -10
  80. web3/eth/eth.py +30 -68
  81. web3/exceptions.py +108 -82
  82. web3/gas_strategies/time_based.py +8 -6
  83. web3/geth.py +1 -254
  84. web3/main.py +75 -122
  85. web3/manager.py +316 -146
  86. web3/method.py +38 -31
  87. web3/middleware/__init__.py +67 -89
  88. web3/middleware/attrdict.py +36 -49
  89. web3/middleware/base.py +174 -0
  90. web3/middleware/buffered_gas_estimate.py +20 -21
  91. web3/middleware/filter.py +157 -117
  92. web3/middleware/formatting.py +124 -108
  93. web3/middleware/gas_price_strategy.py +20 -32
  94. web3/middleware/names.py +29 -26
  95. web3/middleware/proof_of_authority.py +68 -0
  96. web3/middleware/pythonic.py +2 -2
  97. web3/middleware/signing.py +74 -89
  98. web3/middleware/stalecheck.py +52 -79
  99. web3/middleware/validation.py +5 -13
  100. web3/module.py +54 -10
  101. web3/providers/__init__.py +10 -6
  102. web3/providers/async_base.py +117 -39
  103. web3/providers/auto.py +3 -3
  104. web3/providers/base.py +89 -33
  105. web3/providers/eth_tester/__init__.py +5 -0
  106. web3/providers/eth_tester/defaults.py +1 -64
  107. web3/providers/eth_tester/main.py +99 -31
  108. web3/providers/eth_tester/middleware.py +45 -73
  109. web3/providers/ipc.py +42 -46
  110. web3/providers/{websocket/websocket.py → legacy_websocket.py} +32 -7
  111. web3/providers/persistent/__init__.py +22 -0
  112. web3/providers/persistent/async_ipc.py +153 -0
  113. web3/providers/{persistent.py → persistent/persistent.py} +106 -25
  114. web3/providers/persistent/persistent_connection.py +84 -0
  115. web3/providers/{websocket → persistent}/request_processor.py +94 -32
  116. web3/providers/persistent/utils.py +43 -0
  117. web3/providers/{websocket/websocket_v2.py → persistent/websocket.py} +29 -28
  118. web3/providers/rpc/__init__.py +11 -0
  119. web3/providers/rpc/async_rpc.py +171 -0
  120. web3/providers/rpc/rpc.py +179 -0
  121. web3/providers/rpc/utils.py +92 -0
  122. web3/testing.py +4 -4
  123. web3/tools/benchmark/main.py +22 -22
  124. web3/tools/benchmark/node.py +2 -8
  125. web3/tools/benchmark/reporting.py +2 -2
  126. web3/tools/benchmark/utils.py +1 -1
  127. web3/tracing.py +9 -5
  128. web3/types.py +30 -107
  129. web3/utils/__init__.py +58 -5
  130. web3/utils/abi.py +575 -10
  131. web3/utils/async_exception_handling.py +19 -7
  132. web3/utils/caching.py +32 -13
  133. web3/utils/exception_handling.py +7 -5
  134. {web3-6.20.2.dist-info → web3-7.0.0.dist-info}/LICENSE +1 -1
  135. web3-7.0.0.dist-info/METADATA +112 -0
  136. web3-7.0.0.dist-info/RECORD +167 -0
  137. {web3-6.20.2.dist-info → web3-7.0.0.dist-info}/WHEEL +1 -1
  138. {web3-6.20.2.dist-info → web3-7.0.0.dist-info}/top_level.txt +0 -1
  139. ethpm/__init__.py +0 -20
  140. ethpm/_utils/__init__.py +0 -0
  141. ethpm/_utils/backend.py +0 -93
  142. ethpm/_utils/cache.py +0 -44
  143. ethpm/_utils/chains.py +0 -119
  144. ethpm/_utils/contract.py +0 -35
  145. ethpm/_utils/deployments.py +0 -145
  146. ethpm/_utils/ipfs.py +0 -116
  147. ethpm/_utils/protobuf/__init__.py +0 -0
  148. ethpm/_utils/protobuf/ipfs_file_pb2.py +0 -33
  149. ethpm/_utils/registry.py +0 -29
  150. ethpm/assets/__init__.py +0 -0
  151. ethpm/assets/ens/v3.json +0 -1
  152. ethpm/assets/escrow/with_bytecode_v3.json +0 -1
  153. ethpm/assets/ipfs_file.proto +0 -32
  154. ethpm/assets/owned/output_v3.json +0 -1
  155. ethpm/assets/owned/with_contract_type_v3.json +0 -1
  156. ethpm/assets/registry/contracts/Authority.sol +0 -156
  157. ethpm/assets/registry/contracts/IndexedOrderedSetLib.sol +0 -106
  158. ethpm/assets/registry/contracts/PackageDB.sol +0 -225
  159. ethpm/assets/registry/contracts/PackageRegistry.sol +0 -361
  160. ethpm/assets/registry/contracts/PackageRegistryInterface.sol +0 -97
  161. ethpm/assets/registry/contracts/ReleaseDB.sol +0 -309
  162. ethpm/assets/registry/contracts/ReleaseValidator.sol +0 -152
  163. ethpm/assets/registry/solc_input.json +0 -1
  164. ethpm/assets/registry/solc_output.json +0 -1
  165. ethpm/assets/registry/v3.json +0 -1
  166. ethpm/assets/safe-math-lib/v3-strict-no-deployments.json +0 -1
  167. ethpm/assets/simple-registry/contracts/Ownable.sol +0 -63
  168. ethpm/assets/simple-registry/contracts/PackageRegistry.sol +0 -373
  169. ethpm/assets/simple-registry/contracts/PackageRegistryInterface.sol +0 -96
  170. ethpm/assets/simple-registry/solc_input.json +0 -33
  171. ethpm/assets/simple-registry/solc_output.json +0 -1
  172. ethpm/assets/simple-registry/v3.json +0 -1
  173. ethpm/assets/standard-token/output_v3.json +0 -1
  174. ethpm/assets/standard-token/with_bytecode_v3.json +0 -1
  175. ethpm/assets/vyper_registry/0.1.0.json +0 -1
  176. ethpm/assets/vyper_registry/registry.vy +0 -216
  177. ethpm/assets/vyper_registry/registry_with_delete.vy +0 -244
  178. ethpm/backends/__init__.py +0 -0
  179. ethpm/backends/base.py +0 -43
  180. ethpm/backends/http.py +0 -108
  181. ethpm/backends/ipfs.py +0 -219
  182. ethpm/backends/registry.py +0 -154
  183. ethpm/constants.py +0 -17
  184. ethpm/contract.py +0 -187
  185. ethpm/dependencies.py +0 -58
  186. ethpm/deployments.py +0 -80
  187. ethpm/ethpm-spec/examples/escrow/1.0.0-pretty.json +0 -146
  188. ethpm/ethpm-spec/examples/escrow/1.0.0.json +0 -1
  189. ethpm/ethpm-spec/examples/escrow/contracts/Escrow.sol +0 -32
  190. ethpm/ethpm-spec/examples/escrow/contracts/SafeSendLib.sol +0 -20
  191. ethpm/ethpm-spec/examples/escrow/v3-pretty.json +0 -171
  192. ethpm/ethpm-spec/examples/escrow/v3.json +0 -1
  193. ethpm/ethpm-spec/examples/owned/1.0.0-pretty.json +0 -21
  194. ethpm/ethpm-spec/examples/owned/1.0.0.json +0 -1
  195. ethpm/ethpm-spec/examples/owned/contracts/Owned.sol +0 -12
  196. ethpm/ethpm-spec/examples/owned/v3-pretty.json +0 -27
  197. ethpm/ethpm-spec/examples/owned/v3.json +0 -1
  198. ethpm/ethpm-spec/examples/piper-coin/1.0.0-pretty.json +0 -31
  199. ethpm/ethpm-spec/examples/piper-coin/1.0.0.json +0 -1
  200. ethpm/ethpm-spec/examples/piper-coin/v3-pretty.json +0 -21
  201. ethpm/ethpm-spec/examples/piper-coin/v3.json +0 -1
  202. ethpm/ethpm-spec/examples/safe-math-lib/1.0.0-pretty.json +0 -85
  203. ethpm/ethpm-spec/examples/safe-math-lib/1.0.0.json +0 -1
  204. ethpm/ethpm-spec/examples/safe-math-lib/contracts/SafeMathLib.sol +0 -24
  205. ethpm/ethpm-spec/examples/safe-math-lib/v3-pretty.json +0 -117
  206. ethpm/ethpm-spec/examples/safe-math-lib/v3.json +0 -1
  207. ethpm/ethpm-spec/examples/standard-token/1.0.0-pretty.json +0 -55
  208. ethpm/ethpm-spec/examples/standard-token/1.0.0.json +0 -1
  209. ethpm/ethpm-spec/examples/standard-token/contracts/AbstractToken.sol +0 -20
  210. ethpm/ethpm-spec/examples/standard-token/contracts/StandardToken.sol +0 -84
  211. ethpm/ethpm-spec/examples/standard-token/v3-pretty.json +0 -460
  212. ethpm/ethpm-spec/examples/standard-token/v3.json +0 -1
  213. ethpm/ethpm-spec/examples/transferable/1.0.0-pretty.json +0 -21
  214. ethpm/ethpm-spec/examples/transferable/1.0.0.json +0 -1
  215. ethpm/ethpm-spec/examples/transferable/contracts/Transferable.sol +0 -14
  216. ethpm/ethpm-spec/examples/transferable/v3-pretty.json +0 -27
  217. ethpm/ethpm-spec/examples/transferable/v3.json +0 -1
  218. ethpm/ethpm-spec/examples/wallet/1.0.0-pretty.json +0 -120
  219. ethpm/ethpm-spec/examples/wallet/1.0.0.json +0 -1
  220. ethpm/ethpm-spec/examples/wallet/contracts/Wallet.sol +0 -41
  221. ethpm/ethpm-spec/examples/wallet/v3-pretty.json +0 -181
  222. ethpm/ethpm-spec/examples/wallet/v3.json +0 -1
  223. ethpm/ethpm-spec/examples/wallet-with-send/1.0.0-pretty.json +0 -135
  224. ethpm/ethpm-spec/examples/wallet-with-send/1.0.0.json +0 -1
  225. ethpm/ethpm-spec/examples/wallet-with-send/contracts/WalletWithSend.sol +0 -18
  226. ethpm/ethpm-spec/examples/wallet-with-send/v3-pretty.json +0 -207
  227. ethpm/ethpm-spec/examples/wallet-with-send/v3.json +0 -1
  228. ethpm/ethpm-spec/spec/package.spec.json +0 -379
  229. ethpm/ethpm-spec/spec/v3.spec.json +0 -483
  230. ethpm/exceptions.py +0 -68
  231. ethpm/package.py +0 -438
  232. ethpm/tools/__init__.py +0 -4
  233. ethpm/tools/builder.py +0 -930
  234. ethpm/tools/checker.py +0 -312
  235. ethpm/tools/get_manifest.py +0 -19
  236. ethpm/uri.py +0 -141
  237. ethpm/validation/__init__.py +0 -0
  238. ethpm/validation/manifest.py +0 -146
  239. ethpm/validation/misc.py +0 -39
  240. ethpm/validation/package.py +0 -80
  241. ethpm/validation/uri.py +0 -163
  242. web3/_utils/contract_sources/contract_data/address_reflector.py +0 -29
  243. web3/_utils/miner.py +0 -88
  244. web3/_utils/module_testing/go_ethereum_personal_module.py +0 -323
  245. web3/_utils/request.py +0 -265
  246. web3/middleware/abi.py +0 -11
  247. web3/middleware/async_cache.py +0 -99
  248. web3/middleware/cache.py +0 -374
  249. web3/middleware/exception_handling.py +0 -49
  250. web3/middleware/exception_retry_request.py +0 -188
  251. web3/middleware/fixture.py +0 -190
  252. web3/middleware/geth_poa.py +0 -81
  253. web3/middleware/normalize_request_parameters.py +0 -11
  254. web3/middleware/simulate_unmined_transaction.py +0 -43
  255. web3/pm.py +0 -602
  256. web3/providers/async_rpc.py +0 -99
  257. web3/providers/rpc.py +0 -98
  258. web3/providers/websocket/__init__.py +0 -11
  259. web3/providers/websocket/websocket_connection.py +0 -42
  260. web3/tools/__init__.py +0 -4
  261. web3/tools/pytest_ethereum/__init__.py +0 -0
  262. web3/tools/pytest_ethereum/_utils.py +0 -145
  263. web3/tools/pytest_ethereum/deployer.py +0 -48
  264. web3/tools/pytest_ethereum/exceptions.py +0 -22
  265. web3/tools/pytest_ethereum/linker.py +0 -128
  266. web3/tools/pytest_ethereum/plugins.py +0 -33
  267. web3-6.20.2.dist-info/METADATA +0 -103
  268. web3-6.20.2.dist-info/RECORD +0 -283
  269. web3-6.20.2.dist-info/entry_points.txt +0 -2
  270. /web3/_utils/{function_identifiers.py → abi_element_identifiers.py} +0 -0
@@ -24,6 +24,9 @@ from web3._utils.utility_methods import (
24
24
  from web3.constants import (
25
25
  DYNAMIC_FEE_TXN_PARAMS,
26
26
  )
27
+ from web3.exceptions import (
28
+ Web3ValueError,
29
+ )
27
30
  from web3.types import (
28
31
  BlockIdentifier,
29
32
  TxData,
@@ -87,7 +90,7 @@ async def get_buffered_gas_estimate(
87
90
  gas_limit = await get_block_gas_limit(async_w3.eth)
88
91
 
89
92
  if gas_estimate > gas_limit:
90
- raise ValueError(
93
+ raise Web3ValueError(
91
94
  "Contract does not appear to be deployable within the "
92
95
  f"current network gas limits. Estimated: {gas_estimate}. "
93
96
  f"Current gas limit: {gas_limit}"
@@ -110,7 +113,7 @@ async def async_fill_transaction_defaults(
110
113
  async_w3: "AsyncWeb3", transaction: TxParams
111
114
  ) -> TxParams:
112
115
  """
113
- if async_w3 is None, fill as much as possible while offline
116
+ If async_w3 is None, fill as much as possible while offline
114
117
  """
115
118
  strategy_based_gas_price = async_w3.eth.generate_gas_price(transaction)
116
119
 
@@ -134,7 +137,7 @@ async def async_fill_transaction_defaults(
134
137
 
135
138
  if callable(default_getter):
136
139
  if async_w3 is None:
137
- raise ValueError(
140
+ raise Web3ValueError(
138
141
  f"You must specify a '{key}' value in the transaction"
139
142
  )
140
143
  if key == "gasPrice":
@@ -155,7 +158,7 @@ async def async_get_required_transaction(
155
158
  ) -> TxData:
156
159
  current_transaction = await async_w3.eth.get_transaction(transaction_hash)
157
160
  if not current_transaction:
158
- raise ValueError(
161
+ raise Web3ValueError(
159
162
  f"Supplied transaction with hash {transaction_hash!r} does not exist"
160
163
  )
161
164
  return current_transaction
@@ -0,0 +1,217 @@
1
+ from copy import (
2
+ copy,
3
+ )
4
+ from types import (
5
+ TracebackType,
6
+ )
7
+ from typing import (
8
+ TYPE_CHECKING,
9
+ Any,
10
+ Callable,
11
+ Coroutine,
12
+ Dict,
13
+ Generic,
14
+ List,
15
+ Sequence,
16
+ Tuple,
17
+ Type,
18
+ Union,
19
+ cast,
20
+ )
21
+ import warnings
22
+
23
+ from web3._utils.compat import (
24
+ Self,
25
+ )
26
+ from web3.contract.async_contract import (
27
+ AsyncContractFunction,
28
+ )
29
+ from web3.contract.contract import (
30
+ ContractFunction,
31
+ )
32
+ from web3.exceptions import (
33
+ Web3ValueError,
34
+ )
35
+ from web3.types import (
36
+ TFunc,
37
+ TReturn,
38
+ )
39
+
40
+ if TYPE_CHECKING:
41
+ from web3 import ( # noqa: F401
42
+ AsyncWeb3,
43
+ Web3,
44
+ )
45
+ from web3.method import ( # noqa: F401
46
+ Method,
47
+ )
48
+ from web3.providers import ( # noqa: F401
49
+ PersistentConnectionProvider,
50
+ )
51
+ from web3.providers.async_base import ( # noqa: F401
52
+ AsyncJSONBaseProvider,
53
+ )
54
+ from web3.providers.base import ( # noqa: F401
55
+ JSONBaseProvider,
56
+ )
57
+ from web3.types import ( # noqa: F401
58
+ RPCEndpoint,
59
+ RPCResponse,
60
+ )
61
+
62
+
63
+ BATCH_REQUEST_ID = "batch_request" # for use as the cache key for batch requests
64
+
65
+ BatchRequestInformation = Tuple[Tuple["RPCEndpoint", Any], Sequence[Any]]
66
+ RPC_METHODS_UNSUPPORTED_DURING_BATCH = {
67
+ "eth_subscribe",
68
+ "eth_unsubscribe",
69
+ "eth_sendRawTransaction",
70
+ "eth_sendTransaction",
71
+ "eth_signTransaction",
72
+ "eth_sign",
73
+ "eth_signTypedData",
74
+ }
75
+
76
+
77
+ class RequestBatcher(Generic[TFunc]):
78
+ def __init__(self, web3: Union["AsyncWeb3", "Web3"]) -> None:
79
+ self.web3 = web3
80
+ self._requests_info: List[BatchRequestInformation] = []
81
+ self._async_requests_info: List[
82
+ Coroutine[Any, Any, BatchRequestInformation]
83
+ ] = []
84
+ self._initialize_batching()
85
+
86
+ @property
87
+ def _provider(self) -> Union["JSONBaseProvider", "AsyncJSONBaseProvider"]:
88
+ return (
89
+ cast("AsyncJSONBaseProvider", self.web3.provider)
90
+ if self.web3.provider.is_async
91
+ else cast("JSONBaseProvider", self.web3.provider)
92
+ )
93
+
94
+ def _validate_is_batching(self) -> None:
95
+ if not self._provider._is_batching:
96
+ raise Web3ValueError(
97
+ "Batch has already been executed or cancelled. Create a new batch to "
98
+ "issue batched requests."
99
+ )
100
+
101
+ def _initialize_batching(self) -> None:
102
+ self._provider._is_batching = True
103
+ self.clear()
104
+
105
+ def _end_batching(self) -> None:
106
+ self.clear()
107
+ self._provider._is_batching = False
108
+ if self._provider.has_persistent_connection:
109
+ provider = cast("PersistentConnectionProvider", self._provider)
110
+ provider._batch_request_counter = None
111
+
112
+ def add(self, batch_payload: TReturn) -> None:
113
+ self._validate_is_batching()
114
+
115
+ if isinstance(batch_payload, (ContractFunction, AsyncContractFunction)):
116
+ batch_payload = batch_payload.call() # type: ignore
117
+
118
+ # When batching, we don't make a request. Instead, we will get the request
119
+ # information and store it in the `_requests_info` list. So we have to cast the
120
+ # apparent "request" into the BatchRequestInformation type.
121
+ if self._provider.is_async:
122
+ self._async_requests_info.append(
123
+ cast(Coroutine[Any, Any, BatchRequestInformation], batch_payload)
124
+ )
125
+ else:
126
+ self._requests_info.append(cast(BatchRequestInformation, batch_payload))
127
+
128
+ def add_mapping(
129
+ self,
130
+ batch_payload: Dict[
131
+ Union[
132
+ "Method[Callable[..., Any]]",
133
+ Callable[..., Any],
134
+ ContractFunction,
135
+ AsyncContractFunction,
136
+ ],
137
+ List[Any],
138
+ ],
139
+ ) -> None:
140
+ self._validate_is_batching()
141
+ for method, params in batch_payload.items():
142
+ for param in params:
143
+ self.add(method(param))
144
+
145
+ def execute(self) -> List["RPCResponse"]:
146
+ self._validate_is_batching()
147
+ responses = self.web3.manager._make_batch_request(self._requests_info)
148
+ self._end_batching()
149
+ return responses
150
+
151
+ def clear(self) -> None:
152
+ self._requests_info = []
153
+ self._async_requests_info = []
154
+ if self._provider.has_persistent_connection:
155
+ provider = cast("PersistentConnectionProvider", self._provider)
156
+ provider._batch_request_counter = next(copy(provider.request_counter))
157
+
158
+ def cancel(self) -> None:
159
+ self._end_batching()
160
+
161
+ # -- context manager -- #
162
+
163
+ def __enter__(self) -> Self:
164
+ self._initialize_batching()
165
+ return self
166
+
167
+ def __exit__(
168
+ self,
169
+ exc_type: Type[BaseException],
170
+ exc_val: BaseException,
171
+ exc_tb: TracebackType,
172
+ ) -> None:
173
+ self._end_batching()
174
+
175
+ # -- async -- #
176
+
177
+ async def async_execute(self) -> List["RPCResponse"]:
178
+ self._validate_is_batching()
179
+ responses = await self.web3.manager._async_make_batch_request(
180
+ self._async_requests_info
181
+ )
182
+ self._end_batching()
183
+ return responses
184
+
185
+ # -- async context manager -- #
186
+
187
+ async def __aenter__(self) -> Self:
188
+ self._initialize_batching()
189
+ return self
190
+
191
+ async def __aexit__(
192
+ self,
193
+ exc_type: Type[BaseException],
194
+ exc_val: BaseException,
195
+ exc_tb: TracebackType,
196
+ ) -> None:
197
+ self._end_batching()
198
+
199
+
200
+ def sort_batch_response_by_response_ids(
201
+ responses: List["RPCResponse"],
202
+ ) -> List["RPCResponse"]:
203
+ if all(response.get("id") is not None for response in responses):
204
+ # If all responses have an `id`, sort them by `id, since the JSON-RPC 2.0 spec
205
+ # doesn't guarantee order.
206
+ return sorted(responses, key=lambda response: response["id"])
207
+ else:
208
+ # If any response is missing an `id`, which should only happen on particular
209
+ # errors, return them in the order they were received and hope that the
210
+ # provider is returning them in order. Issue a warning.
211
+ warnings.warn(
212
+ "Received batch response with missing `id` for one or more responses. "
213
+ "Relying on provider to return these responses in order.",
214
+ RuntimeWarning,
215
+ stacklevel=2,
216
+ )
217
+ return responses
web3/_utils/blocks.py CHANGED
@@ -15,6 +15,10 @@ from eth_utils.toolz import (
15
15
  curry,
16
16
  )
17
17
 
18
+ from web3.exceptions import (
19
+ Web3TypeError,
20
+ Web3ValueError,
21
+ )
18
22
  from web3.types import (
19
23
  RPCEndpoint,
20
24
  )
@@ -32,7 +36,7 @@ def is_predefined_block_number(value: Any) -> bool:
32
36
  elif is_integer(value):
33
37
  return False
34
38
  else:
35
- raise TypeError(f"unrecognized block reference: {value!r}")
39
+ raise Web3TypeError(f"unrecognized block reference: {value!r}")
36
40
 
37
41
  return value_text in {"latest", "pending", "earliest", "safe", "finalized"}
38
42
 
@@ -70,6 +74,6 @@ def select_method_for_block_identifier(
70
74
  elif is_hex_encoded_block_number(value):
71
75
  return if_number
72
76
  else:
73
- raise ValueError(
77
+ raise Web3ValueError(
74
78
  f"Value did not match any of the recognized block identifiers: {value}"
75
79
  )
web3/_utils/caching.py CHANGED
@@ -1,11 +1,18 @@
1
1
  import collections
2
2
  import hashlib
3
+ import threading
3
4
  from typing import (
4
5
  TYPE_CHECKING,
5
6
  Any,
6
7
  Callable,
8
+ Coroutine,
9
+ Dict,
7
10
  List,
11
+ Set,
8
12
  Tuple,
13
+ TypeVar,
14
+ Union,
15
+ cast,
9
16
  )
10
17
 
11
18
  from eth_utils import (
@@ -19,12 +26,27 @@ from eth_utils import (
19
26
  to_bytes,
20
27
  )
21
28
 
29
+ from web3.exceptions import (
30
+ Web3TypeError,
31
+ )
32
+
22
33
  if TYPE_CHECKING:
23
- from web3.types import (
34
+ from web3.providers import ( # noqa: F401
35
+ AsyncBaseProvider,
36
+ BaseProvider,
37
+ )
38
+ from web3.types import ( # noqa: F401
39
+ AsyncMakeRequestFn,
40
+ MakeRequestFn,
24
41
  RPCEndpoint,
42
+ RPCResponse,
25
43
  )
26
44
 
27
45
 
46
+ SYNC_PROVIDER_TYPE = TypeVar("SYNC_PROVIDER_TYPE", bound="BaseProvider")
47
+ ASYNC_PROVIDER_TYPE = TypeVar("ASYNC_PROVIDER_TYPE", bound="AsyncBaseProvider")
48
+
49
+
28
50
  def generate_cache_key(value: Any) -> str:
29
51
  """
30
52
  Generates a cache key for the *args and **kwargs
@@ -36,11 +58,11 @@ def generate_cache_key(value: Any) -> str:
36
58
  elif is_boolean(value) or is_null(value) or is_number(value):
37
59
  return generate_cache_key(repr(value))
38
60
  elif is_dict(value):
39
- return generate_cache_key(((key, value[key]) for key in sorted(value.keys())))
61
+ return generate_cache_key((key, value[key]) for key in sorted(value.keys()))
40
62
  elif is_list_like(value) or isinstance(value, collections.abc.Generator):
41
- return generate_cache_key("".join((generate_cache_key(item) for item in value)))
63
+ return generate_cache_key("".join(generate_cache_key(item) for item in value))
42
64
  else:
43
- raise TypeError(
65
+ raise Web3TypeError(
44
66
  f"Cannot generate cache key for value {value} of type {type(value)}"
45
67
  )
46
68
 
@@ -50,7 +72,11 @@ class RequestInformation:
50
72
  self,
51
73
  method: "RPCEndpoint",
52
74
  params: Any,
53
- response_formatters: Tuple[Callable[..., Any], ...],
75
+ response_formatters: Tuple[
76
+ Union[Dict[str, Callable[..., Any]], Callable[..., Any]],
77
+ Callable[..., Any],
78
+ Callable[..., Any],
79
+ ],
54
80
  subscription_id: str = None,
55
81
  ):
56
82
  self.method = method
@@ -58,3 +84,100 @@ class RequestInformation:
58
84
  self.response_formatters = response_formatters
59
85
  self.subscription_id = subscription_id
60
86
  self.middleware_response_processors: List[Callable[..., Any]] = []
87
+
88
+
89
+ def is_cacheable_request(
90
+ provider: Union[ASYNC_PROVIDER_TYPE, SYNC_PROVIDER_TYPE], method: "RPCEndpoint"
91
+ ) -> bool:
92
+ if provider.cache_allowed_requests and method in provider.cacheable_requests:
93
+ return True
94
+ return False
95
+
96
+
97
+ # -- request caching -- #
98
+
99
+
100
+ CACHEABLE_REQUESTS = cast(
101
+ Set["RPCEndpoint"],
102
+ (
103
+ "eth_chainId",
104
+ "eth_getBlockByHash",
105
+ "eth_getBlockTransactionCountByHash",
106
+ "eth_getRawTransactionByHash",
107
+ "eth_getTransactionByBlockHashAndIndex",
108
+ "eth_getTransactionByHash",
109
+ "eth_getUncleByBlockHashAndIndex",
110
+ "eth_getUncleCountByBlockHash",
111
+ "net_version",
112
+ "web3_clientVersion",
113
+ ),
114
+ )
115
+
116
+
117
+ def _should_cache_response(response: "RPCResponse") -> bool:
118
+ return (
119
+ "error" not in response
120
+ and "result" in response
121
+ and not is_null(response["result"])
122
+ )
123
+
124
+
125
+ def handle_request_caching(
126
+ func: Callable[[SYNC_PROVIDER_TYPE, "RPCEndpoint", Any], "RPCResponse"]
127
+ ) -> Callable[..., "RPCResponse"]:
128
+ def wrapper(
129
+ provider: SYNC_PROVIDER_TYPE, method: "RPCEndpoint", params: Any
130
+ ) -> "RPCResponse":
131
+ if is_cacheable_request(provider, method):
132
+ request_cache = provider._request_cache
133
+ cache_key = generate_cache_key(
134
+ f"{threading.get_ident()}:{(method, params)}"
135
+ )
136
+ cache_result = request_cache.get_cache_entry(cache_key)
137
+ if cache_result is not None:
138
+ return cache_result
139
+ else:
140
+ response = func(provider, method, params)
141
+ if _should_cache_response(response):
142
+ with provider._request_cache_lock:
143
+ request_cache.cache(cache_key, response)
144
+ return response
145
+ else:
146
+ return func(provider, method, params)
147
+
148
+ # save a reference to the decorator on the wrapped function
149
+ wrapper._decorator = handle_request_caching # type: ignore
150
+ return wrapper
151
+
152
+
153
+ # -- async -- #
154
+
155
+
156
+ def async_handle_request_caching(
157
+ func: Callable[
158
+ [ASYNC_PROVIDER_TYPE, "RPCEndpoint", Any], Coroutine[Any, Any, "RPCResponse"]
159
+ ],
160
+ ) -> Callable[..., Coroutine[Any, Any, "RPCResponse"]]:
161
+ async def wrapper(
162
+ provider: ASYNC_PROVIDER_TYPE, method: "RPCEndpoint", params: Any
163
+ ) -> "RPCResponse":
164
+ if is_cacheable_request(provider, method):
165
+ request_cache = provider._request_cache
166
+ cache_key = generate_cache_key(
167
+ f"{threading.get_ident()}:{(method, params)}"
168
+ )
169
+ cache_result = request_cache.get_cache_entry(cache_key)
170
+ if cache_result is not None:
171
+ return cache_result
172
+ else:
173
+ response = await func(provider, method, params)
174
+ if _should_cache_response(response):
175
+ async with provider._request_cache_lock:
176
+ request_cache.cache(cache_key, response)
177
+ return response
178
+ else:
179
+ return await func(provider, method, params)
180
+
181
+ # save a reference to the decorator on the wrapped function
182
+ wrapper._decorator = async_handle_request_caching # type: ignore
183
+ return wrapper
@@ -9,9 +9,8 @@
9
9
  # imported from `typing`
10
10
 
11
11
  from typing_extensions import (
12
- Literal, # py38
13
12
  NotRequired, # py311
14
- Protocol, # py38
15
- TypedDict, # py38
16
13
  Self, # py311
14
+ Unpack, # py311
15
+ TypeAlias, # py310
17
16
  )
@@ -116,7 +116,7 @@ contracts_in_file = {}
116
116
 
117
117
  def compile_files(file_list: List[str]) -> None:
118
118
  for filename in file_list:
119
- with open(os.path.join(os.getcwd(), filename), "r") as f:
119
+ with open(os.path.join(os.getcwd(), filename)) as f:
120
120
  dot_sol_file = f.readlines()
121
121
 
122
122
  contract_names = []
@@ -1,11 +1,11 @@
1
1
  """
2
2
  Generated by `compile_contracts.py` script.
3
- Compiled with Solidity v0.8.24.
3
+ Compiled with Solidity v0.8.26.
4
4
  """
5
5
 
6
6
  # source: web3/_utils/contract_sources/ArraysContract.sol:ArraysContract
7
- ARRAYS_CONTRACT_BYTECODE = "0x608060405260405180604001604052807f03783fac2efed8fbc9ad443e592ee30e61d65f471140c10ca155e937b435b76081526020017f1f675bff07515f5df96737194ea945c36c41e7b4fcef307b7cd4d0e602a6911181525060019060026200006b929190620001a7565b5060405180604001604052805f7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020017f01000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681525060039060026200013b929190620001f7565b5034801562000148575f80fd5b50604051620012f3380380620012f383398181016040528101906200016e9190620006b5565b815f908051906020019062000185929190620002a0565b5080600290805190602001906200019e929190620002f0565b50505062000738565b828054828255905f5260205f20908101928215620001e4579160200282015b82811115620001e3578251825591602001919060010190620001c6565b5b509050620001f3919062000399565b5090565b828054828255905f5260205f2090601f016020900481019282156200028d579160200282015f5b838211156200025d57835183826101000a81548160ff021916908360f81c021790555092602001926001016020815f010492830192600103026200021e565b80156200028b5782816101000a81549060ff02191690556001016020815f010492830192600103026200025d565b505b5090506200029c9190620003b6565b5090565b828054828255905f5260205f20908101928215620002dd579160200282015b82811115620002dc578251825591602001919060010190620002bf565b5b509050620002ec919062000399565b5090565b828054828255905f5260205f2090601f0160209004810192821562000386579160200282015f5b838211156200035657835183826101000a81548160ff021916908360f81c021790555092602001926001016020815f0104928301926001030262000317565b8015620003845782816101000a81549060ff02191690556001016020815f0104928301926001030262000356565b505b509050620003959190620003b6565b5090565b5b80821115620003b2575f815f9055506001016200039a565b5090565b5b80821115620003cf575f815f905550600101620003b7565b5090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6200043082620003e8565b810181811067ffffffffffffffff82111715620004525762000451620003f8565b5b80604052505050565b5f62000466620003d3565b905062000474828262000425565b919050565b5f67ffffffffffffffff821115620004965762000495620003f8565b5b602082029050602081019050919050565b5f80fd5b5f819050919050565b620004bf81620004ab565b8114620004ca575f80fd5b50565b5f81519050620004dd81620004b4565b92915050565b5f620004f9620004f38462000479565b6200045b565b905080838252602082019050602084028301858111156200051f576200051e620004a7565b5b835b818110156200054c5780620005378882620004cd565b84526020840193505060208101905062000521565b5050509392505050565b5f82601f8301126200056d576200056c620003e4565b5b81516200057f848260208601620004e3565b91505092915050565b5f67ffffffffffffffff821115620005a557620005a4620003f8565b5b602082029050602081019050919050565b5f7fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b620005ec81620005b6565b8114620005f7575f80fd5b50565b5f815190506200060a81620005e1565b92915050565b5f62000626620006208462000588565b6200045b565b905080838252602082019050602084028301858111156200064c576200064b620004a7565b5b835b81811015620006795780620006648882620005fa565b8452602084019350506020810190506200064e565b5050509392505050565b5f82601f8301126200069a5762000699620003e4565b5b8151620006ac84826020860162000610565b91505092915050565b5f8060408385031215620006ce57620006cd620003dc565b5b5f83015167ffffffffffffffff811115620006ee57620006ed620003e0565b5b620006fc8582860162000556565b925050602083015167ffffffffffffffff81111562000720576200071f620003e0565b5b6200072e8582860162000683565b9150509250929050565b610bad80620007465f395ff3fe608060405234801561000f575f80fd5b506004361061009c575f3560e01c8063542d83de11610064578063542d83de14610158578063605ba271146101885780638abe51fd146101a6578063962e450c146101c4578063bb69679b146101f45761009c565b80630afe5e33146100a057806312c9dcc8146100be5780631579bf66146100ee5780633ddcea2f1461010c57806351b4878814610128575b5f80fd5b6100a8610210565b6040516100b591906106a4565b60405180910390f35b6100d860048036038101906100d39190610708565b610266565b6040516100e5919061076d565b60405180910390f35b6100f6610297565b604051610103919061083d565b60405180910390f35b610126600480360381019061012191906109d7565b610330565b005b610142600480360381019061013d9190610708565b61034a565b60405161014f9190610a2d565b60405180910390f35b610172600480360381019061016d9190610708565b61036a565b60405161017f9190610a2d565b60405180910390f35b610190610389565b60405161019d91906106a4565b60405180910390f35b6101ae6103de565b6040516101bb919061083d565b60405180910390f35b6101de60048036038101906101d99190610708565b610477565b6040516101eb919061076d565b60405180910390f35b61020e60048036038101906102099190610b30565b6104a8565b005b6060600180548060200260200160405190810160405280929190818152602001828054801561025c57602002820191905f5260205f20905b815481526020019060010190808311610248575b5050505050905090565b60028181548110610275575f80fd5b905f5260205f209060209182820401919006915054906101000a900460f81b81565b6060600380548060200260200160405190810160405280929190818152602001828054801561032657602002820191905f5260205f20905f905b82829054906101000a900460f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190600101906020825f010492830192600103820291508084116102d15790505b5050505050905090565b80600290805190602001906103469291906104c1565b5050565b60018181548110610359575f80fd5b905f5260205f20015f915090505481565b5f8181548110610378575f80fd5b905f5260205f20015f915090505481565b60605f8054806020026020016040519081016040528092919081815260200182805480156103d457602002820191905f5260205f20905b8154815260200190600101908083116103c0575b5050505050905090565b6060600280548060200260200160405190810160405280929190818152602001828054801561046d57602002820191905f5260205f20905f905b82829054906101000a900460f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190600101906020825f010492830192600103820291508084116104185790505b5050505050905090565b60038181548110610486575f80fd5b905f5260205f209060209182820401919006915054906101000a900460f81b81565b805f90805190602001906104bd929190610563565b5050565b828054828255905f5260205f2090601f01602090048101928215610552579160200282015f5b8382111561052457835183826101000a81548160ff021916908360f81c021790555092602001926001016020815f010492830192600103026104e7565b80156105505782816101000a81549060ff02191690556001016020815f01049283019260010302610524565b505b50905061055f91906105ae565b5090565b828054828255905f5260205f2090810192821561059d579160200282015b8281111561059c578251825591602001919060010190610581565b5b5090506105aa91906105c9565b5090565b5b808211156105c5575f815f9055506001016105af565b5090565b5b808211156105e0575f815f9055506001016105ca565b5090565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f819050919050565b61061f8161060d565b82525050565b5f6106308383610616565b60208301905092915050565b5f602082019050919050565b5f610652826105e4565b61065c81856105ee565b9350610667836105fe565b805f5b8381101561069757815161067e8882610625565b97506106898361063c565b92505060018101905061066a565b5085935050505092915050565b5f6020820190508181035f8301526106bc8184610648565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b6106e7816106d5565b81146106f1575f80fd5b50565b5f81359050610702816106de565b92915050565b5f6020828403121561071d5761071c6106cd565b5b5f61072a848285016106f4565b91505092915050565b5f7fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b61076781610733565b82525050565b5f6020820190506107805f83018461075e565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6107b881610733565b82525050565b5f6107c983836107af565b60208301905092915050565b5f602082019050919050565b5f6107eb82610786565b6107f58185610790565b9350610800836107a0565b805f5b8381101561083057815161081788826107be565b9750610822836107d5565b925050600181019050610803565b5085935050505092915050565b5f6020820190508181035f83015261085581846107e1565b905092915050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6108a782610861565b810181811067ffffffffffffffff821117156108c6576108c5610871565b5b80604052505050565b5f6108d86106c4565b90506108e4828261089e565b919050565b5f67ffffffffffffffff82111561090357610902610871565b5b602082029050602081019050919050565b5f80fd5b61092181610733565b811461092b575f80fd5b50565b5f8135905061093c81610918565b92915050565b5f61095461094f846108e9565b6108cf565b9050808382526020820190506020840283018581111561097757610976610914565b5b835b818110156109a0578061098c888261092e565b845260208401935050602081019050610979565b5050509392505050565b5f82601f8301126109be576109bd61085d565b5b81356109ce848260208601610942565b91505092915050565b5f602082840312156109ec576109eb6106cd565b5b5f82013567ffffffffffffffff811115610a0957610a086106d1565b5b610a15848285016109aa565b91505092915050565b610a278161060d565b82525050565b5f602082019050610a405f830184610a1e565b92915050565b5f67ffffffffffffffff821115610a6057610a5f610871565b5b602082029050602081019050919050565b610a7a8161060d565b8114610a84575f80fd5b50565b5f81359050610a9581610a71565b92915050565b5f610aad610aa884610a46565b6108cf565b90508083825260208201905060208402830185811115610ad057610acf610914565b5b835b81811015610af95780610ae58882610a87565b845260208401935050602081019050610ad2565b5050509392505050565b5f82601f830112610b1757610b1661085d565b5b8135610b27848260208601610a9b565b91505092915050565b5f60208284031215610b4557610b446106cd565b5b5f82013567ffffffffffffffff811115610b6257610b616106d1565b5b610b6e84828501610b03565b9150509291505056fea2646970667358221220f43fe389152574474ee89001ad6290afddc9e0eca398f8e70729e52db13c77ec64736f6c63430008180033" # noqa: E501
8
- ARRAYS_CONTRACT_RUNTIME = "0x608060405234801561000f575f80fd5b506004361061009c575f3560e01c8063542d83de11610064578063542d83de14610158578063605ba271146101885780638abe51fd146101a6578063962e450c146101c4578063bb69679b146101f45761009c565b80630afe5e33146100a057806312c9dcc8146100be5780631579bf66146100ee5780633ddcea2f1461010c57806351b4878814610128575b5f80fd5b6100a8610210565b6040516100b591906106a4565b60405180910390f35b6100d860048036038101906100d39190610708565b610266565b6040516100e5919061076d565b60405180910390f35b6100f6610297565b604051610103919061083d565b60405180910390f35b610126600480360381019061012191906109d7565b610330565b005b610142600480360381019061013d9190610708565b61034a565b60405161014f9190610a2d565b60405180910390f35b610172600480360381019061016d9190610708565b61036a565b60405161017f9190610a2d565b60405180910390f35b610190610389565b60405161019d91906106a4565b60405180910390f35b6101ae6103de565b6040516101bb919061083d565b60405180910390f35b6101de60048036038101906101d99190610708565b610477565b6040516101eb919061076d565b60405180910390f35b61020e60048036038101906102099190610b30565b6104a8565b005b6060600180548060200260200160405190810160405280929190818152602001828054801561025c57602002820191905f5260205f20905b815481526020019060010190808311610248575b5050505050905090565b60028181548110610275575f80fd5b905f5260205f209060209182820401919006915054906101000a900460f81b81565b6060600380548060200260200160405190810160405280929190818152602001828054801561032657602002820191905f5260205f20905f905b82829054906101000a900460f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190600101906020825f010492830192600103820291508084116102d15790505b5050505050905090565b80600290805190602001906103469291906104c1565b5050565b60018181548110610359575f80fd5b905f5260205f20015f915090505481565b5f8181548110610378575f80fd5b905f5260205f20015f915090505481565b60605f8054806020026020016040519081016040528092919081815260200182805480156103d457602002820191905f5260205f20905b8154815260200190600101908083116103c0575b5050505050905090565b6060600280548060200260200160405190810160405280929190818152602001828054801561046d57602002820191905f5260205f20905f905b82829054906101000a900460f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190600101906020825f010492830192600103820291508084116104185790505b5050505050905090565b60038181548110610486575f80fd5b905f5260205f209060209182820401919006915054906101000a900460f81b81565b805f90805190602001906104bd929190610563565b5050565b828054828255905f5260205f2090601f01602090048101928215610552579160200282015f5b8382111561052457835183826101000a81548160ff021916908360f81c021790555092602001926001016020815f010492830192600103026104e7565b80156105505782816101000a81549060ff02191690556001016020815f01049283019260010302610524565b505b50905061055f91906105ae565b5090565b828054828255905f5260205f2090810192821561059d579160200282015b8281111561059c578251825591602001919060010190610581565b5b5090506105aa91906105c9565b5090565b5b808211156105c5575f815f9055506001016105af565b5090565b5b808211156105e0575f815f9055506001016105ca565b5090565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f819050919050565b61061f8161060d565b82525050565b5f6106308383610616565b60208301905092915050565b5f602082019050919050565b5f610652826105e4565b61065c81856105ee565b9350610667836105fe565b805f5b8381101561069757815161067e8882610625565b97506106898361063c565b92505060018101905061066a565b5085935050505092915050565b5f6020820190508181035f8301526106bc8184610648565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b6106e7816106d5565b81146106f1575f80fd5b50565b5f81359050610702816106de565b92915050565b5f6020828403121561071d5761071c6106cd565b5b5f61072a848285016106f4565b91505092915050565b5f7fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b61076781610733565b82525050565b5f6020820190506107805f83018461075e565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6107b881610733565b82525050565b5f6107c983836107af565b60208301905092915050565b5f602082019050919050565b5f6107eb82610786565b6107f58185610790565b9350610800836107a0565b805f5b8381101561083057815161081788826107be565b9750610822836107d5565b925050600181019050610803565b5085935050505092915050565b5f6020820190508181035f83015261085581846107e1565b905092915050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6108a782610861565b810181811067ffffffffffffffff821117156108c6576108c5610871565b5b80604052505050565b5f6108d86106c4565b90506108e4828261089e565b919050565b5f67ffffffffffffffff82111561090357610902610871565b5b602082029050602081019050919050565b5f80fd5b61092181610733565b811461092b575f80fd5b50565b5f8135905061093c81610918565b92915050565b5f61095461094f846108e9565b6108cf565b9050808382526020820190506020840283018581111561097757610976610914565b5b835b818110156109a0578061098c888261092e565b845260208401935050602081019050610979565b5050509392505050565b5f82601f8301126109be576109bd61085d565b5b81356109ce848260208601610942565b91505092915050565b5f602082840312156109ec576109eb6106cd565b5b5f82013567ffffffffffffffff811115610a0957610a086106d1565b5b610a15848285016109aa565b91505092915050565b610a278161060d565b82525050565b5f602082019050610a405f830184610a1e565b92915050565b5f67ffffffffffffffff821115610a6057610a5f610871565b5b602082029050602081019050919050565b610a7a8161060d565b8114610a84575f80fd5b50565b5f81359050610a9581610a71565b92915050565b5f610aad610aa884610a46565b6108cf565b90508083825260208201905060208402830185811115610ad057610acf610914565b5b835b81811015610af95780610ae58882610a87565b845260208401935050602081019050610ad2565b5050509392505050565b5f82601f830112610b1757610b1661085d565b5b8135610b27848260208601610a9b565b91505092915050565b5f60208284031215610b4557610b446106cd565b5b5f82013567ffffffffffffffff811115610b6257610b616106d1565b5b610b6e84828501610b03565b9150509291505056fea2646970667358221220f43fe389152574474ee89001ad6290afddc9e0eca398f8e70729e52db13c77ec64736f6c63430008180033" # noqa: E501
7
+ ARRAYS_CONTRACT_BYTECODE = "0x608060405260405180604001604052807f03783fac2efed8fbc9ad443e592ee30e61d65f471140c10ca155e937b435b76081526020017f1f675bff07515f5df96737194ea945c36c41e7b4fcef307b7cd4d0e602a691118152506001906002610069929190610199565b5060405180604001604052805f7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020017f01000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681525060039060026101379291906101e4565b50348015610143575f80fd5b5060405161128238038061128283398181016040528101906101659190610652565b815f908051906020019061017a929190610286565b5080600290805190602001906101919291906102d1565b5050506106c8565b828054828255905f5260205f209081019282156101d3579160200282015b828111156101d25782518255916020019190600101906101b7565b5b5090506101e09190610373565b5090565b828054828255905f5260205f2090601f01602090048101928215610275579160200282015f5b8382111561024757835183826101000a81548160ff021916908360f81c021790555092602001926001016020815f0104928301926001030261020a565b80156102735782816101000a81549060ff02191690556001016020815f01049283019260010302610247565b505b509050610282919061038e565b5090565b828054828255905f5260205f209081019282156102c0579160200282015b828111156102bf5782518255916020019190600101906102a4565b5b5090506102cd9190610373565b5090565b828054828255905f5260205f2090601f01602090048101928215610362579160200282015f5b8382111561033457835183826101000a81548160ff021916908360f81c021790555092602001926001016020815f010492830192600103026102f7565b80156103605782816101000a81549060ff02191690556001016020815f01049283019260010302610334565b505b50905061036f919061038e565b5090565b5b8082111561038a575f815f905550600101610374565b5090565b5b808211156103a5575f815f90555060010161038f565b5090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b610404826103be565b810181811067ffffffffffffffff82111715610423576104226103ce565b5b80604052505050565b5f6104356103a9565b905061044182826103fb565b919050565b5f67ffffffffffffffff8211156104605761045f6103ce565b5b602082029050602081019050919050565b5f80fd5b5f819050919050565b61048781610475565b8114610491575f80fd5b50565b5f815190506104a28161047e565b92915050565b5f6104ba6104b584610446565b61042c565b905080838252602082019050602084028301858111156104dd576104dc610471565b5b835b8181101561050657806104f28882610494565b8452602084019350506020810190506104df565b5050509392505050565b5f82601f830112610524576105236103ba565b5b81516105348482602086016104a8565b91505092915050565b5f67ffffffffffffffff821115610557576105566103ce565b5b602082029050602081019050919050565b5f7fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b61059c81610568565b81146105a6575f80fd5b50565b5f815190506105b781610593565b92915050565b5f6105cf6105ca8461053d565b61042c565b905080838252602082019050602084028301858111156105f2576105f1610471565b5b835b8181101561061b578061060788826105a9565b8452602084019350506020810190506105f4565b5050509392505050565b5f82601f830112610639576106386103ba565b5b81516106498482602086016105bd565b91505092915050565b5f8060408385031215610668576106676103b2565b5b5f83015167ffffffffffffffff811115610685576106846103b6565b5b61069185828601610510565b925050602083015167ffffffffffffffff8111156106b2576106b16103b6565b5b6106be85828601610625565b9150509250929050565b610bad806106d55f395ff3fe608060405234801561000f575f80fd5b506004361061009c575f3560e01c8063542d83de11610064578063542d83de14610158578063605ba271146101885780638abe51fd146101a6578063962e450c146101c4578063bb69679b146101f45761009c565b80630afe5e33146100a057806312c9dcc8146100be5780631579bf66146100ee5780633ddcea2f1461010c57806351b4878814610128575b5f80fd5b6100a8610210565b6040516100b591906106a4565b60405180910390f35b6100d860048036038101906100d39190610708565b610266565b6040516100e5919061076d565b60405180910390f35b6100f6610297565b604051610103919061083d565b60405180910390f35b610126600480360381019061012191906109d7565b610330565b005b610142600480360381019061013d9190610708565b61034a565b60405161014f9190610a2d565b60405180910390f35b610172600480360381019061016d9190610708565b61036a565b60405161017f9190610a2d565b60405180910390f35b610190610389565b60405161019d91906106a4565b60405180910390f35b6101ae6103de565b6040516101bb919061083d565b60405180910390f35b6101de60048036038101906101d99190610708565b610477565b6040516101eb919061076d565b60405180910390f35b61020e60048036038101906102099190610b30565b6104a8565b005b6060600180548060200260200160405190810160405280929190818152602001828054801561025c57602002820191905f5260205f20905b815481526020019060010190808311610248575b5050505050905090565b60028181548110610275575f80fd5b905f5260205f209060209182820401919006915054906101000a900460f81b81565b6060600380548060200260200160405190810160405280929190818152602001828054801561032657602002820191905f5260205f20905f905b82829054906101000a900460f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190600101906020825f010492830192600103820291508084116102d15790505b5050505050905090565b80600290805190602001906103469291906104c1565b5050565b60018181548110610359575f80fd5b905f5260205f20015f915090505481565b5f8181548110610378575f80fd5b905f5260205f20015f915090505481565b60605f8054806020026020016040519081016040528092919081815260200182805480156103d457602002820191905f5260205f20905b8154815260200190600101908083116103c0575b5050505050905090565b6060600280548060200260200160405190810160405280929190818152602001828054801561046d57602002820191905f5260205f20905f905b82829054906101000a900460f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190600101906020825f010492830192600103820291508084116104185790505b5050505050905090565b60038181548110610486575f80fd5b905f5260205f209060209182820401919006915054906101000a900460f81b81565b805f90805190602001906104bd929190610563565b5050565b828054828255905f5260205f2090601f01602090048101928215610552579160200282015f5b8382111561052457835183826101000a81548160ff021916908360f81c021790555092602001926001016020815f010492830192600103026104e7565b80156105505782816101000a81549060ff02191690556001016020815f01049283019260010302610524565b505b50905061055f91906105ae565b5090565b828054828255905f5260205f2090810192821561059d579160200282015b8281111561059c578251825591602001919060010190610581565b5b5090506105aa91906105c9565b5090565b5b808211156105c5575f815f9055506001016105af565b5090565b5b808211156105e0575f815f9055506001016105ca565b5090565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f819050919050565b61061f8161060d565b82525050565b5f6106308383610616565b60208301905092915050565b5f602082019050919050565b5f610652826105e4565b61065c81856105ee565b9350610667836105fe565b805f5b8381101561069757815161067e8882610625565b97506106898361063c565b92505060018101905061066a565b5085935050505092915050565b5f6020820190508181035f8301526106bc8184610648565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b6106e7816106d5565b81146106f1575f80fd5b50565b5f81359050610702816106de565b92915050565b5f6020828403121561071d5761071c6106cd565b5b5f61072a848285016106f4565b91505092915050565b5f7fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b61076781610733565b82525050565b5f6020820190506107805f83018461075e565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6107b881610733565b82525050565b5f6107c983836107af565b60208301905092915050565b5f602082019050919050565b5f6107eb82610786565b6107f58185610790565b9350610800836107a0565b805f5b8381101561083057815161081788826107be565b9750610822836107d5565b925050600181019050610803565b5085935050505092915050565b5f6020820190508181035f83015261085581846107e1565b905092915050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6108a782610861565b810181811067ffffffffffffffff821117156108c6576108c5610871565b5b80604052505050565b5f6108d86106c4565b90506108e4828261089e565b919050565b5f67ffffffffffffffff82111561090357610902610871565b5b602082029050602081019050919050565b5f80fd5b61092181610733565b811461092b575f80fd5b50565b5f8135905061093c81610918565b92915050565b5f61095461094f846108e9565b6108cf565b9050808382526020820190506020840283018581111561097757610976610914565b5b835b818110156109a0578061098c888261092e565b845260208401935050602081019050610979565b5050509392505050565b5f82601f8301126109be576109bd61085d565b5b81356109ce848260208601610942565b91505092915050565b5f602082840312156109ec576109eb6106cd565b5b5f82013567ffffffffffffffff811115610a0957610a086106d1565b5b610a15848285016109aa565b91505092915050565b610a278161060d565b82525050565b5f602082019050610a405f830184610a1e565b92915050565b5f67ffffffffffffffff821115610a6057610a5f610871565b5b602082029050602081019050919050565b610a7a8161060d565b8114610a84575f80fd5b50565b5f81359050610a9581610a71565b92915050565b5f610aad610aa884610a46565b6108cf565b90508083825260208201905060208402830185811115610ad057610acf610914565b5b835b81811015610af95780610ae58882610a87565b845260208401935050602081019050610ad2565b5050509392505050565b5f82601f830112610b1757610b1661085d565b5b8135610b27848260208601610a9b565b91505092915050565b5f60208284031215610b4557610b446106cd565b5b5f82013567ffffffffffffffff811115610b6257610b616106d1565b5b610b6e84828501610b03565b9150509291505056fea264697066735822122035b4ca065fb4b2225e9da7d552026e146f1eadfb8571c9eaeddbfffdf9f7c68d64736f6c634300081a0033" # noqa: E501
8
+ ARRAYS_CONTRACT_RUNTIME = "0x608060405234801561000f575f80fd5b506004361061009c575f3560e01c8063542d83de11610064578063542d83de14610158578063605ba271146101885780638abe51fd146101a6578063962e450c146101c4578063bb69679b146101f45761009c565b80630afe5e33146100a057806312c9dcc8146100be5780631579bf66146100ee5780633ddcea2f1461010c57806351b4878814610128575b5f80fd5b6100a8610210565b6040516100b591906106a4565b60405180910390f35b6100d860048036038101906100d39190610708565b610266565b6040516100e5919061076d565b60405180910390f35b6100f6610297565b604051610103919061083d565b60405180910390f35b610126600480360381019061012191906109d7565b610330565b005b610142600480360381019061013d9190610708565b61034a565b60405161014f9190610a2d565b60405180910390f35b610172600480360381019061016d9190610708565b61036a565b60405161017f9190610a2d565b60405180910390f35b610190610389565b60405161019d91906106a4565b60405180910390f35b6101ae6103de565b6040516101bb919061083d565b60405180910390f35b6101de60048036038101906101d99190610708565b610477565b6040516101eb919061076d565b60405180910390f35b61020e60048036038101906102099190610b30565b6104a8565b005b6060600180548060200260200160405190810160405280929190818152602001828054801561025c57602002820191905f5260205f20905b815481526020019060010190808311610248575b5050505050905090565b60028181548110610275575f80fd5b905f5260205f209060209182820401919006915054906101000a900460f81b81565b6060600380548060200260200160405190810160405280929190818152602001828054801561032657602002820191905f5260205f20905f905b82829054906101000a900460f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190600101906020825f010492830192600103820291508084116102d15790505b5050505050905090565b80600290805190602001906103469291906104c1565b5050565b60018181548110610359575f80fd5b905f5260205f20015f915090505481565b5f8181548110610378575f80fd5b905f5260205f20015f915090505481565b60605f8054806020026020016040519081016040528092919081815260200182805480156103d457602002820191905f5260205f20905b8154815260200190600101908083116103c0575b5050505050905090565b6060600280548060200260200160405190810160405280929190818152602001828054801561046d57602002820191905f5260205f20905f905b82829054906101000a900460f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190600101906020825f010492830192600103820291508084116104185790505b5050505050905090565b60038181548110610486575f80fd5b905f5260205f209060209182820401919006915054906101000a900460f81b81565b805f90805190602001906104bd929190610563565b5050565b828054828255905f5260205f2090601f01602090048101928215610552579160200282015f5b8382111561052457835183826101000a81548160ff021916908360f81c021790555092602001926001016020815f010492830192600103026104e7565b80156105505782816101000a81549060ff02191690556001016020815f01049283019260010302610524565b505b50905061055f91906105ae565b5090565b828054828255905f5260205f2090810192821561059d579160200282015b8281111561059c578251825591602001919060010190610581565b5b5090506105aa91906105c9565b5090565b5b808211156105c5575f815f9055506001016105af565b5090565b5b808211156105e0575f815f9055506001016105ca565b5090565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f819050919050565b61061f8161060d565b82525050565b5f6106308383610616565b60208301905092915050565b5f602082019050919050565b5f610652826105e4565b61065c81856105ee565b9350610667836105fe565b805f5b8381101561069757815161067e8882610625565b97506106898361063c565b92505060018101905061066a565b5085935050505092915050565b5f6020820190508181035f8301526106bc8184610648565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b6106e7816106d5565b81146106f1575f80fd5b50565b5f81359050610702816106de565b92915050565b5f6020828403121561071d5761071c6106cd565b5b5f61072a848285016106f4565b91505092915050565b5f7fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b61076781610733565b82525050565b5f6020820190506107805f83018461075e565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6107b881610733565b82525050565b5f6107c983836107af565b60208301905092915050565b5f602082019050919050565b5f6107eb82610786565b6107f58185610790565b9350610800836107a0565b805f5b8381101561083057815161081788826107be565b9750610822836107d5565b925050600181019050610803565b5085935050505092915050565b5f6020820190508181035f83015261085581846107e1565b905092915050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6108a782610861565b810181811067ffffffffffffffff821117156108c6576108c5610871565b5b80604052505050565b5f6108d86106c4565b90506108e4828261089e565b919050565b5f67ffffffffffffffff82111561090357610902610871565b5b602082029050602081019050919050565b5f80fd5b61092181610733565b811461092b575f80fd5b50565b5f8135905061093c81610918565b92915050565b5f61095461094f846108e9565b6108cf565b9050808382526020820190506020840283018581111561097757610976610914565b5b835b818110156109a0578061098c888261092e565b845260208401935050602081019050610979565b5050509392505050565b5f82601f8301126109be576109bd61085d565b5b81356109ce848260208601610942565b91505092915050565b5f602082840312156109ec576109eb6106cd565b5b5f82013567ffffffffffffffff811115610a0957610a086106d1565b5b610a15848285016109aa565b91505092915050565b610a278161060d565b82525050565b5f602082019050610a405f830184610a1e565b92915050565b5f67ffffffffffffffff821115610a6057610a5f610871565b5b602082029050602081019050919050565b610a7a8161060d565b8114610a84575f80fd5b50565b5f81359050610a9581610a71565b92915050565b5f610aad610aa884610a46565b6108cf565b90508083825260208201905060208402830185811115610ad057610acf610914565b5b835b81811015610af95780610ae58882610a87565b845260208401935050602081019050610ad2565b5050509392505050565b5f82601f830112610b1757610b1661085d565b5b8135610b27848260208601610a9b565b91505092915050565b5f60208284031215610b4557610b446106cd565b5b5f82013567ffffffffffffffff811115610b6257610b616106d1565b5b610b6e84828501610b03565b9150509291505056fea264697066735822122035b4ca065fb4b2225e9da7d552026e146f1eadfb8571c9eaeddbfffdf9f7c68d64736f6c634300081a0033" # noqa: E501
9
9
  ARRAYS_CONTRACT_ABI = [
10
10
  {
11
11
  "inputs": [
@@ -1,11 +1,11 @@
1
1
  """
2
2
  Generated by `compile_contracts.py` script.
3
- Compiled with Solidity v0.8.24.
3
+ Compiled with Solidity v0.8.26.
4
4
  """
5
5
 
6
6
  # source: web3/_utils/contract_sources/BytesContracts.sol:BytesContract
7
- BYTES_CONTRACT_BYTECODE = "0x60806040526040518060400160405280600281526020017f01230000000000000000000000000000000000000000000000000000000000008152505f9081620000499190620002f9565b5034801562000056575f80fd5b5060405162000d8338038062000d8383398181016040528101906200007c919062000535565b80600190816200008d91906200058e565b505062000672565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806200011157607f821691505b602082108103620001275762000126620000cc565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200018b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200014e565b6200019786836200014e565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620001e1620001db620001d584620001af565b620001b8565b620001af565b9050919050565b5f819050919050565b620001fc83620001c1565b620002146200020b82620001e8565b8484546200015a565b825550505050565b5f90565b6200022a6200021c565b62000237818484620001f1565b505050565b5b818110156200025e57620002525f8262000220565b6001810190506200023d565b5050565b601f821115620002ad5762000277816200012d565b62000282846200013f565b8101602085101562000292578190505b620002aa620002a1856200013f565b8301826200023c565b50505b505050565b5f82821c905092915050565b5f620002cf5f1984600802620002b2565b1980831691505092915050565b5f620002e98383620002be565b9150826002028217905092915050565b620003048262000095565b67ffffffffffffffff81111562000320576200031f6200009f565b5b6200032c8254620000f9565b6200033982828562000262565b5f60209050601f8311600181146200036f575f84156200035a578287015190505b620003668582620002dc565b865550620003d5565b601f1984166200037f866200012d565b5f5b82811015620003a85784890151825560018201915060208501945060208101905062000381565b86831015620003c85784890151620003c4601f891682620002be565b8355505b6001600288020188555050505b505050505050565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b6200041182620003f6565b810181811067ffffffffffffffff821117156200043357620004326200009f565b5b80604052505050565b5f62000447620003dd565b905062000455828262000406565b919050565b5f67ffffffffffffffff8211156200047757620004766200009f565b5b6200048282620003f6565b9050602081019050919050565b5f5b83811015620004ae57808201518184015260208101905062000491565b5f8484015250505050565b5f620004cf620004c9846200045a565b6200043c565b905082815260208101848484011115620004ee57620004ed620003f2565b5b620004fb8482856200048f565b509392505050565b5f82601f8301126200051a5762000519620003ee565b5b81516200052c848260208601620004b9565b91505092915050565b5f602082840312156200054d576200054c620003e6565b5b5f82015167ffffffffffffffff8111156200056d576200056c620003ea565b5b6200057b8482850162000503565b91505092915050565b5f81519050919050565b620005998262000584565b67ffffffffffffffff811115620005b557620005b46200009f565b5b620005c18254620000f9565b620005ce82828562000262565b5f60209050601f83116001811462000604575f8415620005ef578287015190505b620005fb8582620002dc565b8655506200066a565b601f19841662000614866200012d565b5f5b828110156200063d5784890151825560018201915060208501945060208101905062000616565b868310156200065d578489015162000659601f891682620002be565b8355505b6001600288020188555050505b505050505050565b61070380620006805f395ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c8063209652551461004357806330de3cee14610061578063439970aa1461007f575b5f80fd5b61004b61009b565b6040516100589190610257565b60405180910390f35b61006961012b565b6040516100769190610257565b60405180910390f35b610099600480360381019061009491906103b4565b6101ba565b005b6060600180546100aa90610428565b80601f01602080910402602001604051908101604052809291908181526020018280546100d690610428565b80156101215780601f106100f857610100808354040283529160200191610121565b820191905f5260205f20905b81548152906001019060200180831161010457829003601f168201915b5050505050905090565b60605f805461013990610428565b80601f016020809104026020016040519081016040528092919081815260200182805461016590610428565b80156101b05780601f10610187576101008083540402835291602001916101b0565b820191905f5260205f20905b81548152906001019060200180831161019357829003601f168201915b5050505050905090565b80600190816101c991906105fe565b5050565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156102045780820151818401526020810190506101e9565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610229826101cd565b61023381856101d7565b93506102438185602086016101e7565b61024c8161020f565b840191505092915050565b5f6020820190508181035f83015261026f818461021f565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6102c68261020f565b810181811067ffffffffffffffff821117156102e5576102e4610290565b5b80604052505050565b5f6102f7610277565b905061030382826102bd565b919050565b5f67ffffffffffffffff82111561032257610321610290565b5b61032b8261020f565b9050602081019050919050565b828183375f83830152505050565b5f61035861035384610308565b6102ee565b9050828152602081018484840111156103745761037361028c565b5b61037f848285610338565b509392505050565b5f82601f83011261039b5761039a610288565b5b81356103ab848260208601610346565b91505092915050565b5f602082840312156103c9576103c8610280565b5b5f82013567ffffffffffffffff8111156103e6576103e5610284565b5b6103f284828501610387565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061043f57607f821691505b602082108103610452576104516103fb565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026104b47fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82610479565b6104be8683610479565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f6105026104fd6104f8846104d6565b6104df565b6104d6565b9050919050565b5f819050919050565b61051b836104e8565b61052f61052782610509565b848454610485565b825550505050565b5f90565b610543610537565b61054e818484610512565b505050565b5b81811015610571576105665f8261053b565b600181019050610554565b5050565b601f8211156105b65761058781610458565b6105908461046a565b8101602085101561059f578190505b6105b36105ab8561046a565b830182610553565b50505b505050565b5f82821c905092915050565b5f6105d65f19846008026105bb565b1980831691505092915050565b5f6105ee83836105c7565b9150826002028217905092915050565b610607826101cd565b67ffffffffffffffff8111156106205761061f610290565b5b61062a8254610428565b610635828285610575565b5f60209050601f831160018114610666575f8415610654578287015190505b61065e85826105e3565b8655506106c5565b601f19841661067486610458565b5f5b8281101561069b57848901518255600182019150602085019450602081019050610676565b868310156106b857848901516106b4601f8916826105c7565b8355505b6001600288020188555050505b50505050505056fea26469706673582212203e33460c4a0c84654ac3abec3c0f7d00b29e884c93a366845baca13fefb303a464736f6c63430008180033" # noqa: E501
8
- BYTES_CONTRACT_RUNTIME = "0x608060405234801561000f575f80fd5b506004361061003f575f3560e01c8063209652551461004357806330de3cee14610061578063439970aa1461007f575b5f80fd5b61004b61009b565b6040516100589190610257565b60405180910390f35b61006961012b565b6040516100769190610257565b60405180910390f35b610099600480360381019061009491906103b4565b6101ba565b005b6060600180546100aa90610428565b80601f01602080910402602001604051908101604052809291908181526020018280546100d690610428565b80156101215780601f106100f857610100808354040283529160200191610121565b820191905f5260205f20905b81548152906001019060200180831161010457829003601f168201915b5050505050905090565b60605f805461013990610428565b80601f016020809104026020016040519081016040528092919081815260200182805461016590610428565b80156101b05780601f10610187576101008083540402835291602001916101b0565b820191905f5260205f20905b81548152906001019060200180831161019357829003601f168201915b5050505050905090565b80600190816101c991906105fe565b5050565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156102045780820151818401526020810190506101e9565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610229826101cd565b61023381856101d7565b93506102438185602086016101e7565b61024c8161020f565b840191505092915050565b5f6020820190508181035f83015261026f818461021f565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6102c68261020f565b810181811067ffffffffffffffff821117156102e5576102e4610290565b5b80604052505050565b5f6102f7610277565b905061030382826102bd565b919050565b5f67ffffffffffffffff82111561032257610321610290565b5b61032b8261020f565b9050602081019050919050565b828183375f83830152505050565b5f61035861035384610308565b6102ee565b9050828152602081018484840111156103745761037361028c565b5b61037f848285610338565b509392505050565b5f82601f83011261039b5761039a610288565b5b81356103ab848260208601610346565b91505092915050565b5f602082840312156103c9576103c8610280565b5b5f82013567ffffffffffffffff8111156103e6576103e5610284565b5b6103f284828501610387565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061043f57607f821691505b602082108103610452576104516103fb565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026104b47fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82610479565b6104be8683610479565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f6105026104fd6104f8846104d6565b6104df565b6104d6565b9050919050565b5f819050919050565b61051b836104e8565b61052f61052782610509565b848454610485565b825550505050565b5f90565b610543610537565b61054e818484610512565b505050565b5b81811015610571576105665f8261053b565b600181019050610554565b5050565b601f8211156105b65761058781610458565b6105908461046a565b8101602085101561059f578190505b6105b36105ab8561046a565b830182610553565b50505b505050565b5f82821c905092915050565b5f6105d65f19846008026105bb565b1980831691505092915050565b5f6105ee83836105c7565b9150826002028217905092915050565b610607826101cd565b67ffffffffffffffff8111156106205761061f610290565b5b61062a8254610428565b610635828285610575565b5f60209050601f831160018114610666575f8415610654578287015190505b61065e85826105e3565b8655506106c5565b601f19841661067486610458565b5f5b8281101561069b57848901518255600182019150602085019450602081019050610676565b868310156106b857848901516106b4601f8916826105c7565b8355505b6001600288020188555050505b50505050505056fea26469706673582212203e33460c4a0c84654ac3abec3c0f7d00b29e884c93a366845baca13fefb303a464736f6c63430008180033" # noqa: E501
7
+ BYTES_CONTRACT_BYTECODE = "0x60806040526040518060400160405280600281526020017f01230000000000000000000000000000000000000000000000000000000000008152505f908161004791906102c5565b50348015610053575f80fd5b50604051610cca380380610cca833981810160405281019061007591906104b4565b80600190816100849190610505565b50506105d4565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061010657607f821691505b602082108103610119576101186100c2565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f6008830261017b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82610140565b6101858683610140565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f6101c96101c46101bf8461019d565b6101a6565b61019d565b9050919050565b5f819050919050565b6101e2836101af565b6101f66101ee826101d0565b84845461014c565b825550505050565b5f90565b61020a6101fe565b6102158184846101d9565b505050565b5b818110156102385761022d5f82610202565b60018101905061021b565b5050565b601f82111561027d5761024e8161011f565b61025784610131565b81016020851015610266578190505b61027a61027285610131565b83018261021a565b50505b505050565b5f82821c905092915050565b5f61029d5f1984600802610282565b1980831691505092915050565b5f6102b5838361028e565b9150826002028217905092915050565b6102ce8261008b565b67ffffffffffffffff8111156102e7576102e6610095565b5b6102f182546100ef565b6102fc82828561023c565b5f60209050601f83116001811461032d575f841561031b578287015190505b61032585826102aa565b86555061038c565b601f19841661033b8661011f565b5f5b828110156103625784890151825560018201915060208501945060208101905061033d565b8683101561037f578489015161037b601f89168261028e565b8355505b6001600288020188555050505b505050505050565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b6103c6826103ad565b810181811067ffffffffffffffff821117156103e5576103e4610095565b5b80604052505050565b5f6103f7610394565b905061040382826103bd565b919050565b5f67ffffffffffffffff82111561042257610421610095565b5b61042b826103ad565b9050602081019050919050565b8281835e5f83830152505050565b5f61045861045384610408565b6103ee565b905082815260208101848484011115610474576104736103a9565b5b61047f848285610438565b509392505050565b5f82601f83011261049b5761049a6103a5565b5b81516104ab848260208601610446565b91505092915050565b5f602082840312156104c9576104c861039d565b5b5f82015167ffffffffffffffff8111156104e6576104e56103a1565b5b6104f284828501610487565b91505092915050565b5f81519050919050565b61050e826104fb565b67ffffffffffffffff81111561052757610526610095565b5b61053182546100ef565b61053c82828561023c565b5f60209050601f83116001811461056d575f841561055b578287015190505b61056585826102aa565b8655506105cc565b601f19841661057b8661011f565b5f5b828110156105a25784890151825560018201915060208501945060208101905061057d565b868310156105bf57848901516105bb601f89168261028e565b8355505b6001600288020188555050505b505050505050565b6106e9806105e15f395ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c8063209652551461004357806330de3cee14610061578063439970aa1461007f575b5f80fd5b61004b61009b565b604051610058919061023d565b60405180910390f35b61006961012b565b604051610076919061023d565b60405180910390f35b6100996004803603810190610094919061039a565b6101ba565b005b6060600180546100aa9061040e565b80601f01602080910402602001604051908101604052809291908181526020018280546100d69061040e565b80156101215780601f106100f857610100808354040283529160200191610121565b820191905f5260205f20905b81548152906001019060200180831161010457829003601f168201915b5050505050905090565b60605f80546101399061040e565b80601f01602080910402602001604051908101604052809291908181526020018280546101659061040e565b80156101b05780601f10610187576101008083540402835291602001916101b0565b820191905f5260205f20905b81548152906001019060200180831161019357829003601f168201915b5050505050905090565b80600190816101c991906105e4565b5050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61020f826101cd565b61021981856101d7565b93506102298185602086016101e7565b610232816101f5565b840191505092915050565b5f6020820190508181035f8301526102558184610205565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6102ac826101f5565b810181811067ffffffffffffffff821117156102cb576102ca610276565b5b80604052505050565b5f6102dd61025d565b90506102e982826102a3565b919050565b5f67ffffffffffffffff82111561030857610307610276565b5b610311826101f5565b9050602081019050919050565b828183375f83830152505050565b5f61033e610339846102ee565b6102d4565b90508281526020810184848401111561035a57610359610272565b5b61036584828561031e565b509392505050565b5f82601f8301126103815761038061026e565b5b813561039184826020860161032c565b91505092915050565b5f602082840312156103af576103ae610266565b5b5f82013567ffffffffffffffff8111156103cc576103cb61026a565b5b6103d88482850161036d565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061042557607f821691505b602082108103610438576104376103e1565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f6008830261049a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261045f565b6104a4868361045f565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f6104e86104e36104de846104bc565b6104c5565b6104bc565b9050919050565b5f819050919050565b610501836104ce565b61051561050d826104ef565b84845461046b565b825550505050565b5f90565b61052961051d565b6105348184846104f8565b505050565b5b818110156105575761054c5f82610521565b60018101905061053a565b5050565b601f82111561059c5761056d8161043e565b61057684610450565b81016020851015610585578190505b61059961059185610450565b830182610539565b50505b505050565b5f82821c905092915050565b5f6105bc5f19846008026105a1565b1980831691505092915050565b5f6105d483836105ad565b9150826002028217905092915050565b6105ed826101cd565b67ffffffffffffffff81111561060657610605610276565b5b610610825461040e565b61061b82828561055b565b5f60209050601f83116001811461064c575f841561063a578287015190505b61064485826105c9565b8655506106ab565b601f19841661065a8661043e565b5f5b828110156106815784890151825560018201915060208501945060208101905061065c565b8683101561069e578489015161069a601f8916826105ad565b8355505b6001600288020188555050505b50505050505056fea2646970667358221220a6c92a686a51b0a95e8e482b40c49ad38e5f53e3cf9d7707add973666333801a64736f6c634300081a0033" # noqa: E501
8
+ BYTES_CONTRACT_RUNTIME = "0x608060405234801561000f575f80fd5b506004361061003f575f3560e01c8063209652551461004357806330de3cee14610061578063439970aa1461007f575b5f80fd5b61004b61009b565b604051610058919061023d565b60405180910390f35b61006961012b565b604051610076919061023d565b60405180910390f35b6100996004803603810190610094919061039a565b6101ba565b005b6060600180546100aa9061040e565b80601f01602080910402602001604051908101604052809291908181526020018280546100d69061040e565b80156101215780601f106100f857610100808354040283529160200191610121565b820191905f5260205f20905b81548152906001019060200180831161010457829003601f168201915b5050505050905090565b60605f80546101399061040e565b80601f01602080910402602001604051908101604052809291908181526020018280546101659061040e565b80156101b05780601f10610187576101008083540402835291602001916101b0565b820191905f5260205f20905b81548152906001019060200180831161019357829003601f168201915b5050505050905090565b80600190816101c991906105e4565b5050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61020f826101cd565b61021981856101d7565b93506102298185602086016101e7565b610232816101f5565b840191505092915050565b5f6020820190508181035f8301526102558184610205565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6102ac826101f5565b810181811067ffffffffffffffff821117156102cb576102ca610276565b5b80604052505050565b5f6102dd61025d565b90506102e982826102a3565b919050565b5f67ffffffffffffffff82111561030857610307610276565b5b610311826101f5565b9050602081019050919050565b828183375f83830152505050565b5f61033e610339846102ee565b6102d4565b90508281526020810184848401111561035a57610359610272565b5b61036584828561031e565b509392505050565b5f82601f8301126103815761038061026e565b5b813561039184826020860161032c565b91505092915050565b5f602082840312156103af576103ae610266565b5b5f82013567ffffffffffffffff8111156103cc576103cb61026a565b5b6103d88482850161036d565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061042557607f821691505b602082108103610438576104376103e1565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f6008830261049a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261045f565b6104a4868361045f565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f6104e86104e36104de846104bc565b6104c5565b6104bc565b9050919050565b5f819050919050565b610501836104ce565b61051561050d826104ef565b84845461046b565b825550505050565b5f90565b61052961051d565b6105348184846104f8565b505050565b5b818110156105575761054c5f82610521565b60018101905061053a565b5050565b601f82111561059c5761056d8161043e565b61057684610450565b81016020851015610585578190505b61059961059185610450565b830182610539565b50505b505050565b5f82821c905092915050565b5f6105bc5f19846008026105a1565b1980831691505092915050565b5f6105d483836105ad565b9150826002028217905092915050565b6105ed826101cd565b67ffffffffffffffff81111561060657610605610276565b5b610610825461040e565b61061b82828561055b565b5f60209050601f83116001811461064c575f841561063a578287015190505b61064485826105c9565b8655506106ab565b601f19841661065a8661043e565b5f5b828110156106815784890151825560018201915060208501945060208101905061065c565b8683101561069e578489015161069a601f8916826105ad565b8355505b6001600288020188555050505b50505050505056fea2646970667358221220a6c92a686a51b0a95e8e482b40c49ad38e5f53e3cf9d7707add973666333801a64736f6c634300081a0033" # noqa: E501
9
9
  BYTES_CONTRACT_ABI = [
10
10
  {
11
11
  "inputs": [{"internalType": "bytes", "name": "_value", "type": "bytes"}],
@@ -42,8 +42,8 @@ BYTES_CONTRACT_DATA = {
42
42
 
43
43
 
44
44
  # source: web3/_utils/contract_sources/BytesContracts.sol:Bytes32Contract
45
- BYTES32_CONTRACT_BYTECODE = "0x60806040527f01230123012301230123012301230123012301230123012301230123012301235f55348015610032575f80fd5b5060405161024638038061024683398181016040528101906100549190610098565b80600181905550506100c3565b5f80fd5b5f819050919050565b61007781610065565b8114610081575f80fd5b50565b5f815190506100928161006e565b92915050565b5f602082840312156100ad576100ac610061565b5b5f6100ba84828501610084565b91505092915050565b610176806100d05f395ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c8063209652551461004357806330de3cee1461006157806358825b101461007f575b5f80fd5b61004b61009b565b60405161005891906100ce565b60405180910390f35b6100696100a4565b60405161007691906100ce565b60405180910390f35b61009960048036038101906100949190610115565b6100ac565b005b5f600154905090565b5f8054905090565b8060018190555050565b5f819050919050565b6100c8816100b6565b82525050565b5f6020820190506100e15f8301846100bf565b92915050565b5f80fd5b6100f4816100b6565b81146100fe575f80fd5b50565b5f8135905061010f816100eb565b92915050565b5f6020828403121561012a576101296100e7565b5b5f61013784828501610101565b9150509291505056fea26469706673582212205dfe3119566bdd5d0a8ae37b9c7bcebf5cf2fe91882841511f7d181cbd269fc864736f6c63430008180033" # noqa: E501
46
- BYTES32_CONTRACT_RUNTIME = "0x608060405234801561000f575f80fd5b506004361061003f575f3560e01c8063209652551461004357806330de3cee1461006157806358825b101461007f575b5f80fd5b61004b61009b565b60405161005891906100ce565b60405180910390f35b6100696100a4565b60405161007691906100ce565b60405180910390f35b61009960048036038101906100949190610115565b6100ac565b005b5f600154905090565b5f8054905090565b8060018190555050565b5f819050919050565b6100c8816100b6565b82525050565b5f6020820190506100e15f8301846100bf565b92915050565b5f80fd5b6100f4816100b6565b81146100fe575f80fd5b50565b5f8135905061010f816100eb565b92915050565b5f6020828403121561012a576101296100e7565b5b5f61013784828501610101565b9150509291505056fea26469706673582212205dfe3119566bdd5d0a8ae37b9c7bcebf5cf2fe91882841511f7d181cbd269fc864736f6c63430008180033" # noqa: E501
45
+ BYTES32_CONTRACT_BYTECODE = "0x60806040527f01230123012301230123012301230123012301230123012301230123012301235f553480156031575f80fd5b50604051610238380380610238833981810160405281019060519190608f565b806001819055505060b5565b5f80fd5b5f819050919050565b6071816061565b8114607a575f80fd5b50565b5f81519050608981606a565b92915050565b5f6020828403121560a15760a0605d565b5b5f60ac84828501607d565b91505092915050565b610176806100c25f395ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c8063209652551461004357806330de3cee1461006157806358825b101461007f575b5f80fd5b61004b61009b565b60405161005891906100ce565b60405180910390f35b6100696100a4565b60405161007691906100ce565b60405180910390f35b61009960048036038101906100949190610115565b6100ac565b005b5f600154905090565b5f8054905090565b8060018190555050565b5f819050919050565b6100c8816100b6565b82525050565b5f6020820190506100e15f8301846100bf565b92915050565b5f80fd5b6100f4816100b6565b81146100fe575f80fd5b50565b5f8135905061010f816100eb565b92915050565b5f6020828403121561012a576101296100e7565b5b5f61013784828501610101565b9150509291505056fea2646970667358221220f5df63e706898be26203c255d363a1f473d469bc9089fea69b6d723150b63a9764736f6c634300081a0033" # noqa: E501
46
+ BYTES32_CONTRACT_RUNTIME = "0x608060405234801561000f575f80fd5b506004361061003f575f3560e01c8063209652551461004357806330de3cee1461006157806358825b101461007f575b5f80fd5b61004b61009b565b60405161005891906100ce565b60405180910390f35b6100696100a4565b60405161007691906100ce565b60405180910390f35b61009960048036038101906100949190610115565b6100ac565b005b5f600154905090565b5f8054905090565b8060018190555050565b5f819050919050565b6100c8816100b6565b82525050565b5f6020820190506100e15f8301846100bf565b92915050565b5f80fd5b6100f4816100b6565b81146100fe575f80fd5b50565b5f8135905061010f816100eb565b92915050565b5f6020828403121561012a576101296100e7565b5b5f61013784828501610101565b9150509291505056fea2646970667358221220f5df63e706898be26203c255d363a1f473d469bc9089fea69b6d723150b63a9764736f6c634300081a0033" # noqa: E501
47
47
  BYTES32_CONTRACT_ABI = [
48
48
  {
49
49
  "inputs": [{"internalType": "bytes32", "name": "_value", "type": "bytes32"}],