web3 7.0.0b6__tar.gz → 7.0.0b8__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.0b6/web3.egg-info → web3-7.0.0b8}/PKG-INFO +14 -8
- {web3-7.0.0b6 → web3-7.0.0b8}/README.md +7 -3
- {web3-7.0.0b6 → web3-7.0.0b8}/ens/__init__.py +13 -2
- {web3-7.0.0b6 → web3-7.0.0b8}/setup.py +6 -3
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/beacon/test_async_beacon.py +10 -11
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/beacon/test_beacon.py +4 -13
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/conftest.py +4 -2
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/conftest.py +2 -4
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_contract_constructor.py +22 -18
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_contract_example.py +6 -11
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_contract_init.py +6 -5
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_contract_transact_interface.py +4 -6
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_extracting_event_data.py +30 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/eth-module/test_accounts.py +9 -2
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/eth-module/test_default_account_api.py +4 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/eth-module/test_transactions.py +3 -7
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/filtering/conftest.py +3 -3
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/filtering/test_contract_data_filters.py +3 -3
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/filtering/test_contract_topic_filters.py +3 -3
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/filtering/test_filter_against_pending_transactions.py +4 -5
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/filtering/test_filters_against_many_blocks.py +0 -46
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/filtering/utils.py +5 -1
- web3-7.0.0b8/tests/core/middleware/test_eth_tester_middleware.py +131 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/middleware/test_transaction_signing.py +27 -12
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/module-class/test_module.py +3 -3
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/providers/test_async_http_provider.py +1 -14
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/providers/test_http_provider.py +1 -4
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/providers/test_http_request_retry.py +18 -7
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/providers/test_websocket_provider.py +14 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/test_library_files.py +1 -1
- web3-7.0.0b6/tests/core/utilities/test_request.py → web3-7.0.0b8/tests/core/utilities/test_http_session_manager.py +106 -99
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_method_formatters.py +44 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/ens/conftest.py +4 -4
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/integration/conftest.py +11 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/integration/generate_fixtures/common.py +7 -8
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/integration/generate_fixtures/go_ethereum.py +6 -9
- web3-7.0.0b8/tests/integration/geth-1.14.5-fixture.zip +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/integration/go_ethereum/common.py +0 -1
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/integration/go_ethereum/conftest.py +3 -13
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/integration/go_ethereum/test_goethereum_legacy_ws.py +1 -1
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/integration/go_ethereum/test_goethereum_ws/conftest.py +1 -1
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/integration/test_ethereum_tester.py +15 -26
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/__init__.py +21 -5
- web3-7.0.0b8/web3/_utils/contract_sources/contract_data/arrays_contract.py +97 -0
- web3-7.0.0b8/web3/_utils/contract_sources/contract_data/bytes_contracts.py +79 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/contract_sources/contract_data/constructor_contracts.py +7 -7
- web3-7.0.0b8/web3/_utils/contract_sources/contract_data/contract_caller_tester.py +59 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/contract_sources/contract_data/emitter_contract.py +3 -3
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/contract_sources/contract_data/event_contracts.py +5 -5
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/contract_sources/contract_data/extended_resolver.py +3 -3
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/contract_sources/contract_data/fallback_function_contract.py +3 -3
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/contract_sources/contract_data/function_name_tester_contract.py +3 -3
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/contract_sources/contract_data/math_contract.py +3 -3
- web3-7.0.0b8/web3/_utils/contract_sources/contract_data/offchain_lookup.py +52 -0
- web3-7.0.0b8/web3/_utils/contract_sources/contract_data/offchain_resolver.py +100 -0
- web3-7.0.0b8/web3/_utils/contract_sources/contract_data/panic_errors_contract.py +99 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/contract_sources/contract_data/payable_tester.py +3 -3
- web3-7.0.0b8/web3/_utils/contract_sources/contract_data/receive_function_contracts.py +58 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/contract_sources/contract_data/reflector_contracts.py +3 -3
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/contract_sources/contract_data/revert_contract.py +3 -3
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/contract_sources/contract_data/simple_resolver.py +3 -3
- web3-7.0.0b8/web3/_utils/contract_sources/contract_data/storage_contract.py +50 -0
- web3-7.0.0b8/web3/_utils/contract_sources/contract_data/string_contract.py +42 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/contract_sources/contract_data/tuple_contracts.py +5 -5
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/http.py +3 -0
- web3-7.0.0b8/web3/_utils/http_session_manager.py +280 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/method_formatters.py +19 -3
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/module_testing/eth_module.py +84 -111
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/module_testing/module_testing_utils.py +22 -18
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/module_testing/persistent_connection_provider.py +45 -16
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/rpc_abi.py +0 -3
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/beacon/__init__.py +5 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/beacon/async_beacon.py +9 -5
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/beacon/beacon.py +7 -5
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/contract/__init__.py +7 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/contract/base_contract.py +10 -1
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/eth/__init__.py +7 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/eth/async_eth.py +0 -33
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/eth/eth.py +2 -53
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/exceptions.py +6 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/manager.py +34 -11
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/middleware/__init__.py +17 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/module.py +1 -1
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/providers/__init__.py +21 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/providers/eth_tester/__init__.py +5 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/providers/eth_tester/defaults.py +0 -6
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/providers/eth_tester/middleware.py +3 -8
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/providers/persistent/__init__.py +7 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/providers/persistent/async_ipc.py +34 -79
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/providers/persistent/persistent.py +76 -7
- web3-7.0.0b8/web3/providers/persistent/persistent_connection.py +84 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/providers/persistent/websocket.py +19 -59
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/providers/rpc/__init__.py +5 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/providers/rpc/async_rpc.py +16 -12
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/providers/rpc/rpc.py +16 -12
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/providers/rpc/utils.py +0 -3
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/tools/benchmark/main.py +7 -6
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/tools/benchmark/node.py +1 -1
- web3-7.0.0b8/web3/utils/__init__.py +28 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/utils/async_exception_handling.py +19 -7
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/utils/caching.py +24 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/utils/exception_handling.py +7 -5
- {web3-7.0.0b6 → web3-7.0.0b8/web3.egg-info}/PKG-INFO +14 -8
- {web3-7.0.0b6 → web3-7.0.0b8}/web3.egg-info/SOURCES.txt +3 -8
- {web3-7.0.0b6 → web3-7.0.0b8}/web3.egg-info/requires.txt +6 -4
- web3-7.0.0b6/tests/core/eth-module/test_eth_mining.py +0 -9
- web3-7.0.0b6/tests/core/middleware/test_eth_tester_middleware.py +0 -194
- web3-7.0.0b6/tests/core/txpool-module/conftest.py +0 -11
- web3-7.0.0b6/tests/core/txpool-module/test_txpool_content.py +0 -44
- web3-7.0.0b6/tests/core/txpool-module/test_txpool_inspect.py +0 -48
- web3-7.0.0b6/tests/integration/geth-1.13.14-fixture.zip +0 -0
- web3-7.0.0b6/web3/_utils/contract_sources/contract_data/address_reflector.py +0 -29
- web3-7.0.0b6/web3/_utils/contract_sources/contract_data/arrays_contract.py +0 -97
- web3-7.0.0b6/web3/_utils/contract_sources/contract_data/bytes_contracts.py +0 -79
- web3-7.0.0b6/web3/_utils/contract_sources/contract_data/contract_caller_tester.py +0 -59
- web3-7.0.0b6/web3/_utils/contract_sources/contract_data/offchain_lookup.py +0 -52
- web3-7.0.0b6/web3/_utils/contract_sources/contract_data/offchain_resolver.py +0 -100
- web3-7.0.0b6/web3/_utils/contract_sources/contract_data/panic_errors_contract.py +0 -99
- web3-7.0.0b6/web3/_utils/contract_sources/contract_data/receive_function_contracts.py +0 -58
- web3-7.0.0b6/web3/_utils/contract_sources/contract_data/storage_contract.py +0 -50
- web3-7.0.0b6/web3/_utils/contract_sources/contract_data/string_contract.py +0 -42
- web3-7.0.0b6/web3/_utils/request.py +0 -265
- web3-7.0.0b6/web3/providers/persistent/persistent_connection.py +0 -42
- web3-7.0.0b6/web3/utils/__init__.py +0 -19
- {web3-7.0.0b6 → web3-7.0.0b8}/LICENSE +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/MANIFEST.in +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/ens/_normalization.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/ens/abis.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/ens/async_ens.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/ens/auto.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/ens/base_ens.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/ens/constants.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/ens/contract_data.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/ens/ens.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/ens/exceptions.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/ens/specs/nf.json +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/ens/specs/normalization_spec.json +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/ens/utils.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/pyproject.toml +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/setup.cfg +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/.DS_Store +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/__init__.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/conftest.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/admin-module/test_admin_addPeer.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/admin-module/test_admin_nodeInfo.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/admin-module/test_admin_peers.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/block-utils/test_select_method_for_block_identifier.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/caching-utils/test_generate_cache_key.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/caching-utils/test_request_caching.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_args_and_kwargs_merger.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_contract_ambiguous_functions.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_contract_attributes.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_contract_build_transaction.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_contract_call_interface.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_contract_caller_interface.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_contract_class_construction.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_contract_constructor_encoding.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_contract_deployment.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_contract_estimate_gas.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_contract_events_build_filter.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_contract_method_abi_decoding.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_contract_method_abi_encoding.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_contract_method_to_argument_matching.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_contract_panic_errors.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_contract_util_functions.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_extracting_event_data_old.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/test_offchain_lookup.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/contracts/utils.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/datastructures/test_datastructures.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/empty-object/test_empty_object_is_falsy.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/eth-module/conftest.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/eth-module/test_block_api.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/eth-module/test_eth_contract.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/eth-module/test_eth_fee_history.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/eth-module/test_eth_filter.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/eth-module/test_eth_properties.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/eth-module/test_gas_pricing.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/eth-module/test_poa.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/eth-tester-api/test_withdrawals.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/exceptions/test_exceptions.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/filtering/test_basic_filter_tests.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/filtering/test_contract_create_filter_topic_merging.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/filtering/test_contract_get_logs.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/filtering/test_contract_on_event_filtering.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/filtering/test_contract_past_event_filtering.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/filtering/test_existing_filter_instance.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/filtering/test_filter_against_latest_blocks.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/filtering/test_filter_against_transaction_logs.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/filtering/test_utils_functions.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/gas-strategies/test_rpc_gas_pricing_strategies.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/gas-strategies/test_time_based_gas_price_strategy.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/manager/conftest.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/manager/test_default_middlewares.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/manager/test_middleware_can_be_stateful.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/manager/test_middleware_onion_api.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/manager/test_provider_property.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/manager/test_provider_request_wrapping.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/manager/test_response_formatters.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/method-class/test_method.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/method-class/test_result_formatters.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/middleware/test_attrdict_middleware.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/middleware/test_filter_middleware.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/middleware/test_formatting_middleware.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/middleware/test_gas_price_strategy.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/middleware/test_name_to_address_middleware.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/middleware/test_stalecheck.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/providers/test_async_ipc_provider.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/providers/test_async_tester_provider.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/providers/test_auto_provider.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/providers/test_base_provider.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/providers/test_ipc_provider.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/providers/test_legacy_websocket_provider.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/providers/test_tester_provider.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/testing-module/test_testing_mine.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/testing-module/test_testing_snapshot_and_revert.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/testing-module/test_testing_timeTravel.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/__init__.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/conftest.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_abi.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_abi_filter_by_abi_name.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_abi_filtering_by_argument_name.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_abi_is_encodable.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_abi_named_tree.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_address.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_async_transaction.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_attach_modules.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_attributedict.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_caching_utils.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_construct_event_data_set.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_construct_event_filter_params.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_construct_event_topics.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_datatypes.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_decorators.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_encoding.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_event_filter_builder.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_event_interface.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_fee_utils.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_formatters.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_is_predefined_block_number.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_is_probably_enum.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_is_recognized_type.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_math.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_prepare_transaction_replacement.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_select_filter_method.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_threads.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_valid_transaction_params.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/utilities/test_validation.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/web3-module/test_api.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/web3-module/test_attach_modules.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/web3-module/test_client_version.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/web3-module/test_conversions.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/web3-module/test_import_and_version.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/web3-module/test_keccak.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/web3-module/test_providers.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/web3-module/test_strict_bytes_type_checking.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/core/web3-module/test_web3_inheritance.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/ens/normalization/normalization_tests.json +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/ens/normalization/test_normalize_name_ensip15.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/ens/test_ens.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/ens/test_get_registry.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/ens/test_get_text.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/ens/test_nameprep.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/ens/test_offchain_resolution.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/ens/test_setup_address.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/ens/test_setup_name.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/ens/test_utils.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/ens/test_wildcard_resolution.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/integration/.DS_Store +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/integration/README.md +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/integration/common.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/integration/go_ethereum/__init__.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/integration/go_ethereum/test_goethereum_http.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/integration/go_ethereum/test_goethereum_ipc.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/integration/go_ethereum/test_goethereum_ws/__init__.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/integration/go_ethereum/test_goethereum_ws/test_async_await_w3.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/integration/go_ethereum/test_goethereum_ws/test_async_ctx_manager_w3.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/integration/go_ethereum/test_goethereum_ws/test_async_iterator_w3.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/integration/go_ethereum/utils.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/tests/utils.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/__init__.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/abi.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/async_caching.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/async_transactions.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/batching.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/blocks.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/caching.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/compat/__init__.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/contract_sources/__init__.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/contract_sources/compile_contracts.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/contract_sources/contract_data/__init__.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/contract_sources/contract_data/_custom_contract_data.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/contracts.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/datatypes.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/decorators.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/empty.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/encoding.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/ens.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/error_formatters_utils.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/events.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/fee_utils.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/filters.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/formatters.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/function_identifiers.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/hypothesis.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/math.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/module.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/module_testing/__init__.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/module_testing/go_ethereum_admin_module.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/module_testing/go_ethereum_txpool_module.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/module_testing/net_module.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/module_testing/utils.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/module_testing/web3_module.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/normalizers.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/threads.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/transactions.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/type_conversion.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/utility_methods.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/validation.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/_utils/windows.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/auto/__init__.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/auto/gethdev.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/beacon/api_endpoints.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/constants.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/contract/async_contract.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/contract/contract.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/contract/utils.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/datastructures.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/eth/base_eth.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/gas_strategies/__init__.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/gas_strategies/rpc.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/gas_strategies/time_based.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/geth.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/logs.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/main.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/method.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/middleware/attrdict.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/middleware/base.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/middleware/buffered_gas_estimate.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/middleware/filter.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/middleware/formatting.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/middleware/gas_price_strategy.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/middleware/names.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/middleware/proof_of_authority.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/middleware/pythonic.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/middleware/signing.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/middleware/stalecheck.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/middleware/validation.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/net.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/providers/async_base.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/providers/auto.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/providers/base.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/providers/eth_tester/main.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/providers/ipc.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/providers/legacy_websocket.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/providers/persistent/request_processor.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/providers/persistent/utils.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/py.typed +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/scripts/__init__.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/scripts/release/__init__.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/scripts/release/test_package.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/testing.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/tools/benchmark/__init__.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/tools/benchmark/reporting.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/tools/benchmark/utils.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/tracing.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/types.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/utils/abi.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3/utils/address.py +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3.egg-info/dependency_links.txt +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3.egg-info/not-zip-safe +0 -0
- {web3-7.0.0b6 → web3-7.0.0b8}/web3.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: web3
|
|
3
|
-
Version: 7.0.
|
|
3
|
+
Version: 7.0.0b8
|
|
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
|
|
@@ -51,8 +51,9 @@ Requires-Dist: sphinx>=6.0.0; extra == "dev"
|
|
|
51
51
|
Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "dev"
|
|
52
52
|
Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "dev"
|
|
53
53
|
Requires-Dist: towncrier<22,>=21; extra == "dev"
|
|
54
|
-
Requires-Dist: eth-
|
|
55
|
-
Requires-Dist: py-
|
|
54
|
+
Requires-Dist: eth-account>=0.13.0; extra == "dev"
|
|
55
|
+
Requires-Dist: eth-tester[py-evm]<0.13.0b1,>=0.11.0b1; extra == "dev"
|
|
56
|
+
Requires-Dist: py-geth>=5.0.0b1; extra == "dev"
|
|
56
57
|
Requires-Dist: pytest-asyncio<0.23,>=0.18.1; extra == "dev"
|
|
57
58
|
Requires-Dist: pytest-mock>=1.10; extra == "dev"
|
|
58
59
|
Requires-Dist: pytest-xdist>=2.4.0; extra == "dev"
|
|
@@ -62,9 +63,10 @@ Requires-Dist: sphinx>=6.0.0; extra == "docs"
|
|
|
62
63
|
Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "docs"
|
|
63
64
|
Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "docs"
|
|
64
65
|
Requires-Dist: towncrier<22,>=21; extra == "docs"
|
|
66
|
+
Requires-Dist: eth-account>=0.13.0; extra == "docs"
|
|
65
67
|
Provides-Extra: test
|
|
66
|
-
Requires-Dist: eth-tester[py-evm]<0.
|
|
67
|
-
Requires-Dist: py-geth>=
|
|
68
|
+
Requires-Dist: eth-tester[py-evm]<0.13.0b1,>=0.11.0b1; extra == "test"
|
|
69
|
+
Requires-Dist: py-geth>=5.0.0b1; extra == "test"
|
|
68
70
|
Requires-Dist: pytest-asyncio<0.23,>=0.18.1; extra == "test"
|
|
69
71
|
Requires-Dist: pytest-mock>=1.10; extra == "test"
|
|
70
72
|
Requires-Dist: pytest-xdist>=2.4.0; extra == "test"
|
|
@@ -78,7 +80,9 @@ Requires-Dist: pytest>=7.0.0; extra == "test"
|
|
|
78
80
|
[](https://pypi.python.org/pypi/web3)
|
|
79
81
|
[](https://web3py.readthedocs.io/en/latest/?badge=latest)
|
|
80
82
|
|
|
81
|
-
A Python
|
|
83
|
+
## A Python Library for Interacting with Ethereum
|
|
84
|
+
|
|
85
|
+
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.
|
|
82
86
|
|
|
83
87
|
- Python 3.8+ support
|
|
84
88
|
|
|
@@ -93,7 +97,7 @@ ______________________________________________________________________
|
|
|
93
97
|
|
|
94
98
|
For additional guides, examples, and APIs, see the [documentation](https://web3py.readthedocs.io/en/latest/).
|
|
95
99
|
|
|
96
|
-
## Want to
|
|
100
|
+
## Want to Help?
|
|
97
101
|
|
|
98
102
|
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our
|
|
99
103
|
guidelines for [contributing](https://web3py.readthedocs.io/en/latest/contributing.html),
|
|
@@ -102,4 +106,6 @@ then check out issues that are labeled
|
|
|
102
106
|
|
|
103
107
|
______________________________________________________________________
|
|
104
108
|
|
|
105
|
-
|
|
109
|
+
## Questions on Implementation or Usage?
|
|
110
|
+
|
|
111
|
+
Join the conversation in the Ethereum Python Community [Discord](https://discord.gg/GHryRvPB84).
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
[](https://pypi.python.org/pypi/web3)
|
|
7
7
|
[](https://web3py.readthedocs.io/en/latest/?badge=latest)
|
|
8
8
|
|
|
9
|
-
A Python
|
|
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.
|
|
10
12
|
|
|
11
13
|
- Python 3.8+ support
|
|
12
14
|
|
|
@@ -21,7 +23,7 @@ ______________________________________________________________________
|
|
|
21
23
|
|
|
22
24
|
For additional guides, examples, and APIs, see the [documentation](https://web3py.readthedocs.io/en/latest/).
|
|
23
25
|
|
|
24
|
-
## Want to
|
|
26
|
+
## Want to Help?
|
|
25
27
|
|
|
26
28
|
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our
|
|
27
29
|
guidelines for [contributing](https://web3py.readthedocs.io/en/latest/contributing.html),
|
|
@@ -30,4 +32,6 @@ then check out issues that are labeled
|
|
|
30
32
|
|
|
31
33
|
______________________________________________________________________
|
|
32
34
|
|
|
33
|
-
|
|
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
|
+
]
|
|
@@ -25,10 +25,13 @@ extras_require = {
|
|
|
25
25
|
"sphinx-autobuild>=2021.3.14",
|
|
26
26
|
"sphinx_rtd_theme>=1.0.0",
|
|
27
27
|
"towncrier>=21,<22",
|
|
28
|
+
# web3 will work but emit warnings with eth-account>=0.12.2,
|
|
29
|
+
# but doctests fail between 0.12.2 and 0.13.0
|
|
30
|
+
"eth-account>=0.13.0",
|
|
28
31
|
],
|
|
29
32
|
"test": [
|
|
30
|
-
"eth-tester[py-evm]>=0.11.0b1,<0.
|
|
31
|
-
"py-geth>=
|
|
33
|
+
"eth-tester[py-evm]>=0.11.0b1,<0.13.0b1",
|
|
34
|
+
"py-geth>=5.0.0b1",
|
|
32
35
|
"pytest-asyncio>=0.18.1,<0.23",
|
|
33
36
|
"pytest-mock>=1.10",
|
|
34
37
|
"pytest-xdist>=2.4.0",
|
|
@@ -48,7 +51,7 @@ with open("./README.md") as readme:
|
|
|
48
51
|
setup(
|
|
49
52
|
name="web3",
|
|
50
53
|
# *IMPORTANT*: Don't manually change the version here. Use `make bump`, as described in readme
|
|
51
|
-
version="7.0.0-beta.
|
|
54
|
+
version="7.0.0-beta.8",
|
|
52
55
|
description="""web3: A Python library for interacting with Ethereum""",
|
|
53
56
|
long_description=long_description,
|
|
54
57
|
long_description_content_type="text/markdown",
|
|
@@ -3,17 +3,14 @@ from random import (
|
|
|
3
3
|
randint,
|
|
4
4
|
)
|
|
5
5
|
|
|
6
|
+
from aiohttp.client_exceptions import (
|
|
7
|
+
InvalidURL,
|
|
8
|
+
)
|
|
6
9
|
import pytest_asyncio
|
|
7
10
|
|
|
8
|
-
from web3._utils.request import (
|
|
9
|
-
_async_session_cache,
|
|
10
|
-
)
|
|
11
11
|
from web3.beacon import (
|
|
12
12
|
AsyncBeacon,
|
|
13
13
|
)
|
|
14
|
-
from web3.exceptions import (
|
|
15
|
-
Web3ValueError,
|
|
16
|
-
)
|
|
17
14
|
|
|
18
15
|
# tested against lighthouse which uses port 5052 by default
|
|
19
16
|
BASE_URL = "http://localhost:5052"
|
|
@@ -27,20 +24,22 @@ def _assert_valid_response(response):
|
|
|
27
24
|
|
|
28
25
|
@pytest.fixture
|
|
29
26
|
def async_beacon():
|
|
30
|
-
return AsyncBeacon(base_url=BASE_URL)
|
|
27
|
+
return AsyncBeacon(base_url=BASE_URL, request_timeout=30.0)
|
|
31
28
|
|
|
32
29
|
|
|
33
30
|
@pytest_asyncio.fixture(autouse=True)
|
|
34
|
-
async def _cleanup():
|
|
31
|
+
async def _cleanup(async_beacon):
|
|
35
32
|
yield
|
|
36
|
-
[
|
|
37
|
-
|
|
33
|
+
[
|
|
34
|
+
await session.close()
|
|
35
|
+
for _, session in async_beacon._request_session_manager.session_cache.items()
|
|
36
|
+
]
|
|
38
37
|
|
|
39
38
|
|
|
40
39
|
# sanity check to make sure the positive test cases are valid
|
|
41
40
|
@pytest.mark.asyncio
|
|
42
41
|
async def test_async_cl_beacon_raises_exception_on_invalid_url(async_beacon):
|
|
43
|
-
with pytest.raises(
|
|
42
|
+
with pytest.raises(InvalidURL):
|
|
44
43
|
await async_beacon._async_make_get_request(
|
|
45
44
|
BASE_URL + "/eth/v1/beacon/nonexistent"
|
|
46
45
|
)
|
|
@@ -6,16 +6,13 @@ from random import (
|
|
|
6
6
|
from requests import (
|
|
7
7
|
Timeout,
|
|
8
8
|
)
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
_session_cache,
|
|
9
|
+
from requests.exceptions import (
|
|
10
|
+
InvalidURL,
|
|
12
11
|
)
|
|
12
|
+
|
|
13
13
|
from web3.beacon import (
|
|
14
14
|
Beacon,
|
|
15
15
|
)
|
|
16
|
-
from web3.exceptions import (
|
|
17
|
-
Web3ValueError,
|
|
18
|
-
)
|
|
19
16
|
|
|
20
17
|
# tested against lighthouse which uses port 5052 by default
|
|
21
18
|
BASE_URL = "http://localhost:5052"
|
|
@@ -32,15 +29,9 @@ def beacon():
|
|
|
32
29
|
return Beacon(base_url=BASE_URL)
|
|
33
30
|
|
|
34
31
|
|
|
35
|
-
@pytest.fixture(autouse=True)
|
|
36
|
-
def _cleanup():
|
|
37
|
-
yield
|
|
38
|
-
_session_cache.clear()
|
|
39
|
-
|
|
40
|
-
|
|
41
32
|
# sanity check to make sure the positive test cases are valid
|
|
42
33
|
def test_cl_beacon_raises_exception_on_invalid_url(beacon):
|
|
43
|
-
with pytest.raises(
|
|
34
|
+
with pytest.raises(InvalidURL):
|
|
44
35
|
beacon._make_get_request(BASE_URL + "/eth/v1/beacon/nonexistent")
|
|
45
36
|
|
|
46
37
|
|
|
@@ -119,7 +119,8 @@ def module_many_init_args():
|
|
|
119
119
|
@pytest_asyncio.fixture
|
|
120
120
|
async def async_w3():
|
|
121
121
|
w3 = AsyncWeb3(AsyncEthereumTesterProvider())
|
|
122
|
-
|
|
122
|
+
accounts = await w3.eth.accounts
|
|
123
|
+
w3.eth.default_account = accounts[0]
|
|
123
124
|
return w3
|
|
124
125
|
|
|
125
126
|
|
|
@@ -127,5 +128,6 @@ async def async_w3():
|
|
|
127
128
|
async def async_w3_non_strict_abi():
|
|
128
129
|
w3 = AsyncWeb3(AsyncEthereumTesterProvider())
|
|
129
130
|
w3.strict_bytes_type_checking = False
|
|
130
|
-
|
|
131
|
+
accounts = await w3.eth.accounts
|
|
132
|
+
w3.eth.default_account = accounts[0]
|
|
131
133
|
return w3
|
|
@@ -230,9 +230,7 @@ def event_contract(
|
|
|
230
230
|
wait_for_block(w3)
|
|
231
231
|
|
|
232
232
|
event_contract_factory = w3.eth.contract(**EVENT_CONTRACT_DATA)
|
|
233
|
-
deploy_txn_hash = event_contract_factory.constructor().transact(
|
|
234
|
-
{"from": w3.eth.coinbase, "gas": 1000000}
|
|
235
|
-
)
|
|
233
|
+
deploy_txn_hash = event_contract_factory.constructor().transact({"gas": 1000000})
|
|
236
234
|
deploy_receipt = wait_for_transaction(w3, deploy_txn_hash)
|
|
237
235
|
contract_address = address_conversion_func(deploy_receipt["contractAddress"])
|
|
238
236
|
|
|
@@ -251,7 +249,7 @@ def indexed_event_contract(
|
|
|
251
249
|
|
|
252
250
|
indexed_event_contract_factory = w3.eth.contract(**INDEXED_EVENT_CONTRACT_DATA)
|
|
253
251
|
deploy_txn_hash = indexed_event_contract_factory.constructor().transact(
|
|
254
|
-
{"
|
|
252
|
+
{"gas": 1000000}
|
|
255
253
|
)
|
|
256
254
|
deploy_receipt = wait_for_transaction(w3, deploy_txn_hash)
|
|
257
255
|
contract_address = address_conversion_func(deploy_receipt["contractAddress"])
|
|
@@ -218,10 +218,10 @@ def test_contract_constructor_build_transaction_no_constructor(
|
|
|
218
218
|
w3, math_contract_factory, address_conversion_func
|
|
219
219
|
):
|
|
220
220
|
txn_hash = math_contract_factory.constructor().transact(
|
|
221
|
-
{"from": address_conversion_func(w3.eth.
|
|
221
|
+
{"from": address_conversion_func(w3.eth.default_account)}
|
|
222
222
|
)
|
|
223
223
|
txn = w3.eth.get_transaction(txn_hash)
|
|
224
|
-
nonce = w3.eth.get_transaction_count(w3.eth.
|
|
224
|
+
nonce = w3.eth.get_transaction_count(w3.eth.default_account)
|
|
225
225
|
unsent_txn = math_contract_factory.constructor().build_transaction({"nonce": nonce})
|
|
226
226
|
assert txn["input"] == HexBytes(unsent_txn["data"])
|
|
227
227
|
|
|
@@ -235,10 +235,10 @@ def test_contract_constructor_build_transaction_without_arguments(
|
|
|
235
235
|
w3, math_contract_factory, address_conversion_func
|
|
236
236
|
):
|
|
237
237
|
txn_hash = math_contract_factory.constructor().transact(
|
|
238
|
-
{"from": address_conversion_func(w3.eth.
|
|
238
|
+
{"from": address_conversion_func(w3.eth.default_account)}
|
|
239
239
|
)
|
|
240
240
|
txn = w3.eth.get_transaction(txn_hash)
|
|
241
|
-
nonce = w3.eth.get_transaction_count(w3.eth.
|
|
241
|
+
nonce = w3.eth.get_transaction_count(w3.eth.default_account)
|
|
242
242
|
unsent_txn = math_contract_factory.constructor().build_transaction({"nonce": nonce})
|
|
243
243
|
assert txn["input"] == HexBytes(unsent_txn["data"])
|
|
244
244
|
|
|
@@ -266,9 +266,11 @@ def test_contract_constructor_build_transaction_with_arguments(
|
|
|
266
266
|
):
|
|
267
267
|
txn_hash = non_strict_contract_with_constructor_args_factory.constructor(
|
|
268
268
|
*constructor_args, **constructor_kwargs
|
|
269
|
-
).transact({"from": address_conversion_func(w3_non_strict_abi.eth.
|
|
269
|
+
).transact({"from": address_conversion_func(w3_non_strict_abi.eth.default_account)})
|
|
270
270
|
txn = w3_non_strict_abi.eth.get_transaction(txn_hash)
|
|
271
|
-
nonce = w3_non_strict_abi.eth.get_transaction_count(
|
|
271
|
+
nonce = w3_non_strict_abi.eth.get_transaction_count(
|
|
272
|
+
w3_non_strict_abi.eth.default_account
|
|
273
|
+
)
|
|
272
274
|
unsent_txn = non_strict_contract_with_constructor_args_factory.constructor(
|
|
273
275
|
*constructor_args, **constructor_kwargs
|
|
274
276
|
).build_transaction({"nonce": nonce})
|
|
@@ -521,13 +523,11 @@ async def test_async_contract_constructor_build_transaction_to_field_error(
|
|
|
521
523
|
async def test_async_contract_constructor_build_transaction_no_constructor(
|
|
522
524
|
async_w3, async_math_contract_factory, address_conversion_func
|
|
523
525
|
):
|
|
524
|
-
async_w3_accounts = await async_w3.eth.accounts
|
|
525
526
|
txn_hash = await async_math_contract_factory.constructor().transact(
|
|
526
|
-
{"from": address_conversion_func(
|
|
527
|
+
{"from": address_conversion_func(async_w3.eth.default_account)}
|
|
527
528
|
)
|
|
528
529
|
txn = await async_w3.eth.get_transaction(txn_hash)
|
|
529
|
-
|
|
530
|
-
nonce = await async_w3.eth.get_transaction_count(async_w3_coinbase)
|
|
530
|
+
nonce = await async_w3.eth.get_transaction_count(async_w3.eth.default_account)
|
|
531
531
|
unsent_txn = await async_math_contract_factory.constructor().build_transaction(
|
|
532
532
|
{"nonce": nonce}
|
|
533
533
|
)
|
|
@@ -543,13 +543,11 @@ async def test_async_contract_constructor_build_transaction_no_constructor(
|
|
|
543
543
|
async def test_async_contract_constructor_build_transaction_without_arguments(
|
|
544
544
|
async_w3, async_math_contract_factory, address_conversion_func
|
|
545
545
|
):
|
|
546
|
-
async_w3_accounts = await async_w3.eth.accounts
|
|
547
546
|
txn_hash = await async_math_contract_factory.constructor().transact(
|
|
548
|
-
{"from": address_conversion_func(
|
|
547
|
+
{"from": address_conversion_func(async_w3.eth.default_account)}
|
|
549
548
|
)
|
|
550
549
|
txn = await async_w3.eth.get_transaction(txn_hash)
|
|
551
|
-
|
|
552
|
-
nonce = await async_w3.eth.get_transaction_count(async_w3_coinbase)
|
|
550
|
+
nonce = await async_w3.eth.get_transaction_count(async_w3.eth.default_account)
|
|
553
551
|
unsent_txn = await async_math_contract_factory.constructor().build_transaction(
|
|
554
552
|
{"nonce": nonce}
|
|
555
553
|
)
|
|
@@ -578,15 +576,21 @@ async def test_async_contract_constructor_build_transaction_with_arguments(
|
|
|
578
576
|
constructor_kwargs,
|
|
579
577
|
address_conversion_func,
|
|
580
578
|
):
|
|
581
|
-
async_w3_accounts = await async_w3_non_strict_abi.eth.accounts
|
|
582
579
|
txn_hash = (
|
|
583
580
|
await async_non_strict_constructor_with_args_contract_factory.constructor(
|
|
584
581
|
*constructor_args, **constructor_kwargs
|
|
585
|
-
).transact(
|
|
582
|
+
).transact(
|
|
583
|
+
{
|
|
584
|
+
"from": address_conversion_func(
|
|
585
|
+
async_w3_non_strict_abi.eth.default_account
|
|
586
|
+
)
|
|
587
|
+
}
|
|
588
|
+
)
|
|
586
589
|
)
|
|
587
590
|
txn = await async_w3_non_strict_abi.eth.get_transaction(txn_hash)
|
|
588
|
-
|
|
589
|
-
|
|
591
|
+
nonce = await async_w3_non_strict_abi.eth.get_transaction_count(
|
|
592
|
+
async_w3_non_strict_abi.eth.default_account
|
|
593
|
+
)
|
|
590
594
|
unsent_txn = (
|
|
591
595
|
await async_non_strict_constructor_with_args_contract_factory.constructor(
|
|
592
596
|
*constructor_args, **constructor_kwargs
|
|
@@ -120,7 +120,8 @@ def async_eth_tester():
|
|
|
120
120
|
@pytest_asyncio.fixture()
|
|
121
121
|
async def async_w3():
|
|
122
122
|
async_w3 = AsyncWeb3(AsyncEthereumTesterProvider())
|
|
123
|
-
|
|
123
|
+
accounts = await async_w3.eth.accounts
|
|
124
|
+
async_w3.eth.default_account = accounts[0]
|
|
124
125
|
return async_w3
|
|
125
126
|
|
|
126
127
|
|
|
@@ -148,9 +149,6 @@ async def async_foo_contract(async_w3):
|
|
|
148
149
|
#
|
|
149
150
|
# }
|
|
150
151
|
|
|
151
|
-
async_eth_tester_accounts = await async_w3.eth.accounts
|
|
152
|
-
deploy_address = async_eth_tester_accounts[0]
|
|
153
|
-
|
|
154
152
|
abi = """[{"anonymous":false,"inputs":[{"indexed":false,"name":"_bar","type":"string"}],"name":"barred","type":"event"},{"constant":false,"inputs":[{"name":"_bar","type":"string"}],"name":"setBar","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"constant":true,"inputs":[],"name":"bar","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"}]""" # noqa: E501
|
|
155
153
|
# This bytecode is the output of compiling with
|
|
156
154
|
# solc version:0.5.3+commit.10d17f24.Emscripten.clang
|
|
@@ -161,13 +159,13 @@ async def async_foo_contract(async_w3):
|
|
|
161
159
|
# issue a transaction to deploy the contract.
|
|
162
160
|
tx_hash = await FooContract.constructor().transact(
|
|
163
161
|
{
|
|
164
|
-
"from":
|
|
162
|
+
"from": async_w3.eth.default_account,
|
|
165
163
|
}
|
|
166
164
|
)
|
|
167
165
|
# wait for the transaction to be mined
|
|
168
166
|
tx_receipt = await async_w3.eth.wait_for_transaction_receipt(tx_hash, 180)
|
|
169
167
|
# instantiate and return an instance of our contract.
|
|
170
|
-
return FooContract(tx_receipt
|
|
168
|
+
return FooContract(tx_receipt["contractAddress"])
|
|
171
169
|
|
|
172
170
|
|
|
173
171
|
@pytest.mark.asyncio
|
|
@@ -178,13 +176,11 @@ async def test_async_initial_greeting(async_foo_contract):
|
|
|
178
176
|
|
|
179
177
|
@pytest.mark.asyncio
|
|
180
178
|
async def test_async_can_update_greeting(async_w3, async_foo_contract):
|
|
181
|
-
async_eth_tester_accounts = await async_w3.eth.accounts
|
|
182
|
-
# send transaction that updates the greeting
|
|
183
179
|
tx_hash = await async_foo_contract.functions.setBar(
|
|
184
180
|
"testing contracts is easy",
|
|
185
181
|
).transact(
|
|
186
182
|
{
|
|
187
|
-
"from":
|
|
183
|
+
"from": async_w3.eth.default_account,
|
|
188
184
|
}
|
|
189
185
|
)
|
|
190
186
|
await async_w3.eth.wait_for_transaction_receipt(tx_hash, 180)
|
|
@@ -196,13 +192,12 @@ async def test_async_can_update_greeting(async_w3, async_foo_contract):
|
|
|
196
192
|
|
|
197
193
|
@pytest.mark.asyncio
|
|
198
194
|
async def test_async_updating_greeting_emits_event(async_w3, async_foo_contract):
|
|
199
|
-
async_eth_tester_accounts = await async_w3.eth.accounts
|
|
200
195
|
# send transaction that updates the greeting
|
|
201
196
|
tx_hash = await async_foo_contract.functions.setBar(
|
|
202
197
|
"testing contracts is easy",
|
|
203
198
|
).transact(
|
|
204
199
|
{
|
|
205
|
-
"from":
|
|
200
|
+
"from": async_w3.eth.default_account,
|
|
206
201
|
}
|
|
207
202
|
)
|
|
208
203
|
receipt = await async_w3.eth.wait_for_transaction_receipt(tx_hash, 180)
|
|
@@ -13,7 +13,9 @@ from web3.exceptions import (
|
|
|
13
13
|
@pytest.fixture()
|
|
14
14
|
def math_addr(math_contract_factory, address_conversion_func):
|
|
15
15
|
w3 = math_contract_factory.w3
|
|
16
|
-
deploy_txn = math_contract_factory.constructor().transact(
|
|
16
|
+
deploy_txn = math_contract_factory.constructor().transact(
|
|
17
|
+
{"from": w3.eth.default_account}
|
|
18
|
+
)
|
|
17
19
|
deploy_receipt = w3.eth.wait_for_transaction_receipt(deploy_txn)
|
|
18
20
|
assert deploy_receipt is not None
|
|
19
21
|
return address_conversion_func(deploy_receipt["contractAddress"])
|
|
@@ -28,7 +30,7 @@ def test_contract_with_unset_address(math_contract_factory):
|
|
|
28
30
|
def test_contract_with_name_address(math_contract_factory, math_addr):
|
|
29
31
|
with contract_ens_addresses(math_contract_factory, [("thedao.eth", math_addr)]):
|
|
30
32
|
mc = math_contract_factory(address="thedao.eth")
|
|
31
|
-
caller = mc.w3.eth.
|
|
33
|
+
caller = mc.w3.eth.default_account
|
|
32
34
|
assert mc.address == "thedao.eth"
|
|
33
35
|
assert mc.functions.return13().call({"from": caller}) == 13
|
|
34
36
|
|
|
@@ -48,9 +50,8 @@ def test_contract_with_name_address_from_eth_contract(
|
|
|
48
50
|
bytecode_runtime=math_contract_runtime,
|
|
49
51
|
)
|
|
50
52
|
|
|
51
|
-
caller = mc.w3.eth.coinbase
|
|
52
53
|
assert mc.address == "thedao.eth"
|
|
53
|
-
assert mc.functions.return13().call({"from":
|
|
54
|
+
assert mc.functions.return13().call({"from": mc.w3.eth.default_account}) == 13
|
|
54
55
|
|
|
55
56
|
|
|
56
57
|
def test_contract_with_name_address_changing(math_contract_factory, math_addr):
|
|
@@ -58,7 +59,7 @@ def test_contract_with_name_address_changing(math_contract_factory, math_addr):
|
|
|
58
59
|
with contract_ens_addresses(math_contract_factory, [("thedao.eth", math_addr)]):
|
|
59
60
|
mc = math_contract_factory(address="thedao.eth")
|
|
60
61
|
|
|
61
|
-
caller = mc.w3.eth.
|
|
62
|
+
caller = mc.w3.eth.default_account
|
|
62
63
|
assert mc.address == "thedao.eth"
|
|
63
64
|
|
|
64
65
|
# what happens when name returns no address at all
|
|
@@ -89,7 +89,7 @@ def test_transacting_with_contract_with_arguments(
|
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
def test_deploy_when_default_account_is_set(w3, string_contract_data):
|
|
92
|
-
|
|
92
|
+
# default account for tests is set as the first account
|
|
93
93
|
assert w3.eth.default_account is not empty
|
|
94
94
|
|
|
95
95
|
StringContract = w3.eth.contract(**string_contract_data)
|
|
@@ -101,7 +101,7 @@ def test_deploy_when_default_account_is_set(w3, string_contract_data):
|
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
def test_transact_when_default_account_is_set(w3, math_contract, transact):
|
|
104
|
-
|
|
104
|
+
# default account for tests is set as the first account
|
|
105
105
|
assert w3.eth.default_account is not empty
|
|
106
106
|
|
|
107
107
|
txn_hash = transact(contract=math_contract, contract_function="incrementCounter")
|
|
@@ -392,8 +392,7 @@ async def test_async_transacting_with_contract_with_arguments(
|
|
|
392
392
|
|
|
393
393
|
@pytest.mark.asyncio
|
|
394
394
|
async def test_async_deploy_when_default_account_is_set(async_w3, string_contract_data):
|
|
395
|
-
|
|
396
|
-
async_w3.eth.default_account = async_w3_accounts[1]
|
|
395
|
+
# default account for tests is set as the first account
|
|
397
396
|
assert async_w3.eth.default_account is not empty
|
|
398
397
|
|
|
399
398
|
StringContract = async_w3.eth.contract(**string_contract_data)
|
|
@@ -408,8 +407,7 @@ async def test_async_deploy_when_default_account_is_set(async_w3, string_contrac
|
|
|
408
407
|
async def test_async_transact_when_default_account_is_set(
|
|
409
408
|
async_w3, async_math_contract, async_transact
|
|
410
409
|
):
|
|
411
|
-
|
|
412
|
-
async_w3.eth.default_account = async_w3_accounts[1]
|
|
410
|
+
# default account for tests is set as the first account
|
|
413
411
|
assert async_w3.eth.default_account is not empty
|
|
414
412
|
|
|
415
413
|
txn_hash = await async_transact(
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import copy
|
|
1
2
|
import pytest
|
|
2
3
|
import re
|
|
3
4
|
|
|
5
|
+
from eth_abi.exceptions import (
|
|
6
|
+
InsufficientDataBytes,
|
|
7
|
+
)
|
|
4
8
|
from eth_utils import (
|
|
5
9
|
is_same_address,
|
|
6
10
|
)
|
|
@@ -1233,3 +1237,29 @@ def test_get_all_entries_with_nested_tuple_event_non_strict(
|
|
|
1233
1237
|
assert log_entry.blockNumber == txn_receipt["blockNumber"]
|
|
1234
1238
|
assert log_entry.transactionIndex == txn_receipt["transactionIndex"]
|
|
1235
1239
|
assert is_same_address(log_entry.address, non_strict_emitter.address)
|
|
1240
|
+
|
|
1241
|
+
|
|
1242
|
+
def test_receipt_processing_catches_insufficientdatabytes_error_by_default(
|
|
1243
|
+
w3, emitter, wait_for_transaction
|
|
1244
|
+
):
|
|
1245
|
+
txn_hash = emitter.functions.logListArgs([b"13"], [b"54"]).transact()
|
|
1246
|
+
txn_receipt = wait_for_transaction(w3, txn_hash)
|
|
1247
|
+
event_instance = emitter.events.LogListArgs()
|
|
1248
|
+
|
|
1249
|
+
# web3 doesn't generate logs with non-standard lengths, so we have to do it manually
|
|
1250
|
+
txn_receipt_dict = copy.deepcopy(txn_receipt)
|
|
1251
|
+
txn_receipt_dict["logs"][0] = dict(txn_receipt_dict["logs"][0])
|
|
1252
|
+
txn_receipt_dict["logs"][0]["data"] = txn_receipt_dict["logs"][0]["data"][:-8]
|
|
1253
|
+
|
|
1254
|
+
# WARN is default
|
|
1255
|
+
assert len(event_instance.process_receipt(txn_receipt_dict)) == 0
|
|
1256
|
+
assert len(event_instance.process_receipt(txn_receipt_dict, errors=WARN)) == 0
|
|
1257
|
+
assert len(event_instance.process_receipt(txn_receipt_dict, errors=DISCARD)) == 0
|
|
1258
|
+
|
|
1259
|
+
# IGNORE includes the InsufficientDataBytes error in the log
|
|
1260
|
+
assert len(event_instance.process_receipt(txn_receipt_dict, errors=IGNORE)) == 1
|
|
1261
|
+
|
|
1262
|
+
# STRICT raises an error to be caught
|
|
1263
|
+
with pytest.raises(InsufficientDataBytes):
|
|
1264
|
+
returned_log = event_instance.process_receipt(txn_receipt_dict, errors=STRICT)
|
|
1265
|
+
assert len(returned_log) == 0
|
|
@@ -27,6 +27,9 @@ from web3 import (
|
|
|
27
27
|
AsyncWeb3,
|
|
28
28
|
Web3,
|
|
29
29
|
)
|
|
30
|
+
from web3._utils.empty import (
|
|
31
|
+
Empty,
|
|
32
|
+
)
|
|
30
33
|
from web3.eth import (
|
|
31
34
|
BaseEth,
|
|
32
35
|
)
|
|
@@ -100,6 +103,10 @@ def w3():
|
|
|
100
103
|
return Web3(EthereumTesterProvider())
|
|
101
104
|
|
|
102
105
|
|
|
106
|
+
def test_eth_default_account_is_empty_by_default(w3):
|
|
107
|
+
assert isinstance(w3.eth.default_account, Empty)
|
|
108
|
+
|
|
109
|
+
|
|
103
110
|
def test_eth_account_create_variation(acct):
|
|
104
111
|
account1 = acct.create()
|
|
105
112
|
account2 = acct.create()
|
|
@@ -132,7 +139,7 @@ def test_eth_account_from_key_seed_restrictions(acct):
|
|
|
132
139
|
|
|
133
140
|
def test_eth_account_from_key_properties(acct, PRIVATE_BYTES):
|
|
134
141
|
account = acct.from_key(PRIVATE_BYTES)
|
|
135
|
-
assert callable(account.
|
|
142
|
+
assert callable(account.unsafe_sign_hash)
|
|
136
143
|
assert callable(account.sign_transaction)
|
|
137
144
|
assert is_checksum_address(account.address)
|
|
138
145
|
assert account.address == "0xa79F6f349C853F9Ea0B29636779ae3Cb4E3BA729"
|
|
@@ -141,7 +148,7 @@ def test_eth_account_from_key_properties(acct, PRIVATE_BYTES):
|
|
|
141
148
|
|
|
142
149
|
def test_eth_account_create_properties(acct):
|
|
143
150
|
account = acct.create()
|
|
144
|
-
assert callable(account.
|
|
151
|
+
assert callable(account.unsafe_sign_hash)
|
|
145
152
|
assert callable(account.sign_transaction)
|
|
146
153
|
assert is_checksum_address(account.address)
|
|
147
154
|
assert isinstance(account.key, bytes) and len(account.key) == 32
|
|
@@ -7,6 +7,8 @@ def wait_for_first_block(w3, wait_for_block):
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
def test_uses_default_account_when_set(w3, wait_for_transaction):
|
|
10
|
+
current_default = w3.eth.default_account
|
|
11
|
+
|
|
10
12
|
w3.eth.default_account = None
|
|
11
13
|
assert w3.eth.default_account is None
|
|
12
14
|
|
|
@@ -25,6 +27,8 @@ def test_uses_default_account_when_set(w3, wait_for_transaction):
|
|
|
25
27
|
txn = w3.eth.get_transaction(txn_hash)
|
|
26
28
|
assert txn["from"] == w3.eth.accounts[3]
|
|
27
29
|
|
|
30
|
+
w3.eth.default_account = current_default
|
|
31
|
+
|
|
28
32
|
|
|
29
33
|
def test_uses_given_from_address_when_provided(w3, wait_for_transaction):
|
|
30
34
|
w3.eth.default_account = w3.eth.accounts[3]
|
|
@@ -184,7 +184,7 @@ def test_unmined_transaction_wait_for_receipt(w3, request_mocker):
|
|
|
184
184
|
|
|
185
185
|
txn_hash = w3.eth.send_transaction(
|
|
186
186
|
{
|
|
187
|
-
"from": w3.eth.
|
|
187
|
+
"from": w3.eth.default_account,
|
|
188
188
|
"to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
|
|
189
189
|
"value": 123457,
|
|
190
190
|
}
|
|
@@ -318,12 +318,8 @@ def test_get_transaction_formatters(w3, request_mocker):
|
|
|
318
318
|
{
|
|
319
319
|
"address": checksummed_addr,
|
|
320
320
|
"storageKeys": [
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
),
|
|
324
|
-
HexBytes(
|
|
325
|
-
"0x0000000000000000000000000000000000000000000000000000000000000036" # noqa: E501
|
|
326
|
-
),
|
|
321
|
+
"0x0000000000000000000000000000000000000000000000000000000000000032", # noqa: E501
|
|
322
|
+
"0x0000000000000000000000000000000000000000000000000000000000000036", # noqa: E501
|
|
327
323
|
],
|
|
328
324
|
}
|
|
329
325
|
),
|
|
@@ -64,13 +64,13 @@ def create_filter(request):
|
|
|
64
64
|
# --- async --- #
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
@
|
|
67
|
+
@pytest_asyncio.fixture(
|
|
68
68
|
scope="function",
|
|
69
69
|
params=[True, False],
|
|
70
70
|
ids=["LocalFilterMiddleware", "node_based_filter"],
|
|
71
71
|
)
|
|
72
|
-
def async_w3(request):
|
|
73
|
-
return _async_w3_fixture_logic(request)
|
|
72
|
+
async def async_w3(request):
|
|
73
|
+
return await _async_w3_fixture_logic(request)
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
@pytest.fixture
|
|
@@ -279,13 +279,13 @@ def event_loop():
|
|
|
279
279
|
loop.close()
|
|
280
280
|
|
|
281
281
|
|
|
282
|
-
@
|
|
282
|
+
@pytest_asyncio.fixture(
|
|
283
283
|
scope="module",
|
|
284
284
|
params=[True, False],
|
|
285
285
|
ids=["LocalFilterMiddleware", "node_based_filter"],
|
|
286
286
|
)
|
|
287
|
-
def async_w3(request):
|
|
288
|
-
return _async_w3_fixture_logic(request)
|
|
287
|
+
async def async_w3(request):
|
|
288
|
+
return await _async_w3_fixture_logic(request)
|
|
289
289
|
|
|
290
290
|
|
|
291
291
|
@pytest.fixture(scope="module")
|