tx · 9YNBxWmvUGoLXxNutSBPEoXRvBgaxH7mQo4vzjVbZgpA

3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep:  -0.01000000 Waves

2022.12.29 01:09 [2380703] smart account 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep > SELF 0.00000000 Waves

{ "type": 13, "id": "9YNBxWmvUGoLXxNutSBPEoXRvBgaxH7mQo4vzjVbZgpA", "fee": 1000000, "feeAssetId": null, "timestamp": 1672265375714, "version": 2, "chainId": 84, "sender": "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep", "senderPublicKey": "7v5L7QkXxfkirALdyqmox38QCsa9jtfAtgUfHTh34eWq", "proofs": [ "3VEojecqRudjPA9iFnsz1fmeoC8AyVWKN4JbWyMjzjaCTKiFj3PcAf832kHV5qZTNWhZBwRoB1z7xhABLzq3sbvB" ], "script": "base64:BgIOCAISBAoCERESBAoCEREfAAVNVUxUNgDAhD0ABU1VTFQ4AIDC1y8ABk1VTFQxMACAyK+gJQAFY2hhaW4JALAJAQkAyQECCQDKAQIIBQR0aGlzBWJ5dGVzAAEAAQALdXNkbkFzc2V0SWQEByRtYXRjaDAFBWNoYWluAwkAAAICAVcFByRtYXRjaDABILYmKcME9c5TkaQOS3UkL2SMUbH6369UKb1I0h0qsqrRAwkAAAICAVQFByRtYXRjaDABIPd26vf3g8pl224T7gI7z1gplanB0Y3yS9ps2B1igMjeCQACAQINVW5rbm93biBjaGFpbgAPc3Rha2luZ0NvbnRyYWN0CQERQGV4dHJOYXRpdmUoMTA2MikBBAckbWF0Y2gwBQVjaGFpbgMJAAACAgFXBQckbWF0Y2gwAiMzUExuY1h0UzFVODNENmNRYkZEM0g4ckJIUExnenhTRktaMQMJAAACAgFUBQckbWF0Y2gwAiMzTkRDeUJHNXE4NUp1YVJpaWdVZUV0YWlueWpDUVQzWHBabQkAAgECDVVua25vd24gY2hhaW4AD0RFRkFVTFRMT0NBVElPTgIPQWZyaWNhX0ZfQWZyaWNhAAZOVU1S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JhY2twYWNrCQDMCAIFC2R1Y2tBc3NldElkCQDMCAIFB25ld1BhY2sFA25pbAUDbmlsBARyZXN0AwkAZgIJAGUCBQNhbXQIBQZtZXJnZWQCXzMAAAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIJAGUCBQNhbXQIBQZtZXJnZWQCXzMFC3VzZG5Bc3NldElkBQNuaWwFA25pbAkAlAoCCQDOCAIIBQZtZXJnZWQCXzEFBHJlc3QFBnJlc3VsdAAay5Er", "height": 2380703, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Ak5wThy6788jfSt9LcgREpNGNVjaVFRqfBqR4hnuS4aX Next: AQW4awMwXU4cnSBKhk5bxkr77ucERSQZrXfCSZBf8Usb Diff:
OldNewDifferences
44 let MULT6 = 1000000
55
66 let MULT8 = 100000000
7+
8+let MULT10 = 10000000000
79
810 let chain = toUtf8String(take(drop(this.bytes, 1), 1))
911
145147 else 0
146148 let m0 = min([w0, (amount - m1)])
147149 let m = (m0 + m1)
148- let usdnSpent = (fraction(m0, ((3 * RESOURCEPRICEMIN) - fraction((w0 - (m0 / 2)), RESOURCEPRICEMIN, FACTORYMAXWAREHOUSE)), MULT8) + fraction(m1, (2 * RESOURCEPRICEMIN), MULT8))
150+ let usdnSpent = (fraction(m0, ((300 * RESOURCEPRICEMIN) - fraction(((100 * w0) - (50 * m0)), RESOURCEPRICEMIN, FACTORYMAXWAREHOUSE)), MULT10) + fraction(m1, (2 * RESOURCEPRICEMIN), MULT8))
149151 let max101 = (maxPrice + (maxPrice / 100))
150152 if (((usdnSpent * MULT8) > (max101 * m)))
151153 then throw((((((((((("Actual price = " + toString(usdnSpent)) + " / ") + toString(m)) + " > maxPrice = ") + toString(maxPrice)) + ", (") + locId) + ", ") + matTypes[matType]) + ")"))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let MULT6 = 1000000
55
66 let MULT8 = 100000000
7+
8+let MULT10 = 10000000000
79
810 let chain = toUtf8String(take(drop(this.bytes, 1), 1))
911
1012 let usdnAssetId = match chain {
1113 case _ =>
1214 if (("W" == $match0))
1315 then base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
1416 else if (("T" == $match0))
1517 then base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ'
1618 else throw("Unknown chain")
1719 }
1820
1921 let stakingContract = addressFromStringValue(match chain {
2022 case _ =>
2123 if (("W" == $match0))
2224 then "3PLncXtS1U83D6cQbFD3H8rBHPLgzxSFKZ1"
2325 else if (("T" == $match0))
2426 then "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm"
2527 else throw("Unknown chain")
2628 })
2729
2830 let DEFAULTLOCATION = "Africa_F_Africa"
2931
3032 let NUMRES = 6
3133
3234 let FACTORYMAXWAREHOUSE = 10000000000
3335
3436 let RESOURCEPRICEMIN = 158549
3537
3638 let MINPAYMENT = 10000
3739
3840 let resTypes = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"]
3941
4042 let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
4143
4244 let continents = ["Americas", "Europe", "Asia", "Africa", "Oceania"]
4345
4446 func keyFactoryWarehouseByIdAndType (factoryId,resType) = ((("factoryWhByContinentAndRes_" + factoryId) + "_") + toString(resType))
4547
4648
4749 func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr)
4850
4951
5052 func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId)
5153
5254
5355 func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId)
5456
5557
5658 let locIdxContinent = 0
5759
5860 let locIdxType = 1
5961
6062 let locIdxId = 2
6163
6264 let bpIdxLevel = 0
6365
6466 let bpIdxRes = 1
6567
6668 let bpIdxMat = 2
6769
6870 let bpIdxProd = 3
6971
7072 func asString (v) = match v {
7173 case s: String =>
7274 s
7375 case _ =>
7476 throw("fail to cast into String")
7577 }
7678
7779
7880 func subRes (resList,resType,amount) = {
7981 func subber (acc,i) = (acc :+ (if ((i == resType))
8082 then toString((parseIntValue(resList[i]) - amount))
8183 else resList[i]))
8284
8385 let r = {
8486 let $l = [0, 1, 2, 3, 4, 5]
8587 let $s = size($l)
8688 let $acc0 = nil
8789 func $f0_1 ($a,$i) = if (($i >= $s))
8890 then $a
8991 else subber($a, $l[$i])
9092
9193 func $f0_2 ($a,$i) = if (($i >= $s))
9294 then $a
9395 else throw("List size exceeds 6")
9496
9597 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
9698 }
9799 makeString(r, "_")
98100 }
99101
100102
101103 func addMat (matList,matType,amount) = {
102104 func increaser (acc,i) = (acc :+ (if ((i == matType))
103105 then toString((parseIntValue(matList[i]) + amount))
104106 else matList[i]))
105107
106108 let m = {
107109 let $l = [0, 1, 2, 3, 4, 5]
108110 let $s = size($l)
109111 let $acc0 = nil
110112 func $f0_1 ($a,$i) = if (($i >= $s))
111113 then $a
112114 else increaser($a, $l[$i])
113115
114116 func $f0_2 ($a,$i) = if (($i >= $s))
115117 then $a
116118 else throw("List size exceeds 6")
117119
118120 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
119121 }
120122 makeString(m, "_")
121123 }
122124
123125
124126 func sellInternal (locId,resType,amount,minPrice) = {
125127 let whKey = keyFactoryWarehouseByIdAndType(locId, resType)
126128 let w0 = valueOrElse(getInteger(whKey), 0)
127129 let r0 = if ((w0 > FACTORYMAXWAREHOUSE))
128130 then 0
129131 else if (((w0 + amount) > FACTORYMAXWAREHOUSE))
130132 then (FACTORYMAXWAREHOUSE - w0)
131133 else amount
132134 let usdnReceived = (fraction(r0, ((2 * RESOURCEPRICEMIN) - fraction((w0 + (r0 / 2)), RESOURCEPRICEMIN, FACTORYMAXWAREHOUSE)), MULT8) + fraction((amount - r0), RESOURCEPRICEMIN, MULT8))
133135 let min99 = (minPrice - (minPrice / 100))
134136 if (((min99 * amount) > (usdnReceived * MULT8)))
135137 then throw((((((((((("Actual price = " + toString(usdnReceived)) + " / ") + toString(amount)) + " < minPrice = ") + toString(minPrice)) + ", (") + locId) + ", ") + resTypes[resType]) + ")"))
136138 else $Tuple2(IntegerEntry(whKey, (w0 + amount)), usdnReceived)
137139 }
138140
139141
140142 func buyInternal (locId,matType,amount,maxPrice) = {
141143 let whKey = keyFactoryWarehouseByIdAndType(locId, matType)
142144 let w0 = valueOrElse(getInteger(whKey), 0)
143145 let m1 = if ((w0 > FACTORYMAXWAREHOUSE))
144146 then min([amount, (w0 - FACTORYMAXWAREHOUSE)])
145147 else 0
146148 let m0 = min([w0, (amount - m1)])
147149 let m = (m0 + m1)
148- let usdnSpent = (fraction(m0, ((3 * RESOURCEPRICEMIN) - fraction((w0 - (m0 / 2)), RESOURCEPRICEMIN, FACTORYMAXWAREHOUSE)), MULT8) + fraction(m1, (2 * RESOURCEPRICEMIN), MULT8))
150+ let usdnSpent = (fraction(m0, ((300 * RESOURCEPRICEMIN) - fraction(((100 * w0) - (50 * m0)), RESOURCEPRICEMIN, FACTORYMAXWAREHOUSE)), MULT10) + fraction(m1, (2 * RESOURCEPRICEMIN), MULT8))
149151 let max101 = (maxPrice + (maxPrice / 100))
150152 if (((usdnSpent * MULT8) > (max101 * m)))
151153 then throw((((((((((("Actual price = " + toString(usdnSpent)) + " / ") + toString(m)) + " > maxPrice = ") + toString(maxPrice)) + ", (") + locId) + ", ") + matTypes[matType]) + ")"))
152154 else $Tuple3(IntegerEntry(whKey, (w0 - m)), usdnSpent, m)
153155 }
154156
155157
156158 func getBackpack (bpKey) = {
157159 let p = split(valueOrElse(getString(stakingContract, bpKey), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":")
158160 [toString(valueOrElse(parseInt(p[bpIdxLevel]), 0)), if ((size(split(p[bpIdxRes], "_")) == NUMRES))
159161 then p[bpIdxRes]
160162 else "0_0_0_0_0_0", if ((size(split(p[bpIdxMat], "_")) == NUMRES))
161163 then p[bpIdxMat]
162164 else "0_0_0_0_0_0", p[bpIdxProd]]
163165 }
164166
165167
166168 @Callable(i)
167169 func sellResources (amounts,minPrices) = {
168170 let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
169171 if ((size(i.payments) != 0))
170172 then throw("sellResources doesn't require any payments")
171173 else {
172174 let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_")
173175 if ((curLocation[locIdxType] != "F"))
174176 then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType]))
175177 else {
176178 let locId = curLocation[locIdxId]
177179 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
178180 let resList = split(currentPack[bpIdxRes], "_")
179181 func adder (acc,j) = if ((amounts[j] > parseIntValue(resList[j])))
180182 then throw(((((("You have " + resList[j]) + " of ") + resTypes[j]) + ", but tried to sell ") + toString(amounts[j])))
181183 else if ((0 > amounts[j]))
182184 then throw(((("You tried to sell negative amount of " + resTypes[j]) + ": ") + toString(amounts[j])))
183185 else if ((amounts[j] > 0))
184186 then {
185187 let b = sellInternal(locId, j, amounts[j], minPrices[value(j)])
186188 $Tuple3((acc._1 :+ b._1), (acc._2 :+ toString((parseIntValue(resList[j]) - amounts[j]))), (acc._3 + b._2))
187189 }
188190 else $Tuple3(acc._1, (acc._2 :+ resList[j]), acc._3)
189191
190192 let merged = {
191193 let $l = [0, 1, 2, 3, 4, 5]
192194 let $s = size($l)
193195 let $acc0 = $Tuple3(nil, nil, 0)
194196 func $f0_1 ($a,$i) = if (($i >= $s))
195197 then $a
196198 else adder($a, $l[$i])
197199
198200 func $f0_2 ($a,$i) = if (($i >= $s))
199201 then $a
200202 else throw("List size exceeds 6")
201203
202204 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
203205 }
204206 let newPack = makeString([currentPack[bpIdxLevel], makeString(merged._2, "_"), currentPack[bpIdxMat], currentPack[bpIdxProd]], ":")
205207 let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
206208 $Tuple2((merged._1 :+ ScriptTransfer(i.caller, merged._3, usdnAssetId)), result)
207209 }
208210 }
209211 }
210212
211213
212214
213215 @Callable(i)
214216 func buyMaterials (amounts,maxPrices) = {
215217 let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
216218 if ((size(i.payments) != 1))
217219 then throw("exactly 1 payment must be attached")
218220 else {
219221 let pmt = i.payments[0]
220222 let amt = pmt.amount
221223 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
222224 if ((pmtAssetId != usdnAssetId))
223225 then throw("USDN payments only!")
224226 else {
225227 let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_")
226228 if ((curLocation[locIdxType] != "F"))
227229 then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType]))
228230 else {
229231 let locId = curLocation[locIdxId]
230232 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
231233 let matList = split(currentPack[bpIdxMat], "_")
232234 func mUpdater (acc,j) = if ((0 > amounts[j]))
233235 then throw(((("You tried to buy negative amount of " + matTypes[j]) + ": ") + toString(amounts[j])))
234236 else if ((amounts[j] > 0))
235237 then {
236238 let b = buyInternal(locId, j, amounts[j], maxPrices[j])
237239 $Tuple3((acc._1 :+ b._1), (acc._2 :+ toString((parseIntValue(matList[j]) + b._3))), (acc._3 + b._2))
238240 }
239241 else $Tuple3(acc._1, (acc._2 :+ matList[j]), acc._3)
240242
241243 let merged = {
242244 let $l = [0, 1, 2, 3, 4, 5]
243245 let $s = size($l)
244246 let $acc0 = $Tuple3(nil, nil, 0)
245247 func $f0_1 ($a,$i) = if (($i >= $s))
246248 then $a
247249 else mUpdater($a, $l[$i])
248250
249251 func $f0_2 ($a,$i) = if (($i >= $s))
250252 then $a
251253 else throw("List size exceeds 6")
252254
253255 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
254256 }
255257 if ((merged._3 > amt))
256258 then throw(((("Insufficient payment! Attached=" + toString(amt)) + ", required=") + toString(merged._3)))
257259 else {
258260 let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(merged._2, "_"), currentPack[bpIdxProd]], ":")
259261 let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
260262 let rest = if (((amt - merged._3) > 0))
261263 then [ScriptTransfer(i.caller, (amt - merged._3), usdnAssetId)]
262264 else nil
263265 $Tuple2((merged._1 ++ rest), result)
264266 }
265267 }
266268 }
267269 }
268270 }
269271
270272

github/deemru/w8io/026f985 
41.37 ms