web3 7.0.0b1__py3-none-any.whl → 7.7.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ens/__init__.py +13 -2
- ens/_normalization.py +4 -4
- ens/async_ens.py +31 -21
- ens/base_ens.py +3 -1
- ens/contract_data.py +2 -2
- ens/ens.py +14 -11
- ens/exceptions.py +16 -29
- ens/specs/nf.json +1 -1
- ens/specs/normalization_spec.json +1 -1
- ens/utils.py +33 -41
- web3/__init__.py +23 -12
- web3/_utils/abi.py +162 -274
- web3/_utils/async_transactions.py +34 -20
- web3/_utils/batching.py +217 -0
- web3/_utils/blocks.py +6 -2
- web3/_utils/caching/__init__.py +12 -0
- web3/_utils/caching/caching_utils.py +433 -0
- web3/_utils/caching/request_caching_validation.py +287 -0
- web3/_utils/compat/__init__.py +2 -3
- web3/_utils/contract_sources/compile_contracts.py +1 -1
- web3/_utils/contract_sources/contract_data/ambiguous_function_contract.py +42 -0
- web3/_utils/contract_sources/contract_data/arrays_contract.py +3 -3
- web3/_utils/contract_sources/contract_data/bytes_contracts.py +5 -5
- web3/_utils/contract_sources/contract_data/constructor_contracts.py +7 -7
- web3/_utils/contract_sources/contract_data/contract_caller_tester.py +3 -3
- web3/_utils/contract_sources/contract_data/emitter_contract.py +3 -3
- web3/_utils/contract_sources/contract_data/event_contracts.py +50 -5
- web3/_utils/contract_sources/contract_data/extended_resolver.py +3 -3
- web3/_utils/contract_sources/contract_data/fallback_function_contract.py +3 -3
- web3/_utils/contract_sources/contract_data/function_name_tester_contract.py +3 -3
- web3/_utils/contract_sources/contract_data/math_contract.py +3 -3
- web3/_utils/contract_sources/contract_data/offchain_lookup.py +3 -3
- web3/_utils/contract_sources/contract_data/offchain_resolver.py +3 -3
- web3/_utils/contract_sources/contract_data/panic_errors_contract.py +3 -3
- web3/_utils/contract_sources/contract_data/payable_tester.py +3 -3
- web3/_utils/contract_sources/contract_data/receive_function_contracts.py +5 -5
- web3/_utils/contract_sources/contract_data/reflector_contracts.py +3 -3
- web3/_utils/contract_sources/contract_data/revert_contract.py +3 -3
- web3/_utils/contract_sources/contract_data/simple_resolver.py +3 -3
- web3/_utils/contract_sources/contract_data/storage_contract.py +3 -3
- web3/_utils/contract_sources/contract_data/string_contract.py +3 -3
- web3/_utils/contract_sources/contract_data/tuple_contracts.py +5 -5
- web3/_utils/contracts.py +172 -220
- web3/_utils/datatypes.py +5 -1
- web3/_utils/decorators.py +6 -1
- web3/_utils/empty.py +1 -1
- web3/_utils/encoding.py +16 -12
- web3/_utils/error_formatters_utils.py +5 -3
- web3/_utils/events.py +78 -72
- web3/_utils/fee_utils.py +1 -3
- web3/_utils/filters.py +24 -22
- web3/_utils/formatters.py +2 -2
- web3/_utils/http.py +8 -2
- web3/_utils/http_session_manager.py +314 -0
- web3/_utils/math.py +14 -15
- web3/_utils/method_formatters.py +161 -34
- web3/_utils/module.py +2 -1
- web3/_utils/module_testing/__init__.py +3 -2
- web3/_utils/module_testing/eth_module.py +736 -583
- web3/_utils/module_testing/go_ethereum_debug_module.py +128 -0
- web3/_utils/module_testing/module_testing_utils.py +81 -24
- web3/_utils/module_testing/persistent_connection_provider.py +702 -220
- web3/_utils/module_testing/utils.py +114 -33
- web3/_utils/module_testing/web3_module.py +438 -17
- web3/_utils/normalizers.py +13 -11
- web3/_utils/rpc_abi.py +10 -22
- web3/_utils/threads.py +8 -7
- web3/_utils/transactions.py +32 -25
- web3/_utils/type_conversion.py +5 -1
- web3/_utils/validation.py +20 -17
- web3/beacon/__init__.py +5 -0
- web3/beacon/api_endpoints.py +3 -0
- web3/beacon/async_beacon.py +29 -6
- web3/beacon/beacon.py +24 -6
- web3/contract/__init__.py +7 -0
- web3/contract/async_contract.py +285 -82
- web3/contract/base_contract.py +556 -258
- web3/contract/contract.py +295 -84
- web3/contract/utils.py +251 -55
- web3/datastructures.py +56 -41
- web3/eth/__init__.py +7 -0
- web3/eth/async_eth.py +89 -69
- web3/eth/base_eth.py +7 -3
- web3/eth/eth.py +43 -66
- web3/exceptions.py +158 -83
- web3/gas_strategies/time_based.py +8 -6
- web3/geth.py +53 -184
- web3/main.py +77 -43
- web3/manager.py +368 -101
- web3/method.py +43 -15
- web3/middleware/__init__.py +26 -8
- web3/middleware/attrdict.py +12 -22
- web3/middleware/base.py +55 -2
- web3/middleware/filter.py +45 -23
- web3/middleware/formatting.py +6 -3
- web3/middleware/names.py +4 -1
- web3/middleware/signing.py +15 -6
- web3/middleware/stalecheck.py +2 -1
- web3/module.py +62 -26
- web3/providers/__init__.py +21 -0
- web3/providers/async_base.py +93 -38
- web3/providers/base.py +85 -40
- web3/providers/eth_tester/__init__.py +5 -0
- web3/providers/eth_tester/defaults.py +2 -55
- web3/providers/eth_tester/main.py +57 -35
- web3/providers/eth_tester/middleware.py +16 -17
- web3/providers/ipc.py +42 -18
- web3/providers/legacy_websocket.py +27 -2
- web3/providers/persistent/__init__.py +7 -0
- web3/providers/persistent/async_ipc.py +61 -121
- web3/providers/persistent/persistent.py +324 -17
- web3/providers/persistent/persistent_connection.py +54 -5
- web3/providers/persistent/request_processor.py +136 -56
- web3/providers/persistent/subscription_container.py +56 -0
- web3/providers/persistent/subscription_manager.py +233 -0
- web3/providers/persistent/websocket.py +29 -92
- web3/providers/rpc/__init__.py +5 -0
- web3/providers/rpc/async_rpc.py +73 -18
- web3/providers/rpc/rpc.py +73 -30
- web3/providers/rpc/utils.py +1 -13
- web3/scripts/install_pre_releases.py +33 -0
- web3/scripts/parse_pygeth_version.py +16 -0
- web3/testing.py +4 -4
- web3/tracing.py +9 -5
- web3/types.py +141 -74
- web3/utils/__init__.py +64 -5
- web3/utils/abi.py +790 -10
- web3/utils/address.py +8 -0
- web3/utils/async_exception_handling.py +20 -11
- web3/utils/caching.py +34 -4
- web3/utils/exception_handling.py +9 -12
- web3/utils/subscriptions.py +285 -0
- {web3-7.0.0b1.dist-info → web3-7.7.0.dist-info}/LICENSE +1 -1
- web3-7.7.0.dist-info/METADATA +130 -0
- web3-7.7.0.dist-info/RECORD +171 -0
- {web3-7.0.0b1.dist-info → web3-7.7.0.dist-info}/WHEEL +1 -1
- {web3-7.0.0b1.dist-info → web3-7.7.0.dist-info}/top_level.txt +0 -1
- ethpm/__init__.py +0 -20
- ethpm/_utils/__init__.py +0 -0
- ethpm/_utils/backend.py +0 -93
- ethpm/_utils/cache.py +0 -44
- ethpm/_utils/chains.py +0 -119
- ethpm/_utils/contract.py +0 -35
- ethpm/_utils/deployments.py +0 -145
- ethpm/_utils/ipfs.py +0 -116
- ethpm/_utils/protobuf/__init__.py +0 -0
- ethpm/_utils/protobuf/ipfs_file_pb2.py +0 -33
- ethpm/_utils/registry.py +0 -29
- ethpm/assets/__init__.py +0 -0
- ethpm/assets/ens/v3.json +0 -1
- ethpm/assets/escrow/with_bytecode_v3.json +0 -1
- ethpm/assets/ipfs_file.proto +0 -32
- ethpm/assets/owned/output_v3.json +0 -1
- ethpm/assets/owned/with_contract_type_v3.json +0 -1
- ethpm/assets/registry/contracts/Authority.sol +0 -156
- ethpm/assets/registry/contracts/IndexedOrderedSetLib.sol +0 -106
- ethpm/assets/registry/contracts/PackageDB.sol +0 -225
- ethpm/assets/registry/contracts/PackageRegistry.sol +0 -361
- ethpm/assets/registry/contracts/PackageRegistryInterface.sol +0 -97
- ethpm/assets/registry/contracts/ReleaseDB.sol +0 -309
- ethpm/assets/registry/contracts/ReleaseValidator.sol +0 -152
- ethpm/assets/registry/solc_input.json +0 -1
- ethpm/assets/registry/solc_output.json +0 -1
- ethpm/assets/registry/v3.json +0 -1
- ethpm/assets/safe-math-lib/v3-strict-no-deployments.json +0 -1
- ethpm/assets/simple-registry/contracts/Ownable.sol +0 -63
- ethpm/assets/simple-registry/contracts/PackageRegistry.sol +0 -373
- ethpm/assets/simple-registry/contracts/PackageRegistryInterface.sol +0 -96
- ethpm/assets/simple-registry/solc_input.json +0 -33
- ethpm/assets/simple-registry/solc_output.json +0 -1
- ethpm/assets/simple-registry/v3.json +0 -1
- ethpm/assets/standard-token/output_v3.json +0 -1
- ethpm/assets/standard-token/with_bytecode_v3.json +0 -1
- ethpm/assets/vyper_registry/0.1.0.json +0 -1
- ethpm/assets/vyper_registry/registry.vy +0 -216
- ethpm/assets/vyper_registry/registry_with_delete.vy +0 -244
- ethpm/backends/__init__.py +0 -0
- ethpm/backends/base.py +0 -43
- ethpm/backends/http.py +0 -108
- ethpm/backends/ipfs.py +0 -219
- ethpm/backends/registry.py +0 -154
- ethpm/constants.py +0 -17
- ethpm/contract.py +0 -187
- ethpm/dependencies.py +0 -58
- ethpm/deployments.py +0 -80
- ethpm/ethpm-spec/examples/escrow/1.0.0-pretty.json +0 -146
- ethpm/ethpm-spec/examples/escrow/1.0.0.json +0 -1
- ethpm/ethpm-spec/examples/escrow/contracts/Escrow.sol +0 -32
- ethpm/ethpm-spec/examples/escrow/contracts/SafeSendLib.sol +0 -20
- ethpm/ethpm-spec/examples/escrow/v3-pretty.json +0 -171
- ethpm/ethpm-spec/examples/escrow/v3.json +0 -1
- ethpm/ethpm-spec/examples/owned/1.0.0-pretty.json +0 -21
- ethpm/ethpm-spec/examples/owned/1.0.0.json +0 -1
- ethpm/ethpm-spec/examples/owned/contracts/Owned.sol +0 -12
- ethpm/ethpm-spec/examples/owned/v3-pretty.json +0 -27
- ethpm/ethpm-spec/examples/owned/v3.json +0 -1
- ethpm/ethpm-spec/examples/piper-coin/1.0.0-pretty.json +0 -31
- ethpm/ethpm-spec/examples/piper-coin/1.0.0.json +0 -1
- ethpm/ethpm-spec/examples/piper-coin/v3-pretty.json +0 -21
- ethpm/ethpm-spec/examples/piper-coin/v3.json +0 -1
- ethpm/ethpm-spec/examples/safe-math-lib/1.0.0-pretty.json +0 -85
- ethpm/ethpm-spec/examples/safe-math-lib/1.0.0.json +0 -1
- ethpm/ethpm-spec/examples/safe-math-lib/contracts/SafeMathLib.sol +0 -24
- ethpm/ethpm-spec/examples/safe-math-lib/v3-pretty.json +0 -117
- ethpm/ethpm-spec/examples/safe-math-lib/v3.json +0 -1
- ethpm/ethpm-spec/examples/standard-token/1.0.0-pretty.json +0 -55
- ethpm/ethpm-spec/examples/standard-token/1.0.0.json +0 -1
- ethpm/ethpm-spec/examples/standard-token/contracts/AbstractToken.sol +0 -20
- ethpm/ethpm-spec/examples/standard-token/contracts/StandardToken.sol +0 -84
- ethpm/ethpm-spec/examples/standard-token/v3-pretty.json +0 -460
- ethpm/ethpm-spec/examples/standard-token/v3.json +0 -1
- ethpm/ethpm-spec/examples/transferable/1.0.0-pretty.json +0 -21
- ethpm/ethpm-spec/examples/transferable/1.0.0.json +0 -1
- ethpm/ethpm-spec/examples/transferable/contracts/Transferable.sol +0 -14
- ethpm/ethpm-spec/examples/transferable/v3-pretty.json +0 -27
- ethpm/ethpm-spec/examples/transferable/v3.json +0 -1
- ethpm/ethpm-spec/examples/wallet/1.0.0-pretty.json +0 -120
- ethpm/ethpm-spec/examples/wallet/1.0.0.json +0 -1
- ethpm/ethpm-spec/examples/wallet/contracts/Wallet.sol +0 -41
- ethpm/ethpm-spec/examples/wallet/v3-pretty.json +0 -181
- ethpm/ethpm-spec/examples/wallet/v3.json +0 -1
- ethpm/ethpm-spec/examples/wallet-with-send/1.0.0-pretty.json +0 -135
- ethpm/ethpm-spec/examples/wallet-with-send/1.0.0.json +0 -1
- ethpm/ethpm-spec/examples/wallet-with-send/contracts/WalletWithSend.sol +0 -18
- ethpm/ethpm-spec/examples/wallet-with-send/v3-pretty.json +0 -207
- ethpm/ethpm-spec/examples/wallet-with-send/v3.json +0 -1
- ethpm/ethpm-spec/spec/package.spec.json +0 -379
- ethpm/ethpm-spec/spec/v3.spec.json +0 -483
- ethpm/exceptions.py +0 -68
- ethpm/package.py +0 -438
- ethpm/tools/__init__.py +0 -4
- ethpm/tools/builder.py +0 -930
- ethpm/tools/checker.py +0 -312
- ethpm/tools/get_manifest.py +0 -19
- ethpm/uri.py +0 -141
- ethpm/validation/__init__.py +0 -0
- ethpm/validation/manifest.py +0 -146
- ethpm/validation/misc.py +0 -39
- ethpm/validation/package.py +0 -80
- ethpm/validation/uri.py +0 -163
- web3/_utils/caching.py +0 -155
- web3/_utils/contract_sources/contract_data/address_reflector.py +0 -29
- web3/_utils/module_testing/go_ethereum_personal_module.py +0 -300
- web3/_utils/request.py +0 -265
- web3/pm.py +0 -602
- web3/tools/__init__.py +0 -4
- web3/tools/benchmark/__init__.py +0 -0
- web3/tools/benchmark/main.py +0 -185
- web3/tools/benchmark/node.py +0 -126
- web3/tools/benchmark/reporting.py +0 -39
- web3/tools/benchmark/utils.py +0 -69
- web3/tools/pytest_ethereum/__init__.py +0 -0
- web3/tools/pytest_ethereum/_utils.py +0 -145
- web3/tools/pytest_ethereum/deployer.py +0 -48
- web3/tools/pytest_ethereum/exceptions.py +0 -22
- web3/tools/pytest_ethereum/linker.py +0 -128
- web3/tools/pytest_ethereum/plugins.py +0 -33
- web3-7.0.0b1.dist-info/METADATA +0 -114
- web3-7.0.0b1.dist-info/RECORD +0 -280
- web3-7.0.0b1.dist-info/entry_points.txt +0 -2
- /web3/_utils/{function_identifiers.py → abi_element_identifiers.py} +0 -0
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"manifest": "ethpm/3",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"name": "piper-coin",
|
|
5
|
-
"deployments": {
|
|
6
|
-
"blockchain://41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d/block/8edfc8c04a400d0269bb4f89b6620c28321bf3ef205452cc0a3dd9a3d4d90640": {
|
|
7
|
-
"PiperCoin": {
|
|
8
|
-
"contractType": "standard-token:StandardToken",
|
|
9
|
-
"address": "0x77C7C1e9F6cC426179F9bb95f3f9F6d8D37315a5",
|
|
10
|
-
"transaction": "0x76221eca6879628d1d4549f44b6fc0aa923743ce4f0ddcc7721dbf9151e554d7",
|
|
11
|
-
"block": "0x8a78fa5f540ad205c2259dbf134c09a18e83fb50721b1c6a74be6421663c239e",
|
|
12
|
-
"runtimeBytecode": {
|
|
13
|
-
"bytecode": "0x608060405234801561001057600080fd5b50600436106100625760003560e01c8063095ea7b31461006757806318160ddd146100cd57806323b872dd146100eb57806370a0823114610171578063a9059cbb146101c9578063dd62ed3e1461022f575b600080fd5b6100b36004803603604081101561007d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506102a7565b604051808215151515815260200191505060405180910390f35b6100d5610399565b6040518082815260200191505060405180910390f35b6101576004803603606081101561010157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061039f565b604051808215151515815260200191505060405180910390f35b6101b36004803603602081101561018757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610618565b6040518082815260200191505060405180910390f35b610215600480360360408110156101df57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610660565b604051808215151515815260200191505060405180910390f35b6102916004803603604081101561024557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107c6565b6040518082815260200191505060405180910390f35b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60025481565b6000816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015801561046b575081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b80156104775750600082115b1561060c57816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050610611565b600090505b9392505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156106b05750600082115b156107bb57816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190506107c0565b600090505b92915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490509291505056fea26469706673582212205b1030a46711be4af481d287498c2f627fc76b95f9dac96fd56a41db27633a3d64736f6c634300060a0033"
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"buildDependencies": {
|
|
19
|
-
"standard-token": "ipfs://QmQNffBrmbB3TuBCtYfYsJWJVLssatWXa3H6CkGeyNUySA"
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"buildDependencies":{"standard-token":"ipfs://QmQNffBrmbB3TuBCtYfYsJWJVLssatWXa3H6CkGeyNUySA"},"deployments":{"blockchain://41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d/block/8edfc8c04a400d0269bb4f89b6620c28321bf3ef205452cc0a3dd9a3d4d90640":{"PiperCoin":{"address":"0x77C7C1e9F6cC426179F9bb95f3f9F6d8D37315a5","block":"0x8a78fa5f540ad205c2259dbf134c09a18e83fb50721b1c6a74be6421663c239e","contractType":"standard-token:StandardToken","runtimeBytecode":{"bytecode":"0x608060405234801561001057600080fd5b50600436106100625760003560e01c8063095ea7b31461006757806318160ddd146100cd57806323b872dd146100eb57806370a0823114610171578063a9059cbb146101c9578063dd62ed3e1461022f575b600080fd5b6100b36004803603604081101561007d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506102a7565b604051808215151515815260200191505060405180910390f35b6100d5610399565b6040518082815260200191505060405180910390f35b6101576004803603606081101561010157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061039f565b604051808215151515815260200191505060405180910390f35b6101b36004803603602081101561018757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610618565b6040518082815260200191505060405180910390f35b610215600480360360408110156101df57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610660565b604051808215151515815260200191505060405180910390f35b6102916004803603604081101561024557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107c6565b6040518082815260200191505060405180910390f35b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60025481565b6000816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015801561046b575081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b80156104775750600082115b1561060c57816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050610611565b600090505b9392505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156106b05750600082115b156107bb57816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190506107c0565b600090505b92915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490509291505056fea26469706673582212205b1030a46711be4af481d287498c2f627fc76b95f9dac96fd56a41db27633a3d64736f6c634300060a0033"},"transaction":"0x76221eca6879628d1d4549f44b6fc0aa923743ce4f0ddcc7721dbf9151e554d7"}}},"manifest":"ethpm/3","name":"piper-coin","version":"1.0.0"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"manifest_version": "2",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"package_name": "safe-math-lib",
|
|
5
|
-
"sources": {
|
|
6
|
-
"./contracts/SafeMathLib.sol": "ipfs://QmNQeuwMDGJ7UiLaRjwzAoekcaKLp9TjiqeFdovj3syN1n"
|
|
7
|
-
},
|
|
8
|
-
"contract_types": {
|
|
9
|
-
"SafeMathLib": {
|
|
10
|
-
"deployment_bytecode": {
|
|
11
|
-
"bytecode": "0x610145610030600b82828239805160001a6073146000811461002057610022565bfe5b5030600052607381538281f3007300000000000000000000000000000000000000003014608060405260043610610063576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a293d1e814610068578063e6cb9013146100a6575b600080fd5b61009060048036038101908080359060200190929190803590602001909291905050506100e4565b6040518082815260200191505060405180910390f35b6100ce60048036038101908080359060200190929190803590602001909291905050506100fd565b6040518082815260200191505060405180910390f35b60008282111515156100f257fe5b818303905092915050565b6000818301905082811015151561011057fe5b809050929150505600a165627a7a72305820ac19b530c9fab4716b26d7706467f9a30d5542de1ac898dc56c67ff65ebe9bd50029"
|
|
12
|
-
},
|
|
13
|
-
"runtime_bytecode": {
|
|
14
|
-
"bytecode": "0x73a66a05d6ab5c1c955f4d2c3fcc166ae6300b452b3014608060405260043610610063576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a293d1e814610068578063e6cb9013146100a6575b600080fd5b61009060048036038101908080359060200190929190803590602001909291905050506100e4565b6040518082815260200191505060405180910390f35b6100ce60048036038101908080359060200190929190803590602001909291905050506100fd565b6040518082815260200191505060405180910390f35b60008282111515156100f257fe5b818303905092915050565b6000818301905082811015151561011057fe5b809050929150505600a165627a7a72305820ac19b530c9fab4716b26d7706467f9a30d5542de1ac898dc56c67ff65ebe9bd50029"
|
|
15
|
-
},
|
|
16
|
-
"abi": [
|
|
17
|
-
{
|
|
18
|
-
"constant": true,
|
|
19
|
-
"inputs": [
|
|
20
|
-
{"name": "a","type": "uint256"},
|
|
21
|
-
{"name": "b","type": "uint256"}
|
|
22
|
-
],
|
|
23
|
-
"name": "safeSub",
|
|
24
|
-
"outputs": [
|
|
25
|
-
{"name": "","type": "uint256"}
|
|
26
|
-
],
|
|
27
|
-
"payable": false,
|
|
28
|
-
"stateMutability": "pure",
|
|
29
|
-
"type": "function"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"constant": true,
|
|
33
|
-
"inputs": [
|
|
34
|
-
{"name": "a","type": "uint256"},
|
|
35
|
-
{"name": "b","type": "uint256"}
|
|
36
|
-
],
|
|
37
|
-
"name": "safeAdd",
|
|
38
|
-
"outputs": [
|
|
39
|
-
{"name": "c","type": "uint256"}
|
|
40
|
-
],
|
|
41
|
-
"payable": false,
|
|
42
|
-
"stateMutability": "pure",
|
|
43
|
-
"type": "function"
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
"compiler": {
|
|
47
|
-
"name": "solc",
|
|
48
|
-
"version": "0.4.24+commit.e67f0147.Emscripten.clang",
|
|
49
|
-
"settings": {
|
|
50
|
-
"optimize": false
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"natspec": {
|
|
54
|
-
"author": "Piper Merriam <pipermerriam@gmail.com>",
|
|
55
|
-
"methods": {
|
|
56
|
-
"safeAdd(uint256,uint256)": {
|
|
57
|
-
"details": "Adds a and b, throwing an error if the operation would cause an overflow.",
|
|
58
|
-
"params": {
|
|
59
|
-
"a": "The first number to add",
|
|
60
|
-
"b": "The second number to add"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"safeSub(uint256,uint256)": {
|
|
64
|
-
"details": "Subtracts b from a, throwing an error if the operation would cause an underflow.",
|
|
65
|
-
"params": {
|
|
66
|
-
"a": "The number to be subtracted from",
|
|
67
|
-
"b": "The amount that should be subtracted"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
"title": "Safe Math Library"
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
"deployments": {
|
|
76
|
-
"blockchain://41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d/block/cf1fe2fc56f116e30ee6f6de77c1bfe9304231414fa8c7e0c98075e93f618368": {
|
|
77
|
-
"SafeMathLib": {
|
|
78
|
-
"contract_type": "SafeMathLib",
|
|
79
|
-
"address": "0xa66A05D6AB5c1c955F4D2c3FCC166AE6300b452B",
|
|
80
|
-
"transaction": "0x7ee011d3e2e5aef3be0ab5853666aa8e0427bcb19b3da6411c90768090bc5517",
|
|
81
|
-
"block": "0xe11241bf8d2862026db775ee3e9c85cc2ae99ea8938b795d77d9f2f277271b2a"
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"contract_types":{"SafeMathLib":{"abi":[{"constant":true,"inputs":[{"name":"a","type":"uint256"},{"name":"b","type":"uint256"}],"name":"safeSub","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"a","type":"uint256"},{"name":"b","type":"uint256"}],"name":"safeAdd","outputs":[{"name":"c","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"}],"compiler":{"name":"solc","settings":{"optimize":false},"version":"0.4.24+commit.e67f0147.Emscripten.clang"},"deployment_bytecode":{"bytecode":"0x610145610030600b82828239805160001a6073146000811461002057610022565bfe5b5030600052607381538281f3007300000000000000000000000000000000000000003014608060405260043610610063576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a293d1e814610068578063e6cb9013146100a6575b600080fd5b61009060048036038101908080359060200190929190803590602001909291905050506100e4565b6040518082815260200191505060405180910390f35b6100ce60048036038101908080359060200190929190803590602001909291905050506100fd565b6040518082815260200191505060405180910390f35b60008282111515156100f257fe5b818303905092915050565b6000818301905082811015151561011057fe5b809050929150505600a165627a7a72305820ac19b530c9fab4716b26d7706467f9a30d5542de1ac898dc56c67ff65ebe9bd50029"},"natspec":{"author":"Piper Merriam <pipermerriam@gmail.com>","methods":{"safeAdd(uint256,uint256)":{"details":"Adds a and b, throwing an error if the operation would cause an overflow.","params":{"a":"The first number to add","b":"The second number to add"}},"safeSub(uint256,uint256)":{"details":"Subtracts b from a, throwing an error if the operation would cause an underflow.","params":{"a":"The number to be subtracted from","b":"The amount that should be subtracted"}}},"title":"Safe Math Library"},"runtime_bytecode":{"bytecode":"0x73a66a05d6ab5c1c955f4d2c3fcc166ae6300b452b3014608060405260043610610063576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a293d1e814610068578063e6cb9013146100a6575b600080fd5b61009060048036038101908080359060200190929190803590602001909291905050506100e4565b6040518082815260200191505060405180910390f35b6100ce60048036038101908080359060200190929190803590602001909291905050506100fd565b6040518082815260200191505060405180910390f35b60008282111515156100f257fe5b818303905092915050565b6000818301905082811015151561011057fe5b809050929150505600a165627a7a72305820ac19b530c9fab4716b26d7706467f9a30d5542de1ac898dc56c67ff65ebe9bd50029"}}},"deployments":{"blockchain://41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d/block/cf1fe2fc56f116e30ee6f6de77c1bfe9304231414fa8c7e0c98075e93f618368":{"SafeMathLib":{"address":"0xa66A05D6AB5c1c955F4D2c3FCC166AE6300b452B","block":"0xe11241bf8d2862026db775ee3e9c85cc2ae99ea8938b795d77d9f2f277271b2a","contract_type":"SafeMathLib","transaction":"0x7ee011d3e2e5aef3be0ab5853666aa8e0427bcb19b3da6411c90768090bc5517"}}},"manifest_version":"2","package_name":"safe-math-lib","sources":{"./contracts/SafeMathLib.sol":"ipfs://QmNQeuwMDGJ7UiLaRjwzAoekcaKLp9TjiqeFdovj3syN1n"},"version":"1.0.0"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity ^0.6.8;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/// @title Safe Math Library
|
|
6
|
-
/// @author Piper Merriam <pipermerriam@gmail.com>
|
|
7
|
-
library SafeMathLib {
|
|
8
|
-
/// @dev Adds a and b, throwing an error if the operation would cause an overflow.
|
|
9
|
-
/// @param a The first number to add
|
|
10
|
-
/// @param b The second number to add
|
|
11
|
-
function safeAdd(uint256 a, uint256 b) public pure returns (uint256 c) {
|
|
12
|
-
c = a + b;
|
|
13
|
-
assert(c >= a);
|
|
14
|
-
return c;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/// @dev Subtracts b from a, throwing an error if the operation would cause an underflow.
|
|
18
|
-
/// @param a The number to be subtracted from
|
|
19
|
-
/// @param b The amount that should be subtracted
|
|
20
|
-
function safeSub(uint256 a, uint256 b) public pure returns (uint256) {
|
|
21
|
-
assert(b <= a);
|
|
22
|
-
return a - b;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilers": [
|
|
3
|
-
{
|
|
4
|
-
"contractTypes": [
|
|
5
|
-
"SafeMathLib"
|
|
6
|
-
],
|
|
7
|
-
"name": "solc",
|
|
8
|
-
"settings": {
|
|
9
|
-
"optimize": false
|
|
10
|
-
},
|
|
11
|
-
"version": "0.6.8+commit.0bbfe453"
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"contractTypes": {
|
|
15
|
-
"SafeMathLib": {
|
|
16
|
-
"abi": [
|
|
17
|
-
{
|
|
18
|
-
"inputs": [
|
|
19
|
-
{
|
|
20
|
-
"internalType": "uint256",
|
|
21
|
-
"name": "a",
|
|
22
|
-
"type": "uint256"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"internalType": "uint256",
|
|
26
|
-
"name": "b",
|
|
27
|
-
"type": "uint256"
|
|
28
|
-
}
|
|
29
|
-
],
|
|
30
|
-
"name": "safeAdd",
|
|
31
|
-
"outputs": [
|
|
32
|
-
{
|
|
33
|
-
"internalType": "uint256",
|
|
34
|
-
"name": "c",
|
|
35
|
-
"type": "uint256"
|
|
36
|
-
}
|
|
37
|
-
],
|
|
38
|
-
"stateMutability": "pure",
|
|
39
|
-
"type": "function"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"inputs": [
|
|
43
|
-
{
|
|
44
|
-
"internalType": "uint256",
|
|
45
|
-
"name": "a",
|
|
46
|
-
"type": "uint256"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"internalType": "uint256",
|
|
50
|
-
"name": "b",
|
|
51
|
-
"type": "uint256"
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
"name": "safeSub",
|
|
55
|
-
"outputs": [
|
|
56
|
-
{
|
|
57
|
-
"internalType": "uint256",
|
|
58
|
-
"name": "",
|
|
59
|
-
"type": "uint256"
|
|
60
|
-
}
|
|
61
|
-
],
|
|
62
|
-
"stateMutability": "pure",
|
|
63
|
-
"type": "function"
|
|
64
|
-
}
|
|
65
|
-
],
|
|
66
|
-
"deploymentBytecode": {
|
|
67
|
-
"bytecode": "0x610144610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100405760003560e01c8063a293d1e814610045578063e6cb901314610091575b600080fd5b61007b6004803603604081101561005b57600080fd5b8101908080359060200190929190803590602001909291905050506100dd565b6040518082815260200191505060405180910390f35b6100c7600480360360408110156100a757600080fd5b8101908080359060200190929190803590602001909291905050506100f4565b6040518082815260200191505060405180910390f35b6000828211156100e957fe5b818303905092915050565b600081830190508281101561010557fe5b8090509291505056fea26469706673582212201732500f2fac649ab2ce116d2145af69b3e8c6ef2d172ec377db7ed0b7a4801964736f6c63430006080033"
|
|
68
|
-
},
|
|
69
|
-
"devdoc": {
|
|
70
|
-
"author": "Piper Merriam <pipermerriam@gmail.com>",
|
|
71
|
-
"methods": {
|
|
72
|
-
"safeAdd(uint256,uint256)": {
|
|
73
|
-
"details": "Adds a and b, throwing an error if the operation would cause an overflow.",
|
|
74
|
-
"params": {
|
|
75
|
-
"a": "The first number to add",
|
|
76
|
-
"b": "The second number to add"
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
"safeSub(uint256,uint256)": {
|
|
80
|
-
"details": "Subtracts b from a, throwing an error if the operation would cause an underflow.",
|
|
81
|
-
"params": {
|
|
82
|
-
"a": "The number to be subtracted from",
|
|
83
|
-
"b": "The amount that should be subtracted"
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
"title": "Safe Math Library"
|
|
88
|
-
},
|
|
89
|
-
"runtimeBytecode": {
|
|
90
|
-
"bytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100405760003560e01c8063a293d1e814610045578063e6cb901314610091575b600080fd5b61007b6004803603604081101561005b57600080fd5b8101908080359060200190929190803590602001909291905050506100dd565b6040518082815260200191505060405180910390f35b6100c7600480360360408110156100a757600080fd5b8101908080359060200190929190803590602001909291905050506100f4565b6040518082815260200191505060405180910390f35b6000828211156100e957fe5b818303905092915050565b600081830190508281101561010557fe5b8090509291505056fea26469706673582212201732500f2fac649ab2ce116d2145af69b3e8c6ef2d172ec377db7ed0b7a4801964736f6c63430006080033"
|
|
91
|
-
},
|
|
92
|
-
"sourceId": "SafeMathLib.sol"
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
"deployments": {
|
|
96
|
-
"blockchain://d4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3/block/c4b7297b918ce3a93186eccff5195e77ef0c47b4e8cb8b66439aa25271f5170c": {
|
|
97
|
-
"SafeMathLib": {
|
|
98
|
-
"address": "0x6B2534269C5Ee98C37729d07Dc92C4b97EBB6235",
|
|
99
|
-
"block": "0x64fa9306a5c7aa3b8a71c29cd09fb897c3fb7325a3dbc75c4627dd8f08b759a6",
|
|
100
|
-
"contractType": "SafeMathLib",
|
|
101
|
-
"transaction": "0xb0ac2dbb86a29d70c8f3996834672e3af8cae7fc37718e49ac3adfd99eb23d31"
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
"manifest": "ethpm/3",
|
|
106
|
-
"name": "safe-math-lib",
|
|
107
|
-
"sources": {
|
|
108
|
-
"./SafeMathLib.sol": {
|
|
109
|
-
"installPath": "./SafeMathLib.sol",
|
|
110
|
-
"type": "solidity",
|
|
111
|
-
"urls": [
|
|
112
|
-
"ipfs://QmeyYahfHxPSoytQ2rPH2JUURin24sPvaMo6o6tKghwkAg"
|
|
113
|
-
]
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
"version": "1.0.0"
|
|
117
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"compilers":[{"contractTypes":["SafeMathLib"],"name":"solc","settings":{"optimize":false},"version":"0.6.8+commit.0bbfe453"}],"contractTypes":{"SafeMathLib":{"abi":[{"inputs":[{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"}],"name":"safeAdd","outputs":[{"internalType":"uint256","name":"c","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"}],"name":"safeSub","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"}],"deploymentBytecode":{"bytecode":"0x610144610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100405760003560e01c8063a293d1e814610045578063e6cb901314610091575b600080fd5b61007b6004803603604081101561005b57600080fd5b8101908080359060200190929190803590602001909291905050506100dd565b6040518082815260200191505060405180910390f35b6100c7600480360360408110156100a757600080fd5b8101908080359060200190929190803590602001909291905050506100f4565b6040518082815260200191505060405180910390f35b6000828211156100e957fe5b818303905092915050565b600081830190508281101561010557fe5b8090509291505056fea26469706673582212201732500f2fac649ab2ce116d2145af69b3e8c6ef2d172ec377db7ed0b7a4801964736f6c63430006080033"},"devdoc":{"author":"Piper Merriam <pipermerriam@gmail.com>","methods":{"safeAdd(uint256,uint256)":{"details":"Adds a and b, throwing an error if the operation would cause an overflow.","params":{"a":"The first number to add","b":"The second number to add"}},"safeSub(uint256,uint256)":{"details":"Subtracts b from a, throwing an error if the operation would cause an underflow.","params":{"a":"The number to be subtracted from","b":"The amount that should be subtracted"}}},"title":"Safe Math Library"},"runtimeBytecode":{"bytecode":"0x73000000000000000000000000000000000000000030146080604052600436106100405760003560e01c8063a293d1e814610045578063e6cb901314610091575b600080fd5b61007b6004803603604081101561005b57600080fd5b8101908080359060200190929190803590602001909291905050506100dd565b6040518082815260200191505060405180910390f35b6100c7600480360360408110156100a757600080fd5b8101908080359060200190929190803590602001909291905050506100f4565b6040518082815260200191505060405180910390f35b6000828211156100e957fe5b818303905092915050565b600081830190508281101561010557fe5b8090509291505056fea26469706673582212201732500f2fac649ab2ce116d2145af69b3e8c6ef2d172ec377db7ed0b7a4801964736f6c63430006080033"},"sourceId":"SafeMathLib.sol"}},"deployments":{"blockchain://d4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3/block/c4b7297b918ce3a93186eccff5195e77ef0c47b4e8cb8b66439aa25271f5170c":{"SafeMathLib":{"address":"0x6B2534269C5Ee98C37729d07Dc92C4b97EBB6235","block":"0x64fa9306a5c7aa3b8a71c29cd09fb897c3fb7325a3dbc75c4627dd8f08b759a6","contractType":"SafeMathLib","transaction":"0xb0ac2dbb86a29d70c8f3996834672e3af8cae7fc37718e49ac3adfd99eb23d31"}}},"manifest":"ethpm/3","name":"safe-math-lib","sources":{"./SafeMathLib.sol":{"installPath":"./SafeMathLib.sol","type":"solidity","urls":["ipfs://QmeyYahfHxPSoytQ2rPH2JUURin24sPvaMo6o6tKghwkAg"]}},"version":"1.0.0"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"manifest_version":"2",
|
|
3
|
-
"version":"1.0.0",
|
|
4
|
-
"package_name":"standard-token",
|
|
5
|
-
"sources":{
|
|
6
|
-
"./contracts/AbstractToken.sol":"ipfs://Qma8tiYLSYGSjbLVn4RbTHBt2LBUXe2ADb37NVsG5UgXea",
|
|
7
|
-
"./contracts/StandardToken.sol":"ipfs://QmRJHLmPVct2rbBpdGjP3xkXbF7romQigtmcs8TRfV1yC7"
|
|
8
|
-
},
|
|
9
|
-
"contract_types":{
|
|
10
|
-
"StandardToken":{
|
|
11
|
-
"abi": [{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_totalSupply","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}],
|
|
12
|
-
"natspec":{
|
|
13
|
-
"author":"Stefan George - <stefan.george@consensys.net>",
|
|
14
|
-
"methods":{
|
|
15
|
-
"allowance(address,address)":{
|
|
16
|
-
"details":"Returns number of allowed tokens for given address.",
|
|
17
|
-
"params":{
|
|
18
|
-
"_owner":"Address of token owner.",
|
|
19
|
-
"_spender":"Address of token spender."
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"approve(address,uint256)":{
|
|
23
|
-
"details":"Sets approved amount of tokens for spender. Returns success.",
|
|
24
|
-
"params":{
|
|
25
|
-
"_spender":"Address of allowed account.",
|
|
26
|
-
"_value":"Number of approved tokens."
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"balanceOf(address)":{
|
|
30
|
-
"details":"Returns number of tokens owned by given address.",
|
|
31
|
-
"params":{
|
|
32
|
-
"_owner":"Address of token owner."
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"transfer(address,uint256)":{
|
|
36
|
-
"details":"Transfers sender's tokens to a given address. Returns success.",
|
|
37
|
-
"params":{
|
|
38
|
-
"_to":"Address of token receiver.",
|
|
39
|
-
"_value":"Number of tokens to transfer."
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"transferFrom(address,address,uint256)":{
|
|
43
|
-
"details":"Allows allowed third party to transfer tokens from one address to another. Returns success.",
|
|
44
|
-
"params":{
|
|
45
|
-
"_from":"Address from where tokens are withdrawn.",
|
|
46
|
-
"_to":"Address to where tokens are sent.",
|
|
47
|
-
"_value":"Number of tokens to transfer."
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"title":"Standard token contract"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"contract_types":{"StandardToken":{"abi":[{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_totalSupply","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}],"natspec":{"author":"Stefan George - <stefan.george@consensys.net>","methods":{"allowance(address,address)":{"details":"Returns number of allowed tokens for given address.","params":{"_owner":"Address of token owner.","_spender":"Address of token spender."}},"approve(address,uint256)":{"details":"Sets approved amount of tokens for spender. Returns success.","params":{"_spender":"Address of allowed account.","_value":"Number of approved tokens."}},"balanceOf(address)":{"details":"Returns number of tokens owned by given address.","params":{"_owner":"Address of token owner."}},"transfer(address,uint256)":{"details":"Transfers sender's tokens to a given address. Returns success.","params":{"_to":"Address of token receiver.","_value":"Number of tokens to transfer."}},"transferFrom(address,address,uint256)":{"details":"Allows allowed third party to transfer tokens from one address to another. Returns success.","params":{"_from":"Address from where tokens are withdrawn.","_to":"Address to where tokens are sent.","_value":"Number of tokens to transfer."}}},"title":"Standard token contract"}}},"manifest_version":"2","package_name":"standard-token","sources":{"./contracts/AbstractToken.sol":"ipfs://Qma8tiYLSYGSjbLVn4RbTHBt2LBUXe2ADb37NVsG5UgXea","./contracts/StandardToken.sol":"ipfs://QmRJHLmPVct2rbBpdGjP3xkXbF7romQigtmcs8TRfV1yC7"},"version":"1.0.0"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity ^0.6.8;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/// Implements ERC 20 Token standard: https://github.com/ethereum/EIPs/issues/20
|
|
6
|
-
|
|
7
|
-
/// @title Abstract token contract - Functions to be implemented by token contracts.
|
|
8
|
-
/// @author Stefan George - <stefan.george@consensys.net>
|
|
9
|
-
abstract contract Token {
|
|
10
|
-
// This is not an abstract function, because solc won't recognize generated getter functions for public variables as functions
|
|
11
|
-
function totalSupply() external view virtual returns (uint256 supply) {}
|
|
12
|
-
function balanceOf(address owner) public view virtual returns (uint256 balance);
|
|
13
|
-
function transfer(address to, uint256 value) public virtual returns (bool success);
|
|
14
|
-
function transferFrom(address from, address to, uint256 value) public virtual returns (bool success);
|
|
15
|
-
function approve(address spender, uint256 value) public virtual returns (bool success);
|
|
16
|
-
function allowance(address owner, address spender) public view virtual returns (uint256 remaining);
|
|
17
|
-
|
|
18
|
-
event Transfer(address indexed from, address indexed to, uint256 value);
|
|
19
|
-
event Approval(address indexed owner, address indexed spender, uint256 value);
|
|
20
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity ^0.6.8;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import "./AbstractToken.sol";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/// @title Standard token contract
|
|
9
|
-
/// @author Stefan George - <stefan.george@consensys.net>
|
|
10
|
-
contract StandardToken is Token {
|
|
11
|
-
/*
|
|
12
|
-
* Data structures
|
|
13
|
-
*/
|
|
14
|
-
mapping (address => uint256) balances;
|
|
15
|
-
mapping (address => mapping (address => uint256)) allowed;
|
|
16
|
-
uint256 override public totalSupply;
|
|
17
|
-
|
|
18
|
-
constructor (uint _totalSupply) public {
|
|
19
|
-
totalSupply = _totalSupply;
|
|
20
|
-
balances[msg.sender] = _totalSupply;
|
|
21
|
-
emit Transfer(address(0), msg.sender, _totalSupply);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/*
|
|
25
|
-
* Read and write storage functions
|
|
26
|
-
*/
|
|
27
|
-
/// @dev Transfers sender's tokens to a given address. Returns success.
|
|
28
|
-
/// @param _to Address of token receiver.
|
|
29
|
-
/// @param _value Number of tokens to transfer.
|
|
30
|
-
function transfer(address _to, uint256 _value) public override returns (bool success) {
|
|
31
|
-
if (balances[msg.sender] >= _value && _value > 0) {
|
|
32
|
-
balances[msg.sender] -= _value;
|
|
33
|
-
balances[_to] += _value;
|
|
34
|
-
emit Transfer(msg.sender, _to, _value);
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/// @dev Allows allowed third party to transfer tokens from one address to another. Returns success.
|
|
43
|
-
/// @param _from Address from where tokens are withdrawn.
|
|
44
|
-
/// @param _to Address to where tokens are sent.
|
|
45
|
-
/// @param _value Number of tokens to transfer.
|
|
46
|
-
function transferFrom(address _from, address _to, uint256 _value) public override returns (bool success) {
|
|
47
|
-
if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && _value > 0) {
|
|
48
|
-
balances[_to] += _value;
|
|
49
|
-
balances[_from] -= _value;
|
|
50
|
-
allowed[_from][msg.sender] -= _value;
|
|
51
|
-
emit Transfer(_from, _to, _value);
|
|
52
|
-
return true;
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/// @dev Returns number of tokens owned by given address.
|
|
60
|
-
/// @param _owner Address of token owner.
|
|
61
|
-
function balanceOf(address _owner) public override view returns (uint256 balance) {
|
|
62
|
-
return balances[_owner];
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/// @dev Sets approved amount of tokens for spender. Returns success.
|
|
66
|
-
/// @param _spender Address of allowed account.
|
|
67
|
-
/// @param _value Number of approved tokens.
|
|
68
|
-
function approve(address _spender, uint256 _value) public override returns (bool success) {
|
|
69
|
-
allowed[msg.sender][_spender] = _value;
|
|
70
|
-
emit Approval(msg.sender, _spender, _value);
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/*
|
|
75
|
-
* Read storage functions
|
|
76
|
-
*/
|
|
77
|
-
/// @dev Returns number of allowed tokens for given address.
|
|
78
|
-
/// @param _owner Address of token owner.
|
|
79
|
-
/// @param _spender Address of token spender.
|
|
80
|
-
function allowance(address _owner, address _spender) public override view returns (uint256 remaining) {
|
|
81
|
-
return allowed[_owner][_spender];
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
}
|