tx · 3Q8evJbcK48633poZiLHXCgGrwY1ghJaPPBGyCVVVStd

3ND7koq1CpoHCrLv833dEWPcC8ygda22q3n:  -0.01400000 Waves

2021.10.28 23:26 [1766640] smart account 3ND7koq1CpoHCrLv833dEWPcC8ygda22q3n > SELF 0.00000000 Waves

{ "type": 13, "id": "3Q8evJbcK48633poZiLHXCgGrwY1ghJaPPBGyCVVVStd", "fee": 1400000, "feeAssetId": null, "timestamp": 1635452804132, "version": 2, "chainId": 84, "sender": "3ND7koq1CpoHCrLv833dEWPcC8ygda22q3n", "senderPublicKey": "5jZ49iFWx2PFcwiMSEcqEgkXUebfs8Cn4P2H8nzenoPt", "proofs": [ "5pxG69aAnZjYYUvidyFXtcFDt6SyyrQ13nJ7CK4HXr2HrUyZzNvsPsB3unNis8Kd4t4budB9AHzYNXDACC2tjHKP" ], "script": "base64:AAIEAAAAAAAAADgIAhIDCgEIEgMKAQESAwoBARIECgIIARIHCgUICAEBCBIECgIIARIECgIIARIDCgEIEgMKAQgSAAAAABkAAAAADm9yZGVyU3RhdHVzTmV3AgAAAANORVcAAAAADm9yZGVyU3RhdHVzV0lQAgAAAANXSVAAAAAAD29yZGVyU3RhdHVzRG9uZQIAAAAERE9ORQEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAAGbnVtYmVyBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABQAAAAZudW1iZXIAAAAABE5PTkUCAAAABG5vbmUBAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkEAAAABnN0cmluZwQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQUAAAAETk9ORQUAAA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AADXBheW1lbnRBbW91bnQEAAAADXRyYW5zYWN0aW9uSWQJAQAAABJieXRlVmVjdG9yVG9TdHJpbmcAAAABCAUAAAABaQAAAA10cmFuc2FjdGlvbklkBAAAAAlvcmRlckRhdGEJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAABewIAAAALImFzc2V0SWQiOiIFAAAAB2Fzc2V0SWQCAAAAAiIsAgAAAAoiYW1vdW50IjoiBQAAAAZhbW91bnQCAAAAAiIsAgAAAA8idXNlckFkZHJlc3MiOiIFAAAAC3VzZXJBZGRyZXNzAgAAAAIiLAIAAAARInRyYW5zYWN0aW9uSWQiOiIFAAAADXRyYW5zYWN0aW9uSWQCAAAAAiIsAgAAAAoic3RhdHVzIjoiBQAAAA5vcmRlclN0YXR1c05ldwIAAAABIgIAAAABfQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAAPZ2V0T3JkZXJEYXRhS2V5AAAAAAUAAAAJb3JkZXJEYXRhCQAETAAAAAIJAQAAAARCdXJuAAAAAgUAAAAOcGF5bWVudEFzc2V0SWQFAAAADXBheW1lbnRBbW91bnQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5caHGyA==", "height": 1766640, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: UaYfXpGPW1ZFbZ9i2gHtgUZz619DnCU5bb6V74bCjGh Next: JBwrFdqrkUdtnmwouWenYpmB8r4PM4k2znoZXthzRAE3 Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let orderStatusNew = "NEW"
5+
6+let orderStatusWIP = "WIP"
7+
8+let orderStatusDone = "DONE"
9+
410 func getNumberByKey (key) = {
511 let number = match getInteger(this, key) {
612 case a: Int =>
4854 func stringToByteVector (string) = fromBase58String(string)
4955
5056
57+func intToString (integer) = toString(integer)
58+
59+
5160 func isAdmin (caller) = (this == caller)
5261
5362
7988
8089
8190 func getAssetDataValue (assetId) = getStringByKey(getAssetPriceKey(assetId))
91+
92+
93+func getOrderDataKey () = (("order_<" + "assetId") + ">_data")
94+
95+
96+func getOrderDataValue () = getStringByKey(getOrderDataKey())
8297
8398
8499 @Callable(i)
225240 }
226241
227242
243+
244+@Callable(i)
245+func requestReward () = {
246+ let payments = i.payments
247+ if ((size(payments) == 0))
248+ then throw("You need to attach the payment")
249+ else {
250+ let paymentAssetId = value(payments[0].assetId)
251+ let paymentAmount = payments[0].amount
252+ let assetId = byteVectorToString(paymentAssetId)
253+ let userAddress = addressToString(i.caller)
254+ let amount = intToString(paymentAmount)
255+ let transactionId = byteVectorToString(i.transactionId)
256+ let orderData = (((((((((((((((("{" + "\"assetId\":\"") + assetId) + "\",") + "\"amount\":\"") + amount) + "\",") + "\"userAddress\":\"") + userAddress) + "\",") + "\"transactionId\":\"") + transactionId) + "\",") + "\"status\":\"") + orderStatusNew) + "\"") + "}")
257+[StringEntry(getOrderDataKey(), orderData), Burn(paymentAssetId, paymentAmount)]
258+ }
259+ }
260+
261+
228262 @Verifier(tx)
229263 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
230264
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let orderStatusNew = "NEW"
5+
6+let orderStatusWIP = "WIP"
7+
8+let orderStatusDone = "DONE"
9+
410 func getNumberByKey (key) = {
511 let number = match getInteger(this, key) {
612 case a: Int =>
713 a
814 case _ =>
915 0
1016 }
1117 number
1218 }
1319
1420
1521 let NONE = "none"
1622
1723 func getStringByKey (key) = {
1824 let string = match getString(this, key) {
1925 case a: String =>
2026 a
2127 case _ =>
2228 NONE
2329 }
2430 string
2531 }
2632
2733
2834 func getBooleanByKey (key) = {
2935 let boolean = match getBoolean(this, key) {
3036 case a: Boolean =>
3137 a
3238 case _ =>
3339 false
3440 }
3541 boolean
3642 }
3743
3844
3945 func addressToString (address) = toBase58String(address.bytes)
4046
4147
4248 func stringToAddress (string) = Address(fromBase58String(string))
4349
4450
4551 func byteVectorToString (byteVector) = toBase58String(byteVector)
4652
4753
4854 func stringToByteVector (string) = fromBase58String(string)
4955
5056
57+func intToString (integer) = toString(integer)
58+
59+
5160 func isAdmin (caller) = (this == caller)
5261
5362
5463 func getUserEmailKey (userAddress) = (("user_<" + userAddress) + ">_email")
5564
5665
5766 func getUserEmailValue (userAddress) = getStringByKey(getUserEmailKey(userAddress))
5867
5968
6069 func getResponsibleKey (userAddress) = (("user_<" + userAddress) + ">_responsible")
6170
6271
6372 func getResponsibleValue (userAddress) = getBooleanByKey(getResponsibleKey(userAddress))
6473
6574
6675 func getNyanTokenKey (dAppAddress) = (("dApp_<" + addressToString(dAppAddress)) + ">_tokenId")
6776
6877
6978 func getNyanTokenValue (dAppAddress) = getStringByKey(getNyanTokenKey(dAppAddress))
7079
7180
7281 func getAssetPriceKey (assetId) = (("asset_<" + assetId) + ">_price")
7382
7483
7584 func getAssetPriceValue (assetId) = getNumberByKey(getAssetPriceKey(assetId))
7685
7786
7887 func getAssetDataKey (assetId) = (("asset_<" + assetId) + ">_data")
7988
8089
8190 func getAssetDataValue (assetId) = getStringByKey(getAssetPriceKey(assetId))
91+
92+
93+func getOrderDataKey () = (("order_<" + "assetId") + ">_data")
94+
95+
96+func getOrderDataValue () = getStringByKey(getOrderDataKey())
8297
8398
8499 @Callable(i)
85100 func signUp (email) = {
86101 let userAddress = addressToString(i.caller)
87102 let userEmail = getUserEmailValue(userAddress)
88103 if ((userEmail != NONE))
89104 then throw((("User " + userEmail) + " is already registered"))
90105 else [StringEntry(getUserEmailKey(userAddress), email)]
91106 }
92107
93108
94109
95110 @Callable(i)
96111 func issueNyanToken (quantity) = {
97112 let nyanToken = getNyanTokenValue(this)
98113 if (!(isAdmin(i.caller)))
99114 then throw("Function invoke not allowed, requested from non-admin address")
100115 else if ((nyanToken != NONE))
101116 then throw("NYAN Token is already issued")
102117 else {
103118 let nyanTokenIssue = Issue("NYAN Token", "NYAN Token is a cryptocurrency token that operates on the Waves platform", quantity, 0, true)
104119 let nyanTokenAssetId = calculateAssetId(nyanTokenIssue)
105120 [nyanTokenIssue, StringEntry(getNyanTokenKey(this), byteVectorToString(nyanTokenAssetId))]
106121 }
107122 }
108123
109124
110125
111126 @Callable(i)
112127 func reissueNyanToken (quantity) = {
113128 let nyanToken = getNyanTokenValue(this)
114129 if (!(isAdmin(i.caller)))
115130 then throw("Function invoke not allowed, requested from non-admin address")
116131 else if ((nyanToken == NONE))
117132 then throw("NYAN Token was not issued")
118133 else [Reissue(stringToByteVector(nyanToken), quantity, true)]
119134 }
120135
121136
122137
123138 @Callable(i)
124139 func transferNyanToken (recipient,amount) = {
125140 let userEmail = getUserEmailValue(recipient)
126141 let nyanTokenAssetId = stringToByteVector(getNyanTokenValue(this))
127142 let currentDAppBalance = assetBalance(this, nyanTokenAssetId)
128143 let newDAppBalance = (currentDAppBalance - amount)
129144 if (!(isAdmin(i.caller)))
130145 then throw("Function invoke not allowed, requested from non-admin address")
131146 else if ((userEmail == NONE))
132147 then throw("You cannot transfer NYAN Token to an unregistered user")
133148 else if ((0 > amount))
134149 then throw("You cannot transfer a negative amount")
135150 else if ((0 > newDAppBalance))
136151 then throw("Not enough NYAN Token to transfer")
137152 else [ScriptTransfer(stringToAddress(recipient), amount, nyanTokenAssetId)]
138153 }
139154
140155
141156
142157 @Callable(i)
143158 func issueAssetToken (name,description,quantity,price,data) = {
144159 let assetTokenIssue = Issue(name, description, quantity, 0, true)
145160 let assetTokenAssetId = calculateAssetId(assetTokenIssue)
146161 let assetToken = byteVectorToString(assetTokenAssetId)
147162 if (!(isAdmin(i.caller)))
148163 then throw("Function invoke not allowed, requested from non-admin address")
149164 else if ((quantity == 0))
150165 then [assetTokenIssue, IntegerEntry(getAssetPriceKey(assetToken), price), StringEntry(getAssetDataKey(assetToken), data)]
151166 else {
152167 let nyanTokenAssetId = stringToByteVector(getNyanTokenValue(this))
153168 let currentDAppBalance = assetBalance(this, nyanTokenAssetId)
154169 let amount = (quantity * price)
155170 let newDAppBalance = (currentDAppBalance - amount)
156171 if ((0 > newDAppBalance))
157172 then throw("Not enough NYAN Token to issue an asset")
158173 else [assetTokenIssue, Burn(nyanTokenAssetId, amount), IntegerEntry(getAssetPriceKey(assetToken), price), StringEntry(getAssetDataKey(assetToken), data)]
159174 }
160175 }
161176
162177
163178
164179 @Callable(i)
165180 func reissueAssetToken (assetId,quantity) = {
166181 let nyanTokenAssetId = stringToByteVector(getNyanTokenValue(this))
167182 let currentDAppBalance = assetBalance(this, nyanTokenAssetId)
168183 let price = getAssetPriceValue(assetId)
169184 let amount = (quantity * price)
170185 let newDAppBalance = (currentDAppBalance - amount)
171186 if (!(isAdmin(i.caller)))
172187 then throw("Function invoke not allowed, requested from non-admin address")
173188 else if ((0 > newDAppBalance))
174189 then throw("Not enough NYAN Token to reissue an asset")
175190 else [Reissue(stringToByteVector(assetId), quantity, true), Burn(nyanTokenAssetId, amount)]
176191 }
177192
178193
179194
180195 @Callable(i)
181196 func exchangeAssetToken (assetId,amount) = {
182197 let payments = i.payments
183198 if ((size(payments) == 0))
184199 then throw("You need to attach the payment")
185200 else {
186201 let paymentAmount = payments[0].amount
187202 let paymentAssetId = value(payments[0].assetId)
188203 let assetPrice = getAssetPriceValue(assetId)
189204 let assetAmount = (amount * assetPrice)
190205 let userAddress = i.caller
191206 let assetTokenAssetId = stringToByteVector(assetId)
192207 if ((assetAmount > paymentAmount))
193208 then throw("Not enough NYAN Token to exchange an asset")
194209 else if ((paymentAmount == assetAmount))
195210 then [ScriptTransfer(userAddress, amount, assetTokenAssetId), Burn(paymentAssetId, paymentAmount)]
196211 else {
197212 let paymentAmountChange = (paymentAmount - assetAmount)
198213 [ScriptTransfer(userAddress, amount, assetTokenAssetId), ScriptTransfer(userAddress, paymentAmountChange, paymentAssetId), Burn(paymentAssetId, assetAmount)]
199214 }
200215 }
201216 }
202217
203218
204219
205220 @Callable(i)
206221 func setResponsibleStatus (userAddress) = {
207222 let isResponsible = getResponsibleValue(userAddress)
208223 if (!(isAdmin(i.caller)))
209224 then throw("Function invoke not allowed, requested from non-admin address")
210225 else if (isResponsible)
211226 then throw("User already have responsible status")
212227 else [BooleanEntry(getResponsibleKey(userAddress), true)]
213228 }
214229
215230
216231
217232 @Callable(i)
218233 func revokeResponsibleStatus (userAddress) = {
219234 let isResponsible = getResponsibleValue(userAddress)
220235 if (!(isAdmin(i.caller)))
221236 then throw("Function invoke not allowed, requested from non-admin address")
222237 else if (!(isResponsible))
223238 then throw("User already don't have responsible status")
224239 else [BooleanEntry(getResponsibleKey(userAddress), false)]
225240 }
226241
227242
243+
244+@Callable(i)
245+func requestReward () = {
246+ let payments = i.payments
247+ if ((size(payments) == 0))
248+ then throw("You need to attach the payment")
249+ else {
250+ let paymentAssetId = value(payments[0].assetId)
251+ let paymentAmount = payments[0].amount
252+ let assetId = byteVectorToString(paymentAssetId)
253+ let userAddress = addressToString(i.caller)
254+ let amount = intToString(paymentAmount)
255+ let transactionId = byteVectorToString(i.transactionId)
256+ let orderData = (((((((((((((((("{" + "\"assetId\":\"") + assetId) + "\",") + "\"amount\":\"") + amount) + "\",") + "\"userAddress\":\"") + userAddress) + "\",") + "\"transactionId\":\"") + transactionId) + "\",") + "\"status\":\"") + orderStatusNew) + "\"") + "}")
257+[StringEntry(getOrderDataKey(), orderData), Burn(paymentAssetId, paymentAmount)]
258+ }
259+ }
260+
261+
228262 @Verifier(tx)
229263 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
230264

github/deemru/w8io/169f3d6 
55.55 ms