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