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.
Files changed (261) hide show
  1. ens/__init__.py +13 -2
  2. ens/_normalization.py +4 -4
  3. ens/async_ens.py +31 -21
  4. ens/base_ens.py +3 -1
  5. ens/contract_data.py +2 -2
  6. ens/ens.py +14 -11
  7. ens/exceptions.py +16 -29
  8. ens/specs/nf.json +1 -1
  9. ens/specs/normalization_spec.json +1 -1
  10. ens/utils.py +33 -41
  11. web3/__init__.py +23 -12
  12. web3/_utils/abi.py +162 -274
  13. web3/_utils/async_transactions.py +34 -20
  14. web3/_utils/batching.py +217 -0
  15. web3/_utils/blocks.py +6 -2
  16. web3/_utils/caching/__init__.py +12 -0
  17. web3/_utils/caching/caching_utils.py +433 -0
  18. web3/_utils/caching/request_caching_validation.py +287 -0
  19. web3/_utils/compat/__init__.py +2 -3
  20. web3/_utils/contract_sources/compile_contracts.py +1 -1
  21. web3/_utils/contract_sources/contract_data/ambiguous_function_contract.py +42 -0
  22. web3/_utils/contract_sources/contract_data/arrays_contract.py +3 -3
  23. web3/_utils/contract_sources/contract_data/bytes_contracts.py +5 -5
  24. web3/_utils/contract_sources/contract_data/constructor_contracts.py +7 -7
  25. web3/_utils/contract_sources/contract_data/contract_caller_tester.py +3 -3
  26. web3/_utils/contract_sources/contract_data/emitter_contract.py +3 -3
  27. web3/_utils/contract_sources/contract_data/event_contracts.py +50 -5
  28. web3/_utils/contract_sources/contract_data/extended_resolver.py +3 -3
  29. web3/_utils/contract_sources/contract_data/fallback_function_contract.py +3 -3
  30. web3/_utils/contract_sources/contract_data/function_name_tester_contract.py +3 -3
  31. web3/_utils/contract_sources/contract_data/math_contract.py +3 -3
  32. web3/_utils/contract_sources/contract_data/offchain_lookup.py +3 -3
  33. web3/_utils/contract_sources/contract_data/offchain_resolver.py +3 -3
  34. web3/_utils/contract_sources/contract_data/panic_errors_contract.py +3 -3
  35. web3/_utils/contract_sources/contract_data/payable_tester.py +3 -3
  36. web3/_utils/contract_sources/contract_data/receive_function_contracts.py +5 -5
  37. web3/_utils/contract_sources/contract_data/reflector_contracts.py +3 -3
  38. web3/_utils/contract_sources/contract_data/revert_contract.py +3 -3
  39. web3/_utils/contract_sources/contract_data/simple_resolver.py +3 -3
  40. web3/_utils/contract_sources/contract_data/storage_contract.py +3 -3
  41. web3/_utils/contract_sources/contract_data/string_contract.py +3 -3
  42. web3/_utils/contract_sources/contract_data/tuple_contracts.py +5 -5
  43. web3/_utils/contracts.py +172 -220
  44. web3/_utils/datatypes.py +5 -1
  45. web3/_utils/decorators.py +6 -1
  46. web3/_utils/empty.py +1 -1
  47. web3/_utils/encoding.py +16 -12
  48. web3/_utils/error_formatters_utils.py +5 -3
  49. web3/_utils/events.py +78 -72
  50. web3/_utils/fee_utils.py +1 -3
  51. web3/_utils/filters.py +24 -22
  52. web3/_utils/formatters.py +2 -2
  53. web3/_utils/http.py +8 -2
  54. web3/_utils/http_session_manager.py +314 -0
  55. web3/_utils/math.py +14 -15
  56. web3/_utils/method_formatters.py +161 -34
  57. web3/_utils/module.py +2 -1
  58. web3/_utils/module_testing/__init__.py +3 -2
  59. web3/_utils/module_testing/eth_module.py +736 -583
  60. web3/_utils/module_testing/go_ethereum_debug_module.py +128 -0
  61. web3/_utils/module_testing/module_testing_utils.py +81 -24
  62. web3/_utils/module_testing/persistent_connection_provider.py +702 -220
  63. web3/_utils/module_testing/utils.py +114 -33
  64. web3/_utils/module_testing/web3_module.py +438 -17
  65. web3/_utils/normalizers.py +13 -11
  66. web3/_utils/rpc_abi.py +10 -22
  67. web3/_utils/threads.py +8 -7
  68. web3/_utils/transactions.py +32 -25
  69. web3/_utils/type_conversion.py +5 -1
  70. web3/_utils/validation.py +20 -17
  71. web3/beacon/__init__.py +5 -0
  72. web3/beacon/api_endpoints.py +3 -0
  73. web3/beacon/async_beacon.py +29 -6
  74. web3/beacon/beacon.py +24 -6
  75. web3/contract/__init__.py +7 -0
  76. web3/contract/async_contract.py +285 -82
  77. web3/contract/base_contract.py +556 -258
  78. web3/contract/contract.py +295 -84
  79. web3/contract/utils.py +251 -55
  80. web3/datastructures.py +56 -41
  81. web3/eth/__init__.py +7 -0
  82. web3/eth/async_eth.py +89 -69
  83. web3/eth/base_eth.py +7 -3
  84. web3/eth/eth.py +43 -66
  85. web3/exceptions.py +158 -83
  86. web3/gas_strategies/time_based.py +8 -6
  87. web3/geth.py +53 -184
  88. web3/main.py +77 -43
  89. web3/manager.py +368 -101
  90. web3/method.py +43 -15
  91. web3/middleware/__init__.py +26 -8
  92. web3/middleware/attrdict.py +12 -22
  93. web3/middleware/base.py +55 -2
  94. web3/middleware/filter.py +45 -23
  95. web3/middleware/formatting.py +6 -3
  96. web3/middleware/names.py +4 -1
  97. web3/middleware/signing.py +15 -6
  98. web3/middleware/stalecheck.py +2 -1
  99. web3/module.py +62 -26
  100. web3/providers/__init__.py +21 -0
  101. web3/providers/async_base.py +93 -38
  102. web3/providers/base.py +85 -40
  103. web3/providers/eth_tester/__init__.py +5 -0
  104. web3/providers/eth_tester/defaults.py +2 -55
  105. web3/providers/eth_tester/main.py +57 -35
  106. web3/providers/eth_tester/middleware.py +16 -17
  107. web3/providers/ipc.py +42 -18
  108. web3/providers/legacy_websocket.py +27 -2
  109. web3/providers/persistent/__init__.py +7 -0
  110. web3/providers/persistent/async_ipc.py +61 -121
  111. web3/providers/persistent/persistent.py +324 -17
  112. web3/providers/persistent/persistent_connection.py +54 -5
  113. web3/providers/persistent/request_processor.py +136 -56
  114. web3/providers/persistent/subscription_container.py +56 -0
  115. web3/providers/persistent/subscription_manager.py +233 -0
  116. web3/providers/persistent/websocket.py +29 -92
  117. web3/providers/rpc/__init__.py +5 -0
  118. web3/providers/rpc/async_rpc.py +73 -18
  119. web3/providers/rpc/rpc.py +73 -30
  120. web3/providers/rpc/utils.py +1 -13
  121. web3/scripts/install_pre_releases.py +33 -0
  122. web3/scripts/parse_pygeth_version.py +16 -0
  123. web3/testing.py +4 -4
  124. web3/tracing.py +9 -5
  125. web3/types.py +141 -74
  126. web3/utils/__init__.py +64 -5
  127. web3/utils/abi.py +790 -10
  128. web3/utils/address.py +8 -0
  129. web3/utils/async_exception_handling.py +20 -11
  130. web3/utils/caching.py +34 -4
  131. web3/utils/exception_handling.py +9 -12
  132. web3/utils/subscriptions.py +285 -0
  133. {web3-7.0.0b1.dist-info → web3-7.7.0.dist-info}/LICENSE +1 -1
  134. web3-7.7.0.dist-info/METADATA +130 -0
  135. web3-7.7.0.dist-info/RECORD +171 -0
  136. {web3-7.0.0b1.dist-info → web3-7.7.0.dist-info}/WHEEL +1 -1
  137. {web3-7.0.0b1.dist-info → web3-7.7.0.dist-info}/top_level.txt +0 -1
  138. ethpm/__init__.py +0 -20
  139. ethpm/_utils/__init__.py +0 -0
  140. ethpm/_utils/backend.py +0 -93
  141. ethpm/_utils/cache.py +0 -44
  142. ethpm/_utils/chains.py +0 -119
  143. ethpm/_utils/contract.py +0 -35
  144. ethpm/_utils/deployments.py +0 -145
  145. ethpm/_utils/ipfs.py +0 -116
  146. ethpm/_utils/protobuf/__init__.py +0 -0
  147. ethpm/_utils/protobuf/ipfs_file_pb2.py +0 -33
  148. ethpm/_utils/registry.py +0 -29
  149. ethpm/assets/__init__.py +0 -0
  150. ethpm/assets/ens/v3.json +0 -1
  151. ethpm/assets/escrow/with_bytecode_v3.json +0 -1
  152. ethpm/assets/ipfs_file.proto +0 -32
  153. ethpm/assets/owned/output_v3.json +0 -1
  154. ethpm/assets/owned/with_contract_type_v3.json +0 -1
  155. ethpm/assets/registry/contracts/Authority.sol +0 -156
  156. ethpm/assets/registry/contracts/IndexedOrderedSetLib.sol +0 -106
  157. ethpm/assets/registry/contracts/PackageDB.sol +0 -225
  158. ethpm/assets/registry/contracts/PackageRegistry.sol +0 -361
  159. ethpm/assets/registry/contracts/PackageRegistryInterface.sol +0 -97
  160. ethpm/assets/registry/contracts/ReleaseDB.sol +0 -309
  161. ethpm/assets/registry/contracts/ReleaseValidator.sol +0 -152
  162. ethpm/assets/registry/solc_input.json +0 -1
  163. ethpm/assets/registry/solc_output.json +0 -1
  164. ethpm/assets/registry/v3.json +0 -1
  165. ethpm/assets/safe-math-lib/v3-strict-no-deployments.json +0 -1
  166. ethpm/assets/simple-registry/contracts/Ownable.sol +0 -63
  167. ethpm/assets/simple-registry/contracts/PackageRegistry.sol +0 -373
  168. ethpm/assets/simple-registry/contracts/PackageRegistryInterface.sol +0 -96
  169. ethpm/assets/simple-registry/solc_input.json +0 -33
  170. ethpm/assets/simple-registry/solc_output.json +0 -1
  171. ethpm/assets/simple-registry/v3.json +0 -1
  172. ethpm/assets/standard-token/output_v3.json +0 -1
  173. ethpm/assets/standard-token/with_bytecode_v3.json +0 -1
  174. ethpm/assets/vyper_registry/0.1.0.json +0 -1
  175. ethpm/assets/vyper_registry/registry.vy +0 -216
  176. ethpm/assets/vyper_registry/registry_with_delete.vy +0 -244
  177. ethpm/backends/__init__.py +0 -0
  178. ethpm/backends/base.py +0 -43
  179. ethpm/backends/http.py +0 -108
  180. ethpm/backends/ipfs.py +0 -219
  181. ethpm/backends/registry.py +0 -154
  182. ethpm/constants.py +0 -17
  183. ethpm/contract.py +0 -187
  184. ethpm/dependencies.py +0 -58
  185. ethpm/deployments.py +0 -80
  186. ethpm/ethpm-spec/examples/escrow/1.0.0-pretty.json +0 -146
  187. ethpm/ethpm-spec/examples/escrow/1.0.0.json +0 -1
  188. ethpm/ethpm-spec/examples/escrow/contracts/Escrow.sol +0 -32
  189. ethpm/ethpm-spec/examples/escrow/contracts/SafeSendLib.sol +0 -20
  190. ethpm/ethpm-spec/examples/escrow/v3-pretty.json +0 -171
  191. ethpm/ethpm-spec/examples/escrow/v3.json +0 -1
  192. ethpm/ethpm-spec/examples/owned/1.0.0-pretty.json +0 -21
  193. ethpm/ethpm-spec/examples/owned/1.0.0.json +0 -1
  194. ethpm/ethpm-spec/examples/owned/contracts/Owned.sol +0 -12
  195. ethpm/ethpm-spec/examples/owned/v3-pretty.json +0 -27
  196. ethpm/ethpm-spec/examples/owned/v3.json +0 -1
  197. ethpm/ethpm-spec/examples/piper-coin/1.0.0-pretty.json +0 -31
  198. ethpm/ethpm-spec/examples/piper-coin/1.0.0.json +0 -1
  199. ethpm/ethpm-spec/examples/piper-coin/v3-pretty.json +0 -21
  200. ethpm/ethpm-spec/examples/piper-coin/v3.json +0 -1
  201. ethpm/ethpm-spec/examples/safe-math-lib/1.0.0-pretty.json +0 -85
  202. ethpm/ethpm-spec/examples/safe-math-lib/1.0.0.json +0 -1
  203. ethpm/ethpm-spec/examples/safe-math-lib/contracts/SafeMathLib.sol +0 -24
  204. ethpm/ethpm-spec/examples/safe-math-lib/v3-pretty.json +0 -117
  205. ethpm/ethpm-spec/examples/safe-math-lib/v3.json +0 -1
  206. ethpm/ethpm-spec/examples/standard-token/1.0.0-pretty.json +0 -55
  207. ethpm/ethpm-spec/examples/standard-token/1.0.0.json +0 -1
  208. ethpm/ethpm-spec/examples/standard-token/contracts/AbstractToken.sol +0 -20
  209. ethpm/ethpm-spec/examples/standard-token/contracts/StandardToken.sol +0 -84
  210. ethpm/ethpm-spec/examples/standard-token/v3-pretty.json +0 -460
  211. ethpm/ethpm-spec/examples/standard-token/v3.json +0 -1
  212. ethpm/ethpm-spec/examples/transferable/1.0.0-pretty.json +0 -21
  213. ethpm/ethpm-spec/examples/transferable/1.0.0.json +0 -1
  214. ethpm/ethpm-spec/examples/transferable/contracts/Transferable.sol +0 -14
  215. ethpm/ethpm-spec/examples/transferable/v3-pretty.json +0 -27
  216. ethpm/ethpm-spec/examples/transferable/v3.json +0 -1
  217. ethpm/ethpm-spec/examples/wallet/1.0.0-pretty.json +0 -120
  218. ethpm/ethpm-spec/examples/wallet/1.0.0.json +0 -1
  219. ethpm/ethpm-spec/examples/wallet/contracts/Wallet.sol +0 -41
  220. ethpm/ethpm-spec/examples/wallet/v3-pretty.json +0 -181
  221. ethpm/ethpm-spec/examples/wallet/v3.json +0 -1
  222. ethpm/ethpm-spec/examples/wallet-with-send/1.0.0-pretty.json +0 -135
  223. ethpm/ethpm-spec/examples/wallet-with-send/1.0.0.json +0 -1
  224. ethpm/ethpm-spec/examples/wallet-with-send/contracts/WalletWithSend.sol +0 -18
  225. ethpm/ethpm-spec/examples/wallet-with-send/v3-pretty.json +0 -207
  226. ethpm/ethpm-spec/examples/wallet-with-send/v3.json +0 -1
  227. ethpm/ethpm-spec/spec/package.spec.json +0 -379
  228. ethpm/ethpm-spec/spec/v3.spec.json +0 -483
  229. ethpm/exceptions.py +0 -68
  230. ethpm/package.py +0 -438
  231. ethpm/tools/__init__.py +0 -4
  232. ethpm/tools/builder.py +0 -930
  233. ethpm/tools/checker.py +0 -312
  234. ethpm/tools/get_manifest.py +0 -19
  235. ethpm/uri.py +0 -141
  236. ethpm/validation/__init__.py +0 -0
  237. ethpm/validation/manifest.py +0 -146
  238. ethpm/validation/misc.py +0 -39
  239. ethpm/validation/package.py +0 -80
  240. ethpm/validation/uri.py +0 -163
  241. web3/_utils/caching.py +0 -155
  242. web3/_utils/contract_sources/contract_data/address_reflector.py +0 -29
  243. web3/_utils/module_testing/go_ethereum_personal_module.py +0 -300
  244. web3/_utils/request.py +0 -265
  245. web3/pm.py +0 -602
  246. web3/tools/__init__.py +0 -4
  247. web3/tools/benchmark/__init__.py +0 -0
  248. web3/tools/benchmark/main.py +0 -185
  249. web3/tools/benchmark/node.py +0 -126
  250. web3/tools/benchmark/reporting.py +0 -39
  251. web3/tools/benchmark/utils.py +0 -69
  252. web3/tools/pytest_ethereum/__init__.py +0 -0
  253. web3/tools/pytest_ethereum/_utils.py +0 -145
  254. web3/tools/pytest_ethereum/deployer.py +0 -48
  255. web3/tools/pytest_ethereum/exceptions.py +0 -22
  256. web3/tools/pytest_ethereum/linker.py +0 -128
  257. web3/tools/pytest_ethereum/plugins.py +0 -33
  258. web3-7.0.0b1.dist-info/METADATA +0 -114
  259. web3-7.0.0b1.dist-info/RECORD +0 -280
  260. web3-7.0.0b1.dist-info/entry_points.txt +0 -2
  261. /web3/_utils/{function_identifiers.py → abi_element_identifiers.py} +0 -0
@@ -1,483 +0,0 @@
1
- {
2
- "title": "Package Manifest",
3
- "description": "EthPM Manifest Specification",
4
- "type": "object",
5
- "required": [
6
- "manifest"
7
- ],
8
- "version": "3",
9
- "not": {
10
- "required": ["manifest_version"]
11
- },
12
- "properties": {
13
- "manifest": {
14
- "type": "string",
15
- "title": "Manifest",
16
- "description": "EthPM Manifest Version",
17
- "default": "ethpm/3",
18
- "enum": ["ethpm/3"]
19
- },
20
- "name": {
21
- "$ref": "#/definitions/PackageName"
22
- },
23
- "version": {
24
- "title": "Package Version",
25
- "description": "The version of the package that this release is for",
26
- "type": "string"
27
- },
28
- "meta": {
29
- "$ref": "#/definitions/PackageMeta"
30
- },
31
- "sources": {
32
- "title": "Sources",
33
- "description": "The source files included in this release",
34
- "type": "object",
35
- "patternProperties": {
36
- ".*": {
37
- "$ref": "#/definitions/Source"
38
- }
39
- }
40
- },
41
- "compilers": {
42
- "title": "Compilers",
43
- "description": "The compiler versions used in this release",
44
- "type": "array",
45
- "items": {
46
- "$ref": "#/definitions/CompilerInformation"
47
- }
48
- },
49
- "contractTypes": {
50
- "title": "Contract Types",
51
- "description": "The contract types included in this release",
52
- "type": "object",
53
- "propertyNames": {
54
- "$ref": "#/definitions/ContractTypeName"
55
- },
56
- "patternProperties": {
57
- "": {
58
- "$ref": "#/definitions/ContractType"
59
- }
60
- }
61
- },
62
- "deployments": {
63
- "title": "Deployments",
64
- "description": "The deployed contract instances in this release",
65
- "type": "object",
66
- "propertyNames": {
67
- "$ref": "#/definitions/BlockchainURI"
68
- },
69
- "patternProperties": {
70
- "": {
71
- "$ref": "#/definitions/Deployment"
72
- }
73
- }
74
- },
75
- "buildDependencies": {
76
- "title": "Build Dependencies",
77
- "type": "object",
78
- "propertyNames": {
79
- "$ref": "#/definitions/PackageName"
80
- },
81
- "patternProperties": {
82
- "": {
83
- "$ref": "#/definitions/ContentURI"
84
- }
85
- }
86
- }
87
- },
88
- "definitions": {
89
- "Source": {
90
- "title": "Source",
91
- "description": "Information about a source file included in this package",
92
- "type": "object",
93
- "anyOf": [
94
- {"required": ["content"]},
95
- {"required": ["urls"]}
96
- ],
97
- "properties": {
98
- "checksum": {
99
- "$ref": "#/definitions/ChecksumObject"
100
- },
101
- "urls": {
102
- "title": "URLs",
103
- "description": "Array of urls that resolve to the source file",
104
- "type": "array",
105
- "items": {
106
- "$ref": "#/definitions/ContentURI"
107
- }
108
- },
109
- "content": {
110
- "title": "Inlined source code",
111
- "type": "string"
112
- },
113
- "installPath": {
114
- "title": "Target file path to install source file",
115
- "type": "string",
116
- "pattern": "^\\.\\/.*$"
117
- },
118
- "type": {
119
- "title": "Type",
120
- "description": "File type of this source",
121
- "type": "string"
122
- },
123
- "license": {
124
- "title": "License",
125
- "description": "The license associated with the source file",
126
- "type": "string"
127
- }
128
- }
129
- },
130
- "PackageMeta": {
131
- "title": "Package Meta",
132
- "description": "Metadata about the package",
133
- "type": "object",
134
- "properties": {
135
- "authors": {
136
- "title": "Authors",
137
- "description": "Authors of this package",
138
- "type": "array",
139
- "items": {
140
- "type": "string"
141
- }
142
- },
143
- "license": {
144
- "title": "License",
145
- "description": "The license that this package and its source are released under",
146
- "type": "string"
147
- },
148
- "description": {
149
- "title": "Description",
150
- "description": "Description of this package",
151
- "type": "string"
152
- },
153
- "keywords": {
154
- "title": "Keywords",
155
- "description": "Keywords that apply to this package",
156
- "type": "array",
157
- "items": {
158
- "type": "string"
159
- }
160
- },
161
- "links": {
162
- "title": "Links",
163
- "descriptions": "URIs for resources related to this package",
164
- "type": "object",
165
- "additionalProperties": {
166
- "type": "string",
167
- "format": "uri"
168
- }
169
- }
170
- }
171
- },
172
- "PackageName": {
173
- "title": "Package Name",
174
- "description": "The name of the package that this release is for",
175
- "type": "string",
176
- "pattern": "^[a-z][-a-z0-9]{0,255}$"
177
- },
178
- "ContractType": {
179
- "title": "Contract Type",
180
- "description": "Data for a contract type included in this package",
181
- "type": "object",
182
- "properties":{
183
- "contractName": {
184
- "$ref": "#/definitions/ContractTypeName"
185
- },
186
- "sourceId": {
187
- "title": "Source ID",
188
- "description": "The source ID that corresponds to this contract type",
189
- "type": "string"
190
- },
191
- "deploymentBytecode": {
192
- "$ref": "#/definitions/BytecodeObject"
193
- },
194
- "runtimeBytecode": {
195
- "$ref": "#/definitions/BytecodeObject"
196
- },
197
- "abi": {
198
- "title": "ABI",
199
- "description": "The ABI for this contract type",
200
- "type": "array"
201
- },
202
- "devdoc": {
203
- "title": "Devdoc",
204
- "description": "The dev-doc for this contract",
205
- "type": "object"
206
- },
207
- "userdoc": {
208
- "title": "Userdoc",
209
- "description": "The user-doc for this contract",
210
- "type": "object"
211
- }
212
- }
213
- },
214
- "ContractInstance": {
215
- "title": "Contract Instance",
216
- "description": "Data for a deployed instance of a contract",
217
- "type": "object",
218
- "required": [
219
- "contractType",
220
- "address"
221
- ],
222
- "properties": {
223
- "contractType": {
224
- "anyOf": [
225
- {"$ref": "#/definitions/ContractTypeName"},
226
- {"$ref": "#/definitions/NestedContractTypeName"}
227
- ]
228
- },
229
- "address": {
230
- "$ref": "#/definitions/Address"
231
- },
232
- "transaction": {
233
- "$ref": "#/definitions/TransactionHash"
234
- },
235
- "block": {
236
- "$ref": "#/definitions/BlockHash"
237
- },
238
- "runtimeBytecode": {
239
- "$ref": "#/definitions/BytecodeObject"
240
- },
241
- "linkDependencies": {
242
- "title": "Link Dependencies",
243
- "description": "The values for the link references found within this contract instances runtime bytecode",
244
- "type": "array",
245
- "items": {
246
- "$ref": "#/definitions/LinkValue"
247
- }
248
- }
249
- }
250
- },
251
- "ContractTypeName": {
252
- "title": "Contract Type Name",
253
- "description": "The name of the contract type",
254
- "type": "string",
255
- "pattern": "^(?:[a-z][-a-z0-9]{0,255}\\:)?[a-zA-Z_$][-a-zA-Z0-9_$]{0,255}(?:[-a-zA-Z0-9]{1,256}])?$"
256
- },
257
- "ByteString": {
258
- "title": "Byte String",
259
- "description": "0x-prefixed hexadecimal string representing bytes",
260
- "type": "string",
261
- "pattern": "^0x([0-9a-fA-F]{2})*$"
262
- },
263
- "BytecodeObject": {
264
- "title": "Bytecode Object",
265
- "type": "object",
266
- "anyOf": [
267
- {"required": ["bytecode"]},
268
- {"required": ["linkDependencies"]}
269
- ],
270
- "properties": {
271
- "bytecode": {
272
- "$ref": "#/definitions/ByteString"
273
- },
274
- "linkReferences": {
275
- "type": "array",
276
- "items": {
277
- "$ref": "#/definitions/LinkReference"
278
- }
279
- },
280
- "linkDependencies": {
281
- "type": "array",
282
- "items": {
283
- "$ref": "#/definitions/LinkValue"
284
- }
285
- }
286
- }
287
- },
288
- "ChecksumObject": {
289
- "title": "Checksum Object",
290
- "description": "Checksum information about the contents of a source file",
291
- "type": "object",
292
- "required": [
293
- "hash",
294
- "algorithm"
295
- ],
296
- "properties": {
297
- "hash": {
298
- "type": "string"
299
- },
300
- "algorithm": {
301
- "type": "string"
302
- }
303
- }
304
- },
305
- "LinkReference": {
306
- "title": "Link Reference",
307
- "description": "A defined location in some bytecode which requires linking",
308
- "type": "object",
309
- "required": [
310
- "offsets",
311
- "length",
312
- "name"
313
- ],
314
- "properties": {
315
- "offsets": {
316
- "type": "array",
317
- "items": {
318
- "type": "integer",
319
- "minimum": 0
320
- }
321
- },
322
- "length": {
323
- "type": "integer",
324
- "minimum": 1
325
- },
326
- "name": {
327
- "anyOf": [
328
- {"$ref": "#/definitions/ContractTypeName"},
329
- {"$ref": "#/definitions/NestedContractTypeName"}
330
- ]
331
- }
332
- }
333
- },
334
- "LinkValue": {
335
- "title": "Link Value",
336
- "description": "A value for an individual link reference in a contract's bytecode",
337
- "type": "object",
338
- "required": [
339
- "offsets",
340
- "type",
341
- "value"
342
- ],
343
- "properties": {
344
- "offsets": {
345
- "type": "array",
346
- "items": {
347
- "type": "integer",
348
- "minimum": 0
349
- }
350
- },
351
- "type": {
352
- "description": "The type of link value",
353
- "type": "string"
354
- },
355
- "value": {
356
- "description": "The value for the link reference"
357
- }
358
- },
359
- "oneOf": [{
360
- "properties": {
361
- "type": {
362
- "enum": ["literal"]
363
- },
364
- "value": {
365
- "$ref": "#/definitions/ByteString"
366
- }
367
- }
368
- }, {
369
- "properties": {
370
- "type": {
371
- "enum": ["reference"]
372
- },
373
- "value": {
374
- "anyOf": [
375
- {"$ref": "#/definitions/ContractInstanceName"},
376
- {"$ref": "#/definitions/NestedContractInstanceName"}
377
- ]
378
- }
379
- }
380
- }]
381
- },
382
- "ContractInstanceName": {
383
- "title": "Contract Instance Name",
384
- "description": "The name of the deployed contract instance",
385
- "type": "string",
386
- "pattern": "^[a-zA-Z_$][-a-zA-Z0-9_$]{0,255}(?:[-a-zA-Z0-9]{1,256})?$"
387
- },
388
- "Deployment": {
389
- "title": "Deployment",
390
- "type": "object",
391
- "propertyNames": {
392
- "$ref": "#/definitions/ContractInstanceName"
393
- },
394
- "patternProperties": {
395
- "": {
396
- "$ref": "#/definitions/ContractInstance"
397
- }
398
- }
399
- },
400
- "NestedContractTypeName": {
401
- "title": "Nested Contract Type Name",
402
- "description": "Name of a nested contract type from somewhere down the dependency tree",
403
- "type": "string",
404
- "pattern": "^(?:[a-z][-a-z0-9]{0,255}\\:)+[a-zA-Z_$][-a-zA-Z0-9_$]{0,255}(?:[-a-zA-Z0-9]{1,256})?$"
405
- },
406
- "NestedContractInstanceName": {
407
- "title": "Nested Contract Instance Name",
408
- "description": "Name of a nested contract instance from somewhere down the dependency tree",
409
- "type": "string",
410
- "pattern": "^(?:[a-z][-a-z0-9]{0,255}\\:)+[a-zA-Z_$][-a-zA-Z0-9_$]{0,255}(?:[-a-zA-Z0-9]{1,256})?$"
411
- },
412
- "CompilerInformation": {
413
- "title": "Compiler Information",
414
- "description": "Information about the software that was used to compile a contract type or deployment",
415
- "type": "object",
416
- "required": [
417
- "name",
418
- "version"
419
- ],
420
- "properties": {
421
- "name": {
422
- "description": "The name of the compiler",
423
- "type": "string"
424
- },
425
- "version": {
426
- "description": "The version string for the compiler",
427
- "type": "string"
428
- },
429
- "settings": {
430
- "description": "The settings used for compilation",
431
- "type": "object"
432
- },
433
- "contractTypes": {
434
- "description": "The contract types that targeted this compiler.",
435
- "type": "array",
436
- "items": {
437
- "$ref": "#/definitions/ContractTypeName"
438
- }
439
- }
440
- }
441
- },
442
- "Address": {
443
- "title": "Address",
444
- "description": "A 0x-prefixed Ethereum address",
445
- "allOf": [
446
- { "$ref": "#/definitions/ByteString" },
447
- { "minLength": 42, "maxLength": 42 }
448
- ]
449
- },
450
- "TransactionHash": {
451
- "title": "Transaction Hash",
452
- "description": "A 0x-prefixed Ethereum transaction hash",
453
- "allOf": [
454
- { "$ref": "#/definitions/ByteString" },
455
- { "minLength": 66, "maxLength": 66 }
456
- ]
457
- },
458
- "BlockHash": {
459
- "title": "Block Hash",
460
- "description": "An Ethereum block hash",
461
- "allOf": [
462
- { "$ref": "#/definitions/ByteString" },
463
- { "minLength": 66, "maxLength": 66 }
464
- ]
465
- },
466
- "ContentURI": {
467
- "title": "Content URI",
468
- "description": "An content addressable URI",
469
- "type": "string",
470
- "format": "uri"
471
- },
472
- "BlockchainURI": {
473
- "title": "Blockchain URI",
474
- "description": "An BIP122 URI",
475
- "type": "string",
476
- "pattern": "^blockchain\\://[0-9a-fA-F]{64}\\/block\\/[0-9a-fA-F]{64}$"
477
- }
478
- },
479
- "dependencies": {
480
- "name": ["version"],
481
- "version": ["name"]
482
- }
483
- }
ethpm/exceptions.py DELETED
@@ -1,68 +0,0 @@
1
- from eth_utils import (
2
- ValidationError,
3
- )
4
-
5
-
6
- class EthPMException(Exception):
7
- """
8
- Base class for all Py-EthPM errors.
9
- """
10
-
11
- pass
12
-
13
-
14
- class InsufficientAssetsError(EthPMException):
15
- """
16
- Raised when a Manifest or Package does not contain the required
17
- assets to do something.
18
- """
19
-
20
- pass
21
-
22
-
23
- class EthPMValidationError(EthPMException, ValidationError):
24
- """
25
- Raised when something does not pass a validation check.
26
- """
27
-
28
- pass
29
-
30
-
31
- class CannotHandleURI(EthPMException):
32
- """
33
- Raised when the given URI cannot be served by any of the available backends.
34
- """
35
-
36
- pass
37
-
38
-
39
- class FailureToFetchIPFSAssetsError(EthPMException):
40
- """
41
- Raised when an attempt to fetch a Package's assets via IPFS failed.
42
- """
43
-
44
- pass
45
-
46
-
47
- class BytecodeLinkingError(EthPMException):
48
- """
49
- Raised when an attempt to link a contract factory's bytecode failed.
50
- """
51
-
52
- pass
53
-
54
-
55
- class ManifestBuildingError(EthPMException):
56
- """
57
- Raised when an attempt to build a manifest failed.
58
- """
59
-
60
- pass
61
-
62
-
63
- class ManifestValidationError(EthPMException):
64
- """
65
- Raised when a provided manifest cannot be published, since it's invalid.
66
- """
67
-
68
- pass