tx · FBiYzV49GPprw1yDD3oq81Fg5VMdYwqhEBuonpmp7QA4 3MyQ9e9KLn9dVtoS7MBzrxPDiaMNzjtLtuK: -0.01400000 Waves 2021.11.04 07:45 [1775789] smart account 3MyQ9e9KLn9dVtoS7MBzrxPDiaMNzjtLtuK > SELF 0.00000000 Waves
{ "type": 13, "id": "FBiYzV49GPprw1yDD3oq81Fg5VMdYwqhEBuonpmp7QA4", "fee": 1400000, "feeAssetId": null, "timestamp": 1636001113734, "version": 2, "chainId": 84, "sender": "3MyQ9e9KLn9dVtoS7MBzrxPDiaMNzjtLtuK", "senderPublicKey": "DkbebmKEbNQeDSkubpqaSgehQ9csRLHeF99WnFoA8kMJ", "proofs": [ "3GLcqrRdk6Fr1uwiVsNuLS1tAT7sookASHaeEXx6fyhAQHrJ6wZ2Sm8EdHMT5teD1GzNGUn8dwQKsnBu1eizYq9r" ], "script": "base64:AAIFAAAAAAAAAB0IAhIDCgEBEgASBwoFCAgICAgSBAoCCAgSAwoBCAAAAA0AAAAACGZlZUFkbWluAgAAACMzTXNHNmpQTkNyVkpVdFlCN1hKQnhTN3V0V3NYQWY0bjlWcAAAAAAEYmFuawIAAAAjM04xRTZ0WGRkUm9WYVJmUTlkUTN2ZzVMYVcyZnNkOEhLdWIAAAAADWFjY2VwdGVkVG9rZW4BAAAAIMryjBgCEF/b2z09FkKBbSbTeN3jjindIt6aK5le5lGlAAAAABRhY2NlcHRlZFRva2VuRGVjaW1hbAAAAAAAAJiWgAAAAAAJc2lnbkFkbWluAgAAACMzTjF3UGdIRnRlem1SVkJhcW9valA4WEp3VGthcms0aGJpZgAAAAAJc2lnblRva2VuAQAAACDopWq8yndC8nBhMjVKT0WDubke5ZlnF8Nx6tkLoQSt6wAAAAALc2lnbkRlY2ltYWwAAAAAAAX14QAAAAAABnVzZG5JRAIAAAAsM0tGWEJHR0xDakE1WjJEdVc0RHE5ZkREckhqSkpQMVpFa2FvYWpTenVLc0MAAAAADHN3b3BTaWduRGFwcAkBAA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AAA1jYWxsZXJBZGRyZXNzBQAAAAduZXdKc29uCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAICAAAACGNyZWRpdHNfCQACWAAAAAEFAAAADWFjY2VwdGVkVG9rZW4JAABlAAAAAgUAAAAPZGFwcFNJR05DcmVkaXRzAAAAAAAAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEFAAAABGJhbmsFAAAABmFtb3VudAgFAAAAB3BheW1lbnQAAAAHYXNzZXRJZAUAAAADbmlsAAAAAWkBAAAAC2RlbGV0ZUVudHJ5AAAAAQAAAAVlbnRyeQQAAAAGY2FsbGVyCQAEJQAAAAEJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQMJAAAAAAAAAgUAAAAGY2FsbGVyBQAAAAlzaWduQWRtaW4JAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAAFZW50cnkFAAAAA25pbAkAAAIAAAABAgAAAAJubwAAAAAPNpsT", "height": 1775789, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let feeAdmin = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp" | |
5 | + | ||
6 | + | let bank = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub" | |
7 | + | ||
8 | + | let acceptedToken = base58'EfDsAibuR7H4MJDYU1edsRpBrMqVFFRXk68U34J4g5Qx' | |
9 | + | ||
10 | + | let acceptedTokenDecimal = 10000000 | |
11 | + | ||
12 | + | let signAdmin = "3N1wPgHFtezmRVBaqoojP8XJwTkark4hbif" | |
13 | + | ||
14 | + | let signToken = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
15 | + | ||
16 | + | let signDecimal = 100000000 | |
17 | + | ||
18 | + | let usdnID = "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC" | |
19 | + | ||
20 | + | let swopSignDapp = value(addressFromString("3N22SvtBwfGc1BwErX5YQx3WzacDicfMpLr")) | |
21 | + | ||
22 | + | let signDapp = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub" | |
23 | + | ||
24 | + | func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0) | |
25 | + | ||
26 | + | ||
27 | + | func checkEntry (prefix,uuid) = match getString(this, (prefix + uuid)) { | |
28 | + | case a: String => | |
29 | + | a | |
30 | + | case _ => | |
31 | + | "NONE" | |
32 | + | } | |
33 | + | ||
34 | + | ||
35 | + | func checkUUID (uuid) = match getString(this, uuid) { | |
36 | + | case a: String => | |
37 | + | a | |
38 | + | case _ => | |
39 | + | "NONE" | |
40 | + | } | |
41 | + | ||
42 | + | ||
43 | + | @Callable(i) | |
44 | + | func setFee (fee) = { | |
45 | + | let callerAddress = toBase58String(i.caller.bytes) | |
46 | + | if (if ((callerAddress == feeAdmin)) | |
47 | + | then true | |
48 | + | else (callerAddress == signAdmin)) | |
49 | + | then [IntegerEntry(("certification_fee_" + toBase58String(acceptedToken)), fee)] | |
50 | + | else throw("You are not allowed to change fee") | |
51 | + | } | |
52 | + | ||
53 | + | ||
54 | + | ||
55 | + | @Callable(i) | |
56 | + | func refillCredits () = { | |
57 | + | let callerAddress = toBase58String(i.caller.bytes) | |
58 | + | let payment = value(i.payments[0]) | |
59 | + | let amount = value(payment.amount) | |
60 | + | let paymentAssetId = if (isDefined(payment.assetId)) | |
61 | + | then value(payment.assetId) | |
62 | + | else throw("Accept SIGN token only") | |
63 | + | if ((signToken != paymentAssetId)) | |
64 | + | then throw("Accept SIGN token only") | |
65 | + | else { | |
66 | + | let AassetBalanceSwop = getIntegerValue(swopSignDapp, "A_asset_balance") | |
67 | + | let BassetBalanceSwop = getIntegerValue(swopSignDapp, "B_asset_balance") | |
68 | + | let oneDollarInSign = (AassetBalanceSwop / (BassetBalanceSwop * 100)) | |
69 | + | let halfDollarInSign = (oneDollarInSign / 2) | |
70 | + | let numCredit = ((amount / signDecimal) / halfDollarInSign) | |
71 | + | let extraSign = ((amount / signDecimal) - (numCredit * halfDollarInSign)) | |
72 | + | let currentCreditsAmount = getIntegerByKey(("credits_" + toBase58String(acceptedToken))) | |
73 | + | let newCreditsAmount = (numCredit + currentCreditsAmount) | |
74 | + | if ((0 >= numCredit)) | |
75 | + | then throw("Not enough for at least 1 credit") | |
76 | + | else [IntegerEntry(("credits_" + toBase58String(acceptedToken)), newCreditsAmount), ScriptTransfer(addressFromStringValue(signDapp), (amount - (extraSign * signDecimal)), payment.assetId), ScriptTransfer(addressFromStringValue(callerAddress), (extraSign * signDecimal), payment.assetId)] | |
77 | + | } | |
78 | + | } | |
79 | + | ||
80 | + | ||
81 | + | ||
82 | + | @Callable(invoke) | |
83 | + | func fileCertification (hash,title,uuid,ipfs,signerPubKey) = { | |
84 | + | let id = value(invoke.transactionId) | |
85 | + | let entryExist = checkEntry(hash, uuid) | |
86 | + | let uuidExist = checkUUID(uuid) | |
87 | + | let callerAddress = toBase58String(invoke.caller.bytes) | |
88 | + | if ((entryExist != "NONE")) | |
89 | + | then throw("This entry already exist") | |
90 | + | else if ((uuidExist != "NONE")) | |
91 | + | then throw("This uuid already exist") | |
92 | + | else if ((size(uuid) != 36)) | |
93 | + | then throw("Uuid should be 36 characters.") | |
94 | + | else if ((size(hash) != 64)) | |
95 | + | then throw("Hash should be 64 characters.") | |
96 | + | else if ((size(title) > 100)) | |
97 | + | then throw("Title is too long, 100 characters max.") | |
98 | + | else if (if (if (contains(hash, "\"")) | |
99 | + | then true | |
100 | + | else contains(title, "\"")) | |
101 | + | then true | |
102 | + | else contains(ipfs, "\"")) | |
103 | + | then throw("No \" allowed") | |
104 | + | else { | |
105 | + | let data = (((((((("{\"hash\":\"" + hash) + "\",\"timestamp\":") + toString(lastBlock.timestamp)) + ",\"title\":\"") + title) + "\",\"ipfs\":\"") + ipfs) + "\"}") | |
106 | + | let payment = value(invoke.payments[0]) | |
107 | + | let amount = value(payment.amount) | |
108 | + | let paymentAssetId = if (isDefined(payment.assetId)) | |
109 | + | then value(payment.assetId) | |
110 | + | else throw("Waves is not accepted as payment") | |
111 | + | let currentPrice = getIntegerValue(this, ("certification_fee_" + toBase58String(value(paymentAssetId)))) | |
112 | + | let dappSIGNCredits = getIntegerByKey(("credits_" + toBase58String(acceptedToken))) | |
113 | + | if ((0 >= dappSIGNCredits)) | |
114 | + | then throw("Not enough credit on the dapp, please contact administrator.") | |
115 | + | else if ((acceptedToken != paymentAssetId)) | |
116 | + | then throw("This token is not accepted at the moment") | |
117 | + | else if ((amount != currentPrice)) | |
118 | + | then throw("The price is wrong") | |
119 | + | 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)), (dappSIGNCredits - 1)), ScriptTransfer(addressFromStringValue(bank), amount, payment.assetId)] | |
120 | + | } | |
121 | + | } | |
122 | + | ||
123 | + | ||
124 | + | ||
125 | + | @Callable(invoke) | |
126 | + | func revokeCertification (certificationId,signerPubKey) = { | |
127 | + | let id = value(invoke.transactionId) | |
128 | + | let callerAddress = toBase58String(invoke.caller.bytes) | |
129 | + | let entryExist = match getString(this, ((("data_fc_" + certificationId) + "_") + callerAddress)) { | |
130 | + | case a: String => | |
131 | + | a | |
132 | + | case _ => | |
133 | + | "NONE" | |
134 | + | } | |
135 | + | let isRevoked = match getString(this, ("STATUS_FC_" + certificationId)) { | |
136 | + | case a: String => | |
137 | + | a | |
138 | + | case _ => | |
139 | + | "NONE" | |
140 | + | } | |
141 | + | let newJson = (((dropRight(entryExist, 1) + ",\"status\":\"REVOKED_") + toBase58String(id)) + "\"}") | |
142 | + | if ((isRevoked != "NONE")) | |
143 | + | then throw("This certification have already been revoked.") | |
144 | + | else if ((entryExist == "NONE")) | |
145 | + | then throw("You cannot change the status of this certification.") | |
146 | + | else { | |
147 | + | let payment = value(invoke.payments[0]) | |
148 | + | let amount = value(payment.amount) | |
149 | + | let paymentAssetId = if (isDefined(payment.assetId)) | |
150 | + | then value(payment.assetId) | |
151 | + | else throw("Waves is not accepted as payment") | |
152 | + | let currentPrice = getIntegerValue(this, ("certification_fee_" + toBase58String(value(paymentAssetId)))) | |
153 | + | let dappSIGNCredits = getIntegerValue(this, ("credits_" + toBase58String(acceptedToken))) | |
154 | + | if ((0 >= dappSIGNCredits)) | |
155 | + | then throw("Not enough credit on the dapp, please refill") | |
156 | + | else if ((acceptedToken != paymentAssetId)) | |
157 | + | then throw("This token is not accepted at the moment") | |
158 | + | else if ((amount != currentPrice)) | |
159 | + | then throw("The price is wrong") | |
160 | + | else [StringEntry(("STATUS_FC_" + certificationId), ("REVOKED_" + toBase58String(id))), StringEntry(((("data_fc_" + certificationId) + "_") + callerAddress), newJson), IntegerEntry(("credits_" + toBase58String(acceptedToken)), (dappSIGNCredits - 1)), ScriptTransfer(addressFromStringValue(bank), amount, payment.assetId)] | |
161 | + | } | |
162 | + | } | |
163 | + | ||
164 | + | ||
165 | + | ||
166 | + | @Callable(i) | |
167 | + | func deleteEntry (entry) = { | |
168 | + | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
169 | + | if ((caller == signAdmin)) | |
170 | + | then [DeleteEntry(entry)] | |
171 | + | else throw("no") | |
172 | + | } | |
173 | + | ||
174 | + |
github/deemru/w8io/026f985 17.42 ms ◑