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