@super-protocol/sdk-js 0.6.0
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.
- package/build/BlockchainConnector.d.ts +48 -0
- package/build/BlockchainConnector.js +259 -0
- package/build/TIIGenerator.d.ts +21 -0
- package/build/TIIGenerator.js +251 -0
- package/build/constants.d.ts +7 -0
- package/build/constants.js +10 -0
- package/build/contracts/ActiveOffersList.json +131 -0
- package/build/contracts/ActiveOrdersList.json +74 -0
- package/build/contracts/Marks.json +79 -0
- package/build/contracts/Offers.json +999 -0
- package/build/contracts/Orders.json +984 -0
- package/build/contracts/Providers.json +440 -0
- package/build/contracts/ProvidersOffers.json +254 -0
- package/build/contracts/Staking.json +323 -0
- package/build/contracts/Superpro.json +197 -0
- package/build/contracts/SuperproToken.json +356 -0
- package/build/crypto/Crypto.d.ts +37 -0
- package/build/crypto/Crypto.js +181 -0
- package/build/crypto/index.d.ts +2 -0
- package/build/crypto/index.js +7 -0
- package/build/crypto/nodejs/AES.d.ts +24 -0
- package/build/crypto/nodejs/AES.js +152 -0
- package/build/crypto/nodejs/ARIA.d.ts +24 -0
- package/build/crypto/nodejs/ARIA.js +151 -0
- package/build/crypto/nodejs/ECIES.d.ts +6 -0
- package/build/crypto/nodejs/ECIES.js +94 -0
- package/build/crypto/nodejs/NativeCrypto.d.ts +54 -0
- package/build/crypto/nodejs/NativeCrypto.js +214 -0
- package/build/crypto/nodejs/RSA-Hybrid.d.ts +15 -0
- package/build/crypto/nodejs/RSA-Hybrid.js +153 -0
- package/build/index.d.ts +65 -0
- package/build/index.js +117 -0
- package/build/logger.d.ts +4 -0
- package/build/logger.js +8 -0
- package/build/models/Ballot.d.ts +13 -0
- package/build/models/Ballot.js +76 -0
- package/build/models/Offer.d.ts +70 -0
- package/build/models/Offer.js +273 -0
- package/build/models/Order.d.ts +125 -0
- package/build/models/Order.js +540 -0
- package/build/models/Provider.d.ts +40 -0
- package/build/models/Provider.js +167 -0
- package/build/models/TCB.d.ts +80 -0
- package/build/models/TCB.js +315 -0
- package/build/models/TeeOffer.d.ts +118 -0
- package/build/models/TeeOffer.js +436 -0
- package/build/proto/Compression.d.ts +33 -0
- package/build/proto/Compression.js +146 -0
- package/build/proto/TRI.d.ts +122 -0
- package/build/proto/TRI.js +316 -0
- package/build/providers/storage/ChunksDownloadDecorator.d.ts +38 -0
- package/build/providers/storage/ChunksDownloadDecorator.js +284 -0
- package/build/providers/storage/IStorageProvider.d.ts +17 -0
- package/build/providers/storage/IStorageProvider.js +2 -0
- package/build/providers/storage/StorjStorageProvider.d.ts +26 -0
- package/build/providers/storage/StorjStorageProvider.js +389 -0
- package/build/providers/storage/getStorageProvider.d.ts +4 -0
- package/build/providers/storage/getStorageProvider.js +16 -0
- package/build/staticModels/ActiveOffers.d.ts +29 -0
- package/build/staticModels/ActiveOffers.js +144 -0
- package/build/staticModels/ActiveOrders.d.ts +21 -0
- package/build/staticModels/ActiveOrders.js +120 -0
- package/build/staticModels/Consensus.d.ts +63 -0
- package/build/staticModels/Consensus.js +373 -0
- package/build/staticModels/Epochs.d.ts +23 -0
- package/build/staticModels/Epochs.js +97 -0
- package/build/staticModels/LastBlocks.d.ts +25 -0
- package/build/staticModels/LastBlocks.js +96 -0
- package/build/staticModels/Marks.d.ts +13 -0
- package/build/staticModels/Marks.js +113 -0
- package/build/staticModels/OffersFactory.d.ts +37 -0
- package/build/staticModels/OffersFactory.js +227 -0
- package/build/staticModels/OrdersFactory.d.ts +137 -0
- package/build/staticModels/OrdersFactory.js +539 -0
- package/build/staticModels/ProviderRegistry.d.ts +81 -0
- package/build/staticModels/ProviderRegistry.js +311 -0
- package/build/staticModels/Staking.d.ts +26 -0
- package/build/staticModels/Staking.js +132 -0
- package/build/staticModels/Superpro.d.ts +20 -0
- package/build/staticModels/Superpro.js +99 -0
- package/build/staticModels/SuperproToken.d.ts +30 -0
- package/build/staticModels/SuperproToken.js +125 -0
- package/build/staticModels/Suspicious.d.ts +26 -0
- package/build/staticModels/Suspicious.js +99 -0
- package/build/staticModels/TeeOffersFactory.d.ts +36 -0
- package/build/staticModels/TeeOffersFactory.js +206 -0
- package/build/staticModels/Voting.d.ts +35 -0
- package/build/staticModels/Voting.js +111 -0
- package/build/store.d.ts +12 -0
- package/build/store.js +13 -0
- package/build/types/Ballot.d.ts +75 -0
- package/build/types/Ballot.js +49 -0
- package/build/types/Epoch.d.ts +21 -0
- package/build/types/Epoch.js +18 -0
- package/build/types/Events.d.ts +18 -0
- package/build/types/Events.js +2 -0
- package/build/types/Marks.d.ts +5 -0
- package/build/types/Marks.js +9 -0
- package/build/types/Offer.d.ts +63 -0
- package/build/types/Offer.js +41 -0
- package/build/types/Order.d.ts +61 -0
- package/build/types/Order.js +36 -0
- package/build/types/Origins.d.ts +12 -0
- package/build/types/Origins.js +10 -0
- package/build/types/Provider.d.ts +25 -0
- package/build/types/Provider.js +19 -0
- package/build/types/Staking.d.ts +27 -0
- package/build/types/Staking.js +22 -0
- package/build/types/Superpro.d.ts +24 -0
- package/build/types/Superpro.js +29 -0
- package/build/types/TcbData.d.ts +26 -0
- package/build/types/TcbData.js +21 -0
- package/build/types/TeeOffer.d.ts +22 -0
- package/build/types/TeeOffer.js +15 -0
- package/build/types/Web3.d.ts +26 -0
- package/build/types/Web3.js +2 -0
- package/build/types/blockchainConnector/StorageAccess.d.ts +8 -0
- package/build/types/blockchainConnector/StorageAccess.js +2 -0
- package/build/types/storage/StorageAccess.d.ts +6 -0
- package/build/types/storage/StorageAccess.js +2 -0
- package/build/types/storage/StorageFileAccess.d.ts +5 -0
- package/build/types/storage/StorageFileAccess.js +2 -0
- package/build/types/storage/StorageObject.d.ts +8 -0
- package/build/types/storage/StorageObject.js +2 -0
- package/build/utils/NonceTracker.d.ts +12 -0
- package/build/utils/NonceTracker.js +84 -0
- package/build/utils/TxManager.d.ts +21 -0
- package/build/utils/TxManager.js +159 -0
- package/build/utils.d.ts +38 -0
- package/build/utils.js +195 -0
- package/package.json +68 -0
- package/readme.md +40 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "Superpro",
|
|
4
|
+
"sourceName": "contracts/Superpro.sol",
|
|
5
|
+
"abi": [
|
|
6
|
+
{
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"internalType": "enum ParamName",
|
|
10
|
+
"name": "name",
|
|
11
|
+
"type": "uint8"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"name": "getConfigParam",
|
|
15
|
+
"outputs": [
|
|
16
|
+
{
|
|
17
|
+
"internalType": "uint256",
|
|
18
|
+
"name": "",
|
|
19
|
+
"type": "uint256"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"stateMutability": "view",
|
|
23
|
+
"type": "function"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"inputs": [],
|
|
27
|
+
"name": "getToken",
|
|
28
|
+
"outputs": [
|
|
29
|
+
{
|
|
30
|
+
"internalType": "address",
|
|
31
|
+
"name": "",
|
|
32
|
+
"type": "address"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"stateMutability": "view",
|
|
36
|
+
"type": "function"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"inputs": [],
|
|
40
|
+
"name": "getVersion",
|
|
41
|
+
"outputs": [
|
|
42
|
+
{
|
|
43
|
+
"internalType": "string",
|
|
44
|
+
"name": "",
|
|
45
|
+
"type": "string"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"stateMutability": "view",
|
|
49
|
+
"type": "function"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"inputs": [
|
|
53
|
+
{
|
|
54
|
+
"internalType": "enum ParamName",
|
|
55
|
+
"name": "name",
|
|
56
|
+
"type": "uint8"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"internalType": "uint256",
|
|
60
|
+
"name": "value",
|
|
61
|
+
"type": "uint256"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"name": "setConfigParam",
|
|
65
|
+
"outputs": [],
|
|
66
|
+
"stateMutability": "nonpayable",
|
|
67
|
+
"type": "function"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"inputs": [
|
|
71
|
+
{
|
|
72
|
+
"components": [
|
|
73
|
+
{
|
|
74
|
+
"internalType": "string",
|
|
75
|
+
"name": "version",
|
|
76
|
+
"type": "string"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"internalType": "address",
|
|
80
|
+
"name": "token",
|
|
81
|
+
"type": "address"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"internalType": "uint256",
|
|
85
|
+
"name": "orderMinimumDeposit",
|
|
86
|
+
"type": "uint256"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"internalType": "uint256",
|
|
90
|
+
"name": "profitWithdrawDelayDays",
|
|
91
|
+
"type": "uint256"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"internalType": "uint256",
|
|
95
|
+
"name": "minSecurityDeposit",
|
|
96
|
+
"type": "uint256"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"internalType": "uint256",
|
|
100
|
+
"name": "stakingPercentPerDay",
|
|
101
|
+
"type": "uint256"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"internalType": "uint256",
|
|
105
|
+
"name": "stopDelayDays",
|
|
106
|
+
"type": "uint256"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"internalType": "uint256",
|
|
110
|
+
"name": "teeOfferSecurityDeposit",
|
|
111
|
+
"type": "uint256"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"internalType": "uint256",
|
|
115
|
+
"name": "offerSecurityDeposit",
|
|
116
|
+
"type": "uint256"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"internalType": "uint256",
|
|
120
|
+
"name": "teeRewardPerEpoch",
|
|
121
|
+
"type": "uint256"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"internalType": "uint256",
|
|
125
|
+
"name": "votingDepsit",
|
|
126
|
+
"type": "uint256"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"internalType": "uint256",
|
|
130
|
+
"name": "votingDurationDays",
|
|
131
|
+
"type": "uint256"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"internalType": "uint256",
|
|
135
|
+
"name": "votingExecutionTimeoutDays",
|
|
136
|
+
"type": "uint256"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"internalType": "uint256",
|
|
140
|
+
"name": "votingHoldDays",
|
|
141
|
+
"type": "uint256"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"internalType": "uint256",
|
|
145
|
+
"name": "votingMinumumTurnout",
|
|
146
|
+
"type": "uint256"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"internalType": "uint256",
|
|
150
|
+
"name": "L1",
|
|
151
|
+
"type": "uint256"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"internalType": "uint256",
|
|
155
|
+
"name": "L2",
|
|
156
|
+
"type": "uint256"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"internalType": "uint256",
|
|
160
|
+
"name": "Threshold",
|
|
161
|
+
"type": "uint256"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"internalType": "uint256",
|
|
165
|
+
"name": "epochDurationSeconds",
|
|
166
|
+
"type": "uint256"
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"internalType": "struct SuperproParams",
|
|
170
|
+
"name": "params",
|
|
171
|
+
"type": "tuple"
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"name": "setConfigParams",
|
|
175
|
+
"outputs": [],
|
|
176
|
+
"stateMutability": "nonpayable",
|
|
177
|
+
"type": "function"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"inputs": [
|
|
181
|
+
{
|
|
182
|
+
"internalType": "string",
|
|
183
|
+
"name": "newVersion",
|
|
184
|
+
"type": "string"
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"name": "setVersion",
|
|
188
|
+
"outputs": [],
|
|
189
|
+
"stateMutability": "nonpayable",
|
|
190
|
+
"type": "function"
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"bytecode": "0x608060405234801561001057600080fd5b50610a62806100206000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c8063788bc78c11610050578063788bc78c146100f1578063897ce7cf1461010457806398d7beb71461012557600080fd5b80630d8e6e2c1461007757806321df0da7146100955780636e4b1fa0146100dc575b600080fd5b61007f610138565b60405161008c919061068d565b60405180910390f35b7f138bd5e559c13aa9dfbf617b0343ed463691d1034ede8cbb5ffe8a72825518e55460405173ffffffffffffffffffffffffffffffffffffffff909116815260200161008c565b6100ef6100ea3660046107d8565b6101ee565b005b6100ef6100ff36600461090e565b610372565b61011761011236600461098f565b6103ac565b60405190815260200161008c565b6100ef6101333660046109b1565b61042b565b7f138bd5e559c13aa9dfbf617b0343ed463691d1034ede8cbb5ffe8a72825518e4805460609190819061016a906109db565b80601f0160208091040260200160405190810160405280929190818152602001828054610196906109db565b80156101e35780601f106101b8576101008083540402835291602001916101e3565b820191906000526020600020905b8154815290600101906020018083116101c657829003601f168201915b505050505091505090565b6101f66104b1565b805180517f138bd5e559c13aa9dfbf617b0343ed463691d1034ede8cbb5ffe8a72825518e49161022b91839160200190610580565b50602082810151600183810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90931692909217909155604080850151600080805260029586019094528184205560608501519183528083209190915560808401519282528082209290925560a0830151600382528282205560c0830151600482528282205560e083015160058252828220556101008301516006825282822055610120830151600782528282205561014083015160088252828220556101608301516009825282822055610180830151600a8252828220556101a0830151600b8252828220556101c0830151600c8252828220556101e0830151600d825282822055610200830151600e825282822055610220830151600f8252828220556102409092015160108352912055565b61037a6104b1565b7f138bd5e559c13aa9dfbf617b0343ed463691d1034ede8cbb5ffe8a72825518e46103a6818484610604565b50505050565b60007f138bd5e559c13aa9dfbf617b0343ed463691d1034ede8cbb5ffe8a72825518e47f138bd5e559c13aa9dfbf617b0343ed463691d1034ede8cbb5ffe8a72825518e68284601081111561040357610403610a16565b601081111561041457610414610a16565b815260200190815260200160002054915050919050565b6104336104b1565b7f138bd5e559c13aa9dfbf617b0343ed463691d1034ede8cbb5ffe8a72825518e4817f138bd5e559c13aa9dfbf617b0343ed463691d1034ede8cbb5ffe8a72825518e6600085601081111561048a5761048a610a16565b601081111561049b5761049b610a16565b8152602081019190915260400160002055505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c6004015473ffffffffffffffffffffffffffffffffffffffff16331461057e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201527f6572000000000000000000000000000000000000000000000000000000000000606482015260840160405180910390fd5b565b82805461058c906109db565b90600052602060002090601f0160209004810192826105ae57600085556105f4565b82601f106105c757805160ff19168380011785556105f4565b828001600101855582156105f4579182015b828111156105f45782518255916020019190600101906105d9565b50610600929150610678565b5090565b828054610610906109db565b90600052602060002090601f01602090048101928261063257600085556105f4565b82601f1061064b5782800160ff198235161785556105f4565b828001600101855582156105f4579182015b828111156105f457823582559160200191906001019061065d565b5b808211156106005760008155600101610679565b600060208083528351808285015260005b818110156106ba5785810183015185820160400152820161069e565b818111156106cc576000604083870101525b50601f01601f1916929092016040019392505050565b634e487b7160e01b600052604160045260246000fd5b604051610260810167ffffffffffffffff8111828210171561071c5761071c6106e2565b60405290565b600082601f83011261073357600080fd5b813567ffffffffffffffff8082111561074e5761074e6106e2565b604051601f8301601f19908116603f01168101908282118183101715610776576107766106e2565b8160405283815286602085880101111561078f57600080fd5b836020870160208301376000602085830101528094505050505092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146107d357600080fd5b919050565b6000602082840312156107ea57600080fd5b813567ffffffffffffffff8082111561080257600080fd5b90830190610260828603121561081757600080fd5b61081f6106f8565b82358281111561082e57600080fd5b61083a87828601610722565b825250610849602084016107af565b602082015260408381013590820152606080840135908201526080808401359082015260a0808401359082015260c0808401359082015260e08084013590820152610100808401359082015261012080840135908201526101408084013590820152610160808401359082015261018080840135908201526101a080840135908201526101c080840135908201526101e08084013590820152610200808401359082015261022080840135908201526102409283013592810192909252509392505050565b6000806020838503121561092157600080fd5b823567ffffffffffffffff8082111561093957600080fd5b818501915085601f83011261094d57600080fd5b81358181111561095c57600080fd5b86602082850101111561096e57600080fd5b60209290920196919550909350505050565b8035601181106107d357600080fd5b6000602082840312156109a157600080fd5b6109aa82610980565b9392505050565b600080604083850312156109c457600080fd5b6109cd83610980565b946020939093013593505050565b600181811c908216806109ef57607f821691505b60208210811415610a1057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212206da345b85bd92c1bbecf3fad41c3209ff95235b541b3dc501477ac88d4d26e8964736f6c63430008090033",
|
|
194
|
+
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100725760003560e01c8063788bc78c11610050578063788bc78c146100f1578063897ce7cf1461010457806398d7beb71461012557600080fd5b80630d8e6e2c1461007757806321df0da7146100955780636e4b1fa0146100dc575b600080fd5b61007f610138565b60405161008c919061068d565b60405180910390f35b7f138bd5e559c13aa9dfbf617b0343ed463691d1034ede8cbb5ffe8a72825518e55460405173ffffffffffffffffffffffffffffffffffffffff909116815260200161008c565b6100ef6100ea3660046107d8565b6101ee565b005b6100ef6100ff36600461090e565b610372565b61011761011236600461098f565b6103ac565b60405190815260200161008c565b6100ef6101333660046109b1565b61042b565b7f138bd5e559c13aa9dfbf617b0343ed463691d1034ede8cbb5ffe8a72825518e4805460609190819061016a906109db565b80601f0160208091040260200160405190810160405280929190818152602001828054610196906109db565b80156101e35780601f106101b8576101008083540402835291602001916101e3565b820191906000526020600020905b8154815290600101906020018083116101c657829003601f168201915b505050505091505090565b6101f66104b1565b805180517f138bd5e559c13aa9dfbf617b0343ed463691d1034ede8cbb5ffe8a72825518e49161022b91839160200190610580565b50602082810151600183810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90931692909217909155604080850151600080805260029586019094528184205560608501519183528083209190915560808401519282528082209290925560a0830151600382528282205560c0830151600482528282205560e083015160058252828220556101008301516006825282822055610120830151600782528282205561014083015160088252828220556101608301516009825282822055610180830151600a8252828220556101a0830151600b8252828220556101c0830151600c8252828220556101e0830151600d825282822055610200830151600e825282822055610220830151600f8252828220556102409092015160108352912055565b61037a6104b1565b7f138bd5e559c13aa9dfbf617b0343ed463691d1034ede8cbb5ffe8a72825518e46103a6818484610604565b50505050565b60007f138bd5e559c13aa9dfbf617b0343ed463691d1034ede8cbb5ffe8a72825518e47f138bd5e559c13aa9dfbf617b0343ed463691d1034ede8cbb5ffe8a72825518e68284601081111561040357610403610a16565b601081111561041457610414610a16565b815260200190815260200160002054915050919050565b6104336104b1565b7f138bd5e559c13aa9dfbf617b0343ed463691d1034ede8cbb5ffe8a72825518e4817f138bd5e559c13aa9dfbf617b0343ed463691d1034ede8cbb5ffe8a72825518e6600085601081111561048a5761048a610a16565b601081111561049b5761049b610a16565b8152602081019190915260400160002055505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c6004015473ffffffffffffffffffffffffffffffffffffffff16331461057e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201527f6572000000000000000000000000000000000000000000000000000000000000606482015260840160405180910390fd5b565b82805461058c906109db565b90600052602060002090601f0160209004810192826105ae57600085556105f4565b82601f106105c757805160ff19168380011785556105f4565b828001600101855582156105f4579182015b828111156105f45782518255916020019190600101906105d9565b50610600929150610678565b5090565b828054610610906109db565b90600052602060002090601f01602090048101928261063257600085556105f4565b82601f1061064b5782800160ff198235161785556105f4565b828001600101855582156105f4579182015b828111156105f457823582559160200191906001019061065d565b5b808211156106005760008155600101610679565b600060208083528351808285015260005b818110156106ba5785810183015185820160400152820161069e565b818111156106cc576000604083870101525b50601f01601f1916929092016040019392505050565b634e487b7160e01b600052604160045260246000fd5b604051610260810167ffffffffffffffff8111828210171561071c5761071c6106e2565b60405290565b600082601f83011261073357600080fd5b813567ffffffffffffffff8082111561074e5761074e6106e2565b604051601f8301601f19908116603f01168101908282118183101715610776576107766106e2565b8160405283815286602085880101111561078f57600080fd5b836020870160208301376000602085830101528094505050505092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146107d357600080fd5b919050565b6000602082840312156107ea57600080fd5b813567ffffffffffffffff8082111561080257600080fd5b90830190610260828603121561081757600080fd5b61081f6106f8565b82358281111561082e57600080fd5b61083a87828601610722565b825250610849602084016107af565b602082015260408381013590820152606080840135908201526080808401359082015260a0808401359082015260c0808401359082015260e08084013590820152610100808401359082015261012080840135908201526101408084013590820152610160808401359082015261018080840135908201526101a080840135908201526101c080840135908201526101e08084013590820152610200808401359082015261022080840135908201526102409283013592810192909252509392505050565b6000806020838503121561092157600080fd5b823567ffffffffffffffff8082111561093957600080fd5b818501915085601f83011261094d57600080fd5b81358181111561095c57600080fd5b86602082850101111561096e57600080fd5b60209290920196919550909350505050565b8035601181106107d357600080fd5b6000602082840312156109a157600080fd5b6109aa82610980565b9392505050565b600080604083850312156109c457600080fd5b6109cd83610980565b946020939093013593505050565b600181811c908216806109ef57607f821691505b60208210811415610a1057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212206da345b85bd92c1bbecf3fad41c3209ff95235b541b3dc501477ac88d4d26e8964736f6c63430008090033",
|
|
195
|
+
"linkReferences": {},
|
|
196
|
+
"deployedLinkReferences": {}
|
|
197
|
+
}
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "SuperproToken",
|
|
4
|
+
"sourceName": "contracts/SuperproToken.sol",
|
|
5
|
+
"abi": [
|
|
6
|
+
{
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"internalType": "address",
|
|
10
|
+
"name": "addr",
|
|
11
|
+
"type": "address"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"internalType": "uint256",
|
|
15
|
+
"name": "supply",
|
|
16
|
+
"type": "uint256"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"internalType": "string",
|
|
20
|
+
"name": "ticker",
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"internalType": "string",
|
|
25
|
+
"name": "description",
|
|
26
|
+
"type": "string"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"stateMutability": "nonpayable",
|
|
30
|
+
"type": "constructor"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"anonymous": false,
|
|
34
|
+
"inputs": [
|
|
35
|
+
{
|
|
36
|
+
"indexed": true,
|
|
37
|
+
"internalType": "address",
|
|
38
|
+
"name": "owner",
|
|
39
|
+
"type": "address"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"indexed": true,
|
|
43
|
+
"internalType": "address",
|
|
44
|
+
"name": "spender",
|
|
45
|
+
"type": "address"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"indexed": false,
|
|
49
|
+
"internalType": "uint256",
|
|
50
|
+
"name": "value",
|
|
51
|
+
"type": "uint256"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"name": "Approval",
|
|
55
|
+
"type": "event"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"anonymous": false,
|
|
59
|
+
"inputs": [
|
|
60
|
+
{
|
|
61
|
+
"indexed": true,
|
|
62
|
+
"internalType": "address",
|
|
63
|
+
"name": "from",
|
|
64
|
+
"type": "address"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"indexed": true,
|
|
68
|
+
"internalType": "address",
|
|
69
|
+
"name": "to",
|
|
70
|
+
"type": "address"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"indexed": false,
|
|
74
|
+
"internalType": "uint256",
|
|
75
|
+
"name": "value",
|
|
76
|
+
"type": "uint256"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"name": "Transfer",
|
|
80
|
+
"type": "event"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"inputs": [
|
|
84
|
+
{
|
|
85
|
+
"internalType": "address",
|
|
86
|
+
"name": "owner",
|
|
87
|
+
"type": "address"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"internalType": "address",
|
|
91
|
+
"name": "spender",
|
|
92
|
+
"type": "address"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"name": "allowance",
|
|
96
|
+
"outputs": [
|
|
97
|
+
{
|
|
98
|
+
"internalType": "uint256",
|
|
99
|
+
"name": "",
|
|
100
|
+
"type": "uint256"
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"stateMutability": "view",
|
|
104
|
+
"type": "function"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"inputs": [
|
|
108
|
+
{
|
|
109
|
+
"internalType": "address",
|
|
110
|
+
"name": "spender",
|
|
111
|
+
"type": "address"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"internalType": "uint256",
|
|
115
|
+
"name": "amount",
|
|
116
|
+
"type": "uint256"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"name": "approve",
|
|
120
|
+
"outputs": [
|
|
121
|
+
{
|
|
122
|
+
"internalType": "bool",
|
|
123
|
+
"name": "",
|
|
124
|
+
"type": "bool"
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"stateMutability": "nonpayable",
|
|
128
|
+
"type": "function"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"inputs": [
|
|
132
|
+
{
|
|
133
|
+
"internalType": "address",
|
|
134
|
+
"name": "account",
|
|
135
|
+
"type": "address"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"name": "balanceOf",
|
|
139
|
+
"outputs": [
|
|
140
|
+
{
|
|
141
|
+
"internalType": "uint256",
|
|
142
|
+
"name": "",
|
|
143
|
+
"type": "uint256"
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
"stateMutability": "view",
|
|
147
|
+
"type": "function"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"inputs": [
|
|
151
|
+
{
|
|
152
|
+
"internalType": "uint256",
|
|
153
|
+
"name": "amount",
|
|
154
|
+
"type": "uint256"
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
"name": "burn",
|
|
158
|
+
"outputs": [],
|
|
159
|
+
"stateMutability": "nonpayable",
|
|
160
|
+
"type": "function"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"inputs": [
|
|
164
|
+
{
|
|
165
|
+
"internalType": "address",
|
|
166
|
+
"name": "account",
|
|
167
|
+
"type": "address"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"internalType": "uint256",
|
|
171
|
+
"name": "amount",
|
|
172
|
+
"type": "uint256"
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
"name": "burnFrom",
|
|
176
|
+
"outputs": [],
|
|
177
|
+
"stateMutability": "nonpayable",
|
|
178
|
+
"type": "function"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"inputs": [],
|
|
182
|
+
"name": "decimals",
|
|
183
|
+
"outputs": [
|
|
184
|
+
{
|
|
185
|
+
"internalType": "uint8",
|
|
186
|
+
"name": "",
|
|
187
|
+
"type": "uint8"
|
|
188
|
+
}
|
|
189
|
+
],
|
|
190
|
+
"stateMutability": "view",
|
|
191
|
+
"type": "function"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"inputs": [
|
|
195
|
+
{
|
|
196
|
+
"internalType": "address",
|
|
197
|
+
"name": "spender",
|
|
198
|
+
"type": "address"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"internalType": "uint256",
|
|
202
|
+
"name": "subtractedValue",
|
|
203
|
+
"type": "uint256"
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
"name": "decreaseAllowance",
|
|
207
|
+
"outputs": [
|
|
208
|
+
{
|
|
209
|
+
"internalType": "bool",
|
|
210
|
+
"name": "",
|
|
211
|
+
"type": "bool"
|
|
212
|
+
}
|
|
213
|
+
],
|
|
214
|
+
"stateMutability": "nonpayable",
|
|
215
|
+
"type": "function"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"inputs": [
|
|
219
|
+
{
|
|
220
|
+
"internalType": "address",
|
|
221
|
+
"name": "spender",
|
|
222
|
+
"type": "address"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"internalType": "uint256",
|
|
226
|
+
"name": "addedValue",
|
|
227
|
+
"type": "uint256"
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
"name": "increaseAllowance",
|
|
231
|
+
"outputs": [
|
|
232
|
+
{
|
|
233
|
+
"internalType": "bool",
|
|
234
|
+
"name": "",
|
|
235
|
+
"type": "bool"
|
|
236
|
+
}
|
|
237
|
+
],
|
|
238
|
+
"stateMutability": "nonpayable",
|
|
239
|
+
"type": "function"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"inputs": [
|
|
243
|
+
{
|
|
244
|
+
"internalType": "address",
|
|
245
|
+
"name": "receiver",
|
|
246
|
+
"type": "address"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"internalType": "uint256",
|
|
250
|
+
"name": "amount",
|
|
251
|
+
"type": "uint256"
|
|
252
|
+
}
|
|
253
|
+
],
|
|
254
|
+
"name": "mint",
|
|
255
|
+
"outputs": [],
|
|
256
|
+
"stateMutability": "nonpayable",
|
|
257
|
+
"type": "function"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"inputs": [],
|
|
261
|
+
"name": "name",
|
|
262
|
+
"outputs": [
|
|
263
|
+
{
|
|
264
|
+
"internalType": "string",
|
|
265
|
+
"name": "",
|
|
266
|
+
"type": "string"
|
|
267
|
+
}
|
|
268
|
+
],
|
|
269
|
+
"stateMutability": "view",
|
|
270
|
+
"type": "function"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"inputs": [],
|
|
274
|
+
"name": "symbol",
|
|
275
|
+
"outputs": [
|
|
276
|
+
{
|
|
277
|
+
"internalType": "string",
|
|
278
|
+
"name": "",
|
|
279
|
+
"type": "string"
|
|
280
|
+
}
|
|
281
|
+
],
|
|
282
|
+
"stateMutability": "view",
|
|
283
|
+
"type": "function"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"inputs": [],
|
|
287
|
+
"name": "totalSupply",
|
|
288
|
+
"outputs": [
|
|
289
|
+
{
|
|
290
|
+
"internalType": "uint256",
|
|
291
|
+
"name": "",
|
|
292
|
+
"type": "uint256"
|
|
293
|
+
}
|
|
294
|
+
],
|
|
295
|
+
"stateMutability": "view",
|
|
296
|
+
"type": "function"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"inputs": [
|
|
300
|
+
{
|
|
301
|
+
"internalType": "address",
|
|
302
|
+
"name": "to",
|
|
303
|
+
"type": "address"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"internalType": "uint256",
|
|
307
|
+
"name": "amount",
|
|
308
|
+
"type": "uint256"
|
|
309
|
+
}
|
|
310
|
+
],
|
|
311
|
+
"name": "transfer",
|
|
312
|
+
"outputs": [
|
|
313
|
+
{
|
|
314
|
+
"internalType": "bool",
|
|
315
|
+
"name": "",
|
|
316
|
+
"type": "bool"
|
|
317
|
+
}
|
|
318
|
+
],
|
|
319
|
+
"stateMutability": "nonpayable",
|
|
320
|
+
"type": "function"
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"inputs": [
|
|
324
|
+
{
|
|
325
|
+
"internalType": "address",
|
|
326
|
+
"name": "from",
|
|
327
|
+
"type": "address"
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"internalType": "address",
|
|
331
|
+
"name": "to",
|
|
332
|
+
"type": "address"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"internalType": "uint256",
|
|
336
|
+
"name": "amount",
|
|
337
|
+
"type": "uint256"
|
|
338
|
+
}
|
|
339
|
+
],
|
|
340
|
+
"name": "transferFrom",
|
|
341
|
+
"outputs": [
|
|
342
|
+
{
|
|
343
|
+
"internalType": "bool",
|
|
344
|
+
"name": "",
|
|
345
|
+
"type": "bool"
|
|
346
|
+
}
|
|
347
|
+
],
|
|
348
|
+
"stateMutability": "nonpayable",
|
|
349
|
+
"type": "function"
|
|
350
|
+
}
|
|
351
|
+
],
|
|
352
|
+
"bytecode": "0x60806040523480156200001157600080fd5b506040516200109e3803806200109e8339810160408190526200003491620002f2565b8051819083906200004d9060039060208501906200017f565b508051620000639060049060208401906200017f565b5050600580546001600160a01b0319166001600160a01b038716179055506200008d338462000097565b50505050620003ea565b6001600160a01b038216620000f25760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b806002600082825462000106919062000386565b90915550506001600160a01b038216600090815260208190526040812080548392906200013590849062000386565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b8280546200018d90620003ad565b90600052602060002090601f016020900481019282620001b15760008555620001fc565b82601f10620001cc57805160ff1916838001178555620001fc565b82800160010185558215620001fc579182015b82811115620001fc578251825591602001919060010190620001df565b506200020a9291506200020e565b5090565b5b808211156200020a57600081556001016200020f565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200024d57600080fd5b81516001600160401b03808211156200026a576200026a62000225565b604051601f8301601f19908116603f0116810190828211818310171562000295576200029562000225565b81604052838152602092508683858801011115620002b257600080fd5b600091505b83821015620002d65785820183015181830184015290820190620002b7565b83821115620002e85760008385830101525b9695505050505050565b600080600080608085870312156200030957600080fd5b84516001600160a01b03811681146200032157600080fd5b6020860151604087015191955093506001600160401b03808211156200034657600080fd5b62000354888389016200023b565b935060608701519150808211156200036b57600080fd5b506200037a878288016200023b565b91505092959194509250565b60008219821115620003a857634e487b7160e01b600052601160045260246000fd5b500190565b600181811c90821680620003c257607f821691505b60208210811415620003e457634e487b7160e01b600052602260045260246000fd5b50919050565b610ca480620003fa6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806342966c681161008c57806395d89b411161006657806395d89b41146101db578063a457c2d7146101e3578063a9059cbb146101f6578063dd62ed3e1461020957600080fd5b806342966c681461018c57806370a082311461019f57806379cc6790146101c857600080fd5b806323b872dd116100c857806323b872dd14610142578063313ce56714610155578063395093511461016457806340c10f191461017757600080fd5b806306fdde03146100ef578063095ea7b31461010d57806318160ddd14610130575b600080fd5b6100f7610242565b6040516101049190610aa9565b60405180910390f35b61012061011b366004610b1a565b6102d4565b6040519015158152602001610104565b6002545b604051908152602001610104565b610120610150366004610b44565b6102ec565b60405160128152602001610104565b610120610172366004610b1a565b610310565b61018a610185366004610b1a565b61034f565b005b61018a61019a366004610b80565b61035d565b6101346101ad366004610b99565b6001600160a01b031660009081526020819052604090205490565b61018a6101d6366004610b1a565b61036a565b6100f761037f565b6101206101f1366004610b1a565b61038e565b610120610204366004610b1a565b61043d565b610134610217366004610bbb565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60606003805461025190610bee565b80601f016020809104026020016040519081016040528092919081815260200182805461027d90610bee565b80156102ca5780601f1061029f576101008083540402835291602001916102ca565b820191906000526020600020905b8154815290600101906020018083116102ad57829003601f168201915b5050505050905090565b6000336102e281858561044b565b5060019392505050565b6000336102fa8582856105a4565b610305858585610636565b506001949350505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091906102e2908290869061034a908790610c3f565b61044b565b610359828261084d565b5050565b610367338261092c565b50565b6103758233836105a4565b610359828261092c565b60606004805461025190610bee565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156104305760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610305828686840361044b565b6000336102e2818585610636565b6001600160a01b0383166104c65760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610427565b6001600160a01b0382166105425760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610427565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811461063057818110156106235760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610427565b610630848484840361044b565b50505050565b6001600160a01b0383166106b25760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610427565b6001600160a01b03821661072e5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610427565b6001600160a01b038316600090815260208190526040902054818110156107bd5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610427565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906107f4908490610c3f565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161084091815260200190565b60405180910390a3610630565b6001600160a01b0382166108a35760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610427565b80600260008282546108b59190610c3f565b90915550506001600160a01b038216600090815260208190526040812080548392906108e2908490610c3f565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0382166109a85760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610427565b6001600160a01b03821660009081526020819052604090205481811015610a375760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610427565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610a66908490610c57565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610597565b600060208083528351808285015260005b81811015610ad657858101830151858201604001528201610aba565b81811115610ae8576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114610b1557600080fd5b919050565b60008060408385031215610b2d57600080fd5b610b3683610afe565b946020939093013593505050565b600080600060608486031215610b5957600080fd5b610b6284610afe565b9250610b7060208501610afe565b9150604084013590509250925092565b600060208284031215610b9257600080fd5b5035919050565b600060208284031215610bab57600080fd5b610bb482610afe565b9392505050565b60008060408385031215610bce57600080fd5b610bd783610afe565b9150610be560208401610afe565b90509250929050565b600181811c90821680610c0257607f821691505b60208210811415610c2357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610c5257610c52610c29565b500190565b600082821015610c6957610c69610c29565b50039056fea2646970667358221220ab566c499636c08dc3c840ea13aceee8b1793b4cd17cccaa8c007c24885c8e1964736f6c63430008090033",
|
|
353
|
+
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806342966c681161008c57806395d89b411161006657806395d89b41146101db578063a457c2d7146101e3578063a9059cbb146101f6578063dd62ed3e1461020957600080fd5b806342966c681461018c57806370a082311461019f57806379cc6790146101c857600080fd5b806323b872dd116100c857806323b872dd14610142578063313ce56714610155578063395093511461016457806340c10f191461017757600080fd5b806306fdde03146100ef578063095ea7b31461010d57806318160ddd14610130575b600080fd5b6100f7610242565b6040516101049190610aa9565b60405180910390f35b61012061011b366004610b1a565b6102d4565b6040519015158152602001610104565b6002545b604051908152602001610104565b610120610150366004610b44565b6102ec565b60405160128152602001610104565b610120610172366004610b1a565b610310565b61018a610185366004610b1a565b61034f565b005b61018a61019a366004610b80565b61035d565b6101346101ad366004610b99565b6001600160a01b031660009081526020819052604090205490565b61018a6101d6366004610b1a565b61036a565b6100f761037f565b6101206101f1366004610b1a565b61038e565b610120610204366004610b1a565b61043d565b610134610217366004610bbb565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60606003805461025190610bee565b80601f016020809104026020016040519081016040528092919081815260200182805461027d90610bee565b80156102ca5780601f1061029f576101008083540402835291602001916102ca565b820191906000526020600020905b8154815290600101906020018083116102ad57829003601f168201915b5050505050905090565b6000336102e281858561044b565b5060019392505050565b6000336102fa8582856105a4565b610305858585610636565b506001949350505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091906102e2908290869061034a908790610c3f565b61044b565b610359828261084d565b5050565b610367338261092c565b50565b6103758233836105a4565b610359828261092c565b60606004805461025190610bee565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156104305760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610305828686840361044b565b6000336102e2818585610636565b6001600160a01b0383166104c65760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610427565b6001600160a01b0382166105425760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610427565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811461063057818110156106235760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610427565b610630848484840361044b565b50505050565b6001600160a01b0383166106b25760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610427565b6001600160a01b03821661072e5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610427565b6001600160a01b038316600090815260208190526040902054818110156107bd5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610427565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906107f4908490610c3f565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161084091815260200190565b60405180910390a3610630565b6001600160a01b0382166108a35760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610427565b80600260008282546108b59190610c3f565b90915550506001600160a01b038216600090815260208190526040812080548392906108e2908490610c3f565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0382166109a85760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610427565b6001600160a01b03821660009081526020819052604090205481811015610a375760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610427565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610a66908490610c57565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610597565b600060208083528351808285015260005b81811015610ad657858101830151858201604001528201610aba565b81811115610ae8576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114610b1557600080fd5b919050565b60008060408385031215610b2d57600080fd5b610b3683610afe565b946020939093013593505050565b600080600060608486031215610b5957600080fd5b610b6284610afe565b9250610b7060208501610afe565b9150604084013590509250925092565b600060208284031215610b9257600080fd5b5035919050565b600060208284031215610bab57600080fd5b610bb482610afe565b9392505050565b60008060408385031215610bce57600080fd5b610bd783610afe565b9150610be560208401610afe565b90509250929050565b600181811c90821680610c0257607f821691505b60208210811415610c2357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610c5257610c52610c29565b500190565b600082821015610c6957610c69610c29565b50039056fea2646970667358221220ab566c499636c08dc3c840ea13aceee8b1793b4cd17cccaa8c007c24885c8e1964736f6c63430008090033",
|
|
354
|
+
"linkReferences": {},
|
|
355
|
+
"deployedLinkReferences": {}
|
|
356
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Encryption } from "@super-protocol/dto-js";
|
|
3
|
+
import fs from "fs";
|
|
4
|
+
declare class Crypto {
|
|
5
|
+
/**
|
|
6
|
+
* Used to encrypt data before sending it to blockchain
|
|
7
|
+
* @param algorithm - encryption algorithm
|
|
8
|
+
* @param content - string data to encrypt
|
|
9
|
+
* @param key - key in string format (default encoding base64)
|
|
10
|
+
* @param encoding - encoding of key and output data
|
|
11
|
+
* @return {Promise<Encryption>} - object what contains encrypted data, key and spec to decryption
|
|
12
|
+
*/
|
|
13
|
+
static encrypt(content: string, encryption: Encryption): Promise<Encryption>;
|
|
14
|
+
/**
|
|
15
|
+
* Encrypts data stream
|
|
16
|
+
* @param inputStream - path to file that will be encrypted
|
|
17
|
+
* @param outputStream - place where it will be saved
|
|
18
|
+
* @param algorithm - file encryption algorithm
|
|
19
|
+
* @param key – key that will be used to encrypt data
|
|
20
|
+
* @return {Promise<Encryption>} - encryption info
|
|
21
|
+
*/
|
|
22
|
+
static encryptStream(inputStream: fs.ReadStream, outputStream: fs.WriteStream, encryption: Encryption): Promise<Encryption>;
|
|
23
|
+
/**
|
|
24
|
+
* Used to decrypt data from blockchain
|
|
25
|
+
* @param encryption - object what contains encrypted data, key and spec to decryption
|
|
26
|
+
* @return {Promise<string>} - decrypted string
|
|
27
|
+
*/
|
|
28
|
+
static decrypt(encryption: Encryption): Promise<string>;
|
|
29
|
+
/**
|
|
30
|
+
* Decrypts data stream
|
|
31
|
+
* @param inputStream - stream with data to decrypt
|
|
32
|
+
* @param outputStream - stream where the decrypted data will be written
|
|
33
|
+
* @param encryption – encryption info
|
|
34
|
+
*/
|
|
35
|
+
static decryptStream(inputStream: fs.ReadStream, outputStream: fs.WriteStream, encryption: Encryption): Promise<void>;
|
|
36
|
+
}
|
|
37
|
+
export default Crypto;
|