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