tx · Gxzcz4PakVUhnDzHmRSbN3kJfvonFf7ST9oJgmmXnxMa 3MsH95R1SdYUEkUTVjHvR8gLD8rXtgQ21Vj: -0.01400000 Waves 2021.04.14 13:29 [1482004] smart account 3MsH95R1SdYUEkUTVjHvR8gLD8rXtgQ21Vj > SELF 0.00000000 Waves
{ "type": 13, "id": "Gxzcz4PakVUhnDzHmRSbN3kJfvonFf7ST9oJgmmXnxMa", "fee": 1400000, "feeAssetId": null, "timestamp": 1618396185340, "version": 2, "chainId": 84, "sender": "3MsH95R1SdYUEkUTVjHvR8gLD8rXtgQ21Vj", "senderPublicKey": "GYeGBXmJUHrtkkJuLVJKCHtaCbkvj9nS4aVLqzdrbpZx", "proofs": [ "uiGTokdjmtGwXryxLFg6fMhGr9vfnahMdsiMvS9fyUwVqv82hsuTySpRJbr6mPNJCH8TYqoYuLgLXEEePS77UKw" ], "script": "base64:AAIEAAAAAAAAABoIAhIECgIIARIDCgEIEgMKAQgSBAoCCAESAAAAABgAAAAAB3ZlcnNpb24AAAAAAAAAAAEAAAAACXNlcGFyYXRvcgIAAAADX19fAAAAAAhkZWNpbWFscwkABEwAAAACAAAAAAAAAAABCQAETAAAAAIAAAAAAAAAAAoJAARMAAAAAgAAAAAAAAAAZAkABEwAAAACAAAAAAAAAAPoCQAETAAAAAIAAAAAAAAAJxAJAARMAAAAAgAAAAAAAAGGoAkABEwAAAACAAAAAAAAD0JACQAETAAAAAIAAAAAAACYloAJAARMAAAAAgAAAAAABfXhAAUAAAADbmlsAAAAAAZtYXhJbnQAf/////////8AAAAADmFkZHJQcml2aWxlZ2VzCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABAgAAACMzTXlvamYxajdXMlM1WFNLZW1HYXFFcmNTWWdocUNnUTFncAAAAAAJYWRkclZhdWx0CQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABAgAAACMzTXV0VFZYaDdaMm05Q2Z6eDk4MkQ0bm03aDlZenIzUmE5YQAAAAAKbmliZWxBc3Nld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VhbnRpdHkJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAADmVsaWdpYmxlQmxvY2tzBQAAAA5lbGlnaWJsZUJsb2NrcwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAALZm9yZ2VXZWlnaHQFAAAAC2ZvcmdlV2VpZ2h0CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAA1mb3JnZVN1cHBsaWVzBQAAAA1mb3JnZVN1cHBsaWVzCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAABFmb3JnZXNUb3RhbFdlaWdodAUAAAARZm9yZ2VzVG90YWxXZWlnaHQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAACmZvcmdlU2hhcmUFAAAACmZvcmdlU2hhcmUJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAD2ZvcmdlQmxvY2tWYWx1ZQUAAAAPZm9yZ2VCbG9ja1ZhbHVlCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAAtjYWxsZXJTaGFyZQUAAAALY2FsbGVyU2hhcmUFAAAAA25pbAAAAACEuIER", "height": 1482004, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DobJCN8pF8hqyRT9xRUfLfeYXHmgTKF5ocqNcsVs1BHE Next: 4XxNQYrsxXvBTATQ4RS8gnWKpy5vNbBBdLq9nMCZ1Wcu Diff:
Old | New | Differences | |
---|---|---|---|
198 | 198 | let forgeShare = fraction(1, forgeWeight, forgesTotalWeight) | |
199 | 199 | let forgeBlockValue = fraction(nibelAmountPerBlocks, forgeShare, 1) | |
200 | 200 | let callerShare = (fraction(eligibleBlocks, assetQuantity, forgeSupplies) * forgeBlockValue) | |
201 | - | [IntegerEntry("forgeWeight", forgeWeight), IntegerEntry("forgeSupplies", forgeSupplies), IntegerEntry("forgesTotalWeight", forgesTotalWeight), IntegerEntry("forgeShare", forgeShare), IntegerEntry("forgeBlockValue", forgeBlockValue), IntegerEntry("callerShare", callerShare)] | |
201 | + | [IntegerEntry("assetQuantity", assetQuantity), IntegerEntry("eligibleBlocks", eligibleBlocks), IntegerEntry("forgeWeight", forgeWeight), IntegerEntry("forgeSupplies", forgeSupplies), IntegerEntry("forgesTotalWeight", forgesTotalWeight), IntegerEntry("forgeShare", forgeShare), IntegerEntry("forgeBlockValue", forgeBlockValue), IntegerEntry("callerShare", callerShare)] | |
202 | 202 | } | |
203 | 203 | } | |
204 | 204 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let version = 1 | |
5 | 5 | ||
6 | 6 | let separator = "___" | |
7 | 7 | ||
8 | 8 | let decimals = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000] | |
9 | 9 | ||
10 | 10 | let maxInt = 9223372036854775807 | |
11 | 11 | ||
12 | 12 | let addrPrivileges = addressFromStringValue("3Myojf1j7W2S5XSKemGaqErcSYghqCgQ1gp") | |
13 | 13 | ||
14 | 14 | let addrVault = addressFromStringValue("3MutTVXh7Z2m9Cfzx982D4nm7h9Yzr3Ra9a") | |
15 | 15 | ||
16 | 16 | let nibelAsset = base58'8c6SCeWJj6M1VFBaFEg2LWxYS77ZHkmiMeAs6MMSDi1v' | |
17 | 17 | ||
18 | 18 | let nibelAmountPerBlocks = 1000000000000 | |
19 | 19 | ||
20 | 20 | let nibelGenesisBlock = 0 | |
21 | 21 | ||
22 | 22 | let nibelHavlingDelay = 100000 | |
23 | 23 | ||
24 | 24 | let sharedKeyMainOperator = "MAIN_OPERATOR" | |
25 | 25 | ||
26 | 26 | let sharedKeyPrivilege = "PRIVILEGE" | |
27 | 27 | ||
28 | 28 | let sharedReceiptTag = "R" | |
29 | 29 | ||
30 | 30 | let keyForgesTotalWeight = "FORGES_TOTAL_WEIGHT" | |
31 | 31 | ||
32 | 32 | let keyForgeSettingsEnabled = "FS_ENABLED_" | |
33 | 33 | ||
34 | 34 | let keyForgeSettingsSupplies = "FS_SUPPLIES_" | |
35 | 35 | ||
36 | 36 | let keyForgeSettingsWeight = "FS_WEIGHT_" | |
37 | 37 | ||
38 | 38 | func isSafeString (stringToTest) = if ((contains(stringToTest, separator) == false)) | |
39 | 39 | then (contains(stringToTest, " ") == false) | |
40 | 40 | else false | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func isSafeInteger (integerToTest) = match integerToTest { | |
44 | 44 | case isString: String => | |
45 | 45 | match parseInt(isString) { | |
46 | 46 | case isInteger: Int => | |
47 | 47 | if ((isInteger >= 0)) | |
48 | 48 | then (maxInt >= isInteger) | |
49 | 49 | else false | |
50 | 50 | case _ => | |
51 | 51 | false | |
52 | 52 | } | |
53 | 53 | case isInteger: Int => | |
54 | 54 | if ((isInteger >= 0)) | |
55 | 55 | then (maxInt >= isInteger) | |
56 | 56 | else false | |
57 | 57 | case _ => | |
58 | 58 | false | |
59 | 59 | } | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func toSafeInteger (stringToConvert) = { | |
63 | 63 | let parsedInteger = valueOrErrorMessage(parseInt(stringToConvert), "Not a string int") | |
64 | 64 | if ((isSafeInteger(parsedInteger) != true)) | |
65 | 65 | then throw("Not safe") | |
66 | 66 | else parsedInteger | |
67 | 67 | } | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func isAsset (assetToTest) = match assetToTest { | |
71 | 71 | case isString: String => | |
72 | 72 | isDefined(assetInfo(fromBase58String(isString))) | |
73 | 73 | case isByteVector: ByteVector => | |
74 | 74 | isDefined(assetInfo(isByteVector)) | |
75 | 75 | case _ => | |
76 | 76 | false | |
77 | 77 | } | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func isWhitelisted (assetToTest) = isDefined(getBoolean(this, (keyForgeSettingsEnabled + assetToTest))) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func hasPrivilege (callerAddress,privilegeName) = if ((addressFromStringValue(getStringValue(addrPrivileges, sharedKeyMainOperator)) == callerAddress)) | |
84 | 84 | then true | |
85 | 85 | else match getInteger(addrPrivileges, (((((sharedKeyPrivilege + separator) + toBase58String(callerAddress.bytes)) + separator) + toBase58String(this.bytes)) + privilegeName)) { | |
86 | 86 | case isInteger: Int => | |
87 | 87 | true | |
88 | 88 | case _ => | |
89 | 89 | false | |
90 | 90 | } | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func calcForgeWeight (forgeSupplies) = fraction(1, maxInt, forgeSupplies) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | @Callable(i) | |
97 | 97 | func addAssetToWhitelist (assetToAdd,assetTotalSupplies) = if ((hasPrivilege(i.caller, "addAssetToWhitelist") != true)) | |
98 | 98 | then throw("Access denied") | |
99 | 99 | else if (if ((isAsset(assetToAdd) != true)) | |
100 | 100 | then true | |
101 | 101 | else (isSafeInteger(assetTotalSupplies) != true)) | |
102 | 102 | then throw("Data validation") | |
103 | 103 | else if ((isWhitelisted(assetToAdd) != false)) | |
104 | 104 | then throw("Asset already whitelisted") | |
105 | 105 | else { | |
106 | 106 | let forgeWeight = calcForgeWeight(assetTotalSupplies) | |
107 | 107 | let newForgesTotalWeight = (getIntegerValue(this, keyForgesTotalWeight) + forgeWeight) | |
108 | 108 | [BooleanEntry((keyForgeSettingsEnabled + assetToAdd), true), IntegerEntry((keyForgeSettingsSupplies + assetToAdd), assetTotalSupplies), IntegerEntry((keyForgeSettingsWeight + assetToAdd), forgeWeight), IntegerEntry(keyForgesTotalWeight, newForgesTotalWeight)] | |
109 | 109 | } | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | ||
113 | 113 | @Callable(i) | |
114 | 114 | func removeAssetFromWhitelist (assetToRemove) = if ((hasPrivilege(i.caller, "removeAssetFromWhitelist") != true)) | |
115 | 115 | then throw("Access denied") | |
116 | 116 | else if ((isAsset(assetToRemove) != true)) | |
117 | 117 | then throw("Data validation") | |
118 | 118 | else if ((isWhitelisted(assetToRemove) != true)) | |
119 | 119 | then throw("Asset not whitelisted") | |
120 | 120 | else { | |
121 | 121 | let actions = [DeleteEntry((keyForgeSettingsEnabled + assetToRemove)), DeleteEntry((keyForgeSettingsSupplies + assetToRemove)), DeleteEntry((keyForgeSettingsWeight + assetToRemove))] | |
122 | 122 | if ((getBooleanValue(this, (keyForgeSettingsEnabled + assetToRemove)) != true)) | |
123 | 123 | then actions | |
124 | 124 | else IntegerEntry(keyForgesTotalWeight, (getIntegerValue(this, keyForgesTotalWeight) - getIntegerValue(this, (keyForgeSettingsWeight + assetToRemove)))) :: actions | |
125 | 125 | } | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | ||
129 | 129 | @Callable(i) | |
130 | 130 | func enableDisableForge (assetToToggle) = if ((hasPrivilege(i.caller, "enableDisableForge") != true)) | |
131 | 131 | then throw("Access denied") | |
132 | 132 | else if ((isAsset(assetToToggle) != true)) | |
133 | 133 | then throw("Data validation") | |
134 | 134 | else { | |
135 | 135 | let forgeWeight = getIntegerValue(this, keyForgeSettingsWeight) | |
136 | 136 | let forgesTotalWeight = getIntegerValue(this, keyForgesTotalWeight) | |
137 | 137 | if ((getBooleanValue(this, (keyForgeSettingsEnabled + assetToToggle)) != true)) | |
138 | 138 | then [IntegerEntry(keyForgesTotalWeight, (forgesTotalWeight + forgeWeight)), BooleanEntry((keyForgeSettingsEnabled + assetToToggle), true)] | |
139 | 139 | else [IntegerEntry(keyForgesTotalWeight, (forgesTotalWeight - forgeWeight)), BooleanEntry((keyForgeSettingsEnabled + assetToToggle), false)] | |
140 | 140 | } | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | ||
144 | 144 | @Callable(i) | |
145 | 145 | func updateForgeAssetSupplies (assetToUpdate,newSuppliesValue) = if ((hasPrivilege(i.caller, "updateForgeAssetSupplies") != true)) | |
146 | 146 | then throw("Access denied") | |
147 | 147 | else if (if ((isAsset(assetToUpdate) != true)) | |
148 | 148 | then true | |
149 | 149 | else (isSafeInteger(newSuppliesValue) != true)) | |
150 | 150 | then throw("Data validation") | |
151 | 151 | else if ((isWhitelisted(assetToUpdate) != true)) | |
152 | 152 | then throw("Asset not whitelisted") | |
153 | 153 | else { | |
154 | 154 | let currentForgeWeight = getIntegerValue(this, (keyForgeSettingsWeight + assetToUpdate)) | |
155 | 155 | let newForgeWeight = calcForgeWeight(newSuppliesValue) | |
156 | 156 | let actions = [IntegerEntry((keyForgeSettingsWeight + assetToUpdate), newForgeWeight), IntegerEntry((keyForgeSettingsSupplies + assetToUpdate), newSuppliesValue)] | |
157 | 157 | if ((getBooleanValue(this, (keyForgeSettingsEnabled + assetToUpdate)) != true)) | |
158 | 158 | then actions | |
159 | 159 | else IntegerEntry(keyForgesTotalWeight, ((getIntegerValue(this, keyForgesTotalWeight) + newForgeWeight) - currentForgeWeight)) :: actions | |
160 | 160 | } | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | ||
164 | 164 | @Callable(i) | |
165 | 165 | func claim () = if ((this == i.caller)) | |
166 | 166 | then throw("Self-invoke forbidden") | |
167 | 167 | else if (if ((size(i.payments) != 1)) | |
168 | 168 | then true | |
169 | 169 | else (i.payments[0].amount != 1)) | |
170 | 170 | then throw("Payment issue") | |
171 | 171 | else { | |
172 | 172 | let receiptInfo = valueOrErrorMessage(assetInfo(valueOrErrorMessage(i.payments[0].assetId, "Wrong asset type")), "Unknown asset") | |
173 | 173 | if ((receiptInfo.issuer != addrVault)) | |
174 | 174 | then throw("Unknown issuer") | |
175 | 175 | else { | |
176 | 176 | let receiptFields = split(receiptInfo.description, separator) | |
177 | 177 | if (if ((size(receiptFields) != 8)) | |
178 | 178 | then true | |
179 | 179 | else (receiptFields[0] != sharedReceiptTag)) | |
180 | 180 | then throw("Not a receipt") | |
181 | 181 | else if ((isWhitelisted(receiptFields[3]) != true)) | |
182 | 182 | then throw("Not whitelisted") | |
183 | 183 | else { | |
184 | 184 | let startingBlock = toSafeInteger(receiptFields[1]) | |
185 | 185 | let endingBlock = toSafeInteger(receiptFields[5]) | |
186 | 186 | let assetQuantity = toSafeInteger(receiptFields[4]) | |
187 | 187 | let eligibleBlocks = (endingBlock - startingBlock) | |
188 | 188 | if (if ((nibelGenesisBlock > startingBlock)) | |
189 | 189 | then true | |
190 | 190 | else (nibelGenesisBlock > endingBlock)) | |
191 | 191 | then throw("Not eligible") | |
192 | 192 | else if ((isSafeInteger(eligibleBlocks) != true)) | |
193 | 193 | then throw("Corrupted receipt") | |
194 | 194 | else { | |
195 | 195 | let forgeWeight = getIntegerValue(this, (keyForgeSettingsWeight + receiptFields[3])) | |
196 | 196 | let forgeSupplies = getIntegerValue(this, (keyForgeSettingsSupplies + receiptFields[3])) | |
197 | 197 | let forgesTotalWeight = getIntegerValue(this, keyForgesTotalWeight) | |
198 | 198 | let forgeShare = fraction(1, forgeWeight, forgesTotalWeight) | |
199 | 199 | let forgeBlockValue = fraction(nibelAmountPerBlocks, forgeShare, 1) | |
200 | 200 | let callerShare = (fraction(eligibleBlocks, assetQuantity, forgeSupplies) * forgeBlockValue) | |
201 | - | [IntegerEntry("forgeWeight", forgeWeight), IntegerEntry("forgeSupplies", forgeSupplies), IntegerEntry("forgesTotalWeight", forgesTotalWeight), IntegerEntry("forgeShare", forgeShare), IntegerEntry("forgeBlockValue", forgeBlockValue), IntegerEntry("callerShare", callerShare)] | |
201 | + | [IntegerEntry("assetQuantity", assetQuantity), IntegerEntry("eligibleBlocks", eligibleBlocks), IntegerEntry("forgeWeight", forgeWeight), IntegerEntry("forgeSupplies", forgeSupplies), IntegerEntry("forgesTotalWeight", forgesTotalWeight), IntegerEntry("forgeShare", forgeShare), IntegerEntry("forgeBlockValue", forgeBlockValue), IntegerEntry("callerShare", callerShare)] | |
202 | 202 | } | |
203 | 203 | } | |
204 | 204 | } | |
205 | 205 | } | |
206 | 206 | ||
207 | 207 |
github/deemru/w8io/026f985 33.95 ms ◑