web3 7.0.0b1__py3-none-any.whl → 7.7.0__py3-none-any.whl
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.
- ens/__init__.py +13 -2
- ens/_normalization.py +4 -4
- ens/async_ens.py +31 -21
- ens/base_ens.py +3 -1
- ens/contract_data.py +2 -2
- ens/ens.py +14 -11
- ens/exceptions.py +16 -29
- ens/specs/nf.json +1 -1
- ens/specs/normalization_spec.json +1 -1
- ens/utils.py +33 -41
- web3/__init__.py +23 -12
- web3/_utils/abi.py +162 -274
- web3/_utils/async_transactions.py +34 -20
- web3/_utils/batching.py +217 -0
- web3/_utils/blocks.py +6 -2
- web3/_utils/caching/__init__.py +12 -0
- web3/_utils/caching/caching_utils.py +433 -0
- web3/_utils/caching/request_caching_validation.py +287 -0
- web3/_utils/compat/__init__.py +2 -3
- web3/_utils/contract_sources/compile_contracts.py +1 -1
- web3/_utils/contract_sources/contract_data/ambiguous_function_contract.py +42 -0
- web3/_utils/contract_sources/contract_data/arrays_contract.py +3 -3
- web3/_utils/contract_sources/contract_data/bytes_contracts.py +5 -5
- web3/_utils/contract_sources/contract_data/constructor_contracts.py +7 -7
- web3/_utils/contract_sources/contract_data/contract_caller_tester.py +3 -3
- web3/_utils/contract_sources/contract_data/emitter_contract.py +3 -3
- web3/_utils/contract_sources/contract_data/event_contracts.py +50 -5
- web3/_utils/contract_sources/contract_data/extended_resolver.py +3 -3
- web3/_utils/contract_sources/contract_data/fallback_function_contract.py +3 -3
- web3/_utils/contract_sources/contract_data/function_name_tester_contract.py +3 -3
- web3/_utils/contract_sources/contract_data/math_contract.py +3 -3
- web3/_utils/contract_sources/contract_data/offchain_lookup.py +3 -3
- web3/_utils/contract_sources/contract_data/offchain_resolver.py +3 -3
- web3/_utils/contract_sources/contract_data/panic_errors_contract.py +3 -3
- web3/_utils/contract_sources/contract_data/payable_tester.py +3 -3
- web3/_utils/contract_sources/contract_data/receive_function_contracts.py +5 -5
- web3/_utils/contract_sources/contract_data/reflector_contracts.py +3 -3
- web3/_utils/contract_sources/contract_data/revert_contract.py +3 -3
- web3/_utils/contract_sources/contract_data/simple_resolver.py +3 -3
- web3/_utils/contract_sources/contract_data/storage_contract.py +3 -3
- web3/_utils/contract_sources/contract_data/string_contract.py +3 -3
- web3/_utils/contract_sources/contract_data/tuple_contracts.py +5 -5
- web3/_utils/contracts.py +172 -220
- web3/_utils/datatypes.py +5 -1
- web3/_utils/decorators.py +6 -1
- web3/_utils/empty.py +1 -1
- web3/_utils/encoding.py +16 -12
- web3/_utils/error_formatters_utils.py +5 -3
- web3/_utils/events.py +78 -72
- web3/_utils/fee_utils.py +1 -3
- web3/_utils/filters.py +24 -22
- web3/_utils/formatters.py +2 -2
- web3/_utils/http.py +8 -2
- web3/_utils/http_session_manager.py +314 -0
- web3/_utils/math.py +14 -15
- web3/_utils/method_formatters.py +161 -34
- web3/_utils/module.py +2 -1
- web3/_utils/module_testing/__init__.py +3 -2
- web3/_utils/module_testing/eth_module.py +736 -583
- web3/_utils/module_testing/go_ethereum_debug_module.py +128 -0
- web3/_utils/module_testing/module_testing_utils.py +81 -24
- web3/_utils/module_testing/persistent_connection_provider.py +702 -220
- web3/_utils/module_testing/utils.py +114 -33
- web3/_utils/module_testing/web3_module.py +438 -17
- web3/_utils/normalizers.py +13 -11
- web3/_utils/rpc_abi.py +10 -22
- web3/_utils/threads.py +8 -7
- web3/_utils/transactions.py +32 -25
- web3/_utils/type_conversion.py +5 -1
- web3/_utils/validation.py +20 -17
- web3/beacon/__init__.py +5 -0
- web3/beacon/api_endpoints.py +3 -0
- web3/beacon/async_beacon.py +29 -6
- web3/beacon/beacon.py +24 -6
- web3/contract/__init__.py +7 -0
- web3/contract/async_contract.py +285 -82
- web3/contract/base_contract.py +556 -258
- web3/contract/contract.py +295 -84
- web3/contract/utils.py +251 -55
- web3/datastructures.py +56 -41
- web3/eth/__init__.py +7 -0
- web3/eth/async_eth.py +89 -69
- web3/eth/base_eth.py +7 -3
- web3/eth/eth.py +43 -66
- web3/exceptions.py +158 -83
- web3/gas_strategies/time_based.py +8 -6
- web3/geth.py +53 -184
- web3/main.py +77 -43
- web3/manager.py +368 -101
- web3/method.py +43 -15
- web3/middleware/__init__.py +26 -8
- web3/middleware/attrdict.py +12 -22
- web3/middleware/base.py +55 -2
- web3/middleware/filter.py +45 -23
- web3/middleware/formatting.py +6 -3
- web3/middleware/names.py +4 -1
- web3/middleware/signing.py +15 -6
- web3/middleware/stalecheck.py +2 -1
- web3/module.py +62 -26
- web3/providers/__init__.py +21 -0
- web3/providers/async_base.py +93 -38
- web3/providers/base.py +85 -40
- web3/providers/eth_tester/__init__.py +5 -0
- web3/providers/eth_tester/defaults.py +2 -55
- web3/providers/eth_tester/main.py +57 -35
- web3/providers/eth_tester/middleware.py +16 -17
- web3/providers/ipc.py +42 -18
- web3/providers/legacy_websocket.py +27 -2
- web3/providers/persistent/__init__.py +7 -0
- web3/providers/persistent/async_ipc.py +61 -121
- web3/providers/persistent/persistent.py +324 -17
- web3/providers/persistent/persistent_connection.py +54 -5
- web3/providers/persistent/request_processor.py +136 -56
- web3/providers/persistent/subscription_container.py +56 -0
- web3/providers/persistent/subscription_manager.py +233 -0
- web3/providers/persistent/websocket.py +29 -92
- web3/providers/rpc/__init__.py +5 -0
- web3/providers/rpc/async_rpc.py +73 -18
- web3/providers/rpc/rpc.py +73 -30
- web3/providers/rpc/utils.py +1 -13
- web3/scripts/install_pre_releases.py +33 -0
- web3/scripts/parse_pygeth_version.py +16 -0
- web3/testing.py +4 -4
- web3/tracing.py +9 -5
- web3/types.py +141 -74
- web3/utils/__init__.py +64 -5
- web3/utils/abi.py +790 -10
- web3/utils/address.py +8 -0
- web3/utils/async_exception_handling.py +20 -11
- web3/utils/caching.py +34 -4
- web3/utils/exception_handling.py +9 -12
- web3/utils/subscriptions.py +285 -0
- {web3-7.0.0b1.dist-info → web3-7.7.0.dist-info}/LICENSE +1 -1
- web3-7.7.0.dist-info/METADATA +130 -0
- web3-7.7.0.dist-info/RECORD +171 -0
- {web3-7.0.0b1.dist-info → web3-7.7.0.dist-info}/WHEEL +1 -1
- {web3-7.0.0b1.dist-info → web3-7.7.0.dist-info}/top_level.txt +0 -1
- ethpm/__init__.py +0 -20
- ethpm/_utils/__init__.py +0 -0
- ethpm/_utils/backend.py +0 -93
- ethpm/_utils/cache.py +0 -44
- ethpm/_utils/chains.py +0 -119
- ethpm/_utils/contract.py +0 -35
- ethpm/_utils/deployments.py +0 -145
- ethpm/_utils/ipfs.py +0 -116
- ethpm/_utils/protobuf/__init__.py +0 -0
- ethpm/_utils/protobuf/ipfs_file_pb2.py +0 -33
- ethpm/_utils/registry.py +0 -29
- ethpm/assets/__init__.py +0 -0
- ethpm/assets/ens/v3.json +0 -1
- ethpm/assets/escrow/with_bytecode_v3.json +0 -1
- ethpm/assets/ipfs_file.proto +0 -32
- ethpm/assets/owned/output_v3.json +0 -1
- ethpm/assets/owned/with_contract_type_v3.json +0 -1
- ethpm/assets/registry/contracts/Authority.sol +0 -156
- ethpm/assets/registry/contracts/IndexedOrderedSetLib.sol +0 -106
- ethpm/assets/registry/contracts/PackageDB.sol +0 -225
- ethpm/assets/registry/contracts/PackageRegistry.sol +0 -361
- ethpm/assets/registry/contracts/PackageRegistryInterface.sol +0 -97
- ethpm/assets/registry/contracts/ReleaseDB.sol +0 -309
- ethpm/assets/registry/contracts/ReleaseValidator.sol +0 -152
- ethpm/assets/registry/solc_input.json +0 -1
- ethpm/assets/registry/solc_output.json +0 -1
- ethpm/assets/registry/v3.json +0 -1
- ethpm/assets/safe-math-lib/v3-strict-no-deployments.json +0 -1
- ethpm/assets/simple-registry/contracts/Ownable.sol +0 -63
- ethpm/assets/simple-registry/contracts/PackageRegistry.sol +0 -373
- ethpm/assets/simple-registry/contracts/PackageRegistryInterface.sol +0 -96
- ethpm/assets/simple-registry/solc_input.json +0 -33
- ethpm/assets/simple-registry/solc_output.json +0 -1
- ethpm/assets/simple-registry/v3.json +0 -1
- ethpm/assets/standard-token/output_v3.json +0 -1
- ethpm/assets/standard-token/with_bytecode_v3.json +0 -1
- ethpm/assets/vyper_registry/0.1.0.json +0 -1
- ethpm/assets/vyper_registry/registry.vy +0 -216
- ethpm/assets/vyper_registry/registry_with_delete.vy +0 -244
- ethpm/backends/__init__.py +0 -0
- ethpm/backends/base.py +0 -43
- ethpm/backends/http.py +0 -108
- ethpm/backends/ipfs.py +0 -219
- ethpm/backends/registry.py +0 -154
- ethpm/constants.py +0 -17
- ethpm/contract.py +0 -187
- ethpm/dependencies.py +0 -58
- ethpm/deployments.py +0 -80
- ethpm/ethpm-spec/examples/escrow/1.0.0-pretty.json +0 -146
- ethpm/ethpm-spec/examples/escrow/1.0.0.json +0 -1
- ethpm/ethpm-spec/examples/escrow/contracts/Escrow.sol +0 -32
- ethpm/ethpm-spec/examples/escrow/contracts/SafeSendLib.sol +0 -20
- ethpm/ethpm-spec/examples/escrow/v3-pretty.json +0 -171
- ethpm/ethpm-spec/examples/escrow/v3.json +0 -1
- ethpm/ethpm-spec/examples/owned/1.0.0-pretty.json +0 -21
- ethpm/ethpm-spec/examples/owned/1.0.0.json +0 -1
- ethpm/ethpm-spec/examples/owned/contracts/Owned.sol +0 -12
- ethpm/ethpm-spec/examples/owned/v3-pretty.json +0 -27
- ethpm/ethpm-spec/examples/owned/v3.json +0 -1
- ethpm/ethpm-spec/examples/piper-coin/1.0.0-pretty.json +0 -31
- ethpm/ethpm-spec/examples/piper-coin/1.0.0.json +0 -1
- ethpm/ethpm-spec/examples/piper-coin/v3-pretty.json +0 -21
- ethpm/ethpm-spec/examples/piper-coin/v3.json +0 -1
- ethpm/ethpm-spec/examples/safe-math-lib/1.0.0-pretty.json +0 -85
- ethpm/ethpm-spec/examples/safe-math-lib/1.0.0.json +0 -1
- ethpm/ethpm-spec/examples/safe-math-lib/contracts/SafeMathLib.sol +0 -24
- ethpm/ethpm-spec/examples/safe-math-lib/v3-pretty.json +0 -117
- ethpm/ethpm-spec/examples/safe-math-lib/v3.json +0 -1
- ethpm/ethpm-spec/examples/standard-token/1.0.0-pretty.json +0 -55
- ethpm/ethpm-spec/examples/standard-token/1.0.0.json +0 -1
- ethpm/ethpm-spec/examples/standard-token/contracts/AbstractToken.sol +0 -20
- ethpm/ethpm-spec/examples/standard-token/contracts/StandardToken.sol +0 -84
- ethpm/ethpm-spec/examples/standard-token/v3-pretty.json +0 -460
- ethpm/ethpm-spec/examples/standard-token/v3.json +0 -1
- ethpm/ethpm-spec/examples/transferable/1.0.0-pretty.json +0 -21
- ethpm/ethpm-spec/examples/transferable/1.0.0.json +0 -1
- ethpm/ethpm-spec/examples/transferable/contracts/Transferable.sol +0 -14
- ethpm/ethpm-spec/examples/transferable/v3-pretty.json +0 -27
- ethpm/ethpm-spec/examples/transferable/v3.json +0 -1
- ethpm/ethpm-spec/examples/wallet/1.0.0-pretty.json +0 -120
- ethpm/ethpm-spec/examples/wallet/1.0.0.json +0 -1
- ethpm/ethpm-spec/examples/wallet/contracts/Wallet.sol +0 -41
- ethpm/ethpm-spec/examples/wallet/v3-pretty.json +0 -181
- ethpm/ethpm-spec/examples/wallet/v3.json +0 -1
- ethpm/ethpm-spec/examples/wallet-with-send/1.0.0-pretty.json +0 -135
- ethpm/ethpm-spec/examples/wallet-with-send/1.0.0.json +0 -1
- ethpm/ethpm-spec/examples/wallet-with-send/contracts/WalletWithSend.sol +0 -18
- ethpm/ethpm-spec/examples/wallet-with-send/v3-pretty.json +0 -207
- ethpm/ethpm-spec/examples/wallet-with-send/v3.json +0 -1
- ethpm/ethpm-spec/spec/package.spec.json +0 -379
- ethpm/ethpm-spec/spec/v3.spec.json +0 -483
- ethpm/exceptions.py +0 -68
- ethpm/package.py +0 -438
- ethpm/tools/__init__.py +0 -4
- ethpm/tools/builder.py +0 -930
- ethpm/tools/checker.py +0 -312
- ethpm/tools/get_manifest.py +0 -19
- ethpm/uri.py +0 -141
- ethpm/validation/__init__.py +0 -0
- ethpm/validation/manifest.py +0 -146
- ethpm/validation/misc.py +0 -39
- ethpm/validation/package.py +0 -80
- ethpm/validation/uri.py +0 -163
- web3/_utils/caching.py +0 -155
- web3/_utils/contract_sources/contract_data/address_reflector.py +0 -29
- web3/_utils/module_testing/go_ethereum_personal_module.py +0 -300
- web3/_utils/request.py +0 -265
- web3/pm.py +0 -602
- web3/tools/__init__.py +0 -4
- web3/tools/benchmark/__init__.py +0 -0
- web3/tools/benchmark/main.py +0 -185
- web3/tools/benchmark/node.py +0 -126
- web3/tools/benchmark/reporting.py +0 -39
- web3/tools/benchmark/utils.py +0 -69
- web3/tools/pytest_ethereum/__init__.py +0 -0
- web3/tools/pytest_ethereum/_utils.py +0 -145
- web3/tools/pytest_ethereum/deployer.py +0 -48
- web3/tools/pytest_ethereum/exceptions.py +0 -22
- web3/tools/pytest_ethereum/linker.py +0 -128
- web3/tools/pytest_ethereum/plugins.py +0 -33
- web3-7.0.0b1.dist-info/METADATA +0 -114
- web3-7.0.0b1.dist-info/RECORD +0 -280
- web3-7.0.0b1.dist-info/entry_points.txt +0 -2
- /web3/_utils/{function_identifiers.py → abi_element_identifiers.py} +0 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
ens/__init__.py,sha256=BtOyGF_JrIpWFTr_T1GCJuUtmZI-Qf-v560uzTWp18E,471
|
|
2
|
+
ens/_normalization.py,sha256=t_abmu3z2QcTcX6gVaSfdUzz0_E5aGCPvuj0Hftd-Kg,16900
|
|
3
|
+
ens/abis.py,sha256=0Ec_lqe7HBsVpQrID3ccFMhx8Vb7S0TGFbeuRdXhuCE,34745
|
|
4
|
+
ens/async_ens.py,sha256=o-1m6dMC9Wcq9lXxJJ2UzcJZpMTeNBD82dnpvUFja3k,22669
|
|
5
|
+
ens/auto.py,sha256=w_E6Ua5ZmJVxfdii2aG5I_kQG5B9U5Y2qIFKVNhXo98,41
|
|
6
|
+
ens/base_ens.py,sha256=zn3lIV5-vkBEvdOAIVkE78wwTdJx7VG_fXqQmLJ_j7w,3507
|
|
7
|
+
ens/constants.py,sha256=XCO4Pntwdnw10K_AZ86V0cqcvdUoOkEZvRqoDdFPE_w,913
|
|
8
|
+
ens/contract_data.py,sha256=CZa7Uxzq6rT-KonwHHM_wo-5ry0j1DMbikgEaP27Uy8,148602
|
|
9
|
+
ens/ens.py,sha256=4LLQ_XDHhlPlG0-RGAErGZ9ltybg4yKyftdW84AeldE,21718
|
|
10
|
+
ens/exceptions.py,sha256=FVnGiWkt1IcAATfSxoWz9hwrlVG_-WCpraTo8nSHCxA,2441
|
|
11
|
+
ens/utils.py,sha256=Ro2-kcowwIgNExxNDQ1CpSFiGL9WSP_NCxp_qLzGWHw,8985
|
|
12
|
+
ens/specs/nf.json,sha256=tPXKzdhgu9gqNi0UhKC1kzPqSBgy4yHm5TL19RQHBqU,49038
|
|
13
|
+
ens/specs/normalization_spec.json,sha256=8mmjBj4OoYCn7pD4P7hqKP_qy6rpYzpyRinSH3CCP9M,3171499
|
|
14
|
+
web3/__init__.py,sha256=P11QAEV_GYoZq9ij8gDzFx5tKzJY2aMXG-keg2Lg1xs,1277
|
|
15
|
+
web3/constants.py,sha256=eQLRQVMFPbgpOjjkPTMHkY-syncJuO-sPX5UrCSRjzQ,564
|
|
16
|
+
web3/datastructures.py,sha256=clLaeQ3n8bThC4l0ByTzkplOkfJSfokRMROdPaGUIek,11414
|
|
17
|
+
web3/exceptions.py,sha256=GMIrWTkYDR0jtvtdOlgl_s6fctTibW4Ytw4So5BY4uE,9584
|
|
18
|
+
web3/geth.py,sha256=xVBZWSksBo2ipesAN9V5hzDc_te7kU8ueicFdvpkSO4,7370
|
|
19
|
+
web3/logs.py,sha256=ROs-mDMH_ZOecE7hfbWA5yp27G38FbLjX4lO_WtlZxQ,198
|
|
20
|
+
web3/main.py,sha256=eVdSh7m_iBMf3au0Aj49TZ7NSaRbN1Ccsng9Fuu8dME,16162
|
|
21
|
+
web3/manager.py,sha256=lbMe9ZJRe3LJjXice1yNHMHyOEHIIqLtgPLDrZ5fzYc,25185
|
|
22
|
+
web3/method.py,sha256=Q7EWTwI4TxqAbJ3mZrdvLc9wfV-8o8sOzS_pbsRgAP0,8601
|
|
23
|
+
web3/module.py,sha256=CDlnDrrWzkCJtd3gzHZ972l-6En6IyFEWwB7TXkHHLM,5617
|
|
24
|
+
web3/net.py,sha256=Y3vPzHWVFkfHEZoJxjDOt4tp5ERmZrMuyi4ZFOLmIeA,1562
|
|
25
|
+
web3/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
|
+
web3/testing.py,sha256=Ury_-7XSstJ8bkCfdGEi4Cr76QzSfW7v_zfPlDlLJj0,923
|
|
27
|
+
web3/tracing.py,sha256=ZcOam7t-uEZXyui6Cndv6RYeCZP5jh1TBn2hG8sv17Q,3098
|
|
28
|
+
web3/types.py,sha256=Nkck9FvREuCvhAeg0OyQv2zg1YTAXNWcvgMyFnWLNi4,13975
|
|
29
|
+
web3/_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
|
+
web3/_utils/abi.py,sha256=Y0vIFLEKwiMTdedxRPxVMQ1l-GbRRJia1AP1DqLBvjU,27430
|
|
31
|
+
web3/_utils/abi_element_identifiers.py,sha256=m305lsvUZk-jkPixT0IJd9P5sXqMvmwlwlLeBgEAnBQ,55
|
|
32
|
+
web3/_utils/async_caching.py,sha256=2XnaKCHBTTDK6B2R_YZvjJqIRUpbMDIU1uYrq-Lcyp8,486
|
|
33
|
+
web3/_utils/async_transactions.py,sha256=fodlTP7zpoFhFycWQszJWN0UUAfu5neQTCYJ3eGRCA0,5581
|
|
34
|
+
web3/_utils/batching.py,sha256=SbFKYFCRTrkFMFNa4HA4DkD_Qbjc6atnebMObyuQeHE,6316
|
|
35
|
+
web3/_utils/blocks.py,sha256=SZ17qSJuPAH5Dz-eQPGOsZw_QtkG19zvpSYMv6mEDok,2138
|
|
36
|
+
web3/_utils/contracts.py,sha256=YXErvYsi7OQ9S3KCjSv7nPbxj9DDTmixP8NYmv9GOmY,12091
|
|
37
|
+
web3/_utils/datatypes.py,sha256=nI0C9XWl46gFj1RpwuoHfVqb4e73wlaerE1LNyMg3oo,1701
|
|
38
|
+
web3/_utils/decorators.py,sha256=bYIoVL0DjHWU2-KOmg-UYg6rICeThlLVZpH9yM2NT8s,1825
|
|
39
|
+
web3/_utils/empty.py,sha256=ccgxFk5qm2x2ZeD8b17wX5cCAJPkPFuHrNQNMDslytY,132
|
|
40
|
+
web3/_utils/encoding.py,sha256=yS3awPQshfqMqEgiZWWU2AG8Kq_mrCH9VwHvlMhrGw4,9282
|
|
41
|
+
web3/_utils/ens.py,sha256=2BvzfegBkR7vH3Fq7lo_LsgfT912Zj-mR8eUt6o_lBA,2434
|
|
42
|
+
web3/_utils/error_formatters_utils.py,sha256=uRXm6P6z4cUTTlQRLFLtuC3FYOjR0lrIlQToR5f_gzI,6868
|
|
43
|
+
web3/_utils/events.py,sha256=sVAXWUMmWKwYguWzk_jqra3rI6NZ55T3XfDp4_aDa-8,17044
|
|
44
|
+
web3/_utils/fee_utils.py,sha256=MFt27R9E3qFP-Hf87-Lzv0JAiuYRE_qqafyTmzctAYA,2145
|
|
45
|
+
web3/_utils/filters.py,sha256=1WX2Vgmat8QKj0WNm_GoRcVp4iJ0BhaIpM_RbcZlBzs,11860
|
|
46
|
+
web3/_utils/formatters.py,sha256=RfRZU0aXC99s6OoLMY7D-fcYJyVAYBEwdbw-JIDjbZE,3067
|
|
47
|
+
web3/_utils/http.py,sha256=2R3UOeZmwiQGc3ladf78R9AnufbGaTXAntqf-ZQlZPI,230
|
|
48
|
+
web3/_utils/http_session_manager.py,sha256=oc4PTIQAFu2jBxa1OJqPajNxsan95U2JId7J_RFWdXY,11928
|
|
49
|
+
web3/_utils/hypothesis.py,sha256=4Cm4iOWv-uP9irg_Pv63kYNDYUAGhnUH6fOPWRw3A0g,209
|
|
50
|
+
web3/_utils/math.py,sha256=4oU5YdbQBXElxK00CxmUZ94ApXFu9QT_TrO0Kho1HTs,1083
|
|
51
|
+
web3/_utils/method_formatters.py,sha256=a9VxHy9KnraxT7EddFd_CIS82SIOXKoZ_SmdxGE4K-Y,36902
|
|
52
|
+
web3/_utils/module.py,sha256=GuVePloTlIBZwFDOjg0zasp53HSJ32umxN1nQhqW-8Y,3175
|
|
53
|
+
web3/_utils/normalizers.py,sha256=uOaGGgkFXTa5gg6mHgPhP8n035WYpo96xtrvpRPnfNk,7455
|
|
54
|
+
web3/_utils/rpc_abi.py,sha256=zsavkWny01UC8DI_DOVWZc7XcHtlmB9XL97sL0ZcIcs,8525
|
|
55
|
+
web3/_utils/threads.py,sha256=hNlSd_zheQYN0vC1faWWb9_UQxp_UzaM2fI5C8y0kB0,4245
|
|
56
|
+
web3/_utils/transactions.py,sha256=aWMYWiCM_Qs6kFIRWwLGRqAAwCz5fXU8uXcsFGi_Xqo,9044
|
|
57
|
+
web3/_utils/type_conversion.py,sha256=s6cg3WDCQIarQLWw_GfctaJjXhS_EcokUNO-S_ccvng,873
|
|
58
|
+
web3/_utils/utility_methods.py,sha256=7VCpo5ysvPoGjFuDj5gT1Niva2l3BADUvNeJFlL3Yvg,2559
|
|
59
|
+
web3/_utils/validation.py,sha256=VGRvM6P2um2bmGP8AgIg3WTXCynyOFIXSIxCo4opL5I,6481
|
|
60
|
+
web3/_utils/windows.py,sha256=IlFUtqYSbUUfFRx60zvEwpiZd080WpOrA4ojm4tmSEE,994
|
|
61
|
+
web3/_utils/caching/__init__.py,sha256=ri-5UGz5PPuYW9W1c2BX5lUJn1oZuvErbDz5NweiveA,284
|
|
62
|
+
web3/_utils/caching/caching_utils.py,sha256=Big2HcJ9_CgIGNq59yGihheLOct-FlArpreBxcfjYUk,14281
|
|
63
|
+
web3/_utils/caching/request_caching_validation.py,sha256=SBiOYtzfe_xxmTixxKxxNgmVQ7GLfQshYQwAxNh7yQM,9877
|
|
64
|
+
web3/_utils/compat/__init__.py,sha256=RUD0S8wzEv2a9o1UhJD0SIECjzatjJl7vc6RCM2d1Fs,571
|
|
65
|
+
web3/_utils/contract_sources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
66
|
+
web3/_utils/contract_sources/compile_contracts.py,sha256=C3eLY6gJ4xj9FunNwn4YPb9c8ElORkN8O4ddBa_kKqI,6486
|
|
67
|
+
web3/_utils/contract_sources/contract_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
68
|
+
web3/_utils/contract_sources/contract_data/_custom_contract_data.py,sha256=nxpN2uS1T338Tp5uVhwY9U1C2m2pdDz7kZv3LoZ0hpo,552
|
|
69
|
+
web3/_utils/contract_sources/contract_data/ambiguous_function_contract.py,sha256=-hyMlpYL-QQgwcqRoMRXkKPOAKO6isOPlcGRdoaYsWM,5980
|
|
70
|
+
web3/_utils/contract_sources/contract_data/arrays_contract.py,sha256=DDAwvEhOFNLVDxq73Vg3mCVBfpl9laGCGsFGHqsVCH8,18626
|
|
71
|
+
web3/_utils/contract_sources/contract_data/bytes_contracts.py,sha256=jx2zkR9yqRniBWRTP-wg7I7tvWkYqTuMLveFBomThpE,14351
|
|
72
|
+
web3/_utils/contract_sources/contract_data/constructor_contracts.py,sha256=Z0meZqRuvc2eNO_K1OMruRdfMO2Wavf8KE-NSnKtjtQ,6051
|
|
73
|
+
web3/_utils/contract_sources/contract_data/contract_caller_tester.py,sha256=9oeRnNpdbh2M8hNJTuqcxC3dTs3g-MWOz05fgPuB7dk,6228
|
|
74
|
+
web3/_utils/contract_sources/contract_data/emitter_contract.py,sha256=skuuQAXTO57HNERqf2FYwyzoL6_1JOjwx0Z2cvdVopc,40861
|
|
75
|
+
web3/_utils/contract_sources/contract_data/event_contracts.py,sha256=Sy8gg4GIAcYa41dOfl34fM47YLNKA74C3Ongx-pBAzg,9405
|
|
76
|
+
web3/_utils/contract_sources/contract_data/extended_resolver.py,sha256=Jq9S24aNGhLaGXXRrcwW6fC9RwthHDcHg_4YDebAwSo,15720
|
|
77
|
+
web3/_utils/contract_sources/contract_data/fallback_function_contract.py,sha256=W3bnypanJDHbPaxvAglMJb3apK3RAMlU0TtPT5Gqxyg,1649
|
|
78
|
+
web3/_utils/contract_sources/contract_data/function_name_tester_contract.py,sha256=kshI47e64GdSTV2nLmhkGgeZrH0cbjobs1bekEXdYdE,1894
|
|
79
|
+
web3/_utils/contract_sources/contract_data/math_contract.py,sha256=MFLcndXyQ7efzFY-7hZeJWU7CW4D2ZlQEucskiEtBMA,7635
|
|
80
|
+
web3/_utils/contract_sources/contract_data/offchain_lookup.py,sha256=bxVOCrEAGchwQQt0Rib2GZ5-ma18EDA0eUyodM5vkLk,16424
|
|
81
|
+
web3/_utils/contract_sources/contract_data/offchain_resolver.py,sha256=FbO7-eOK-uU0W24QxrCP28kJe7CJpRne0wiQYWwe0jc,31829
|
|
82
|
+
web3/_utils/contract_sources/contract_data/panic_errors_contract.py,sha256=FTUaxUTDVl6RcmNIIStjTr1JZLePwCKt29skBXS5hME,15263
|
|
83
|
+
web3/_utils/contract_sources/contract_data/payable_tester.py,sha256=jgoCGPfQAhd90EwgUUq1rKeaSA2P1ncHb3vmS4XHcys,1827
|
|
84
|
+
web3/_utils/contract_sources/contract_data/receive_function_contracts.py,sha256=3Z7ZSaXqFKCStbA25u263agoXuv0rRfVSYYPn-Ipar4,17102
|
|
85
|
+
web3/_utils/contract_sources/contract_data/reflector_contracts.py,sha256=51U32alPSlc6x4pbo55Mno-g4yn3FfePh7j6ISNLWz0,5262
|
|
86
|
+
web3/_utils/contract_sources/contract_data/revert_contract.py,sha256=LIaJ0V3oT4tX94dtsSDnvhrPPWb2t9zROERiz-hamfo,4262
|
|
87
|
+
web3/_utils/contract_sources/contract_data/simple_resolver.py,sha256=ysj1_yzT54eXO0nNaNfo7lsDL3eObIDOeCK5_lxOpFQ,3553
|
|
88
|
+
web3/_utils/contract_sources/contract_data/storage_contract.py,sha256=fZ-4ho-fbVgPvFP_wpwHeoz8G45tqpqo1RZvntudqHI,7938
|
|
89
|
+
web3/_utils/contract_sources/contract_data/string_contract.py,sha256=fJHQg_CxzOt7Ojp5Af067M46tyY6CARkzycS0fL6reQ,11228
|
|
90
|
+
web3/_utils/contract_sources/contract_data/tuple_contracts.py,sha256=PPzVF67kRpeNLXGjUGjpIowGyD3F6fMzqYLuOwXRZbE,23176
|
|
91
|
+
web3/_utils/module_testing/__init__.py,sha256=Xr_S46cjr0mypD_Y4ZbeF1EJ-XWfNxWUks5ykhzN10c,485
|
|
92
|
+
web3/_utils/module_testing/eth_module.py,sha256=_6pTHSKt3IzWdFe8gYGC1Hv56VJaVXaaRYouv-BM4hQ,187454
|
|
93
|
+
web3/_utils/module_testing/go_ethereum_admin_module.py,sha256=_c-6SyzZkfAJ-7ySXUpw9FEr4cg-ShRdAGSAHWanCtY,3406
|
|
94
|
+
web3/_utils/module_testing/go_ethereum_debug_module.py,sha256=BP1UjK-5ewkYMilvW9jtZX5Mc9BGh3QlJWPXqDNWizU,4144
|
|
95
|
+
web3/_utils/module_testing/go_ethereum_txpool_module.py,sha256=5f8XL8-2x3keyGRaITxMQYl9oQzjgqGn8zobB-j9BPs,1176
|
|
96
|
+
web3/_utils/module_testing/module_testing_utils.py,sha256=TiGZNipE1uBRKagnrxmID8coBuNjoy-XNSL2ZWWITks,7303
|
|
97
|
+
web3/_utils/module_testing/net_module.py,sha256=ifUTC-5fTcQbwpm0X09OdD5RSPnn00T8klFeYe8tTm4,1272
|
|
98
|
+
web3/_utils/module_testing/persistent_connection_provider.py,sha256=cmwgngYi-2zKPRljUOY-QG_Ra_T9vDMzHVa68HFKMn0,29247
|
|
99
|
+
web3/_utils/module_testing/utils.py,sha256=bvF57wKVbfnXGRM4kqEZpysPrr9LvAQy-E-huk1HpxM,13561
|
|
100
|
+
web3/_utils/module_testing/web3_module.py,sha256=7c6penGbHn381fPTYY6DsXKv56xGQpYkHljOsr2gbaw,25413
|
|
101
|
+
web3/auto/__init__.py,sha256=ZbzAiCZMdt_tCTTPvH6t8NCVNroKKkt7TSVBBNR74Is,44
|
|
102
|
+
web3/auto/gethdev.py,sha256=MuWD2gxv0xDv_SzPsp9mSkS1oG4P54xFK83qw9NvswA,438
|
|
103
|
+
web3/beacon/__init__.py,sha256=Ac6YiNgU8D8Ynnh5RwSCx2NwPyjnpFjpXeHuSssFbaU,113
|
|
104
|
+
web3/beacon/api_endpoints.py,sha256=0mHrYFYAWHfF9OGzrFdg012L_ocU2nGDXUTU1isOo7o,2272
|
|
105
|
+
web3/beacon/async_beacon.py,sha256=CPzvyZnMibSYsoIJVrjd3XvZ9aB0bgQRtCP0X0Ekp0o,8156
|
|
106
|
+
web3/beacon/beacon.py,sha256=tPA9ABPm6MyzbzutiphkhFzOAxLresmftG5UjWkuNyY,7236
|
|
107
|
+
web3/contract/__init__.py,sha256=qeZRtTw9xriwoD82w6vePDuPBZ35-CMVdkzViBSH3Qs,293
|
|
108
|
+
web3/contract/async_contract.py,sha256=VOh1CbOKQicpgGxtppZMGCLzI9zkOK6tg-hH6f1oP7Q,28123
|
|
109
|
+
web3/contract/base_contract.py,sha256=KeIf1eowua36dLuEpi2xnt6Bqh3eH2BuNJGtB8wa7j8,47021
|
|
110
|
+
web3/contract/contract.py,sha256=ShsgOBYaQdCw6GwlgmjYWLXd9i_6hwDVyzzmkYBXOVc,28092
|
|
111
|
+
web3/contract/utils.py,sha256=mrW3WIxki6EJ1kNqyGp20SMJIu4GqAzOFgMuzpsHB2M,19363
|
|
112
|
+
web3/eth/__init__.py,sha256=qDLxOcHHIzzPD7xzwy6Wcs0lLPQieB7WN0Ax25ctit8,197
|
|
113
|
+
web3/eth/async_eth.py,sha256=Wqm03xSbSmPDxar3echSZGpiexTNk6yjeAaHKn971A8,24138
|
|
114
|
+
web3/eth/base_eth.py,sha256=UUH0Fw0HVa_mBEQ_CbCDO01yCVDsj33d8yOv7Oe-QD0,6905
|
|
115
|
+
web3/eth/eth.py,sha256=T-YwH-Kks4cPothiR9GyOqMh6MeMTFRmfI7M2TL4NkY,19940
|
|
116
|
+
web3/gas_strategies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
117
|
+
web3/gas_strategies/rpc.py,sha256=3Va-32jdmHkX7tzQCmh17ms2D6te5zZcqHP1326BdpY,352
|
|
118
|
+
web3/gas_strategies/time_based.py,sha256=oGk6nBUD4iMC8wl1vzf-nhURaqyPWYdPvNU0C3RIs8g,9071
|
|
119
|
+
web3/middleware/__init__.py,sha256=fSmPCYJOO8Qp5p-Vm_Z4XPJATu2qN7KJRypYNSO6_uM,2830
|
|
120
|
+
web3/middleware/attrdict.py,sha256=tIoMEZ3BkmEafnwitGY70o0GS9ShfwReDMxkHuvcOwI,2092
|
|
121
|
+
web3/middleware/base.py,sha256=aHBUWc5pSohLUZ7zcCgrVqp_H_1PTqh31x2n6vWqzuY,5376
|
|
122
|
+
web3/middleware/buffered_gas_estimate.py,sha256=EmxUd-uO959UVroPsPKkl7oDa8Tw6N8BQLB6Urng5Eo,1647
|
|
123
|
+
web3/middleware/filter.py,sha256=I09sSE_q_dhWX5_24KVWhVXZNevwViI7wucJBP4TZl4,22221
|
|
124
|
+
web3/middleware/formatting.py,sha256=hqe5XQE1n5Fmj6riJp7i3oIoZkd-4ChQc7UK8f3HB6I,7567
|
|
125
|
+
web3/middleware/gas_price_strategy.py,sha256=ZjZ6pe3z0mDGLZHYoFXp4_fZIePqukljEh9f4mZUyIA,3779
|
|
126
|
+
web3/middleware/names.py,sha256=OBpsvCmcTItth4TcvUNUvcYmINnudtCHq3n6YO_BkNs,4309
|
|
127
|
+
web3/middleware/proof_of_authority.py,sha256=0AT4jr5CmTdrvl8Jiy-WYy8IFDYBOEaesgHDwpn0c7M,1429
|
|
128
|
+
web3/middleware/pythonic.py,sha256=awc8I6lLzVc2Iv138sps2uf6dMQipskLRBTdvTEEIgQ,348
|
|
129
|
+
web3/middleware/signing.py,sha256=1DOYxpmCra-Qq5r42237q3b54uDO-QHjMVMulxVpLVQ,5899
|
|
130
|
+
web3/middleware/stalecheck.py,sha256=oWRA69BGIbNGjHSnUVOBnoxOYJZYjzRzlqqL5RRlnzk,2680
|
|
131
|
+
web3/middleware/validation.py,sha256=QxActrJk_zsXXiwpadP2MUjZBS5E50OJOtUwVrm9XVo,4280
|
|
132
|
+
web3/providers/__init__.py,sha256=YkcSzE9AubvSp-UfvJjyCrdepvziysbqeq2LT0ImDoc,936
|
|
133
|
+
web3/providers/async_base.py,sha256=A-irjLM6aogj1B1YLM4_wz35iuqr91k_FJ7nD82qv9I,7625
|
|
134
|
+
web3/providers/auto.py,sha256=Zx3CHKoRkmiw3Jte2BLNPiJAFd8rDXNGfA3XtxZvHgc,3465
|
|
135
|
+
web3/providers/base.py,sha256=4bJTniP-k4FmF23gBUq6YSQkC04qc5LgH6HoJ38a_xE,6380
|
|
136
|
+
web3/providers/ipc.py,sha256=19jm5e-mytwx_s-s8hGMCK9sfOCgwwr_1hHcHQyB_7o,6514
|
|
137
|
+
web3/providers/legacy_websocket.py,sha256=goS-ww86ijftbYs7QiqvrZZFycHBd5BD6U18yVQ7lF8,4767
|
|
138
|
+
web3/providers/eth_tester/__init__.py,sha256=UggyBQdeAyjy1awATW1933jkJcpqqaUYUQEFAQnA2o0,163
|
|
139
|
+
web3/providers/eth_tester/defaults.py,sha256=QQUdqqrkcN1AKW7WEY1A5RiPc_fmlHCLmdgB-5iY7Dc,12622
|
|
140
|
+
web3/providers/eth_tester/main.py,sha256=U19sNDeHs36A4IYQ0HFGyXdZvuXiYvoSMNWVuki0WwI,7807
|
|
141
|
+
web3/providers/eth_tester/middleware.py,sha256=3h8q1WBu5CLiBYwonWFeAR_5pUy_vqgiDmi7wOzuorc,12971
|
|
142
|
+
web3/providers/persistent/__init__.py,sha256=X7tFKJL5BXSwciq5_bRwGRB6bfdWBkIPPWMqCjXIKrA,411
|
|
143
|
+
web3/providers/persistent/async_ipc.py,sha256=dlySmRkVsKWOjb2w08n38PTcoI5MtviwqsRxq3YUg6M,5006
|
|
144
|
+
web3/providers/persistent/persistent.py,sha256=fMVeS-BQ42C8XDH7G_N4WWdlUInmNhnU2S8UBfqcKeI,15072
|
|
145
|
+
web3/providers/persistent/persistent_connection.py,sha256=NxxS-KeJhV07agg8CtJvmE-Ff-wLggQYpz4gdgVRDNU,3011
|
|
146
|
+
web3/providers/persistent/request_processor.py,sha256=JLVDc75E9U1s7DA9coqxDRMtYthWHS5D-cpxxH1Gmnc,14390
|
|
147
|
+
web3/providers/persistent/subscription_container.py,sha256=yd5pjjz_YnRLuUoxZUxt29Md1VUTemdUIBq8PCJre6Y,1734
|
|
148
|
+
web3/providers/persistent/subscription_manager.py,sha256=N7XMhscjD5-gQT4begUlwDizrloXL6uGYIIzi_eo-jA,8810
|
|
149
|
+
web3/providers/persistent/utils.py,sha256=gfY7w1HB8xuE7OujSrbwWYjQuQ8nzRBoxoL8ESinqWM,1140
|
|
150
|
+
web3/providers/persistent/websocket.py,sha256=d-IZNPfT6RGChTLDjHR4dH2y02U9KJoWpZlfxpiG1so,4353
|
|
151
|
+
web3/providers/rpc/__init__.py,sha256=mObsuwjr7xyHnnRlwzsmbp2JgZdn2NXSSctvpye4AuQ,149
|
|
152
|
+
web3/providers/rpc/async_rpc.py,sha256=lhLiTi3zX6nzAO7T6TsF3-u_d6GmVTe5cuhw4OZb7zw,6104
|
|
153
|
+
web3/providers/rpc/rpc.py,sha256=3gV7IhpBbaHv8VdoBs7AV4oWtGthoA5pGa35twhaynw,5865
|
|
154
|
+
web3/providers/rpc/utils.py,sha256=_mtoZMMIoZpPA8J8U5DfRxaNQmi8bw0ZVUiqn1Nz4co,2154
|
|
155
|
+
web3/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
156
|
+
web3/scripts/install_pre_releases.py,sha256=uVxsZk239640yxiqlPhfXxZKSsh3858pURKppi9kM5U,821
|
|
157
|
+
web3/scripts/parse_pygeth_version.py,sha256=BZjWOsJmYuFbAnFuB1jec9Rl6z0tJJNFFV38sJvDfGo,416
|
|
158
|
+
web3/scripts/release/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
159
|
+
web3/scripts/release/test_package.py,sha256=DH0AryllcF4zfpWSd0NLPSQGHNoC-Qng5WYYbS5_4c8,1534
|
|
160
|
+
web3/utils/__init__.py,sha256=FpwKsCqPgsv64PFSaFuFYmseadMfQj78quw_6Vgq0VQ,1932
|
|
161
|
+
web3/utils/abi.py,sha256=zH54xZMXGL9nqVUavNhSZ4ZsMJM3ALdDZwBD0zgrfWU,26318
|
|
162
|
+
web3/utils/address.py,sha256=nzPLiWWCG9BqstDeDOcDwEpteJ8im6ywjLHKpd5akhw,1186
|
|
163
|
+
web3/utils/async_exception_handling.py,sha256=OoKbLNwWcY9dxLCbOfxcQPSB1OxWraNqcw8V0ZX-JaQ,3173
|
|
164
|
+
web3/utils/caching.py,sha256=Rkt5IN8A7YBZYXlCRaWa64FiDhTXsxzTGGQdGBB4Nzw,2514
|
|
165
|
+
web3/utils/exception_handling.py,sha256=n-MtO5LNzJDVzHTzO6olzfb2_qEVtVRvink0ixswg-Y,2917
|
|
166
|
+
web3/utils/subscriptions.py,sha256=IDjk08ZQM6cOI3MdFN-d27m90Ml_P0GQcWMKRfUiRzg,8491
|
|
167
|
+
web3-7.7.0.dist-info/LICENSE,sha256=ScEyLx1vWrB0ybKiZKKTXm5QhVksHCEUtTp4lwYV45I,1095
|
|
168
|
+
web3-7.7.0.dist-info/METADATA,sha256=Tn2QT-_nIcEicSSuwLEfGdo4ZvohbuWaa69CN4-vCKQ,5541
|
|
169
|
+
web3-7.7.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
170
|
+
web3-7.7.0.dist-info/top_level.txt,sha256=iwupuJh7wgypXrpk_awszyri3TahRr5vxSphNyvt1bU,9
|
|
171
|
+
web3-7.7.0.dist-info/RECORD,,
|
ethpm/__init__.py
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
ETHPM_DIR = Path(__file__).parent
|
|
5
|
-
ASSETS_DIR = ETHPM_DIR / "assets"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
def get_ethpm_spec_dir() -> Path:
|
|
9
|
-
ethpm_spec_dir = ETHPM_DIR / "ethpm-spec"
|
|
10
|
-
v3_spec = ethpm_spec_dir / "spec" / "v3.spec.json"
|
|
11
|
-
if not v3_spec.is_file():
|
|
12
|
-
raise FileNotFoundError(
|
|
13
|
-
"The ethpm-spec submodule is not available. "
|
|
14
|
-
"Please import the submodule with `git submodule update --init`"
|
|
15
|
-
)
|
|
16
|
-
return ethpm_spec_dir
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
from .package import Package # noqa: E402, F401
|
|
20
|
-
from .backends.registry import RegistryURI # noqa: E402, F401
|
ethpm/_utils/__init__.py
DELETED
|
File without changes
|
ethpm/_utils/backend.py
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
from typing import (
|
|
3
|
-
Generator,
|
|
4
|
-
Type,
|
|
5
|
-
)
|
|
6
|
-
|
|
7
|
-
from eth_typing import (
|
|
8
|
-
URI,
|
|
9
|
-
)
|
|
10
|
-
from eth_utils import (
|
|
11
|
-
to_tuple,
|
|
12
|
-
)
|
|
13
|
-
|
|
14
|
-
from ethpm.backends.base import (
|
|
15
|
-
BaseURIBackend,
|
|
16
|
-
)
|
|
17
|
-
from ethpm.backends.http import (
|
|
18
|
-
GithubOverHTTPSBackend,
|
|
19
|
-
)
|
|
20
|
-
from ethpm.backends.ipfs import (
|
|
21
|
-
DummyIPFSBackend,
|
|
22
|
-
InfuraIPFSBackend,
|
|
23
|
-
LocalIPFSBackend,
|
|
24
|
-
get_ipfs_backend_class,
|
|
25
|
-
)
|
|
26
|
-
from ethpm.backends.registry import (
|
|
27
|
-
RegistryURIBackend,
|
|
28
|
-
)
|
|
29
|
-
|
|
30
|
-
try:
|
|
31
|
-
from ipfshttpclient.exceptions import (
|
|
32
|
-
ConnectionError as IpfsConnectionError,
|
|
33
|
-
)
|
|
34
|
-
except ImportError:
|
|
35
|
-
pass
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
logger = logging.getLogger("ethpm.utils.backend")
|
|
39
|
-
|
|
40
|
-
ALL_URI_BACKENDS = [
|
|
41
|
-
InfuraIPFSBackend,
|
|
42
|
-
DummyIPFSBackend,
|
|
43
|
-
LocalIPFSBackend,
|
|
44
|
-
GithubOverHTTPSBackend,
|
|
45
|
-
RegistryURIBackend,
|
|
46
|
-
]
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
def _handle_optional_ipfs_backend_exception(e: Exception) -> None:
|
|
50
|
-
try:
|
|
51
|
-
# if optional `ipfshttpclient` module is present, catch and debug if
|
|
52
|
-
# IpfsConnectionError, else raise original exception.
|
|
53
|
-
if isinstance(e, IpfsConnectionError):
|
|
54
|
-
logger.debug("No local IPFS node available on port 5001.", exc_info=True)
|
|
55
|
-
else:
|
|
56
|
-
raise e
|
|
57
|
-
except NameError:
|
|
58
|
-
# if optional `ipfshttpclient` module is not present, raise original exception
|
|
59
|
-
raise e
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
@to_tuple
|
|
63
|
-
def get_translatable_backends_for_uri(
|
|
64
|
-
uri: URI,
|
|
65
|
-
) -> Generator[Type[BaseURIBackend], None, None]:
|
|
66
|
-
# type ignored because of conflict with instantiating BaseURIBackend
|
|
67
|
-
for backend in ALL_URI_BACKENDS:
|
|
68
|
-
try:
|
|
69
|
-
if backend().can_translate_uri(uri): # type: ignore
|
|
70
|
-
yield backend
|
|
71
|
-
except Exception as e:
|
|
72
|
-
_handle_optional_ipfs_backend_exception(e)
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
@to_tuple
|
|
76
|
-
def get_resolvable_backends_for_uri(
|
|
77
|
-
uri: URI,
|
|
78
|
-
) -> Generator[Type[BaseURIBackend], None, None]:
|
|
79
|
-
# special case the default IPFS backend to the first slot.
|
|
80
|
-
default_ipfs = get_ipfs_backend_class()
|
|
81
|
-
if default_ipfs in ALL_URI_BACKENDS and default_ipfs().can_resolve_uri(uri):
|
|
82
|
-
yield default_ipfs
|
|
83
|
-
else:
|
|
84
|
-
for backend_class in ALL_URI_BACKENDS:
|
|
85
|
-
if backend_class is default_ipfs:
|
|
86
|
-
continue
|
|
87
|
-
# type ignored because of conflict with instantiating BaseURIBackend
|
|
88
|
-
else:
|
|
89
|
-
try:
|
|
90
|
-
if backend_class().can_resolve_uri(uri): # type: ignore
|
|
91
|
-
yield backend_class
|
|
92
|
-
except Exception as e:
|
|
93
|
-
_handle_optional_ipfs_backend_exception(e)
|
ethpm/_utils/cache.py
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
from typing import (
|
|
2
|
-
Any,
|
|
3
|
-
Callable,
|
|
4
|
-
)
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class cached_property:
|
|
8
|
-
"""
|
|
9
|
-
Decorator that converts a method with a single self argument into a
|
|
10
|
-
property cached on the instance.
|
|
11
|
-
|
|
12
|
-
Optional ``name`` argument allows you to make cached properties of other
|
|
13
|
-
methods. (e.g. url = cached_property(get_absolute_url, name='url') )
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
def __init__(self, func: Callable[..., Any], name: str = None) -> None:
|
|
17
|
-
self.wrapped_func = func
|
|
18
|
-
self.name = name
|
|
19
|
-
self.__doc__ = getattr(func, "__doc__")
|
|
20
|
-
|
|
21
|
-
def __get__(self, instance: Any, cls: Any = None) -> Any:
|
|
22
|
-
"""
|
|
23
|
-
Call the function and put the return value in instance.__dict__ so that
|
|
24
|
-
subsequent attribute access on the instance returns the cached value
|
|
25
|
-
instead of calling cached_property.__get__().
|
|
26
|
-
"""
|
|
27
|
-
if instance is None:
|
|
28
|
-
return self
|
|
29
|
-
res = instance.__dict__[self.name] = self.func(instance)
|
|
30
|
-
return res
|
|
31
|
-
|
|
32
|
-
def __set_name__(self, cls: Any = None, name: str = None) -> None:
|
|
33
|
-
"""
|
|
34
|
-
The function is called at the time the cls class is created.
|
|
35
|
-
The descriptor would be assigned to name.
|
|
36
|
-
"""
|
|
37
|
-
if self.name is None:
|
|
38
|
-
self.name = name
|
|
39
|
-
self.func = self.wrapped_func
|
|
40
|
-
if name != self.name:
|
|
41
|
-
raise TypeError(
|
|
42
|
-
"Unable to assign cached_property for two different names "
|
|
43
|
-
f"(%{self.name} and {name})."
|
|
44
|
-
)
|
ethpm/_utils/chains.py
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import re
|
|
2
|
-
from typing import (
|
|
3
|
-
TYPE_CHECKING,
|
|
4
|
-
Any,
|
|
5
|
-
Tuple,
|
|
6
|
-
)
|
|
7
|
-
from urllib import (
|
|
8
|
-
parse,
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
from eth_typing import (
|
|
12
|
-
URI,
|
|
13
|
-
BlockNumber,
|
|
14
|
-
HexStr,
|
|
15
|
-
)
|
|
16
|
-
from eth_utils import (
|
|
17
|
-
add_0x_prefix,
|
|
18
|
-
is_integer,
|
|
19
|
-
remove_0x_prefix,
|
|
20
|
-
)
|
|
21
|
-
from hexbytes import (
|
|
22
|
-
HexBytes,
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
from ethpm.constants import (
|
|
26
|
-
SUPPORTED_CHAIN_IDS,
|
|
27
|
-
)
|
|
28
|
-
|
|
29
|
-
if TYPE_CHECKING:
|
|
30
|
-
from web3 import Web3 # noqa: F401
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
def get_genesis_block_hash(w3: "Web3") -> HexBytes:
|
|
34
|
-
return w3.eth.get_block(BlockNumber(0))["hash"]
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
BLOCK = "block"
|
|
38
|
-
|
|
39
|
-
BIP122_URL_REGEX = (
|
|
40
|
-
"^"
|
|
41
|
-
"blockchain://"
|
|
42
|
-
"(?P<chain_id>[a-zA-Z0-9]{64})"
|
|
43
|
-
"/"
|
|
44
|
-
"(?P<resource_type>block|transaction)"
|
|
45
|
-
"/"
|
|
46
|
-
"(?P<resource_hash>[a-zA-Z0-9]{64})"
|
|
47
|
-
"$"
|
|
48
|
-
)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
def is_BIP122_uri(value: URI) -> bool:
|
|
52
|
-
return bool(re.match(BIP122_URL_REGEX, value))
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
def parse_BIP122_uri(blockchain_uri: URI) -> Tuple[HexStr, str, HexStr]:
|
|
56
|
-
match = re.match(BIP122_URL_REGEX, blockchain_uri)
|
|
57
|
-
if match is None:
|
|
58
|
-
raise ValueError(f"Invalid URI format: '{blockchain_uri}'")
|
|
59
|
-
chain_id, resource_type, resource_hash = match.groups()
|
|
60
|
-
return (
|
|
61
|
-
add_0x_prefix(HexStr(chain_id)),
|
|
62
|
-
resource_type,
|
|
63
|
-
add_0x_prefix(HexStr(resource_hash)),
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
def is_BIP122_block_uri(value: URI) -> bool:
|
|
68
|
-
if not is_BIP122_uri(value):
|
|
69
|
-
return False
|
|
70
|
-
_, resource_type, _ = parse_BIP122_uri(value)
|
|
71
|
-
return resource_type == BLOCK
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
BLOCK_OR_TRANSACTION_HASH_REGEX = "^(?:0x)?[a-zA-Z0-9]{64}$"
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
def is_block_or_transaction_hash(value: str) -> bool:
|
|
78
|
-
return bool(re.match(BLOCK_OR_TRANSACTION_HASH_REGEX, value))
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
def create_BIP122_uri(
|
|
82
|
-
chain_id: HexStr, resource_type: str, resource_identifier: HexStr
|
|
83
|
-
) -> URI:
|
|
84
|
-
"""
|
|
85
|
-
See: https://github.com/bitcoin/bips/blob/master/bip-0122.mediawiki
|
|
86
|
-
"""
|
|
87
|
-
if resource_type != BLOCK:
|
|
88
|
-
raise ValueError("Invalid resource_type. Must be one of 'block'")
|
|
89
|
-
elif not is_block_or_transaction_hash(resource_identifier):
|
|
90
|
-
raise ValueError(
|
|
91
|
-
"Invalid resource_identifier. Must be a hex encoded 32 byte value"
|
|
92
|
-
)
|
|
93
|
-
elif not is_block_or_transaction_hash(chain_id):
|
|
94
|
-
raise ValueError("Invalid chain_id. Must be a hex encoded 32 byte value")
|
|
95
|
-
|
|
96
|
-
return URI(
|
|
97
|
-
parse.urlunsplit(
|
|
98
|
-
[
|
|
99
|
-
"blockchain",
|
|
100
|
-
remove_0x_prefix(chain_id),
|
|
101
|
-
f"{resource_type}/{remove_0x_prefix(resource_identifier)}",
|
|
102
|
-
"",
|
|
103
|
-
"",
|
|
104
|
-
]
|
|
105
|
-
)
|
|
106
|
-
)
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
def create_block_uri(chain_id: HexStr, block_identifier: HexStr) -> URI:
|
|
110
|
-
return create_BIP122_uri(chain_id, "block", remove_0x_prefix(block_identifier))
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
def is_supported_chain_id(chain_id: Any) -> bool:
|
|
114
|
-
if not is_integer(chain_id):
|
|
115
|
-
return False
|
|
116
|
-
|
|
117
|
-
if chain_id not in SUPPORTED_CHAIN_IDS.keys():
|
|
118
|
-
return False
|
|
119
|
-
return True
|
ethpm/_utils/contract.py
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
from typing import (
|
|
2
|
-
Any,
|
|
3
|
-
Dict,
|
|
4
|
-
Generator,
|
|
5
|
-
Tuple,
|
|
6
|
-
)
|
|
7
|
-
|
|
8
|
-
from eth_utils import (
|
|
9
|
-
to_dict,
|
|
10
|
-
)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
@to_dict
|
|
14
|
-
def generate_contract_factory_kwargs(
|
|
15
|
-
contract_data: Dict[str, Any]
|
|
16
|
-
) -> Generator[Tuple[str, Any], None, None]:
|
|
17
|
-
"""
|
|
18
|
-
Build a dictionary of kwargs to be passed into contract factory.
|
|
19
|
-
"""
|
|
20
|
-
if "abi" in contract_data:
|
|
21
|
-
yield "abi", contract_data["abi"]
|
|
22
|
-
|
|
23
|
-
if "deploymentBytecode" in contract_data:
|
|
24
|
-
yield "bytecode", contract_data["deploymentBytecode"]["bytecode"]
|
|
25
|
-
if "linkReferences" in contract_data["deploymentBytecode"]:
|
|
26
|
-
yield "unlinked_references", tuple(
|
|
27
|
-
contract_data["deploymentBytecode"]["linkReferences"]
|
|
28
|
-
)
|
|
29
|
-
|
|
30
|
-
if "runtimeBytecode" in contract_data:
|
|
31
|
-
yield "bytecode_runtime", contract_data["runtimeBytecode"]["bytecode"]
|
|
32
|
-
if "linkReferences" in contract_data["runtimeBytecode"]:
|
|
33
|
-
yield "linked_references", tuple(
|
|
34
|
-
contract_data["runtimeBytecode"]["linkReferences"]
|
|
35
|
-
)
|
ethpm/_utils/deployments.py
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
from typing import (
|
|
2
|
-
TYPE_CHECKING,
|
|
3
|
-
Any,
|
|
4
|
-
Dict,
|
|
5
|
-
Generator,
|
|
6
|
-
List,
|
|
7
|
-
Tuple,
|
|
8
|
-
)
|
|
9
|
-
|
|
10
|
-
from eth_utils import (
|
|
11
|
-
is_same_address,
|
|
12
|
-
to_bytes,
|
|
13
|
-
to_tuple,
|
|
14
|
-
)
|
|
15
|
-
from eth_utils.toolz import (
|
|
16
|
-
get_in,
|
|
17
|
-
)
|
|
18
|
-
from hexbytes import (
|
|
19
|
-
HexBytes,
|
|
20
|
-
)
|
|
21
|
-
|
|
22
|
-
from ethpm.exceptions import (
|
|
23
|
-
BytecodeLinkingError,
|
|
24
|
-
EthPMValidationError,
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
if TYPE_CHECKING:
|
|
28
|
-
from web3 import Web3 # noqa: F401
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
def get_linked_deployments(deployments: Dict[str, Any]) -> Dict[str, Any]:
|
|
32
|
-
"""
|
|
33
|
-
Returns all deployments found in a chain URI's deployment data that
|
|
34
|
-
contain link dependencies.
|
|
35
|
-
"""
|
|
36
|
-
linked_deployments = {
|
|
37
|
-
dep: data
|
|
38
|
-
for dep, data in deployments.items()
|
|
39
|
-
if get_in(("runtimeBytecode", "linkDependencies"), data)
|
|
40
|
-
}
|
|
41
|
-
for deployment, data in linked_deployments.items():
|
|
42
|
-
if any(
|
|
43
|
-
link_dep["value"] == deployment
|
|
44
|
-
for link_dep in data["runtimeBytecode"]["linkDependencies"]
|
|
45
|
-
):
|
|
46
|
-
raise BytecodeLinkingError(
|
|
47
|
-
f"Link dependency found in {deployment} deployment that references its "
|
|
48
|
-
"own contract instance, which is disallowed"
|
|
49
|
-
)
|
|
50
|
-
return linked_deployments
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
def validate_linked_references(
|
|
54
|
-
link_deps: Tuple[Tuple[int, bytes], ...], bytecode: HexBytes
|
|
55
|
-
) -> None:
|
|
56
|
-
"""
|
|
57
|
-
Validates that normalized linked_references (offset, expected_bytes)
|
|
58
|
-
match the corresponding bytecode.
|
|
59
|
-
"""
|
|
60
|
-
offsets, values = zip(*link_deps)
|
|
61
|
-
for idx, offset in enumerate(offsets):
|
|
62
|
-
value = values[idx]
|
|
63
|
-
# https://github.com/python/mypy/issues/4975
|
|
64
|
-
offset_value = int(offset)
|
|
65
|
-
dep_length = len(value)
|
|
66
|
-
end_of_bytes = offset_value + dep_length
|
|
67
|
-
# Ignore b/c whitespace around ':' conflict b/w black & flake8
|
|
68
|
-
actual_bytes = bytecode[offset_value:end_of_bytes] # noqa: E203
|
|
69
|
-
if actual_bytes != values[idx]:
|
|
70
|
-
raise EthPMValidationError(
|
|
71
|
-
"Error validating linked reference. "
|
|
72
|
-
f"Offset: {offset} "
|
|
73
|
-
f"Value: {values[idx]} "
|
|
74
|
-
f"Bytecode: {bytecode!r} ."
|
|
75
|
-
)
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
@to_tuple
|
|
79
|
-
def normalize_linked_references(
|
|
80
|
-
data: List[Dict[str, Any]]
|
|
81
|
-
) -> Generator[Tuple[int, str, str], None, None]:
|
|
82
|
-
"""
|
|
83
|
-
Return a tuple of information representing all insertions of a linked reference.
|
|
84
|
-
(offset, type, value)
|
|
85
|
-
"""
|
|
86
|
-
for deployment in data:
|
|
87
|
-
for offset in deployment["offsets"]:
|
|
88
|
-
yield offset, deployment["type"], deployment["value"]
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
def validate_deployments_tx_receipt(
|
|
92
|
-
deployments: Dict[str, Any], w3: "Web3", allow_missing_data: bool = False
|
|
93
|
-
) -> None:
|
|
94
|
-
"""
|
|
95
|
-
Validate that address and block hash found in deployment data match
|
|
96
|
-
what is found on-chain. :allow_missing_data: by default, enforces
|
|
97
|
-
validation of address and blockHash.
|
|
98
|
-
"""
|
|
99
|
-
# todo: provide hook to lazily look up tx receipt via binary search if missing data
|
|
100
|
-
for name, data in deployments.items():
|
|
101
|
-
if "transaction" in data:
|
|
102
|
-
tx_hash = data["transaction"]
|
|
103
|
-
tx_receipt = w3.eth.get_transaction_receipt(tx_hash)
|
|
104
|
-
# tx_address will be None if contract created via contract factory
|
|
105
|
-
tx_address = tx_receipt["contractAddress"]
|
|
106
|
-
|
|
107
|
-
if tx_address is None and allow_missing_data is False:
|
|
108
|
-
raise EthPMValidationError(
|
|
109
|
-
"No contract address found in tx receipt. Unable to verify "
|
|
110
|
-
"address found in tx receipt matches address in manifest's "
|
|
111
|
-
"deployment data. If this validation is not necessary, "
|
|
112
|
-
"please enable `allow_missing_data` arg. "
|
|
113
|
-
)
|
|
114
|
-
|
|
115
|
-
if tx_address is not None and not is_same_address(
|
|
116
|
-
tx_address, data["address"]
|
|
117
|
-
):
|
|
118
|
-
raise EthPMValidationError(
|
|
119
|
-
f"Error validating tx_receipt for {name} deployment. "
|
|
120
|
-
f"Address found in manifest's deployment data: {data['address']} "
|
|
121
|
-
f"Does not match address found on tx_receipt: {tx_address}."
|
|
122
|
-
)
|
|
123
|
-
|
|
124
|
-
if "block" in data:
|
|
125
|
-
if tx_receipt["blockHash"] != to_bytes(hexstr=data["block"]):
|
|
126
|
-
raise EthPMValidationError(
|
|
127
|
-
f"Error validating tx_receipt for {name} deployment. "
|
|
128
|
-
f"Block found in manifest's deployment data: {data['block']!r} "
|
|
129
|
-
"Does not match block found on "
|
|
130
|
-
f"tx_receipt: {tx_receipt['blockHash']!r}."
|
|
131
|
-
)
|
|
132
|
-
elif allow_missing_data is False:
|
|
133
|
-
raise EthPMValidationError(
|
|
134
|
-
"No block hash found in deployment data. "
|
|
135
|
-
"Unable to verify block hash on tx receipt. "
|
|
136
|
-
"If this validation is not necessary, please enable "
|
|
137
|
-
"`allow_missing_data` arg."
|
|
138
|
-
)
|
|
139
|
-
elif allow_missing_data is False:
|
|
140
|
-
raise EthPMValidationError(
|
|
141
|
-
"No transaction hash found in deployment data. "
|
|
142
|
-
"Unable to validate tx_receipt. "
|
|
143
|
-
"If this validation is not necessary, please "
|
|
144
|
-
"enable `allow_missing_data` arg."
|
|
145
|
-
)
|