web3 7.0.0b1__tar.gz → 7.0.0b3__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.0b1 → web3-7.0.0b3}/MANIFEST.in +0 -4
- {web3-7.0.0b1 → web3-7.0.0b3}/PKG-INFO +3 -9
- {web3-7.0.0b1 → web3-7.0.0b3}/ens/async_ens.py +6 -8
- {web3-7.0.0b1 → web3-7.0.0b3}/ens/ens.py +6 -6
- {web3-7.0.0b1 → web3-7.0.0b3}/ens/utils.py +18 -16
- {web3-7.0.0b1 → web3-7.0.0b3}/setup.py +3 -11
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/abi.py +9 -15
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/events.py +15 -6
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/math.py +12 -14
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/method_formatters.py +7 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/module_testing/eth_module.py +67 -6
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/module_testing/module_testing_utils.py +2 -2
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/request.py +1 -1
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/rpc_abi.py +1 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/transactions.py +4 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/contract/base_contract.py +1 -1
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/datastructures.py +7 -7
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/eth/async_eth.py +20 -2
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/eth/eth.py +13 -1
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/exceptions.py +11 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/main.py +4 -30
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/manager.py +12 -13
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/middleware/__init__.py +9 -8
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/module.py +1 -1
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/providers/async_base.py +6 -6
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/providers/base.py +8 -8
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/providers/eth_tester/main.py +16 -20
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/providers/ipc.py +1 -1
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/providers/legacy_websocket.py +1 -1
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/providers/persistent/persistent.py +2 -2
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/providers/persistent/request_processor.py +3 -5
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/tools/benchmark/main.py +2 -2
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/types.py +4 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/utils/caching.py +2 -4
- {web3-7.0.0b1 → web3-7.0.0b3}/web3.egg-info/PKG-INFO +3 -9
- {web3-7.0.0b1 → web3-7.0.0b3}/web3.egg-info/SOURCES.txt +0 -112
- {web3-7.0.0b1 → web3-7.0.0b3}/web3.egg-info/requires.txt +2 -9
- {web3-7.0.0b1 → web3-7.0.0b3}/web3.egg-info/top_level.txt +0 -1
- web3-7.0.0b1/ethpm/__init__.py +0 -20
- web3-7.0.0b1/ethpm/_utils/backend.py +0 -93
- web3-7.0.0b1/ethpm/_utils/cache.py +0 -44
- web3-7.0.0b1/ethpm/_utils/chains.py +0 -119
- web3-7.0.0b1/ethpm/_utils/contract.py +0 -35
- web3-7.0.0b1/ethpm/_utils/deployments.py +0 -145
- web3-7.0.0b1/ethpm/_utils/ipfs.py +0 -116
- web3-7.0.0b1/ethpm/_utils/protobuf/ipfs_file_pb2.py +0 -33
- web3-7.0.0b1/ethpm/_utils/registry.py +0 -29
- web3-7.0.0b1/ethpm/assets/ens/v3.json +0 -1
- web3-7.0.0b1/ethpm/assets/escrow/with_bytecode_v3.json +0 -1
- web3-7.0.0b1/ethpm/assets/ipfs_file.proto +0 -32
- web3-7.0.0b1/ethpm/assets/owned/output_v3.json +0 -1
- web3-7.0.0b1/ethpm/assets/owned/with_contract_type_v3.json +0 -1
- web3-7.0.0b1/ethpm/assets/registry/contracts/Authority.sol +0 -156
- web3-7.0.0b1/ethpm/assets/registry/contracts/IndexedOrderedSetLib.sol +0 -106
- web3-7.0.0b1/ethpm/assets/registry/contracts/PackageDB.sol +0 -225
- web3-7.0.0b1/ethpm/assets/registry/contracts/PackageRegistry.sol +0 -361
- web3-7.0.0b1/ethpm/assets/registry/contracts/PackageRegistryInterface.sol +0 -97
- web3-7.0.0b1/ethpm/assets/registry/contracts/ReleaseDB.sol +0 -309
- web3-7.0.0b1/ethpm/assets/registry/contracts/ReleaseValidator.sol +0 -152
- web3-7.0.0b1/ethpm/assets/registry/solc_input.json +0 -1
- web3-7.0.0b1/ethpm/assets/registry/solc_output.json +0 -1
- web3-7.0.0b1/ethpm/assets/registry/v3.json +0 -1
- web3-7.0.0b1/ethpm/assets/safe-math-lib/v3-strict-no-deployments.json +0 -1
- web3-7.0.0b1/ethpm/assets/simple-registry/contracts/Ownable.sol +0 -63
- web3-7.0.0b1/ethpm/assets/simple-registry/contracts/PackageRegistry.sol +0 -373
- web3-7.0.0b1/ethpm/assets/simple-registry/contracts/PackageRegistryInterface.sol +0 -96
- web3-7.0.0b1/ethpm/assets/simple-registry/solc_input.json +0 -33
- web3-7.0.0b1/ethpm/assets/simple-registry/solc_output.json +0 -1
- web3-7.0.0b1/ethpm/assets/simple-registry/v3.json +0 -1
- web3-7.0.0b1/ethpm/assets/standard-token/output_v3.json +0 -1
- web3-7.0.0b1/ethpm/assets/standard-token/with_bytecode_v3.json +0 -1
- web3-7.0.0b1/ethpm/assets/vyper_registry/0.1.0.json +0 -1
- web3-7.0.0b1/ethpm/assets/vyper_registry/registry.vy +0 -216
- web3-7.0.0b1/ethpm/assets/vyper_registry/registry_with_delete.vy +0 -244
- web3-7.0.0b1/ethpm/backends/base.py +0 -43
- web3-7.0.0b1/ethpm/backends/http.py +0 -108
- web3-7.0.0b1/ethpm/backends/ipfs.py +0 -219
- web3-7.0.0b1/ethpm/backends/registry.py +0 -154
- web3-7.0.0b1/ethpm/constants.py +0 -17
- web3-7.0.0b1/ethpm/contract.py +0 -187
- web3-7.0.0b1/ethpm/dependencies.py +0 -58
- web3-7.0.0b1/ethpm/deployments.py +0 -80
- web3-7.0.0b1/ethpm/ethpm-spec/examples/escrow/1.0.0-pretty.json +0 -146
- web3-7.0.0b1/ethpm/ethpm-spec/examples/escrow/1.0.0.json +0 -1
- web3-7.0.0b1/ethpm/ethpm-spec/examples/escrow/contracts/Escrow.sol +0 -32
- web3-7.0.0b1/ethpm/ethpm-spec/examples/escrow/contracts/SafeSendLib.sol +0 -20
- web3-7.0.0b1/ethpm/ethpm-spec/examples/escrow/v3-pretty.json +0 -171
- web3-7.0.0b1/ethpm/ethpm-spec/examples/escrow/v3.json +0 -1
- web3-7.0.0b1/ethpm/ethpm-spec/examples/owned/1.0.0-pretty.json +0 -21
- web3-7.0.0b1/ethpm/ethpm-spec/examples/owned/1.0.0.json +0 -1
- web3-7.0.0b1/ethpm/ethpm-spec/examples/owned/contracts/Owned.sol +0 -12
- web3-7.0.0b1/ethpm/ethpm-spec/examples/owned/v3-pretty.json +0 -27
- web3-7.0.0b1/ethpm/ethpm-spec/examples/owned/v3.json +0 -1
- web3-7.0.0b1/ethpm/ethpm-spec/examples/piper-coin/1.0.0-pretty.json +0 -31
- web3-7.0.0b1/ethpm/ethpm-spec/examples/piper-coin/1.0.0.json +0 -1
- web3-7.0.0b1/ethpm/ethpm-spec/examples/piper-coin/v3-pretty.json +0 -21
- web3-7.0.0b1/ethpm/ethpm-spec/examples/piper-coin/v3.json +0 -1
- web3-7.0.0b1/ethpm/ethpm-spec/examples/safe-math-lib/1.0.0-pretty.json +0 -85
- web3-7.0.0b1/ethpm/ethpm-spec/examples/safe-math-lib/1.0.0.json +0 -1
- web3-7.0.0b1/ethpm/ethpm-spec/examples/safe-math-lib/contracts/SafeMathLib.sol +0 -24
- web3-7.0.0b1/ethpm/ethpm-spec/examples/safe-math-lib/v3-pretty.json +0 -117
- web3-7.0.0b1/ethpm/ethpm-spec/examples/safe-math-lib/v3.json +0 -1
- web3-7.0.0b1/ethpm/ethpm-spec/examples/standard-token/1.0.0-pretty.json +0 -55
- web3-7.0.0b1/ethpm/ethpm-spec/examples/standard-token/1.0.0.json +0 -1
- web3-7.0.0b1/ethpm/ethpm-spec/examples/standard-token/contracts/AbstractToken.sol +0 -20
- web3-7.0.0b1/ethpm/ethpm-spec/examples/standard-token/contracts/StandardToken.sol +0 -84
- web3-7.0.0b1/ethpm/ethpm-spec/examples/standard-token/v3-pretty.json +0 -460
- web3-7.0.0b1/ethpm/ethpm-spec/examples/standard-token/v3.json +0 -1
- web3-7.0.0b1/ethpm/ethpm-spec/examples/transferable/1.0.0-pretty.json +0 -21
- web3-7.0.0b1/ethpm/ethpm-spec/examples/transferable/1.0.0.json +0 -1
- web3-7.0.0b1/ethpm/ethpm-spec/examples/transferable/contracts/Transferable.sol +0 -14
- web3-7.0.0b1/ethpm/ethpm-spec/examples/transferable/v3-pretty.json +0 -27
- web3-7.0.0b1/ethpm/ethpm-spec/examples/transferable/v3.json +0 -1
- web3-7.0.0b1/ethpm/ethpm-spec/examples/wallet/1.0.0-pretty.json +0 -120
- web3-7.0.0b1/ethpm/ethpm-spec/examples/wallet/1.0.0.json +0 -1
- web3-7.0.0b1/ethpm/ethpm-spec/examples/wallet/contracts/Wallet.sol +0 -41
- web3-7.0.0b1/ethpm/ethpm-spec/examples/wallet/v3-pretty.json +0 -181
- web3-7.0.0b1/ethpm/ethpm-spec/examples/wallet/v3.json +0 -1
- web3-7.0.0b1/ethpm/ethpm-spec/examples/wallet-with-send/1.0.0-pretty.json +0 -135
- web3-7.0.0b1/ethpm/ethpm-spec/examples/wallet-with-send/1.0.0.json +0 -1
- web3-7.0.0b1/ethpm/ethpm-spec/examples/wallet-with-send/contracts/WalletWithSend.sol +0 -18
- web3-7.0.0b1/ethpm/ethpm-spec/examples/wallet-with-send/v3-pretty.json +0 -207
- web3-7.0.0b1/ethpm/ethpm-spec/examples/wallet-with-send/v3.json +0 -1
- web3-7.0.0b1/ethpm/ethpm-spec/spec/package.spec.json +0 -379
- web3-7.0.0b1/ethpm/ethpm-spec/spec/v3.spec.json +0 -483
- web3-7.0.0b1/ethpm/exceptions.py +0 -68
- web3-7.0.0b1/ethpm/package.py +0 -438
- web3-7.0.0b1/ethpm/tools/__init__.py +0 -4
- web3-7.0.0b1/ethpm/tools/builder.py +0 -930
- web3-7.0.0b1/ethpm/tools/checker.py +0 -312
- web3-7.0.0b1/ethpm/tools/get_manifest.py +0 -19
- web3-7.0.0b1/ethpm/uri.py +0 -141
- web3-7.0.0b1/ethpm/validation/manifest.py +0 -146
- web3-7.0.0b1/ethpm/validation/misc.py +0 -39
- web3-7.0.0b1/ethpm/validation/package.py +0 -80
- web3-7.0.0b1/ethpm/validation/uri.py +0 -163
- web3-7.0.0b1/web3/_utils/contract_sources/contract_data/__init__.py +0 -0
- web3-7.0.0b1/web3/gas_strategies/__init__.py +0 -0
- web3-7.0.0b1/web3/pm.py +0 -602
- web3-7.0.0b1/web3/scripts/__init__.py +0 -0
- web3-7.0.0b1/web3/scripts/release/__init__.py +0 -0
- web3-7.0.0b1/web3/tools/__init__.py +0 -4
- web3-7.0.0b1/web3/tools/benchmark/__init__.py +0 -0
- web3-7.0.0b1/web3/tools/pytest_ethereum/__init__.py +0 -0
- web3-7.0.0b1/web3/tools/pytest_ethereum/_utils.py +0 -145
- web3-7.0.0b1/web3/tools/pytest_ethereum/deployer.py +0 -48
- web3-7.0.0b1/web3/tools/pytest_ethereum/exceptions.py +0 -22
- web3-7.0.0b1/web3/tools/pytest_ethereum/linker.py +0 -128
- web3-7.0.0b1/web3/tools/pytest_ethereum/plugins.py +0 -33
- web3-7.0.0b1/web3.egg-info/entry_points.txt +0 -2
- {web3-7.0.0b1 → web3-7.0.0b3}/LICENSE +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/README.md +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/ens/__init__.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/ens/_normalization.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/ens/abis.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/ens/auto.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/ens/base_ens.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/ens/constants.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/ens/contract_data.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/ens/exceptions.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/ens/specs/nf.json +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/ens/specs/normalization_spec.json +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/pyproject.toml +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/setup.cfg +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/__init__.py +0 -0
- {web3-7.0.0b1/ethpm → web3-7.0.0b3/web3}/_utils/__init__.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/async_caching.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/async_transactions.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/blocks.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/caching.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/compat/__init__.py +0 -0
- {web3-7.0.0b1/ethpm/_utils/protobuf → web3-7.0.0b3/web3/_utils/contract_sources}/__init__.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/compile_contracts.py +0 -0
- {web3-7.0.0b1/ethpm/assets → web3-7.0.0b3/web3/_utils/contract_sources/contract_data}/__init__.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/_custom_contract_data.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/address_reflector.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/arrays_contract.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/bytes_contracts.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/constructor_contracts.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/contract_caller_tester.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/emitter_contract.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/event_contracts.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/extended_resolver.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/fallback_function_contract.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/function_name_tester_contract.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/math_contract.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/offchain_lookup.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/offchain_resolver.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/panic_errors_contract.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/payable_tester.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/receive_function_contracts.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/reflector_contracts.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/revert_contract.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/simple_resolver.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/storage_contract.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/string_contract.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contract_sources/contract_data/tuple_contracts.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/contracts.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/datatypes.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/decorators.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/empty.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/encoding.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/ens.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/error_formatters_utils.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/fee_utils.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/filters.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/formatters.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/function_identifiers.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/http.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/hypothesis.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/module.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/module_testing/__init__.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/module_testing/go_ethereum_admin_module.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/module_testing/go_ethereum_personal_module.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/module_testing/go_ethereum_txpool_module.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/module_testing/net_module.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/module_testing/persistent_connection_provider.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/module_testing/utils.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/module_testing/web3_module.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/normalizers.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/threads.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/type_conversion.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/utility_methods.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/validation.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/_utils/windows.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/auto/__init__.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/auto/gethdev.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/beacon/__init__.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/beacon/api_endpoints.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/beacon/async_beacon.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/beacon/beacon.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/constants.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/contract/__init__.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/contract/async_contract.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/contract/contract.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/contract/utils.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/eth/__init__.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/eth/base_eth.py +0 -0
- {web3-7.0.0b1/ethpm/backends → web3-7.0.0b3/web3/gas_strategies}/__init__.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/gas_strategies/rpc.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/gas_strategies/time_based.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/geth.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/logs.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/method.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/middleware/attrdict.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/middleware/base.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/middleware/buffered_gas_estimate.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/middleware/filter.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/middleware/formatting.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/middleware/gas_price_strategy.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/middleware/names.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/middleware/proof_of_authority.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/middleware/pythonic.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/middleware/signing.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/middleware/stalecheck.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/middleware/validation.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/net.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/providers/__init__.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/providers/auto.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/providers/eth_tester/__init__.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/providers/eth_tester/defaults.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/providers/eth_tester/middleware.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/providers/persistent/__init__.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/providers/persistent/async_ipc.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/providers/persistent/persistent_connection.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/providers/persistent/utils.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/providers/persistent/websocket.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/providers/rpc/__init__.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/providers/rpc/async_rpc.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/providers/rpc/rpc.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/providers/rpc/utils.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/py.typed +0 -0
- {web3-7.0.0b1/ethpm/validation → web3-7.0.0b3/web3/scripts}/__init__.py +0 -0
- {web3-7.0.0b1/web3/_utils → web3-7.0.0b3/web3/scripts/release}/__init__.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/scripts/release/test_package.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/testing.py +0 -0
- {web3-7.0.0b1/web3/_utils/contract_sources → web3-7.0.0b3/web3/tools/benchmark}/__init__.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/tools/benchmark/node.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/tools/benchmark/reporting.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/tools/benchmark/utils.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/tracing.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/utils/__init__.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/utils/abi.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/utils/address.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/utils/async_exception_handling.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3/utils/exception_handling.py +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3.egg-info/dependency_links.txt +0 -0
- {web3-7.0.0b1 → web3-7.0.0b3}/web3.egg-info/not-zip-safe +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: web3
|
|
3
|
-
Version: 7.0.
|
|
3
|
+
Version: 7.0.0b3
|
|
4
4
|
Summary: web3.py
|
|
5
5
|
Home-page: https://github.com/ethereum/web3.py
|
|
6
6
|
Author: The Ethereum Foundation
|
|
@@ -26,8 +26,6 @@ Requires-Dist: eth-hash[pycryptodome]>=0.5.1
|
|
|
26
26
|
Requires-Dist: eth-typing>=3.0.0
|
|
27
27
|
Requires-Dist: eth-utils>=4.0.0
|
|
28
28
|
Requires-Dist: hexbytes<0.4.0,>=0.1.0
|
|
29
|
-
Requires-Dist: jsonschema>=4.0.0
|
|
30
|
-
Requires-Dist: protobuf>=4.21.6
|
|
31
29
|
Requires-Dist: pydantic>=2.4.0
|
|
32
30
|
Requires-Dist: pywin32>=223; platform_system == "Windows"
|
|
33
31
|
Requires-Dist: requests>=2.16.0
|
|
@@ -39,12 +37,12 @@ Requires-Dist: eth-tester[py-evm]==v0.10.0-b.3; extra == "tester"
|
|
|
39
37
|
Requires-Dist: py-geth>=4.1.0; extra == "tester"
|
|
40
38
|
Provides-Extra: linter
|
|
41
39
|
Requires-Dist: black>=22.1.0; extra == "linter"
|
|
40
|
+
Requires-Dist: blocklint>=0.2.4; extra == "linter"
|
|
42
41
|
Requires-Dist: flake8==3.8.3; extra == "linter"
|
|
43
42
|
Requires-Dist: isort>=5.11.0; extra == "linter"
|
|
44
43
|
Requires-Dist: mypy==1.4.1; extra == "linter"
|
|
45
44
|
Requires-Dist: types-setuptools>=57.4.4; extra == "linter"
|
|
46
45
|
Requires-Dist: types-requests>=2.26.1; extra == "linter"
|
|
47
|
-
Requires-Dist: types-protobuf==3.19.13; extra == "linter"
|
|
48
46
|
Provides-Extra: docs
|
|
49
47
|
Requires-Dist: sphinx>=5.3.0; extra == "docs"
|
|
50
48
|
Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "docs"
|
|
@@ -53,16 +51,15 @@ Provides-Extra: dev
|
|
|
53
51
|
Requires-Dist: eth-tester[py-evm]==v0.10.0-b.3; extra == "dev"
|
|
54
52
|
Requires-Dist: py-geth>=4.1.0; extra == "dev"
|
|
55
53
|
Requires-Dist: black>=22.1.0; extra == "dev"
|
|
54
|
+
Requires-Dist: blocklint>=0.2.4; extra == "dev"
|
|
56
55
|
Requires-Dist: flake8==3.8.3; extra == "dev"
|
|
57
56
|
Requires-Dist: isort>=5.11.0; extra == "dev"
|
|
58
57
|
Requires-Dist: mypy==1.4.1; extra == "dev"
|
|
59
58
|
Requires-Dist: types-setuptools>=57.4.4; extra == "dev"
|
|
60
59
|
Requires-Dist: types-requests>=2.26.1; extra == "dev"
|
|
61
|
-
Requires-Dist: types-protobuf==3.19.13; extra == "dev"
|
|
62
60
|
Requires-Dist: sphinx>=5.3.0; extra == "dev"
|
|
63
61
|
Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "dev"
|
|
64
62
|
Requires-Dist: towncrier<22,>=21; extra == "dev"
|
|
65
|
-
Requires-Dist: ipfshttpclient==0.8.0a2; extra == "dev"
|
|
66
63
|
Requires-Dist: bumpversion; extra == "dev"
|
|
67
64
|
Requires-Dist: flaky>=3.7.0; extra == "dev"
|
|
68
65
|
Requires-Dist: hypothesis>=3.31.2; extra == "dev"
|
|
@@ -76,10 +73,7 @@ Requires-Dist: setuptools>=38.6.0; extra == "dev"
|
|
|
76
73
|
Requires-Dist: tox>=3.18.0; extra == "dev"
|
|
77
74
|
Requires-Dist: tqdm>4.32; extra == "dev"
|
|
78
75
|
Requires-Dist: twine>=1.13; extra == "dev"
|
|
79
|
-
Requires-Dist: when-changed>=0.3.0; extra == "dev"
|
|
80
76
|
Requires-Dist: build>=0.9.0; extra == "dev"
|
|
81
|
-
Provides-Extra: ipfs
|
|
82
|
-
Requires-Dist: ipfshttpclient==0.8.0a2; extra == "ipfs"
|
|
83
77
|
|
|
84
78
|
# web3.py
|
|
85
79
|
|
|
@@ -89,7 +89,7 @@ class AsyncENS(BaseENS):
|
|
|
89
89
|
like getting the address for a name.
|
|
90
90
|
|
|
91
91
|
Unless otherwise specified, all addresses are assumed to be a `str` in
|
|
92
|
-
`checksum format <https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md>`_,
|
|
92
|
+
`checksum format <https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md>`_, # blocklint: pragma # noqa: E501
|
|
93
93
|
like: ``"0x314159265dD8dbb310642f98f50C066173C1259b"``
|
|
94
94
|
"""
|
|
95
95
|
|
|
@@ -100,7 +100,7 @@ class AsyncENS(BaseENS):
|
|
|
100
100
|
self,
|
|
101
101
|
provider: "AsyncBaseProvider" = cast("AsyncBaseProvider", default),
|
|
102
102
|
addr: ChecksumAddress = None,
|
|
103
|
-
|
|
103
|
+
middleware: Optional[Sequence[Tuple["Middleware", str]]] = None,
|
|
104
104
|
) -> None:
|
|
105
105
|
"""
|
|
106
106
|
:param provider: a single provider used to connect to Ethereum
|
|
@@ -108,7 +108,7 @@ class AsyncENS(BaseENS):
|
|
|
108
108
|
:param hex-string addr: the address of the ENS registry on-chain.
|
|
109
109
|
If not provided, ENS.py will default to the mainnet ENS registry address.
|
|
110
110
|
"""
|
|
111
|
-
self.w3 = init_async_web3(provider,
|
|
111
|
+
self.w3 = init_async_web3(provider, middleware)
|
|
112
112
|
|
|
113
113
|
ens_addr = addr if addr else ENS_MAINNET_ADDR
|
|
114
114
|
self.ens = self.w3.eth.contract(abi=abis.ENS, address=ens_addr)
|
|
@@ -129,10 +129,8 @@ class AsyncENS(BaseENS):
|
|
|
129
129
|
provided, defaults to the mainnet ENS registry address.
|
|
130
130
|
"""
|
|
131
131
|
provider = w3.manager.provider
|
|
132
|
-
|
|
133
|
-
ns = cls(
|
|
134
|
-
cast("AsyncBaseProvider", provider), addr=addr, middlewares=middlewares
|
|
135
|
-
)
|
|
132
|
+
middleware = w3.middleware_onion.middleware
|
|
133
|
+
ns = cls(cast("AsyncBaseProvider", provider), addr=addr, middleware=middleware)
|
|
136
134
|
|
|
137
135
|
# inherit strict bytes checking from w3 instance
|
|
138
136
|
ns.strict_bytes_type_checking = w3.strict_bytes_type_checking
|
|
@@ -492,7 +490,7 @@ class AsyncENS(BaseENS):
|
|
|
492
490
|
):
|
|
493
491
|
contract_func_with_args = (fn_name, [node])
|
|
494
492
|
|
|
495
|
-
calldata = resolver.
|
|
493
|
+
calldata = resolver.encode_abi(*contract_func_with_args)
|
|
496
494
|
contract_call_result = await resolver.caller.resolve(
|
|
497
495
|
ens_encode_name(normal_name),
|
|
498
496
|
calldata,
|
|
@@ -88,7 +88,7 @@ class ENS(BaseENS):
|
|
|
88
88
|
like getting the address for a name.
|
|
89
89
|
|
|
90
90
|
Unless otherwise specified, all addresses are assumed to be a `str` in
|
|
91
|
-
`checksum format <https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md>`_,
|
|
91
|
+
`checksum format <https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md>`_, # blocklint: pragma # noqa: E501
|
|
92
92
|
like: ``"0x314159265dD8dbb310642f98f50C066173C1259b"``
|
|
93
93
|
"""
|
|
94
94
|
|
|
@@ -99,7 +99,7 @@ class ENS(BaseENS):
|
|
|
99
99
|
self,
|
|
100
100
|
provider: "BaseProvider" = cast("BaseProvider", default),
|
|
101
101
|
addr: ChecksumAddress = None,
|
|
102
|
-
|
|
102
|
+
middleware: Optional[Sequence[Tuple["Middleware", str]]] = None,
|
|
103
103
|
) -> None:
|
|
104
104
|
"""
|
|
105
105
|
:param provider: a single provider used to connect to Ethereum
|
|
@@ -108,7 +108,7 @@ class ENS(BaseENS):
|
|
|
108
108
|
If not provided, ENS.py will default to the mainnet ENS
|
|
109
109
|
registry address.
|
|
110
110
|
"""
|
|
111
|
-
self.w3 = init_web3(provider,
|
|
111
|
+
self.w3 = init_web3(provider, middleware)
|
|
112
112
|
|
|
113
113
|
ens_addr = addr if addr else ENS_MAINNET_ADDR
|
|
114
114
|
self.ens = self.w3.eth.contract(abi=abis.ENS, address=ens_addr)
|
|
@@ -129,8 +129,8 @@ class ENS(BaseENS):
|
|
|
129
129
|
provided, defaults to the mainnet ENS registry address.
|
|
130
130
|
"""
|
|
131
131
|
provider = w3.manager.provider
|
|
132
|
-
|
|
133
|
-
ns = cls(cast("BaseProvider", provider), addr=addr,
|
|
132
|
+
middleware = w3.middleware_onion.middleware
|
|
133
|
+
ns = cls(cast("BaseProvider", 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
|
|
@@ -477,7 +477,7 @@ class ENS(BaseENS):
|
|
|
477
477
|
if _resolver_supports_interface(resolver, ENS_EXTENDED_RESOLVER_INTERFACE_ID):
|
|
478
478
|
contract_func_with_args = (fn_name, [node])
|
|
479
479
|
|
|
480
|
-
calldata = resolver.
|
|
480
|
+
calldata = resolver.encode_abi(*contract_func_with_args)
|
|
481
481
|
contract_call_result = resolver.caller.resolve(
|
|
482
482
|
ens_encode_name(normal_name),
|
|
483
483
|
calldata,
|
|
@@ -35,9 +35,6 @@ from hexbytes import (
|
|
|
35
35
|
HexBytes,
|
|
36
36
|
)
|
|
37
37
|
|
|
38
|
-
from ._normalization import (
|
|
39
|
-
normalize_name_ensip15,
|
|
40
|
-
)
|
|
41
38
|
from .constants import (
|
|
42
39
|
ACCEPTABLE_STALE_HOURS,
|
|
43
40
|
AUCTION_START_GAS_CONSTANT,
|
|
@@ -81,7 +78,7 @@ def Web3() -> Type["_Web3"]:
|
|
|
81
78
|
|
|
82
79
|
def init_web3(
|
|
83
80
|
provider: "BaseProvider" = cast("BaseProvider", default),
|
|
84
|
-
|
|
81
|
+
middleware: Optional[Sequence[Tuple["Middleware", str]]] = None,
|
|
85
82
|
) -> "_Web3":
|
|
86
83
|
from web3 import (
|
|
87
84
|
Web3 as Web3Main,
|
|
@@ -93,7 +90,7 @@ def init_web3(
|
|
|
93
90
|
if provider is default:
|
|
94
91
|
w3 = Web3Main(ens=None, modules={"eth": (EthMain)})
|
|
95
92
|
else:
|
|
96
|
-
w3 = Web3Main(provider,
|
|
93
|
+
w3 = Web3Main(provider, middleware, ens=None, modules={"eth": (EthMain)})
|
|
97
94
|
|
|
98
95
|
return customize_web3(w3)
|
|
99
96
|
|
|
@@ -117,13 +114,18 @@ def customize_web3(w3: "_Web3") -> "_Web3":
|
|
|
117
114
|
def normalize_name(name: str) -> str:
|
|
118
115
|
"""
|
|
119
116
|
Clean the fully qualified name, as defined in ENS `EIP-137
|
|
120
|
-
<https://github.com/ethereum/EIPs/blob/master/EIPS/eip-137.md#name-syntax>`_
|
|
117
|
+
<https://github.com/ethereum/EIPs/blob/master/EIPS/eip-137.md#name-syntax>`_ # blocklint: pragma # noqa: E501
|
|
121
118
|
|
|
122
119
|
This does *not* enforce whether ``name`` is a label or fully qualified domain.
|
|
123
120
|
|
|
124
121
|
:param str name: the dot-separated ENS name
|
|
125
122
|
:raises InvalidName: if ``name`` has invalid syntax
|
|
126
123
|
"""
|
|
124
|
+
# Defer import because module initialization takes > 0.1 ms
|
|
125
|
+
from ._normalization import (
|
|
126
|
+
normalize_name_ensip15,
|
|
127
|
+
)
|
|
128
|
+
|
|
127
129
|
if is_empty_name(name):
|
|
128
130
|
return ""
|
|
129
131
|
elif isinstance(name, (bytes, bytearray)):
|
|
@@ -169,7 +171,7 @@ def ens_encode_name(name: str) -> bytes:
|
|
|
169
171
|
def is_valid_name(name: str) -> bool:
|
|
170
172
|
"""
|
|
171
173
|
Validate whether the fully qualified name is valid, as defined in ENS `EIP-137
|
|
172
|
-
<https://github.com/ethereum/EIPs/blob/master/EIPS/eip-137.md#name-syntax>`_
|
|
174
|
+
<https://github.com/ethereum/EIPs/blob/master/EIPS/eip-137.md#name-syntax>`_ # blocklint: pragma # noqa: E501
|
|
173
175
|
|
|
174
176
|
:param str name: the dot-separated ENS name
|
|
175
177
|
:returns: True if ``name`` is set, and :meth:`~ens.ENS.nameprep` will not
|
|
@@ -229,7 +231,7 @@ def raw_name_to_hash(name: str) -> HexBytes:
|
|
|
229
231
|
behind the scenes. For advanced usage, it is a helpful utility.
|
|
230
232
|
|
|
231
233
|
This normalizes the name with `nameprep
|
|
232
|
-
<https://github.com/ethereum/EIPs/blob/master/EIPS/eip-137.md#name-syntax>`_
|
|
234
|
+
<https://github.com/ethereum/EIPs/blob/master/EIPS/eip-137.md#name-syntax>`_ # blocklint: pragma # noqa: E501
|
|
233
235
|
before hashing.
|
|
234
236
|
|
|
235
237
|
:param str name: ENS name to hash
|
|
@@ -299,7 +301,7 @@ def get_abi_output_types(abi: "ABIFunction") -> List[str]:
|
|
|
299
301
|
|
|
300
302
|
def init_async_web3(
|
|
301
303
|
provider: "AsyncBaseProvider" = cast("AsyncBaseProvider", default),
|
|
302
|
-
|
|
304
|
+
middleware: Optional[Sequence[Tuple["Middleware", str]]] = (),
|
|
303
305
|
) -> "AsyncWeb3":
|
|
304
306
|
from web3 import (
|
|
305
307
|
AsyncWeb3 as AsyncWeb3Main,
|
|
@@ -311,13 +313,13 @@ def init_async_web3(
|
|
|
311
313
|
StalecheckMiddlewareBuilder,
|
|
312
314
|
)
|
|
313
315
|
|
|
314
|
-
|
|
315
|
-
for i, (
|
|
316
|
+
middleware = list(middleware)
|
|
317
|
+
for i, (mw, name) in enumerate(middleware):
|
|
316
318
|
if name == "ens_name_to_address":
|
|
317
|
-
|
|
319
|
+
middleware.pop(i)
|
|
318
320
|
|
|
319
|
-
if "stalecheck" not in (name for mw, name in
|
|
320
|
-
|
|
321
|
+
if "stalecheck" not in (name for mw, name in middleware):
|
|
322
|
+
middleware.append(
|
|
321
323
|
(
|
|
322
324
|
StalecheckMiddlewareBuilder.build(ACCEPTABLE_STALE_HOURS * 3600),
|
|
323
325
|
"stalecheck",
|
|
@@ -326,12 +328,12 @@ def init_async_web3(
|
|
|
326
328
|
|
|
327
329
|
if provider is default:
|
|
328
330
|
async_w3 = AsyncWeb3Main(
|
|
329
|
-
|
|
331
|
+
middleware=middleware, ens=None, modules={"eth": (AsyncEthMain)}
|
|
330
332
|
)
|
|
331
333
|
else:
|
|
332
334
|
async_w3 = AsyncWeb3Main(
|
|
333
335
|
provider,
|
|
334
|
-
|
|
336
|
+
middleware=middleware,
|
|
335
337
|
ens=None,
|
|
336
338
|
modules={"eth": (AsyncEthMain)},
|
|
337
339
|
)
|
|
@@ -11,12 +11,12 @@ extras_require = {
|
|
|
11
11
|
],
|
|
12
12
|
"linter": [
|
|
13
13
|
"black>=22.1.0",
|
|
14
|
+
"blocklint>=0.2.4",
|
|
14
15
|
"flake8==3.8.3",
|
|
15
16
|
"isort>=5.11.0",
|
|
16
17
|
"mypy==1.4.1",
|
|
17
18
|
"types-setuptools>=57.4.4",
|
|
18
19
|
"types-requests>=2.26.1",
|
|
19
|
-
"types-protobuf==3.19.13",
|
|
20
20
|
],
|
|
21
21
|
"docs": [
|
|
22
22
|
"sphinx>=5.3.0",
|
|
@@ -37,19 +37,14 @@ extras_require = {
|
|
|
37
37
|
"tox>=3.18.0",
|
|
38
38
|
"tqdm>4.32",
|
|
39
39
|
"twine>=1.13",
|
|
40
|
-
"when-changed>=0.3.0",
|
|
41
40
|
"build>=0.9.0",
|
|
42
41
|
],
|
|
43
|
-
"ipfs": [
|
|
44
|
-
"ipfshttpclient==0.8.0a2",
|
|
45
|
-
],
|
|
46
42
|
}
|
|
47
43
|
|
|
48
44
|
extras_require["dev"] = (
|
|
49
45
|
extras_require["tester"]
|
|
50
46
|
+ extras_require["linter"]
|
|
51
47
|
+ extras_require["docs"]
|
|
52
|
-
+ extras_require["ipfs"]
|
|
53
48
|
+ extras_require["dev"]
|
|
54
49
|
)
|
|
55
50
|
|
|
@@ -59,7 +54,7 @@ with open("./README.md") as readme:
|
|
|
59
54
|
setup(
|
|
60
55
|
name="web3",
|
|
61
56
|
# *IMPORTANT*: Don't manually change the version here. Use the 'bumpversion' utility.
|
|
62
|
-
version="7.0.0-beta.
|
|
57
|
+
version="7.0.0-beta.3",
|
|
63
58
|
description="""web3.py""",
|
|
64
59
|
long_description_content_type="text/markdown",
|
|
65
60
|
long_description=long_description,
|
|
@@ -75,8 +70,6 @@ setup(
|
|
|
75
70
|
"eth-typing>=3.0.0",
|
|
76
71
|
"eth-utils>=4.0.0",
|
|
77
72
|
"hexbytes>=0.1.0,<0.4.0",
|
|
78
|
-
"jsonschema>=4.0.0",
|
|
79
|
-
"protobuf>=4.21.6",
|
|
80
73
|
"pydantic>=2.4.0",
|
|
81
74
|
"pywin32>=223;platform_system=='Windows'",
|
|
82
75
|
"requests>=2.16.0",
|
|
@@ -86,8 +79,7 @@ setup(
|
|
|
86
79
|
],
|
|
87
80
|
python_requires=">=3.8",
|
|
88
81
|
extras_require=extras_require,
|
|
89
|
-
py_modules=["web3", "ens"
|
|
90
|
-
entry_points={"pytest11": ["pytest_ethereum = web3.tools.pytest_ethereum.plugins"]},
|
|
82
|
+
py_modules=["web3", "ens"],
|
|
91
83
|
license="MIT",
|
|
92
84
|
zip_safe=False,
|
|
93
85
|
keywords="ethereum",
|
|
@@ -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,
|
|
@@ -29,6 +29,7 @@ from eth_abi.codec import (
|
|
|
29
29
|
from eth_typing import (
|
|
30
30
|
ChecksumAddress,
|
|
31
31
|
HexStr,
|
|
32
|
+
Primitives,
|
|
32
33
|
TypeStr,
|
|
33
34
|
)
|
|
34
35
|
from eth_utils import (
|
|
@@ -99,6 +100,12 @@ if TYPE_CHECKING:
|
|
|
99
100
|
)
|
|
100
101
|
|
|
101
102
|
|
|
103
|
+
def _log_entry_data_to_bytes(
|
|
104
|
+
log_entry_data: Union[Primitives, HexStr, str],
|
|
105
|
+
) -> bytes:
|
|
106
|
+
return hexstr_if_str(to_bytes, log_entry_data)
|
|
107
|
+
|
|
108
|
+
|
|
102
109
|
def construct_event_topic_set(
|
|
103
110
|
event_abi: ABIEvent,
|
|
104
111
|
abi_codec: ABICodec,
|
|
@@ -228,23 +235,25 @@ def get_event_data(
|
|
|
228
235
|
log_topics = log_entry["topics"]
|
|
229
236
|
elif not log_entry["topics"]:
|
|
230
237
|
raise MismatchedABI("Expected non-anonymous event to have 1 or more topics")
|
|
231
|
-
|
|
232
|
-
|
|
238
|
+
elif event_abi_to_log_topic(dict(event_abi)) != _log_entry_data_to_bytes(
|
|
239
|
+
log_entry["topics"][0]
|
|
240
|
+
):
|
|
233
241
|
raise MismatchedABI("The event signature did not match the provided ABI")
|
|
234
242
|
else:
|
|
235
243
|
log_topics = log_entry["topics"][1:]
|
|
236
244
|
|
|
245
|
+
log_topics_bytes = [_log_entry_data_to_bytes(topic) for topic in log_topics]
|
|
237
246
|
log_topics_abi = get_indexed_event_inputs(event_abi)
|
|
238
247
|
log_topic_normalized_inputs = normalize_event_input_types(log_topics_abi)
|
|
239
248
|
log_topic_types = get_event_abi_types_for_decoding(log_topic_normalized_inputs)
|
|
240
249
|
log_topic_names = get_abi_input_names(ABIEvent({"inputs": log_topics_abi}))
|
|
241
250
|
|
|
242
|
-
if len(
|
|
251
|
+
if len(log_topics_bytes) != len(log_topic_types):
|
|
243
252
|
raise LogTopicError(
|
|
244
|
-
f"Expected {len(log_topic_types)} log topics. Got {len(
|
|
253
|
+
f"Expected {len(log_topic_types)} log topics. Got {len(log_topics_bytes)}"
|
|
245
254
|
)
|
|
246
255
|
|
|
247
|
-
log_data =
|
|
256
|
+
log_data = _log_entry_data_to_bytes(log_entry["data"])
|
|
248
257
|
log_data_abi = exclude_indexed_event_inputs(event_abi)
|
|
249
258
|
log_data_normalized_inputs = normalize_event_input_types(log_data_abi)
|
|
250
259
|
log_data_types = get_event_abi_types_for_decoding(log_data_normalized_inputs)
|
|
@@ -270,7 +279,7 @@ def get_event_data(
|
|
|
270
279
|
|
|
271
280
|
decoded_topic_data = [
|
|
272
281
|
abi_codec.decode([topic_type], topic_data)[0]
|
|
273
|
-
for topic_type, topic_data in zip(log_topic_types,
|
|
282
|
+
for topic_type, topic_data in zip(log_topic_types, log_topics_bytes)
|
|
274
283
|
]
|
|
275
284
|
normalized_topic_data = map_abi_data(
|
|
276
285
|
BASE_RETURN_NORMALIZERS, log_topic_types, decoded_topic_data
|
|
@@ -18,22 +18,20 @@ def percentile(
|
|
|
18
18
|
)
|
|
19
19
|
if percentile is None:
|
|
20
20
|
raise ValueError(f"Expected a percentile choice, got {percentile}")
|
|
21
|
+
if percentile < 0 or percentile > 100:
|
|
22
|
+
raise ValueError("percentile must be in the range [0, 100]")
|
|
21
23
|
|
|
22
24
|
sorted_values = sorted(values)
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
if
|
|
26
|
-
|
|
27
|
-
if index < 0:
|
|
28
|
-
return sorted_values[0]
|
|
29
|
-
else:
|
|
30
|
-
index = rank
|
|
26
|
+
index = len(values) * percentile / 100 - 1
|
|
27
|
+
if index < 0:
|
|
28
|
+
return sorted_values[0]
|
|
31
29
|
|
|
32
|
-
|
|
30
|
+
fractional = index % 1
|
|
31
|
+
if fractional == 0:
|
|
33
32
|
return sorted_values[int(index)]
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return lower + fractional * (higher - lower)
|
|
33
|
+
|
|
34
|
+
integer = int(index - fractional)
|
|
35
|
+
lower = sorted_values[integer]
|
|
36
|
+
higher = sorted_values[integer + 1]
|
|
37
|
+
return lower + fractional * (higher - lower)
|
|
@@ -233,6 +233,10 @@ TRANSACTION_RESULT_FORMATTERS = {
|
|
|
233
233
|
),
|
|
234
234
|
"input": HexBytes,
|
|
235
235
|
"data": HexBytes, # Nethermind, for example, returns both `input` and `data`
|
|
236
|
+
"maxFeePerBlobGas": to_integer_if_hex,
|
|
237
|
+
"blobVersionedHashes": apply_formatter_if(
|
|
238
|
+
is_not_null, apply_formatter_to_array(to_hexbytes(32))
|
|
239
|
+
),
|
|
236
240
|
}
|
|
237
241
|
|
|
238
242
|
|
|
@@ -516,6 +520,7 @@ PYTHONIC_REQUEST_FORMATTERS: Dict[RPCEndpoint, Callable[..., Any]] = {
|
|
|
516
520
|
),
|
|
517
521
|
RPC.eth_getBalance: apply_formatter_at_index(to_hex_if_integer, 1),
|
|
518
522
|
RPC.eth_getBlockByNumber: apply_formatter_at_index(to_hex_if_integer, 0),
|
|
523
|
+
RPC.eth_getBlockReceipts: apply_formatter_at_index(to_hex_if_integer, 0),
|
|
519
524
|
RPC.eth_getBlockTransactionCountByNumber: apply_formatter_at_index(
|
|
520
525
|
to_hex_if_integer,
|
|
521
526
|
0,
|
|
@@ -723,6 +728,7 @@ PYTHONIC_RESULT_FORMATTERS: Dict[RPCEndpoint, Callable[..., Any]] = {
|
|
|
723
728
|
RPC.eth_getBalance: to_integer_if_hex,
|
|
724
729
|
RPC.eth_getBlockByHash: apply_formatter_if(is_not_null, block_formatter),
|
|
725
730
|
RPC.eth_getBlockByNumber: apply_formatter_if(is_not_null, block_formatter),
|
|
731
|
+
RPC.eth_getBlockReceipts: apply_formatter_to_array(receipt_formatter),
|
|
726
732
|
RPC.eth_getBlockTransactionCountByHash: to_integer_if_hex,
|
|
727
733
|
RPC.eth_getBlockTransactionCountByNumber: to_integer_if_hex,
|
|
728
734
|
RPC.eth_getCode: HexBytes,
|
|
@@ -900,6 +906,7 @@ def raise_transaction_not_found_with_index(
|
|
|
900
906
|
NULL_RESULT_FORMATTERS: Dict[RPCEndpoint, Callable[..., Any]] = {
|
|
901
907
|
RPC.eth_getBlockByHash: raise_block_not_found,
|
|
902
908
|
RPC.eth_getBlockByNumber: raise_block_not_found,
|
|
909
|
+
RPC.eth_getBlockReceipts: raise_block_not_found,
|
|
903
910
|
RPC.eth_getBlockTransactionCountByHash: raise_block_not_found,
|
|
904
911
|
RPC.eth_getBlockTransactionCountByNumber: raise_block_not_found,
|
|
905
912
|
RPC.eth_getUncleCountByBlockHash: raise_block_not_found,
|
|
@@ -977,6 +977,39 @@ class AsyncEthModuleTest:
|
|
|
977
977
|
assert block is not None
|
|
978
978
|
assert isinstance(block["number"], int)
|
|
979
979
|
|
|
980
|
+
@pytest.mark.asyncio
|
|
981
|
+
async def test_eth_getBlockReceipts_hash(
|
|
982
|
+
self, async_w3: "AsyncWeb3", async_empty_block: BlockData
|
|
983
|
+
) -> None:
|
|
984
|
+
receipts = await async_w3.eth.get_block_receipts(async_empty_block["hash"])
|
|
985
|
+
assert isinstance(receipts, list)
|
|
986
|
+
|
|
987
|
+
@pytest.mark.asyncio
|
|
988
|
+
async def test_eth_getBlockReceipts_not_found(self, async_w3: "AsyncWeb3") -> None:
|
|
989
|
+
with pytest.raises(BlockNotFound):
|
|
990
|
+
await async_w3.eth.get_block_receipts(UNKNOWN_HASH)
|
|
991
|
+
|
|
992
|
+
@pytest.mark.asyncio
|
|
993
|
+
async def test_eth_getBlockReceipts_with_integer(
|
|
994
|
+
self, async_w3: "AsyncWeb3", async_empty_block: BlockData
|
|
995
|
+
) -> None:
|
|
996
|
+
receipts = await async_w3.eth.get_block_receipts(async_empty_block["number"])
|
|
997
|
+
assert isinstance(receipts, list)
|
|
998
|
+
|
|
999
|
+
@pytest.mark.asyncio
|
|
1000
|
+
async def test_eth_getBlockReceipts_safe(
|
|
1001
|
+
self, async_w3: "AsyncWeb3", async_empty_block: BlockData
|
|
1002
|
+
) -> None:
|
|
1003
|
+
receipts = await async_w3.eth.get_block_receipts("safe")
|
|
1004
|
+
assert isinstance(receipts, list)
|
|
1005
|
+
|
|
1006
|
+
@pytest.mark.asyncio
|
|
1007
|
+
async def test_eth_getBlockReceipts_finalized(
|
|
1008
|
+
self, async_w3: "AsyncWeb3", async_empty_block: BlockData
|
|
1009
|
+
) -> None:
|
|
1010
|
+
receipts = await async_w3.eth.get_block_receipts("finalized")
|
|
1011
|
+
assert isinstance(receipts, list)
|
|
1012
|
+
|
|
980
1013
|
@pytest.mark.asyncio
|
|
981
1014
|
async def test_eth_get_block_by_number_full_transactions(
|
|
982
1015
|
self, async_w3: "AsyncWeb3", async_block_with_txn: BlockData
|
|
@@ -1303,7 +1336,7 @@ class AsyncEthModuleTest:
|
|
|
1303
1336
|
async_revert_contract: "Contract",
|
|
1304
1337
|
async_unlocked_account: ChecksumAddress,
|
|
1305
1338
|
) -> None:
|
|
1306
|
-
data = async_revert_contract.
|
|
1339
|
+
data = async_revert_contract.encode_abi(
|
|
1307
1340
|
fn_name="UnauthorizedWithMessage", args=["You are not authorized"]
|
|
1308
1341
|
)
|
|
1309
1342
|
txn_params = async_revert_contract._prepare_transaction(
|
|
@@ -1323,7 +1356,7 @@ class AsyncEthModuleTest:
|
|
|
1323
1356
|
async_revert_contract: "Contract",
|
|
1324
1357
|
async_unlocked_account: ChecksumAddress,
|
|
1325
1358
|
) -> None:
|
|
1326
|
-
data = async_revert_contract.
|
|
1359
|
+
data = async_revert_contract.encode_abi(fn_name="Unauthorized")
|
|
1327
1360
|
txn_params = async_revert_contract._prepare_transaction(
|
|
1328
1361
|
fn_name="customErrorWithoutMessage",
|
|
1329
1362
|
transaction={
|
|
@@ -3755,7 +3788,7 @@ class EthModuleTest:
|
|
|
3755
3788
|
revert_contract: "Contract",
|
|
3756
3789
|
unlocked_account: ChecksumAddress,
|
|
3757
3790
|
) -> None:
|
|
3758
|
-
data = revert_contract.
|
|
3791
|
+
data = revert_contract.encode_abi(
|
|
3759
3792
|
fn_name="UnauthorizedWithMessage", args=["You are not authorized"]
|
|
3760
3793
|
)
|
|
3761
3794
|
txn_params = revert_contract._prepare_transaction(
|
|
@@ -3775,7 +3808,7 @@ class EthModuleTest:
|
|
|
3775
3808
|
revert_contract: "Contract",
|
|
3776
3809
|
unlocked_account: ChecksumAddress,
|
|
3777
3810
|
) -> None:
|
|
3778
|
-
data = revert_contract.
|
|
3811
|
+
data = revert_contract.encode_abi(fn_name="Unauthorized")
|
|
3779
3812
|
txn_params = revert_contract._prepare_transaction(
|
|
3780
3813
|
fn_name="customErrorWithoutMessage",
|
|
3781
3814
|
transaction={
|
|
@@ -4064,7 +4097,7 @@ class EthModuleTest:
|
|
|
4064
4097
|
revert_contract: "Contract",
|
|
4065
4098
|
unlocked_account: ChecksumAddress,
|
|
4066
4099
|
) -> None:
|
|
4067
|
-
data = revert_contract.
|
|
4100
|
+
data = revert_contract.encode_abi(
|
|
4068
4101
|
fn_name="UnauthorizedWithMessage", args=["You are not authorized"]
|
|
4069
4102
|
)
|
|
4070
4103
|
txn_params = revert_contract._prepare_transaction(
|
|
@@ -4084,7 +4117,7 @@ class EthModuleTest:
|
|
|
4084
4117
|
revert_contract: "Contract",
|
|
4085
4118
|
unlocked_account: ChecksumAddress,
|
|
4086
4119
|
) -> None:
|
|
4087
|
-
data = revert_contract.
|
|
4120
|
+
data = revert_contract.encode_abi(fn_name="Unauthorized")
|
|
4088
4121
|
txn_params = revert_contract._prepare_transaction(
|
|
4089
4122
|
fn_name="customErrorWithoutMessage",
|
|
4090
4123
|
transaction={
|
|
@@ -4224,6 +4257,34 @@ class EthModuleTest:
|
|
|
4224
4257
|
transaction = block["transactions"][0]
|
|
4225
4258
|
assert transaction["hash"] == block_with_txn["transactions"][0] # type: ignore
|
|
4226
4259
|
|
|
4260
|
+
def test_eth_getBlockReceipts_hash(
|
|
4261
|
+
self, w3: "Web3", empty_block: BlockData
|
|
4262
|
+
) -> None:
|
|
4263
|
+
receipts = w3.eth.get_block_receipts(empty_block["hash"])
|
|
4264
|
+
assert isinstance(receipts, list)
|
|
4265
|
+
|
|
4266
|
+
def test_eth_getBlockReceipts_not_found(self, w3: "Web3") -> None:
|
|
4267
|
+
with pytest.raises(BlockNotFound):
|
|
4268
|
+
w3.eth.get_block_receipts(UNKNOWN_HASH)
|
|
4269
|
+
|
|
4270
|
+
def test_eth_getBlockReceipts_with_integer(
|
|
4271
|
+
self, w3: "Web3", empty_block: BlockData
|
|
4272
|
+
) -> None:
|
|
4273
|
+
receipts = w3.eth.get_block_receipts(empty_block["number"])
|
|
4274
|
+
assert isinstance(receipts, list)
|
|
4275
|
+
|
|
4276
|
+
def test_eth_getBlockReceipts_safe(
|
|
4277
|
+
self, w3: "Web3", empty_block: BlockData
|
|
4278
|
+
) -> None:
|
|
4279
|
+
receipts = w3.eth.get_block_receipts("safe")
|
|
4280
|
+
assert isinstance(receipts, list)
|
|
4281
|
+
|
|
4282
|
+
def test_eth_getBlockReceipts_finalized(
|
|
4283
|
+
self, w3: "Web3", empty_block: BlockData
|
|
4284
|
+
) -> None:
|
|
4285
|
+
receipts = w3.eth.get_block_receipts("finalized")
|
|
4286
|
+
assert isinstance(receipts, list)
|
|
4287
|
+
|
|
4227
4288
|
def test_eth_getTransactionByHash(self, w3: "Web3", mined_txn_hash: HexStr) -> None:
|
|
4228
4289
|
transaction = w3.eth.get_transaction(mined_txn_hash)
|
|
4229
4290
|
assert is_dict(transaction)
|
|
@@ -104,7 +104,7 @@ def mock_offchain_lookup_request_response(
|
|
|
104
104
|
|
|
105
105
|
# mock response only to specified url while validating appropriate fields
|
|
106
106
|
if url_from_args == mocked_request_url:
|
|
107
|
-
assert kwargs["timeout"] ==
|
|
107
|
+
assert kwargs["timeout"] == 30
|
|
108
108
|
if http_method.upper() == "POST":
|
|
109
109
|
assert kwargs["data"] == {"data": calldata, "sender": sender}
|
|
110
110
|
return MockedResponse()
|
|
@@ -154,7 +154,7 @@ def async_mock_offchain_lookup_request_response(
|
|
|
154
154
|
|
|
155
155
|
# mock response only to specified url while validating appropriate fields
|
|
156
156
|
if url_from_args == mocked_request_url:
|
|
157
|
-
assert kwargs["timeout"] == ClientTimeout(
|
|
157
|
+
assert kwargs["timeout"] == ClientTimeout(30)
|
|
158
158
|
if http_method.upper() == "post":
|
|
159
159
|
assert kwargs["data"] == {"data": calldata, "sender": sender}
|
|
160
160
|
return AsyncMockedResponse()
|