web3 7.0.0b2__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.
- {web3-7.0.0b2 → web3-7.7.0}/LICENSE +1 -1
- web3-7.7.0/MANIFEST.in +13 -0
- web3-7.7.0/PKG-INFO +130 -0
- web3-7.7.0/README.md +37 -0
- {web3-7.0.0b2 → web3-7.7.0}/ens/__init__.py +13 -2
- {web3-7.0.0b2 → web3-7.7.0}/ens/_normalization.py +4 -4
- {web3-7.0.0b2 → web3-7.7.0}/ens/async_ens.py +27 -15
- {web3-7.0.0b2 → web3-7.7.0}/ens/base_ens.py +3 -1
- {web3-7.0.0b2 → web3-7.7.0}/ens/contract_data.py +2 -2
- {web3-7.0.0b2 → web3-7.7.0}/ens/ens.py +10 -7
- {web3-7.0.0b2 → web3-7.7.0}/ens/exceptions.py +16 -29
- web3-7.7.0/ens/specs/nf.json +1 -0
- web3-7.7.0/ens/specs/normalization_spec.json +1 -0
- {web3-7.0.0b2 → web3-7.7.0}/ens/utils.py +24 -32
- web3-7.7.0/pyproject.toml +126 -0
- {web3-7.0.0b2 → web3-7.7.0}/setup.py +47 -40
- web3-7.7.0/tests/.DS_Store +0 -0
- web3-7.7.0/tests/beacon/test_async_beacon.py +287 -0
- web3-7.7.0/tests/beacon/test_beacon.py +241 -0
- web3-7.7.0/tests/conftest.py +124 -0
- web3-7.7.0/tests/core/admin-module/test_admin_addPeer.py +7 -0
- web3-7.7.0/tests/core/admin-module/test_admin_nodeInfo.py +7 -0
- web3-7.7.0/tests/core/admin-module/test_admin_peers.py +4 -0
- web3-7.7.0/tests/core/block-utils/test_select_method_for_block_identifier.py +48 -0
- web3-7.7.0/tests/core/caching-utils/test_generate_cache_key.py +51 -0
- web3-7.7.0/tests/core/caching-utils/test_request_caching.py +943 -0
- web3-7.7.0/tests/core/conftest.py +133 -0
- web3-7.7.0/tests/core/contracts/conftest.py +918 -0
- web3-7.7.0/tests/core/contracts/test_contract_ambiguous_events.py +401 -0
- web3-7.7.0/tests/core/contracts/test_contract_ambiguous_functions.py +415 -0
- web3-7.7.0/tests/core/contracts/test_contract_attributes.py +48 -0
- web3-7.7.0/tests/core/contracts/test_contract_build_transaction.py +558 -0
- web3-7.7.0/tests/core/contracts/test_contract_call_interface.py +2492 -0
- web3-7.7.0/tests/core/contracts/test_contract_caller_interface.py +496 -0
- web3-7.7.0/tests/core/contracts/test_contract_class_construction.py +238 -0
- web3-7.7.0/tests/core/contracts/test_contract_constructor.py +604 -0
- web3-7.7.0/tests/core/contracts/test_contract_constructor_encoding.py +130 -0
- web3-7.7.0/tests/core/contracts/test_contract_deployment.py +238 -0
- web3-7.7.0/tests/core/contracts/test_contract_estimate_gas.py +247 -0
- web3-7.7.0/tests/core/contracts/test_contract_events.py +253 -0
- web3-7.7.0/tests/core/contracts/test_contract_events_build_filter.py +71 -0
- web3-7.7.0/tests/core/contracts/test_contract_example.py +212 -0
- web3-7.7.0/tests/core/contracts/test_contract_init.py +101 -0
- web3-7.7.0/tests/core/contracts/test_contract_method_abi_decoding.py +149 -0
- web3-7.7.0/tests/core/contracts/test_contract_method_abi_encoding.py +199 -0
- web3-7.7.0/tests/core/contracts/test_contract_method_to_argument_matching.py +259 -0
- web3-7.7.0/tests/core/contracts/test_contract_panic_errors.py +48 -0
- web3-7.7.0/tests/core/contracts/test_contract_transact_interface.py +642 -0
- web3-7.7.0/tests/core/contracts/test_contract_util_functions.py +128 -0
- web3-7.7.0/tests/core/contracts/test_extracting_event_data.py +1334 -0
- web3-7.7.0/tests/core/contracts/test_extracting_event_data_old.py +133 -0
- web3-7.7.0/tests/core/contracts/test_offchain_lookup.py +210 -0
- web3-7.7.0/tests/core/contracts/utils.py +27 -0
- web3-7.7.0/tests/core/datastructures/test_datastructures.py +209 -0
- web3-7.7.0/tests/core/empty-object/test_empty_object_is_falsy.py +8 -0
- web3-7.7.0/tests/core/eth-module/conftest.py +6 -0
- web3-7.7.0/tests/core/eth-module/test_accounts.py +580 -0
- web3-7.7.0/tests/core/eth-module/test_block_api.py +173 -0
- web3-7.7.0/tests/core/eth-module/test_default_account_api.py +46 -0
- web3-7.7.0/tests/core/eth-module/test_eth_contract.py +47 -0
- web3-7.7.0/tests/core/eth-module/test_eth_fee_history.py +22 -0
- web3-7.7.0/tests/core/eth-module/test_eth_filter.py +47 -0
- web3-7.7.0/tests/core/eth-module/test_eth_properties.py +26 -0
- web3-7.7.0/tests/core/eth-module/test_gas_pricing.py +27 -0
- web3-7.7.0/tests/core/eth-module/test_poa.py +46 -0
- web3-7.7.0/tests/core/eth-module/test_transactions.py +422 -0
- web3-7.7.0/tests/core/eth-tester-api/test_withdrawals.py +55 -0
- web3-7.7.0/tests/core/exceptions/test_exceptions.py +32 -0
- web3-7.7.0/tests/core/filtering/conftest.py +108 -0
- web3-7.7.0/tests/core/filtering/test_basic_filter_tests.py +78 -0
- web3-7.7.0/tests/core/filtering/test_contract_create_filter_topic_merging.py +16 -0
- web3-7.7.0/tests/core/filtering/test_contract_data_filters.py +475 -0
- web3-7.7.0/tests/core/filtering/test_contract_get_logs.py +398 -0
- web3-7.7.0/tests/core/filtering/test_contract_on_event_filtering.py +476 -0
- web3-7.7.0/tests/core/filtering/test_contract_past_event_filtering.py +190 -0
- web3-7.7.0/tests/core/filtering/test_contract_topic_filters.py +440 -0
- web3-7.7.0/tests/core/filtering/test_existing_filter_instance.py +84 -0
- web3-7.7.0/tests/core/filtering/test_filter_against_latest_blocks.py +52 -0
- web3-7.7.0/tests/core/filtering/test_filter_against_pending_transactions.py +59 -0
- web3-7.7.0/tests/core/filtering/test_filter_against_transaction_logs.py +40 -0
- web3-7.7.0/tests/core/filtering/test_filters_against_many_blocks.py +265 -0
- web3-7.7.0/tests/core/filtering/test_utils_functions.py +225 -0
- web3-7.7.0/tests/core/filtering/utils.py +77 -0
- web3-7.7.0/tests/core/gas-strategies/test_rpc_gas_pricing_strategies.py +11 -0
- web3-7.7.0/tests/core/gas-strategies/test_time_based_gas_price_strategy.py +279 -0
- web3-7.7.0/tests/core/manager/conftest.py +38 -0
- web3-7.7.0/tests/core/manager/test_default_middlewares.py +24 -0
- web3-7.7.0/tests/core/manager/test_middleware_can_be_stateful.py +36 -0
- web3-7.7.0/tests/core/manager/test_middleware_onion_api.py +187 -0
- web3-7.7.0/tests/core/manager/test_provider_property.py +20 -0
- web3-7.7.0/tests/core/manager/test_provider_request_wrapping.py +33 -0
- web3-7.7.0/tests/core/manager/test_response_formatters.py +372 -0
- web3-7.7.0/tests/core/method-class/test_method.py +387 -0
- web3-7.7.0/tests/core/method-class/test_result_formatters.py +51 -0
- web3-7.7.0/tests/core/middleware/test_attrdict_middleware.py +122 -0
- web3-7.7.0/tests/core/middleware/test_eth_tester_middleware.py +131 -0
- web3-7.7.0/tests/core/middleware/test_filter_middleware.py +381 -0
- web3-7.7.0/tests/core/middleware/test_formatting_middleware.py +103 -0
- web3-7.7.0/tests/core/middleware/test_gas_price_strategy.py +69 -0
- web3-7.7.0/tests/core/middleware/test_middleware.py +81 -0
- web3-7.7.0/tests/core/middleware/test_name_to_address_middleware.py +180 -0
- web3-7.7.0/tests/core/middleware/test_stalecheck.py +234 -0
- web3-7.7.0/tests/core/middleware/test_transaction_signing.py +707 -0
- web3-7.7.0/tests/core/module-class/test_module.py +98 -0
- web3-7.7.0/tests/core/providers/test_async_http_provider.py +109 -0
- web3-7.7.0/tests/core/providers/test_async_ipc_provider.py +368 -0
- web3-7.7.0/tests/core/providers/test_async_tester_provider.py +70 -0
- web3-7.7.0/tests/core/providers/test_auto_provider.py +73 -0
- web3-7.7.0/tests/core/providers/test_base_provider.py +57 -0
- web3-7.7.0/tests/core/providers/test_http_provider.py +112 -0
- web3-7.7.0/tests/core/providers/test_http_request_retry.py +208 -0
- web3-7.7.0/tests/core/providers/test_ipc_provider.py +199 -0
- web3-7.7.0/tests/core/providers/test_legacy_websocket_provider.py +79 -0
- web3-7.7.0/tests/core/providers/test_provider_init.py +59 -0
- web3-7.7.0/tests/core/providers/test_tester_provider.py +120 -0
- web3-7.7.0/tests/core/providers/test_websocket_provider.py +434 -0
- web3-7.7.0/tests/core/subscriptions/test_subscription_manager.py +112 -0
- web3-7.7.0/tests/core/subscriptions/test_subscriptions.py +83 -0
- web3-7.7.0/tests/core/test_library_files.py +28 -0
- web3-7.7.0/tests/core/testing-module/test_testing_mine.py +22 -0
- web3-7.7.0/tests/core/testing-module/test_testing_snapshot_and_revert.py +47 -0
- web3-7.7.0/tests/core/testing-module/test_testing_timeTravel.py +9 -0
- web3-7.7.0/tests/core/utilities/conftest.py +14 -0
- web3-7.7.0/tests/core/utilities/test_abi.py +889 -0
- web3-7.7.0/tests/core/utilities/test_abi_filtering_by_argument_name.py +61 -0
- web3-7.7.0/tests/core/utilities/test_abi_is_encodable.py +102 -0
- web3-7.7.0/tests/core/utilities/test_abi_named_tree.py +111 -0
- web3-7.7.0/tests/core/utilities/test_address.py +87 -0
- web3-7.7.0/tests/core/utilities/test_async_transaction.py +159 -0
- web3-7.7.0/tests/core/utilities/test_attach_modules.py +209 -0
- web3-7.7.0/tests/core/utilities/test_attributedict.py +109 -0
- web3-7.7.0/tests/core/utilities/test_caching_utils.py +35 -0
- web3-7.7.0/tests/core/utilities/test_construct_event_data_set.py +150 -0
- web3-7.7.0/tests/core/utilities/test_construct_event_filter_params.py +103 -0
- web3-7.7.0/tests/core/utilities/test_construct_event_topics.py +164 -0
- web3-7.7.0/tests/core/utilities/test_datatypes.py +38 -0
- web3-7.7.0/tests/core/utilities/test_decorators.py +23 -0
- web3-7.7.0/tests/core/utilities/test_encoding.py +295 -0
- web3-7.7.0/tests/core/utilities/test_event_filter_builder.py +80 -0
- web3-7.7.0/tests/core/utilities/test_event_interface.py +35 -0
- web3-7.7.0/tests/core/utilities/test_fee_utils.py +48 -0
- web3-7.7.0/tests/core/utilities/test_formatters.py +56 -0
- web3-7.7.0/tests/core/utilities/test_http_session_manager.py +544 -0
- web3-7.7.0/tests/core/utilities/test_is_predefined_block_number.py +22 -0
- web3-7.7.0/tests/core/utilities/test_is_probably_enum.py +23 -0
- web3-7.7.0/tests/core/utilities/test_is_recognized_type.py +182 -0
- web3-7.7.0/tests/core/utilities/test_math.py +57 -0
- web3-7.7.0/tests/core/utilities/test_method_formatters.py +238 -0
- web3-7.7.0/tests/core/utilities/test_prepare_transaction_replacement.py +132 -0
- web3-7.7.0/tests/core/utilities/test_select_filter_method.py +44 -0
- web3-7.7.0/tests/core/utilities/test_threads.py +110 -0
- web3-7.7.0/tests/core/utilities/test_valid_transaction_params.py +225 -0
- web3-7.7.0/tests/core/utilities/test_validation.py +148 -0
- web3-7.7.0/tests/core/web3-module/test_api.py +2 -0
- web3-7.7.0/tests/core/web3-module/test_attach_modules.py +107 -0
- web3-7.7.0/tests/core/web3-module/test_client_version.py +2 -0
- web3-7.7.0/tests/core/web3-module/test_conversions.py +255 -0
- web3-7.7.0/tests/core/web3-module/test_import_and_version.py +5 -0
- web3-7.7.0/tests/core/web3-module/test_keccak.py +121 -0
- web3-7.7.0/tests/core/web3-module/test_providers.py +32 -0
- web3-7.7.0/tests/core/web3-module/test_strict_bytes_type_checking.py +106 -0
- web3-7.7.0/tests/core/web3-module/test_web3_inheritance.py +12 -0
- web3-7.7.0/tests/ens/conftest.py +663 -0
- web3-7.7.0/tests/ens/normalization/normalization_tests.json +1 -0
- web3-7.7.0/tests/ens/normalization/test_normalize_name_ensip15.py +47 -0
- web3-7.7.0/tests/ens/test_ens.py +270 -0
- web3-7.7.0/tests/ens/test_get_registry.py +56 -0
- web3-7.7.0/tests/ens/test_get_text.py +166 -0
- web3-7.7.0/tests/ens/test_nameprep.py +37 -0
- web3-7.7.0/tests/ens/test_offchain_resolution.py +234 -0
- web3-7.7.0/tests/ens/test_setup_address.py +288 -0
- web3-7.7.0/tests/ens/test_setup_name.py +250 -0
- web3-7.7.0/tests/ens/test_utils.py +233 -0
- web3-7.7.0/tests/ens/test_wildcard_resolution.py +48 -0
- web3-7.7.0/tests/integration/.DS_Store +0 -0
- web3-7.7.0/tests/integration/README.md +68 -0
- web3-7.7.0/tests/integration/common.py +23 -0
- web3-7.7.0/tests/integration/conftest.py +77 -0
- web3-7.7.0/tests/integration/generate_fixtures/common.py +239 -0
- web3-7.7.0/tests/integration/generate_fixtures/go_ethereum.py +450 -0
- web3-7.7.0/tests/integration/geth-1.14.12-fixture.zip +0 -0
- web3-7.7.0/tests/integration/go_ethereum/common.py +125 -0
- web3-7.7.0/tests/integration/go_ethereum/conftest.py +363 -0
- web3-7.7.0/tests/integration/go_ethereum/test_goethereum_http.py +209 -0
- web3-7.7.0/tests/integration/go_ethereum/test_goethereum_ipc.py +125 -0
- web3-7.7.0/tests/integration/go_ethereum/test_goethereum_legacy_ws.py +114 -0
- web3-7.7.0/tests/integration/go_ethereum/test_goethereum_ws/conftest.py +48 -0
- web3-7.7.0/tests/integration/go_ethereum/test_goethereum_ws/test_async_await_w3.py +77 -0
- web3-7.7.0/tests/integration/go_ethereum/test_goethereum_ws/test_async_ctx_manager_w3.py +78 -0
- web3-7.7.0/tests/integration/go_ethereum/test_goethereum_ws/test_async_iterator_w3.py +78 -0
- web3-7.7.0/tests/integration/go_ethereum/utils.py +78 -0
- web3-7.7.0/tests/integration/test_ethereum_tester.py +678 -0
- web3-7.7.0/tests/utils.py +87 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/__init__.py +23 -12
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/abi.py +157 -263
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/async_transactions.py +34 -20
- web3-7.7.0/web3/_utils/batching.py +217 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/blocks.py +6 -2
- web3-7.7.0/web3/_utils/caching/__init__.py +12 -0
- web3-7.7.0/web3/_utils/caching/caching_utils.py +433 -0
- web3-7.7.0/web3/_utils/caching/request_caching_validation.py +287 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/compat/__init__.py +2 -3
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/contract_sources/compile_contracts.py +1 -1
- web3-7.7.0/web3/_utils/contract_sources/contract_data/ambiguous_function_contract.py +42 -0
- web3-7.7.0/web3/_utils/contract_sources/contract_data/arrays_contract.py +97 -0
- web3-7.7.0/web3/_utils/contract_sources/contract_data/bytes_contracts.py +79 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/contract_sources/contract_data/constructor_contracts.py +7 -7
- web3-7.7.0/web3/_utils/contract_sources/contract_data/contract_caller_tester.py +59 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/contract_sources/contract_data/emitter_contract.py +3 -3
- web3-7.7.0/web3/_utils/contract_sources/contract_data/event_contracts.py +138 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/contract_sources/contract_data/extended_resolver.py +3 -3
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/contract_sources/contract_data/fallback_function_contract.py +3 -3
- web3-7.7.0/web3/_utils/contract_sources/contract_data/function_name_tester_contract.py +29 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/contract_sources/contract_data/math_contract.py +3 -3
- web3-7.7.0/web3/_utils/contract_sources/contract_data/offchain_lookup.py +52 -0
- web3-7.7.0/web3/_utils/contract_sources/contract_data/offchain_resolver.py +100 -0
- web3-7.7.0/web3/_utils/contract_sources/contract_data/panic_errors_contract.py +99 -0
- web3-7.7.0/web3/_utils/contract_sources/contract_data/payable_tester.py +29 -0
- web3-7.7.0/web3/_utils/contract_sources/contract_data/receive_function_contracts.py +58 -0
- web3-7.7.0/web3/_utils/contract_sources/contract_data/reflector_contracts.py +29 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/contract_sources/contract_data/revert_contract.py +3 -3
- web3-7.7.0/web3/_utils/contract_sources/contract_data/simple_resolver.py +29 -0
- web3-7.7.0/web3/_utils/contract_sources/contract_data/storage_contract.py +50 -0
- web3-7.7.0/web3/_utils/contract_sources/contract_data/string_contract.py +42 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/contract_sources/contract_data/tuple_contracts.py +5 -5
- web3-7.7.0/web3/_utils/contracts.py +422 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/datatypes.py +5 -1
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/decorators.py +6 -1
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/empty.py +1 -1
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/encoding.py +16 -12
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/error_formatters_utils.py +5 -3
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/events.py +78 -72
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/fee_utils.py +1 -3
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/filters.py +24 -22
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/formatters.py +2 -2
- web3-7.7.0/web3/_utils/http.py +12 -0
- web3-7.7.0/web3/_utils/http_session_manager.py +314 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/math.py +14 -15
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/method_formatters.py +161 -34
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/module.py +2 -1
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/module_testing/__init__.py +3 -2
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/module_testing/eth_module.py +736 -583
- web3-7.7.0/web3/_utils/module_testing/go_ethereum_debug_module.py +128 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/module_testing/module_testing_utils.py +81 -24
- web3-7.7.0/web3/_utils/module_testing/persistent_connection_provider.py +878 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/module_testing/utils.py +114 -33
- web3-7.7.0/web3/_utils/module_testing/web3_module.py +736 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/normalizers.py +13 -11
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/rpc_abi.py +10 -22
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/threads.py +8 -7
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/transactions.py +32 -25
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/type_conversion.py +5 -1
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/validation.py +20 -17
- {web3-7.0.0b2 → web3-7.7.0}/web3/beacon/__init__.py +5 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/beacon/api_endpoints.py +3 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/beacon/async_beacon.py +29 -6
- {web3-7.0.0b2 → web3-7.7.0}/web3/beacon/beacon.py +24 -6
- {web3-7.0.0b2 → web3-7.7.0}/web3/contract/__init__.py +7 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/contract/async_contract.py +285 -82
- {web3-7.0.0b2 → web3-7.7.0}/web3/contract/base_contract.py +556 -258
- {web3-7.0.0b2 → web3-7.7.0}/web3/contract/contract.py +295 -84
- {web3-7.0.0b2 → web3-7.7.0}/web3/contract/utils.py +251 -55
- {web3-7.0.0b2 → web3-7.7.0}/web3/datastructures.py +49 -34
- {web3-7.0.0b2 → web3-7.7.0}/web3/eth/__init__.py +7 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/eth/async_eth.py +89 -69
- {web3-7.0.0b2 → web3-7.7.0}/web3/eth/base_eth.py +7 -3
- {web3-7.0.0b2 → web3-7.7.0}/web3/eth/eth.py +43 -66
- {web3-7.0.0b2 → web3-7.7.0}/web3/exceptions.py +158 -83
- web3-7.7.0/web3/gas_strategies/__init__.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/gas_strategies/time_based.py +8 -6
- {web3-7.0.0b2 → web3-7.7.0}/web3/geth.py +53 -184
- {web3-7.0.0b2 → web3-7.7.0}/web3/main.py +77 -17
- web3-7.7.0/web3/manager.py +695 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/method.py +43 -15
- {web3-7.0.0b2 → web3-7.7.0}/web3/middleware/__init__.py +17 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/middleware/attrdict.py +12 -22
- {web3-7.0.0b2 → web3-7.7.0}/web3/middleware/base.py +55 -2
- {web3-7.0.0b2 → web3-7.7.0}/web3/middleware/filter.py +45 -23
- {web3-7.0.0b2 → web3-7.7.0}/web3/middleware/formatting.py +6 -3
- {web3-7.0.0b2 → web3-7.7.0}/web3/middleware/names.py +4 -1
- {web3-7.0.0b2 → web3-7.7.0}/web3/middleware/signing.py +15 -6
- {web3-7.0.0b2 → web3-7.7.0}/web3/middleware/stalecheck.py +2 -1
- {web3-7.0.0b2 → web3-7.7.0}/web3/module.py +61 -25
- {web3-7.0.0b2 → web3-7.7.0}/web3/providers/__init__.py +21 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/providers/async_base.py +87 -32
- {web3-7.0.0b2 → web3-7.7.0}/web3/providers/base.py +77 -32
- {web3-7.0.0b2 → web3-7.7.0}/web3/providers/eth_tester/__init__.py +5 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/providers/eth_tester/defaults.py +2 -55
- {web3-7.0.0b2 → web3-7.7.0}/web3/providers/eth_tester/main.py +41 -15
- {web3-7.0.0b2 → web3-7.7.0}/web3/providers/eth_tester/middleware.py +16 -17
- {web3-7.0.0b2 → web3-7.7.0}/web3/providers/ipc.py +41 -17
- {web3-7.0.0b2 → web3-7.7.0}/web3/providers/legacy_websocket.py +26 -1
- {web3-7.0.0b2 → web3-7.7.0}/web3/providers/persistent/__init__.py +7 -0
- web3-7.7.0/web3/providers/persistent/async_ipc.py +155 -0
- web3-7.7.0/web3/providers/persistent/persistent.py +405 -0
- web3-7.7.0/web3/providers/persistent/persistent_connection.py +91 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/providers/persistent/request_processor.py +136 -56
- web3-7.7.0/web3/providers/persistent/subscription_container.py +56 -0
- web3-7.7.0/web3/providers/persistent/subscription_manager.py +233 -0
- web3-7.7.0/web3/providers/persistent/websocket.py +146 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/providers/rpc/__init__.py +5 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/providers/rpc/async_rpc.py +73 -18
- {web3-7.0.0b2 → web3-7.7.0}/web3/providers/rpc/rpc.py +73 -30
- {web3-7.0.0b2 → web3-7.7.0}/web3/providers/rpc/utils.py +1 -13
- web3-7.7.0/web3/py.typed +0 -0
- web3-7.7.0/web3/scripts/__init__.py +0 -0
- web3-7.7.0/web3/scripts/install_pre_releases.py +33 -0
- web3-7.7.0/web3/scripts/parse_pygeth_version.py +16 -0
- web3-7.7.0/web3/scripts/release/__init__.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/testing.py +4 -4
- {web3-7.0.0b2 → web3-7.7.0}/web3/tracing.py +9 -5
- {web3-7.0.0b2 → web3-7.7.0}/web3/types.py +141 -74
- web3-7.7.0/web3/utils/__init__.py +78 -0
- web3-7.7.0/web3/utils/abi.py +801 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/utils/address.py +8 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/utils/async_exception_handling.py +20 -11
- {web3-7.0.0b2 → web3-7.7.0}/web3/utils/caching.py +34 -4
- {web3-7.0.0b2 → web3-7.7.0}/web3/utils/exception_handling.py +9 -12
- web3-7.7.0/web3/utils/subscriptions.py +285 -0
- web3-7.7.0/web3.egg-info/PKG-INFO +130 -0
- web3-7.7.0/web3.egg-info/SOURCES.txt +358 -0
- web3-7.7.0/web3.egg-info/requires.txt +63 -0
- web3-7.0.0b2/MANIFEST.in +0 -7
- web3-7.0.0b2/PKG-INFO +0 -106
- web3-7.0.0b2/README.md +0 -31
- web3-7.0.0b2/ens/specs/nf.json +0 -1
- web3-7.0.0b2/ens/specs/normalization_spec.json +0 -1
- web3-7.0.0b2/pyproject.toml +0 -53
- web3-7.0.0b2/web3/_utils/caching.py +0 -155
- web3-7.0.0b2/web3/_utils/contract_sources/contract_data/address_reflector.py +0 -29
- web3-7.0.0b2/web3/_utils/contract_sources/contract_data/arrays_contract.py +0 -97
- web3-7.0.0b2/web3/_utils/contract_sources/contract_data/bytes_contracts.py +0 -79
- web3-7.0.0b2/web3/_utils/contract_sources/contract_data/contract_caller_tester.py +0 -59
- web3-7.0.0b2/web3/_utils/contract_sources/contract_data/event_contracts.py +0 -93
- web3-7.0.0b2/web3/_utils/contract_sources/contract_data/function_name_tester_contract.py +0 -29
- web3-7.0.0b2/web3/_utils/contract_sources/contract_data/offchain_lookup.py +0 -52
- web3-7.0.0b2/web3/_utils/contract_sources/contract_data/offchain_resolver.py +0 -100
- web3-7.0.0b2/web3/_utils/contract_sources/contract_data/panic_errors_contract.py +0 -99
- web3-7.0.0b2/web3/_utils/contract_sources/contract_data/payable_tester.py +0 -29
- web3-7.0.0b2/web3/_utils/contract_sources/contract_data/receive_function_contracts.py +0 -58
- web3-7.0.0b2/web3/_utils/contract_sources/contract_data/reflector_contracts.py +0 -29
- web3-7.0.0b2/web3/_utils/contract_sources/contract_data/simple_resolver.py +0 -29
- web3-7.0.0b2/web3/_utils/contract_sources/contract_data/storage_contract.py +0 -50
- web3-7.0.0b2/web3/_utils/contract_sources/contract_data/string_contract.py +0 -42
- web3-7.0.0b2/web3/_utils/contracts.py +0 -470
- web3-7.0.0b2/web3/_utils/http.py +0 -6
- web3-7.0.0b2/web3/_utils/module_testing/go_ethereum_personal_module.py +0 -300
- web3-7.0.0b2/web3/_utils/module_testing/persistent_connection_provider.py +0 -396
- web3-7.0.0b2/web3/_utils/module_testing/web3_module.py +0 -315
- web3-7.0.0b2/web3/_utils/request.py +0 -265
- web3-7.0.0b2/web3/manager.py +0 -428
- web3-7.0.0b2/web3/providers/persistent/async_ipc.py +0 -215
- web3-7.0.0b2/web3/providers/persistent/persistent.py +0 -98
- web3-7.0.0b2/web3/providers/persistent/persistent_connection.py +0 -42
- web3-7.0.0b2/web3/providers/persistent/websocket.py +0 -209
- web3-7.0.0b2/web3/utils/__init__.py +0 -19
- web3-7.0.0b2/web3/utils/abi.py +0 -21
- web3-7.0.0b2/web3.egg-info/PKG-INFO +0 -106
- web3-7.0.0b2/web3.egg-info/SOURCES.txt +0 -169
- web3-7.0.0b2/web3.egg-info/requires.txt +0 -61
- {web3-7.0.0b2 → web3-7.7.0}/ens/abis.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/ens/auto.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/ens/constants.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/setup.cfg +0 -0
- {web3-7.0.0b2/web3/_utils → web3-7.7.0/tests}/__init__.py +0 -0
- {web3-7.0.0b2/web3/_utils/contract_sources → web3-7.7.0/tests/core/utilities}/__init__.py +0 -0
- {web3-7.0.0b2/web3/_utils/contract_sources/contract_data → web3-7.7.0/tests/integration/go_ethereum}/__init__.py +0 -0
- {web3-7.0.0b2/web3/gas_strategies → web3-7.7.0/tests/integration/go_ethereum/test_goethereum_ws}/__init__.py +0 -0
- {web3-7.0.0b2/web3/scripts → web3-7.7.0/web3/_utils}/__init__.py +0 -0
- /web3-7.0.0b2/web3/_utils/function_identifiers.py → /web3-7.7.0/web3/_utils/abi_element_identifiers.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/async_caching.py +0 -0
- {web3-7.0.0b2/web3/scripts/release → web3-7.7.0/web3/_utils/contract_sources}/__init__.py +0 -0
- /web3-7.0.0b2/web3/py.typed → /web3-7.7.0/web3/_utils/contract_sources/contract_data/__init__.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/contract_sources/contract_data/_custom_contract_data.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/ens.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/hypothesis.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/module_testing/go_ethereum_admin_module.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/module_testing/go_ethereum_txpool_module.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/module_testing/net_module.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/utility_methods.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/_utils/windows.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/auto/__init__.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/auto/gethdev.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/constants.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/gas_strategies/rpc.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/logs.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/middleware/buffered_gas_estimate.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/middleware/gas_price_strategy.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/middleware/proof_of_authority.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/middleware/pythonic.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/middleware/validation.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/net.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/providers/auto.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/providers/persistent/utils.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3/scripts/release/test_package.py +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3.egg-info/dependency_links.txt +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3.egg-info/not-zip-safe +0 -0
- {web3-7.0.0b2 → web3-7.7.0}/web3.egg-info/top_level.txt +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
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
|
+
[](https://discord.gg/GHryRvPB84)
|
|
97
|
+
[](https://circleci.com/gh/ethereum/web3.py)
|
|
98
|
+
[](https://badge.fury.io/py/web3)
|
|
99
|
+
[](https://pypi.python.org/pypi/web3)
|
|
100
|
+
[](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
|
+
[](https://discord.gg/GHryRvPB84)
|
|
4
|
+
[](https://circleci.com/gh/ethereum/web3.py)
|
|
5
|
+
[](https://badge.fury.io/py/web3)
|
|
6
|
+
[](https://pypi.python.org/pypi/web3)
|
|
7
|
+
[](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
|
|
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
|
-
|
|
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,7 +100,7 @@ class AsyncENS(BaseENS):
|
|
|
98
100
|
|
|
99
101
|
def __init__(
|
|
100
102
|
self,
|
|
101
|
-
provider: "AsyncBaseProvider" =
|
|
103
|
+
provider: "AsyncBaseProvider" = None,
|
|
102
104
|
addr: ChecksumAddress = None,
|
|
103
105
|
middleware: Optional[Sequence[Tuple["Middleware", str]]] = None,
|
|
104
106
|
) -> None:
|
|
@@ -108,6 +110,7 @@ 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
|
"""
|
|
113
|
+
provider = provider or cast("AsyncBaseProvider", default)
|
|
111
114
|
self.w3 = init_async_web3(provider, middleware)
|
|
112
115
|
|
|
113
116
|
ens_addr = addr if addr else ENS_MAINNET_ADDR
|
|
@@ -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
|
|
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
|
|
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 =
|
|
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
|
-
|
|
470
|
-
|
|
471
|
-
|
|
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(
|
|
@@ -490,7 +498,7 @@ class AsyncENS(BaseENS):
|
|
|
490
498
|
):
|
|
491
499
|
contract_func_with_args = (fn_name, [node])
|
|
492
500
|
|
|
493
|
-
calldata = resolver.
|
|
501
|
+
calldata = resolver.encode_abi(*contract_func_with_args)
|
|
494
502
|
contract_call_result = await resolver.caller.resolve(
|
|
495
503
|
ens_encode_name(normal_name),
|
|
496
504
|
calldata,
|
|
@@ -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
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
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,
|
|
@@ -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,7 +98,7 @@ class ENS(BaseENS):
|
|
|
97
98
|
|
|
98
99
|
def __init__(
|
|
99
100
|
self,
|
|
100
|
-
provider: "BaseProvider" =
|
|
101
|
+
provider: "BaseProvider" = None,
|
|
101
102
|
addr: ChecksumAddress = None,
|
|
102
103
|
middleware: Optional[Sequence[Tuple["Middleware", str]]] = None,
|
|
103
104
|
) -> None:
|
|
@@ -108,6 +109,7 @@ class ENS(BaseENS):
|
|
|
108
109
|
If not provided, ENS.py will default to the mainnet ENS
|
|
109
110
|
registry address.
|
|
110
111
|
"""
|
|
112
|
+
provider = provider or cast("BaseProvider", default)
|
|
111
113
|
self.w3 = init_web3(provider, middleware)
|
|
112
114
|
|
|
113
115
|
ens_addr = addr if addr else ENS_MAINNET_ADDR
|
|
@@ -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
|
|
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
|
|
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 =
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
28
|
-
|
|
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
|
|
103
|
+
class ENSValidationError(ENSException):
|
|
117
104
|
"""
|
|
118
105
|
Raised if there is a validation error
|
|
119
106
|
"""
|