tx · HsVeavFmxFpycd1hNTWKiDxra4ZcFenEKdtP2EcnwX9w

3MsH95R1SdYUEkUTVjHvR8gLD8rXtgQ21Vj:  -0.01400000 Waves

2021.04.14 16:10 [1482157] smart account 3MsH95R1SdYUEkUTVjHvR8gLD8rXtgQ21Vj > SELF 0.00000000 Waves

{ "type": 13, "id": "HsVeavFmxFpycd1hNTWKiDxra4ZcFenEKdtP2EcnwX9w", "fee": 1400000, "feeAssetId": null, "timestamp": 1618405848621, "version": 2, "chainId": 84, "sender": "3MsH95R1SdYUEkUTVjHvR8gLD8rXtgQ21Vj", "senderPublicKey": "GYeGBXmJUHrtkkJuLVJKCHtaCbkvj9nS4aVLqzdrbpZx", "proofs": [ "3n5gwz9Zv4Ln89PpYRCtWkfSRWpERcHR4jHJy1HeoLPfswJsFTGpdp2Q1Rh1EWfBxf3zt4UMMt7VeQLCG4KuBhPY" ], "script": "base64:AAIEAAAAAAAAABoIAhIECgIIARIDCgEIEgMKAQgSBAoCCAESAAAAABgAAAAAB3ZlcnNpb24AAAAAAAAAAAEAAAAACXNlcGFyYXRvcgIAAAADX19fAAAAAAhkZWNpbWFscwkABEwAAAACAAAAAAAAAAABCQAETAAAAAIAAAAAAAAAAAoJAARMAAAAAgAAAAAAAAAAZAkABEwAAAACAAAAAAAAAAPoCQAETAAAAAIAAAAAAAAAJxAJAARMAAAAAgAAAAAAAAGGoAkABEwAAAACAAAAAAAAD0JACQAETAAAAAIAAAAAAACYloAJAARMAAAAAgAAAAAABfXhAAUAAAADbmlsAAAAAAZtYXhJbnQAf/////////8AAAAADmFkZHJQcml2aWxlZ2VzCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABAgAAACMzTXlvamYxajdXMlM1WFNLZW1HYXFFcmNTWWdocUNnUTFncAAAAAAJYWRkclZhdWx0CQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABAgAAACMzTXV0VFZYaDdaMm05Q2Z6eDk4MkQ0bm03aDlZenIzUmE5YQAAAAAKbmliZW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90YWwFAAAAFGFtb3VudFRvRGVsaXZlclRvdGFsBQAAAANuaWwAAAAAVd13iA==", "height": 1482157, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5er9NMmTEwvzNmd6GZ2v5oY1Yq9oaBkJE8FnCTazCjS3 Next: EA9aVssxceuKp9iM8pCov7Uhgut9XbQQhbXm9mfpr8h Diff:
OldNewDifferences
9797 }
9898
9999
100-func calcForgeWeight (forgeSupplies) = fraction(1, maxInt, forgeSupplies)
100+func calcForgeWeight (forgeSupplies) = (maxInt / forgeSupplies)
101101
102102
103103 @Callable(i)
203203 else {
204204 let assetQuantity = toSafeInteger(receiptFields[4])
205205 let eligibleBlocks = (toSafeInteger(receiptFields[5]) - toSafeInteger(receiptFields[1]))
206- if ((isSafeInteger(eligibleBlocks) != true))
207- then throw("Corrupted receipt")
206+ if ((1 > eligibleBlocks))
207+ then throw("No eligible blocks")
208208 else {
209209 let forgeWeight = getIntegerValue(this, (keyForgeSettingsWeight + receiptFields[3]))
210210 let forgeSupplies = getIntegerValue(this, (keyForgeSettingsSupplies + receiptFields[3]))
211211 let forgesTotalWeight = getIntegerValue(this, keyForgesTotalWeight)
212- let forgeBlockValue = fraction(nibelAmountPerBlocks, forgeWeight, forgesTotalWeight)
213- let amountToDeliverPerBlock = fraction(forgeBlockValue, assetQuantity, forgeSupplies)
212+ let amountToDeliverPerBlock = fraction(fraction(nibelAmountPerBlocks, forgeWeight, forgesTotalWeight), assetQuantity, forgeSupplies)
214213 if ((1 > amountToDeliverPerBlock))
215- then throw("Below minimum required amount")
214+ then throw("Below minimum required")
216215 else {
217216 let amountToDeliverTotal = (amountToDeliverPerBlock * eligibleBlocks)
218217 if ((isSafeInteger(amountToDeliverTotal) != true))
219218 then throw("System error")
220- else [IntegerEntry("assetQuantity", assetQuantity), IntegerEntry("eligibleBlocks", eligibleBlocks), IntegerEntry("forgeWeight", forgeWeight), IntegerEntry("forgeSupplies", forgeSupplies), IntegerEntry("forgesTotalWeight", forgesTotalWeight), IntegerEntry("forgeBlockValue", forgeBlockValue), IntegerEntry("amountToDeliverPerBlock", amountToDeliverPerBlock), IntegerEntry("amountToDeliverTotal", amountToDeliverTotal)]
219+ else [Reissue(nibelAsset, amountToDeliverTotal, true), ScriptTransfer(i.caller, amountToDeliverTotal, nibelAsset), IntegerEntry("assetQuantity", assetQuantity), IntegerEntry("eligibleBlocks", eligibleBlocks), IntegerEntry("forgeWeight", forgeWeight), IntegerEntry("forgeSupplies", forgeSupplies), IntegerEntry("forgesTotalWeight", forgesTotalWeight), IntegerEntry("amountToDeliverPerBlock", amountToDeliverPerBlock), IntegerEntry("amountToDeliverTotal", amountToDeliverTotal)]
221220 }
222221 }
223222 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let version = 1
55
66 let separator = "___"
77
88 let decimals = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000]
99
1010 let maxInt = 9223372036854775807
1111
1212 let addrPrivileges = addressFromStringValue("3Myojf1j7W2S5XSKemGaqErcSYghqCgQ1gp")
1313
1414 let addrVault = addressFromStringValue("3MutTVXh7Z2m9Cfzx982D4nm7h9Yzr3Ra9a")
1515
1616 let nibelAsset = base58'8c6SCeWJj6M1VFBaFEg2LWxYS77ZHkmiMeAs6MMSDi1v'
1717
1818 let nibelAmountPerBlocks = 1000000000000
1919
2020 let nibelGenesisBlock = 0
2121
2222 let nibelHavlingDelay = 100000
2323
2424 let sharedKeyMainOperator = "MAIN_OPERATOR"
2525
2626 let sharedKeyPrivilege = "PRIVILEGE"
2727
2828 let sharedReceiptTag = "R"
2929
3030 let keyForgesTotalWeight = "FORGES_TOTAL_WEIGHT"
3131
3232 let keyForgeSettingsEnabled = "FS_ENABLED_"
3333
3434 let keyForgeSettingsSupplies = "FS_SUPPLIES_"
3535
3636 let keyForgeSettingsWeight = "FS_WEIGHT_"
3737
3838 func isSafeString (stringToTest) = if ((contains(stringToTest, separator) == false))
3939 then (contains(stringToTest, " ") == false)
4040 else false
4141
4242
4343 func isSafeInteger (integerToTest) = match integerToTest {
4444 case isString: String =>
4545 match parseInt(isString) {
4646 case isInteger: Int =>
4747 if ((isInteger >= 0))
4848 then (maxInt >= isInteger)
4949 else false
5050 case _ =>
5151 false
5252 }
5353 case isInteger: Int =>
5454 if ((isInteger >= 0))
5555 then (maxInt >= isInteger)
5656 else false
5757 case _ =>
5858 false
5959 }
6060
6161
6262 func toSafeInteger (stringToConvert) = {
6363 let parsedInteger = valueOrErrorMessage(parseInt(stringToConvert), "Not a string int")
6464 if ((isSafeInteger(parsedInteger) != true))
6565 then throw("Not safe")
6666 else parsedInteger
6767 }
6868
6969
7070 func isAsset (assetToTest) = match assetToTest {
7171 case isString: String =>
7272 isDefined(assetInfo(fromBase58String(isString)))
7373 case isByteVector: ByteVector =>
7474 isDefined(assetInfo(isByteVector))
7575 case _ =>
7676 false
7777 }
7878
7979
8080 func getForgeAssetState (assetToCheck) = match getBoolean(this, (keyForgeSettingsEnabled + assetToCheck)) {
8181 case isBoolean: Boolean =>
8282 if ((isBoolean == true))
8383 then "enabled"
8484 else "disabled"
8585 case _ =>
8686 "notWhitelisted"
8787 }
8888
8989
9090 func hasPrivilege (callerAddress,privilegeName) = if ((addressFromStringValue(getStringValue(addrPrivileges, sharedKeyMainOperator)) == callerAddress))
9191 then true
9292 else match getInteger(addrPrivileges, (((((sharedKeyPrivilege + separator) + toBase58String(callerAddress.bytes)) + separator) + toBase58String(this.bytes)) + privilegeName)) {
9393 case isInteger: Int =>
9494 true
9595 case _ =>
9696 false
9797 }
9898
9999
100-func calcForgeWeight (forgeSupplies) = fraction(1, maxInt, forgeSupplies)
100+func calcForgeWeight (forgeSupplies) = (maxInt / forgeSupplies)
101101
102102
103103 @Callable(i)
104104 func addAssetToWhitelist (assetToAdd,assetTotalSupplies) = if ((hasPrivilege(i.caller, "addAssetToWhitelist") != true))
105105 then throw("Access denied")
106106 else if (if ((isAsset(assetToAdd) != true))
107107 then true
108108 else (isSafeInteger(assetTotalSupplies) != true))
109109 then throw("Data validation")
110110 else if ((getForgeAssetState(assetToAdd) != "notWhitelisted"))
111111 then throw("Asset already whitelisted")
112112 else {
113113 let forgeWeight = calcForgeWeight(assetTotalSupplies)
114114 let newForgesTotalWeight = (getIntegerValue(this, keyForgesTotalWeight) + forgeWeight)
115115 [BooleanEntry((keyForgeSettingsEnabled + assetToAdd), true), IntegerEntry((keyForgeSettingsSupplies + assetToAdd), assetTotalSupplies), IntegerEntry((keyForgeSettingsWeight + assetToAdd), forgeWeight), IntegerEntry(keyForgesTotalWeight, newForgesTotalWeight)]
116116 }
117117
118118
119119
120120 @Callable(i)
121121 func removeAssetFromWhitelist (assetToRemove) = if ((hasPrivilege(i.caller, "removeAssetFromWhitelist") != true))
122122 then throw("Access denied")
123123 else if ((isAsset(assetToRemove) != true))
124124 then throw("Data validation")
125125 else {
126126 let forgeAssetState = getForgeAssetState(assetToRemove)
127127 if ((forgeAssetState == "notWhitelisted"))
128128 then throw("Asset not whitelisted")
129129 else {
130130 let actions = [DeleteEntry((keyForgeSettingsEnabled + assetToRemove)), DeleteEntry((keyForgeSettingsSupplies + assetToRemove)), DeleteEntry((keyForgeSettingsWeight + assetToRemove))]
131131 if ((forgeAssetState == "disabled"))
132132 then actions
133133 else IntegerEntry(keyForgesTotalWeight, (getIntegerValue(this, keyForgesTotalWeight) - getIntegerValue(this, (keyForgeSettingsWeight + assetToRemove)))) :: actions
134134 }
135135 }
136136
137137
138138
139139 @Callable(i)
140140 func enableDisableForge (assetToToggle) = if ((hasPrivilege(i.caller, "enableDisableForge") != true))
141141 then throw("Access denied")
142142 else if ((isAsset(assetToToggle) != true))
143143 then throw("Data validation")
144144 else {
145145 let forgeAssetState = getForgeAssetState(assetToToggle)
146146 if ((forgeAssetState == "notWhitelisted"))
147147 then throw("Asset not whitelisted")
148148 else {
149149 let forgeWeight = getIntegerValue(this, keyForgeSettingsWeight)
150150 let forgesTotalWeight = getIntegerValue(this, keyForgesTotalWeight)
151151 if ((forgeAssetState == "disabled"))
152152 then [IntegerEntry(keyForgesTotalWeight, (forgesTotalWeight + forgeWeight)), BooleanEntry((keyForgeSettingsEnabled + assetToToggle), true)]
153153 else [IntegerEntry(keyForgesTotalWeight, (forgesTotalWeight - forgeWeight)), BooleanEntry((keyForgeSettingsEnabled + assetToToggle), false)]
154154 }
155155 }
156156
157157
158158
159159 @Callable(i)
160160 func updateForgeAssetSupplies (assetToUpdate,newSuppliesValue) = if ((hasPrivilege(i.caller, "updateForgeAssetSupplies") != true))
161161 then throw("Access denied")
162162 else if (if ((isAsset(assetToUpdate) != true))
163163 then true
164164 else (isSafeInteger(newSuppliesValue) != true))
165165 then throw("Data validation")
166166 else {
167167 let forgeAssetState = getForgeAssetState(assetToUpdate)
168168 if ((forgeAssetState == "notWhitelisted"))
169169 then throw("Asset not whitelisted")
170170 else {
171171 let currentForgeWeight = getIntegerValue(this, (keyForgeSettingsWeight + assetToUpdate))
172172 let newForgeWeight = calcForgeWeight(newSuppliesValue)
173173 let actions = [IntegerEntry((keyForgeSettingsWeight + assetToUpdate), newForgeWeight), IntegerEntry((keyForgeSettingsSupplies + assetToUpdate), newSuppliesValue)]
174174 if ((forgeAssetState == "disabled"))
175175 then actions
176176 else IntegerEntry(keyForgesTotalWeight, ((getIntegerValue(this, keyForgesTotalWeight) + newForgeWeight) - currentForgeWeight)) :: actions
177177 }
178178 }
179179
180180
181181
182182 @Callable(i)
183183 func claim () = if ((this == i.caller))
184184 then throw("Self-invoke forbidden")
185185 else if (if ((size(i.payments) != 1))
186186 then true
187187 else (i.payments[0].amount != 1))
188188 then throw("Payment issue")
189189 else {
190190 let receiptInfo = valueOrErrorMessage(assetInfo(valueOrErrorMessage(i.payments[0].assetId, "Wrong asset type")), "Unknown asset")
191191 if ((receiptInfo.issuer != addrVault))
192192 then throw("Unknown issuer")
193193 else {
194194 let receiptFields = split(receiptInfo.description, separator)
195195 if (if ((size(receiptFields) != 8))
196196 then true
197197 else (receiptFields[0] != sharedReceiptTag))
198198 then throw("Not a receipt")
199199 else {
200200 let forgeAssetState = getForgeAssetState(receiptFields[3])
201201 if ((forgeAssetState != "enabled"))
202202 then throw("Not whitelisted/enabled")
203203 else {
204204 let assetQuantity = toSafeInteger(receiptFields[4])
205205 let eligibleBlocks = (toSafeInteger(receiptFields[5]) - toSafeInteger(receiptFields[1]))
206- if ((isSafeInteger(eligibleBlocks) != true))
207- then throw("Corrupted receipt")
206+ if ((1 > eligibleBlocks))
207+ then throw("No eligible blocks")
208208 else {
209209 let forgeWeight = getIntegerValue(this, (keyForgeSettingsWeight + receiptFields[3]))
210210 let forgeSupplies = getIntegerValue(this, (keyForgeSettingsSupplies + receiptFields[3]))
211211 let forgesTotalWeight = getIntegerValue(this, keyForgesTotalWeight)
212- let forgeBlockValue = fraction(nibelAmountPerBlocks, forgeWeight, forgesTotalWeight)
213- let amountToDeliverPerBlock = fraction(forgeBlockValue, assetQuantity, forgeSupplies)
212+ let amountToDeliverPerBlock = fraction(fraction(nibelAmountPerBlocks, forgeWeight, forgesTotalWeight), assetQuantity, forgeSupplies)
214213 if ((1 > amountToDeliverPerBlock))
215- then throw("Below minimum required amount")
214+ then throw("Below minimum required")
216215 else {
217216 let amountToDeliverTotal = (amountToDeliverPerBlock * eligibleBlocks)
218217 if ((isSafeInteger(amountToDeliverTotal) != true))
219218 then throw("System error")
220- else [IntegerEntry("assetQuantity", assetQuantity), IntegerEntry("eligibleBlocks", eligibleBlocks), IntegerEntry("forgeWeight", forgeWeight), IntegerEntry("forgeSupplies", forgeSupplies), IntegerEntry("forgesTotalWeight", forgesTotalWeight), IntegerEntry("forgeBlockValue", forgeBlockValue), IntegerEntry("amountToDeliverPerBlock", amountToDeliverPerBlock), IntegerEntry("amountToDeliverTotal", amountToDeliverTotal)]
219+ else [Reissue(nibelAsset, amountToDeliverTotal, true), ScriptTransfer(i.caller, amountToDeliverTotal, nibelAsset), IntegerEntry("assetQuantity", assetQuantity), IntegerEntry("eligibleBlocks", eligibleBlocks), IntegerEntry("forgeWeight", forgeWeight), IntegerEntry("forgeSupplies", forgeSupplies), IntegerEntry("forgesTotalWeight", forgesTotalWeight), IntegerEntry("amountToDeliverPerBlock", amountToDeliverPerBlock), IntegerEntry("amountToDeliverTotal", amountToDeliverTotal)]
221220 }
222221 }
223222 }
224223 }
225224 }
226225 }
227226
228227

github/deemru/w8io/169f3d6 
56.74 ms