web3 7.11.1__tar.gz → 7.12.1__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.11.1/web3.egg-info → web3-7.12.1}/PKG-INFO +15 -2
- {web3-7.11.1 → web3-7.12.1}/ens/async_ens.py +2 -2
- {web3-7.11.1 → web3-7.12.1}/ens/ens.py +2 -2
- web3-7.12.1/ens/specs/.DS_Store +0 -0
- {web3-7.11.1 → web3-7.12.1}/ens/utils.py +14 -3
- {web3-7.11.1 → web3-7.12.1}/pyproject.toml +1 -1
- {web3-7.11.1 → web3-7.12.1}/setup.py +1 -1
- web3-7.12.1/tests/.DS_Store +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/caching-utils/test_request_caching.py +11 -11
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_contract_init.py +2 -2
- {web3-7.11.1 → web3-7.12.1}/tests/core/eth-module/test_accounts.py +4 -3
- {web3-7.11.1 → web3-7.12.1}/tests/core/middleware/test_eth_tester_middleware.py +1 -1
- {web3-7.11.1 → web3-7.12.1}/tests/core/providers/test_async_http_provider.py +0 -19
- {web3-7.11.1 → web3-7.12.1}/tests/core/providers/test_async_ipc_provider.py +12 -10
- {web3-7.11.1 → web3-7.12.1}/tests/core/providers/test_http_provider.py +1 -18
- {web3-7.11.1 → web3-7.12.1}/tests/core/providers/test_ipc_provider.py +0 -15
- {web3-7.11.1 → web3-7.12.1}/tests/core/providers/test_websocket_provider.py +12 -29
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_http_session_manager.py +10 -12
- web3-7.12.1/tests/ens/.DS_Store +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/ens/test_offchain_resolution.py +3 -3
- {web3-7.11.1 → web3-7.12.1}/tests/ens/test_utils.py +31 -17
- web3-7.12.1/tests/integration/.DS_Store +0 -0
- web3-7.12.1/tests/integration/geth-1.16.0-fixture.zip +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/integration/go_ethereum/conftest.py +3 -3
- {web3-7.11.1 → web3-7.12.1}/tests/integration/go_ethereum/test_goethereum_http.py +12 -2
- {web3-7.11.1 → web3-7.12.1}/tests/integration/go_ethereum/test_goethereum_ipc.py +12 -2
- {web3-7.11.1 → web3-7.12.1}/tests/integration/go_ethereum/test_goethereum_legacy_ws.py +7 -3
- {web3-7.11.1 → web3-7.12.1}/tests/integration/go_ethereum/test_goethereum_ws/conftest.py +2 -2
- {web3-7.11.1 → web3-7.12.1}/tests/integration/test_ethereum_tester.py +6 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/abi.py +24 -20
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/batching.py +22 -68
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/caching/request_caching_validation.py +8 -4
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/decorators.py +12 -9
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/http_session_manager.py +18 -15
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/method_formatters.py +17 -24
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/module_testing/eth_module.py +39 -54
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/module_testing/web3_module.py +78 -4
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/validation.py +1 -1
- {web3-7.11.1 → web3-7.12.1}/web3/contract/utils.py +20 -35
- {web3-7.11.1 → web3-7.12.1}/web3/manager.py +108 -26
- {web3-7.11.1 → web3-7.12.1}/web3/method.py +7 -7
- {web3-7.11.1 → web3-7.12.1}/web3/providers/async_base.py +15 -1
- {web3-7.11.1 → web3-7.12.1}/web3/providers/auto.py +28 -6
- {web3-7.11.1 → web3-7.12.1}/web3/providers/base.py +18 -5
- {web3-7.11.1 → web3-7.12.1}/web3/providers/ipc.py +4 -6
- {web3-7.11.1 → web3-7.12.1}/web3/providers/legacy_websocket.py +4 -5
- {web3-7.11.1 → web3-7.12.1}/web3/providers/persistent/persistent.py +110 -40
- {web3-7.11.1 → web3-7.12.1}/web3/providers/persistent/request_processor.py +34 -51
- {web3-7.11.1 → web3-7.12.1}/web3/providers/persistent/subscription_manager.py +12 -7
- {web3-7.11.1 → web3-7.12.1}/web3/providers/rpc/async_rpc.py +7 -7
- {web3-7.11.1 → web3-7.12.1}/web3/providers/rpc/rpc.py +6 -6
- {web3-7.11.1 → web3-7.12.1}/web3/utils/subscriptions.py +7 -4
- {web3-7.11.1 → web3-7.12.1/web3.egg-info}/PKG-INFO +15 -2
- {web3-7.11.1 → web3-7.12.1}/web3.egg-info/SOURCES.txt +5 -1
- web3-7.11.1/tests/integration/geth-1.15.11-fixture.zip +0 -0
- {web3-7.11.1 → web3-7.12.1}/LICENSE +0 -0
- {web3-7.11.1 → web3-7.12.1}/MANIFEST.in +0 -0
- {web3-7.11.1 → web3-7.12.1}/README.md +0 -0
- {web3-7.11.1 → web3-7.12.1}/ens/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/ens/_normalization.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/ens/abis.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/ens/auto.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/ens/base_ens.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/ens/constants.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/ens/contract_data.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/ens/exceptions.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/ens/specs/nf.json +0 -0
- {web3-7.11.1 → web3-7.12.1}/ens/specs/normalization_spec.json +0 -0
- {web3-7.11.1 → web3-7.12.1}/scripts/release/test_package.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/setup.cfg +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/beacon/test_async_beacon.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/beacon/test_beacon.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/conftest.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/admin-module/test_admin_addPeer.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/admin-module/test_admin_nodeInfo.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/admin-module/test_admin_peers.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/block-utils/test_select_method_for_block_identifier.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/caching-utils/test_generate_cache_key.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/conftest.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/conftest.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_contract_ambiguous_events.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_contract_ambiguous_functions.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_contract_attributes.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_contract_build_transaction.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_contract_call_interface.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_contract_caller_interface.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_contract_class_construction.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_contract_constructor.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_contract_constructor_encoding.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_contract_deployment.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_contract_estimate_gas.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_contract_events.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_contract_events_build_filter.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_contract_example.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_contract_method_abi_decoding.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_contract_method_abi_encoding.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_contract_method_to_argument_matching.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_contract_panic_errors.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_contract_transact_interface.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_contract_util_functions.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_extracting_event_data.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_extracting_event_data_old.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/test_offchain_lookup.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/contracts/utils.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/datastructures/test_datastructures.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/empty-object/test_empty_object_is_falsy.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/eth-module/conftest.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/eth-module/test_block_api.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/eth-module/test_default_account_api.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/eth-module/test_eth_contract.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/eth-module/test_eth_fee_history.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/eth-module/test_eth_filter.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/eth-module/test_eth_properties.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/eth-module/test_gas_pricing.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/eth-module/test_poa.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/eth-module/test_transactions.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/eth-tester-api/test_withdrawals.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/exceptions/test_exceptions.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/filtering/conftest.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/filtering/test_basic_filter_tests.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/filtering/test_contract_create_filter_topic_merging.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/filtering/test_contract_data_filters.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/filtering/test_contract_get_logs.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/filtering/test_contract_on_event_filtering.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/filtering/test_contract_past_event_filtering.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/filtering/test_contract_topic_filters.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/filtering/test_existing_filter_instance.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/filtering/test_filter_against_latest_blocks.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/filtering/test_filter_against_pending_transactions.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/filtering/test_filter_against_transaction_logs.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/filtering/test_filters_against_many_blocks.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/filtering/test_utils_functions.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/filtering/utils.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/gas-strategies/test_rpc_gas_pricing_strategies.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/gas-strategies/test_time_based_gas_price_strategy.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/manager/conftest.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/manager/test_default_middlewares.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/manager/test_middleware_can_be_stateful.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/manager/test_middleware_onion_api.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/manager/test_provider_property.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/manager/test_provider_request_wrapping.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/manager/test_response_formatters.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/method-class/test_method.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/method-class/test_result_formatters.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/middleware/test_attrdict_middleware.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/middleware/test_filter_middleware.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/middleware/test_formatting_middleware.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/middleware/test_gas_price_strategy.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/middleware/test_middleware.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/middleware/test_name_to_address_middleware.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/middleware/test_stalecheck.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/middleware/test_transaction_signing.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/module-class/test_module.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/providers/test_async_tester_provider.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/providers/test_auto_provider.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/providers/test_base_provider.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/providers/test_http_request_retry.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/providers/test_legacy_websocket_provider.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/providers/test_provider_init.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/providers/test_tester_provider.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/subscriptions/test_subscription_manager.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/subscriptions/test_subscriptions.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/test_library_files.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/testing-module/test_testing_mine.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/testing-module/test_testing_snapshot_and_revert.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/testing-module/test_testing_timeTravel.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/conftest.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_abi.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_abi_filtering_by_argument_name.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_abi_is_encodable.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_abi_named_tree.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_address.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_async_transaction.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_attach_modules.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_attributedict.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_caching_utils.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_construct_event_data_set.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_construct_event_filter_params.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_construct_event_topics.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_datatypes.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_decorators.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_encoding.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_event_filter_builder.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_event_interface.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_fee_utils.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_formatters.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_is_predefined_block_number.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_is_probably_enum.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_is_recognized_type.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_math.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_method_formatters.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_prepare_transaction_replacement.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_select_filter_method.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_threads.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_valid_transaction_params.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/utilities/test_validation.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/web3-module/test_api.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/web3-module/test_attach_modules.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/web3-module/test_client_version.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/web3-module/test_conversions.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/web3-module/test_import_and_version.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/web3-module/test_keccak.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/web3-module/test_providers.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/web3-module/test_strict_bytes_type_checking.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/core/web3-module/test_web3_inheritance.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/ens/conftest.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/ens/normalization/normalization_tests.json +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/ens/normalization/test_normalize_name_ensip15.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/ens/test_ens.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/ens/test_get_registry.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/ens/test_get_text.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/ens/test_nameprep.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/ens/test_setup_address.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/ens/test_setup_name.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/ens/test_wildcard_resolution.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/integration/README.md +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/integration/common.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/integration/conftest.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/integration/generate_fixtures/common.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/integration/generate_fixtures/go_ethereum.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/integration/go_ethereum/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/integration/go_ethereum/common.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/integration/go_ethereum/test_goethereum_ws/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/integration/go_ethereum/test_goethereum_ws/test_async_await_w3.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/integration/go_ethereum/test_goethereum_ws/test_async_ctx_manager_w3.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/integration/go_ethereum/test_goethereum_ws/test_async_iterator_w3.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/integration/go_ethereum/utils.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/tests/utils.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/abi_element_identifiers.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/async_caching.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/async_transactions.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/blocks.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/caching/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/caching/caching_utils.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/compat/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/compile_contracts.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/_custom_contract_data.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/ambiguous_function_contract.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/arrays_contract.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/bytes_contracts.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/constructor_contracts.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/contract_caller_tester.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/emitter_contract.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/event_contracts.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/extended_resolver.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/fallback_function_contract.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/function_name_tester_contract.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/math_contract.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/offchain_lookup.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/offchain_resolver.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/panic_errors_contract.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/payable_tester.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/receive_function_contracts.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/reflector_contracts.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/revert_contract.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/simple_resolver.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/storage_contract.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/string_contract.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contract_sources/contract_data/tuple_contracts.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/contracts.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/datatypes.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/empty.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/encoding.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/ens.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/error_formatters_utils.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/events.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/fee_utils.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/filters.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/formatters.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/http.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/hypothesis.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/math.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/module.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/module_testing/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/module_testing/go_ethereum_admin_module.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/module_testing/go_ethereum_debug_module.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/module_testing/go_ethereum_txpool_module.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/module_testing/module_testing_utils.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/module_testing/net_module.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/module_testing/persistent_connection_provider.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/module_testing/utils.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/normalizers.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/rpc_abi.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/threads.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/transactions.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/type_conversion.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/utility_methods.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/_utils/windows.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/auto/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/auto/gethdev.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/beacon/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/beacon/api_endpoints.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/beacon/async_beacon.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/beacon/beacon.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/constants.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/contract/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/contract/async_contract.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/contract/base_contract.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/contract/contract.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/datastructures.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/eth/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/eth/async_eth.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/eth/base_eth.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/eth/eth.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/exceptions.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/gas_strategies/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/gas_strategies/rpc.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/gas_strategies/time_based.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/geth.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/logs.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/main.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/middleware/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/middleware/attrdict.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/middleware/base.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/middleware/buffered_gas_estimate.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/middleware/filter.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/middleware/formatting.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/middleware/gas_price_strategy.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/middleware/names.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/middleware/proof_of_authority.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/middleware/pythonic.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/middleware/signing.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/middleware/stalecheck.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/middleware/validation.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/module.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/net.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/providers/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/providers/eth_tester/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/providers/eth_tester/defaults.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/providers/eth_tester/main.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/providers/eth_tester/middleware.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/providers/persistent/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/providers/persistent/async_ipc.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/providers/persistent/persistent_connection.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/providers/persistent/subscription_container.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/providers/persistent/utils.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/providers/persistent/websocket.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/providers/rpc/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/providers/rpc/utils.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/py.typed +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/scripts/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/scripts/install_pre_releases.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/scripts/parse_pygeth_version.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/scripts/release/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/scripts/release/test_package.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/testing.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/tracing.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/types.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/utils/__init__.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/utils/abi.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/utils/address.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/utils/async_exception_handling.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/utils/caching.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3/utils/exception_handling.py +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3.egg-info/dependency_links.txt +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3.egg-info/not-zip-safe +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3.egg-info/requires.txt +0 -0
- {web3-7.11.1 → web3-7.12.1}/web3.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: web3
|
|
3
|
-
Version: 7.
|
|
3
|
+
Version: 7.12.1
|
|
4
4
|
Summary: web3: A Python library for interacting with Ethereum
|
|
5
5
|
Home-page: https://github.com/ethereum/web3.py
|
|
6
6
|
Author: The Ethereum Foundation
|
|
@@ -78,6 +78,19 @@ Requires-Dist: mypy==1.10.0; extra == "test"
|
|
|
78
78
|
Requires-Dist: pre-commit>=3.4.0; extra == "test"
|
|
79
79
|
Requires-Dist: eth-tester[py-evm]<0.14.0b1,>=0.13.0b1; extra == "test"
|
|
80
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: license-file
|
|
90
|
+
Dynamic: provides-extra
|
|
91
|
+
Dynamic: requires-dist
|
|
92
|
+
Dynamic: requires-python
|
|
93
|
+
Dynamic: summary
|
|
81
94
|
|
|
82
95
|
# web3.py
|
|
83
96
|
|
|
@@ -57,7 +57,7 @@ from ens.utils import (
|
|
|
57
57
|
address_in,
|
|
58
58
|
address_to_reverse_domain,
|
|
59
59
|
default,
|
|
60
|
-
|
|
60
|
+
dns_encode_name,
|
|
61
61
|
init_async_web3,
|
|
62
62
|
is_empty_name,
|
|
63
63
|
is_none_or_zero_address,
|
|
@@ -500,7 +500,7 @@ class AsyncENS(BaseENS):
|
|
|
500
500
|
|
|
501
501
|
calldata = resolver.encode_abi(*contract_func_with_args)
|
|
502
502
|
contract_call_result = await resolver.caller.resolve(
|
|
503
|
-
|
|
503
|
+
dns_encode_name(normal_name),
|
|
504
504
|
calldata,
|
|
505
505
|
)
|
|
506
506
|
result = self._decode_ensip10_resolve_data(
|
|
@@ -56,7 +56,7 @@ from .utils import (
|
|
|
56
56
|
address_in,
|
|
57
57
|
address_to_reverse_domain,
|
|
58
58
|
default,
|
|
59
|
-
|
|
59
|
+
dns_encode_name,
|
|
60
60
|
init_web3,
|
|
61
61
|
is_empty_name,
|
|
62
62
|
is_none_or_zero_address,
|
|
@@ -482,7 +482,7 @@ class ENS(BaseENS):
|
|
|
482
482
|
|
|
483
483
|
calldata = resolver.encode_abi(*contract_func_with_args)
|
|
484
484
|
contract_call_result = resolver.caller.resolve(
|
|
485
|
-
|
|
485
|
+
dns_encode_name(normal_name),
|
|
486
486
|
calldata,
|
|
487
487
|
)
|
|
488
488
|
result = self._decode_ensip10_resolve_data(
|
|
Binary file
|
|
@@ -13,6 +13,7 @@ from typing import (
|
|
|
13
13
|
Union,
|
|
14
14
|
cast,
|
|
15
15
|
)
|
|
16
|
+
import warnings
|
|
16
17
|
|
|
17
18
|
from eth_typing import (
|
|
18
19
|
Address,
|
|
@@ -132,7 +133,7 @@ def normalize_name(name: str) -> str:
|
|
|
132
133
|
return normalize_name_ensip15(name).as_text
|
|
133
134
|
|
|
134
135
|
|
|
135
|
-
def
|
|
136
|
+
def dns_encode_name(name: str) -> HexBytes:
|
|
136
137
|
r"""
|
|
137
138
|
Encode a name according to DNS standards specified in section 3.1
|
|
138
139
|
of RFC1035 with the following validations:
|
|
@@ -145,7 +146,7 @@ def ens_encode_name(name: str) -> bytes:
|
|
|
145
146
|
:param str name: the dot-separated ENS name
|
|
146
147
|
"""
|
|
147
148
|
if is_empty_name(name):
|
|
148
|
-
return b"\x00"
|
|
149
|
+
return HexBytes(b"\x00")
|
|
149
150
|
|
|
150
151
|
normalized_name = normalize_name(name)
|
|
151
152
|
|
|
@@ -163,7 +164,17 @@ def ens_encode_name(name: str) -> bytes:
|
|
|
163
164
|
dns_prepped_labels = [to_bytes(len(label)) + label for label in labels_as_bytes]
|
|
164
165
|
|
|
165
166
|
# return the joined prepped labels in order and append the zero byte at the end:
|
|
166
|
-
return b"".join(dns_prepped_labels) + b"\x00"
|
|
167
|
+
return HexBytes(b"".join(dns_prepped_labels) + b"\x00")
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
def ens_encode_name(name: str) -> bytes:
|
|
171
|
+
warnings.warn(
|
|
172
|
+
"``ens_encode_name`` is deprecated and will be removed in the next "
|
|
173
|
+
"major version. Use ``dns_encode_name`` instead.",
|
|
174
|
+
DeprecationWarning,
|
|
175
|
+
stacklevel=2,
|
|
176
|
+
)
|
|
177
|
+
return bytes(dns_encode_name(name))
|
|
167
178
|
|
|
168
179
|
|
|
169
180
|
def is_valid_name(name: str) -> bool:
|
|
@@ -55,7 +55,7 @@ with open("./README.md") as readme:
|
|
|
55
55
|
setup(
|
|
56
56
|
name="web3",
|
|
57
57
|
# *IMPORTANT*: Don't manually change the version here. See Contributing docs for the release process.
|
|
58
|
-
version="7.
|
|
58
|
+
version="7.12.1",
|
|
59
59
|
description="""web3: A Python library for interacting with Ethereum""",
|
|
60
60
|
long_description=long_description,
|
|
61
61
|
long_description_content_type="text/markdown",
|
|
Binary file
|
|
@@ -204,7 +204,7 @@ def test_all_providers_do_not_cache_by_default_and_can_set_caching_properties(pr
|
|
|
204
204
|
"threshold",
|
|
205
205
|
(RequestCacheValidationThreshold.FINALIZED, RequestCacheValidationThreshold.SAFE),
|
|
206
206
|
)
|
|
207
|
-
@pytest.mark.parametrize("endpoint", BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT)
|
|
207
|
+
@pytest.mark.parametrize("endpoint", sorted(BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT))
|
|
208
208
|
@pytest.mark.parametrize(
|
|
209
209
|
"blocknum,should_cache",
|
|
210
210
|
(
|
|
@@ -254,7 +254,7 @@ def test_blocknum_validation_against_validation_threshold_when_caching_mainnet(
|
|
|
254
254
|
"threshold",
|
|
255
255
|
(RequestCacheValidationThreshold.FINALIZED, RequestCacheValidationThreshold.SAFE),
|
|
256
256
|
)
|
|
257
|
-
@pytest.mark.parametrize("endpoint", BLOCKNUM_IN_PARAMS)
|
|
257
|
+
@pytest.mark.parametrize("endpoint", sorted(BLOCKNUM_IN_PARAMS))
|
|
258
258
|
@pytest.mark.parametrize(
|
|
259
259
|
"block_id,blocknum,should_cache",
|
|
260
260
|
(
|
|
@@ -297,7 +297,7 @@ def test_block_id_param_caching_mainnet(
|
|
|
297
297
|
"threshold",
|
|
298
298
|
(RequestCacheValidationThreshold.FINALIZED, RequestCacheValidationThreshold.SAFE),
|
|
299
299
|
)
|
|
300
|
-
@pytest.mark.parametrize("endpoint", BLOCKHASH_IN_PARAMS)
|
|
300
|
+
@pytest.mark.parametrize("endpoint", sorted(BLOCKHASH_IN_PARAMS))
|
|
301
301
|
@pytest.mark.parametrize(
|
|
302
302
|
"blocknum,should_cache",
|
|
303
303
|
(
|
|
@@ -360,7 +360,7 @@ def test_request_caching_validation_threshold_defaults(
|
|
|
360
360
|
|
|
361
361
|
|
|
362
362
|
@pytest.mark.parametrize(
|
|
363
|
-
"endpoint", BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT | BLOCKHASH_IN_PARAMS
|
|
363
|
+
"endpoint", sorted(BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT | BLOCKHASH_IN_PARAMS)
|
|
364
364
|
)
|
|
365
365
|
@pytest.mark.parametrize(
|
|
366
366
|
"time_from_threshold,should_cache",
|
|
@@ -436,7 +436,7 @@ def test_sync_validation_against_validation_threshold_time_based(
|
|
|
436
436
|
),
|
|
437
437
|
)
|
|
438
438
|
@pytest.mark.parametrize(
|
|
439
|
-
"endpoint", BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT | BLOCKHASH_IN_PARAMS
|
|
439
|
+
"endpoint", sorted(BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT | BLOCKHASH_IN_PARAMS)
|
|
440
440
|
)
|
|
441
441
|
def test_validation_against_validation_threshold_time_based_configured(
|
|
442
442
|
time_from_threshold, should_cache, chain_id, endpoint, sync_provider, request_mocker
|
|
@@ -642,7 +642,7 @@ async def test_async_request_caching_does_not_share_state_between_providers(
|
|
|
642
642
|
"threshold",
|
|
643
643
|
(RequestCacheValidationThreshold.FINALIZED, RequestCacheValidationThreshold.SAFE),
|
|
644
644
|
)
|
|
645
|
-
@pytest.mark.parametrize("endpoint", BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT)
|
|
645
|
+
@pytest.mark.parametrize("endpoint", sorted(BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT))
|
|
646
646
|
@pytest.mark.parametrize(
|
|
647
647
|
"blocknum,should_cache",
|
|
648
648
|
(
|
|
@@ -689,7 +689,7 @@ async def test_async_blocknum_validation_against_validation_threshold_mainnet(
|
|
|
689
689
|
"threshold",
|
|
690
690
|
(RequestCacheValidationThreshold.FINALIZED, RequestCacheValidationThreshold.SAFE),
|
|
691
691
|
)
|
|
692
|
-
@pytest.mark.parametrize("endpoint", BLOCKNUM_IN_PARAMS)
|
|
692
|
+
@pytest.mark.parametrize("endpoint", sorted(BLOCKNUM_IN_PARAMS))
|
|
693
693
|
@pytest.mark.parametrize(
|
|
694
694
|
"block_id,blocknum,should_cache",
|
|
695
695
|
(
|
|
@@ -735,7 +735,7 @@ async def test_async_block_id_param_caching_mainnet(
|
|
|
735
735
|
"threshold",
|
|
736
736
|
(RequestCacheValidationThreshold.FINALIZED, RequestCacheValidationThreshold.SAFE),
|
|
737
737
|
)
|
|
738
|
-
@pytest.mark.parametrize("endpoint", BLOCKHASH_IN_PARAMS)
|
|
738
|
+
@pytest.mark.parametrize("endpoint", sorted(BLOCKHASH_IN_PARAMS))
|
|
739
739
|
@pytest.mark.parametrize(
|
|
740
740
|
"blocknum,should_cache",
|
|
741
741
|
(
|
|
@@ -794,7 +794,7 @@ async def test_async_request_caching_validation_threshold_defaults(
|
|
|
794
794
|
|
|
795
795
|
@pytest.mark.asyncio
|
|
796
796
|
@pytest.mark.parametrize(
|
|
797
|
-
"endpoint", BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT | BLOCKHASH_IN_PARAMS
|
|
797
|
+
"endpoint", sorted(BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT | BLOCKHASH_IN_PARAMS)
|
|
798
798
|
)
|
|
799
799
|
@pytest.mark.parametrize(
|
|
800
800
|
"time_from_threshold,should_cache",
|
|
@@ -856,7 +856,7 @@ async def test_async_validation_against_validation_threshold_time_based(
|
|
|
856
856
|
|
|
857
857
|
@pytest.mark.asyncio
|
|
858
858
|
@pytest.mark.parametrize(
|
|
859
|
-
"endpoint", BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT | BLOCKHASH_IN_PARAMS
|
|
859
|
+
"endpoint", sorted(BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT | BLOCKHASH_IN_PARAMS)
|
|
860
860
|
)
|
|
861
861
|
@pytest.mark.parametrize("blocknum", ("0x0", "0x1", "0x2", "0x3", "0x4", "0x5"))
|
|
862
862
|
async def test_async_request_caching_with_validation_threshold_set_to_none(
|
|
@@ -901,7 +901,7 @@ async def test_async_request_caching_with_validation_threshold_set_to_none(
|
|
|
901
901
|
),
|
|
902
902
|
)
|
|
903
903
|
@pytest.mark.parametrize(
|
|
904
|
-
"endpoint", BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT | BLOCKHASH_IN_PARAMS
|
|
904
|
+
"endpoint", sorted(BLOCKNUM_IN_PARAMS | BLOCK_IN_RESULT | BLOCKHASH_IN_PARAMS)
|
|
905
905
|
)
|
|
906
906
|
async def test_async_validation_against_validation_threshold_time_based_configured(
|
|
907
907
|
time_from_threshold,
|
|
@@ -85,7 +85,7 @@ def test_init_multiple_contracts_performance(w3, emitter_contract_data):
|
|
|
85
85
|
abi=emitter_contract_data["abi"], bytecode=emitter_contract_data["bytecode"]
|
|
86
86
|
)
|
|
87
87
|
# assert initializing 500 contracts is within a conservative / reasonable time
|
|
88
|
-
assert (time.time() - start_time) <
|
|
88
|
+
assert (time.time() - start_time) < 3
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
# -- async -- #
|
|
@@ -98,4 +98,4 @@ def test_async_init_multiple_contracts_performance(async_w3, emitter_contract_da
|
|
|
98
98
|
abi=emitter_contract_data["abi"], bytecode=emitter_contract_data["bytecode"]
|
|
99
99
|
)
|
|
100
100
|
# assert initializing 500 contracts is within a conservative / reasonable time
|
|
101
|
-
assert (time.time() - start_time) <
|
|
101
|
+
assert (time.time() - start_time) < 3
|
|
@@ -264,6 +264,7 @@ def test_eth_account_sign(
|
|
|
264
264
|
acct, message_text, key, expected_bytes, expected_hash, v, r, s, signature
|
|
265
265
|
):
|
|
266
266
|
message = encode_defunct(text=message_text)
|
|
267
|
+
assert message.body == expected_bytes
|
|
267
268
|
signed_message = Web3.keccak(
|
|
268
269
|
b"\x19Ethereum Signed Message:\n"
|
|
269
270
|
+ bytes(f"{len(message.body)}", encoding="utf-8")
|
|
@@ -357,9 +358,9 @@ def test_eth_account_sign(
|
|
|
357
358
|
),
|
|
358
359
|
(
|
|
359
360
|
{
|
|
360
|
-
"gas":
|
|
361
|
-
"maxFeePerGas":
|
|
362
|
-
"maxPriorityFeePerGas":
|
|
361
|
+
"gas": "0x186a0",
|
|
362
|
+
"maxFeePerGas": "0x77359400",
|
|
363
|
+
"maxPriorityFeePerGas": "0x77359400",
|
|
363
364
|
"data": "0x5544",
|
|
364
365
|
"nonce": "0x2",
|
|
365
366
|
"to": "0x96216849c49358B10257cb55b28eA603c874b05E",
|
|
@@ -18,7 +18,7 @@ SAMPLE_ADDRESS_LIST = [
|
|
|
18
18
|
SAMPLE_ADDRESS = "0x0000000000000000000000000000000000000004"
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
@pytest.mark.parametrize("block_number",
|
|
21
|
+
@pytest.mark.parametrize("block_number", (0, "0x0", "earliest"))
|
|
22
22
|
def test_get_transaction_count_formatters(w3, block_number):
|
|
23
23
|
tx_counts = w3.eth.get_transaction_count(w3.eth.accounts[-1], block_number)
|
|
24
24
|
assert tx_counts == 0
|
|
@@ -128,23 +128,4 @@ async def test_async_http_empty_batch_response(mock_async_post):
|
|
|
128
128
|
with pytest.raises(Web3RPCError, match="empty batch"):
|
|
129
129
|
await batch.async_execute()
|
|
130
130
|
|
|
131
|
-
# assert that even though there was an error, we have reset the batching state
|
|
132
131
|
assert not async_w3.provider._is_batching
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
@patch(
|
|
136
|
-
"web3._utils.http_session_manager.HTTPSessionManager.async_make_post_request",
|
|
137
|
-
new_callable=AsyncMock,
|
|
138
|
-
)
|
|
139
|
-
@pytest.mark.asyncio
|
|
140
|
-
async def test_async_provider_is_batching_when_make_batch_request(mock_post):
|
|
141
|
-
def assert_is_batching_and_return_response(*_args, **_kwargs) -> bytes:
|
|
142
|
-
assert provider._is_batching
|
|
143
|
-
return b'{"jsonrpc":"2.0","id":1,"result":["0x1"]}'
|
|
144
|
-
|
|
145
|
-
mock_post.side_effect = assert_is_batching_and_return_response
|
|
146
|
-
provider = AsyncHTTPProvider()
|
|
147
|
-
|
|
148
|
-
assert not provider._is_batching
|
|
149
|
-
await provider.make_batch_request([("eth_blockNumber", [])])
|
|
150
|
-
assert not provider._is_batching
|
|
@@ -374,16 +374,18 @@ async def test_persistent_connection_provider_empty_batch_response(
|
|
|
374
374
|
simple_ipc_server,
|
|
375
375
|
jsonrpc_ipc_pipe_path,
|
|
376
376
|
):
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
377
|
+
with pytest.raises(Web3RPCError, match="empty batch"):
|
|
378
|
+
async with AsyncWeb3(
|
|
379
|
+
AsyncIPCProvider(pathlib.Path(jsonrpc_ipc_pipe_path))
|
|
380
|
+
) as async_w3:
|
|
381
|
+
async_w3.provider._reader.readline = AsyncMock(
|
|
382
|
+
return_value=(
|
|
383
|
+
b'{"jsonrpc": "2.0","id":null,"error": {"code": -32600, "message": '
|
|
384
|
+
b'"empty batch"}}\n'
|
|
385
|
+
)
|
|
386
|
+
)
|
|
387
|
+
async with async_w3.batch_requests() as batch:
|
|
388
|
+
assert async_w3.provider._is_batching
|
|
387
389
|
await batch.async_execute()
|
|
388
390
|
|
|
389
391
|
# assert that even though there was an error, we have reset the batching state
|
|
@@ -127,26 +127,9 @@ def test_http_empty_batch_response(mock_post):
|
|
|
127
127
|
)
|
|
128
128
|
w3 = Web3(HTTPProvider())
|
|
129
129
|
with w3.batch_requests() as batch:
|
|
130
|
+
assert w3.provider._is_batching
|
|
130
131
|
with pytest.raises(Web3RPCError, match="empty batch"):
|
|
131
132
|
batch.execute()
|
|
132
133
|
|
|
133
134
|
# assert that even though there was an error, we have reset the batching state
|
|
134
135
|
assert not w3.provider._is_batching
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
@patch(
|
|
138
|
-
"web3._utils.http_session_manager.HTTPSessionManager.make_post_request",
|
|
139
|
-
new_callable=Mock,
|
|
140
|
-
)
|
|
141
|
-
def test_sync_provider_is_batching_when_make_batch_request(mock_post):
|
|
142
|
-
def assert_is_batching_and_return_response(*_args, **_kwargs) -> bytes:
|
|
143
|
-
assert provider._is_batching
|
|
144
|
-
return b'{"jsonrpc":"2.0","id":1,"result":["0x1"]}'
|
|
145
|
-
|
|
146
|
-
provider = HTTPProvider()
|
|
147
|
-
assert not provider._is_batching
|
|
148
|
-
|
|
149
|
-
mock_post.side_effect = assert_is_batching_and_return_response
|
|
150
|
-
|
|
151
|
-
provider.make_batch_request([("eth_blockNumber", [])])
|
|
152
|
-
assert not provider._is_batching
|
|
@@ -199,18 +199,3 @@ def test_ipc_provider_write_messages_end_with_new_line_delimiter(jsonrpc_ipc_pip
|
|
|
199
199
|
|
|
200
200
|
request_data = b'{"jsonrpc": "2.0", "method": "method", "params": [], "id": 0}'
|
|
201
201
|
provider._socket.sock.sendall.assert_called_with(request_data + b"\n")
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
def test_ipc_provider_is_batching_when_make_batch_request(jsonrpc_ipc_pipe_path):
|
|
205
|
-
def assert_is_batching_and_return_response(*_args, **_kwargs) -> bytes:
|
|
206
|
-
assert provider._is_batching
|
|
207
|
-
return [{"id": 0, "jsonrpc": "2.0", "result": {}}]
|
|
208
|
-
|
|
209
|
-
provider = IPCProvider(pathlib.Path(jsonrpc_ipc_pipe_path), timeout=3)
|
|
210
|
-
provider._make_request = Mock()
|
|
211
|
-
provider._make_request.side_effect = assert_is_batching_and_return_response
|
|
212
|
-
|
|
213
|
-
assert not provider._is_batching
|
|
214
|
-
|
|
215
|
-
provider.make_batch_request([("eth_blockNumber", [])])
|
|
216
|
-
assert not provider._is_batching
|
|
@@ -473,19 +473,20 @@ async def test_persistent_connection_provider_empty_batch_response():
|
|
|
473
473
|
"web3.providers.persistent.websocket.connect",
|
|
474
474
|
new=lambda *_1, **_2: _mocked_ws_conn(),
|
|
475
475
|
):
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
476
|
+
with pytest.raises(Web3RPCError, match="empty batch"):
|
|
477
|
+
async with AsyncWeb3(WebSocketProvider("ws://mocked")) as async_w3:
|
|
478
|
+
async with async_w3.batch_requests() as batch:
|
|
479
|
+
assert async_w3.provider._is_batching
|
|
480
|
+
async_w3.provider._ws.recv = AsyncMock()
|
|
481
|
+
async_w3.provider._ws.recv.return_value = (
|
|
482
|
+
b'{"jsonrpc": "2.0","id":null,"error": {"code": -32600, '
|
|
483
|
+
b'"message": "empty batch"}}\n'
|
|
484
|
+
)
|
|
484
485
|
await batch.async_execute()
|
|
485
486
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
487
|
+
# assert that even though there was an error, we have reset the batching
|
|
488
|
+
# state
|
|
489
|
+
assert not async_w3.provider._is_batching
|
|
489
490
|
|
|
490
491
|
|
|
491
492
|
@pytest.mark.parametrize(
|
|
@@ -564,21 +565,3 @@ async def test_raise_stray_errors_from_cache_handles_list_response_without_error
|
|
|
564
565
|
|
|
565
566
|
# assert no errors raised
|
|
566
567
|
provider._raise_stray_errors_from_cache()
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
@pytest.mark.asyncio
|
|
570
|
-
async def test_websocket_provider_is_batching_when_make_batch_request():
|
|
571
|
-
def assert_is_batching_and_return_response(*_args, **_kwargs) -> bytes:
|
|
572
|
-
assert provider._is_batching
|
|
573
|
-
return b'{"jsonrpc":"2.0","id":1,"result":["0x1"]}'
|
|
574
|
-
|
|
575
|
-
provider = WebSocketProvider("ws://mocked")
|
|
576
|
-
_mock_ws(provider)
|
|
577
|
-
provider._get_response_for_request_id = AsyncMock()
|
|
578
|
-
provider._get_response_for_request_id.side_effect = (
|
|
579
|
-
assert_is_batching_and_return_response
|
|
580
|
-
)
|
|
581
|
-
|
|
582
|
-
assert not provider._is_batching
|
|
583
|
-
await provider.make_batch_request([("eth_blockNumber", [])])
|
|
584
|
-
assert not provider._is_batching
|
|
@@ -87,7 +87,7 @@ def _simulate_call(http_session_manager, uri):
|
|
|
87
87
|
return _session
|
|
88
88
|
|
|
89
89
|
|
|
90
|
-
@pytest.fixture
|
|
90
|
+
@pytest.fixture
|
|
91
91
|
def http_session_manager():
|
|
92
92
|
return HTTPSessionManager()
|
|
93
93
|
|
|
@@ -342,7 +342,7 @@ async def test_session_manager_async_json_make_get_request(
|
|
|
342
342
|
response = await http_session_manager.async_json_make_get_request(TEST_URI)
|
|
343
343
|
assert response == json.dumps({"data": "content"})
|
|
344
344
|
assert len(http_session_manager.session_cache) == 1
|
|
345
|
-
cache_key = generate_cache_key(f"{
|
|
345
|
+
cache_key = generate_cache_key(f"{id(asyncio.get_event_loop())}:{TEST_URI}")
|
|
346
346
|
session = http_session_manager.session_cache.get_cache_entry(cache_key)
|
|
347
347
|
assert isinstance(session, ClientSession)
|
|
348
348
|
session.get.assert_called_once_with(
|
|
@@ -367,7 +367,7 @@ async def test_session_manager_async_json_make_post_request(
|
|
|
367
367
|
)
|
|
368
368
|
assert response == json.dumps({"data": "content"})
|
|
369
369
|
assert len(http_session_manager.session_cache) == 1
|
|
370
|
-
cache_key = generate_cache_key(f"{
|
|
370
|
+
cache_key = generate_cache_key(f"{id(asyncio.get_event_loop())}:{TEST_URI}")
|
|
371
371
|
session = http_session_manager.session_cache.get_cache_entry(cache_key)
|
|
372
372
|
assert isinstance(session, ClientSession)
|
|
373
373
|
session.post.assert_called_once_with(
|
|
@@ -391,7 +391,7 @@ async def test_session_manager_async_make_post_request(mocker, http_session_mana
|
|
|
391
391
|
)
|
|
392
392
|
assert response == "content"
|
|
393
393
|
assert len(http_session_manager.session_cache) == 1
|
|
394
|
-
cache_key = generate_cache_key(f"{
|
|
394
|
+
cache_key = generate_cache_key(f"{id(asyncio.get_event_loop())}:{TEST_URI}")
|
|
395
395
|
session = http_session_manager.session_cache.get_cache_entry(cache_key)
|
|
396
396
|
assert isinstance(session, ClientSession)
|
|
397
397
|
session.post.assert_called_once_with(
|
|
@@ -431,7 +431,7 @@ async def test_session_manager_async_precached_session(http_session_manager):
|
|
|
431
431
|
|
|
432
432
|
|
|
433
433
|
@pytest.mark.asyncio
|
|
434
|
-
async def
|
|
434
|
+
async def test_async_session_manager_cache_does_not_close_session_before_call(
|
|
435
435
|
http_session_manager,
|
|
436
436
|
):
|
|
437
437
|
# set cache size to 1 + set future session close thread time to 0.01s
|
|
@@ -442,16 +442,13 @@ async def test_session_manager_async_cache_does_not_close_session_before_a_call_
|
|
|
442
442
|
_session = await http_session_manager.async_cache_and_return_session(
|
|
443
443
|
uri, request_timeout=ClientTimeout(_timeout_for_testing)
|
|
444
444
|
)
|
|
445
|
-
|
|
446
445
|
# simulate a call taking 0.01s to return a response
|
|
447
446
|
await asyncio.sleep(_timeout_for_testing)
|
|
448
447
|
|
|
449
448
|
assert not _session.closed
|
|
450
449
|
return _session
|
|
451
450
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
all_sessions = await asyncio.gather(*tasks)
|
|
451
|
+
all_sessions = [await cache_uri_and_return_session(uri) for uri in UNIQUE_URIS]
|
|
455
452
|
assert len(all_sessions) == len(UNIQUE_URIS)
|
|
456
453
|
assert all(isinstance(s, ClientSession) for s in all_sessions)
|
|
457
454
|
|
|
@@ -485,7 +482,7 @@ async def test_session_manager_async_unique_cache_keys_created_per_thread_with_s
|
|
|
485
482
|
event_loop = asyncio.new_event_loop()
|
|
486
483
|
unique_session = event_loop.run_until_complete(
|
|
487
484
|
http_session_manager.async_cache_and_return_session(
|
|
488
|
-
endpoint_uri, request_timeout=ClientTimeout(0.
|
|
485
|
+
endpoint_uri, request_timeout=ClientTimeout(0.1)
|
|
489
486
|
)
|
|
490
487
|
)
|
|
491
488
|
event_loop.close()
|
|
@@ -500,6 +497,7 @@ async def test_session_manager_async_unique_cache_keys_created_per_thread_with_s
|
|
|
500
497
|
daemon=True,
|
|
501
498
|
)
|
|
502
499
|
thread.start()
|
|
500
|
+
time.sleep(0.01)
|
|
503
501
|
threads.append(thread)
|
|
504
502
|
|
|
505
503
|
[thread.join() for thread in threads]
|
|
@@ -529,7 +527,7 @@ async def test_session_manager_async_use_new_session_if_loop_closed_for_cached_s
|
|
|
529
527
|
)
|
|
530
528
|
|
|
531
529
|
# assert session1 was cached
|
|
532
|
-
cache_key = generate_cache_key(f"{
|
|
530
|
+
cache_key = generate_cache_key(f"{id(asyncio.get_event_loop())}:{TEST_URI}")
|
|
533
531
|
|
|
534
532
|
assert len(http_session_manager.session_cache) == 1
|
|
535
533
|
cached_session = http_session_manager.session_cache.get_cache_entry(cache_key)
|
|
@@ -569,7 +567,7 @@ async def test_session_manager_async_use_new_session_if_session_closed_for_cache
|
|
|
569
567
|
)
|
|
570
568
|
|
|
571
569
|
# assert session1 was cached
|
|
572
|
-
cache_key = generate_cache_key(f"{
|
|
570
|
+
cache_key = generate_cache_key(f"{id(asyncio.get_event_loop())}:{TEST_URI}")
|
|
573
571
|
|
|
574
572
|
assert len(http_session_manager.session_cache) == 1
|
|
575
573
|
cached_session = http_session_manager.session_cache.get_cache_entry(cache_key)
|
|
Binary file
|
|
@@ -6,7 +6,7 @@ from aiohttp import (
|
|
|
6
6
|
import requests
|
|
7
7
|
|
|
8
8
|
from ens.utils import (
|
|
9
|
-
|
|
9
|
+
dns_encode_name,
|
|
10
10
|
)
|
|
11
11
|
from web3.exceptions import (
|
|
12
12
|
OffchainLookup,
|
|
@@ -172,14 +172,14 @@ def test_offchain_resolver_function_call_raises_with_ccip_read_disabled(
|
|
|
172
172
|
# should fail here with `ccip_read_enabled` flag set to False
|
|
173
173
|
with pytest.raises(OffchainLookup):
|
|
174
174
|
offchain_resolver.functions.resolve(
|
|
175
|
-
|
|
175
|
+
dns_encode_name("offchainexample.eth"),
|
|
176
176
|
ENCODED_ADDR_CALLDATA,
|
|
177
177
|
).call(ccip_read_enabled=False)
|
|
178
178
|
|
|
179
179
|
# pass flag on specific call via ContractCaller is also an option
|
|
180
180
|
with pytest.raises(OffchainLookup):
|
|
181
181
|
offchain_resolver.caller(ccip_read_enabled=False).resolve(
|
|
182
|
-
|
|
182
|
+
dns_encode_name("offchainexample.eth"),
|
|
183
183
|
ENCODED_ADDR_CALLDATA,
|
|
184
184
|
)
|
|
185
185
|
|