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,120 +0,0 @@
1
- {
2
- "manifest_version": "2",
3
- "version": "1.0.0",
4
- "package_name": "wallet",
5
- "sources": {
6
- "./contracts/Wallet.sol": "ipfs://QmdvZEW3AaUntDfFkcbdnYzeLAAeD4YFeixQsdmHF88T6Q"
7
- },
8
- "contract_types": {
9
- "Wallet": {
10
- "deployment_bytecode": {
11
- "bytecode": "0x608060405260008054600160a060020a031916331790556102bf806100256000396000f3006080604052600436106100565763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100655780632e1a7d4d146100aa578063d0679d34146100c2575b34801561006257600080fd5b50005b34801561007157600080fd5b5061009673ffffffffffffffffffffffffffffffffffffffff600435166024356100f3565b604080519115158252519081900360200190f35b3480156100b657600080fd5b5061009660043561014a565b3480156100ce57600080fd5b5061009673ffffffffffffffffffffffffffffffffffffffff60043516602435610236565b6000805473ffffffffffffffffffffffffffffffffffffffff16331461011857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8216600090815260016020819052604090912082905592915050565b3360009081526001602090815260408083205481517fa293d1e800000000000000000000000000000000000000000000000000000000815260048101919091526024810185905290517300000000000000000000000000000000000000009263a293d1e89260448082019391829003018186803b1580156101ca57600080fd5b505af41580156101de573d6000803e3d6000fd5b505050506040513d60208110156101f457600080fd5b505133600081815260016020526040808220939093559151909184156108fc02918591818181858888f19350505050151561022e57600080fd5b506001919050565b6000805473ffffffffffffffffffffffffffffffffffffffff16331461025b57600080fd5b60405173ffffffffffffffffffffffffffffffffffffffff84169083156108fc029084906000818181858888f19796505050505050505600a165627a7a723058207816bfaab53d55eff94c08cb3e5655a597fb47b8b10256bc7b52b12105f3095e0029",
12
- "link_references": [{
13
- "offsets": [442],
14
- "length": 20,
15
- "name": "SafeMathLib"
16
- }]
17
- },
18
- "runtime_bytecode": {
19
- "bytecode": "0x6080604052600436106100565763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100655780632e1a7d4d146100aa578063d0679d34146100c2575b34801561006257600080fd5b50005b34801561007157600080fd5b5061009673ffffffffffffffffffffffffffffffffffffffff600435166024356100f3565b604080519115158252519081900360200190f35b3480156100b657600080fd5b5061009660043561014a565b3480156100ce57600080fd5b5061009673ffffffffffffffffffffffffffffffffffffffff60043516602435610236565b6000805473ffffffffffffffffffffffffffffffffffffffff16331461011857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8216600090815260016020819052604090912082905592915050565b3360009081526001602090815260408083205481517fa293d1e800000000000000000000000000000000000000000000000000000000815260048101919091526024810185905290517300000000000000000000000000000000000000009263a293d1e89260448082019391829003018186803b1580156101ca57600080fd5b505af41580156101de573d6000803e3d6000fd5b505050506040513d60208110156101f457600080fd5b505133600081815260016020526040808220939093559151909184156108fc02918591818181858888f19350505050151561022e57600080fd5b506001919050565b6000805473ffffffffffffffffffffffffffffffffffffffff16331461025b57600080fd5b60405173ffffffffffffffffffffffffffffffffffffffff84169083156108fc029084906000818181858888f19796505050505050505600a165627a7a723058207816bfaab53d55eff94c08cb3e5655a597fb47b8b10256bc7b52b12105f3095e0029",
20
- "link_references": [{
21
- "offsets": [405],
22
- "length": 20,
23
- "name": "SafeMathLib"
24
- }]
25
- },
26
- "abi": [
27
- {
28
- "constant": false,
29
- "inputs": [
30
- {"name": "recipient", "type": "address"},
31
- {"name": "value", "type": "uint256"}
32
- ],
33
- "name": "approve",
34
- "outputs": [
35
- {"name": "", "type": "bool"}
36
- ],
37
- "payable": false,
38
- "stateMutability": "nonpayable",
39
- "type": "function"
40
- },
41
- {
42
- "constant": false,
43
- "inputs": [
44
- {"name": "value", "type": "uint256"}
45
- ],
46
- "name": "withdraw",
47
- "outputs": [
48
- {"name": "", "type": "bool"}
49
- ],
50
- "payable": false,
51
- "stateMutability": "nonpayable",
52
- "type": "function"
53
- },
54
- {
55
- "constant": false,
56
- "inputs": [
57
- {"name": "recipient", "type": "address"},
58
- {"name": "value", "type": "uint256"}
59
- ],
60
- "name": "send",
61
- "outputs": [
62
- {"name": "", "type": "bool"}
63
- ],
64
- "payable": false,
65
- "stateMutability": "nonpayable",
66
- "type": "function"
67
- },
68
- {
69
- "payable": false,
70
- "stateMutability": "nonpayable",
71
- "type": "fallback"
72
- }
73
- ],
74
- "natspec": {
75
- "compiler": {
76
- "name": "solc",
77
- "version": "0.4.24+commit.e67f0147.Emscripten.clang",
78
- "settings": {
79
- "optimize": true
80
- }
81
- },
82
- "author": "Piper Merriam <pipermerriam@gmail.com>",
83
- "methods": {
84
- "approve(address,uint256)": {
85
- "details": "Sets recipient to be approved to withdraw the specified amount",
86
- "notice": "This will set the recipient to be approved to withdraw the specified amount."
87
- },
88
- "send(address,uint256)": {
89
- "details": "Sends the recipient the specified amount",
90
- "notice": "This will send the reciepient the specified amount."
91
- },
92
- "withdraw(uint256)": {
93
- "details": "Lets caller withdraw up to their approved amount",
94
- "notice": "This will withdraw provided value, deducting it from your total allowance."
95
- }
96
- },
97
- "title": "Contract for holding funds in escrow between two semi trusted parties."
98
- }
99
- }
100
- },
101
- "deployments": {
102
- "blockchain://41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d/block/0d2426efb30377a18129af05d887f9ba76bff85482000bd19e3630eb09a8bf39": {
103
- "Wallet": {
104
- "contract_type": "Wallet",
105
- "address": "0x79eb62e7a360952670C03676F47a9087c15065B3",
106
- "transaction": "0xaf122c215282dd340d686a662d60239f43700e15127b44e68dd6a00c48b9c88a",
107
- "block": "0x0a2d01614f4dadd0b7eeeb945d5bab534825911a7769a6d2da8adb72e91b2531",
108
- "runtime_bytecode": {
109
- "link_dependencies": [
110
- {"offsets": [405], "type": "reference", "value": "safe-math-lib:SafeMathLib"}
111
- ]
112
- }
113
- }
114
- }
115
- },
116
- "build_dependencies": {
117
- "owned": "ipfs://QmbeVyFLSuEUxiXKwSsEjef6icpdTdA4kGG9BcrJXKNKUW",
118
- "safe-math-lib": "ipfs://QmWgvM8yXGyHoGWqLFXvareJsoCZVsdrpKNCLMun3RaSJm"
119
- }
120
- }
@@ -1 +0,0 @@
1
- {"build_dependencies":{"owned":"ipfs://QmbeVyFLSuEUxiXKwSsEjef6icpdTdA4kGG9BcrJXKNKUW","safe-math-lib":"ipfs://QmWgvM8yXGyHoGWqLFXvareJsoCZVsdrpKNCLMun3RaSJm"},"contract_types":{"Wallet":{"abi":[{"constant":false,"inputs":[{"name":"recipient","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"value","type":"uint256"}],"name":"withdraw","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"recipient","type":"address"},{"name":"value","type":"uint256"}],"name":"send","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"payable":false,"stateMutability":"nonpayable","type":"fallback"}],"deployment_bytecode":{"bytecode":"0x608060405260008054600160a060020a031916331790556102bf806100256000396000f3006080604052600436106100565763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100655780632e1a7d4d146100aa578063d0679d34146100c2575b34801561006257600080fd5b50005b34801561007157600080fd5b5061009673ffffffffffffffffffffffffffffffffffffffff600435166024356100f3565b604080519115158252519081900360200190f35b3480156100b657600080fd5b5061009660043561014a565b3480156100ce57600080fd5b5061009673ffffffffffffffffffffffffffffffffffffffff60043516602435610236565b6000805473ffffffffffffffffffffffffffffffffffffffff16331461011857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8216600090815260016020819052604090912082905592915050565b3360009081526001602090815260408083205481517fa293d1e800000000000000000000000000000000000000000000000000000000815260048101919091526024810185905290517300000000000000000000000000000000000000009263a293d1e89260448082019391829003018186803b1580156101ca57600080fd5b505af41580156101de573d6000803e3d6000fd5b505050506040513d60208110156101f457600080fd5b505133600081815260016020526040808220939093559151909184156108fc02918591818181858888f19350505050151561022e57600080fd5b506001919050565b6000805473ffffffffffffffffffffffffffffffffffffffff16331461025b57600080fd5b60405173ffffffffffffffffffffffffffffffffffffffff84169083156108fc029084906000818181858888f19796505050505050505600a165627a7a723058207816bfaab53d55eff94c08cb3e5655a597fb47b8b10256bc7b52b12105f3095e0029","link_references":[{"length":20,"name":"SafeMathLib","offsets":[442]}]},"natspec":{"author":"Piper Merriam <pipermerriam@gmail.com>","compiler":{"name":"solc","settings":{"optimize":true},"version":"0.4.24+commit.e67f0147.Emscripten.clang"},"methods":{"approve(address,uint256)":{"details":"Sets recipient to be approved to withdraw the specified amount","notice":"This will set the recipient to be approved to withdraw the specified amount."},"send(address,uint256)":{"details":"Sends the recipient the specified amount","notice":"This will send the reciepient the specified amount."},"withdraw(uint256)":{"details":"Lets caller withdraw up to their approved amount","notice":"This will withdraw provided value, deducting it from your total allowance."}},"title":"Contract for holding funds in escrow between two semi trusted parties."},"runtime_bytecode":{"bytecode":"0x6080604052600436106100565763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100655780632e1a7d4d146100aa578063d0679d34146100c2575b34801561006257600080fd5b50005b34801561007157600080fd5b5061009673ffffffffffffffffffffffffffffffffffffffff600435166024356100f3565b604080519115158252519081900360200190f35b3480156100b657600080fd5b5061009660043561014a565b3480156100ce57600080fd5b5061009673ffffffffffffffffffffffffffffffffffffffff60043516602435610236565b6000805473ffffffffffffffffffffffffffffffffffffffff16331461011857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8216600090815260016020819052604090912082905592915050565b3360009081526001602090815260408083205481517fa293d1e800000000000000000000000000000000000000000000000000000000815260048101919091526024810185905290517300000000000000000000000000000000000000009263a293d1e89260448082019391829003018186803b1580156101ca57600080fd5b505af41580156101de573d6000803e3d6000fd5b505050506040513d60208110156101f457600080fd5b505133600081815260016020526040808220939093559151909184156108fc02918591818181858888f19350505050151561022e57600080fd5b506001919050565b6000805473ffffffffffffffffffffffffffffffffffffffff16331461025b57600080fd5b60405173ffffffffffffffffffffffffffffffffffffffff84169083156108fc029084906000818181858888f19796505050505050505600a165627a7a723058207816bfaab53d55eff94c08cb3e5655a597fb47b8b10256bc7b52b12105f3095e0029","link_references":[{"length":20,"name":"SafeMathLib","offsets":[405]}]}}},"deployments":{"blockchain://41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d/block/0d2426efb30377a18129af05d887f9ba76bff85482000bd19e3630eb09a8bf39":{"Wallet":{"address":"0x79eb62e7a360952670C03676F47a9087c15065B3","block":"0x0a2d01614f4dadd0b7eeeb945d5bab534825911a7769a6d2da8adb72e91b2531","contract_type":"Wallet","runtime_bytecode":{"link_dependencies":[{"offsets":[405],"type":"reference","value":"safe-math-lib:SafeMathLib"}]},"transaction":"0xaf122c215282dd340d686a662d60239f43700e15127b44e68dd6a00c48b9c88a"}}},"manifest_version":"2","package_name":"wallet","sources":{"./contracts/Wallet.sol":"ipfs://QmdvZEW3AaUntDfFkcbdnYzeLAAeD4YFeixQsdmHF88T6Q"},"version":"1.0.0"}
@@ -1,41 +0,0 @@
1
- // SPDX-License-Identifier: MIT
2
- pragma solidity ^0.6.8;
3
-
4
-
5
- import {SafeMathLib} from "./safe-math-lib/contracts/SafeMathLib.sol";
6
- import {Owned} from "./owned/contracts/Owned.sol";
7
-
8
-
9
- /// @title Contract for holding funds in escrow between two semi trusted parties.
10
- /// @author Piper Merriam <pipermerriam@gmail.com>
11
- contract Wallet is Owned {
12
- using SafeMathLib for uint;
13
-
14
- mapping (address => uint) allowances;
15
-
16
- /// @dev Fallback function for depositing funds
17
- fallback() external {
18
- }
19
-
20
- /// @dev Sends the recipient the specified amount
21
- /// @notice This will send the reciepient the specified amount.
22
- function send(address payable recipient, uint value) public onlyOwner returns (bool) {
23
- return recipient.send(value);
24
- }
25
-
26
- /// @dev Sets recipient to be approved to withdraw the specified amount
27
- /// @notice This will set the recipient to be approved to withdraw the specified amount.
28
- function approve(address recipient, uint value) public onlyOwner returns (bool) {
29
- allowances[recipient] = value;
30
- return true;
31
- }
32
-
33
- /// @dev Lets caller withdraw up to their approved amount
34
- /// @notice This will withdraw provided value, deducting it from your total allowance.
35
- function withdraw(uint value) public returns (bool) {
36
- allowances[msg.sender] = allowances[msg.sender].safeSub(value);
37
- if (!msg.sender.send(value))
38
- revert();
39
- return true;
40
- }
41
- }
@@ -1,181 +0,0 @@
1
- {
2
- "manifest": "ethpm/3",
3
- "version": "1.0.0",
4
- "name": "wallet",
5
- "sources": {
6
- "Wallet.sol": {
7
- "type": "solidity",
8
- "installPath": "./Wallet.sol",
9
- "urls": [
10
- "ipfs://QmfTZzHLSShTS1woD7JNszAyhjtS7ErFDT4QmtwEQQ1qpa"
11
- ]
12
- }
13
- },
14
- "compilers": [
15
- {
16
- "contractTypes": [
17
- "Wallet"
18
- ],
19
- "name": "solc",
20
- "version": "0.6.8+commit.0bbfe453",
21
- "settings": {
22
- "optimize": false
23
- }
24
- }
25
- ],
26
- "contractTypes": {
27
- "Wallet": {
28
- "sourceId": "Wallet.sol",
29
- "deploymentBytecode": {
30
- "bytecode": "0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610430806100606000396000f3fe608060405234801561001057600080fd5b50600436106100455760003560e01c8063095ea7b3146100485780632e1a7d4d146100ae578063d0679d34146100f457610046565b5b005b6100946004803603604081101561005e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061015a565b604051808215151515815260200191505060405180910390f35b6100da600480360360208110156100c457600080fd5b8101908080359060200190929190505050610203565b604051808215151515815260200191505060405180910390f35b6101406004803603604081101561010a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610362565b604051808215151515815260200191505060405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101b557600080fd5b81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506001905092915050565b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205473000000000000000000000000000000000000000063a293d1e89091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561029d57600080fd5b505af41580156102b1573d6000803e3d6000fd5b505050506040513d60208110156102c757600080fd5b8101908080519060200190929190505050600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f1935050505061035957600080fd5b60019050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103bd57600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f1935050505090509291505056fea2646970667358221220fa09119fa13c8df37a523851a236b913e5d00bf3274d5619daad516f510c8a9264736f6c63430006080033",
31
- "linkReferences": [
32
- {
33
- "offsets": [
34
- 679
35
- ],
36
- "length": 20,
37
- "name": "safe-math-lib:SafeMathLib"
38
- }
39
- ]
40
- },
41
- "runtimeBytecode": {
42
- "bytecode": "0x608060405234801561001057600080fd5b50600436106100455760003560e01c8063095ea7b3146100485780632e1a7d4d146100ae578063d0679d34146100f457610046565b5b005b6100946004803603604081101561005e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061015a565b604051808215151515815260200191505060405180910390f35b6100da600480360360208110156100c457600080fd5b8101908080359060200190929190505050610203565b604051808215151515815260200191505060405180910390f35b6101406004803603604081101561010a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610362565b604051808215151515815260200191505060405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101b557600080fd5b81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506001905092915050565b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205473000000000000000000000000000000000000000063a293d1e89091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561029d57600080fd5b505af41580156102b1573d6000803e3d6000fd5b505050506040513d60208110156102c757600080fd5b8101908080519060200190929190505050600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f1935050505061035957600080fd5b60019050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103bd57600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f1935050505090509291505056fea2646970667358221220fa09119fa13c8df37a523851a236b913e5d00bf3274d5619daad516f510c8a9264736f6c63430006080033",
43
- "linkReferences": [
44
- {
45
- "offsets": [
46
- 583
47
- ],
48
- "length": 20,
49
- "name": "safe-math-lib:SafeMathLib"
50
- }
51
- ]
52
- },
53
- "abi": [
54
- {
55
- "stateMutability": "nonpayable",
56
- "type": "fallback"
57
- },
58
- {
59
- "inputs": [
60
- {
61
- "internalType": "address",
62
- "name": "recipient",
63
- "type": "address"
64
- },
65
- {
66
- "internalType": "uint256",
67
- "name": "value",
68
- "type": "uint256"
69
- }
70
- ],
71
- "name": "approve",
72
- "outputs": [
73
- {
74
- "internalType": "bool",
75
- "name": "",
76
- "type": "bool"
77
- }
78
- ],
79
- "stateMutability": "nonpayable",
80
- "type": "function"
81
- },
82
- {
83
- "inputs": [
84
- {
85
- "internalType": "address payable",
86
- "name": "recipient",
87
- "type": "address"
88
- },
89
- {
90
- "internalType": "uint256",
91
- "name": "value",
92
- "type": "uint256"
93
- }
94
- ],
95
- "name": "send",
96
- "outputs": [
97
- {
98
- "internalType": "bool",
99
- "name": "",
100
- "type": "bool"
101
- }
102
- ],
103
- "stateMutability": "nonpayable",
104
- "type": "function"
105
- },
106
- {
107
- "inputs": [
108
- {
109
- "internalType": "uint256",
110
- "name": "value",
111
- "type": "uint256"
112
- }
113
- ],
114
- "name": "withdraw",
115
- "outputs": [
116
- {
117
- "internalType": "bool",
118
- "name": "",
119
- "type": "bool"
120
- }
121
- ],
122
- "stateMutability": "nonpayable",
123
- "type": "function"
124
- }
125
- ],
126
- "devdoc": {
127
- "author": "Piper Merriam <pipermerriam@gmail.com>",
128
- "methods": {
129
- "approve(address,uint256)": {
130
- "details": "Sets recipient to be approved to withdraw the specified amount"
131
- },
132
- "send(address,uint256)": {
133
- "details": "Sends the recipient the specified amount"
134
- },
135
- "withdraw(uint256)": {
136
- "details": "Lets caller withdraw up to their approved amount"
137
- }
138
- },
139
- "title": "Contract for holding funds in escrow between two semi trusted parties."
140
- },
141
- "userdoc": {
142
- "methods": {
143
- "approve(address,uint256)": {
144
- "notice": "This will set the recipient to be approved to withdraw the specified amount."
145
- },
146
- "send(address,uint256)": {
147
- "notice": "This will send the reciepient the specified amount."
148
- },
149
- "withdraw(uint256)": {
150
- "notice": "This will withdraw provided value, deducting it from your total allowance."
151
- }
152
- }
153
- }
154
- }
155
- },
156
- "deployments": {
157
- "blockchain://41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d/block/e30e4ef1dd1e73e788c3d094859f14ddd139a19e8a3667e2ee4831d9bd1113ac": {
158
- "Wallet": {
159
- "contractType": "Wallet",
160
- "address": "0x491CB3AC79d0f5D7078C3cF6EF3daEcE9623CD21",
161
- "transaction": "0x8648f43125776ec2b727eda84d10c67db1693fce8bc1e7b3f84f9e40086e4773",
162
- "block": "0x77adadc004c1a830682f3237b42ce81a379d11dfd88292c97ad80658f470717a",
163
- "runtimeBytecode": {
164
- "linkDependencies": [
165
- {
166
- "offsets": [
167
- 583
168
- ],
169
- "type": "reference",
170
- "value": "safe-math-lib:SafeMathLib"
171
- }
172
- ]
173
- }
174
- }
175
- }
176
- },
177
- "buildDependencies": {
178
- "owned": "ipfs://QmcxvhkJJVpbxEAa6cgW3B6XwPJb79w9GpNUv2P2THUzZR",
179
- "safe-math-lib": "ipfs://QmWnPsiS3Xb8GvCDEBFnnKs8Yk4HaAX6rCqJAaQXGbCoPk"
180
- }
181
- }
@@ -1 +0,0 @@
1
- {"buildDependencies":{"owned":"ipfs://QmcxvhkJJVpbxEAa6cgW3B6XwPJb79w9GpNUv2P2THUzZR","safe-math-lib":"ipfs://QmWnPsiS3Xb8GvCDEBFnnKs8Yk4HaAX6rCqJAaQXGbCoPk"},"compilers":[{"contractTypes":["Wallet"],"name":"solc","settings":{"optimize":false},"version":"0.6.8+commit.0bbfe453"}],"contractTypes":{"Wallet":{"abi":[{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"send","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}],"deploymentBytecode":{"bytecode":"0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610430806100606000396000f3fe608060405234801561001057600080fd5b50600436106100455760003560e01c8063095ea7b3146100485780632e1a7d4d146100ae578063d0679d34146100f457610046565b5b005b6100946004803603604081101561005e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061015a565b604051808215151515815260200191505060405180910390f35b6100da600480360360208110156100c457600080fd5b8101908080359060200190929190505050610203565b604051808215151515815260200191505060405180910390f35b6101406004803603604081101561010a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610362565b604051808215151515815260200191505060405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101b557600080fd5b81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506001905092915050565b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205473000000000000000000000000000000000000000063a293d1e89091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561029d57600080fd5b505af41580156102b1573d6000803e3d6000fd5b505050506040513d60208110156102c757600080fd5b8101908080519060200190929190505050600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f1935050505061035957600080fd5b60019050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103bd57600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f1935050505090509291505056fea2646970667358221220fa09119fa13c8df37a523851a236b913e5d00bf3274d5619daad516f510c8a9264736f6c63430006080033","linkReferences":[{"length":20,"name":"safe-math-lib:SafeMathLib","offsets":[679]}]},"devdoc":{"author":"Piper Merriam <pipermerriam@gmail.com>","methods":{"approve(address,uint256)":{"details":"Sets recipient to be approved to withdraw the specified amount"},"send(address,uint256)":{"details":"Sends the recipient the specified amount"},"withdraw(uint256)":{"details":"Lets caller withdraw up to their approved amount"}},"title":"Contract for holding funds in escrow between two semi trusted parties."},"runtimeBytecode":{"bytecode":"0x608060405234801561001057600080fd5b50600436106100455760003560e01c8063095ea7b3146100485780632e1a7d4d146100ae578063d0679d34146100f457610046565b5b005b6100946004803603604081101561005e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061015a565b604051808215151515815260200191505060405180910390f35b6100da600480360360208110156100c457600080fd5b8101908080359060200190929190505050610203565b604051808215151515815260200191505060405180910390f35b6101406004803603604081101561010a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610362565b604051808215151515815260200191505060405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101b557600080fd5b81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506001905092915050565b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205473000000000000000000000000000000000000000063a293d1e89091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561029d57600080fd5b505af41580156102b1573d6000803e3d6000fd5b505050506040513d60208110156102c757600080fd5b8101908080519060200190929190505050600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f1935050505061035957600080fd5b60019050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103bd57600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f1935050505090509291505056fea2646970667358221220fa09119fa13c8df37a523851a236b913e5d00bf3274d5619daad516f510c8a9264736f6c63430006080033","linkReferences":[{"length":20,"name":"safe-math-lib:SafeMathLib","offsets":[583]}]},"sourceId":"Wallet.sol","userdoc":{"methods":{"approve(address,uint256)":{"notice":"This will set the recipient to be approved to withdraw the specified amount."},"send(address,uint256)":{"notice":"This will send the reciepient the specified amount."},"withdraw(uint256)":{"notice":"This will withdraw provided value, deducting it from your total allowance."}}}}},"deployments":{"blockchain://41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d/block/e30e4ef1dd1e73e788c3d094859f14ddd139a19e8a3667e2ee4831d9bd1113ac":{"Wallet":{"address":"0x491CB3AC79d0f5D7078C3cF6EF3daEcE9623CD21","block":"0x77adadc004c1a830682f3237b42ce81a379d11dfd88292c97ad80658f470717a","contractType":"Wallet","runtimeBytecode":{"linkDependencies":[{"offsets":[583],"type":"reference","value":"safe-math-lib:SafeMathLib"}]},"transaction":"0x8648f43125776ec2b727eda84d10c67db1693fce8bc1e7b3f84f9e40086e4773"}}},"manifest":"ethpm/3","name":"wallet","sources":{"Wallet.sol":{"installPath":"./Wallet.sol","type":"solidity","urls":["ipfs://QmfTZzHLSShTS1woD7JNszAyhjtS7ErFDT4QmtwEQQ1qpa"]}},"version":"1.0.0"}
@@ -1,135 +0,0 @@
1
- {
2
- "manifest_version": "2",
3
- "version": "1.0.0",
4
- "package_name": "wallet-with-send",
5
- "sources": {
6
- "./contracts/WalletWithSend.sol": "ipfs://QmRvVRn6USxJu1H4L51KyzxbQFVmCFqdzB4RAG9VeJ2s4W"
7
- },
8
- "contract_types": {
9
- "WalletWithSend": {
10
- "deployment_bytecode": {
11
- "bytecode": "0x608060405260008054600160a060020a03191633179055610395806100256000396000f3006080604052600436106100615763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100705780632e1a7d4d146100a8578063c577ff8b146100c0578063d0679d34146100e6575b34801561006d57600080fd5b50005b34801561007c57600080fd5b50610094600160a060020a036004351660243561010a565b604080519115158252519081900360200190f35b3480156100b457600080fd5b50610094600435610147565b3480156100cc57600080fd5b506100e4600435600160a060020a0360243516610233565b005b3480156100f257600080fd5b50610094600160a060020a0360043516602435610326565b60008054600160a060020a0316331461012257600080fd5b50600160a060020a038216600090815260016020819052604090912082905592915050565b3360009081526001602090815260408083205481517fa293d1e800000000000000000000000000000000000000000000000000000000815260048101919091526024810185905290517300000000000000000000000000000000000000009263a293d1e89260448082019391829003018186803b1580156101c757600080fd5b505af41580156101db573d6000803e3d6000fd5b505050506040513d60208110156101f157600080fd5b505133600081815260016020526040808220939093559151909184156108fc02918591818181858888f19350505050151561022b57600080fd5b506001919050565b336000908152600160209081526040918290205482517fa293d1e800000000000000000000000000000000000000000000000000000000815260048101919091526024810185905291517300000000000000000000000000000000000000009263a293d1e8926044808301939192829003018186803b1580156102b557600080fd5b505af41580156102c9573d6000803e3d6000fd5b505050506040513d60208110156102df57600080fd5b505133600090815260016020526040808220929092559051600160a060020a0383169184156108fc02918591818181858888f19350505050151561032257600080fd5b5050565b60008054600160a060020a0316331461033e57600080fd5b604051600160a060020a0384169083156108fc029084906000818181858888f19796505050505050505600a165627a7a72305820127a404b857b83aa26a51d55d8283bff1dfb5c18217a999c5fbd2862d240fb760029",
12
- "link_references": [{
13
- "offsets": [439, 676],
14
- "length": 20,
15
- "name": "SafeSendLib"
16
- }]
17
- },
18
- "runtime_bytecode": {
19
- "bytecode": "0x6080604052600436106100615763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100705780632e1a7d4d146100a8578063c577ff8b146100c0578063d0679d34146100e6575b34801561006d57600080fd5b50005b34801561007c57600080fd5b50610094600160a060020a036004351660243561010a565b604080519115158252519081900360200190f35b3480156100b457600080fd5b50610094600435610147565b3480156100cc57600080fd5b506100e4600435600160a060020a0360243516610233565b005b3480156100f257600080fd5b50610094600160a060020a0360043516602435610326565b60008054600160a060020a0316331461012257600080fd5b50600160a060020a038216600090815260016020819052604090912082905592915050565b3360009081526001602090815260408083205481517fa293d1e800000000000000000000000000000000000000000000000000000000815260048101919091526024810185905290517300000000000000000000000000000000000000009263a293d1e89260448082019391829003018186803b1580156101c757600080fd5b505af41580156101db573d6000803e3d6000fd5b505050506040513d60208110156101f157600080fd5b505133600081815260016020526040808220939093559151909184156108fc02918591818181858888f19350505050151561022b57600080fd5b506001919050565b336000908152600160209081526040918290205482517fa293d1e800000000000000000000000000000000000000000000000000000000815260048101919091526024810185905291517300000000000000000000000000000000000000009263a293d1e8926044808301939192829003018186803b1580156102b557600080fd5b505af41580156102c9573d6000803e3d6000fd5b505050506040513d60208110156102df57600080fd5b505133600090815260016020526040808220929092559051600160a060020a0383169184156108fc02918591818181858888f19350505050151561032257600080fd5b5050565b60008054600160a060020a0316331461033e57600080fd5b604051600160a060020a0384169083156108fc029084906000818181858888f19796505050505050505600a165627a7a72305820127a404b857b83aa26a51d55d8283bff1dfb5c18217a999c5fbd2862d240fb760029",
20
- "link_references": [{
21
- "offsets": [402, 639],
22
- "length": 20,
23
- "name": "SafeSendLib"
24
- }]
25
- },
26
- "abi": [
27
- {
28
- "constant": false,
29
- "inputs": [
30
- {"name": "recipient", "type": "address"},
31
- {"name": "value", "type": "uint256"}
32
- ],
33
- "name": "approve",
34
- "outputs": [
35
- {"name": "", "type": "bool"}
36
- ],
37
- "payable": false,
38
- "stateMutability": "nonpayable",
39
- "type": "function"
40
- },
41
- {
42
- "constant": false,
43
- "inputs": [
44
- {"name": "value", "type": "uint256"}
45
- ],
46
- "name": "withdraw",
47
- "outputs": [
48
- {"name": "", "type": "bool"}
49
- ],
50
- "payable": false,
51
- "stateMutability": "nonpayable",
52
- "type": "function"
53
- },
54
- {
55
- "constant": false,
56
- "inputs": [
57
- {"name": "value", "type": "uint256"},
58
- {"name": "to", "type": "address"}
59
- ],
60
- "name": "approvedSend",
61
- "outputs": [],
62
- "payable": false,
63
- "stateMutability": "nonpayable",
64
- "type": "function"
65
- },
66
- {
67
- "constant": false,
68
- "inputs": [
69
- {"name": "recipient", "type": "address"},
70
- {"name": "value", "type": "uint256"}
71
- ],
72
- "name": "send",
73
- "outputs": [
74
- {"name": "","type": "bool"}
75
- ],
76
- "payable": false,
77
- "stateMutability": "nonpayable",
78
- "type": "function"
79
- },
80
- {
81
- "payable": false,
82
- "stateMutability": "nonpayable",
83
- "type": "fallback"
84
- }
85
- ],
86
- "compiler": {
87
- "name": "solc",
88
- "version": "0.4.24+commit.e67f0147.Emscripten.clang",
89
- "settings": {
90
- "optimize": true
91
- }
92
- },
93
- "natspec": {
94
- "author": "Piper Merriam <pipermerriam@gmail.com>",
95
- "methods": {
96
- "approve(address,uint256)": {
97
- "details": "Sets recipient to be approved to withdraw the specified amount",
98
- "notice": "This will set the recipient to be approved to withdraw the specified amount."
99
- },
100
- "send(address,uint256)": {
101
- "details": "Sends the recipient the specified amount",
102
- "notice": "This will send the reciepient the specified amount."
103
- },
104
- "approvedSend(uint256,address)" : {
105
- "details" : "Sends funds that have been approved to the specified address",
106
- "notice" : "This will send the reciepient the specified amount."
107
- },
108
- "withdraw(uint256)": {
109
- "details": "Lets caller withdraw up to their approved amount",
110
- "notice": "This will withdraw provided value, deducting it from your total allowance."
111
- }
112
- },
113
- "title" : "Wallet contract with simple send and approval spending functionality"
114
- }
115
- }
116
- },
117
- "deployments": {
118
- "blockchain://41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d/block/32a617527c183587710e28a6b66eb709a34e3cbc5ae5e3f1ed564ba1b46ab00c": {
119
- "Wallet": {
120
- "contract_type": "WalletWithSend",
121
- "address": "0xae97b967ae51e50f80aaed254b3190dd2d8520ca",
122
- "transaction": "0xb44bb94b553c8c63c6a2f0b3b5bea92c69621e65af56069254b36f6b5272e7d0",
123
- "block": "0xb44bb94b553c8c63c6a2f0b3b5bea92c69621e65af56069254b36f6b5272e7d0",
124
- "runtime_bytecode": {
125
- "link_dependencies": [
126
- {"offsets": [402, 639], "type": "reference", "value": "wallet:safe-math-lib:SafeMathLib"}
127
- ]
128
- }
129
- }
130
- }
131
- },
132
- "build_dependencies": {
133
- "wallet": "ipfs://QmPZ98R6wnyhiHAfE3D9eGnZDvUCBnhi2Vp5Wkdtax6cSn"
134
- }
135
- }
@@ -1 +0,0 @@
1
- {"build_dependencies":{"wallet":"ipfs://QmPZ98R6wnyhiHAfE3D9eGnZDvUCBnhi2Vp5Wkdtax6cSn"},"contract_types":{"WalletWithSend":{"abi":[{"constant":false,"inputs":[{"name":"recipient","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"value","type":"uint256"}],"name":"withdraw","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"value","type":"uint256"},{"name":"to","type":"address"}],"name":"approvedSend","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"recipient","type":"address"},{"name":"value","type":"uint256"}],"name":"send","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"payable":false,"stateMutability":"nonpayable","type":"fallback"}],"compiler":{"name":"solc","settings":{"optimize":true},"version":"0.4.24+commit.e67f0147.Emscripten.clang"},"deployment_bytecode":{"bytecode":"0x608060405260008054600160a060020a03191633179055610395806100256000396000f3006080604052600436106100615763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100705780632e1a7d4d146100a8578063c577ff8b146100c0578063d0679d34146100e6575b34801561006d57600080fd5b50005b34801561007c57600080fd5b50610094600160a060020a036004351660243561010a565b604080519115158252519081900360200190f35b3480156100b457600080fd5b50610094600435610147565b3480156100cc57600080fd5b506100e4600435600160a060020a0360243516610233565b005b3480156100f257600080fd5b50610094600160a060020a0360043516602435610326565b60008054600160a060020a0316331461012257600080fd5b50600160a060020a038216600090815260016020819052604090912082905592915050565b3360009081526001602090815260408083205481517fa293d1e800000000000000000000000000000000000000000000000000000000815260048101919091526024810185905290517300000000000000000000000000000000000000009263a293d1e89260448082019391829003018186803b1580156101c757600080fd5b505af41580156101db573d6000803e3d6000fd5b505050506040513d60208110156101f157600080fd5b505133600081815260016020526040808220939093559151909184156108fc02918591818181858888f19350505050151561022b57600080fd5b506001919050565b336000908152600160209081526040918290205482517fa293d1e800000000000000000000000000000000000000000000000000000000815260048101919091526024810185905291517300000000000000000000000000000000000000009263a293d1e8926044808301939192829003018186803b1580156102b557600080fd5b505af41580156102c9573d6000803e3d6000fd5b505050506040513d60208110156102df57600080fd5b505133600090815260016020526040808220929092559051600160a060020a0383169184156108fc02918591818181858888f19350505050151561032257600080fd5b5050565b60008054600160a060020a0316331461033e57600080fd5b604051600160a060020a0384169083156108fc029084906000818181858888f19796505050505050505600a165627a7a72305820127a404b857b83aa26a51d55d8283bff1dfb5c18217a999c5fbd2862d240fb760029","link_references":[{"length":20,"name":"SafeSendLib","offsets":[439,676]}]},"natspec":{"author":"Piper Merriam <pipermerriam@gmail.com>","methods":{"approve(address,uint256)":{"details":"Sets recipient to be approved to withdraw the specified amount","notice":"This will set the recipient to be approved to withdraw the specified amount."},"approvedSend(uint256,address)":{"details":"Sends funds that have been approved to the specified address","notice":"This will send the reciepient the specified amount."},"send(address,uint256)":{"details":"Sends the recipient the specified amount","notice":"This will send the reciepient the specified amount."},"withdraw(uint256)":{"details":"Lets caller withdraw up to their approved amount","notice":"This will withdraw provided value, deducting it from your total allowance."}},"title":"Wallet contract with simple send and approval spending functionality"},"runtime_bytecode":{"bytecode":"0x6080604052600436106100615763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100705780632e1a7d4d146100a8578063c577ff8b146100c0578063d0679d34146100e6575b34801561006d57600080fd5b50005b34801561007c57600080fd5b50610094600160a060020a036004351660243561010a565b604080519115158252519081900360200190f35b3480156100b457600080fd5b50610094600435610147565b3480156100cc57600080fd5b506100e4600435600160a060020a0360243516610233565b005b3480156100f257600080fd5b50610094600160a060020a0360043516602435610326565b60008054600160a060020a0316331461012257600080fd5b50600160a060020a038216600090815260016020819052604090912082905592915050565b3360009081526001602090815260408083205481517fa293d1e800000000000000000000000000000000000000000000000000000000815260048101919091526024810185905290517300000000000000000000000000000000000000009263a293d1e89260448082019391829003018186803b1580156101c757600080fd5b505af41580156101db573d6000803e3d6000fd5b505050506040513d60208110156101f157600080fd5b505133600081815260016020526040808220939093559151909184156108fc02918591818181858888f19350505050151561022b57600080fd5b506001919050565b336000908152600160209081526040918290205482517fa293d1e800000000000000000000000000000000000000000000000000000000815260048101919091526024810185905291517300000000000000000000000000000000000000009263a293d1e8926044808301939192829003018186803b1580156102b557600080fd5b505af41580156102c9573d6000803e3d6000fd5b505050506040513d60208110156102df57600080fd5b505133600090815260016020526040808220929092559051600160a060020a0383169184156108fc02918591818181858888f19350505050151561032257600080fd5b5050565b60008054600160a060020a0316331461033e57600080fd5b604051600160a060020a0384169083156108fc029084906000818181858888f19796505050505050505600a165627a7a72305820127a404b857b83aa26a51d55d8283bff1dfb5c18217a999c5fbd2862d240fb760029","link_references":[{"length":20,"name":"SafeSendLib","offsets":[402,639]}]}}},"deployments":{"blockchain://41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d/block/32a617527c183587710e28a6b66eb709a34e3cbc5ae5e3f1ed564ba1b46ab00c":{"Wallet":{"address":"0xae97b967ae51e50f80aaed254b3190dd2d8520ca","block":"0xb44bb94b553c8c63c6a2f0b3b5bea92c69621e65af56069254b36f6b5272e7d0","contract_type":"WalletWithSend","runtime_bytecode":{"link_dependencies":[{"offsets":[402,639],"type":"reference","value":"wallet:safe-math-lib:SafeMathLib"}]},"transaction":"0xb44bb94b553c8c63c6a2f0b3b5bea92c69621e65af56069254b36f6b5272e7d0"}}},"manifest_version":"2","package_name":"wallet-with-send","sources":{"./contracts/WalletWithSend.sol":"ipfs://QmRvVRn6USxJu1H4L51KyzxbQFVmCFqdzB4RAG9VeJ2s4W"},"version":"1.0.0"}
@@ -1,18 +0,0 @@
1
- // SPDX-License-Identifier: MIT
2
- pragma solidity ^0.6.8;
3
-
4
-
5
- import {Wallet} from "./wallet/contracts/Wallet.sol";
6
-
7
-
8
- /// @title Wallet contract with simple send and approval spending functionality
9
- /// @author Piper Merriam <pipermerriam@gmail.com>
10
- contract WalletWithSend is Wallet {
11
- /// @dev Sends funds that have been approved to the specified address
12
- /// @notice This will send the reciepient the specified amount.
13
- function approvedSend(uint value, address payable to) public {
14
- allowances[msg.sender] = allowances[msg.sender].safeSub(value);
15
- if (!to.send(value))
16
- revert();
17
- }
18
- }