tx · 6NvNL9Dw18AKxNs3MxrXce8G5Zdvg41sWixyvaa3zNGD

3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm:  -0.01000000 Waves

2022.12.02 23:42 [2343224] smart account 3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm > SELF 0.00000000 Waves

{ "type": 13, "id": "6NvNL9Dw18AKxNs3MxrXce8G5Zdvg41sWixyvaa3zNGD", "fee": 1000000, "feeAssetId": null, "timestamp": 1670013755502, "version": 2, "chainId": 84, "sender": "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm", "senderPublicKey": "EVooykMNV691Venwp1dHUTBd7KWequzUcda57Wd3LQEX", "proofs": [ "4Zn5vNfUyR35BEE3Lk54XCrpAwnEKZHeKCtrhty4FDsWq1wdUNH16rFqhQz4z8WjjP9cyjkmckP39BjaGDsXpF1H" ], "script": "base64:BgIZCAISABIDCgEIEgASAwoBCBIHCgUBCAICCCAAC3VzZG5Bc3NldElkASD3dur394PKZdtuE+4CO89YKZWpwdGN8kvabNgdYoDI3gANaW5jdWJhdG9yQWRkcgUEdGhpcwALYnJlZWRlckFkZHIFBHRoaXMAC2JhY2tFbmRBZGRyCQERQGV4dHJOYXRpdmUoMTA2MikBAiMzTjVTcFgyMVIzUjc1UW80ZWIzTXdGRnZXN1RVenlodmF2dgADcHViASBPU+IaP1So1p1SThMdRidVvbNT8yx7yVRUsP9DwbQUKAAKTEFORFBSRUZJWAIETEFORAAKRFVDS1BSRUZJWAIERFVDSwAPREFJTFlSRVNCWVBJRUNFAID40gEACURBWU1JTExJUwCAuJkpARFrZXlBc3NldElkVG9Pd25lcgEHYXNzZXRJZAkArAICAgluZnRPd25lcl8FB2Fzc2V0SWQBFmtleVN0YWtlZFRpbWVCeUFzc2V0SWQBB2Fzc2V0SWQJAKwCAgILc3Rha2VkVGltZV8FB2Fzc2V0SWQBFGtleVN0YWtlZER1Y2tCeU93bmVyAQlvd25lckFkZHIJAKwCAgISc3Rha2VkRHVja0J5T3duZXJf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3VycmVudFBhY2sJALUJAgkBC3ZhbHVlT3JFbHNlAgkAoggBBQVicEtleQILMF8wXzBfMF8wXzACAV8EBWJwUmVzCQEGYWRkUmVzAwULY3VycmVudFBhY2sFDXRlcnJhaW5Db3VudHMJAGUCBQlkZWx0YVRpbWUFDG5ld0RlbHRhVGltZQkAlAoCCQDMCAIJAQtTdHJpbmdFbnRyeQIFBWJwS2V5BQVicFJlcwkAzAgCCQELU3RyaW5nRW50cnkCCQEPa2V5RHVja0xvY2F0aW9uAQUOZHVja0Fzc2V0SWRTdHIFC25ld0xvY2F0aW9uCQDMCAIJAQxJbnRlZ2VyRW50cnkCBQd0aW1lS2V5BQxuZXdUaW1lc3RhbXAJAMwIAgkBDEludGVnZXJFbnRyeQIJASJrZXlTdGFrZWRUaW1lQnlUeXBlQXNzZXRJZEFuZE93bmVyAwUKTEFORFBSRUZJWAUKYXNzZXRJZFN0cgUFb3duZXIFDG5ld1RpbWVzdGFtcAUDbmlsCQCwCQEFB21lc3NhZ2UJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AX44YNA==", "height": 2343224, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Da1HetFbHC4eaY1Yo5RrSP17Da1xNTaC7LbSCsz4Btxt Next: 6M2Av3UWpEJyq9niZBvThsnzPUzF17Uot1oYVDQy1xeX Diff:
OldNewDifferences
283283 let newTimestamp = (lastBlock.timestamp - newDeltaTime)
284284 let bpKey = keyBackpackResByDuck(duckAssetIdStr)
285285 let currentPack = split(valueOrElse(getString(bpKey), "0_0_0_0_0_0"), "_")
286- let bpRes = addRes(currentPack, terrainCounts, newDeltaTime)
286+ let bpRes = addRes(currentPack, terrainCounts, (deltaTime - newDeltaTime))
287287 $Tuple2([StringEntry(bpKey, bpRes), StringEntry(keyDuckLocation(duckAssetIdStr), newLocation), IntegerEntry(timeKey, newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, assetIdStr, owner), newTimestamp)], toUtf8String(message))
288288 }
289289 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let usdnAssetId = base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ'
55
66 let incubatorAddr = this
77
88 let breederAddr = this
99
1010 let backEndAddr = addressFromStringValue("3N5SpX21R3R75Qo4eb3MwFFvW7TUzyhvavv")
1111
1212 let pub = base58'6LfPuKJjLgekmncBhMg2LZyMTNVzZBccXR28ySXm9uXD'
1313
1414 let LANDPREFIX = "LAND"
1515
1616 let DUCKPREFIX = "DUCK"
1717
1818 let DAILYRESBYPIECE = 3456000
1919
2020 let DAYMILLIS = 86400000
2121
2222 func keyAssetIdToOwner (assetId) = ("nftOwner_" + assetId)
2323
2424
2525 func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId)
2626
2727
2828 func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr)
2929
3030
3131 func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr)
3232
3333
3434 func keyLandToOwner (landNum) = ("landOwner_" + landNum)
3535
3636
3737 func keyBackpackResByDuck (duckAssetId) = ("backPackRes_" + duckAssetId)
3838
3939
4040 func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId)
4141
4242
4343 let recLandNum = 0
4444
4545 let recLandSize = 1
4646
4747 let recTerrains = 2
4848
4949 let recContinent = 3
5050
5151 let locIdxContinent = 0
5252
5353 let locIdxType = 1
5454
5555 let locIdxId = 2
5656
5757 let idxA = 0
5858
5959 let idxB = 1
6060
6161 let idxC = 2
6262
6363 let idxD = 3
6464
6565 let idxE = 4
6666
6767 let idxF = 5
6868
6969 func countTerrains (terrains) = [(size(split(terrains, "A")) - 1), (size(split(terrains, "B")) - 1), (size(split(terrains, "C")) - 1), (size(split(terrains, "D")) - 1), (size(split(terrains, "E")) - 1), (size(split(terrains, "F")) - 1)]
7070
7171
7272 func numPiecesBySize (landSize) = match landSize {
7373 case _ =>
7474 if (("S" == $match0))
7575 then 25
7676 else if (("M" == $match0))
7777 then 100
7878 else if (("L" == $match0))
7979 then 225
8080 else if (("XL" == $match0))
8181 then 400
8282 else if (("XXL" == $match0))
8383 then 625
8484 else throw("Unknown land size")
8585 }
8686
8787
8888 func addRes (currentPack,terrainCounts,deltaTime) = {
8989 func adder (acc,i) = {
9090 let resOfType = (fraction(deltaTime, DAILYRESBYPIECE, DAYMILLIS) * terrainCounts[i])
9191 (acc :+ toString((parseIntValue(currentPack[i]) + resOfType)))
9292 }
9393
9494 let r = {
9595 let $l = [0, 1, 2, 3, 4, 5]
9696 let $s = size($l)
9797 let $acc0 = nil
9898 func $f0_1 ($a,$i) = if (($i >= $s))
9999 then $a
100100 else adder($a, $l[$i])
101101
102102 func $f0_2 ($a,$i) = if (($i >= $s))
103103 then $a
104104 else throw("List size exceeds 6")
105105
106106 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
107107 }
108108 makeString(r, "_")
109109 }
110110
111111
112112 @Callable(i)
113113 func stakeLand () = {
114114 let pmt = value(i.payments[0])
115115 let assetId = value(pmt.assetId)
116116 let address = toString(i.caller)
117117 if ((pmt.amount != 1))
118118 then throw((("NFT " + LANDPREFIX) + " token should be attached as payment"))
119119 else {
120120 let asset = value(assetInfo(assetId))
121121 if ((asset.issuer != this))
122122 then throw("Unknown issuer of token")
123123 else if (!(contains(asset.name, LANDPREFIX)))
124124 then throw((("Only NFT " + LANDPREFIX) + " tokens are accepted"))
125125 else {
126126 let landNumSize = drop(asset.name, 4)
127127 let landNum = if (contains(landNumSize, "XXL"))
128128 then dropRight(landNumSize, 3)
129129 else if (contains(landNumSize, "XL"))
130130 then dropRight(landNumSize, 2)
131131 else dropRight(landNumSize, 1)
132132 if (!(isDefined(parseInt(landNum))))
133133 then throw(("Cannot parse land number from " + asset.name))
134134 else {
135135 let timeKey = keyStakedTimeByAssetId(toBase58String(assetId))
136136 if (isDefined(getInteger(timeKey)))
137137 then throw((("NFT " + asset.name) + " is already staked"))
138138 else [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyAssetIdToOwner(toBase58String(assetId)), address), StringEntry(keyLandToOwner(landNum), address)]
139139 }
140140 }
141141 }
142142 }
143143
144144
145145
146146 @Callable(i)
147147 func unstakeLand (assetIdStr) = if ((size(i.payments) != 0))
148148 then throw("unstake doesn't require any payments")
149149 else {
150150 let assetId = fromBase58String(assetIdStr)
151151 let address = toString(i.caller)
152152 let asset = value(assetInfo(assetId))
153153 if ((asset.issuer != this))
154154 then throw("Unknown issuer of token")
155155 else if (!(contains(asset.name, LANDPREFIX)))
156156 then throw((("Only NFT " + LANDPREFIX) + " tokens can be unstaked"))
157157 else {
158158 let timeKey = keyStakedTimeByAssetId(assetIdStr)
159159 if (!(isDefined(timeKey)))
160160 then throw((("NFT " + asset.name) + " is not staked"))
161161 else {
162162 let owner = valueOrErrorMessage(getString(keyAssetIdToOwner(assetIdStr)), (("NFT " + asset.name) + " is orphaned"))
163163 if ((owner != address))
164164 then throw("Staked NFT is not yours")
165165 else [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, assetIdStr, address))]
166166 }
167167 }
168168 }
169169
170170
171171
172172 @Callable(i)
173173 func stakeDuck () = {
174174 let pmt = value(i.payments[0])
175175 let assetId = value(pmt.assetId)
176176 let address = toString(i.caller)
177177 if ((pmt.amount != 1))
178178 then throw((("NFT " + DUCKPREFIX) + " token should be attached as payment"))
179179 else {
180180 let asset = value(assetInfo(assetId))
181181 if (if ((asset.issuer != incubatorAddr))
182182 then (asset.issuer != breederAddr)
183183 else false)
184184 then throw((("Unknown issuer of " + DUCKPREFIX) + " token"))
185185 else if (!(contains(asset.name, DUCKPREFIX)))
186186 then throw((("Only NFT " + DUCKPREFIX) + " tokens are accepted"))
187187 else {
188188 let assetIdStr = toBase58String(assetId)
189189 let timeKey = keyStakedTimeByAssetId(assetIdStr)
190190 if (isDefined(getInteger(timeKey)))
191191 then throw((("NFT " + asset.name) + " is already staked"))
192192 else if (isDefined(getString(keyStakedDuckByOwner(address))))
193193 then throw(("You already staked one duck: " + asset.name))
194194 else [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyAssetIdToOwner(assetIdStr), address), StringEntry(keyStakedDuckByOwner(address), assetIdStr)]
195195 }
196196 }
197197 }
198198
199199
200200
201201 @Callable(i)
202202 func unstakeDuck (assetIdStr) = if ((size(i.payments) != 0))
203203 then throw("unstake doesn't require any payments")
204204 else {
205205 let assetId = fromBase58String(assetIdStr)
206206 let address = toString(i.caller)
207207 let asset = value(assetInfo(assetId))
208208 if (if ((asset.issuer != incubatorAddr))
209209 then (asset.issuer != breederAddr)
210210 else false)
211211 then throw((("Unknown issuer of " + DUCKPREFIX) + " token"))
212212 else if (!(contains(asset.name, DUCKPREFIX)))
213213 then throw((("Only NFT " + DUCKPREFIX) + " tokens can be unstaked"))
214214 else {
215215 let timeKey = keyStakedTimeByAssetId(toBase58String(assetId))
216216 if (!(isDefined(timeKey)))
217217 then throw((("NFT " + asset.name) + " is not staked"))
218218 else if (!(isDefined(keyStakedDuckByOwner(address))))
219219 then throw((("The duck " + asset.name) + " is not staked"))
220220 else {
221221 let owner = valueOrErrorMessage(getString(keyAssetIdToOwner(toBase58String(assetId))), (("NFT " + asset.name) + " is orphaned"))
222222 if ((owner != address))
223223 then throw("Staked NFT is not yours")
224224 else [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, assetIdStr, address)), DeleteEntry(keyStakedDuckByOwner(address))]
225225 }
226226 }
227227 }
228228
229229
230230
231231 @Callable(i)
232232 func claimRes (amount,assetIdStr,message,sig,newLocation) = if (!(sigVerify_8Kb(message, sig, pub)))
233233 then throw("signature does not match")
234234 else if ((size(i.payments) != 0))
235235 then throw("claimRes doesn't require any payments")
236236 else {
237237 let addr = toString(i.caller)
238238 let asset = value(assetInfo(fromBase58String(assetIdStr)))
239239 if (!(contains(asset.name, LANDPREFIX)))
240240 then throw((("NFT " + LANDPREFIX) + " token should be passed as param"))
241241 else {
242242 let timeKey = keyStakedTimeByAssetId(assetIdStr)
243243 let savedTime = getInteger(timeKey)
244244 if (!(isDefined(savedTime)))
245245 then throw((("NFT " + asset.name) + " is not staked"))
246246 else {
247247 let owner = getStringValue(keyAssetIdToOwner(assetIdStr))
248248 if ((owner != addr))
249249 then throw((LANDPREFIX + " is not yours"))
250250 else {
251251 let d = split(asset.description, "_")
252252 let landSize = d[recLandSize]
253253 let terrainCounts = countTerrains(d[recTerrains])
254254 let landContinent = d[recContinent]
255255 let duck = getString(keyStakedDuckByOwner(addr))
256256 if (!(isDefined(duck)))
257257 then throw("You don't have a duck staked")
258258 else {
259259 let duckAssetIdStr = value(duck)
260260 let curLocation = getString(keyDuckLocation(duckAssetIdStr))
261261 let checkLocation = if (isDefined(curLocation))
262262 then {
263263 let loc = split(value(curLocation), "_")
264264 if ((loc[locIdxType] != "L"))
265265 then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L"))
266266 else if ((loc[locIdxId] != assetIdStr))
267267 then throw(((("Duck location id is " + loc[locIdxId]) + ", but should be ") + assetIdStr))
268268 else true
269269 }
270270 else true
271271 if ((checkLocation == checkLocation))
272272 then {
273273 let deltaTime = (lastBlock.timestamp - value(savedTime))
274274 if ((0 > deltaTime))
275275 then throw(((("Saved timestamp is in future, saved = " + toString(value(savedTime))) + ", current = ") + toString(lastBlock.timestamp)))
276276 else {
277277 let pieces = numPiecesBySize(landSize)
278278 let availRes = (fraction(deltaTime, DAILYRESBYPIECE, DAYMILLIS) * pieces)
279279 if ((amount > availRes))
280280 then throw(((("Not enough resources, available = " + toString(availRes)) + ", requested = ") + toString(amount)))
281281 else {
282282 let newDeltaTime = fraction((availRes - amount), DAYMILLIS, (pieces * DAILYRESBYPIECE))
283283 let newTimestamp = (lastBlock.timestamp - newDeltaTime)
284284 let bpKey = keyBackpackResByDuck(duckAssetIdStr)
285285 let currentPack = split(valueOrElse(getString(bpKey), "0_0_0_0_0_0"), "_")
286- let bpRes = addRes(currentPack, terrainCounts, newDeltaTime)
286+ let bpRes = addRes(currentPack, terrainCounts, (deltaTime - newDeltaTime))
287287 $Tuple2([StringEntry(bpKey, bpRes), StringEntry(keyDuckLocation(duckAssetIdStr), newLocation), IntegerEntry(timeKey, newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, assetIdStr, owner), newTimestamp)], toUtf8String(message))
288288 }
289289 }
290290 }
291291 else throw("Strict value is not equal to itself.")
292292 }
293293 }
294294 }
295295 }
296296 }
297297
298298

github/deemru/w8io/169f3d6 
76.54 ms