tx · 7FrHgLxpqd4fimnNfUSj1Nrzs9yevachoMkZNBdNoJpT 3NAbS1oNnFUf1vKrdnYn7EEV9yL4RWzGtQ3: -0.01400000 Waves 2021.10.12 07:36 [1742590] smart account 3NAbS1oNnFUf1vKrdnYn7EEV9yL4RWzGtQ3 > SELF 0.00000000 Waves
{ "type": 13, "id": "7FrHgLxpqd4fimnNfUSj1Nrzs9yevachoMkZNBdNoJpT", "fee": 1400000, "feeAssetId": null, "timestamp": 1634013449900, "version": 2, "chainId": 84, "sender": "3NAbS1oNnFUf1vKrdnYn7EEV9yL4RWzGtQ3", "senderPublicKey": "7d9xNw1GKHw9xCXYh4dfDxKfX7o7gQsoUD7b8y73ENNc", "proofs": [ "7P1AZAfovbsZFivwGiEKbf3dFFWtDHJXv4TgpXxssAkHLUzMYnxZoiKyazrF8AiDQrhxjC4n4ArCWijp7A9Vihv" ], "script": "base64:AAIFAAAAAAAAAB0IAhIDCgEBEgASBwoFCAgICAgSBAoCCAgSAwoBCAAAAA0AAAAACGZlZUFkbWluAgAAACMzTXZ1alVaVHRvQU5SenJLWUt6eDk5VnRiOVRVaDZWUENEbQAAAAAEYmFuawIAAAAjM04xRTZ0WGRkUm9WYVJmUTlkUTN2ZzVMYVcyZnNkOEhLdWIAAAAADWFjY2VwdGVkVG9rZW4BAAAAIMg6uHZ2RjtT9QDpkPnXfMGNNPdunDErmpk5E3/vyxV1AAAAABRhY2NlcHRlZFRva2VuRGVjaW1hbAAAAAAAAAAnEAAAAAAJc2lnbkFkbWluAgAAACMzTjF3UGdIRnRlem1SVkJhcW9valA4WEp3VGthcms0aGJpZgAAAAAJc2lnblRva2VuAQAAACDopWq8yndC8nBhMjVKT0WDubke5ZlnF8Nx6tkLoQSt6wAAAAALc2lnbkRlY2ltYWwAAAAAAAX14QAAAAAABnVzZG5JRAIAAAAsM0tGWEJHR0xDakE1WjJEdVc0RHE5ZkREckhqSkpQMVpFa2FvYWpTenVLc0MAAAAACHN3b3BEYXBwCQEAAAAF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gIAAAAIY3JlZGl0c18JAAJYAAAAAQUAAAANYWNjZXB0ZWRUb2tlbgkAAGUAAAACBQAAAA9kYXBwU0lHTkNyZWRpdHMAAAAAAAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQUAAAAEYmFuawUAAAAGYW1vdW50CAUAAAAHcGF5bWVudAAAAAdhc3NldElkBQAAAANuaWwAAAABaQEAAAALZGVsZXRlRW50cnkAAAABAAAABWVudHJ5BAAAAAZjYWxsZXIJAAQlAAAAAQkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5AwkAAAAAAAACBQAAAAZjYWxsZXIFAAAACXNpZ25BZG1pbgkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAAVlbnRyeQUAAAADbmlsCQAAAgAAAAECAAAAAm5vAAAAAJc17JU=", "height": 1742590, "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 = "3MvujUZTtoANRzrKYKzx99Vtb9TUh6VPCDm" | |
5 | + | ||
6 | + | let bank = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub" | |
7 | + | ||
8 | + | let acceptedToken = base58'EUcUPrZBMuVVhSsNjbhQdR1hbknRSDqSqGgbsvhFYXwA' | |
9 | + | ||
10 | + | let acceptedTokenDecimal = 10000 | |
11 | + | ||
12 | + | let signAdmin = "3N1wPgHFtezmRVBaqoojP8XJwTkark4hbif" | |
13 | + | ||
14 | + | let signToken = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
15 | + | ||
16 | + | let signDecimal = 100000000 | |
17 | + | ||
18 | + | let usdnID = "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC" | |
19 | + | ||
20 | + | let swopDapp = 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 ((callerAddress == feeAdmin)) | |
47 | + | then [IntegerEntry(("certification_fee_" + toBase58String(acceptedToken)), fee)] | |
48 | + | else throw("You are not allowed to change fee") | |
49 | + | } | |
50 | + | ||
51 | + | ||
52 | + | ||
53 | + | @Callable(i) | |
54 | + | func refillCredits () = { | |
55 | + | let callerAddress = toBase58String(i.caller.bytes) | |
56 | + | let payment = value(i.payments[0]) | |
57 | + | let amount = value(payment.amount) | |
58 | + | let paymentAssetId = if (isDefined(payment.assetId)) | |
59 | + | then value(payment.assetId) | |
60 | + | else throw("Accept SIGN token only") | |
61 | + | if ((signToken != paymentAssetId)) | |
62 | + | then throw("Accept SIGN token only") | |
63 | + | else { | |
64 | + | let AassetBalanceSwop = getIntegerValue(swopDapp, "A_asset_balance") | |
65 | + | let BassetBalanceSwop = getIntegerValue(swopDapp, "B_asset_balance") | |
66 | + | let oneDollarInSign = (AassetBalanceSwop / (BassetBalanceSwop * 100)) | |
67 | + | let halfDollarInSign = (oneDollarInSign / 2) | |
68 | + | let numCredit = ((amount / signDecimal) / halfDollarInSign) | |
69 | + | let extraSign = ((amount / signDecimal) - (numCredit * halfDollarInSign)) | |
70 | + | let currentCreditsAmount = getIntegerByKey(("credits_" + toBase58String(acceptedToken))) | |
71 | + | let newCreditsAmount = (numCredit + currentCreditsAmount) | |
72 | + | if ((0 >= numCredit)) | |
73 | + | then throw("Not enough for at least 1 credit") | |
74 | + | else [IntegerEntry(("credits_" + toBase58String(acceptedToken)), newCreditsAmount), ScriptTransfer(addressFromStringValue(signDapp), (amount - (extraSign * signDecimal)), payment.assetId), ScriptTransfer(addressFromStringValue(callerAddress), (extraSign * signDecimal), payment.assetId)] | |
75 | + | } | |
76 | + | } | |
77 | + | ||
78 | + | ||
79 | + | ||
80 | + | @Callable(invoke) | |
81 | + | func fileCertification (hash,title,uuid,ipfs,signerPubKey) = { | |
82 | + | let id = value(invoke.transactionId) | |
83 | + | let entryExist = checkEntry(hash, uuid) | |
84 | + | let uuidExist = checkUUID(uuid) | |
85 | + | let callerAddress = toBase58String(invoke.caller.bytes) | |
86 | + | if ((entryExist != "NONE")) | |
87 | + | then throw("This entry already exist") | |
88 | + | else if ((uuidExist != "NONE")) | |
89 | + | then throw("This uuid already exist") | |
90 | + | else if ((size(uuid) != 36)) | |
91 | + | then throw("Uuid should be 36 characters.") | |
92 | + | else if ((size(hash) != 64)) | |
93 | + | then throw("Hash should be 64 characters.") | |
94 | + | else if ((size(title) > 100)) | |
95 | + | then throw("Title is too long, 100 characters max.") | |
96 | + | else if (if (if (contains(hash, "\"")) | |
97 | + | then true | |
98 | + | else contains(title, "\"")) | |
99 | + | then true | |
100 | + | else contains(ipfs, "\"")) | |
101 | + | then throw("No \" allowed") | |
102 | + | else { | |
103 | + | let data = (((((((("{\"hash\":\"" + hash) + "\",\"timestamp\":") + toString(lastBlock.timestamp)) + ",\"title\":\"") + title) + "\",\"ipfs\":\"") + ipfs) + "\"}") | |
104 | + | let payment = value(invoke.payments[0]) | |
105 | + | let amount = value(payment.amount) | |
106 | + | let paymentAssetId = if (isDefined(payment.assetId)) | |
107 | + | then value(payment.assetId) | |
108 | + | else throw("Waves is not accepted as payment") | |
109 | + | let currentPrice = getIntegerValue(this, ("certification_fee_" + toBase58String(value(paymentAssetId)))) | |
110 | + | let dappSIGNCredits = getIntegerByKey(("credits_" + toBase58String(acceptedToken))) | |
111 | + | if ((0 >= dappSIGNCredits)) | |
112 | + | then throw("Not enough credit on the dapp, please refill") | |
113 | + | else if ((acceptedToken != paymentAssetId)) | |
114 | + | then throw("This token is not accepted at the moment") | |
115 | + | else if ((amount != currentPrice)) | |
116 | + | then throw("The price is wrong") | |
117 | + | 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)] | |
118 | + | } | |
119 | + | } | |
120 | + | ||
121 | + | ||
122 | + | ||
123 | + | @Callable(invoke) | |
124 | + | func revokeCertification (certificationId,signerPubKey) = { | |
125 | + | let id = value(invoke.transactionId) | |
126 | + | let callerAddress = toBase58String(invoke.caller.bytes) | |
127 | + | let entryExist = match getString(this, ((("data_fc_" + certificationId) + "_") + callerAddress)) { | |
128 | + | case a: String => | |
129 | + | a | |
130 | + | case _ => | |
131 | + | "NONE" | |
132 | + | } | |
133 | + | let isRevoked = match getString(this, ("STATUS_FC_" + certificationId)) { | |
134 | + | case a: String => | |
135 | + | a | |
136 | + | case _ => | |
137 | + | "NONE" | |
138 | + | } | |
139 | + | let newJson = (((dropRight(entryExist, 1) + ",\"status\":\"REVOKED_") + toBase58String(id)) + "\"}") | |
140 | + | if ((isRevoked != "NONE")) | |
141 | + | then throw("This certification have already been revoked.") | |
142 | + | else if ((entryExist == "NONE")) | |
143 | + | then throw("You cannot change the status of this certification.") | |
144 | + | else { | |
145 | + | let payment = value(invoke.payments[0]) | |
146 | + | let amount = value(payment.amount) | |
147 | + | let paymentAssetId = if (isDefined(payment.assetId)) | |
148 | + | then value(payment.assetId) | |
149 | + | else throw("Waves is not accepted as payment") | |
150 | + | let currentPrice = getIntegerValue(this, ("certification_fee_" + toBase58String(value(paymentAssetId)))) | |
151 | + | let dappSIGNCredits = getIntegerValue(this, ("credits_" + toBase58String(acceptedToken))) | |
152 | + | if ((0 >= dappSIGNCredits)) | |
153 | + | then throw("Not enough credit on the dapp, please refill") | |
154 | + | else if ((acceptedToken != paymentAssetId)) | |
155 | + | then throw("This token is not accepted at the moment") | |
156 | + | else if ((amount != currentPrice)) | |
157 | + | then throw("The price is wrong") | |
158 | + | 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)] | |
159 | + | } | |
160 | + | } | |
161 | + | ||
162 | + | ||
163 | + | ||
164 | + | @Callable(i) | |
165 | + | func deleteEntry (entry) = { | |
166 | + | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
167 | + | if ((caller == signAdmin)) | |
168 | + | then [DeleteEntry(entry)] | |
169 | + | else throw("no") | |
170 | + | } | |
171 | + | ||
172 | + |
github/deemru/w8io/169f3d6 22.54 ms ◑