web3 6.15.1__tar.gz → 7.0.0b2__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-6.15.1 → web3-7.0.0b2}/MANIFEST.in +0 -4
- {web3-6.15.1 → web3-7.0.0b2}/PKG-INFO +9 -18
- {web3-6.15.1 → web3-7.0.0b2}/README.md +1 -1
- {web3-6.15.1 → web3-7.0.0b2}/ens/_normalization.py +1 -14
- {web3-6.15.1 → web3-7.0.0b2}/ens/async_ens.py +7 -7
- {web3-6.15.1 → web3-7.0.0b2}/ens/ens.py +7 -5
- {web3-6.15.1 → web3-7.0.0b2}/ens/utils.py +28 -31
- {web3-6.15.1 → web3-7.0.0b2}/setup.py +7 -17
- {web3-6.15.1 → web3-7.0.0b2}/web3/__init__.py +10 -7
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/abi.py +9 -15
- web3-7.0.0b2/web3/_utils/caching.py +155 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contracts.py +0 -17
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/ens.py +2 -1
- web3-7.0.0b2/web3/_utils/http.py +6 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/method_formatters.py +26 -3
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/module_testing/eth_module.py +119 -127
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/module_testing/module_testing_utils.py +3 -15
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/module_testing/persistent_connection_provider.py +9 -9
- web3-7.0.0b2/web3/_utils/module_testing/utils.py +251 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/request.py +1 -1
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/rpc_abi.py +0 -10
- web3-7.0.0b2/web3/auto/gethdev.py +18 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/beacon/__init__.py +1 -1
- {web3-6.15.1 → web3-7.0.0b2}/web3/contract/async_contract.py +7 -10
- {web3-6.15.1 → web3-7.0.0b2}/web3/contract/base_contract.py +2 -3
- {web3-6.15.1 → web3-7.0.0b2}/web3/contract/contract.py +9 -6
- {web3-6.15.1 → web3-7.0.0b2}/web3/contract/utils.py +9 -5
- {web3-6.15.1 → web3-7.0.0b2}/web3/datastructures.py +58 -20
- {web3-6.15.1 → web3-7.0.0b2}/web3/eth/async_eth.py +17 -8
- {web3-6.15.1 → web3-7.0.0b2}/web3/eth/base_eth.py +35 -22
- {web3-6.15.1 → web3-7.0.0b2}/web3/eth/eth.py +12 -9
- {web3-6.15.1 → web3-7.0.0b2}/web3/geth.py +0 -25
- {web3-6.15.1 → web3-7.0.0b2}/web3/main.py +57 -119
- {web3-6.15.1 → web3-7.0.0b2}/web3/manager.py +43 -72
- web3-7.0.0b2/web3/middleware/__init__.py +94 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/middleware/attrdict.py +36 -49
- web3-7.0.0b2/web3/middleware/base.py +129 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/middleware/buffered_gas_estimate.py +20 -21
- {web3-6.15.1 → web3-7.0.0b2}/web3/middleware/filter.py +118 -100
- web3-7.0.0b2/web3/middleware/formatting.py +222 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/middleware/gas_price_strategy.py +20 -32
- {web3-6.15.1 → web3-7.0.0b2}/web3/middleware/names.py +25 -25
- web3-7.0.0b2/web3/middleware/proof_of_authority.py +68 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/middleware/pythonic.py +2 -2
- web3-7.0.0b2/web3/middleware/signing.py +215 -0
- web3-7.0.0b2/web3/middleware/stalecheck.py +92 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/middleware/validation.py +5 -13
- {web3-6.15.1 → web3-7.0.0b2}/web3/module.py +8 -4
- {web3-6.15.1 → web3-7.0.0b2}/web3/providers/__init__.py +6 -4
- {web3-6.15.1 → web3-7.0.0b2}/web3/providers/async_base.py +83 -37
- {web3-6.15.1 → web3-7.0.0b2}/web3/providers/auto.py +3 -3
- {web3-6.15.1 → web3-7.0.0b2}/web3/providers/base.py +51 -28
- {web3-6.15.1 → web3-7.0.0b2}/web3/providers/eth_tester/defaults.py +0 -9
- {web3-6.15.1 → web3-7.0.0b2}/web3/providers/eth_tester/main.py +60 -18
- {web3-6.15.1 → web3-7.0.0b2}/web3/providers/eth_tester/middleware.py +38 -56
- {web3-6.15.1 → web3-7.0.0b2}/web3/providers/ipc.py +12 -35
- web3-6.15.1/web3/providers/websocket/websocket.py → web3-7.0.0b2/web3/providers/legacy_websocket.py +6 -6
- web3-7.0.0b2/web3/providers/persistent/__init__.py +15 -0
- web3-7.0.0b2/web3/providers/persistent/async_ipc.py +215 -0
- web3-7.0.0b2/web3/providers/persistent/persistent.py +98 -0
- web3-6.15.1/web3/providers/websocket/websocket_connection.py → web3-7.0.0b2/web3/providers/persistent/persistent_connection.py +7 -7
- {web3-6.15.1/web3/providers/websocket → web3-7.0.0b2/web3/providers/persistent}/request_processor.py +28 -6
- web3-7.0.0b2/web3/providers/persistent/utils.py +43 -0
- web3-6.15.1/web3/providers/websocket/websocket_v2.py → web3-7.0.0b2/web3/providers/persistent/websocket.py +14 -47
- web3-7.0.0b2/web3/providers/rpc/__init__.py +6 -0
- {web3-6.15.1/web3/providers → web3-7.0.0b2/web3/providers/rpc}/async_rpc.py +46 -13
- {web3-6.15.1/web3/providers → web3-7.0.0b2/web3/providers/rpc}/rpc.py +60 -14
- web3-7.0.0b2/web3/providers/rpc/utils.py +104 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/types.py +6 -16
- {web3-6.15.1 → web3-7.0.0b2}/web3.egg-info/PKG-INFO +9 -18
- web3-7.0.0b2/web3.egg-info/SOURCES.txt +169 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3.egg-info/requires.txt +6 -15
- {web3-6.15.1 → web3-7.0.0b2}/web3.egg-info/top_level.txt +0 -1
- web3-6.15.1/ethpm/__init__.py +0 -20
- web3-6.15.1/ethpm/_utils/backend.py +0 -93
- web3-6.15.1/ethpm/_utils/cache.py +0 -44
- web3-6.15.1/ethpm/_utils/chains.py +0 -119
- web3-6.15.1/ethpm/_utils/contract.py +0 -35
- web3-6.15.1/ethpm/_utils/deployments.py +0 -145
- web3-6.15.1/ethpm/_utils/ipfs.py +0 -116
- web3-6.15.1/ethpm/_utils/protobuf/ipfs_file_pb2.py +0 -33
- web3-6.15.1/ethpm/_utils/registry.py +0 -29
- web3-6.15.1/ethpm/assets/ens/v3.json +0 -1
- web3-6.15.1/ethpm/assets/escrow/with_bytecode_v3.json +0 -1
- web3-6.15.1/ethpm/assets/ipfs_file.proto +0 -32
- web3-6.15.1/ethpm/assets/owned/output_v3.json +0 -1
- web3-6.15.1/ethpm/assets/owned/with_contract_type_v3.json +0 -1
- web3-6.15.1/ethpm/assets/registry/contracts/Authority.sol +0 -156
- web3-6.15.1/ethpm/assets/registry/contracts/IndexedOrderedSetLib.sol +0 -106
- web3-6.15.1/ethpm/assets/registry/contracts/PackageDB.sol +0 -225
- web3-6.15.1/ethpm/assets/registry/contracts/PackageRegistry.sol +0 -361
- web3-6.15.1/ethpm/assets/registry/contracts/PackageRegistryInterface.sol +0 -97
- web3-6.15.1/ethpm/assets/registry/contracts/ReleaseDB.sol +0 -309
- web3-6.15.1/ethpm/assets/registry/contracts/ReleaseValidator.sol +0 -152
- web3-6.15.1/ethpm/assets/registry/solc_input.json +0 -1
- web3-6.15.1/ethpm/assets/registry/solc_output.json +0 -1
- web3-6.15.1/ethpm/assets/registry/v3.json +0 -1
- web3-6.15.1/ethpm/assets/safe-math-lib/v3-strict-no-deployments.json +0 -1
- web3-6.15.1/ethpm/assets/simple-registry/contracts/Ownable.sol +0 -63
- web3-6.15.1/ethpm/assets/simple-registry/contracts/PackageRegistry.sol +0 -373
- web3-6.15.1/ethpm/assets/simple-registry/contracts/PackageRegistryInterface.sol +0 -96
- web3-6.15.1/ethpm/assets/simple-registry/solc_input.json +0 -33
- web3-6.15.1/ethpm/assets/simple-registry/solc_output.json +0 -1
- web3-6.15.1/ethpm/assets/simple-registry/v3.json +0 -1
- web3-6.15.1/ethpm/assets/standard-token/output_v3.json +0 -1
- web3-6.15.1/ethpm/assets/standard-token/with_bytecode_v3.json +0 -1
- web3-6.15.1/ethpm/assets/vyper_registry/0.1.0.json +0 -1
- web3-6.15.1/ethpm/assets/vyper_registry/registry.vy +0 -216
- web3-6.15.1/ethpm/assets/vyper_registry/registry_with_delete.vy +0 -244
- web3-6.15.1/ethpm/backends/base.py +0 -43
- web3-6.15.1/ethpm/backends/http.py +0 -108
- web3-6.15.1/ethpm/backends/ipfs.py +0 -219
- web3-6.15.1/ethpm/backends/registry.py +0 -154
- web3-6.15.1/ethpm/constants.py +0 -17
- web3-6.15.1/ethpm/contract.py +0 -187
- web3-6.15.1/ethpm/dependencies.py +0 -58
- web3-6.15.1/ethpm/deployments.py +0 -80
- web3-6.15.1/ethpm/ethpm-spec/examples/escrow/1.0.0-pretty.json +0 -146
- web3-6.15.1/ethpm/ethpm-spec/examples/escrow/1.0.0.json +0 -1
- web3-6.15.1/ethpm/ethpm-spec/examples/escrow/contracts/Escrow.sol +0 -32
- web3-6.15.1/ethpm/ethpm-spec/examples/escrow/contracts/SafeSendLib.sol +0 -20
- web3-6.15.1/ethpm/ethpm-spec/examples/escrow/v3-pretty.json +0 -171
- web3-6.15.1/ethpm/ethpm-spec/examples/escrow/v3.json +0 -1
- web3-6.15.1/ethpm/ethpm-spec/examples/owned/1.0.0-pretty.json +0 -21
- web3-6.15.1/ethpm/ethpm-spec/examples/owned/1.0.0.json +0 -1
- web3-6.15.1/ethpm/ethpm-spec/examples/owned/contracts/Owned.sol +0 -12
- web3-6.15.1/ethpm/ethpm-spec/examples/owned/v3-pretty.json +0 -27
- web3-6.15.1/ethpm/ethpm-spec/examples/owned/v3.json +0 -1
- web3-6.15.1/ethpm/ethpm-spec/examples/piper-coin/1.0.0-pretty.json +0 -31
- web3-6.15.1/ethpm/ethpm-spec/examples/piper-coin/1.0.0.json +0 -1
- web3-6.15.1/ethpm/ethpm-spec/examples/piper-coin/v3-pretty.json +0 -21
- web3-6.15.1/ethpm/ethpm-spec/examples/piper-coin/v3.json +0 -1
- web3-6.15.1/ethpm/ethpm-spec/examples/safe-math-lib/1.0.0-pretty.json +0 -85
- web3-6.15.1/ethpm/ethpm-spec/examples/safe-math-lib/1.0.0.json +0 -1
- web3-6.15.1/ethpm/ethpm-spec/examples/safe-math-lib/contracts/SafeMathLib.sol +0 -24
- web3-6.15.1/ethpm/ethpm-spec/examples/safe-math-lib/v3-pretty.json +0 -117
- web3-6.15.1/ethpm/ethpm-spec/examples/safe-math-lib/v3.json +0 -1
- web3-6.15.1/ethpm/ethpm-spec/examples/standard-token/1.0.0-pretty.json +0 -55
- web3-6.15.1/ethpm/ethpm-spec/examples/standard-token/1.0.0.json +0 -1
- web3-6.15.1/ethpm/ethpm-spec/examples/standard-token/contracts/AbstractToken.sol +0 -20
- web3-6.15.1/ethpm/ethpm-spec/examples/standard-token/contracts/StandardToken.sol +0 -84
- web3-6.15.1/ethpm/ethpm-spec/examples/standard-token/v3-pretty.json +0 -460
- web3-6.15.1/ethpm/ethpm-spec/examples/standard-token/v3.json +0 -1
- web3-6.15.1/ethpm/ethpm-spec/examples/transferable/1.0.0-pretty.json +0 -21
- web3-6.15.1/ethpm/ethpm-spec/examples/transferable/1.0.0.json +0 -1
- web3-6.15.1/ethpm/ethpm-spec/examples/transferable/contracts/Transferable.sol +0 -14
- web3-6.15.1/ethpm/ethpm-spec/examples/transferable/v3-pretty.json +0 -27
- web3-6.15.1/ethpm/ethpm-spec/examples/transferable/v3.json +0 -1
- web3-6.15.1/ethpm/ethpm-spec/examples/wallet/1.0.0-pretty.json +0 -120
- web3-6.15.1/ethpm/ethpm-spec/examples/wallet/1.0.0.json +0 -1
- web3-6.15.1/ethpm/ethpm-spec/examples/wallet/contracts/Wallet.sol +0 -41
- web3-6.15.1/ethpm/ethpm-spec/examples/wallet/v3-pretty.json +0 -181
- web3-6.15.1/ethpm/ethpm-spec/examples/wallet/v3.json +0 -1
- web3-6.15.1/ethpm/ethpm-spec/examples/wallet-with-send/1.0.0-pretty.json +0 -135
- web3-6.15.1/ethpm/ethpm-spec/examples/wallet-with-send/1.0.0.json +0 -1
- web3-6.15.1/ethpm/ethpm-spec/examples/wallet-with-send/contracts/WalletWithSend.sol +0 -18
- web3-6.15.1/ethpm/ethpm-spec/examples/wallet-with-send/v3-pretty.json +0 -207
- web3-6.15.1/ethpm/ethpm-spec/examples/wallet-with-send/v3.json +0 -1
- web3-6.15.1/ethpm/ethpm-spec/spec/package.spec.json +0 -379
- web3-6.15.1/ethpm/ethpm-spec/spec/v3.spec.json +0 -483
- web3-6.15.1/ethpm/exceptions.py +0 -68
- web3-6.15.1/ethpm/package.py +0 -438
- web3-6.15.1/ethpm/tools/__init__.py +0 -4
- web3-6.15.1/ethpm/tools/builder.py +0 -930
- web3-6.15.1/ethpm/tools/checker.py +0 -312
- web3-6.15.1/ethpm/tools/get_manifest.py +0 -19
- web3-6.15.1/ethpm/uri.py +0 -141
- web3-6.15.1/ethpm/validation/manifest.py +0 -146
- web3-6.15.1/ethpm/validation/misc.py +0 -39
- web3-6.15.1/ethpm/validation/package.py +0 -80
- web3-6.15.1/ethpm/validation/uri.py +0 -163
- web3-6.15.1/web3/_utils/caching.py +0 -60
- web3-6.15.1/web3/_utils/contract_sources/__init__.py +0 -0
- web3-6.15.1/web3/_utils/contract_sources/contract_data/__init__.py +0 -0
- web3-6.15.1/web3/_utils/http.py +0 -7
- web3-6.15.1/web3/_utils/miner.py +0 -66
- web3-6.15.1/web3/auto/gethdev.py +0 -13
- web3-6.15.1/web3/gas_strategies/__init__.py +0 -0
- web3-6.15.1/web3/middleware/__init__.py +0 -133
- web3-6.15.1/web3/middleware/abi.py +0 -11
- web3-6.15.1/web3/middleware/async_cache.py +0 -99
- web3-6.15.1/web3/middleware/cache.py +0 -374
- web3-6.15.1/web3/middleware/exception_handling.py +0 -49
- web3-6.15.1/web3/middleware/exception_retry_request.py +0 -188
- web3-6.15.1/web3/middleware/fixture.py +0 -190
- web3-6.15.1/web3/middleware/formatting.py +0 -209
- web3-6.15.1/web3/middleware/geth_poa.py +0 -81
- web3-6.15.1/web3/middleware/normalize_request_parameters.py +0 -11
- web3-6.15.1/web3/middleware/signing.py +0 -239
- web3-6.15.1/web3/middleware/simulate_unmined_transaction.py +0 -43
- web3-6.15.1/web3/middleware/stalecheck.py +0 -120
- web3-6.15.1/web3/pm.py +0 -602
- web3-6.15.1/web3/providers/persistent.py +0 -53
- web3-6.15.1/web3/providers/websocket/__init__.py +0 -11
- web3-6.15.1/web3/scripts/__init__.py +0 -0
- web3-6.15.1/web3/scripts/release/__init__.py +0 -0
- web3-6.15.1/web3/tools/__init__.py +0 -4
- web3-6.15.1/web3/tools/benchmark/__init__.py +0 -0
- web3-6.15.1/web3/tools/benchmark/main.py +0 -190
- web3-6.15.1/web3/tools/benchmark/node.py +0 -126
- web3-6.15.1/web3/tools/benchmark/reporting.py +0 -39
- web3-6.15.1/web3/tools/benchmark/utils.py +0 -69
- web3-6.15.1/web3/tools/pytest_ethereum/__init__.py +0 -0
- web3-6.15.1/web3/tools/pytest_ethereum/_utils.py +0 -145
- web3-6.15.1/web3/tools/pytest_ethereum/deployer.py +0 -48
- web3-6.15.1/web3/tools/pytest_ethereum/exceptions.py +0 -22
- web3-6.15.1/web3/tools/pytest_ethereum/linker.py +0 -128
- web3-6.15.1/web3/tools/pytest_ethereum/plugins.py +0 -33
- web3-6.15.1/web3.egg-info/SOURCES.txt +0 -289
- web3-6.15.1/web3.egg-info/entry_points.txt +0 -2
- {web3-6.15.1 → web3-7.0.0b2}/LICENSE +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/ens/__init__.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/ens/abis.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/ens/auto.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/ens/base_ens.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/ens/constants.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/ens/contract_data.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/ens/exceptions.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/ens/specs/nf.json +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/ens/specs/normalization_spec.json +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/pyproject.toml +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/setup.cfg +0 -0
- {web3-6.15.1/ethpm → web3-7.0.0b2/web3}/_utils/__init__.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/async_caching.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/async_transactions.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/blocks.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/compat/__init__.py +0 -0
- {web3-6.15.1/ethpm/_utils/protobuf → web3-7.0.0b2/web3/_utils/contract_sources}/__init__.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/compile_contracts.py +0 -0
- {web3-6.15.1/ethpm/assets → web3-7.0.0b2/web3/_utils/contract_sources/contract_data}/__init__.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/_custom_contract_data.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/address_reflector.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/arrays_contract.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/bytes_contracts.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/constructor_contracts.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/contract_caller_tester.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/emitter_contract.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/event_contracts.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/extended_resolver.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/fallback_function_contract.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/function_name_tester_contract.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/math_contract.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/offchain_lookup.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/offchain_resolver.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/panic_errors_contract.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/payable_tester.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/receive_function_contracts.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/reflector_contracts.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/revert_contract.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/simple_resolver.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/storage_contract.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/string_contract.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/contract_sources/contract_data/tuple_contracts.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/datatypes.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/decorators.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/empty.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/encoding.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/error_formatters_utils.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/events.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/fee_utils.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/filters.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/formatters.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/function_identifiers.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/hypothesis.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/math.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/module.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/module_testing/__init__.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/module_testing/go_ethereum_admin_module.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/module_testing/go_ethereum_personal_module.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/module_testing/go_ethereum_txpool_module.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/module_testing/net_module.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/module_testing/web3_module.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/normalizers.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/threads.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/transactions.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/type_conversion.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/utility_methods.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/validation.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/_utils/windows.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/auto/__init__.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/beacon/api_endpoints.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/beacon/async_beacon.py +0 -0
- /web3-6.15.1/web3/beacon/main.py → /web3-7.0.0b2/web3/beacon/beacon.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/constants.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/contract/__init__.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/eth/__init__.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/exceptions.py +0 -0
- {web3-6.15.1/ethpm/backends → web3-7.0.0b2/web3/gas_strategies}/__init__.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/gas_strategies/rpc.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/gas_strategies/time_based.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/logs.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/method.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/net.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/providers/eth_tester/__init__.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/py.typed +0 -0
- {web3-6.15.1/ethpm/validation → web3-7.0.0b2/web3/scripts}/__init__.py +0 -0
- {web3-6.15.1/web3/_utils → web3-7.0.0b2/web3/scripts/release}/__init__.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/scripts/release/test_package.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/testing.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/tracing.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/utils/__init__.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/utils/abi.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/utils/address.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/utils/async_exception_handling.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/utils/caching.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3/utils/exception_handling.py +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3.egg-info/dependency_links.txt +0 -0
- {web3-6.15.1 → web3-7.0.0b2}/web3.egg-info/not-zip-safe +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: web3
|
|
3
|
-
Version:
|
|
3
|
+
Version: 7.0.0b2
|
|
4
4
|
Summary: web3.py
|
|
5
5
|
Home-page: https://github.com/ethereum/web3.py
|
|
6
6
|
Author: The Ethereum Foundation
|
|
@@ -12,12 +12,11 @@ Classifier: Intended Audience :: Developers
|
|
|
12
12
|
Classifier: License :: OSI Approved :: MIT License
|
|
13
13
|
Classifier: Natural Language :: English
|
|
14
14
|
Classifier: Programming Language :: Python :: 3
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.8
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.9
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
-
Requires-Python: >=3.
|
|
19
|
+
Requires-Python: >=3.8
|
|
21
20
|
Description-Content-Type: text/markdown
|
|
22
21
|
License-File: LICENSE
|
|
23
22
|
Requires-Dist: aiohttp>=3.7.4.post0
|
|
@@ -25,19 +24,17 @@ Requires-Dist: eth-abi>=4.0.0
|
|
|
25
24
|
Requires-Dist: eth-account>=0.8.0
|
|
26
25
|
Requires-Dist: eth-hash[pycryptodome]>=0.5.1
|
|
27
26
|
Requires-Dist: eth-typing>=3.0.0
|
|
28
|
-
Requires-Dist: eth-utils>=
|
|
27
|
+
Requires-Dist: eth-utils>=4.0.0
|
|
29
28
|
Requires-Dist: hexbytes<0.4.0,>=0.1.0
|
|
30
|
-
Requires-Dist:
|
|
31
|
-
Requires-Dist: lru-dict<1.3.0,>=1.1.6
|
|
32
|
-
Requires-Dist: protobuf>=4.21.6
|
|
29
|
+
Requires-Dist: pydantic>=2.4.0
|
|
33
30
|
Requires-Dist: pywin32>=223; platform_system == "Windows"
|
|
34
31
|
Requires-Dist: requests>=2.16.0
|
|
35
32
|
Requires-Dist: typing-extensions>=4.0.1
|
|
36
33
|
Requires-Dist: websockets>=10.0.0
|
|
37
34
|
Requires-Dist: pyunormalize>=15.0.0
|
|
38
35
|
Provides-Extra: tester
|
|
39
|
-
Requires-Dist: eth-tester[py-evm]==v0.
|
|
40
|
-
Requires-Dist: py-geth>=
|
|
36
|
+
Requires-Dist: eth-tester[py-evm]==v0.10.0-b.3; extra == "tester"
|
|
37
|
+
Requires-Dist: py-geth>=4.1.0; extra == "tester"
|
|
41
38
|
Provides-Extra: linter
|
|
42
39
|
Requires-Dist: black>=22.1.0; extra == "linter"
|
|
43
40
|
Requires-Dist: flake8==3.8.3; extra == "linter"
|
|
@@ -45,25 +42,22 @@ Requires-Dist: isort>=5.11.0; extra == "linter"
|
|
|
45
42
|
Requires-Dist: mypy==1.4.1; extra == "linter"
|
|
46
43
|
Requires-Dist: types-setuptools>=57.4.4; extra == "linter"
|
|
47
44
|
Requires-Dist: types-requests>=2.26.1; extra == "linter"
|
|
48
|
-
Requires-Dist: types-protobuf==3.19.13; extra == "linter"
|
|
49
45
|
Provides-Extra: docs
|
|
50
46
|
Requires-Dist: sphinx>=5.3.0; extra == "docs"
|
|
51
47
|
Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "docs"
|
|
52
48
|
Requires-Dist: towncrier<22,>=21; extra == "docs"
|
|
53
49
|
Provides-Extra: dev
|
|
54
|
-
Requires-Dist: eth-tester[py-evm]==v0.
|
|
55
|
-
Requires-Dist: py-geth>=
|
|
50
|
+
Requires-Dist: eth-tester[py-evm]==v0.10.0-b.3; extra == "dev"
|
|
51
|
+
Requires-Dist: py-geth>=4.1.0; extra == "dev"
|
|
56
52
|
Requires-Dist: black>=22.1.0; extra == "dev"
|
|
57
53
|
Requires-Dist: flake8==3.8.3; extra == "dev"
|
|
58
54
|
Requires-Dist: isort>=5.11.0; extra == "dev"
|
|
59
55
|
Requires-Dist: mypy==1.4.1; extra == "dev"
|
|
60
56
|
Requires-Dist: types-setuptools>=57.4.4; extra == "dev"
|
|
61
57
|
Requires-Dist: types-requests>=2.26.1; extra == "dev"
|
|
62
|
-
Requires-Dist: types-protobuf==3.19.13; extra == "dev"
|
|
63
58
|
Requires-Dist: sphinx>=5.3.0; extra == "dev"
|
|
64
59
|
Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "dev"
|
|
65
60
|
Requires-Dist: towncrier<22,>=21; extra == "dev"
|
|
66
|
-
Requires-Dist: ipfshttpclient==0.8.0a2; extra == "dev"
|
|
67
61
|
Requires-Dist: bumpversion; extra == "dev"
|
|
68
62
|
Requires-Dist: flaky>=3.7.0; extra == "dev"
|
|
69
63
|
Requires-Dist: hypothesis>=3.31.2; extra == "dev"
|
|
@@ -77,10 +71,7 @@ Requires-Dist: setuptools>=38.6.0; extra == "dev"
|
|
|
77
71
|
Requires-Dist: tox>=3.18.0; extra == "dev"
|
|
78
72
|
Requires-Dist: tqdm>4.32; extra == "dev"
|
|
79
73
|
Requires-Dist: twine>=1.13; extra == "dev"
|
|
80
|
-
Requires-Dist: when-changed>=0.3.0; extra == "dev"
|
|
81
74
|
Requires-Dist: build>=0.9.0; extra == "dev"
|
|
82
|
-
Provides-Extra: ipfs
|
|
83
|
-
Requires-Dist: ipfshttpclient==0.8.0a2; extra == "ipfs"
|
|
84
75
|
|
|
85
76
|
# web3.py
|
|
86
77
|
|
|
@@ -90,7 +81,7 @@ Requires-Dist: ipfshttpclient==0.8.0a2; extra == "ipfs"
|
|
|
90
81
|
|
|
91
82
|
A Python library for interacting with Ethereum.
|
|
92
83
|
|
|
93
|
-
- Python 3.
|
|
84
|
+
- Python 3.8+ support
|
|
94
85
|
|
|
95
86
|
---
|
|
96
87
|
|
|
@@ -3,13 +3,11 @@ from enum import (
|
|
|
3
3
|
)
|
|
4
4
|
import json
|
|
5
5
|
import os
|
|
6
|
-
from sys import (
|
|
7
|
-
version_info,
|
|
8
|
-
)
|
|
9
6
|
from typing import (
|
|
10
7
|
Any,
|
|
11
8
|
Dict,
|
|
12
9
|
List,
|
|
10
|
+
Literal,
|
|
13
11
|
Optional,
|
|
14
12
|
Set,
|
|
15
13
|
Tuple,
|
|
@@ -25,17 +23,6 @@ from .exceptions import (
|
|
|
25
23
|
InvalidName,
|
|
26
24
|
)
|
|
27
25
|
|
|
28
|
-
# TODO: remove once web3 supports python>=3.8
|
|
29
|
-
if version_info >= (3, 8):
|
|
30
|
-
from typing import (
|
|
31
|
-
Literal,
|
|
32
|
-
)
|
|
33
|
-
else:
|
|
34
|
-
from typing_extensions import ( # type: ignore
|
|
35
|
-
Literal,
|
|
36
|
-
)
|
|
37
|
-
|
|
38
|
-
|
|
39
26
|
# -- setup -- #
|
|
40
27
|
|
|
41
28
|
|
|
@@ -71,12 +71,14 @@ if TYPE_CHECKING:
|
|
|
71
71
|
AsyncContractFunction,
|
|
72
72
|
)
|
|
73
73
|
from web3.main import AsyncWeb3 # noqa: F401
|
|
74
|
+
from web3.middleware.base import ( # noqa: F401
|
|
75
|
+
Middleware,
|
|
76
|
+
)
|
|
74
77
|
from web3.providers import ( # noqa: F401
|
|
75
78
|
AsyncBaseProvider,
|
|
76
79
|
BaseProvider,
|
|
77
80
|
)
|
|
78
81
|
from web3.types import ( # noqa: F401
|
|
79
|
-
AsyncMiddleware,
|
|
80
82
|
TxParams,
|
|
81
83
|
)
|
|
82
84
|
|
|
@@ -98,7 +100,7 @@ class AsyncENS(BaseENS):
|
|
|
98
100
|
self,
|
|
99
101
|
provider: "AsyncBaseProvider" = cast("AsyncBaseProvider", default),
|
|
100
102
|
addr: ChecksumAddress = None,
|
|
101
|
-
|
|
103
|
+
middleware: Optional[Sequence[Tuple["Middleware", str]]] = None,
|
|
102
104
|
) -> None:
|
|
103
105
|
"""
|
|
104
106
|
:param provider: a single provider used to connect to Ethereum
|
|
@@ -106,7 +108,7 @@ class AsyncENS(BaseENS):
|
|
|
106
108
|
:param hex-string addr: the address of the ENS registry on-chain.
|
|
107
109
|
If not provided, ENS.py will default to the mainnet ENS registry address.
|
|
108
110
|
"""
|
|
109
|
-
self.w3 = init_async_web3(provider,
|
|
111
|
+
self.w3 = init_async_web3(provider, middleware)
|
|
110
112
|
|
|
111
113
|
ens_addr = addr if addr else ENS_MAINNET_ADDR
|
|
112
114
|
self.ens = self.w3.eth.contract(abi=abis.ENS, address=ens_addr)
|
|
@@ -127,10 +129,8 @@ class AsyncENS(BaseENS):
|
|
|
127
129
|
provided, defaults to the mainnet ENS registry address.
|
|
128
130
|
"""
|
|
129
131
|
provider = w3.manager.provider
|
|
130
|
-
|
|
131
|
-
ns = cls(
|
|
132
|
-
cast("AsyncBaseProvider", provider), addr=addr, middlewares=middlewares
|
|
133
|
-
)
|
|
132
|
+
middleware = w3.middleware_onion.middleware
|
|
133
|
+
ns = cls(cast("AsyncBaseProvider", provider), addr=addr, middleware=middleware)
|
|
134
134
|
|
|
135
135
|
# inherit strict bytes checking from w3 instance
|
|
136
136
|
ns.strict_bytes_type_checking = w3.strict_bytes_type_checking
|
|
@@ -71,11 +71,13 @@ if TYPE_CHECKING:
|
|
|
71
71
|
Contract,
|
|
72
72
|
ContractFunction,
|
|
73
73
|
)
|
|
74
|
+
from web3.middleware.base import ( # noqa: F401
|
|
75
|
+
Middleware,
|
|
76
|
+
)
|
|
74
77
|
from web3.providers import ( # noqa: F401
|
|
75
78
|
BaseProvider,
|
|
76
79
|
)
|
|
77
80
|
from web3.types import ( # noqa: F401
|
|
78
|
-
Middleware,
|
|
79
81
|
TxParams,
|
|
80
82
|
)
|
|
81
83
|
|
|
@@ -97,7 +99,7 @@ class ENS(BaseENS):
|
|
|
97
99
|
self,
|
|
98
100
|
provider: "BaseProvider" = cast("BaseProvider", default),
|
|
99
101
|
addr: ChecksumAddress = None,
|
|
100
|
-
|
|
102
|
+
middleware: Optional[Sequence[Tuple["Middleware", str]]] = None,
|
|
101
103
|
) -> None:
|
|
102
104
|
"""
|
|
103
105
|
:param provider: a single provider used to connect to Ethereum
|
|
@@ -106,7 +108,7 @@ class ENS(BaseENS):
|
|
|
106
108
|
If not provided, ENS.py will default to the mainnet ENS
|
|
107
109
|
registry address.
|
|
108
110
|
"""
|
|
109
|
-
self.w3 = init_web3(provider,
|
|
111
|
+
self.w3 = init_web3(provider, middleware)
|
|
110
112
|
|
|
111
113
|
ens_addr = addr if addr else ENS_MAINNET_ADDR
|
|
112
114
|
self.ens = self.w3.eth.contract(abi=abis.ENS, address=ens_addr)
|
|
@@ -127,8 +129,8 @@ class ENS(BaseENS):
|
|
|
127
129
|
provided, defaults to the mainnet ENS registry address.
|
|
128
130
|
"""
|
|
129
131
|
provider = w3.manager.provider
|
|
130
|
-
|
|
131
|
-
ns = cls(cast("BaseProvider", provider), addr=addr,
|
|
132
|
+
middleware = w3.middleware_onion.middleware
|
|
133
|
+
ns = cls(cast("BaseProvider", provider), addr=addr, middleware=middleware)
|
|
132
134
|
|
|
133
135
|
# inherit strict bytes checking from w3 instance
|
|
134
136
|
ns.strict_bytes_type_checking = w3.strict_bytes_type_checking
|
|
@@ -5,7 +5,6 @@ from datetime import (
|
|
|
5
5
|
from typing import (
|
|
6
6
|
TYPE_CHECKING,
|
|
7
7
|
Any,
|
|
8
|
-
Callable,
|
|
9
8
|
Collection,
|
|
10
9
|
Dict,
|
|
11
10
|
List,
|
|
@@ -60,15 +59,15 @@ if TYPE_CHECKING:
|
|
|
60
59
|
AsyncWeb3,
|
|
61
60
|
Web3 as _Web3,
|
|
62
61
|
)
|
|
62
|
+
from web3.middleware.base import (
|
|
63
|
+
Middleware,
|
|
64
|
+
)
|
|
63
65
|
from web3.providers import ( # noqa: F401
|
|
64
66
|
AsyncBaseProvider,
|
|
65
67
|
BaseProvider,
|
|
66
68
|
)
|
|
67
69
|
from web3.types import ( # noqa: F401
|
|
68
70
|
ABIFunction,
|
|
69
|
-
AsyncMiddleware,
|
|
70
|
-
Middleware,
|
|
71
|
-
RPCEndpoint,
|
|
72
71
|
)
|
|
73
72
|
|
|
74
73
|
|
|
@@ -82,7 +81,7 @@ def Web3() -> Type["_Web3"]:
|
|
|
82
81
|
|
|
83
82
|
def init_web3(
|
|
84
83
|
provider: "BaseProvider" = cast("BaseProvider", default),
|
|
85
|
-
|
|
84
|
+
middleware: Optional[Sequence[Tuple["Middleware", str]]] = None,
|
|
86
85
|
) -> "_Web3":
|
|
87
86
|
from web3 import (
|
|
88
87
|
Web3 as Web3Main,
|
|
@@ -94,23 +93,24 @@ def init_web3(
|
|
|
94
93
|
if provider is default:
|
|
95
94
|
w3 = Web3Main(ens=None, modules={"eth": (EthMain)})
|
|
96
95
|
else:
|
|
97
|
-
w3 = Web3Main(provider,
|
|
96
|
+
w3 = Web3Main(provider, middleware, ens=None, modules={"eth": (EthMain)})
|
|
98
97
|
|
|
99
98
|
return customize_web3(w3)
|
|
100
99
|
|
|
101
100
|
|
|
102
101
|
def customize_web3(w3: "_Web3") -> "_Web3":
|
|
103
102
|
from web3.middleware import (
|
|
104
|
-
|
|
103
|
+
StalecheckMiddlewareBuilder,
|
|
105
104
|
)
|
|
106
105
|
|
|
107
|
-
if w3.middleware_onion.get("
|
|
108
|
-
w3.middleware_onion.remove("
|
|
106
|
+
if w3.middleware_onion.get("ens_name_to_address"):
|
|
107
|
+
w3.middleware_onion.remove("ens_name_to_address")
|
|
109
108
|
|
|
110
109
|
if not w3.middleware_onion.get("stalecheck"):
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
stalecheck_middleware = StalecheckMiddlewareBuilder.build(
|
|
111
|
+
ACCEPTABLE_STALE_HOURS * 3600
|
|
113
112
|
)
|
|
113
|
+
w3.middleware_onion.add(stalecheck_middleware, name="stalecheck")
|
|
114
114
|
return w3
|
|
115
115
|
|
|
116
116
|
|
|
@@ -299,7 +299,7 @@ def get_abi_output_types(abi: "ABIFunction") -> List[str]:
|
|
|
299
299
|
|
|
300
300
|
def init_async_web3(
|
|
301
301
|
provider: "AsyncBaseProvider" = cast("AsyncBaseProvider", default),
|
|
302
|
-
|
|
302
|
+
middleware: Optional[Sequence[Tuple["Middleware", str]]] = (),
|
|
303
303
|
) -> "AsyncWeb3":
|
|
304
304
|
from web3 import (
|
|
305
305
|
AsyncWeb3 as AsyncWeb3Main,
|
|
@@ -307,36 +307,33 @@ def init_async_web3(
|
|
|
307
307
|
from web3.eth import (
|
|
308
308
|
AsyncEth as AsyncEthMain,
|
|
309
309
|
)
|
|
310
|
+
from web3.middleware import (
|
|
311
|
+
StalecheckMiddlewareBuilder,
|
|
312
|
+
)
|
|
310
313
|
|
|
311
|
-
|
|
312
|
-
for i, (
|
|
313
|
-
if name == "
|
|
314
|
-
|
|
314
|
+
middleware = list(middleware)
|
|
315
|
+
for i, (mw, name) in enumerate(middleware):
|
|
316
|
+
if name == "ens_name_to_address":
|
|
317
|
+
middleware.pop(i)
|
|
315
318
|
|
|
316
|
-
if "stalecheck" not in (name for mw, name in
|
|
317
|
-
|
|
319
|
+
if "stalecheck" not in (name for mw, name in middleware):
|
|
320
|
+
middleware.append(
|
|
321
|
+
(
|
|
322
|
+
StalecheckMiddlewareBuilder.build(ACCEPTABLE_STALE_HOURS * 3600),
|
|
323
|
+
"stalecheck",
|
|
324
|
+
)
|
|
325
|
+
)
|
|
318
326
|
|
|
319
327
|
if provider is default:
|
|
320
328
|
async_w3 = AsyncWeb3Main(
|
|
321
|
-
|
|
329
|
+
middleware=middleware, ens=None, modules={"eth": (AsyncEthMain)}
|
|
322
330
|
)
|
|
323
331
|
else:
|
|
324
332
|
async_w3 = AsyncWeb3Main(
|
|
325
333
|
provider,
|
|
326
|
-
|
|
334
|
+
middleware=middleware,
|
|
327
335
|
ens=None,
|
|
328
336
|
modules={"eth": (AsyncEthMain)},
|
|
329
337
|
)
|
|
330
338
|
|
|
331
339
|
return async_w3
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
async def _async_ens_stalecheck_middleware(
|
|
335
|
-
make_request: Callable[["RPCEndpoint", Any], Any], w3: "AsyncWeb3"
|
|
336
|
-
) -> "Middleware":
|
|
337
|
-
from web3.middleware import (
|
|
338
|
-
async_make_stalecheck_middleware,
|
|
339
|
-
)
|
|
340
|
-
|
|
341
|
-
middleware = await async_make_stalecheck_middleware(ACCEPTABLE_STALE_HOURS * 3600)
|
|
342
|
-
return await middleware(make_request, w3)
|
|
@@ -6,8 +6,8 @@ from setuptools import (
|
|
|
6
6
|
|
|
7
7
|
extras_require = {
|
|
8
8
|
"tester": [
|
|
9
|
-
"eth-tester[py-evm]==v0.
|
|
10
|
-
"py-geth>=
|
|
9
|
+
"eth-tester[py-evm]==v0.10.0-b.3",
|
|
10
|
+
"py-geth>=4.1.0",
|
|
11
11
|
],
|
|
12
12
|
"linter": [
|
|
13
13
|
"black>=22.1.0",
|
|
@@ -16,7 +16,6 @@ extras_require = {
|
|
|
16
16
|
"mypy==1.4.1",
|
|
17
17
|
"types-setuptools>=57.4.4",
|
|
18
18
|
"types-requests>=2.26.1",
|
|
19
|
-
"types-protobuf==3.19.13",
|
|
20
19
|
],
|
|
21
20
|
"docs": [
|
|
22
21
|
"sphinx>=5.3.0",
|
|
@@ -37,19 +36,14 @@ extras_require = {
|
|
|
37
36
|
"tox>=3.18.0",
|
|
38
37
|
"tqdm>4.32",
|
|
39
38
|
"twine>=1.13",
|
|
40
|
-
"when-changed>=0.3.0",
|
|
41
39
|
"build>=0.9.0",
|
|
42
40
|
],
|
|
43
|
-
"ipfs": [
|
|
44
|
-
"ipfshttpclient==0.8.0a2",
|
|
45
|
-
],
|
|
46
41
|
}
|
|
47
42
|
|
|
48
43
|
extras_require["dev"] = (
|
|
49
44
|
extras_require["tester"]
|
|
50
45
|
+ extras_require["linter"]
|
|
51
46
|
+ extras_require["docs"]
|
|
52
|
-
+ extras_require["ipfs"]
|
|
53
47
|
+ extras_require["dev"]
|
|
54
48
|
)
|
|
55
49
|
|
|
@@ -59,7 +53,7 @@ with open("./README.md") as readme:
|
|
|
59
53
|
setup(
|
|
60
54
|
name="web3",
|
|
61
55
|
# *IMPORTANT*: Don't manually change the version here. Use the 'bumpversion' utility.
|
|
62
|
-
version="
|
|
56
|
+
version="7.0.0-beta.2",
|
|
63
57
|
description="""web3.py""",
|
|
64
58
|
long_description_content_type="text/markdown",
|
|
65
59
|
long_description=long_description,
|
|
@@ -73,21 +67,18 @@ setup(
|
|
|
73
67
|
"eth-account>=0.8.0",
|
|
74
68
|
"eth-hash[pycryptodome]>=0.5.1",
|
|
75
69
|
"eth-typing>=3.0.0",
|
|
76
|
-
"eth-utils>=
|
|
70
|
+
"eth-utils>=4.0.0",
|
|
77
71
|
"hexbytes>=0.1.0,<0.4.0",
|
|
78
|
-
"
|
|
79
|
-
"lru-dict>=1.1.6,<1.3.0",
|
|
80
|
-
"protobuf>=4.21.6",
|
|
72
|
+
"pydantic>=2.4.0",
|
|
81
73
|
"pywin32>=223;platform_system=='Windows'",
|
|
82
74
|
"requests>=2.16.0",
|
|
83
75
|
"typing-extensions>=4.0.1",
|
|
84
76
|
"websockets>=10.0.0",
|
|
85
77
|
"pyunormalize>=15.0.0",
|
|
86
78
|
],
|
|
87
|
-
python_requires=">=3.
|
|
79
|
+
python_requires=">=3.8",
|
|
88
80
|
extras_require=extras_require,
|
|
89
|
-
py_modules=["web3", "ens"
|
|
90
|
-
entry_points={"pytest11": ["pytest_ethereum = web3.tools.pytest_ethereum.plugins"]},
|
|
81
|
+
py_modules=["web3", "ens"],
|
|
91
82
|
license="MIT",
|
|
92
83
|
zip_safe=False,
|
|
93
84
|
keywords="ethereum",
|
|
@@ -99,7 +90,6 @@ setup(
|
|
|
99
90
|
"License :: OSI Approved :: MIT License",
|
|
100
91
|
"Natural Language :: English",
|
|
101
92
|
"Programming Language :: Python :: 3",
|
|
102
|
-
"Programming Language :: Python :: 3.7",
|
|
103
93
|
"Programming Language :: Python :: 3.8",
|
|
104
94
|
"Programming Language :: Python :: 3.9",
|
|
105
95
|
"Programming Language :: Python :: 3.10",
|
|
@@ -15,8 +15,10 @@ from web3.main import (
|
|
|
15
15
|
AsyncWeb3,
|
|
16
16
|
Web3,
|
|
17
17
|
)
|
|
18
|
-
from web3.providers.
|
|
19
|
-
|
|
18
|
+
from web3.providers.persistent import ( # noqa: E402
|
|
19
|
+
AsyncIPCProvider,
|
|
20
|
+
PersistentConnectionProvider,
|
|
21
|
+
WebSocketProvider,
|
|
20
22
|
)
|
|
21
23
|
from web3.providers.eth_tester import ( # noqa: E402
|
|
22
24
|
EthereumTesterProvider,
|
|
@@ -25,11 +27,11 @@ from web3.providers.ipc import ( # noqa: E402
|
|
|
25
27
|
IPCProvider,
|
|
26
28
|
)
|
|
27
29
|
from web3.providers.rpc import ( # noqa: E402
|
|
30
|
+
AsyncHTTPProvider,
|
|
28
31
|
HTTPProvider,
|
|
29
32
|
)
|
|
30
|
-
from web3.providers.
|
|
31
|
-
|
|
32
|
-
WebsocketProviderV2,
|
|
33
|
+
from web3.providers.legacy_websocket import ( # noqa: E402
|
|
34
|
+
LegacyWebSocketProvider,
|
|
33
35
|
)
|
|
34
36
|
|
|
35
37
|
|
|
@@ -39,9 +41,10 @@ __all__ = [
|
|
|
39
41
|
"Web3",
|
|
40
42
|
"HTTPProvider",
|
|
41
43
|
"IPCProvider",
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
+
"LegacyWebSocketProvider",
|
|
45
|
+
"WebSocketProvider",
|
|
44
46
|
"EthereumTesterProvider",
|
|
45
47
|
"Account",
|
|
46
48
|
"AsyncHTTPProvider",
|
|
49
|
+
"AsyncIPCProvider",
|
|
47
50
|
]
|
|
@@ -51,7 +51,6 @@ from eth_typing import (
|
|
|
51
51
|
TypeStr,
|
|
52
52
|
)
|
|
53
53
|
from eth_utils import (
|
|
54
|
-
combomethod,
|
|
55
54
|
decode_hex,
|
|
56
55
|
is_bytes,
|
|
57
56
|
is_list_like,
|
|
@@ -211,10 +210,7 @@ class AcceptsHexStrEncoder(encoding.BaseEncoder):
|
|
|
211
210
|
) -> None:
|
|
212
211
|
super().__init__(**kwargs)
|
|
213
212
|
self.subencoder = subencoder
|
|
214
|
-
|
|
215
|
-
@property
|
|
216
|
-
def is_dynamic(self) -> bool:
|
|
217
|
-
return self.subencoder.is_dynamic
|
|
213
|
+
self.is_dynamic = subencoder.is_dynamic
|
|
218
214
|
|
|
219
215
|
@classmethod
|
|
220
216
|
def from_type_str(
|
|
@@ -234,10 +230,9 @@ class AcceptsHexStrEncoder(encoding.BaseEncoder):
|
|
|
234
230
|
raise AttributeError(f"No subencoder class is set. {cls.__name__}")
|
|
235
231
|
return cls.subencoder_cls
|
|
236
232
|
|
|
237
|
-
@combomethod
|
|
238
233
|
def validate_value(self, value: Any) -> None:
|
|
239
234
|
normalized_value = self.validate_and_normalize(value)
|
|
240
|
-
|
|
235
|
+
self.subencoder.validate_value(normalized_value)
|
|
241
236
|
|
|
242
237
|
def encode(self, value: Any) -> bytes:
|
|
243
238
|
normalized_value = self.validate_and_normalize(value)
|
|
@@ -308,15 +303,14 @@ class ExactLengthBytesEncoder(BytesEncoder):
|
|
|
308
303
|
raise ValueError("Value byte size exceeds data size")
|
|
309
304
|
|
|
310
305
|
@parse_type_str("bytes")
|
|
311
|
-
def from_type_str(
|
|
306
|
+
def from_type_str(
|
|
307
|
+
cls, abi_type: BasicType, registry: ABIRegistry
|
|
308
|
+
) -> "ExactLengthBytesEncoder":
|
|
312
309
|
subencoder_cls = cls.get_subencoder_class()
|
|
313
|
-
|
|
314
|
-
#
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
subencoder_cls.from_type_str(abi_type.to_type_str(), registry),
|
|
318
|
-
)
|
|
319
|
-
return cls(
|
|
310
|
+
subencoder = subencoder_cls.from_type_str(abi_type.to_type_str(), registry)
|
|
311
|
+
# type ignored b/c @parse_type_str decorator turns it into a classmethod,
|
|
312
|
+
# so mypy thinks cls(...) is a call to __call__, but actually calls __init__
|
|
313
|
+
return cls( # type: ignore
|
|
320
314
|
subencoder,
|
|
321
315
|
value_bit_size=abi_type.sub * 8,
|
|
322
316
|
data_byte_size=abi_type.sub,
|