tx · 6hxkDUmwFCNq3KcJgrwBsXWybdESaPvQt4urz2icGUbv 3Mzms5gHUDYufDRjSVN7g9DcCMG77pzFN4h: -0.01400000 Waves 2021.09.29 08:31 [1723815] smart account 3Mzms5gHUDYufDRjSVN7g9DcCMG77pzFN4h > SELF 0.00000000 Waves
{ "type": 13, "id": "6hxkDUmwFCNq3KcJgrwBsXWybdESaPvQt4urz2icGUbv", "fee": 1400000, "feeAssetId": null, "timestamp": 1632893535469, "version": 2, "chainId": 84, "sender": "3Mzms5gHUDYufDRjSVN7g9DcCMG77pzFN4h", "senderPublicKey": "CU8dJ2mJQjVBWaDHwXjPztuVdy9XAyAnTuqSCKuNPARn", "proofs": [ "kxXBw32SGjUQJGiAGLYDe2t4DqFpoVRHHzqm7WACiv4zdvtLo8xZGhTcgSeQXF9VEnVxegzrPZnnJd3cqU81TAD" ], "script": "base64:AAIFAAAAAAAAAB0IAhIDCgEBEgASBwoFCAgICAgSBAoCCAgSAwoBCAAAABMAAAAAD3N0b3JhZ2VWZXJpZmllcgkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTjJzNVJ0YUhQQmVuQ3N4MkVDY29GUmJZSHgzbm9aaFhXMQAAAAAJc2lnbkFkbWluAgAAACMzTjF3UGdIRnRlem1SVkJhcW9valA4WEp3VGthcms0aGJpZgAAAAAIZmVlQWRtaW4CAAAAIzNOMXdQZ0hGdGV6bVJWQmFxb29qUDhYSndUa2FyazRoYmlmAAAAAARiYW5rAgAAACMzTjFFNnRYZGRSb1ZhUmZROWRRM3ZnNUxhVzJmc2Q4SEt1YgAAAAAJc2lnblRva2VuAQAAACDopWq8yndC8nBhMjVKT0WDubke5ZlnF8Nx6tkLoQSt6wAAAAANYWNjZXB0ZWRUb2tlbgEAAAAgYfHkwqhFFD81I1SLw0GO/ozjwqWx6THXqSKcOOhu9fcAAAAABnVzZG5JRAIAAAAsM0tGWEJHR0xDakE1WjJEdVc0RHE5ZkREckhqSkpQMVpFa2FvYWpTenVLc0M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WVudHJ5BQAAAANuaWwJAAACAAAAAQIAAAACbm8AAAAAsE5F9Q==", "height": 1723815, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: G9SCAFZ9oFy1qMF67kqPiEsfvJwPiMGBWUBuo5GooMJn Next: 7tR92wrGrPZnQmj3JSivqhxHn2mdsrxvaatQfRzsQ7qj Diff:
Old | New | Differences | |
---|---|---|---|
16 | 16 | let usdnID = "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC" | |
17 | 17 | ||
18 | 18 | let signDapp = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub" | |
19 | + | ||
20 | + | func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0) | |
21 | + | ||
19 | 22 | ||
20 | 23 | func checkEntry (prefix,uuid) = match getString(this, (prefix + uuid)) { | |
21 | 24 | case a: String => | |
144 | 147 | then value(payment.assetId) | |
145 | 148 | else throw("Waves is not accepted as payment") | |
146 | 149 | let currentPrice = getIntegerValue(this, ("certification_fee_" + toBase58String(value(paymentAssetId)))) | |
147 | - | let dappCredits = | |
150 | + | let dappCredits = getIntegerByKey(("credits_" + toBase58String(acceptedToken))) | |
148 | 151 | if ((0 >= dappCredits)) | |
149 | 152 | then throw("Not enough credit on the dapp, please refill") | |
150 | 153 | else if ((acceptedToken != paymentAssetId)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let storageVerifier = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1")) | |
5 | 5 | ||
6 | 6 | let signAdmin = "3N1wPgHFtezmRVBaqoojP8XJwTkark4hbif" | |
7 | 7 | ||
8 | 8 | let feeAdmin = "3N1wPgHFtezmRVBaqoojP8XJwTkark4hbif" | |
9 | 9 | ||
10 | 10 | let bank = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub" | |
11 | 11 | ||
12 | 12 | let signToken = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
13 | 13 | ||
14 | 14 | let acceptedToken = base58'7bLUm2XNLWvVwgC9aPp9fNNAMVtbGwhwkqdgomJAgVbC' | |
15 | 15 | ||
16 | 16 | let usdnID = "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC" | |
17 | 17 | ||
18 | 18 | let signDapp = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub" | |
19 | + | ||
20 | + | func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0) | |
21 | + | ||
19 | 22 | ||
20 | 23 | func checkEntry (prefix,uuid) = match getString(this, (prefix + uuid)) { | |
21 | 24 | case a: String => | |
22 | 25 | a | |
23 | 26 | case _ => | |
24 | 27 | "NONE" | |
25 | 28 | } | |
26 | 29 | ||
27 | 30 | ||
28 | 31 | func checkEntryEmail (uuid,domain) = match getString(this, ((uuid + "@") + domain)) { | |
29 | 32 | case a: String => | |
30 | 33 | a | |
31 | 34 | case _ => | |
32 | 35 | "NONE" | |
33 | 36 | } | |
34 | 37 | ||
35 | 38 | ||
36 | 39 | func checkUUID (uuid) = match getString(this, uuid) { | |
37 | 40 | case a: String => | |
38 | 41 | a | |
39 | 42 | case _ => | |
40 | 43 | "NONE" | |
41 | 44 | } | |
42 | 45 | ||
43 | 46 | ||
44 | 47 | func isAdress (addr) = if (if (if ((size(addr) == 35)) | |
45 | 48 | then (take(addr, 2) == "3P") | |
46 | 49 | else false) | |
47 | 50 | then true | |
48 | 51 | else (take(addr, 2) == "3N")) | |
49 | 52 | then true | |
50 | 53 | else (take(addr, 2) == "3M") | |
51 | 54 | ||
52 | 55 | ||
53 | 56 | func countParties (accumulator,addr) = if ((size(addr) > 0)) | |
54 | 57 | then (accumulator + 1) | |
55 | 58 | else (accumulator + 0) | |
56 | 59 | ||
57 | 60 | ||
58 | 61 | func checkIfPendingToSign (key) = match getString(this, key) { | |
59 | 62 | case a: String => | |
60 | 63 | if ((a == "PENDING")) | |
61 | 64 | then true | |
62 | 65 | else false | |
63 | 66 | case _ => | |
64 | 67 | false | |
65 | 68 | } | |
66 | 69 | ||
67 | 70 | ||
68 | 71 | func getValueString (json) = take(drop(json, 1), value(indexOf(drop(json, 1), "\""))) | |
69 | 72 | ||
70 | 73 | ||
71 | 74 | func getValue (json,key) = { | |
72 | 75 | let keyIndex = value(indexOf(json, (("\"" + key) + "\":"))) | |
73 | 76 | let data = drop(json, ((keyIndex + size(key)) + 3)) | |
74 | 77 | let jsonValue = getValueString(data) | |
75 | 78 | jsonValue | |
76 | 79 | } | |
77 | 80 | ||
78 | 81 | ||
79 | 82 | func getJsonBeforeValue (json,key) = { | |
80 | 83 | let keyIndex = value(indexOf(json, (("\"" + key) + "\":"))) | |
81 | 84 | let data = take(json, ((keyIndex + size(key)) + 3)) | |
82 | 85 | data | |
83 | 86 | } | |
84 | 87 | ||
85 | 88 | ||
86 | 89 | func getJsonAfterValue (json,key) = { | |
87 | 90 | let keyIndex = value(indexOf(json, (("\"" + key) + "\":"))) | |
88 | 91 | let data = takeRight(json, (size(json) - ((((keyIndex + size(key)) + 3) + 0) + 2))) | |
89 | 92 | data | |
90 | 93 | } | |
91 | 94 | ||
92 | 95 | ||
93 | 96 | @Callable(i) | |
94 | 97 | func setFee (fee) = { | |
95 | 98 | let callerAddress = toBase58String(i.caller.bytes) | |
96 | 99 | if ((callerAddress == feeAdmin)) | |
97 | 100 | then [IntegerEntry(("certification_fee_" + toBase58String(acceptedToken)), fee)] | |
98 | 101 | else throw("You are not allowed to change fee") | |
99 | 102 | } | |
100 | 103 | ||
101 | 104 | ||
102 | 105 | ||
103 | 106 | @Callable(i) | |
104 | 107 | func refillCredits () = { | |
105 | 108 | let callerAddress = toBase58String(i.caller.bytes) | |
106 | 109 | let payment = value(i.payments[0]) | |
107 | 110 | let amount = value(payment.amount) | |
108 | 111 | let paymentAssetId = if (isDefined(payment.assetId)) | |
109 | 112 | then value(payment.assetId) | |
110 | 113 | else throw("Accept SIGN token only") | |
111 | 114 | if ((signToken != paymentAssetId)) | |
112 | 115 | then throw("Accept SIGN token only") | |
113 | 116 | else { | |
114 | 117 | let currentSIGNPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(value(paymentAssetId)))) | |
115 | 118 | let numCredit = (currentSIGNPrice / amount) | |
116 | 119 | if ((0 >= numCredit)) | |
117 | 120 | then throw("Not enough for at least 1 credit") | |
118 | 121 | else [IntegerEntry(("credits_" + toBase58String(acceptedToken)), numCredit), ScriptTransfer(addressFromStringValue(signDapp), amount, payment.assetId)] | |
119 | 122 | } | |
120 | 123 | } | |
121 | 124 | ||
122 | 125 | ||
123 | 126 | ||
124 | 127 | @Callable(invoke) | |
125 | 128 | func fileCertification (hash,title,uuid,data,signerPubKey) = { | |
126 | 129 | let id = value(invoke.transactionId) | |
127 | 130 | let entryExist = checkEntry(hash, uuid) | |
128 | 131 | let uuidExist = checkUUID(uuid) | |
129 | 132 | let callerAddress = toBase58String(invoke.caller.bytes) | |
130 | 133 | if ((entryExist != "NONE")) | |
131 | 134 | then throw("This entry already exist") | |
132 | 135 | else if ((uuidExist != "NONE")) | |
133 | 136 | then throw("This uuid already exist") | |
134 | 137 | else if ((size(uuid) != 36)) | |
135 | 138 | then throw("Uuid should be 36 characters.") | |
136 | 139 | else if ((size(hash) != 64)) | |
137 | 140 | then throw("Hash should be 64 characters.") | |
138 | 141 | else if ((size(title) > 150)) | |
139 | 142 | then throw("Title is too long, 150 characters max.") | |
140 | 143 | else { | |
141 | 144 | let payment = value(invoke.payments[0]) | |
142 | 145 | let amount = value(payment.amount) | |
143 | 146 | let paymentAssetId = if (isDefined(payment.assetId)) | |
144 | 147 | then value(payment.assetId) | |
145 | 148 | else throw("Waves is not accepted as payment") | |
146 | 149 | let currentPrice = getIntegerValue(this, ("certification_fee_" + toBase58String(value(paymentAssetId)))) | |
147 | - | let dappCredits = | |
150 | + | let dappCredits = getIntegerByKey(("credits_" + toBase58String(acceptedToken))) | |
148 | 151 | if ((0 >= dappCredits)) | |
149 | 152 | then throw("Not enough credit on the dapp, please refill") | |
150 | 153 | else if ((acceptedToken != paymentAssetId)) | |
151 | 154 | then throw("This token is not accepted at the moment") | |
152 | 155 | else if ((amount != currentPrice)) | |
153 | 156 | then throw("The price is wrong") | |
154 | 157 | else [StringEntry(uuid, toBase58String(id)), StringEntry((hash + uuid), toBase58String(id)), StringEntry((title + uuid), toBase58String(id)), StringEntry(((("data_fc_" + toBase58String(id)) + "_") + callerAddress), data), IntegerEntry(("credits_" + toBase58String(acceptedToken)), (dappCredits - 1)), ScriptTransfer(addressFromStringValue(bank), amount, payment.assetId)] | |
155 | 158 | } | |
156 | 159 | } | |
157 | 160 | ||
158 | 161 | ||
159 | 162 | ||
160 | 163 | @Callable(invoke) | |
161 | 164 | func revokeCertification (certificationId,signerPubKey) = { | |
162 | 165 | let id = value(invoke.transactionId) | |
163 | 166 | let callerAddress = toBase58String(invoke.caller.bytes) | |
164 | 167 | let entryExist = match getString(this, ((("data_fc_" + certificationId) + "_") + callerAddress)) { | |
165 | 168 | case a: String => | |
166 | 169 | a | |
167 | 170 | case _ => | |
168 | 171 | "NONE" | |
169 | 172 | } | |
170 | 173 | let isRevoked = match getString(this, ("STATUS_FC_" + certificationId)) { | |
171 | 174 | case a: String => | |
172 | 175 | a | |
173 | 176 | case _ => | |
174 | 177 | "NONE" | |
175 | 178 | } | |
176 | 179 | let newJson = (((dropRight(entryExist, 1) + ",\"status\":\"REVOKED_") + toBase58String(id)) + "\"}") | |
177 | 180 | if ((isRevoked != "NONE")) | |
178 | 181 | then throw("This certification have already been revoked.") | |
179 | 182 | else if ((entryExist == "NONE")) | |
180 | 183 | then throw("You cannot change the status of this certification.") | |
181 | 184 | else { | |
182 | 185 | let payment = value(invoke.payments[0]) | |
183 | 186 | let amount = value(payment.amount) | |
184 | 187 | let paymentAssetId = if (isDefined(payment.assetId)) | |
185 | 188 | then value(payment.assetId) | |
186 | 189 | else throw("Waves is not accepted as payment") | |
187 | 190 | let currentPrice = getIntegerValue(this, ("certification_fee_" + toBase58String(value(paymentAssetId)))) | |
188 | 191 | let dappCredits = getIntegerValue(this, ("credits_" + toBase58String(acceptedToken))) | |
189 | 192 | if ((0 >= dappCredits)) | |
190 | 193 | then throw("Not enough credit on the dapp, please refill") | |
191 | 194 | else if ((acceptedToken != paymentAssetId)) | |
192 | 195 | then throw("This token is not accepted at the moment") | |
193 | 196 | else if ((amount != currentPrice)) | |
194 | 197 | then throw("The price is wrong") | |
195 | 198 | else [StringEntry(("STATUS_FC_" + certificationId), ("REVOKED_" + toBase58String(id))), StringEntry(((("data_fc_" + certificationId) + "_") + callerAddress), newJson), IntegerEntry(("credits_" + toBase58String(acceptedToken)), (dappCredits - 1)), ScriptTransfer(addressFromStringValue(bank), amount, payment.assetId)] | |
196 | 199 | } | |
197 | 200 | } | |
198 | 201 | ||
199 | 202 | ||
200 | 203 | ||
201 | 204 | @Callable(i) | |
202 | 205 | func deleteEntry (entry) = { | |
203 | 206 | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
204 | 207 | if ((caller == signAdmin)) | |
205 | 208 | then [DeleteEntry(entry)] | |
206 | 209 | else throw("no") | |
207 | 210 | } | |
208 | 211 | ||
209 | 212 |
github/deemru/w8io/026f985 33.92 ms ◑