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:AAIEAAAAAAAAADgIAhIDCgEIEgMKAQESAwoBARIECgIIARIHCgUICAEBCBIECgIIARIECgIIARIDCgEIEgMKAQgSAAAAABkAAAAADm9yZGVyU3RhdHVzTmV3AgAAAANORVcAAAAADm9yZGVyU3RhdHVzV0lQAgAAAANXSVAAAAAAD29yZGVyU3RhdHVzRG9uZQIAAAAERE9ORQEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAAGbnVtYmVyBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABQAAAAZudW1iZXIAAAAABE5PTkUCAAAABG5vbmUBAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkEAAAABnN0cmluZwQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQUAAAAETk9ORQUAAAA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ADXBheW1lbnRBbW91bnQEAAAADXRyYW5zYWN0aW9uSWQJAQAAABJieXRlVmVjdG9yVG9TdHJpbmcAAAABCAUAAAABaQAAAA10cmFuc2FjdGlvbklkBAAAAAlvcmRlckRhdGEJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAABewIAAAALImFzc2V0SWQiOiIFAAAAB2Fzc2V0SWQCAAAAAiIsAgAAAAoiYW1vdW50IjoiBQAAAAZhbW91bnQCAAAAAiIsAgAAAA8idXNlckFkZHJlc3MiOiIFAAAAC3VzZXJBZGRyZXNzAgAAAAIiLAIAAAARInRyYW5zYWN0aW9uSWQiOiIFAAAADXRyYW5zYWN0aW9uSWQCAAAAAiIsAgAAAAoic3RhdHVzIjoiBQAAAA5vcmRlclN0YXR1c05ldwIAAAABIgIAAAABfQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAAPZ2V0T3JkZXJEYXRhS2V5AAAAAAUAAAAJb3JkZXJEYXRhCQAETAAAAAIJAQAAAARCdXJuAAAAAgUAAAAOcGF5bWVudEFzc2V0SWQFAAAADXBheW1lbnRBbW91bnQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5caHGyA==", "height": 1766640, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: UaYfXpGPW1ZFbZ9i2gHtgUZz619DnCU5bb6V74bCjGh Next: JBwrFdqrkUdtnmwouWenYpmB8r4PM4k2znoZXthzRAE3 Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let orderStatusNew = "NEW" | |
5 | + | ||
6 | + | let orderStatusWIP = "WIP" | |
7 | + | ||
8 | + | let orderStatusDone = "DONE" | |
9 | + | ||
4 | 10 | func getNumberByKey (key) = { | |
5 | 11 | let number = match getInteger(this, key) { | |
6 | 12 | case a: Int => | |
48 | 54 | func stringToByteVector (string) = fromBase58String(string) | |
49 | 55 | ||
50 | 56 | ||
57 | + | func intToString (integer) = toString(integer) | |
58 | + | ||
59 | + | ||
51 | 60 | func isAdmin (caller) = (this == caller) | |
52 | 61 | ||
53 | 62 | ||
79 | 88 | ||
80 | 89 | ||
81 | 90 | func getAssetDataValue (assetId) = getStringByKey(getAssetPriceKey(assetId)) | |
91 | + | ||
92 | + | ||
93 | + | func getOrderDataKey () = (("order_<" + "assetId") + ">_data") | |
94 | + | ||
95 | + | ||
96 | + | func getOrderDataValue () = getStringByKey(getOrderDataKey()) | |
82 | 97 | ||
83 | 98 | ||
84 | 99 | @Callable(i) | |
225 | 240 | } | |
226 | 241 | ||
227 | 242 | ||
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 | + | ||
228 | 262 | @Verifier(tx) | |
229 | 263 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
230 | 264 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let orderStatusNew = "NEW" | |
5 | + | ||
6 | + | let orderStatusWIP = "WIP" | |
7 | + | ||
8 | + | let orderStatusDone = "DONE" | |
9 | + | ||
4 | 10 | func getNumberByKey (key) = { | |
5 | 11 | let number = match getInteger(this, key) { | |
6 | 12 | case a: Int => | |
7 | 13 | a | |
8 | 14 | case _ => | |
9 | 15 | 0 | |
10 | 16 | } | |
11 | 17 | number | |
12 | 18 | } | |
13 | 19 | ||
14 | 20 | ||
15 | 21 | let NONE = "none" | |
16 | 22 | ||
17 | 23 | func getStringByKey (key) = { | |
18 | 24 | let string = match getString(this, key) { | |
19 | 25 | case a: String => | |
20 | 26 | a | |
21 | 27 | case _ => | |
22 | 28 | NONE | |
23 | 29 | } | |
24 | 30 | string | |
25 | 31 | } | |
26 | 32 | ||
27 | 33 | ||
28 | 34 | func getBooleanByKey (key) = { | |
29 | 35 | let boolean = match getBoolean(this, key) { | |
30 | 36 | case a: Boolean => | |
31 | 37 | a | |
32 | 38 | case _ => | |
33 | 39 | false | |
34 | 40 | } | |
35 | 41 | boolean | |
36 | 42 | } | |
37 | 43 | ||
38 | 44 | ||
39 | 45 | func addressToString (address) = toBase58String(address.bytes) | |
40 | 46 | ||
41 | 47 | ||
42 | 48 | func stringToAddress (string) = Address(fromBase58String(string)) | |
43 | 49 | ||
44 | 50 | ||
45 | 51 | func byteVectorToString (byteVector) = toBase58String(byteVector) | |
46 | 52 | ||
47 | 53 | ||
48 | 54 | func stringToByteVector (string) = fromBase58String(string) | |
49 | 55 | ||
50 | 56 | ||
57 | + | func intToString (integer) = toString(integer) | |
58 | + | ||
59 | + | ||
51 | 60 | func isAdmin (caller) = (this == caller) | |
52 | 61 | ||
53 | 62 | ||
54 | 63 | func getUserEmailKey (userAddress) = (("user_<" + userAddress) + ">_email") | |
55 | 64 | ||
56 | 65 | ||
57 | 66 | func getUserEmailValue (userAddress) = getStringByKey(getUserEmailKey(userAddress)) | |
58 | 67 | ||
59 | 68 | ||
60 | 69 | func getResponsibleKey (userAddress) = (("user_<" + userAddress) + ">_responsible") | |
61 | 70 | ||
62 | 71 | ||
63 | 72 | func getResponsibleValue (userAddress) = getBooleanByKey(getResponsibleKey(userAddress)) | |
64 | 73 | ||
65 | 74 | ||
66 | 75 | func getNyanTokenKey (dAppAddress) = (("dApp_<" + addressToString(dAppAddress)) + ">_tokenId") | |
67 | 76 | ||
68 | 77 | ||
69 | 78 | func getNyanTokenValue (dAppAddress) = getStringByKey(getNyanTokenKey(dAppAddress)) | |
70 | 79 | ||
71 | 80 | ||
72 | 81 | func getAssetPriceKey (assetId) = (("asset_<" + assetId) + ">_price") | |
73 | 82 | ||
74 | 83 | ||
75 | 84 | func getAssetPriceValue (assetId) = getNumberByKey(getAssetPriceKey(assetId)) | |
76 | 85 | ||
77 | 86 | ||
78 | 87 | func getAssetDataKey (assetId) = (("asset_<" + assetId) + ">_data") | |
79 | 88 | ||
80 | 89 | ||
81 | 90 | func getAssetDataValue (assetId) = getStringByKey(getAssetPriceKey(assetId)) | |
91 | + | ||
92 | + | ||
93 | + | func getOrderDataKey () = (("order_<" + "assetId") + ">_data") | |
94 | + | ||
95 | + | ||
96 | + | func getOrderDataValue () = getStringByKey(getOrderDataKey()) | |
82 | 97 | ||
83 | 98 | ||
84 | 99 | @Callable(i) | |
85 | 100 | func signUp (email) = { | |
86 | 101 | let userAddress = addressToString(i.caller) | |
87 | 102 | let userEmail = getUserEmailValue(userAddress) | |
88 | 103 | if ((userEmail != NONE)) | |
89 | 104 | then throw((("User " + userEmail) + " is already registered")) | |
90 | 105 | else [StringEntry(getUserEmailKey(userAddress), email)] | |
91 | 106 | } | |
92 | 107 | ||
93 | 108 | ||
94 | 109 | ||
95 | 110 | @Callable(i) | |
96 | 111 | func issueNyanToken (quantity) = { | |
97 | 112 | let nyanToken = getNyanTokenValue(this) | |
98 | 113 | if (!(isAdmin(i.caller))) | |
99 | 114 | then throw("Function invoke not allowed, requested from non-admin address") | |
100 | 115 | else if ((nyanToken != NONE)) | |
101 | 116 | then throw("NYAN Token is already issued") | |
102 | 117 | else { | |
103 | 118 | let nyanTokenIssue = Issue("NYAN Token", "NYAN Token is a cryptocurrency token that operates on the Waves platform", quantity, 0, true) | |
104 | 119 | let nyanTokenAssetId = calculateAssetId(nyanTokenIssue) | |
105 | 120 | [nyanTokenIssue, StringEntry(getNyanTokenKey(this), byteVectorToString(nyanTokenAssetId))] | |
106 | 121 | } | |
107 | 122 | } | |
108 | 123 | ||
109 | 124 | ||
110 | 125 | ||
111 | 126 | @Callable(i) | |
112 | 127 | func reissueNyanToken (quantity) = { | |
113 | 128 | let nyanToken = getNyanTokenValue(this) | |
114 | 129 | if (!(isAdmin(i.caller))) | |
115 | 130 | then throw("Function invoke not allowed, requested from non-admin address") | |
116 | 131 | else if ((nyanToken == NONE)) | |
117 | 132 | then throw("NYAN Token was not issued") | |
118 | 133 | else [Reissue(stringToByteVector(nyanToken), quantity, true)] | |
119 | 134 | } | |
120 | 135 | ||
121 | 136 | ||
122 | 137 | ||
123 | 138 | @Callable(i) | |
124 | 139 | func transferNyanToken (recipient,amount) = { | |
125 | 140 | let userEmail = getUserEmailValue(recipient) | |
126 | 141 | let nyanTokenAssetId = stringToByteVector(getNyanTokenValue(this)) | |
127 | 142 | let currentDAppBalance = assetBalance(this, nyanTokenAssetId) | |
128 | 143 | let newDAppBalance = (currentDAppBalance - amount) | |
129 | 144 | if (!(isAdmin(i.caller))) | |
130 | 145 | then throw("Function invoke not allowed, requested from non-admin address") | |
131 | 146 | else if ((userEmail == NONE)) | |
132 | 147 | then throw("You cannot transfer NYAN Token to an unregistered user") | |
133 | 148 | else if ((0 > amount)) | |
134 | 149 | then throw("You cannot transfer a negative amount") | |
135 | 150 | else if ((0 > newDAppBalance)) | |
136 | 151 | then throw("Not enough NYAN Token to transfer") | |
137 | 152 | else [ScriptTransfer(stringToAddress(recipient), amount, nyanTokenAssetId)] | |
138 | 153 | } | |
139 | 154 | ||
140 | 155 | ||
141 | 156 | ||
142 | 157 | @Callable(i) | |
143 | 158 | func issueAssetToken (name,description,quantity,price,data) = { | |
144 | 159 | let assetTokenIssue = Issue(name, description, quantity, 0, true) | |
145 | 160 | let assetTokenAssetId = calculateAssetId(assetTokenIssue) | |
146 | 161 | let assetToken = byteVectorToString(assetTokenAssetId) | |
147 | 162 | if (!(isAdmin(i.caller))) | |
148 | 163 | then throw("Function invoke not allowed, requested from non-admin address") | |
149 | 164 | else if ((quantity == 0)) | |
150 | 165 | then [assetTokenIssue, IntegerEntry(getAssetPriceKey(assetToken), price), StringEntry(getAssetDataKey(assetToken), data)] | |
151 | 166 | else { | |
152 | 167 | let nyanTokenAssetId = stringToByteVector(getNyanTokenValue(this)) | |
153 | 168 | let currentDAppBalance = assetBalance(this, nyanTokenAssetId) | |
154 | 169 | let amount = (quantity * price) | |
155 | 170 | let newDAppBalance = (currentDAppBalance - amount) | |
156 | 171 | if ((0 > newDAppBalance)) | |
157 | 172 | then throw("Not enough NYAN Token to issue an asset") | |
158 | 173 | else [assetTokenIssue, Burn(nyanTokenAssetId, amount), IntegerEntry(getAssetPriceKey(assetToken), price), StringEntry(getAssetDataKey(assetToken), data)] | |
159 | 174 | } | |
160 | 175 | } | |
161 | 176 | ||
162 | 177 | ||
163 | 178 | ||
164 | 179 | @Callable(i) | |
165 | 180 | func reissueAssetToken (assetId,quantity) = { | |
166 | 181 | let nyanTokenAssetId = stringToByteVector(getNyanTokenValue(this)) | |
167 | 182 | let currentDAppBalance = assetBalance(this, nyanTokenAssetId) | |
168 | 183 | let price = getAssetPriceValue(assetId) | |
169 | 184 | let amount = (quantity * price) | |
170 | 185 | let newDAppBalance = (currentDAppBalance - amount) | |
171 | 186 | if (!(isAdmin(i.caller))) | |
172 | 187 | then throw("Function invoke not allowed, requested from non-admin address") | |
173 | 188 | else if ((0 > newDAppBalance)) | |
174 | 189 | then throw("Not enough NYAN Token to reissue an asset") | |
175 | 190 | else [Reissue(stringToByteVector(assetId), quantity, true), Burn(nyanTokenAssetId, amount)] | |
176 | 191 | } | |
177 | 192 | ||
178 | 193 | ||
179 | 194 | ||
180 | 195 | @Callable(i) | |
181 | 196 | func exchangeAssetToken (assetId,amount) = { | |
182 | 197 | let payments = i.payments | |
183 | 198 | if ((size(payments) == 0)) | |
184 | 199 | then throw("You need to attach the payment") | |
185 | 200 | else { | |
186 | 201 | let paymentAmount = payments[0].amount | |
187 | 202 | let paymentAssetId = value(payments[0].assetId) | |
188 | 203 | let assetPrice = getAssetPriceValue(assetId) | |
189 | 204 | let assetAmount = (amount * assetPrice) | |
190 | 205 | let userAddress = i.caller | |
191 | 206 | let assetTokenAssetId = stringToByteVector(assetId) | |
192 | 207 | if ((assetAmount > paymentAmount)) | |
193 | 208 | then throw("Not enough NYAN Token to exchange an asset") | |
194 | 209 | else if ((paymentAmount == assetAmount)) | |
195 | 210 | then [ScriptTransfer(userAddress, amount, assetTokenAssetId), Burn(paymentAssetId, paymentAmount)] | |
196 | 211 | else { | |
197 | 212 | let paymentAmountChange = (paymentAmount - assetAmount) | |
198 | 213 | [ScriptTransfer(userAddress, amount, assetTokenAssetId), ScriptTransfer(userAddress, paymentAmountChange, paymentAssetId), Burn(paymentAssetId, assetAmount)] | |
199 | 214 | } | |
200 | 215 | } | |
201 | 216 | } | |
202 | 217 | ||
203 | 218 | ||
204 | 219 | ||
205 | 220 | @Callable(i) | |
206 | 221 | func setResponsibleStatus (userAddress) = { | |
207 | 222 | let isResponsible = getResponsibleValue(userAddress) | |
208 | 223 | if (!(isAdmin(i.caller))) | |
209 | 224 | then throw("Function invoke not allowed, requested from non-admin address") | |
210 | 225 | else if (isResponsible) | |
211 | 226 | then throw("User already have responsible status") | |
212 | 227 | else [BooleanEntry(getResponsibleKey(userAddress), true)] | |
213 | 228 | } | |
214 | 229 | ||
215 | 230 | ||
216 | 231 | ||
217 | 232 | @Callable(i) | |
218 | 233 | func revokeResponsibleStatus (userAddress) = { | |
219 | 234 | let isResponsible = getResponsibleValue(userAddress) | |
220 | 235 | if (!(isAdmin(i.caller))) | |
221 | 236 | then throw("Function invoke not allowed, requested from non-admin address") | |
222 | 237 | else if (!(isResponsible)) | |
223 | 238 | then throw("User already don't have responsible status") | |
224 | 239 | else [BooleanEntry(getResponsibleKey(userAddress), false)] | |
225 | 240 | } | |
226 | 241 | ||
227 | 242 | ||
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 | + | ||
228 | 262 | @Verifier(tx) | |
229 | 263 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
230 | 264 |
github/deemru/w8io/169f3d6 55.55 ms ◑