tx · 6M2Av3UWpEJyq9niZBvThsnzPUzF17Uot1oYVDQy1xeX

3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm:  -0.01000000 Waves

2022.12.03 16:15 [2344225] smart account 3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm > SELF 0.00000000 Waves

{ "type": 13, "id": "6M2Av3UWpEJyq9niZBvThsnzPUzF17Uot1oYVDQy1xeX", "fee": 1000000, "feeAssetId": null, "timestamp": 1670073326796, "version": 2, "chainId": 84, "sender": "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm", "senderPublicKey": "EVooykMNV691Venwp1dHUTBd7KWequzUcda57Wd3LQEX", "proofs": [ "2YejwN5Ut7ftxrD6t8XyKzcETCvYJ5gDidGAWnumbpZQWdNoSM9VLy3oRdvG62KD6bk4kcKnjWbxMNBi5EJEcJ3F" ], "script": "base64:BgIZCAISABIDCgEIEgASAwoBCBIHCgUBCAICCCQAC3VzZG5Bc3NldElkASD3dur394PKZdtuE+4CO89YKZWpwdGN8kvabNgdYoDI3gANaW5jdWJhdG9yQWRkcgUEdGhpcwALYnJlZWRlckFkZHIFBHRoaXMAC2JhY2tFbmRBZGRyCQERQGV4dHJOYXRpdmUoMTA2MikBAiMzTjVTcFgyMVIzUjc1UW80ZWIzTXdGRnZXN1RVenlodmF2dgADcHViASBPU+IaP1So1p1SThMdRidVvbNT8yx7yVRUsP9DwbQUKAAKTEFORFBSRUZJWAIETEFORAAKRFVDS1BSRUZJWAIERFVDSwAPREFJTFlSRVNCWVBJRUNFAID40gEACURBWU1JTExJUwCAuJkpARFrZXlBc3NldElkVG9Pd25lcgEHYXNzZXRJZAkArAICAgluZnRPd25lcl8FB2Fzc2V0SWQBFmtleVN0YWtlZFRpbWVCeUFzc2V0SWQBB2Fzc2V0SWQJAKwCAgILc3Rha2VkVGltZV8FB2Fzc2V0SWQBFGtleVN0YWtlZER1Y2tCeU93bmVyAQlvd25lckFkZHIJAKwCAgISc3Rha2VkRHVja0J5T3duZXJf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V5QmFja3BhY2tCeUR1Y2sBBQ5kdWNrQXNzZXRJZFN0cgQLY3VycmVudFBhY2sJALUJAgkBC3ZhbHVlT3JFbHNlAgkAoggBBQVicEtleQITMTAwXzA6MF8wXzBfMF8wXzA6OgIBOgQKY3VycmVudFJlcwkAtQkCCQCRAwIFC2N1cnJlbnRQYWNrBQhicElkeFJlcwIBXwQFYnBSZXMJAQZhZGRSZXMDBQpjdXJyZW50UmVzBQ10ZXJyYWluQ291bnRzCQBlAgUJZGVsdGFUaW1lBQxuZXdEZWx0YVRpbWUEB25ld1BhY2sJALkJAgkAzAgCCQCRAwIFC2N1cnJlbnRQYWNrBQlicElkeER1Y2sJAMwIAgUFYnBSZXMJAMwIAgkAkQMCBQtjdXJyZW50UGFjawUIYnBJZHhNYXQJAMwIAgkAkQMCBQtjdXJyZW50UGFjawUJYnBJZHhQcm9kBQNuaWwCAToJAJQKAgkAzAgCCQELU3RyaW5nRW50cnkCBQVicEtleQUHbmV3UGFjawkAzAgCCQELU3RyaW5nRW50cnkCCQEPa2V5RHVja0xvY2F0aW9uAQUOZHVja0Fzc2V0SWRTdHIFC25ld0xvY2F0aW9uCQDMCAIJAQxJbnRlZ2VyRW50cnkCBQd0aW1lS2V5BQxuZXdUaW1lc3RhbXAJAMwIAgkBDEludGVnZXJFbnRyeQIJASJrZXlTdGFrZWRUaW1lQnlUeXBlQXNzZXRJZEFuZE93bmVyAwUKTEFORFBSRUZJWAUKYXNzZXRJZFN0cgUFb3duZXIFDG5ld1RpbWVzdGFtcAUDbmlsCQCwCQEFB21lc3NhZ2UJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4ATwyfcg==", "height": 2344225, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6NvNL9Dw18AKxNs3MxrXce8G5Zdvg41sWixyvaa3zNGD Next: A2rtKFrBMpUZnWoFQfQgFZinbsceyqiC2XoyZUi2cf6a Diff:
OldNewDifferences
3434 func keyLandToOwner (landNum) = ("landOwner_" + landNum)
3535
3636
37-func keyBackpackResByDuck (duckAssetId) = ("backPackRes_" + duckAssetId)
37+func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId)
3838
3939
4040 func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId)
5353 let locIdxType = 1
5454
5555 let locIdxId = 2
56+
57+let bpIdxDuck = 0
58+
59+let bpIdxRes = 1
60+
61+let bpIdxMat = 2
62+
63+let bpIdxProd = 3
5664
5765 let idxA = 0
5866
8593 }
8694
8795
88-func addRes (currentPack,terrainCounts,deltaTime) = {
96+func addRes (currentRes,terrainCounts,deltaTime) = {
8997 func adder (acc,i) = {
9098 let resOfType = (fraction(deltaTime, DAILYRESBYPIECE, DAYMILLIS) * terrainCounts[i])
91- (acc :+ toString((parseIntValue(currentPack[i]) + resOfType)))
99+ (acc :+ toString((parseIntValue(currentRes[i]) + resOfType)))
92100 }
93101
94102 let r = {
281289 else {
282290 let newDeltaTime = fraction((availRes - amount), DAYMILLIS, (pieces * DAILYRESBYPIECE))
283291 let newTimestamp = (lastBlock.timestamp - newDeltaTime)
284- let bpKey = keyBackpackResByDuck(duckAssetIdStr)
285- let currentPack = split(valueOrElse(getString(bpKey), "0_0_0_0_0_0"), "_")
286- let bpRes = addRes(currentPack, terrainCounts, (deltaTime - newDeltaTime))
287- $Tuple2([StringEntry(bpKey, bpRes), StringEntry(keyDuckLocation(duckAssetIdStr), newLocation), IntegerEntry(timeKey, newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, assetIdStr, owner), newTimestamp)], toUtf8String(message))
292+ let bpKey = keyBackpackByDuck(duckAssetIdStr)
293+ let currentPack = split(valueOrElse(getString(bpKey), "100_0:0_0_0_0_0_0::"), ":")
294+ let currentRes = split(currentPack[bpIdxRes], "_")
295+ let bpRes = addRes(currentRes, terrainCounts, (deltaTime - newDeltaTime))
296+ let newPack = makeString([currentPack[bpIdxDuck], bpRes, currentPack[bpIdxMat], currentPack[bpIdxProd]], ":")
297+ $Tuple2([StringEntry(bpKey, newPack), StringEntry(keyDuckLocation(duckAssetIdStr), newLocation), IntegerEntry(timeKey, newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, assetIdStr, owner), newTimestamp)], toUtf8String(message))
288298 }
289299 }
290300 }
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
37-func keyBackpackResByDuck (duckAssetId) = ("backPackRes_" + duckAssetId)
37+func keyBackpackByDuck (duckAssetId) = ("backPack_" + 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
56+
57+let bpIdxDuck = 0
58+
59+let bpIdxRes = 1
60+
61+let bpIdxMat = 2
62+
63+let bpIdxProd = 3
5664
5765 let idxA = 0
5866
5967 let idxB = 1
6068
6169 let idxC = 2
6270
6371 let idxD = 3
6472
6573 let idxE = 4
6674
6775 let idxF = 5
6876
6977 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)]
7078
7179
7280 func numPiecesBySize (landSize) = match landSize {
7381 case _ =>
7482 if (("S" == $match0))
7583 then 25
7684 else if (("M" == $match0))
7785 then 100
7886 else if (("L" == $match0))
7987 then 225
8088 else if (("XL" == $match0))
8189 then 400
8290 else if (("XXL" == $match0))
8391 then 625
8492 else throw("Unknown land size")
8593 }
8694
8795
88-func addRes (currentPack,terrainCounts,deltaTime) = {
96+func addRes (currentRes,terrainCounts,deltaTime) = {
8997 func adder (acc,i) = {
9098 let resOfType = (fraction(deltaTime, DAILYRESBYPIECE, DAYMILLIS) * terrainCounts[i])
91- (acc :+ toString((parseIntValue(currentPack[i]) + resOfType)))
99+ (acc :+ toString((parseIntValue(currentRes[i]) + resOfType)))
92100 }
93101
94102 let r = {
95103 let $l = [0, 1, 2, 3, 4, 5]
96104 let $s = size($l)
97105 let $acc0 = nil
98106 func $f0_1 ($a,$i) = if (($i >= $s))
99107 then $a
100108 else adder($a, $l[$i])
101109
102110 func $f0_2 ($a,$i) = if (($i >= $s))
103111 then $a
104112 else throw("List size exceeds 6")
105113
106114 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
107115 }
108116 makeString(r, "_")
109117 }
110118
111119
112120 @Callable(i)
113121 func stakeLand () = {
114122 let pmt = value(i.payments[0])
115123 let assetId = value(pmt.assetId)
116124 let address = toString(i.caller)
117125 if ((pmt.amount != 1))
118126 then throw((("NFT " + LANDPREFIX) + " token should be attached as payment"))
119127 else {
120128 let asset = value(assetInfo(assetId))
121129 if ((asset.issuer != this))
122130 then throw("Unknown issuer of token")
123131 else if (!(contains(asset.name, LANDPREFIX)))
124132 then throw((("Only NFT " + LANDPREFIX) + " tokens are accepted"))
125133 else {
126134 let landNumSize = drop(asset.name, 4)
127135 let landNum = if (contains(landNumSize, "XXL"))
128136 then dropRight(landNumSize, 3)
129137 else if (contains(landNumSize, "XL"))
130138 then dropRight(landNumSize, 2)
131139 else dropRight(landNumSize, 1)
132140 if (!(isDefined(parseInt(landNum))))
133141 then throw(("Cannot parse land number from " + asset.name))
134142 else {
135143 let timeKey = keyStakedTimeByAssetId(toBase58String(assetId))
136144 if (isDefined(getInteger(timeKey)))
137145 then throw((("NFT " + asset.name) + " is already staked"))
138146 else [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyAssetIdToOwner(toBase58String(assetId)), address), StringEntry(keyLandToOwner(landNum), address)]
139147 }
140148 }
141149 }
142150 }
143151
144152
145153
146154 @Callable(i)
147155 func unstakeLand (assetIdStr) = if ((size(i.payments) != 0))
148156 then throw("unstake doesn't require any payments")
149157 else {
150158 let assetId = fromBase58String(assetIdStr)
151159 let address = toString(i.caller)
152160 let asset = value(assetInfo(assetId))
153161 if ((asset.issuer != this))
154162 then throw("Unknown issuer of token")
155163 else if (!(contains(asset.name, LANDPREFIX)))
156164 then throw((("Only NFT " + LANDPREFIX) + " tokens can be unstaked"))
157165 else {
158166 let timeKey = keyStakedTimeByAssetId(assetIdStr)
159167 if (!(isDefined(timeKey)))
160168 then throw((("NFT " + asset.name) + " is not staked"))
161169 else {
162170 let owner = valueOrErrorMessage(getString(keyAssetIdToOwner(assetIdStr)), (("NFT " + asset.name) + " is orphaned"))
163171 if ((owner != address))
164172 then throw("Staked NFT is not yours")
165173 else [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, assetIdStr, address))]
166174 }
167175 }
168176 }
169177
170178
171179
172180 @Callable(i)
173181 func stakeDuck () = {
174182 let pmt = value(i.payments[0])
175183 let assetId = value(pmt.assetId)
176184 let address = toString(i.caller)
177185 if ((pmt.amount != 1))
178186 then throw((("NFT " + DUCKPREFIX) + " token should be attached as payment"))
179187 else {
180188 let asset = value(assetInfo(assetId))
181189 if (if ((asset.issuer != incubatorAddr))
182190 then (asset.issuer != breederAddr)
183191 else false)
184192 then throw((("Unknown issuer of " + DUCKPREFIX) + " token"))
185193 else if (!(contains(asset.name, DUCKPREFIX)))
186194 then throw((("Only NFT " + DUCKPREFIX) + " tokens are accepted"))
187195 else {
188196 let assetIdStr = toBase58String(assetId)
189197 let timeKey = keyStakedTimeByAssetId(assetIdStr)
190198 if (isDefined(getInteger(timeKey)))
191199 then throw((("NFT " + asset.name) + " is already staked"))
192200 else if (isDefined(getString(keyStakedDuckByOwner(address))))
193201 then throw(("You already staked one duck: " + asset.name))
194202 else [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyAssetIdToOwner(assetIdStr), address), StringEntry(keyStakedDuckByOwner(address), assetIdStr)]
195203 }
196204 }
197205 }
198206
199207
200208
201209 @Callable(i)
202210 func unstakeDuck (assetIdStr) = if ((size(i.payments) != 0))
203211 then throw("unstake doesn't require any payments")
204212 else {
205213 let assetId = fromBase58String(assetIdStr)
206214 let address = toString(i.caller)
207215 let asset = value(assetInfo(assetId))
208216 if (if ((asset.issuer != incubatorAddr))
209217 then (asset.issuer != breederAddr)
210218 else false)
211219 then throw((("Unknown issuer of " + DUCKPREFIX) + " token"))
212220 else if (!(contains(asset.name, DUCKPREFIX)))
213221 then throw((("Only NFT " + DUCKPREFIX) + " tokens can be unstaked"))
214222 else {
215223 let timeKey = keyStakedTimeByAssetId(toBase58String(assetId))
216224 if (!(isDefined(timeKey)))
217225 then throw((("NFT " + asset.name) + " is not staked"))
218226 else if (!(isDefined(keyStakedDuckByOwner(address))))
219227 then throw((("The duck " + asset.name) + " is not staked"))
220228 else {
221229 let owner = valueOrErrorMessage(getString(keyAssetIdToOwner(toBase58String(assetId))), (("NFT " + asset.name) + " is orphaned"))
222230 if ((owner != address))
223231 then throw("Staked NFT is not yours")
224232 else [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, assetIdStr, address)), DeleteEntry(keyStakedDuckByOwner(address))]
225233 }
226234 }
227235 }
228236
229237
230238
231239 @Callable(i)
232240 func claimRes (amount,assetIdStr,message,sig,newLocation) = if (!(sigVerify_8Kb(message, sig, pub)))
233241 then throw("signature does not match")
234242 else if ((size(i.payments) != 0))
235243 then throw("claimRes doesn't require any payments")
236244 else {
237245 let addr = toString(i.caller)
238246 let asset = value(assetInfo(fromBase58String(assetIdStr)))
239247 if (!(contains(asset.name, LANDPREFIX)))
240248 then throw((("NFT " + LANDPREFIX) + " token should be passed as param"))
241249 else {
242250 let timeKey = keyStakedTimeByAssetId(assetIdStr)
243251 let savedTime = getInteger(timeKey)
244252 if (!(isDefined(savedTime)))
245253 then throw((("NFT " + asset.name) + " is not staked"))
246254 else {
247255 let owner = getStringValue(keyAssetIdToOwner(assetIdStr))
248256 if ((owner != addr))
249257 then throw((LANDPREFIX + " is not yours"))
250258 else {
251259 let d = split(asset.description, "_")
252260 let landSize = d[recLandSize]
253261 let terrainCounts = countTerrains(d[recTerrains])
254262 let landContinent = d[recContinent]
255263 let duck = getString(keyStakedDuckByOwner(addr))
256264 if (!(isDefined(duck)))
257265 then throw("You don't have a duck staked")
258266 else {
259267 let duckAssetIdStr = value(duck)
260268 let curLocation = getString(keyDuckLocation(duckAssetIdStr))
261269 let checkLocation = if (isDefined(curLocation))
262270 then {
263271 let loc = split(value(curLocation), "_")
264272 if ((loc[locIdxType] != "L"))
265273 then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L"))
266274 else if ((loc[locIdxId] != assetIdStr))
267275 then throw(((("Duck location id is " + loc[locIdxId]) + ", but should be ") + assetIdStr))
268276 else true
269277 }
270278 else true
271279 if ((checkLocation == checkLocation))
272280 then {
273281 let deltaTime = (lastBlock.timestamp - value(savedTime))
274282 if ((0 > deltaTime))
275283 then throw(((("Saved timestamp is in future, saved = " + toString(value(savedTime))) + ", current = ") + toString(lastBlock.timestamp)))
276284 else {
277285 let pieces = numPiecesBySize(landSize)
278286 let availRes = (fraction(deltaTime, DAILYRESBYPIECE, DAYMILLIS) * pieces)
279287 if ((amount > availRes))
280288 then throw(((("Not enough resources, available = " + toString(availRes)) + ", requested = ") + toString(amount)))
281289 else {
282290 let newDeltaTime = fraction((availRes - amount), DAYMILLIS, (pieces * DAILYRESBYPIECE))
283291 let newTimestamp = (lastBlock.timestamp - newDeltaTime)
284- let bpKey = keyBackpackResByDuck(duckAssetIdStr)
285- let currentPack = split(valueOrElse(getString(bpKey), "0_0_0_0_0_0"), "_")
286- let bpRes = addRes(currentPack, terrainCounts, (deltaTime - newDeltaTime))
287- $Tuple2([StringEntry(bpKey, bpRes), StringEntry(keyDuckLocation(duckAssetIdStr), newLocation), IntegerEntry(timeKey, newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, assetIdStr, owner), newTimestamp)], toUtf8String(message))
292+ let bpKey = keyBackpackByDuck(duckAssetIdStr)
293+ let currentPack = split(valueOrElse(getString(bpKey), "100_0:0_0_0_0_0_0::"), ":")
294+ let currentRes = split(currentPack[bpIdxRes], "_")
295+ let bpRes = addRes(currentRes, terrainCounts, (deltaTime - newDeltaTime))
296+ let newPack = makeString([currentPack[bpIdxDuck], bpRes, currentPack[bpIdxMat], currentPack[bpIdxProd]], ":")
297+ $Tuple2([StringEntry(bpKey, newPack), StringEntry(keyDuckLocation(duckAssetIdStr), newLocation), IntegerEntry(timeKey, newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, assetIdStr, owner), newTimestamp)], toUtf8String(message))
288298 }
289299 }
290300 }
291301 else throw("Strict value is not equal to itself.")
292302 }
293303 }
294304 }
295305 }
296306 }
297307
298308

github/deemru/w8io/169f3d6 
100.18 ms