web3 6.20.2__tar.gz → 7.0.0__tar.gz

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 (506) hide show
  1. {web3-6.20.2 → web3-7.0.0}/LICENSE +1 -1
  2. web3-7.0.0/MANIFEST.in +13 -0
  3. web3-7.0.0/PKG-INFO +113 -0
  4. web3-7.0.0/README.md +37 -0
  5. {web3-6.20.2 → web3-7.0.0}/ens/__init__.py +13 -2
  6. {web3-6.20.2 → web3-7.0.0}/ens/_normalization.py +2 -17
  7. {web3-6.20.2 → web3-7.0.0}/ens/async_ens.py +33 -21
  8. {web3-6.20.2 → web3-7.0.0}/ens/base_ens.py +3 -1
  9. {web3-6.20.2 → web3-7.0.0}/ens/ens.py +16 -11
  10. {web3-6.20.2 → web3-7.0.0}/ens/exceptions.py +16 -29
  11. {web3-6.20.2 → web3-7.0.0}/ens/specs/nf.json +1 -1
  12. {web3-6.20.2 → web3-7.0.0}/ens/specs/normalization_spec.json +1 -1
  13. {web3-6.20.2 → web3-7.0.0}/ens/utils.py +52 -63
  14. {web3-6.20.2 → web3-7.0.0}/pyproject.toml +54 -14
  15. {web3-6.20.2 → web3-7.0.0}/setup.py +42 -43
  16. web3-7.0.0/tests/.DS_Store +0 -0
  17. web3-7.0.0/tests/beacon/test_async_beacon.py +269 -0
  18. web3-7.0.0/tests/beacon/test_beacon.py +225 -0
  19. web3-7.0.0/tests/conftest.py +124 -0
  20. web3-7.0.0/tests/core/admin-module/test_admin_addPeer.py +7 -0
  21. web3-7.0.0/tests/core/admin-module/test_admin_nodeInfo.py +7 -0
  22. web3-7.0.0/tests/core/admin-module/test_admin_peers.py +4 -0
  23. web3-7.0.0/tests/core/block-utils/test_select_method_for_block_identifier.py +48 -0
  24. web3-7.0.0/tests/core/caching-utils/test_generate_cache_key.py +51 -0
  25. web3-7.0.0/tests/core/caching-utils/test_request_caching.py +309 -0
  26. web3-7.0.0/tests/core/conftest.py +133 -0
  27. web3-7.0.0/tests/core/contracts/conftest.py +762 -0
  28. web3-7.0.0/tests/core/contracts/test_contract_ambiguous_functions.py +197 -0
  29. web3-7.0.0/tests/core/contracts/test_contract_attributes.py +43 -0
  30. web3-7.0.0/tests/core/contracts/test_contract_build_transaction.py +529 -0
  31. web3-7.0.0/tests/core/contracts/test_contract_call_interface.py +2339 -0
  32. web3-7.0.0/tests/core/contracts/test_contract_caller_interface.py +496 -0
  33. web3-7.0.0/tests/core/contracts/test_contract_class_construction.py +88 -0
  34. web3-7.0.0/tests/core/contracts/test_contract_constructor.py +604 -0
  35. web3-7.0.0/tests/core/contracts/test_contract_constructor_encoding.py +130 -0
  36. web3-7.0.0/tests/core/contracts/test_contract_deployment.py +238 -0
  37. web3-7.0.0/tests/core/contracts/test_contract_estimate_gas.py +216 -0
  38. web3-7.0.0/tests/core/contracts/test_contract_events_build_filter.py +71 -0
  39. web3-7.0.0/tests/core/contracts/test_contract_example.py +212 -0
  40. web3-7.0.0/tests/core/contracts/test_contract_init.py +77 -0
  41. web3-7.0.0/tests/core/contracts/test_contract_method_abi_decoding.py +149 -0
  42. web3-7.0.0/tests/core/contracts/test_contract_method_abi_encoding.py +199 -0
  43. web3-7.0.0/tests/core/contracts/test_contract_method_to_argument_matching.py +205 -0
  44. web3-7.0.0/tests/core/contracts/test_contract_panic_errors.py +48 -0
  45. web3-7.0.0/tests/core/contracts/test_contract_transact_interface.py +612 -0
  46. web3-7.0.0/tests/core/contracts/test_contract_util_functions.py +128 -0
  47. web3-7.0.0/tests/core/contracts/test_extracting_event_data.py +1265 -0
  48. web3-7.0.0/tests/core/contracts/test_extracting_event_data_old.py +155 -0
  49. web3-7.0.0/tests/core/contracts/test_offchain_lookup.py +210 -0
  50. web3-7.0.0/tests/core/contracts/utils.py +27 -0
  51. web3-7.0.0/tests/core/datastructures/test_datastructures.py +209 -0
  52. web3-7.0.0/tests/core/empty-object/test_empty_object_is_falsy.py +8 -0
  53. web3-7.0.0/tests/core/eth-module/conftest.py +6 -0
  54. web3-7.0.0/tests/core/eth-module/test_accounts.py +580 -0
  55. web3-7.0.0/tests/core/eth-module/test_block_api.py +173 -0
  56. web3-7.0.0/tests/core/eth-module/test_default_account_api.py +46 -0
  57. web3-7.0.0/tests/core/eth-module/test_eth_contract.py +47 -0
  58. web3-7.0.0/tests/core/eth-module/test_eth_fee_history.py +22 -0
  59. web3-7.0.0/tests/core/eth-module/test_eth_filter.py +47 -0
  60. web3-7.0.0/tests/core/eth-module/test_eth_properties.py +26 -0
  61. web3-7.0.0/tests/core/eth-module/test_gas_pricing.py +27 -0
  62. web3-7.0.0/tests/core/eth-module/test_poa.py +46 -0
  63. web3-7.0.0/tests/core/eth-module/test_transactions.py +422 -0
  64. web3-7.0.0/tests/core/eth-tester-api/test_withdrawals.py +55 -0
  65. web3-7.0.0/tests/core/exceptions/test_exceptions.py +32 -0
  66. web3-7.0.0/tests/core/filtering/conftest.py +108 -0
  67. web3-7.0.0/tests/core/filtering/test_basic_filter_tests.py +78 -0
  68. web3-7.0.0/tests/core/filtering/test_contract_create_filter_topic_merging.py +16 -0
  69. web3-7.0.0/tests/core/filtering/test_contract_data_filters.py +475 -0
  70. web3-7.0.0/tests/core/filtering/test_contract_get_logs.py +398 -0
  71. web3-7.0.0/tests/core/filtering/test_contract_on_event_filtering.py +476 -0
  72. web3-7.0.0/tests/core/filtering/test_contract_past_event_filtering.py +190 -0
  73. web3-7.0.0/tests/core/filtering/test_contract_topic_filters.py +440 -0
  74. web3-7.0.0/tests/core/filtering/test_existing_filter_instance.py +84 -0
  75. web3-7.0.0/tests/core/filtering/test_filter_against_latest_blocks.py +52 -0
  76. web3-7.0.0/tests/core/filtering/test_filter_against_pending_transactions.py +59 -0
  77. web3-7.0.0/tests/core/filtering/test_filter_against_transaction_logs.py +40 -0
  78. web3-7.0.0/tests/core/filtering/test_filters_against_many_blocks.py +269 -0
  79. web3-7.0.0/tests/core/filtering/test_utils_functions.py +225 -0
  80. web3-7.0.0/tests/core/filtering/utils.py +77 -0
  81. web3-7.0.0/tests/core/gas-strategies/test_rpc_gas_pricing_strategies.py +11 -0
  82. web3-7.0.0/tests/core/gas-strategies/test_time_based_gas_price_strategy.py +279 -0
  83. web3-7.0.0/tests/core/manager/conftest.py +38 -0
  84. web3-7.0.0/tests/core/manager/test_default_middlewares.py +24 -0
  85. web3-7.0.0/tests/core/manager/test_middleware_can_be_stateful.py +36 -0
  86. web3-7.0.0/tests/core/manager/test_middleware_onion_api.py +187 -0
  87. web3-7.0.0/tests/core/manager/test_provider_property.py +20 -0
  88. web3-7.0.0/tests/core/manager/test_provider_request_wrapping.py +33 -0
  89. web3-7.0.0/tests/core/manager/test_response_formatters.py +372 -0
  90. web3-7.0.0/tests/core/method-class/test_method.py +387 -0
  91. web3-7.0.0/tests/core/method-class/test_result_formatters.py +51 -0
  92. web3-7.0.0/tests/core/middleware/test_attrdict_middleware.py +122 -0
  93. web3-7.0.0/tests/core/middleware/test_eth_tester_middleware.py +131 -0
  94. web3-7.0.0/tests/core/middleware/test_filter_middleware.py +381 -0
  95. web3-7.0.0/tests/core/middleware/test_formatting_middleware.py +103 -0
  96. web3-7.0.0/tests/core/middleware/test_gas_price_strategy.py +69 -0
  97. web3-7.0.0/tests/core/middleware/test_name_to_address_middleware.py +180 -0
  98. web3-7.0.0/tests/core/middleware/test_stalecheck.py +234 -0
  99. web3-7.0.0/tests/core/middleware/test_transaction_signing.py +611 -0
  100. web3-7.0.0/tests/core/module-class/test_module.py +98 -0
  101. web3-7.0.0/tests/core/providers/test_async_http_provider.py +105 -0
  102. web3-7.0.0/tests/core/providers/test_async_ipc_provider.py +260 -0
  103. web3-7.0.0/tests/core/providers/test_async_tester_provider.py +67 -0
  104. web3-7.0.0/tests/core/providers/test_auto_provider.py +61 -0
  105. web3-7.0.0/tests/core/providers/test_base_provider.py +57 -0
  106. web3-7.0.0/tests/core/providers/test_http_provider.py +112 -0
  107. web3-7.0.0/tests/core/providers/test_http_request_retry.py +208 -0
  108. web3-7.0.0/tests/core/providers/test_ipc_provider.py +187 -0
  109. web3-7.0.0/tests/core/providers/test_legacy_websocket_provider.py +79 -0
  110. web3-7.0.0/tests/core/providers/test_tester_provider.py +120 -0
  111. web3-7.0.0/tests/core/providers/test_websocket_provider.py +381 -0
  112. web3-7.0.0/tests/core/test_library_files.py +30 -0
  113. web3-7.0.0/tests/core/testing-module/test_testing_mine.py +22 -0
  114. web3-7.0.0/tests/core/testing-module/test_testing_snapshot_and_revert.py +47 -0
  115. web3-7.0.0/tests/core/testing-module/test_testing_timeTravel.py +9 -0
  116. web3-7.0.0/tests/core/utilities/conftest.py +14 -0
  117. web3-7.0.0/tests/core/utilities/test_abi.py +701 -0
  118. web3-7.0.0/tests/core/utilities/test_abi_filtering_by_argument_name.py +61 -0
  119. web3-7.0.0/tests/core/utilities/test_abi_is_encodable.py +102 -0
  120. web3-7.0.0/tests/core/utilities/test_abi_named_tree.py +111 -0
  121. web3-7.0.0/tests/core/utilities/test_address.py +71 -0
  122. web3-7.0.0/tests/core/utilities/test_async_transaction.py +97 -0
  123. web3-7.0.0/tests/core/utilities/test_attach_modules.py +209 -0
  124. web3-7.0.0/tests/core/utilities/test_attributedict.py +109 -0
  125. web3-7.0.0/tests/core/utilities/test_caching_utils.py +35 -0
  126. web3-7.0.0/tests/core/utilities/test_construct_event_data_set.py +150 -0
  127. web3-7.0.0/tests/core/utilities/test_construct_event_filter_params.py +103 -0
  128. web3-7.0.0/tests/core/utilities/test_construct_event_topics.py +164 -0
  129. web3-7.0.0/tests/core/utilities/test_datatypes.py +38 -0
  130. web3-7.0.0/tests/core/utilities/test_decorators.py +23 -0
  131. web3-7.0.0/tests/core/utilities/test_encoding.py +295 -0
  132. web3-7.0.0/tests/core/utilities/test_event_filter_builder.py +80 -0
  133. web3-7.0.0/tests/core/utilities/test_event_interface.py +34 -0
  134. web3-7.0.0/tests/core/utilities/test_fee_utils.py +48 -0
  135. web3-7.0.0/tests/core/utilities/test_formatters.py +56 -0
  136. web3-7.0.0/tests/core/utilities/test_http_session_manager.py +544 -0
  137. web3-7.0.0/tests/core/utilities/test_is_predefined_block_number.py +22 -0
  138. web3-7.0.0/tests/core/utilities/test_is_probably_enum.py +23 -0
  139. web3-7.0.0/tests/core/utilities/test_is_recognized_type.py +182 -0
  140. web3-7.0.0/tests/core/utilities/test_math.py +57 -0
  141. web3-7.0.0/tests/core/utilities/test_method_formatters.py +238 -0
  142. web3-7.0.0/tests/core/utilities/test_prepare_transaction_replacement.py +132 -0
  143. web3-7.0.0/tests/core/utilities/test_select_filter_method.py +44 -0
  144. web3-7.0.0/tests/core/utilities/test_threads.py +110 -0
  145. web3-7.0.0/tests/core/utilities/test_valid_transaction_params.py +178 -0
  146. web3-7.0.0/tests/core/utilities/test_validation.py +147 -0
  147. web3-7.0.0/tests/core/web3-module/test_api.py +2 -0
  148. web3-7.0.0/tests/core/web3-module/test_attach_modules.py +107 -0
  149. web3-7.0.0/tests/core/web3-module/test_client_version.py +2 -0
  150. web3-7.0.0/tests/core/web3-module/test_conversions.py +255 -0
  151. web3-7.0.0/tests/core/web3-module/test_import_and_version.py +5 -0
  152. web3-7.0.0/tests/core/web3-module/test_keccak.py +121 -0
  153. web3-7.0.0/tests/core/web3-module/test_providers.py +32 -0
  154. web3-7.0.0/tests/core/web3-module/test_strict_bytes_type_checking.py +106 -0
  155. web3-7.0.0/tests/core/web3-module/test_web3_inheritance.py +12 -0
  156. web3-7.0.0/tests/ens/conftest.py +663 -0
  157. web3-7.0.0/tests/ens/normalization/normalization_tests.json +1 -0
  158. web3-7.0.0/tests/ens/normalization/test_normalize_name_ensip15.py +47 -0
  159. web3-7.0.0/tests/ens/test_ens.py +270 -0
  160. web3-7.0.0/tests/ens/test_get_registry.py +56 -0
  161. web3-7.0.0/tests/ens/test_get_text.py +166 -0
  162. web3-7.0.0/tests/ens/test_nameprep.py +37 -0
  163. web3-7.0.0/tests/ens/test_offchain_resolution.py +234 -0
  164. web3-7.0.0/tests/ens/test_setup_address.py +288 -0
  165. web3-7.0.0/tests/ens/test_setup_name.py +250 -0
  166. web3-7.0.0/tests/ens/test_utils.py +233 -0
  167. web3-7.0.0/tests/ens/test_wildcard_resolution.py +48 -0
  168. web3-7.0.0/tests/integration/.DS_Store +0 -0
  169. web3-7.0.0/tests/integration/README.md +68 -0
  170. web3-7.0.0/tests/integration/common.py +23 -0
  171. web3-7.0.0/tests/integration/conftest.py +77 -0
  172. web3-7.0.0/tests/integration/generate_fixtures/common.py +239 -0
  173. web3-7.0.0/tests/integration/generate_fixtures/go_ethereum.py +366 -0
  174. web3-7.0.0/tests/integration/geth-1.14.5-fixture.zip +0 -0
  175. web3-7.0.0/tests/integration/go_ethereum/common.py +123 -0
  176. web3-7.0.0/tests/integration/go_ethereum/conftest.py +363 -0
  177. web3-7.0.0/tests/integration/go_ethereum/test_goethereum_http.py +156 -0
  178. web3-7.0.0/tests/integration/go_ethereum/test_goethereum_ipc.py +115 -0
  179. web3-7.0.0/tests/integration/go_ethereum/test_goethereum_legacy_ws.py +109 -0
  180. web3-7.0.0/tests/integration/go_ethereum/test_goethereum_ws/conftest.py +48 -0
  181. web3-7.0.0/tests/integration/go_ethereum/test_goethereum_ws/test_async_await_w3.py +73 -0
  182. web3-7.0.0/tests/integration/go_ethereum/test_goethereum_ws/test_async_ctx_manager_w3.py +74 -0
  183. web3-7.0.0/tests/integration/go_ethereum/test_goethereum_ws/test_async_iterator_w3.py +74 -0
  184. web3-7.0.0/tests/integration/go_ethereum/utils.py +77 -0
  185. web3-7.0.0/tests/integration/test_ethereum_tester.py +678 -0
  186. web3-7.0.0/tests/utils.py +87 -0
  187. {web3-6.20.2 → web3-7.0.0}/web3/__init__.py +20 -24
  188. {web3-6.20.2 → web3-7.0.0}/web3/_utils/abi.py +115 -271
  189. {web3-6.20.2 → web3-7.0.0}/web3/_utils/async_transactions.py +7 -4
  190. web3-7.0.0/web3/_utils/batching.py +217 -0
  191. {web3-6.20.2 → web3-7.0.0}/web3/_utils/blocks.py +6 -2
  192. web3-7.0.0/web3/_utils/caching.py +183 -0
  193. {web3-6.20.2 → web3-7.0.0}/web3/_utils/compat/__init__.py +2 -3
  194. {web3-6.20.2 → web3-7.0.0}/web3/_utils/contract_sources/compile_contracts.py +1 -1
  195. web3-7.0.0/web3/_utils/contract_sources/contract_data/arrays_contract.py +97 -0
  196. web3-7.0.0/web3/_utils/contract_sources/contract_data/bytes_contracts.py +79 -0
  197. {web3-6.20.2 → web3-7.0.0}/web3/_utils/contract_sources/contract_data/constructor_contracts.py +7 -7
  198. web3-7.0.0/web3/_utils/contract_sources/contract_data/contract_caller_tester.py +59 -0
  199. {web3-6.20.2 → web3-7.0.0}/web3/_utils/contract_sources/contract_data/emitter_contract.py +3 -3
  200. {web3-6.20.2 → web3-7.0.0}/web3/_utils/contract_sources/contract_data/event_contracts.py +5 -5
  201. {web3-6.20.2 → web3-7.0.0}/web3/_utils/contract_sources/contract_data/extended_resolver.py +3 -3
  202. {web3-6.20.2 → web3-7.0.0}/web3/_utils/contract_sources/contract_data/fallback_function_contract.py +3 -3
  203. {web3-6.20.2 → web3-7.0.0}/web3/_utils/contract_sources/contract_data/function_name_tester_contract.py +3 -3
  204. {web3-6.20.2 → web3-7.0.0}/web3/_utils/contract_sources/contract_data/math_contract.py +3 -3
  205. web3-7.0.0/web3/_utils/contract_sources/contract_data/offchain_lookup.py +52 -0
  206. web3-7.0.0/web3/_utils/contract_sources/contract_data/offchain_resolver.py +100 -0
  207. web3-7.0.0/web3/_utils/contract_sources/contract_data/panic_errors_contract.py +99 -0
  208. {web3-6.20.2 → web3-7.0.0}/web3/_utils/contract_sources/contract_data/payable_tester.py +3 -3
  209. web3-7.0.0/web3/_utils/contract_sources/contract_data/receive_function_contracts.py +58 -0
  210. {web3-6.20.2 → web3-7.0.0}/web3/_utils/contract_sources/contract_data/reflector_contracts.py +3 -3
  211. {web3-6.20.2 → web3-7.0.0}/web3/_utils/contract_sources/contract_data/revert_contract.py +3 -3
  212. {web3-6.20.2 → web3-7.0.0}/web3/_utils/contract_sources/contract_data/simple_resolver.py +3 -3
  213. web3-7.0.0/web3/_utils/contract_sources/contract_data/storage_contract.py +50 -0
  214. web3-7.0.0/web3/_utils/contract_sources/contract_data/string_contract.py +42 -0
  215. {web3-6.20.2 → web3-7.0.0}/web3/_utils/contract_sources/contract_data/tuple_contracts.py +5 -5
  216. web3-7.0.0/web3/_utils/contracts.py +381 -0
  217. {web3-6.20.2 → web3-7.0.0}/web3/_utils/datatypes.py +5 -1
  218. {web3-6.20.2 → web3-7.0.0}/web3/_utils/decorators.py +13 -23
  219. {web3-6.20.2 → web3-7.0.0}/web3/_utils/empty.py +1 -1
  220. {web3-6.20.2 → web3-7.0.0}/web3/_utils/encoding.py +16 -12
  221. {web3-6.20.2 → web3-7.0.0}/web3/_utils/ens.py +2 -1
  222. {web3-6.20.2 → web3-7.0.0}/web3/_utils/error_formatters_utils.py +5 -3
  223. {web3-6.20.2 → web3-7.0.0}/web3/_utils/events.py +66 -69
  224. {web3-6.20.2 → web3-7.0.0}/web3/_utils/fee_utils.py +1 -3
  225. {web3-6.20.2 → web3-7.0.0}/web3/_utils/filters.py +24 -22
  226. {web3-6.20.2 → web3-7.0.0}/web3/_utils/formatters.py +2 -2
  227. web3-7.0.0/web3/_utils/http.py +9 -0
  228. web3-7.0.0/web3/_utils/http_session_manager.py +303 -0
  229. {web3-6.20.2 → web3-7.0.0}/web3/_utils/math.py +14 -15
  230. {web3-6.20.2 → web3-7.0.0}/web3/_utils/method_formatters.py +34 -36
  231. {web3-6.20.2 → web3-7.0.0}/web3/_utils/module.py +2 -1
  232. {web3-6.20.2 → web3-7.0.0}/web3/_utils/module_testing/__init__.py +0 -3
  233. {web3-6.20.2 → web3-7.0.0}/web3/_utils/module_testing/eth_module.py +695 -643
  234. {web3-6.20.2 → web3-7.0.0}/web3/_utils/module_testing/module_testing_utils.py +61 -34
  235. {web3-6.20.2 → web3-7.0.0}/web3/_utils/module_testing/persistent_connection_provider.py +56 -25
  236. web3-7.0.0/web3/_utils/module_testing/utils.py +258 -0
  237. web3-7.0.0/web3/_utils/module_testing/web3_module.py +736 -0
  238. {web3-6.20.2 → web3-7.0.0}/web3/_utils/normalizers.py +13 -11
  239. {web3-6.20.2 → web3-7.0.0}/web3/_utils/rpc_abi.py +5 -32
  240. {web3-6.20.2 → web3-7.0.0}/web3/_utils/threads.py +8 -7
  241. {web3-6.20.2 → web3-7.0.0}/web3/_utils/transactions.py +14 -12
  242. {web3-6.20.2 → web3-7.0.0}/web3/_utils/type_conversion.py +5 -1
  243. {web3-6.20.2 → web3-7.0.0}/web3/_utils/validation.py +17 -17
  244. web3-7.0.0/web3/auto/gethdev.py +18 -0
  245. web3-7.0.0/web3/beacon/__init__.py +7 -0
  246. {web3-6.20.2 → web3-7.0.0}/web3/beacon/async_beacon.py +9 -5
  247. web3-6.20.2/web3/beacon/main.py → web3-7.0.0/web3/beacon/beacon.py +7 -5
  248. {web3-6.20.2 → web3-7.0.0}/web3/contract/__init__.py +7 -0
  249. {web3-6.20.2 → web3-7.0.0}/web3/contract/async_contract.py +47 -46
  250. {web3-6.20.2 → web3-7.0.0}/web3/contract/base_contract.py +183 -158
  251. {web3-6.20.2 → web3-7.0.0}/web3/contract/contract.py +49 -43
  252. {web3-6.20.2 → web3-7.0.0}/web3/contract/utils.py +203 -59
  253. {web3-6.20.2 → web3-7.0.0}/web3/datastructures.py +79 -31
  254. {web3-6.20.2 → web3-7.0.0}/web3/eth/__init__.py +7 -0
  255. {web3-6.20.2 → web3-7.0.0}/web3/eth/async_eth.py +39 -51
  256. {web3-6.20.2 → web3-7.0.0}/web3/eth/base_eth.py +17 -10
  257. {web3-6.20.2 → web3-7.0.0}/web3/eth/eth.py +30 -68
  258. {web3-6.20.2 → web3-7.0.0}/web3/exceptions.py +108 -82
  259. {web3-6.20.2 → web3-7.0.0}/web3/gas_strategies/time_based.py +8 -6
  260. web3-7.0.0/web3/geth.py +268 -0
  261. {web3-6.20.2 → web3-7.0.0}/web3/main.py +75 -122
  262. web3-7.0.0/web3/manager.py +637 -0
  263. {web3-6.20.2 → web3-7.0.0}/web3/method.py +38 -31
  264. web3-7.0.0/web3/middleware/__init__.py +111 -0
  265. {web3-6.20.2 → web3-7.0.0}/web3/middleware/attrdict.py +36 -49
  266. web3-7.0.0/web3/middleware/base.py +174 -0
  267. {web3-6.20.2 → web3-7.0.0}/web3/middleware/buffered_gas_estimate.py +20 -21
  268. {web3-6.20.2 → web3-7.0.0}/web3/middleware/filter.py +157 -117
  269. web3-7.0.0/web3/middleware/formatting.py +225 -0
  270. {web3-6.20.2 → web3-7.0.0}/web3/middleware/gas_price_strategy.py +20 -32
  271. {web3-6.20.2 → web3-7.0.0}/web3/middleware/names.py +29 -26
  272. web3-7.0.0/web3/middleware/proof_of_authority.py +68 -0
  273. {web3-6.20.2 → web3-7.0.0}/web3/middleware/pythonic.py +2 -2
  274. web3-7.0.0/web3/middleware/signing.py +224 -0
  275. web3-7.0.0/web3/middleware/stalecheck.py +93 -0
  276. {web3-6.20.2 → web3-7.0.0}/web3/middleware/validation.py +5 -13
  277. {web3-6.20.2 → web3-7.0.0}/web3/module.py +54 -10
  278. {web3-6.20.2 → web3-7.0.0}/web3/providers/__init__.py +10 -6
  279. web3-7.0.0/web3/providers/async_base.py +219 -0
  280. {web3-6.20.2 → web3-7.0.0}/web3/providers/auto.py +3 -3
  281. web3-7.0.0/web3/providers/base.py +191 -0
  282. {web3-6.20.2 → web3-7.0.0}/web3/providers/eth_tester/__init__.py +5 -0
  283. {web3-6.20.2 → web3-7.0.0}/web3/providers/eth_tester/defaults.py +1 -64
  284. {web3-6.20.2 → web3-7.0.0}/web3/providers/eth_tester/main.py +99 -31
  285. {web3-6.20.2 → web3-7.0.0}/web3/providers/eth_tester/middleware.py +45 -73
  286. {web3-6.20.2 → web3-7.0.0}/web3/providers/ipc.py +42 -46
  287. web3-6.20.2/web3/providers/websocket/websocket.py → web3-7.0.0/web3/providers/legacy_websocket.py +32 -7
  288. web3-7.0.0/web3/providers/persistent/__init__.py +22 -0
  289. web3-7.0.0/web3/providers/persistent/async_ipc.py +153 -0
  290. {web3-6.20.2/web3/providers → web3-7.0.0/web3/providers/persistent}/persistent.py +106 -25
  291. web3-7.0.0/web3/providers/persistent/persistent_connection.py +84 -0
  292. {web3-6.20.2/web3/providers/websocket → web3-7.0.0/web3/providers/persistent}/request_processor.py +94 -32
  293. web3-7.0.0/web3/providers/persistent/utils.py +43 -0
  294. web3-6.20.2/web3/providers/websocket/websocket_v2.py → web3-7.0.0/web3/providers/persistent/websocket.py +29 -28
  295. web3-7.0.0/web3/providers/rpc/__init__.py +11 -0
  296. web3-7.0.0/web3/providers/rpc/async_rpc.py +171 -0
  297. web3-7.0.0/web3/providers/rpc/rpc.py +179 -0
  298. web3-7.0.0/web3/providers/rpc/utils.py +92 -0
  299. {web3-6.20.2 → web3-7.0.0}/web3/testing.py +4 -4
  300. {web3-6.20.2 → web3-7.0.0}/web3/tools/benchmark/main.py +22 -22
  301. {web3-6.20.2 → web3-7.0.0}/web3/tools/benchmark/node.py +2 -8
  302. {web3-6.20.2 → web3-7.0.0}/web3/tools/benchmark/reporting.py +2 -2
  303. {web3-6.20.2 → web3-7.0.0}/web3/tools/benchmark/utils.py +1 -1
  304. {web3-6.20.2 → web3-7.0.0}/web3/tracing.py +9 -5
  305. {web3-6.20.2 → web3-7.0.0}/web3/types.py +30 -107
  306. web3-7.0.0/web3/utils/__init__.py +72 -0
  307. web3-7.0.0/web3/utils/abi.py +586 -0
  308. {web3-6.20.2 → web3-7.0.0}/web3/utils/async_exception_handling.py +19 -7
  309. {web3-6.20.2 → web3-7.0.0}/web3/utils/caching.py +32 -13
  310. {web3-6.20.2 → web3-7.0.0}/web3/utils/exception_handling.py +7 -5
  311. web3-7.0.0/web3.egg-info/PKG-INFO +113 -0
  312. web3-7.0.0/web3.egg-info/SOURCES.txt +348 -0
  313. web3-7.0.0/web3.egg-info/requires.txt +57 -0
  314. {web3-6.20.2 → web3-7.0.0}/web3.egg-info/top_level.txt +0 -1
  315. web3-6.20.2/MANIFEST.in +0 -11
  316. web3-6.20.2/PKG-INFO +0 -103
  317. web3-6.20.2/README.md +0 -31
  318. web3-6.20.2/ethpm/__init__.py +0 -20
  319. web3-6.20.2/ethpm/_utils/backend.py +0 -93
  320. web3-6.20.2/ethpm/_utils/cache.py +0 -44
  321. web3-6.20.2/ethpm/_utils/chains.py +0 -119
  322. web3-6.20.2/ethpm/_utils/contract.py +0 -35
  323. web3-6.20.2/ethpm/_utils/deployments.py +0 -145
  324. web3-6.20.2/ethpm/_utils/ipfs.py +0 -116
  325. web3-6.20.2/ethpm/_utils/protobuf/ipfs_file_pb2.py +0 -33
  326. web3-6.20.2/ethpm/_utils/registry.py +0 -29
  327. web3-6.20.2/ethpm/assets/ens/v3.json +0 -1
  328. web3-6.20.2/ethpm/assets/escrow/with_bytecode_v3.json +0 -1
  329. web3-6.20.2/ethpm/assets/ipfs_file.proto +0 -32
  330. web3-6.20.2/ethpm/assets/owned/output_v3.json +0 -1
  331. web3-6.20.2/ethpm/assets/owned/with_contract_type_v3.json +0 -1
  332. web3-6.20.2/ethpm/assets/registry/contracts/Authority.sol +0 -156
  333. web3-6.20.2/ethpm/assets/registry/contracts/IndexedOrderedSetLib.sol +0 -106
  334. web3-6.20.2/ethpm/assets/registry/contracts/PackageDB.sol +0 -225
  335. web3-6.20.2/ethpm/assets/registry/contracts/PackageRegistry.sol +0 -361
  336. web3-6.20.2/ethpm/assets/registry/contracts/PackageRegistryInterface.sol +0 -97
  337. web3-6.20.2/ethpm/assets/registry/contracts/ReleaseDB.sol +0 -309
  338. web3-6.20.2/ethpm/assets/registry/contracts/ReleaseValidator.sol +0 -152
  339. web3-6.20.2/ethpm/assets/registry/solc_input.json +0 -1
  340. web3-6.20.2/ethpm/assets/registry/solc_output.json +0 -1
  341. web3-6.20.2/ethpm/assets/registry/v3.json +0 -1
  342. web3-6.20.2/ethpm/assets/safe-math-lib/v3-strict-no-deployments.json +0 -1
  343. web3-6.20.2/ethpm/assets/simple-registry/contracts/Ownable.sol +0 -63
  344. web3-6.20.2/ethpm/assets/simple-registry/contracts/PackageRegistry.sol +0 -373
  345. web3-6.20.2/ethpm/assets/simple-registry/contracts/PackageRegistryInterface.sol +0 -96
  346. web3-6.20.2/ethpm/assets/simple-registry/solc_input.json +0 -33
  347. web3-6.20.2/ethpm/assets/simple-registry/solc_output.json +0 -1
  348. web3-6.20.2/ethpm/assets/simple-registry/v3.json +0 -1
  349. web3-6.20.2/ethpm/assets/standard-token/output_v3.json +0 -1
  350. web3-6.20.2/ethpm/assets/standard-token/with_bytecode_v3.json +0 -1
  351. web3-6.20.2/ethpm/assets/vyper_registry/0.1.0.json +0 -1
  352. web3-6.20.2/ethpm/assets/vyper_registry/registry.vy +0 -216
  353. web3-6.20.2/ethpm/assets/vyper_registry/registry_with_delete.vy +0 -244
  354. web3-6.20.2/ethpm/backends/base.py +0 -43
  355. web3-6.20.2/ethpm/backends/http.py +0 -108
  356. web3-6.20.2/ethpm/backends/ipfs.py +0 -219
  357. web3-6.20.2/ethpm/backends/registry.py +0 -154
  358. web3-6.20.2/ethpm/constants.py +0 -17
  359. web3-6.20.2/ethpm/contract.py +0 -187
  360. web3-6.20.2/ethpm/dependencies.py +0 -58
  361. web3-6.20.2/ethpm/deployments.py +0 -80
  362. web3-6.20.2/ethpm/ethpm-spec/examples/escrow/1.0.0-pretty.json +0 -146
  363. web3-6.20.2/ethpm/ethpm-spec/examples/escrow/1.0.0.json +0 -1
  364. web3-6.20.2/ethpm/ethpm-spec/examples/escrow/contracts/Escrow.sol +0 -32
  365. web3-6.20.2/ethpm/ethpm-spec/examples/escrow/contracts/SafeSendLib.sol +0 -20
  366. web3-6.20.2/ethpm/ethpm-spec/examples/escrow/v3-pretty.json +0 -171
  367. web3-6.20.2/ethpm/ethpm-spec/examples/escrow/v3.json +0 -1
  368. web3-6.20.2/ethpm/ethpm-spec/examples/owned/1.0.0-pretty.json +0 -21
  369. web3-6.20.2/ethpm/ethpm-spec/examples/owned/1.0.0.json +0 -1
  370. web3-6.20.2/ethpm/ethpm-spec/examples/owned/contracts/Owned.sol +0 -12
  371. web3-6.20.2/ethpm/ethpm-spec/examples/owned/v3-pretty.json +0 -27
  372. web3-6.20.2/ethpm/ethpm-spec/examples/owned/v3.json +0 -1
  373. web3-6.20.2/ethpm/ethpm-spec/examples/piper-coin/1.0.0-pretty.json +0 -31
  374. web3-6.20.2/ethpm/ethpm-spec/examples/piper-coin/1.0.0.json +0 -1
  375. web3-6.20.2/ethpm/ethpm-spec/examples/piper-coin/v3-pretty.json +0 -21
  376. web3-6.20.2/ethpm/ethpm-spec/examples/piper-coin/v3.json +0 -1
  377. web3-6.20.2/ethpm/ethpm-spec/examples/safe-math-lib/1.0.0-pretty.json +0 -85
  378. web3-6.20.2/ethpm/ethpm-spec/examples/safe-math-lib/1.0.0.json +0 -1
  379. web3-6.20.2/ethpm/ethpm-spec/examples/safe-math-lib/contracts/SafeMathLib.sol +0 -24
  380. web3-6.20.2/ethpm/ethpm-spec/examples/safe-math-lib/v3-pretty.json +0 -117
  381. web3-6.20.2/ethpm/ethpm-spec/examples/safe-math-lib/v3.json +0 -1
  382. web3-6.20.2/ethpm/ethpm-spec/examples/standard-token/1.0.0-pretty.json +0 -55
  383. web3-6.20.2/ethpm/ethpm-spec/examples/standard-token/1.0.0.json +0 -1
  384. web3-6.20.2/ethpm/ethpm-spec/examples/standard-token/contracts/AbstractToken.sol +0 -20
  385. web3-6.20.2/ethpm/ethpm-spec/examples/standard-token/contracts/StandardToken.sol +0 -84
  386. web3-6.20.2/ethpm/ethpm-spec/examples/standard-token/v3-pretty.json +0 -460
  387. web3-6.20.2/ethpm/ethpm-spec/examples/standard-token/v3.json +0 -1
  388. web3-6.20.2/ethpm/ethpm-spec/examples/transferable/1.0.0-pretty.json +0 -21
  389. web3-6.20.2/ethpm/ethpm-spec/examples/transferable/1.0.0.json +0 -1
  390. web3-6.20.2/ethpm/ethpm-spec/examples/transferable/contracts/Transferable.sol +0 -14
  391. web3-6.20.2/ethpm/ethpm-spec/examples/transferable/v3-pretty.json +0 -27
  392. web3-6.20.2/ethpm/ethpm-spec/examples/transferable/v3.json +0 -1
  393. web3-6.20.2/ethpm/ethpm-spec/examples/wallet/1.0.0-pretty.json +0 -120
  394. web3-6.20.2/ethpm/ethpm-spec/examples/wallet/1.0.0.json +0 -1
  395. web3-6.20.2/ethpm/ethpm-spec/examples/wallet/contracts/Wallet.sol +0 -41
  396. web3-6.20.2/ethpm/ethpm-spec/examples/wallet/v3-pretty.json +0 -181
  397. web3-6.20.2/ethpm/ethpm-spec/examples/wallet/v3.json +0 -1
  398. web3-6.20.2/ethpm/ethpm-spec/examples/wallet-with-send/1.0.0-pretty.json +0 -135
  399. web3-6.20.2/ethpm/ethpm-spec/examples/wallet-with-send/1.0.0.json +0 -1
  400. web3-6.20.2/ethpm/ethpm-spec/examples/wallet-with-send/contracts/WalletWithSend.sol +0 -18
  401. web3-6.20.2/ethpm/ethpm-spec/examples/wallet-with-send/v3-pretty.json +0 -207
  402. web3-6.20.2/ethpm/ethpm-spec/examples/wallet-with-send/v3.json +0 -1
  403. web3-6.20.2/ethpm/ethpm-spec/spec/package.spec.json +0 -379
  404. web3-6.20.2/ethpm/ethpm-spec/spec/v3.spec.json +0 -483
  405. web3-6.20.2/ethpm/exceptions.py +0 -68
  406. web3-6.20.2/ethpm/package.py +0 -438
  407. web3-6.20.2/ethpm/tools/__init__.py +0 -4
  408. web3-6.20.2/ethpm/tools/builder.py +0 -930
  409. web3-6.20.2/ethpm/tools/checker.py +0 -312
  410. web3-6.20.2/ethpm/tools/get_manifest.py +0 -19
  411. web3-6.20.2/ethpm/uri.py +0 -141
  412. web3-6.20.2/ethpm/validation/manifest.py +0 -146
  413. web3-6.20.2/ethpm/validation/misc.py +0 -39
  414. web3-6.20.2/ethpm/validation/package.py +0 -80
  415. web3-6.20.2/ethpm/validation/uri.py +0 -163
  416. web3-6.20.2/web3/_utils/caching.py +0 -60
  417. web3-6.20.2/web3/_utils/contract_sources/contract_data/address_reflector.py +0 -29
  418. web3-6.20.2/web3/_utils/contract_sources/contract_data/arrays_contract.py +0 -97
  419. web3-6.20.2/web3/_utils/contract_sources/contract_data/bytes_contracts.py +0 -79
  420. web3-6.20.2/web3/_utils/contract_sources/contract_data/contract_caller_tester.py +0 -59
  421. web3-6.20.2/web3/_utils/contract_sources/contract_data/offchain_lookup.py +0 -52
  422. web3-6.20.2/web3/_utils/contract_sources/contract_data/offchain_resolver.py +0 -100
  423. web3-6.20.2/web3/_utils/contract_sources/contract_data/panic_errors_contract.py +0 -99
  424. web3-6.20.2/web3/_utils/contract_sources/contract_data/receive_function_contracts.py +0 -58
  425. web3-6.20.2/web3/_utils/contract_sources/contract_data/storage_contract.py +0 -50
  426. web3-6.20.2/web3/_utils/contract_sources/contract_data/string_contract.py +0 -42
  427. web3-6.20.2/web3/_utils/contracts.py +0 -487
  428. web3-6.20.2/web3/_utils/http.py +0 -7
  429. web3-6.20.2/web3/_utils/miner.py +0 -88
  430. web3-6.20.2/web3/_utils/module_testing/go_ethereum_personal_module.py +0 -323
  431. web3-6.20.2/web3/_utils/module_testing/web3_module.py +0 -315
  432. web3-6.20.2/web3/_utils/request.py +0 -265
  433. web3-6.20.2/web3/auto/gethdev.py +0 -13
  434. web3-6.20.2/web3/beacon/__init__.py +0 -2
  435. web3-6.20.2/web3/geth.py +0 -521
  436. web3-6.20.2/web3/manager.py +0 -467
  437. web3-6.20.2/web3/middleware/__init__.py +0 -133
  438. web3-6.20.2/web3/middleware/abi.py +0 -11
  439. web3-6.20.2/web3/middleware/async_cache.py +0 -99
  440. web3-6.20.2/web3/middleware/cache.py +0 -374
  441. web3-6.20.2/web3/middleware/exception_handling.py +0 -49
  442. web3-6.20.2/web3/middleware/exception_retry_request.py +0 -188
  443. web3-6.20.2/web3/middleware/fixture.py +0 -190
  444. web3-6.20.2/web3/middleware/formatting.py +0 -209
  445. web3-6.20.2/web3/middleware/geth_poa.py +0 -81
  446. web3-6.20.2/web3/middleware/normalize_request_parameters.py +0 -11
  447. web3-6.20.2/web3/middleware/signing.py +0 -239
  448. web3-6.20.2/web3/middleware/simulate_unmined_transaction.py +0 -43
  449. web3-6.20.2/web3/middleware/stalecheck.py +0 -120
  450. web3-6.20.2/web3/pm.py +0 -602
  451. web3-6.20.2/web3/providers/async_base.py +0 -141
  452. web3-6.20.2/web3/providers/async_rpc.py +0 -99
  453. web3-6.20.2/web3/providers/base.py +0 -135
  454. web3-6.20.2/web3/providers/rpc.py +0 -98
  455. web3-6.20.2/web3/providers/websocket/__init__.py +0 -11
  456. web3-6.20.2/web3/providers/websocket/websocket_connection.py +0 -42
  457. web3-6.20.2/web3/tools/__init__.py +0 -4
  458. web3-6.20.2/web3/tools/benchmark/__init__.py +0 -0
  459. web3-6.20.2/web3/tools/pytest_ethereum/__init__.py +0 -0
  460. web3-6.20.2/web3/tools/pytest_ethereum/_utils.py +0 -145
  461. web3-6.20.2/web3/tools/pytest_ethereum/deployer.py +0 -48
  462. web3-6.20.2/web3/tools/pytest_ethereum/exceptions.py +0 -22
  463. web3-6.20.2/web3/tools/pytest_ethereum/linker.py +0 -128
  464. web3-6.20.2/web3/tools/pytest_ethereum/plugins.py +0 -33
  465. web3-6.20.2/web3/utils/__init__.py +0 -19
  466. web3-6.20.2/web3/utils/abi.py +0 -21
  467. web3-6.20.2/web3.egg-info/PKG-INFO +0 -103
  468. web3-6.20.2/web3.egg-info/SOURCES.txt +0 -289
  469. web3-6.20.2/web3.egg-info/entry_points.txt +0 -2
  470. web3-6.20.2/web3.egg-info/requires.txt +0 -65
  471. {web3-6.20.2 → web3-7.0.0}/ens/abis.py +0 -0
  472. {web3-6.20.2 → web3-7.0.0}/ens/auto.py +0 -0
  473. {web3-6.20.2 → web3-7.0.0}/ens/constants.py +0 -0
  474. {web3-6.20.2 → web3-7.0.0}/ens/contract_data.py +0 -0
  475. {web3-6.20.2 → web3-7.0.0}/setup.cfg +0 -0
  476. {web3-6.20.2/ethpm/_utils → web3-7.0.0/tests}/__init__.py +0 -0
  477. {web3-6.20.2/ethpm/_utils/protobuf → web3-7.0.0/tests/core/utilities}/__init__.py +0 -0
  478. {web3-6.20.2/ethpm/assets → web3-7.0.0/tests/integration/go_ethereum}/__init__.py +0 -0
  479. {web3-6.20.2/ethpm/backends → web3-7.0.0/tests/integration/go_ethereum/test_goethereum_ws}/__init__.py +0 -0
  480. {web3-6.20.2/ethpm/validation → web3-7.0.0/web3/_utils}/__init__.py +0 -0
  481. /web3-6.20.2/web3/_utils/function_identifiers.py → /web3-7.0.0/web3/_utils/abi_element_identifiers.py +0 -0
  482. {web3-6.20.2 → web3-7.0.0}/web3/_utils/async_caching.py +0 -0
  483. {web3-6.20.2/web3/_utils → web3-7.0.0/web3/_utils/contract_sources}/__init__.py +0 -0
  484. {web3-6.20.2/web3/_utils/contract_sources → web3-7.0.0/web3/_utils/contract_sources/contract_data}/__init__.py +0 -0
  485. {web3-6.20.2 → web3-7.0.0}/web3/_utils/contract_sources/contract_data/_custom_contract_data.py +0 -0
  486. {web3-6.20.2 → web3-7.0.0}/web3/_utils/hypothesis.py +0 -0
  487. {web3-6.20.2 → web3-7.0.0}/web3/_utils/module_testing/go_ethereum_admin_module.py +0 -0
  488. {web3-6.20.2 → web3-7.0.0}/web3/_utils/module_testing/go_ethereum_txpool_module.py +0 -0
  489. {web3-6.20.2 → web3-7.0.0}/web3/_utils/module_testing/net_module.py +0 -0
  490. {web3-6.20.2 → web3-7.0.0}/web3/_utils/utility_methods.py +0 -0
  491. {web3-6.20.2 → web3-7.0.0}/web3/_utils/windows.py +0 -0
  492. {web3-6.20.2 → web3-7.0.0}/web3/auto/__init__.py +0 -0
  493. {web3-6.20.2 → web3-7.0.0}/web3/beacon/api_endpoints.py +0 -0
  494. {web3-6.20.2 → web3-7.0.0}/web3/constants.py +0 -0
  495. {web3-6.20.2/web3/_utils/contract_sources/contract_data → web3-7.0.0/web3/gas_strategies}/__init__.py +0 -0
  496. {web3-6.20.2 → web3-7.0.0}/web3/gas_strategies/rpc.py +0 -0
  497. {web3-6.20.2 → web3-7.0.0}/web3/logs.py +0 -0
  498. {web3-6.20.2 → web3-7.0.0}/web3/net.py +0 -0
  499. {web3-6.20.2 → web3-7.0.0}/web3/py.typed +0 -0
  500. {web3-6.20.2/web3/gas_strategies → web3-7.0.0/web3/scripts}/__init__.py +0 -0
  501. {web3-6.20.2/web3/scripts → web3-7.0.0/web3/scripts/release}/__init__.py +0 -0
  502. {web3-6.20.2 → web3-7.0.0}/web3/scripts/release/test_package.py +0 -0
  503. {web3-6.20.2/web3/scripts/release → web3-7.0.0/web3/tools/benchmark}/__init__.py +0 -0
  504. {web3-6.20.2 → web3-7.0.0}/web3/utils/address.py +0 -0
  505. {web3-6.20.2 → web3-7.0.0}/web3.egg-info/dependency_links.txt +0 -0
  506. {web3-6.20.2 → web3-7.0.0}/web3.egg-info/not-zip-safe +0 -0
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016 The Ethereum Foundation
3
+ Copyright (c) 2016-2024 The Ethereum Foundation
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
web3-7.0.0/MANIFEST.in ADDED
@@ -0,0 +1,13 @@
1
+ include LICENSE
2
+ include README.md
3
+
4
+ recursive-include ens/specs *
5
+ recursive-include scripts *
6
+ recursive-include tests *
7
+
8
+ global-include *.pyi
9
+
10
+ recursive-exclude * __pycache__
11
+ recursive-exclude * *.py[co]
12
+ prune .tox
13
+ prune venv*
web3-7.0.0/PKG-INFO ADDED
@@ -0,0 +1,113 @@
1
+ Metadata-Version: 2.1
2
+ Name: web3
3
+ Version: 7.0.0
4
+ Summary: web3: A Python library for interacting with Ethereum
5
+ Home-page: https://github.com/ethereum/web3.py
6
+ Author: The Ethereum Foundation
7
+ Author-email: snakecharmers@ethereum.org
8
+ License: MIT
9
+ Keywords: ethereum
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Natural Language :: English
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Requires-Python: >=3.8, <4
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: aiohttp>=3.7.4.post0
24
+ Requires-Dist: eth-abi>=5.0.1
25
+ Requires-Dist: eth-account>=0.13.1
26
+ Requires-Dist: eth-hash[pycryptodome]>=0.5.1
27
+ Requires-Dist: eth-typing>=5.0.0
28
+ Requires-Dist: eth-utils>=5.0.0
29
+ Requires-Dist: hexbytes>=1.2.0
30
+ Requires-Dist: pydantic>=2.4.0
31
+ Requires-Dist: pywin32>=223; platform_system == "Windows"
32
+ Requires-Dist: requests>=2.23.0
33
+ Requires-Dist: typing-extensions>=4.0.1
34
+ Requires-Dist: types-requests>=2.0.0
35
+ Requires-Dist: websockets>=10.0.0
36
+ Requires-Dist: pyunormalize>=15.0.0
37
+ Provides-Extra: dev
38
+ Requires-Dist: build>=0.9.0; extra == "dev"
39
+ Requires-Dist: bumpversion>=0.5.3; extra == "dev"
40
+ Requires-Dist: flaky>=3.7.0; extra == "dev"
41
+ Requires-Dist: hypothesis>=3.31.2; extra == "dev"
42
+ Requires-Dist: ipython; extra == "dev"
43
+ Requires-Dist: mypy==1.10.0; extra == "dev"
44
+ Requires-Dist: pre-commit>=3.4.0; extra == "dev"
45
+ Requires-Dist: pytest-asyncio<0.23,>=0.21.2; extra == "dev"
46
+ Requires-Dist: pytest-mock>=1.10; extra == "dev"
47
+ Requires-Dist: setuptools>=38.6.0; extra == "dev"
48
+ Requires-Dist: tox>=4.0.0; extra == "dev"
49
+ Requires-Dist: tqdm>4.32; extra == "dev"
50
+ Requires-Dist: twine>=1.13; extra == "dev"
51
+ Requires-Dist: wheel; extra == "dev"
52
+ Requires-Dist: sphinx>=6.0.0; extra == "dev"
53
+ Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "dev"
54
+ Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "dev"
55
+ Requires-Dist: towncrier<22,>=21; extra == "dev"
56
+ Requires-Dist: eth-account>=0.13.0; extra == "dev"
57
+ Requires-Dist: eth-tester[py-evm]<0.13.0b1,>=0.11.0b1; extra == "dev"
58
+ Requires-Dist: py-geth>=5.0.0b1; extra == "dev"
59
+ Requires-Dist: pytest-asyncio<0.23,>=0.18.1; extra == "dev"
60
+ Requires-Dist: pytest-mock>=1.10; extra == "dev"
61
+ Requires-Dist: pytest-xdist>=2.4.0; extra == "dev"
62
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
63
+ Provides-Extra: docs
64
+ Requires-Dist: sphinx>=6.0.0; extra == "docs"
65
+ Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "docs"
66
+ Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "docs"
67
+ Requires-Dist: towncrier<22,>=21; extra == "docs"
68
+ Requires-Dist: eth-account>=0.13.0; extra == "docs"
69
+ Provides-Extra: test
70
+ Requires-Dist: eth-tester[py-evm]<0.13.0b1,>=0.11.0b1; extra == "test"
71
+ Requires-Dist: py-geth>=5.0.0b1; extra == "test"
72
+ Requires-Dist: pytest-asyncio<0.23,>=0.18.1; extra == "test"
73
+ Requires-Dist: pytest-mock>=1.10; extra == "test"
74
+ Requires-Dist: pytest-xdist>=2.4.0; extra == "test"
75
+ Requires-Dist: pytest>=7.0.0; extra == "test"
76
+
77
+ # web3.py
78
+
79
+ [![Join the conversation on Discord](https://img.shields.io/discord/809793915578089484?color=blue&label=chat&logo=discord&logoColor=white)](https://discord.gg/GHryRvPB84)
80
+ [![Build Status](https://circleci.com/gh/ethereum/web3.py.svg?style=shield)](https://circleci.com/gh/ethereum/web3.py)
81
+ [![PyPI version](https://badge.fury.io/py/web3.svg)](https://badge.fury.io/py/web3)
82
+ [![Python versions](https://img.shields.io/pypi/pyversions/web3.svg)](https://pypi.python.org/pypi/web3)
83
+ [![Docs build](https://readthedocs.org/projects/web3py/badge/?version=latest)](https://web3py.readthedocs.io/en/latest/?badge=latest)
84
+
85
+ ## A Python Library for Interacting with Ethereum
86
+
87
+ web3.py allows you to interact with the Ethereum blockchain using Python, enabling you to build decentralized applications, interact with smart contracts, and much more.
88
+
89
+ - Python 3.8+ support
90
+
91
+ ______________________________________________________________________
92
+
93
+ ## Quickstart
94
+
95
+ [Get started in 5 minutes](https://web3py.readthedocs.io/en/latest/quickstart.html) or
96
+ [take a tour](https://web3py.readthedocs.io/en/latest/overview.html) of the library.
97
+
98
+ ## Documentation
99
+
100
+ For additional guides, examples, and APIs, see the [documentation](https://web3py.readthedocs.io/en/latest/).
101
+
102
+ ## Want to Help?
103
+
104
+ Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our
105
+ guidelines for [contributing](https://web3py.readthedocs.io/en/latest/contributing.html),
106
+ then check out issues that are labeled
107
+ [Good First Issue](https://github.com/ethereum/web3.py/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good+First+Issue%22).
108
+
109
+ ______________________________________________________________________
110
+
111
+ ## Questions on Implementation or Usage?
112
+
113
+ Join the conversation in the Ethereum Python Community [Discord](https://discord.gg/GHryRvPB84).
web3-7.0.0/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # web3.py
2
+
3
+ [![Join the conversation on Discord](https://img.shields.io/discord/809793915578089484?color=blue&label=chat&logo=discord&logoColor=white)](https://discord.gg/GHryRvPB84)
4
+ [![Build Status](https://circleci.com/gh/ethereum/web3.py.svg?style=shield)](https://circleci.com/gh/ethereum/web3.py)
5
+ [![PyPI version](https://badge.fury.io/py/web3.svg)](https://badge.fury.io/py/web3)
6
+ [![Python versions](https://img.shields.io/pypi/pyversions/web3.svg)](https://pypi.python.org/pypi/web3)
7
+ [![Docs build](https://readthedocs.org/projects/web3py/badge/?version=latest)](https://web3py.readthedocs.io/en/latest/?badge=latest)
8
+
9
+ ## A Python Library for Interacting with Ethereum
10
+
11
+ web3.py allows you to interact with the Ethereum blockchain using Python, enabling you to build decentralized applications, interact with smart contracts, and much more.
12
+
13
+ - Python 3.8+ support
14
+
15
+ ______________________________________________________________________
16
+
17
+ ## Quickstart
18
+
19
+ [Get started in 5 minutes](https://web3py.readthedocs.io/en/latest/quickstart.html) or
20
+ [take a tour](https://web3py.readthedocs.io/en/latest/overview.html) of the library.
21
+
22
+ ## Documentation
23
+
24
+ For additional guides, examples, and APIs, see the [documentation](https://web3py.readthedocs.io/en/latest/).
25
+
26
+ ## Want to Help?
27
+
28
+ Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our
29
+ guidelines for [contributing](https://web3py.readthedocs.io/en/latest/contributing.html),
30
+ then check out issues that are labeled
31
+ [Good First Issue](https://github.com/ethereum/web3.py/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good+First+Issue%22).
32
+
33
+ ______________________________________________________________________
34
+
35
+ ## Questions on Implementation or Usage?
36
+
37
+ Join the conversation in the Ethereum Python Community [Discord](https://discord.gg/GHryRvPB84).
@@ -1,5 +1,3 @@
1
- # flake8: noqa
2
-
3
1
  from .async_ens import (
4
2
  AsyncENS,
5
3
  )
@@ -18,3 +16,16 @@ from .exceptions import (
18
16
  UnderfundedBid,
19
17
  UnownedName,
20
18
  )
19
+
20
+ __all__ = [
21
+ "AsyncENS",
22
+ "BaseENS",
23
+ "ENS",
24
+ "AddressMismatch",
25
+ "BidTooLow",
26
+ "InvalidLabel",
27
+ "InvalidName",
28
+ "UnauthorizedError",
29
+ "UnderfundedBid",
30
+ "UnownedName",
31
+ ]
@@ -3,13 +3,11 @@ from enum import (
3
3
  )
4
4
  import json
5
5
  import os
6
- from sys import (
7
- version_info,
8
- )
9
6
  from typing import (
10
7
  Any,
11
8
  Dict,
12
9
  List,
10
+ Literal,
13
11
  Optional,
14
12
  Set,
15
13
  Tuple,
@@ -25,17 +23,6 @@ from .exceptions import (
25
23
  InvalidName,
26
24
  )
27
25
 
28
- # TODO: remove once web3 supports python>=3.8
29
- if version_info >= (3, 8):
30
- from typing import (
31
- Literal,
32
- )
33
- else:
34
- from typing_extensions import ( # type: ignore
35
- Literal,
36
- )
37
-
38
-
39
26
  # -- setup -- #
40
27
 
41
28
 
@@ -61,7 +48,7 @@ with open(os.path.join(specs_dir_path, "normalization_spec.json")) as spec:
61
48
  # clean `FE0F` (65039) from entries since it's optional
62
49
  for e in NORMALIZATION_SPEC["emoji"]:
63
50
  if 65039 in e:
64
- for i in range(e.count(65039)):
51
+ for _ in range(e.count(65039)):
65
52
  e.remove(65039)
66
53
 
67
54
  with open(os.path.join(specs_dir_path, "nf.json")) as nf:
@@ -235,7 +222,6 @@ def _validate_tokens_and_get_label_type(tokens: List[Token]) -> str:
235
222
  :param List[Token] tokens: the tokens to validate
236
223
  :raises InvalidName: if any of the tokens are invalid
237
224
  """
238
-
239
225
  if all(token.type == TokenType.EMOJI for token in tokens):
240
226
  return "emoji"
241
227
 
@@ -436,7 +422,6 @@ def normalize_name_ensip15(name: str) -> ENSNormalizedName:
436
422
  :param str name: the dot-separated ENS name
437
423
  :raises InvalidName: if ``name`` has invalid syntax
438
424
  """
439
-
440
425
  if not name:
441
426
  raise InvalidName("Name cannot be empty")
442
427
  elif isinstance(name, (bytes, bytearray)):
@@ -4,6 +4,7 @@ from copy import (
4
4
  from typing import (
5
5
  TYPE_CHECKING,
6
6
  Any,
7
+ Coroutine,
7
8
  Optional,
8
9
  Sequence,
9
10
  Tuple,
@@ -46,6 +47,7 @@ from ens.constants import (
46
47
  )
47
48
  from ens.exceptions import (
48
49
  AddressMismatch,
50
+ ENSValueError,
49
51
  ResolverNotFound,
50
52
  UnauthorizedError,
51
53
  UnownedName,
@@ -71,12 +73,14 @@ if TYPE_CHECKING:
71
73
  AsyncContractFunction,
72
74
  )
73
75
  from web3.main import AsyncWeb3 # noqa: F401
76
+ from web3.middleware.base import ( # noqa: F401
77
+ Middleware,
78
+ )
74
79
  from web3.providers import ( # noqa: F401
75
80
  AsyncBaseProvider,
76
81
  BaseProvider,
77
82
  )
78
83
  from web3.types import ( # noqa: F401
79
- AsyncMiddleware,
80
84
  TxParams,
81
85
  )
82
86
 
@@ -87,7 +91,7 @@ class AsyncENS(BaseENS):
87
91
  like getting the address for a name.
88
92
 
89
93
  Unless otherwise specified, all addresses are assumed to be a `str` in
90
- `checksum format <https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md>`_,
94
+ `checksum format <https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md>`_, # blocklint: pragma # noqa: E501
91
95
  like: ``"0x314159265dD8dbb310642f98f50C066173C1259b"``
92
96
  """
93
97
 
@@ -96,9 +100,9 @@ class AsyncENS(BaseENS):
96
100
 
97
101
  def __init__(
98
102
  self,
99
- provider: "AsyncBaseProvider" = cast("AsyncBaseProvider", default),
103
+ provider: "AsyncBaseProvider" = None,
100
104
  addr: ChecksumAddress = None,
101
- middlewares: Optional[Sequence[Tuple["AsyncMiddleware", str]]] = None,
105
+ middleware: Optional[Sequence[Tuple["Middleware", str]]] = None,
102
106
  ) -> None:
103
107
  """
104
108
  :param provider: a single provider used to connect to Ethereum
@@ -106,7 +110,8 @@ class AsyncENS(BaseENS):
106
110
  :param hex-string addr: the address of the ENS registry on-chain.
107
111
  If not provided, ENS.py will default to the mainnet ENS registry address.
108
112
  """
109
- self.w3 = init_async_web3(provider, middlewares)
113
+ provider = provider or cast("AsyncBaseProvider", default)
114
+ self.w3 = init_async_web3(provider, middleware)
110
115
 
111
116
  ens_addr = addr if addr else ENS_MAINNET_ADDR
112
117
  self.ens = self.w3.eth.contract(abi=abis.ENS, address=ens_addr)
@@ -127,10 +132,8 @@ class AsyncENS(BaseENS):
127
132
  provided, defaults to the mainnet ENS registry address.
128
133
  """
129
134
  provider = w3.manager.provider
130
- middlewares = w3.middleware_onion.middlewares
131
- ns = cls(
132
- cast("AsyncBaseProvider", provider), addr=addr, middlewares=middlewares
133
- )
135
+ middleware = w3.middleware_onion.middleware
136
+ ns = cls(cast("AsyncBaseProvider", provider), addr=addr, middleware=middleware)
134
137
 
135
138
  # inherit strict bytes checking from w3 instance
136
139
  ns.strict_bytes_type_checking = w3.strict_bytes_type_checking
@@ -167,7 +170,7 @@ class AsyncENS(BaseENS):
167
170
  async def setup_address(
168
171
  self,
169
172
  name: str,
170
- address: Union[Address, ChecksumAddress, HexAddress] = cast(
173
+ address: Union[Address, ChecksumAddress, HexAddress] = cast( # noqa: B008
171
174
  ChecksumAddress, default
172
175
  ),
173
176
  coin_type: Optional[int] = None,
@@ -204,7 +207,7 @@ class AsyncENS(BaseENS):
204
207
  elif is_binary_address(address):
205
208
  address = to_checksum_address(cast(str, address))
206
209
  elif not is_checksum_address(address):
207
- raise ValueError("You must supply the address in checksum format")
210
+ raise ENSValueError("You must supply the address in checksum format")
208
211
  if await self.address(name) == address:
209
212
  return None
210
213
  if address is None:
@@ -282,7 +285,7 @@ class AsyncENS(BaseENS):
282
285
  if is_binary_address(address):
283
286
  address = to_checksum_address(address)
284
287
  if not is_checksum_address(address):
285
- raise ValueError("You must supply the address in checksum format")
288
+ raise ENSValueError("You must supply the address in checksum format")
286
289
  await self._assert_control(address, name)
287
290
  if not resolved:
288
291
  await self.setup_address(name, address, transact=transact)
@@ -305,7 +308,7 @@ class AsyncENS(BaseENS):
305
308
  async def setup_owner(
306
309
  self,
307
310
  name: str,
308
- new_owner: ChecksumAddress = cast(ChecksumAddress, default),
311
+ new_owner: ChecksumAddress = None,
309
312
  transact: Optional["TxParams"] = None,
310
313
  ) -> Optional[ChecksumAddress]:
311
314
  """
@@ -332,6 +335,7 @@ class AsyncENS(BaseENS):
332
335
  :raises UnauthorizedError: if ``'from'`` in `transact` does not own `name`
333
336
  :returns: the new owner's address
334
337
  """
338
+ new_owner = new_owner or cast(ChecksumAddress, default)
335
339
  if not transact:
336
340
  transact = {}
337
341
  transact = deepcopy(transact)
@@ -466,9 +470,13 @@ class AsyncENS(BaseENS):
466
470
  resolver_addr = await self.address("resolver.eth")
467
471
  namehash = raw_name_to_hash(name)
468
472
  if await self.ens.caller.resolver(namehash) != resolver_addr:
469
- await self.ens.functions.setResolver( # type: ignore
470
- namehash, resolver_addr
471
- ).transact(transact)
473
+ coro = cast(
474
+ Coroutine[Any, Any, HexBytes],
475
+ self.ens.functions.setResolver(namehash, resolver_addr).transact(
476
+ transact
477
+ ),
478
+ )
479
+ await coro
472
480
  return cast("AsyncContract", self._resolver_contract(address=resolver_addr))
473
481
 
474
482
  async def _resolve(
@@ -550,11 +558,15 @@ class AsyncENS(BaseENS):
550
558
  transact = deepcopy(transact)
551
559
  transact["from"] = old_owner or owner
552
560
  for label in reversed(unowned):
553
- await self.ens.functions.setSubnodeOwner( # type: ignore
554
- raw_name_to_hash(owned),
555
- label_to_hash(label),
556
- owner,
557
- ).transact(transact)
561
+ coro = cast(
562
+ Coroutine[Any, Any, HexBytes],
563
+ self.ens.functions.setSubnodeOwner(
564
+ raw_name_to_hash(owned),
565
+ label_to_hash(label),
566
+ owner,
567
+ ).transact(transact),
568
+ )
569
+ await coro
558
570
  owned = f"{label}.{owned}"
559
571
 
560
572
  async def _setup_reverse(
@@ -11,13 +11,15 @@ from typing import (
11
11
  from eth_typing import (
12
12
  ChecksumAddress,
13
13
  )
14
+ from eth_utils.abi import (
15
+ get_abi_output_types,
16
+ )
14
17
  from hexbytes import (
15
18
  HexBytes,
16
19
  )
17
20
 
18
21
  from .utils import (
19
22
  address_to_reverse_domain,
20
- get_abi_output_types,
21
23
  is_valid_name,
22
24
  label_to_hash,
23
25
  normalize_name,
@@ -46,6 +46,7 @@ from .constants import (
46
46
  )
47
47
  from .exceptions import (
48
48
  AddressMismatch,
49
+ ENSValueError,
49
50
  ResolverNotFound,
50
51
  UnauthorizedError,
51
52
  UnownedName,
@@ -71,11 +72,13 @@ if TYPE_CHECKING:
71
72
  Contract,
72
73
  ContractFunction,
73
74
  )
75
+ from web3.middleware.base import ( # noqa: F401
76
+ Middleware,
77
+ )
74
78
  from web3.providers import ( # noqa: F401
75
79
  BaseProvider,
76
80
  )
77
81
  from web3.types import ( # noqa: F401
78
- Middleware,
79
82
  TxParams,
80
83
  )
81
84
 
@@ -86,7 +89,7 @@ class ENS(BaseENS):
86
89
  like getting the address for a name.
87
90
 
88
91
  Unless otherwise specified, all addresses are assumed to be a `str` in
89
- `checksum format <https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md>`_,
92
+ `checksum format <https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md>`_, # blocklint: pragma # noqa: E501
90
93
  like: ``"0x314159265dD8dbb310642f98f50C066173C1259b"``
91
94
  """
92
95
 
@@ -95,9 +98,9 @@ class ENS(BaseENS):
95
98
 
96
99
  def __init__(
97
100
  self,
98
- provider: "BaseProvider" = cast("BaseProvider", default),
101
+ provider: "BaseProvider" = None,
99
102
  addr: ChecksumAddress = None,
100
- middlewares: Optional[Sequence[Tuple["Middleware", str]]] = None,
103
+ middleware: Optional[Sequence[Tuple["Middleware", str]]] = None,
101
104
  ) -> None:
102
105
  """
103
106
  :param provider: a single provider used to connect to Ethereum
@@ -106,7 +109,8 @@ class ENS(BaseENS):
106
109
  If not provided, ENS.py will default to the mainnet ENS
107
110
  registry address.
108
111
  """
109
- self.w3 = init_web3(provider, middlewares)
112
+ provider = provider or cast("BaseProvider", default)
113
+ self.w3 = init_web3(provider, middleware)
110
114
 
111
115
  ens_addr = addr if addr else ENS_MAINNET_ADDR
112
116
  self.ens = self.w3.eth.contract(abi=abis.ENS, address=ens_addr)
@@ -127,8 +131,8 @@ class ENS(BaseENS):
127
131
  provided, defaults to the mainnet ENS registry address.
128
132
  """
129
133
  provider = w3.manager.provider
130
- middlewares = w3.middleware_onion.middlewares
131
- ns = cls(cast("BaseProvider", provider), addr=addr, middlewares=middlewares)
134
+ middleware = w3.middleware_onion.middleware
135
+ ns = cls(cast("BaseProvider", provider), addr=addr, middleware=middleware)
132
136
 
133
137
  # inherit strict bytes checking from w3 instance
134
138
  ns.strict_bytes_type_checking = w3.strict_bytes_type_checking
@@ -168,7 +172,7 @@ class ENS(BaseENS):
168
172
  def setup_address(
169
173
  self,
170
174
  name: str,
171
- address: Union[Address, ChecksumAddress, HexAddress] = cast(
175
+ address: Union[Address, ChecksumAddress, HexAddress] = cast( # noqa: B008
172
176
  ChecksumAddress, default
173
177
  ),
174
178
  coin_type: Optional[int] = None,
@@ -206,7 +210,7 @@ class ENS(BaseENS):
206
210
  elif is_binary_address(address):
207
211
  address = to_checksum_address(cast(str, address))
208
212
  elif not is_checksum_address(address):
209
- raise ValueError("You must supply the address in checksum format")
213
+ raise ENSValueError("You must supply the address in checksum format")
210
214
  if self.address(name) == address:
211
215
  return None
212
216
  if address is None:
@@ -282,7 +286,7 @@ class ENS(BaseENS):
282
286
  if is_binary_address(address):
283
287
  address = to_checksum_address(address)
284
288
  if not is_checksum_address(address):
285
- raise ValueError("You must supply the address in checksum format")
289
+ raise ENSValueError("You must supply the address in checksum format")
286
290
  self._assert_control(address, name)
287
291
  if not resolved:
288
292
  self.setup_address(name, address, transact=transact)
@@ -305,7 +309,7 @@ class ENS(BaseENS):
305
309
  def setup_owner(
306
310
  self,
307
311
  name: str,
308
- new_owner: ChecksumAddress = cast(ChecksumAddress, default),
312
+ new_owner: ChecksumAddress = None,
309
313
  transact: Optional["TxParams"] = None,
310
314
  ) -> Optional[ChecksumAddress]:
311
315
  """
@@ -332,6 +336,7 @@ class ENS(BaseENS):
332
336
  :raises UnauthorizedError: if ``'from'`` in `transact` does not own `name`
333
337
  :returns: the new owner's address
334
338
  """
339
+ new_owner = new_owner or cast(ChecksumAddress, default)
335
340
  if not transact:
336
341
  transact = {}
337
342
 
@@ -1,6 +1,3 @@
1
- from eth_utils import (
2
- ValidationError,
3
- )
4
1
  import idna
5
2
 
6
3
 
@@ -9,7 +6,19 @@ class ENSException(Exception):
9
6
  Base class for all ENS Errors
10
7
  """
11
8
 
12
- pass
9
+
10
+ class ENSValueError(ENSException, ValueError):
11
+ """
12
+ An ENS exception wrapper for `ValueError`, for better control over
13
+ exception handling.
14
+ """
15
+
16
+
17
+ class ENSTypeError(ENSException, TypeError):
18
+ """
19
+ An ENS exception wrapper for `TypeError`, for better control over
20
+ exception handling.
21
+ """
13
22
 
14
23
 
15
24
  class AddressMismatch(ENSException):
@@ -19,18 +28,14 @@ class AddressMismatch(ENSException):
19
28
  not currently point to the address.
20
29
  """
21
30
 
22
- pass
23
-
24
31
 
25
32
  class InvalidName(idna.IDNAError, ENSException):
26
33
  """
27
- This exception is raised if the provided name does not meet
28
- the normalization standards specified in `ENSIP-15
34
+ Raised if the provided name does not meet the normalization
35
+ standards specified in `ENSIP-15
29
36
  <https://docs.ens.domains/ens-improvement-proposals/ensip-15-normalization-standard>`_.
30
37
  """
31
38
 
32
- pass
33
-
34
39
 
35
40
  class UnauthorizedError(ENSException):
36
41
  """
@@ -39,8 +44,6 @@ class UnauthorizedError(ENSException):
39
44
  ``transact`` keyword argument to the owner of the name.
40
45
  """
41
46
 
42
- pass
43
-
44
47
 
45
48
  class UnownedName(ENSException):
46
49
  """
@@ -50,48 +53,36 @@ class UnownedName(ENSException):
50
53
  first with :meth:`~ens.ENS.setup_address`.
51
54
  """
52
55
 
53
- pass
54
-
55
56
 
56
57
  class ResolverNotFound(ENSException):
57
58
  """
58
59
  Raised if no resolver was found for the name you are trying to resolve.
59
60
  """
60
61
 
61
- pass
62
-
63
62
 
64
63
  class UnsupportedFunction(ENSException):
65
64
  """
66
65
  Raised if a resolver does not support a particular method.
67
66
  """
68
67
 
69
- pass
70
-
71
68
 
72
69
  class BidTooLow(ENSException):
73
70
  """
74
71
  Raised if you bid less than the minimum amount
75
72
  """
76
73
 
77
- pass
78
-
79
74
 
80
75
  class InvalidBidHash(ENSException):
81
76
  """
82
77
  Raised if you supply incorrect data to generate the bid hash.
83
78
  """
84
79
 
85
- pass
86
-
87
80
 
88
81
  class InvalidLabel(ENSException):
89
82
  """
90
83
  Raised if you supply an invalid label
91
84
  """
92
85
 
93
- pass
94
-
95
86
 
96
87
  class OversizeTransaction(ENSException):
97
88
  """
@@ -101,8 +92,6 @@ class OversizeTransaction(ENSException):
101
92
  For example: when you try to start too many auctions at once.
102
93
  """
103
94
 
104
- pass
105
-
106
95
 
107
96
  class UnderfundedBid(ENSException):
108
97
  """
@@ -110,10 +99,8 @@ class UnderfundedBid(ENSException):
110
99
  as your intent to bid.
111
100
  """
112
101
 
113
- pass
114
-
115
102
 
116
- class ENSValidationError(ENSException, ValidationError):
103
+ class ENSValidationError(ENSException):
117
104
  """
118
105
  Raised if there is a validation error
119
106
  """