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:AAIDAAAAAAAAAAAAAAArAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAABAAAADGdldEJvb2xCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGwAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAHQm9vbGVhbgQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQcBAAAAGGdldE51bWJlckJ5QWRkcmVzc0FuZEtleQAAAAIAAAAHYWRkcmVzcwAAAANrZXkEAAAAByR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UAAAAGcHJvZml0BQAAAA9uZXV0cmlub0Fzc2V0SWQFAAAAA25pbAAAAAD1nWY0", "chainId": 84, "height": 713662, "spentComplexity": 0 } View: original | compacted Prev: 2tQEmTBPPmdfkYjSy6sWrb7hpbBVDYdoWSHXpTZ9p6So Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getNumberByKey (key) = match getInteger(this, key) {
55 case a: Int =>
66 a
77 case _ =>
88 0
99 }
1010
1111
1212 func getStringByKey (key) = match getString(this, key) {
1313 case a: String =>
1414 a
1515 case _ =>
1616 ""
1717 }
1818
1919
2020 func getBoolByKey (key) = match getBoolean(this, key) {
2121 case a: Boolean =>
2222 a
2323 case _ =>
2424 false
2525 }
2626
2727
2828 func getNumberByAddressAndKey (address,key) = match getInteger(addressFromStringValue(address), key) {
2929 case a: Int =>
3030 a
3131 case _ =>
3232 0
3333 }
3434
3535
3636 func getStringByAddressAndKey (address,key) = match getString(addressFromStringValue(address), key) {
3737 case a: String =>
3838 a
3939 case _ =>
4040 ""
4141 }
4242
4343
4444 let LISTSPLITSYMBOL = "_"
4545
4646 let PERCENTACCURACY = 10000
4747
4848 let NeutrinoAssetIdKey = "neutrino_asset_id"
4949
5050 let NeutrinoContractKey = "neutrino_contract"
5151
5252 let NodeAddressKey = "node_address"
5353
5454 let BalanceKey = "rpd_balance"
5555
5656 let SyncIndexKey = "rpd_sync_index"
5757
5858 let ProfitKey = "rpd_profit"
5959
6060 let BalanceHistoryKey = "balance_history"
6161
6262 let IsClaimedKey = "is_claimed"
6363
6464 let ApprovedLeaseTxKey = "leasetx"
6565
6666 let ApprovedLeaseAmountKey = "leasetx_amount"
6767
6868 func getUserBalanceHistoryKey (owner) = ((BalanceHistoryKey + "_") + owner)
6969
7070
7171 func getUserBalanceKey (owner,assetId) = ((((BalanceKey + "_") + assetId) + "_") + owner)
7272
7373
7474 func getUserBalanceKeyByCount (owner,count,assetId) = ((getUserBalanceKey(owner, assetId) + "_") + toString(count))
7575
7676
7777 func getIsClaimedKey (owner,count) = ((((IsClaimedKey + "_") + owner) + "_") + toString(count))
7878
7979
8080 func getApprovedLeaseTxByOwnerKey (owner) = ((ApprovedLeaseTxKey + "_") + owner)
8181
8282
8383 func getOwnerPubKeyByLeaseTxIdKey (txId) = ((ApprovedLeaseTxKey + "_") + txId)
8484
8585
8686 func getApprovedLeaseAmountByOwnerKey (owner) = ((ApprovedLeaseAmountKey + "_") + owner)
8787
8888
8989 func getContractBalanceKey (assetId) = ((BalanceKey + "_") + assetId)
9090
9191
9292 func getSnapshotContractBalanceKey (count,assetId) = ((((BalanceKey + "_") + assetId) + "_") + toString(count))
9393
9494
9595 func getProfitKey (count) = ((ProfitKey + "_") + toString(count))
9696
9797
9898 func getApprovedLeaseTxByOwner (owner) = getStringByKey(getApprovedLeaseTxByOwnerKey(owner))
9999
100100
101101 func getApprovedLeaseAmountByOwner (owner) = getNumberByKey(getApprovedLeaseAmountByOwnerKey(owner))
102102
103103
104104 func getOwnerPubKeyByLeaseTxId (txId) = getStringByKey(getOwnerPubKeyByLeaseTxIdKey(txId))
105105
106106
107107 let nodeAddress = getStringByKey(NodeAddressKey)
108108
109109 let neutrinoContract = getStringByKey(NeutrinoContractKey)
110110
111111 let neutrinoAssetId = fromBase58String(getStringByAddressAndKey(neutrinoContract, NeutrinoAssetIdKey))
112112
113113 let syncIndex = getNumberByAddressAndKey(neutrinoContract, SyncIndexKey)
114114
115115 func getContractBalance (assetId) = getNumberByKey(getContractBalanceKey(assetId))
116116
117117
118118 func getSnapshotContractBalance (count,assetId) = getNumberByAddressAndKey(neutrinoContract, getSnapshotContractBalanceKey(count, assetId))
119119
120120
121121 func getProfit (count) = getNumberByAddressAndKey(neutrinoContract, getProfitKey(count))
122122
123123
124124 func getUserBalance (owner,assetId) = getNumberByKey(getUserBalanceKey(owner, assetId))
125125
126126
127127 func getUserBalanceByCount (owner,count,assetId) = getNumberByKey(getUserBalanceKeyByCount(owner, count, assetId))
128128
129129
130130 func getUserBalanceHistory (owner) = getStringByKey(getUserBalanceHistoryKey(owner))
131131
132132
133133 func isClaimed (owner,count) = getBoolByKey(getIsClaimedKey(owner, count))
134134
135135
136136 func getHistoryElement (count) = (toString(count) + LISTSPLITSYMBOL)
137137
138138
139139 func addBalanceHistory (history,element) = (history + element)
140140
141141
142142 @Callable(i)
143143 func lockNeutrino () = {
144144 let pmt = extract(i.payment)
145145 if ((pmt.assetId != neutrinoAssetId))
146146 then throw("can use neutrino")
147147 else {
148148 let account = toString(i.caller)
149149 let assetIdString = toBase58String(value(pmt.assetId))
150150 let balance = (getUserBalance(account, assetIdString) + pmt.amount)
151151 let historyString = getUserBalanceHistory(account)
152152 let history = split(historyString, LISTSPLITSYMBOL)
153153 let index = (size(history) - 2)
154154 let newHistory = if (if ((historyString != ""))
155155 then (parseIntValue(history[index]) == syncIndex)
156156 else false)
157157 then historyString
158158 else addBalanceHistory(historyString, getHistoryElement(syncIndex))
159159 WriteSet([DataEntry(getContractBalanceKey(assetIdString), (getContractBalance(assetIdString) + pmt.amount)), DataEntry(getUserBalanceKey(account, assetIdString), balance), DataEntry(getUserBalanceKeyByCount(account, syncIndex, assetIdString), balance), DataEntry(getUserBalanceHistoryKey(account), newHistory)])
160160 }
161161 }
162162
163163
164164
165165 @Callable(i)
166166 func registrationLeaseTx (amount,fee,timestamp,proof) = {
167167 let addressPubKey = i.callerPublicKey
168168 let address = toString(i.caller)
169169 let txBytes = (((((base58'3h1H' + fromBase58String(neutrinoContract)) + fromBase58String(nodeAddress)) + toBytes(amount)) + toBytes(fee)) + toBytes(timestamp))
170170 let isValid = sigVerify(txBytes, fromBase58String(proof), addressPubKey)
171171 let balance = getUserBalance(address, toBase58String(neutrinoAssetId))
172172 if (!(isValid))
173173 then throw("sign is not valid")
174174 else if ((fee > 500000))
175175 then throw("invalid fee")
176176 else if (if ((amount != balance))
177177 then true
178178 else (amount == 0))
179179 then throw("invalid amount")
180180 else if ((getApprovedLeaseTxByOwner(address) != ""))
181181 then throw("leaseTx is exist")
182182 else {
183183 let txHash = toBase58String(blake2b256(txBytes))
184184 WriteSet([DataEntry(getApprovedLeaseTxByOwnerKey(address), txHash), DataEntry(getApprovedLeaseAmountByOwnerKey(address), balance), DataEntry(getOwnerPubKeyByLeaseTxId(txHash), addressPubKey)])
185185 }
186186 }
187187
188188
189189
190190 @Callable(i)
191191 func registrationUnleaseTx (chainIdBase64,fee,timestamp,proof) = {
192192 let addressPubKey = i.callerPublicKey
193193 let address = toString(i.caller)
194194 let leaseTxHash = getApprovedLeaseTxByOwner(address)
195195 let txBytes = (((((base58'gm' + fromBase64String(chainIdBase64)) + fromBase58String(neutrinoContract)) + toBytes(fee)) + toBytes(timestamp)) + fromBase58String(leaseTxHash))
196196 let isValid = sigVerify(txBytes, fromBase58String(proof), addressPubKey)
197197 let txHash = blake2b256(txBytes)
198198 if (!(isValid))
199199 then throw("sign is not valid")
200200 else if ((transactionHeightById(txHash) == 0))
201201 then throw("blockchain does not contain this transaction")
202202 else if ((fee > 500000))
203203 then throw("invalid fee")
204204 else if ((getApprovedLeaseTxByOwner(address) != ""))
205205 then throw("leaseTx is exist")
206206 else WriteSet([DataEntry(getApprovedLeaseTxByOwnerKey(address), ""), DataEntry(getApprovedLeaseAmountByOwnerKey(address), 0)])
207207 }
208208
209209
210210
211211 @Callable(i)
212212 func unlockNeutrino (unlockAmount,assetIdString) = {
213213 let account = toString(i.caller)
214214 let assetId = fromBase58String(assetIdString)
215215 let balance = (getUserBalance(account, assetIdString) - unlockAmount)
216216 let availableBalance = (balance - getApprovedLeaseAmountByOwner(account))
217217 if ((0 > availableBalance))
218218 then throw("invalid amount")
219219 else if ((assetId != neutrinoAssetId))
220220 then throw("can use neutrino")
221221 else {
222222 let historyString = getUserBalanceHistory(account)
223223 let history = split(historyString, LISTSPLITSYMBOL)
224224 let index = (size(history) - 2)
225225 let newHistory = if (if ((historyString != ""))
226226 then (parseIntValue(history[index]) == syncIndex)
227227 else false)
228228 then historyString
229229 else addBalanceHistory(historyString, getHistoryElement(syncIndex))
230230 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)]))
231231 }
232232 }
233233
234234
235235
236236 @Callable(i)
237237 func withdraw (profitSyncIndex,historyIndex) = {
238238 let account = toString(i.caller)
239239 let historyString = getUserBalanceHistory(account)
240240 let history = split(historyString, LISTSPLITSYMBOL)
241241 let lockActual = parseIntValue(history[historyIndex])
242242 if (isClaimed(account, profitSyncIndex))
243243 then throw(("account is claimed rpd_count:" + toString(profitSyncIndex)))
244244 else if (if ((lockActual > profitSyncIndex))
245245 then true
246246 else if ((size(history) > (historyIndex + 2)))
247247 then (profitSyncIndex >= parseIntValue(history[(historyIndex + 1)]))
248248 else false)
249249 then throw("invalid history index")
250250 else {
251251 let neutrinoAssetIdString = toBase58String(neutrinoAssetId)
252252 let balance = getUserBalanceByCount(account, lockActual, neutrinoAssetIdString)
253253 let sharePercent = (((balance * PERCENTACCURACY) * 100) / getSnapshotContractBalance(profitSyncIndex, neutrinoAssetIdString))
254254 let profit = (((sharePercent * getProfit(profitSyncIndex)) / 100) / PERCENTACCURACY)
255255 ScriptResult(WriteSet([DataEntry(getIsClaimedKey(account, profitSyncIndex), true)]), TransferSet([ScriptTransfer(addressFromStringValue(account), profit, neutrinoAssetId)]))
256256 }
257257 }
258258
259259

github/deemru/w8io/026f985 
69.65 ms