web3 6.20.2__py3-none-any.whl → 7.0.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 (270) hide show
  1. ens/__init__.py +13 -2
  2. ens/_normalization.py +2 -17
  3. ens/async_ens.py +33 -21
  4. ens/base_ens.py +3 -1
  5. ens/ens.py +16 -11
  6. ens/exceptions.py +16 -29
  7. ens/specs/nf.json +1 -1
  8. ens/specs/normalization_spec.json +1 -1
  9. ens/utils.py +52 -63
  10. web3/__init__.py +20 -24
  11. web3/_utils/abi.py +115 -271
  12. web3/_utils/async_transactions.py +7 -4
  13. web3/_utils/batching.py +217 -0
  14. web3/_utils/blocks.py +6 -2
  15. web3/_utils/caching.py +128 -5
  16. web3/_utils/compat/__init__.py +2 -3
  17. web3/_utils/contract_sources/compile_contracts.py +1 -1
  18. web3/_utils/contract_sources/contract_data/arrays_contract.py +3 -3
  19. web3/_utils/contract_sources/contract_data/bytes_contracts.py +5 -5
  20. web3/_utils/contract_sources/contract_data/constructor_contracts.py +7 -7
  21. web3/_utils/contract_sources/contract_data/contract_caller_tester.py +3 -3
  22. web3/_utils/contract_sources/contract_data/emitter_contract.py +3 -3
  23. web3/_utils/contract_sources/contract_data/event_contracts.py +5 -5
  24. web3/_utils/contract_sources/contract_data/extended_resolver.py +3 -3
  25. web3/_utils/contract_sources/contract_data/fallback_function_contract.py +3 -3
  26. web3/_utils/contract_sources/contract_data/function_name_tester_contract.py +3 -3
  27. web3/_utils/contract_sources/contract_data/math_contract.py +3 -3
  28. web3/_utils/contract_sources/contract_data/offchain_lookup.py +3 -3
  29. web3/_utils/contract_sources/contract_data/offchain_resolver.py +3 -3
  30. web3/_utils/contract_sources/contract_data/panic_errors_contract.py +3 -3
  31. web3/_utils/contract_sources/contract_data/payable_tester.py +3 -3
  32. web3/_utils/contract_sources/contract_data/receive_function_contracts.py +5 -5
  33. web3/_utils/contract_sources/contract_data/reflector_contracts.py +3 -3
  34. web3/_utils/contract_sources/contract_data/revert_contract.py +3 -3
  35. web3/_utils/contract_sources/contract_data/simple_resolver.py +3 -3
  36. web3/_utils/contract_sources/contract_data/storage_contract.py +3 -3
  37. web3/_utils/contract_sources/contract_data/string_contract.py +3 -3
  38. web3/_utils/contract_sources/contract_data/tuple_contracts.py +5 -5
  39. web3/_utils/contracts.py +130 -236
  40. web3/_utils/datatypes.py +5 -1
  41. web3/_utils/decorators.py +13 -23
  42. web3/_utils/empty.py +1 -1
  43. web3/_utils/encoding.py +16 -12
  44. web3/_utils/ens.py +2 -1
  45. web3/_utils/error_formatters_utils.py +5 -3
  46. web3/_utils/events.py +66 -69
  47. web3/_utils/fee_utils.py +1 -3
  48. web3/_utils/filters.py +24 -22
  49. web3/_utils/formatters.py +2 -2
  50. web3/_utils/http.py +5 -3
  51. web3/_utils/http_session_manager.py +303 -0
  52. web3/_utils/math.py +14 -15
  53. web3/_utils/method_formatters.py +34 -36
  54. web3/_utils/module.py +2 -1
  55. web3/_utils/module_testing/__init__.py +0 -3
  56. web3/_utils/module_testing/eth_module.py +695 -643
  57. web3/_utils/module_testing/module_testing_utils.py +61 -34
  58. web3/_utils/module_testing/persistent_connection_provider.py +56 -25
  59. web3/_utils/module_testing/utils.py +258 -0
  60. web3/_utils/module_testing/web3_module.py +438 -17
  61. web3/_utils/normalizers.py +13 -11
  62. web3/_utils/rpc_abi.py +5 -32
  63. web3/_utils/threads.py +8 -7
  64. web3/_utils/transactions.py +14 -12
  65. web3/_utils/type_conversion.py +5 -1
  66. web3/_utils/validation.py +17 -17
  67. web3/auto/gethdev.py +7 -2
  68. web3/beacon/__init__.py +6 -1
  69. web3/beacon/async_beacon.py +9 -5
  70. web3/beacon/{main.py → beacon.py} +7 -5
  71. web3/contract/__init__.py +7 -0
  72. web3/contract/async_contract.py +47 -46
  73. web3/contract/base_contract.py +183 -158
  74. web3/contract/contract.py +49 -43
  75. web3/contract/utils.py +203 -59
  76. web3/datastructures.py +79 -31
  77. web3/eth/__init__.py +7 -0
  78. web3/eth/async_eth.py +39 -51
  79. web3/eth/base_eth.py +17 -10
  80. web3/eth/eth.py +30 -68
  81. web3/exceptions.py +108 -82
  82. web3/gas_strategies/time_based.py +8 -6
  83. web3/geth.py +1 -254
  84. web3/main.py +75 -122
  85. web3/manager.py +316 -146
  86. web3/method.py +38 -31
  87. web3/middleware/__init__.py +67 -89
  88. web3/middleware/attrdict.py +36 -49
  89. web3/middleware/base.py +174 -0
  90. web3/middleware/buffered_gas_estimate.py +20 -21
  91. web3/middleware/filter.py +157 -117
  92. web3/middleware/formatting.py +124 -108
  93. web3/middleware/gas_price_strategy.py +20 -32
  94. web3/middleware/names.py +29 -26
  95. web3/middleware/proof_of_authority.py +68 -0
  96. web3/middleware/pythonic.py +2 -2
  97. web3/middleware/signing.py +74 -89
  98. web3/middleware/stalecheck.py +52 -79
  99. web3/middleware/validation.py +5 -13
  100. web3/module.py +54 -10
  101. web3/providers/__init__.py +10 -6
  102. web3/providers/async_base.py +117 -39
  103. web3/providers/auto.py +3 -3
  104. web3/providers/base.py +89 -33
  105. web3/providers/eth_tester/__init__.py +5 -0
  106. web3/providers/eth_tester/defaults.py +1 -64
  107. web3/providers/eth_tester/main.py +99 -31
  108. web3/providers/eth_tester/middleware.py +45 -73
  109. web3/providers/ipc.py +42 -46
  110. web3/providers/{websocket/websocket.py → legacy_websocket.py} +32 -7
  111. web3/providers/persistent/__init__.py +22 -0
  112. web3/providers/persistent/async_ipc.py +153 -0
  113. web3/providers/{persistent.py → persistent/persistent.py} +106 -25
  114. web3/providers/persistent/persistent_connection.py +84 -0
  115. web3/providers/{websocket → persistent}/request_processor.py +94 -32
  116. web3/providers/persistent/utils.py +43 -0
  117. web3/providers/{websocket/websocket_v2.py → persistent/websocket.py} +29 -28
  118. web3/providers/rpc/__init__.py +11 -0
  119. web3/providers/rpc/async_rpc.py +171 -0
  120. web3/providers/rpc/rpc.py +179 -0
  121. web3/providers/rpc/utils.py +92 -0
  122. web3/testing.py +4 -4
  123. web3/tools/benchmark/main.py +22 -22
  124. web3/tools/benchmark/node.py +2 -8
  125. web3/tools/benchmark/reporting.py +2 -2
  126. web3/tools/benchmark/utils.py +1 -1
  127. web3/tracing.py +9 -5
  128. web3/types.py +30 -107
  129. web3/utils/__init__.py +58 -5
  130. web3/utils/abi.py +575 -10
  131. web3/utils/async_exception_handling.py +19 -7
  132. web3/utils/caching.py +32 -13
  133. web3/utils/exception_handling.py +7 -5
  134. {web3-6.20.2.dist-info → web3-7.0.0.dist-info}/LICENSE +1 -1
  135. web3-7.0.0.dist-info/METADATA +112 -0
  136. web3-7.0.0.dist-info/RECORD +167 -0
  137. {web3-6.20.2.dist-info → web3-7.0.0.dist-info}/WHEEL +1 -1
  138. {web3-6.20.2.dist-info → web3-7.0.0.dist-info}/top_level.txt +0 -1
  139. ethpm/__init__.py +0 -20
  140. ethpm/_utils/__init__.py +0 -0
  141. ethpm/_utils/backend.py +0 -93
  142. ethpm/_utils/cache.py +0 -44
  143. ethpm/_utils/chains.py +0 -119
  144. ethpm/_utils/contract.py +0 -35
  145. ethpm/_utils/deployments.py +0 -145
  146. ethpm/_utils/ipfs.py +0 -116
  147. ethpm/_utils/protobuf/__init__.py +0 -0
  148. ethpm/_utils/protobuf/ipfs_file_pb2.py +0 -33
  149. ethpm/_utils/registry.py +0 -29
  150. ethpm/assets/__init__.py +0 -0
  151. ethpm/assets/ens/v3.json +0 -1
  152. ethpm/assets/escrow/with_bytecode_v3.json +0 -1
  153. ethpm/assets/ipfs_file.proto +0 -32
  154. ethpm/assets/owned/output_v3.json +0 -1
  155. ethpm/assets/owned/with_contract_type_v3.json +0 -1
  156. ethpm/assets/registry/contracts/Authority.sol +0 -156
  157. ethpm/assets/registry/contracts/IndexedOrderedSetLib.sol +0 -106
  158. ethpm/assets/registry/contracts/PackageDB.sol +0 -225
  159. ethpm/assets/registry/contracts/PackageRegistry.sol +0 -361
  160. ethpm/assets/registry/contracts/PackageRegistryInterface.sol +0 -97
  161. ethpm/assets/registry/contracts/ReleaseDB.sol +0 -309
  162. ethpm/assets/registry/contracts/ReleaseValidator.sol +0 -152
  163. ethpm/assets/registry/solc_input.json +0 -1
  164. ethpm/assets/registry/solc_output.json +0 -1
  165. ethpm/assets/registry/v3.json +0 -1
  166. ethpm/assets/safe-math-lib/v3-strict-no-deployments.json +0 -1
  167. ethpm/assets/simple-registry/contracts/Ownable.sol +0 -63
  168. ethpm/assets/simple-registry/contracts/PackageRegistry.sol +0 -373
  169. ethpm/assets/simple-registry/contracts/PackageRegistryInterface.sol +0 -96
  170. ethpm/assets/simple-registry/solc_input.json +0 -33
  171. ethpm/assets/simple-registry/solc_output.json +0 -1
  172. ethpm/assets/simple-registry/v3.json +0 -1
  173. ethpm/assets/standard-token/output_v3.json +0 -1
  174. ethpm/assets/standard-token/with_bytecode_v3.json +0 -1
  175. ethpm/assets/vyper_registry/0.1.0.json +0 -1
  176. ethpm/assets/vyper_registry/registry.vy +0 -216
  177. ethpm/assets/vyper_registry/registry_with_delete.vy +0 -244
  178. ethpm/backends/__init__.py +0 -0
  179. ethpm/backends/base.py +0 -43
  180. ethpm/backends/http.py +0 -108
  181. ethpm/backends/ipfs.py +0 -219
  182. ethpm/backends/registry.py +0 -154
  183. ethpm/constants.py +0 -17
  184. ethpm/contract.py +0 -187
  185. ethpm/dependencies.py +0 -58
  186. ethpm/deployments.py +0 -80
  187. ethpm/ethpm-spec/examples/escrow/1.0.0-pretty.json +0 -146
  188. ethpm/ethpm-spec/examples/escrow/1.0.0.json +0 -1
  189. ethpm/ethpm-spec/examples/escrow/contracts/Escrow.sol +0 -32
  190. ethpm/ethpm-spec/examples/escrow/contracts/SafeSendLib.sol +0 -20
  191. ethpm/ethpm-spec/examples/escrow/v3-pretty.json +0 -171
  192. ethpm/ethpm-spec/examples/escrow/v3.json +0 -1
  193. ethpm/ethpm-spec/examples/owned/1.0.0-pretty.json +0 -21
  194. ethpm/ethpm-spec/examples/owned/1.0.0.json +0 -1
  195. ethpm/ethpm-spec/examples/owned/contracts/Owned.sol +0 -12
  196. ethpm/ethpm-spec/examples/owned/v3-pretty.json +0 -27
  197. ethpm/ethpm-spec/examples/owned/v3.json +0 -1
  198. ethpm/ethpm-spec/examples/piper-coin/1.0.0-pretty.json +0 -31
  199. ethpm/ethpm-spec/examples/piper-coin/1.0.0.json +0 -1
  200. ethpm/ethpm-spec/examples/piper-coin/v3-pretty.json +0 -21
  201. ethpm/ethpm-spec/examples/piper-coin/v3.json +0 -1
  202. ethpm/ethpm-spec/examples/safe-math-lib/1.0.0-pretty.json +0 -85
  203. ethpm/ethpm-spec/examples/safe-math-lib/1.0.0.json +0 -1
  204. ethpm/ethpm-spec/examples/safe-math-lib/contracts/SafeMathLib.sol +0 -24
  205. ethpm/ethpm-spec/examples/safe-math-lib/v3-pretty.json +0 -117
  206. ethpm/ethpm-spec/examples/safe-math-lib/v3.json +0 -1
  207. ethpm/ethpm-spec/examples/standard-token/1.0.0-pretty.json +0 -55
  208. ethpm/ethpm-spec/examples/standard-token/1.0.0.json +0 -1
  209. ethpm/ethpm-spec/examples/standard-token/contracts/AbstractToken.sol +0 -20
  210. ethpm/ethpm-spec/examples/standard-token/contracts/StandardToken.sol +0 -84
  211. ethpm/ethpm-spec/examples/standard-token/v3-pretty.json +0 -460
  212. ethpm/ethpm-spec/examples/standard-token/v3.json +0 -1
  213. ethpm/ethpm-spec/examples/transferable/1.0.0-pretty.json +0 -21
  214. ethpm/ethpm-spec/examples/transferable/1.0.0.json +0 -1
  215. ethpm/ethpm-spec/examples/transferable/contracts/Transferable.sol +0 -14
  216. ethpm/ethpm-spec/examples/transferable/v3-pretty.json +0 -27
  217. ethpm/ethpm-spec/examples/transferable/v3.json +0 -1
  218. ethpm/ethpm-spec/examples/wallet/1.0.0-pretty.json +0 -120
  219. ethpm/ethpm-spec/examples/wallet/1.0.0.json +0 -1
  220. ethpm/ethpm-spec/examples/wallet/contracts/Wallet.sol +0 -41
  221. ethpm/ethpm-spec/examples/wallet/v3-pretty.json +0 -181
  222. ethpm/ethpm-spec/examples/wallet/v3.json +0 -1
  223. ethpm/ethpm-spec/examples/wallet-with-send/1.0.0-pretty.json +0 -135
  224. ethpm/ethpm-spec/examples/wallet-with-send/1.0.0.json +0 -1
  225. ethpm/ethpm-spec/examples/wallet-with-send/contracts/WalletWithSend.sol +0 -18
  226. ethpm/ethpm-spec/examples/wallet-with-send/v3-pretty.json +0 -207
  227. ethpm/ethpm-spec/examples/wallet-with-send/v3.json +0 -1
  228. ethpm/ethpm-spec/spec/package.spec.json +0 -379
  229. ethpm/ethpm-spec/spec/v3.spec.json +0 -483
  230. ethpm/exceptions.py +0 -68
  231. ethpm/package.py +0 -438
  232. ethpm/tools/__init__.py +0 -4
  233. ethpm/tools/builder.py +0 -930
  234. ethpm/tools/checker.py +0 -312
  235. ethpm/tools/get_manifest.py +0 -19
  236. ethpm/uri.py +0 -141
  237. ethpm/validation/__init__.py +0 -0
  238. ethpm/validation/manifest.py +0 -146
  239. ethpm/validation/misc.py +0 -39
  240. ethpm/validation/package.py +0 -80
  241. ethpm/validation/uri.py +0 -163
  242. web3/_utils/contract_sources/contract_data/address_reflector.py +0 -29
  243. web3/_utils/miner.py +0 -88
  244. web3/_utils/module_testing/go_ethereum_personal_module.py +0 -323
  245. web3/_utils/request.py +0 -265
  246. web3/middleware/abi.py +0 -11
  247. web3/middleware/async_cache.py +0 -99
  248. web3/middleware/cache.py +0 -374
  249. web3/middleware/exception_handling.py +0 -49
  250. web3/middleware/exception_retry_request.py +0 -188
  251. web3/middleware/fixture.py +0 -190
  252. web3/middleware/geth_poa.py +0 -81
  253. web3/middleware/normalize_request_parameters.py +0 -11
  254. web3/middleware/simulate_unmined_transaction.py +0 -43
  255. web3/pm.py +0 -602
  256. web3/providers/async_rpc.py +0 -99
  257. web3/providers/rpc.py +0 -98
  258. web3/providers/websocket/__init__.py +0 -11
  259. web3/providers/websocket/websocket_connection.py +0 -42
  260. web3/tools/__init__.py +0 -4
  261. web3/tools/pytest_ethereum/__init__.py +0 -0
  262. web3/tools/pytest_ethereum/_utils.py +0 -145
  263. web3/tools/pytest_ethereum/deployer.py +0 -48
  264. web3/tools/pytest_ethereum/exceptions.py +0 -22
  265. web3/tools/pytest_ethereum/linker.py +0 -128
  266. web3/tools/pytest_ethereum/plugins.py +0 -33
  267. web3-6.20.2.dist-info/METADATA +0 -103
  268. web3-6.20.2.dist-info/RECORD +0 -283
  269. web3-6.20.2.dist-info/entry_points.txt +0 -2
  270. /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