tx · 5SK4p1x2EHngCfHPjcQTPDFfouJkr4W2Dx9SxYzqMTG9 3NASpBKQc8WXK6SAyvfbtuE2kwiJkY21tAS: -0.01400000 Waves 2019.10.10 13:59 [713662] smart account 3NASpBKQc8WXK6SAyvfbtuE2kwiJkY21tAS > SELF 0.00000000 Waves
{ "type": 13, "id": "5SK4p1x2EHngCfHPjcQTPDFfouJkr4W2Dx9SxYzqMTG9", "fee": 1400000, "feeAssetId": null, "timestamp": 1570705184683, "version": 1, "sender": "3NASpBKQc8WXK6SAyvfbtuE2kwiJkY21tAS", "senderPublicKey": "G5sPQotxGaroKXnhfRbWXoGgBponD7RQFH4bg1PS9mJE", "proofs": [ "5rQBZC6vGxoETJ9Jt8zQ1rkZa4uHc3it3XkHVEbJRrWsvDPTxotwx8Lpo821WUQwfzBMTZPZB5BVyyskeJGF5Fkt" ], "script": "base64:AAIDAAAAAAAAAAAAAAArAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAABAAAADGdldEJvb2xCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGwAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAHQm9vbGVhbgQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQcBAAAAGGdldE51bWJlckJ5QWRkcmVzc0FuZEtleQAAAAIAAAAHYWRkcmVzcwAAAANrZXkEAAAAByRt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AAAAGcHJvZml0BQAAAA9uZXV0cmlub0Fzc2V0SWQFAAAAA25pbAAAAAD1nWY0", "chainId": 84, "height": 713662, "spentComplexity": 0 } View: original | compacted Prev: 2tQEmTBPPmdfkYjSy6sWrb7hpbBVDYdoWSHXpTZ9p6So Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getNumberByKey (key) = match getInteger(this, key) { | |
5 | 5 | case a: Int => | |
6 | 6 | a | |
7 | 7 | case _ => | |
8 | 8 | 0 | |
9 | 9 | } | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func getStringByKey (key) = match getString(this, key) { | |
13 | 13 | case a: String => | |
14 | 14 | a | |
15 | 15 | case _ => | |
16 | 16 | "" | |
17 | 17 | } | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func getBoolByKey (key) = match getBoolean(this, key) { | |
21 | 21 | case a: Boolean => | |
22 | 22 | a | |
23 | 23 | case _ => | |
24 | 24 | false | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func getNumberByAddressAndKey (address,key) = match getInteger(addressFromStringValue(address), key) { | |
29 | 29 | case a: Int => | |
30 | 30 | a | |
31 | 31 | case _ => | |
32 | 32 | 0 | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func getStringByAddressAndKey (address,key) = match getString(addressFromStringValue(address), key) { | |
37 | 37 | case a: String => | |
38 | 38 | a | |
39 | 39 | case _ => | |
40 | 40 | "" | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | let LISTSPLITSYMBOL = "_" | |
45 | 45 | ||
46 | 46 | let PERCENTACCURACY = 10000 | |
47 | 47 | ||
48 | 48 | let NeutrinoAssetIdKey = "neutrino_asset_id" | |
49 | 49 | ||
50 | 50 | let NeutrinoContractKey = "neutrino_contract" | |
51 | 51 | ||
52 | 52 | let NodeAddressKey = "node_address" | |
53 | 53 | ||
54 | 54 | let BalanceKey = "rpd_balance" | |
55 | 55 | ||
56 | 56 | let SyncIndexKey = "rpd_sync_index" | |
57 | 57 | ||
58 | 58 | let ProfitKey = "rpd_profit" | |
59 | 59 | ||
60 | 60 | let BalanceHistoryKey = "balance_history" | |
61 | 61 | ||
62 | 62 | let IsClaimedKey = "is_claimed" | |
63 | 63 | ||
64 | 64 | let ApprovedLeaseTxKey = "leasetx" | |
65 | 65 | ||
66 | 66 | let ApprovedLeaseAmountKey = "leasetx_amount" | |
67 | 67 | ||
68 | 68 | func getUserBalanceHistoryKey (owner) = ((BalanceHistoryKey + "_") + owner) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func getUserBalanceKey (owner,assetId) = ((((BalanceKey + "_") + assetId) + "_") + owner) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func getUserBalanceKeyByCount (owner,count,assetId) = ((getUserBalanceKey(owner, assetId) + "_") + toString(count)) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func getIsClaimedKey (owner,count) = ((((IsClaimedKey + "_") + owner) + "_") + toString(count)) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func getApprovedLeaseTxByOwnerKey (owner) = ((ApprovedLeaseTxKey + "_") + owner) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func getOwnerPubKeyByLeaseTxIdKey (txId) = ((ApprovedLeaseTxKey + "_") + txId) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func getApprovedLeaseAmountByOwnerKey (owner) = ((ApprovedLeaseAmountKey + "_") + owner) | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func getContractBalanceKey (assetId) = ((BalanceKey + "_") + assetId) | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func getSnapshotContractBalanceKey (count,assetId) = ((((BalanceKey + "_") + assetId) + "_") + toString(count)) | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func getProfitKey (count) = ((ProfitKey + "_") + toString(count)) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func getApprovedLeaseTxByOwner (owner) = getStringByKey(getApprovedLeaseTxByOwnerKey(owner)) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func getApprovedLeaseAmountByOwner (owner) = getNumberByKey(getApprovedLeaseAmountByOwnerKey(owner)) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func getOwnerPubKeyByLeaseTxId (txId) = getStringByKey(getOwnerPubKeyByLeaseTxIdKey(txId)) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | let nodeAddress = getStringByKey(NodeAddressKey) | |
108 | 108 | ||
109 | 109 | let neutrinoContract = getStringByKey(NeutrinoContractKey) | |
110 | 110 | ||
111 | 111 | let neutrinoAssetId = fromBase58String(getStringByAddressAndKey(neutrinoContract, NeutrinoAssetIdKey)) | |
112 | 112 | ||
113 | 113 | let syncIndex = getNumberByAddressAndKey(neutrinoContract, SyncIndexKey) | |
114 | 114 | ||
115 | 115 | func getContractBalance (assetId) = getNumberByKey(getContractBalanceKey(assetId)) | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func getSnapshotContractBalance (count,assetId) = getNumberByAddressAndKey(neutrinoContract, getSnapshotContractBalanceKey(count, assetId)) | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func getProfit (count) = getNumberByAddressAndKey(neutrinoContract, getProfitKey(count)) | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func getUserBalance (owner,assetId) = getNumberByKey(getUserBalanceKey(owner, assetId)) | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func getUserBalanceByCount (owner,count,assetId) = getNumberByKey(getUserBalanceKeyByCount(owner, count, assetId)) | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func getUserBalanceHistory (owner) = getStringByKey(getUserBalanceHistoryKey(owner)) | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func isClaimed (owner,count) = getBoolByKey(getIsClaimedKey(owner, count)) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func getHistoryElement (count) = (toString(count) + LISTSPLITSYMBOL) | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func addBalanceHistory (history,element) = (history + element) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | @Callable(i) | |
143 | 143 | func lockNeutrino () = { | |
144 | 144 | let pmt = extract(i.payment) | |
145 | 145 | if ((pmt.assetId != neutrinoAssetId)) | |
146 | 146 | then throw("can use neutrino") | |
147 | 147 | else { | |
148 | 148 | let account = toString(i.caller) | |
149 | 149 | let assetIdString = toBase58String(value(pmt.assetId)) | |
150 | 150 | let balance = (getUserBalance(account, assetIdString) + pmt.amount) | |
151 | 151 | let historyString = getUserBalanceHistory(account) | |
152 | 152 | let history = split(historyString, LISTSPLITSYMBOL) | |
153 | 153 | let index = (size(history) - 2) | |
154 | 154 | let newHistory = if (if ((historyString != "")) | |
155 | 155 | then (parseIntValue(history[index]) == syncIndex) | |
156 | 156 | else false) | |
157 | 157 | then historyString | |
158 | 158 | else addBalanceHistory(historyString, getHistoryElement(syncIndex)) | |
159 | 159 | WriteSet([DataEntry(getContractBalanceKey(assetIdString), (getContractBalance(assetIdString) + pmt.amount)), DataEntry(getUserBalanceKey(account, assetIdString), balance), DataEntry(getUserBalanceKeyByCount(account, syncIndex, assetIdString), balance), DataEntry(getUserBalanceHistoryKey(account), newHistory)]) | |
160 | 160 | } | |
161 | 161 | } | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | ||
165 | 165 | @Callable(i) | |
166 | 166 | func registrationLeaseTx (amount,fee,timestamp,proof) = { | |
167 | 167 | let addressPubKey = i.callerPublicKey | |
168 | 168 | let address = toString(i.caller) | |
169 | 169 | let txBytes = (((((base58'3h1H' + fromBase58String(neutrinoContract)) + fromBase58String(nodeAddress)) + toBytes(amount)) + toBytes(fee)) + toBytes(timestamp)) | |
170 | 170 | let isValid = sigVerify(txBytes, fromBase58String(proof), addressPubKey) | |
171 | 171 | let balance = getUserBalance(address, toBase58String(neutrinoAssetId)) | |
172 | 172 | if (!(isValid)) | |
173 | 173 | then throw("sign is not valid") | |
174 | 174 | else if ((fee > 500000)) | |
175 | 175 | then throw("invalid fee") | |
176 | 176 | else if (if ((amount != balance)) | |
177 | 177 | then true | |
178 | 178 | else (amount == 0)) | |
179 | 179 | then throw("invalid amount") | |
180 | 180 | else if ((getApprovedLeaseTxByOwner(address) != "")) | |
181 | 181 | then throw("leaseTx is exist") | |
182 | 182 | else { | |
183 | 183 | let txHash = toBase58String(blake2b256(txBytes)) | |
184 | 184 | WriteSet([DataEntry(getApprovedLeaseTxByOwnerKey(address), txHash), DataEntry(getApprovedLeaseAmountByOwnerKey(address), balance), DataEntry(getOwnerPubKeyByLeaseTxId(txHash), addressPubKey)]) | |
185 | 185 | } | |
186 | 186 | } | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | ||
190 | 190 | @Callable(i) | |
191 | 191 | func registrationUnleaseTx (chainIdBase64,fee,timestamp,proof) = { | |
192 | 192 | let addressPubKey = i.callerPublicKey | |
193 | 193 | let address = toString(i.caller) | |
194 | 194 | let leaseTxHash = getApprovedLeaseTxByOwner(address) | |
195 | 195 | let txBytes = (((((base58'gm' + fromBase64String(chainIdBase64)) + fromBase58String(neutrinoContract)) + toBytes(fee)) + toBytes(timestamp)) + fromBase58String(leaseTxHash)) | |
196 | 196 | let isValid = sigVerify(txBytes, fromBase58String(proof), addressPubKey) | |
197 | 197 | let txHash = blake2b256(txBytes) | |
198 | 198 | if (!(isValid)) | |
199 | 199 | then throw("sign is not valid") | |
200 | 200 | else if ((transactionHeightById(txHash) == 0)) | |
201 | 201 | then throw("blockchain does not contain this transaction") | |
202 | 202 | else if ((fee > 500000)) | |
203 | 203 | then throw("invalid fee") | |
204 | 204 | else if ((getApprovedLeaseTxByOwner(address) != "")) | |
205 | 205 | then throw("leaseTx is exist") | |
206 | 206 | else WriteSet([DataEntry(getApprovedLeaseTxByOwnerKey(address), ""), DataEntry(getApprovedLeaseAmountByOwnerKey(address), 0)]) | |
207 | 207 | } | |
208 | 208 | ||
209 | 209 | ||
210 | 210 | ||
211 | 211 | @Callable(i) | |
212 | 212 | func unlockNeutrino (unlockAmount,assetIdString) = { | |
213 | 213 | let account = toString(i.caller) | |
214 | 214 | let assetId = fromBase58String(assetIdString) | |
215 | 215 | let balance = (getUserBalance(account, assetIdString) - unlockAmount) | |
216 | 216 | let availableBalance = (balance - getApprovedLeaseAmountByOwner(account)) | |
217 | 217 | if ((0 > availableBalance)) | |
218 | 218 | then throw("invalid amount") | |
219 | 219 | else if ((assetId != neutrinoAssetId)) | |
220 | 220 | then throw("can use neutrino") | |
221 | 221 | else { | |
222 | 222 | let historyString = getUserBalanceHistory(account) | |
223 | 223 | let history = split(historyString, LISTSPLITSYMBOL) | |
224 | 224 | let index = (size(history) - 2) | |
225 | 225 | let newHistory = if (if ((historyString != "")) | |
226 | 226 | then (parseIntValue(history[index]) == syncIndex) | |
227 | 227 | else false) | |
228 | 228 | then historyString | |
229 | 229 | else addBalanceHistory(historyString, getHistoryElement(syncIndex)) | |
230 | 230 | ScriptResult(WriteSet([DataEntry(BalanceKey, (getContractBalance(assetIdString) - unlockAmount)), DataEntry(getUserBalanceKey(account, assetIdString), balance), DataEntry(getUserBalanceKeyByCount(account, syncIndex, assetIdString), balance), DataEntry(getUserBalanceHistoryKey(account), newHistory)]), TransferSet([ScriptTransfer(addressFromStringValue(account), unlockAmount, neutrinoAssetId)])) | |
231 | 231 | } | |
232 | 232 | } | |
233 | 233 | ||
234 | 234 | ||
235 | 235 | ||
236 | 236 | @Callable(i) | |
237 | 237 | func withdraw (profitSyncIndex,historyIndex) = { | |
238 | 238 | let account = toString(i.caller) | |
239 | 239 | let historyString = getUserBalanceHistory(account) | |
240 | 240 | let history = split(historyString, LISTSPLITSYMBOL) | |
241 | 241 | let lockActual = parseIntValue(history[historyIndex]) | |
242 | 242 | if (isClaimed(account, profitSyncIndex)) | |
243 | 243 | then throw(("account is claimed rpd_count:" + toString(profitSyncIndex))) | |
244 | 244 | else if (if ((lockActual > profitSyncIndex)) | |
245 | 245 | then true | |
246 | 246 | else if ((size(history) > (historyIndex + 2))) | |
247 | 247 | then (profitSyncIndex >= parseIntValue(history[(historyIndex + 1)])) | |
248 | 248 | else false) | |
249 | 249 | then throw("invalid history index") | |
250 | 250 | else { | |
251 | 251 | let neutrinoAssetIdString = toBase58String(neutrinoAssetId) | |
252 | 252 | let balance = getUserBalanceByCount(account, lockActual, neutrinoAssetIdString) | |
253 | 253 | let sharePercent = (((balance * PERCENTACCURACY) * 100) / getSnapshotContractBalance(profitSyncIndex, neutrinoAssetIdString)) | |
254 | 254 | let profit = (((sharePercent * getProfit(profitSyncIndex)) / 100) / PERCENTACCURACY) | |
255 | 255 | ScriptResult(WriteSet([DataEntry(getIsClaimedKey(account, profitSyncIndex), true)]), TransferSet([ScriptTransfer(addressFromStringValue(account), profit, neutrinoAssetId)])) | |
256 | 256 | } | |
257 | 257 | } | |
258 | 258 | ||
259 | 259 |
github/deemru/w8io/026f985 69.65 ms ◑