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+IaP1So1p1SThMdRidVvbNT8yx7yVRUsP9DwbQUKAAKTEFORFBSRUZJWAIETEFORAAKRFVDS1BSRUZJWAIERFVDSwAPREFJTFlSRVNCWVBJRUNFAID40gEACURBWU1JTExJUwCAuJkpARFrZXlBc3NldElkVG9Pd25lcgEHYXNzZXRJZAkArAICAgluZnRPd25lcl8FB2Fzc2V0SWQBFmtleVN0YWtlZFRpbWVCeUFzc2V0SWQBB2Fzc2V0SWQJAKwCAgILc3Rha2VkVGltZV8FB2Fzc2V0SWQBFGtleVN0YWtlZER1Y2tCeU93bmVyAQlvd25lckFkZHIJAKwCAgISc3Rha2VkRHVja0J5T3duZXJfB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VycmVudFBhY2sJALUJAgkBC3ZhbHVlT3JFbHNlAgkAoggBBQVicEtleQILMF8wXzBfMF8wXzACAV8EBWJwUmVzCQEGYWRkUmVzAwULY3VycmVudFBhY2sFDXRlcnJhaW5Db3VudHMJAGUCBQlkZWx0YVRpbWUFDG5ld0RlbHRhVGltZQkAlAoCCQDMCAIJAQtTdHJpbmdFbnRyeQIFBWJwS2V5BQVicFJlcwkAzAgCCQELU3RyaW5nRW50cnkCCQEPa2V5RHVja0xvY2F0aW9uAQUOZHVja0Fzc2V0SWRTdHIFC25ld0xvY2F0aW9uCQDMCAIJAQxJbnRlZ2VyRW50cnkCBQd0aW1lS2V5BQxuZXdUaW1lc3RhbXAJAMwIAgkBDEludGVnZXJFbnRyeQIJASJrZXlTdGFrZWRUaW1lQnlUeXBlQXNzZXRJZEFuZE93bmVyAwUKTEFORFBSRUZJWAUKYXNzZXRJZFN0cgUFb3duZXIFDG5ld1RpbWVzdGFtcAUDbmlsCQCwCQEFB21lc3NhZ2UJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AX44YNA==", "height": 2343224, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Da1HetFbHC4eaY1Yo5RrSP17Da1xNTaC7LbSCsz4Btxt Next: 6M2Av3UWpEJyq9niZBvThsnzPUzF17Uot1oYVDQy1xeX Diff:
Old | New | Differences | |
---|---|---|---|
283 | 283 | let newTimestamp = (lastBlock.timestamp - newDeltaTime) | |
284 | 284 | let bpKey = keyBackpackResByDuck(duckAssetIdStr) | |
285 | 285 | 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)) | |
287 | 287 | $Tuple2([StringEntry(bpKey, bpRes), StringEntry(keyDuckLocation(duckAssetIdStr), newLocation), IntegerEntry(timeKey, newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, assetIdStr, owner), newTimestamp)], toUtf8String(message)) | |
288 | 288 | } | |
289 | 289 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let usdnAssetId = base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ' | |
5 | 5 | ||
6 | 6 | let incubatorAddr = this | |
7 | 7 | ||
8 | 8 | let breederAddr = this | |
9 | 9 | ||
10 | 10 | let backEndAddr = addressFromStringValue("3N5SpX21R3R75Qo4eb3MwFFvW7TUzyhvavv") | |
11 | 11 | ||
12 | 12 | let pub = base58'6LfPuKJjLgekmncBhMg2LZyMTNVzZBccXR28ySXm9uXD' | |
13 | 13 | ||
14 | 14 | let LANDPREFIX = "LAND" | |
15 | 15 | ||
16 | 16 | let DUCKPREFIX = "DUCK" | |
17 | 17 | ||
18 | 18 | let DAILYRESBYPIECE = 3456000 | |
19 | 19 | ||
20 | 20 | let DAYMILLIS = 86400000 | |
21 | 21 | ||
22 | 22 | func keyAssetIdToOwner (assetId) = ("nftOwner_" + assetId) | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr) | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func keyLandToOwner (landNum) = ("landOwner_" + landNum) | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func keyBackpackResByDuck (duckAssetId) = ("backPackRes_" + duckAssetId) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | let recLandNum = 0 | |
44 | 44 | ||
45 | 45 | let recLandSize = 1 | |
46 | 46 | ||
47 | 47 | let recTerrains = 2 | |
48 | 48 | ||
49 | 49 | let recContinent = 3 | |
50 | 50 | ||
51 | 51 | let locIdxContinent = 0 | |
52 | 52 | ||
53 | 53 | let locIdxType = 1 | |
54 | 54 | ||
55 | 55 | let locIdxId = 2 | |
56 | 56 | ||
57 | 57 | let idxA = 0 | |
58 | 58 | ||
59 | 59 | let idxB = 1 | |
60 | 60 | ||
61 | 61 | let idxC = 2 | |
62 | 62 | ||
63 | 63 | let idxD = 3 | |
64 | 64 | ||
65 | 65 | let idxE = 4 | |
66 | 66 | ||
67 | 67 | let idxF = 5 | |
68 | 68 | ||
69 | 69 | 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)] | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func numPiecesBySize (landSize) = match landSize { | |
73 | 73 | case _ => | |
74 | 74 | if (("S" == $match0)) | |
75 | 75 | then 25 | |
76 | 76 | else if (("M" == $match0)) | |
77 | 77 | then 100 | |
78 | 78 | else if (("L" == $match0)) | |
79 | 79 | then 225 | |
80 | 80 | else if (("XL" == $match0)) | |
81 | 81 | then 400 | |
82 | 82 | else if (("XXL" == $match0)) | |
83 | 83 | then 625 | |
84 | 84 | else throw("Unknown land size") | |
85 | 85 | } | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func addRes (currentPack,terrainCounts,deltaTime) = { | |
89 | 89 | func adder (acc,i) = { | |
90 | 90 | let resOfType = (fraction(deltaTime, DAILYRESBYPIECE, DAYMILLIS) * terrainCounts[i]) | |
91 | 91 | (acc :+ toString((parseIntValue(currentPack[i]) + resOfType))) | |
92 | 92 | } | |
93 | 93 | ||
94 | 94 | let r = { | |
95 | 95 | let $l = [0, 1, 2, 3, 4, 5] | |
96 | 96 | let $s = size($l) | |
97 | 97 | let $acc0 = nil | |
98 | 98 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
99 | 99 | then $a | |
100 | 100 | else adder($a, $l[$i]) | |
101 | 101 | ||
102 | 102 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
103 | 103 | then $a | |
104 | 104 | else throw("List size exceeds 6") | |
105 | 105 | ||
106 | 106 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
107 | 107 | } | |
108 | 108 | makeString(r, "_") | |
109 | 109 | } | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | @Callable(i) | |
113 | 113 | func stakeLand () = { | |
114 | 114 | let pmt = value(i.payments[0]) | |
115 | 115 | let assetId = value(pmt.assetId) | |
116 | 116 | let address = toString(i.caller) | |
117 | 117 | if ((pmt.amount != 1)) | |
118 | 118 | then throw((("NFT " + LANDPREFIX) + " token should be attached as payment")) | |
119 | 119 | else { | |
120 | 120 | let asset = value(assetInfo(assetId)) | |
121 | 121 | if ((asset.issuer != this)) | |
122 | 122 | then throw("Unknown issuer of token") | |
123 | 123 | else if (!(contains(asset.name, LANDPREFIX))) | |
124 | 124 | then throw((("Only NFT " + LANDPREFIX) + " tokens are accepted")) | |
125 | 125 | else { | |
126 | 126 | let landNumSize = drop(asset.name, 4) | |
127 | 127 | let landNum = if (contains(landNumSize, "XXL")) | |
128 | 128 | then dropRight(landNumSize, 3) | |
129 | 129 | else if (contains(landNumSize, "XL")) | |
130 | 130 | then dropRight(landNumSize, 2) | |
131 | 131 | else dropRight(landNumSize, 1) | |
132 | 132 | if (!(isDefined(parseInt(landNum)))) | |
133 | 133 | then throw(("Cannot parse land number from " + asset.name)) | |
134 | 134 | else { | |
135 | 135 | let timeKey = keyStakedTimeByAssetId(toBase58String(assetId)) | |
136 | 136 | if (isDefined(getInteger(timeKey))) | |
137 | 137 | then throw((("NFT " + asset.name) + " is already staked")) | |
138 | 138 | else [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyAssetIdToOwner(toBase58String(assetId)), address), StringEntry(keyLandToOwner(landNum), address)] | |
139 | 139 | } | |
140 | 140 | } | |
141 | 141 | } | |
142 | 142 | } | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | ||
146 | 146 | @Callable(i) | |
147 | 147 | func unstakeLand (assetIdStr) = if ((size(i.payments) != 0)) | |
148 | 148 | then throw("unstake doesn't require any payments") | |
149 | 149 | else { | |
150 | 150 | let assetId = fromBase58String(assetIdStr) | |
151 | 151 | let address = toString(i.caller) | |
152 | 152 | let asset = value(assetInfo(assetId)) | |
153 | 153 | if ((asset.issuer != this)) | |
154 | 154 | then throw("Unknown issuer of token") | |
155 | 155 | else if (!(contains(asset.name, LANDPREFIX))) | |
156 | 156 | then throw((("Only NFT " + LANDPREFIX) + " tokens can be unstaked")) | |
157 | 157 | else { | |
158 | 158 | let timeKey = keyStakedTimeByAssetId(assetIdStr) | |
159 | 159 | if (!(isDefined(timeKey))) | |
160 | 160 | then throw((("NFT " + asset.name) + " is not staked")) | |
161 | 161 | else { | |
162 | 162 | let owner = valueOrErrorMessage(getString(keyAssetIdToOwner(assetIdStr)), (("NFT " + asset.name) + " is orphaned")) | |
163 | 163 | if ((owner != address)) | |
164 | 164 | then throw("Staked NFT is not yours") | |
165 | 165 | else [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, assetIdStr, address))] | |
166 | 166 | } | |
167 | 167 | } | |
168 | 168 | } | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | ||
172 | 172 | @Callable(i) | |
173 | 173 | func stakeDuck () = { | |
174 | 174 | let pmt = value(i.payments[0]) | |
175 | 175 | let assetId = value(pmt.assetId) | |
176 | 176 | let address = toString(i.caller) | |
177 | 177 | if ((pmt.amount != 1)) | |
178 | 178 | then throw((("NFT " + DUCKPREFIX) + " token should be attached as payment")) | |
179 | 179 | else { | |
180 | 180 | let asset = value(assetInfo(assetId)) | |
181 | 181 | if (if ((asset.issuer != incubatorAddr)) | |
182 | 182 | then (asset.issuer != breederAddr) | |
183 | 183 | else false) | |
184 | 184 | then throw((("Unknown issuer of " + DUCKPREFIX) + " token")) | |
185 | 185 | else if (!(contains(asset.name, DUCKPREFIX))) | |
186 | 186 | then throw((("Only NFT " + DUCKPREFIX) + " tokens are accepted")) | |
187 | 187 | else { | |
188 | 188 | let assetIdStr = toBase58String(assetId) | |
189 | 189 | let timeKey = keyStakedTimeByAssetId(assetIdStr) | |
190 | 190 | if (isDefined(getInteger(timeKey))) | |
191 | 191 | then throw((("NFT " + asset.name) + " is already staked")) | |
192 | 192 | else if (isDefined(getString(keyStakedDuckByOwner(address)))) | |
193 | 193 | then throw(("You already staked one duck: " + asset.name)) | |
194 | 194 | else [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyAssetIdToOwner(assetIdStr), address), StringEntry(keyStakedDuckByOwner(address), assetIdStr)] | |
195 | 195 | } | |
196 | 196 | } | |
197 | 197 | } | |
198 | 198 | ||
199 | 199 | ||
200 | 200 | ||
201 | 201 | @Callable(i) | |
202 | 202 | func unstakeDuck (assetIdStr) = if ((size(i.payments) != 0)) | |
203 | 203 | then throw("unstake doesn't require any payments") | |
204 | 204 | else { | |
205 | 205 | let assetId = fromBase58String(assetIdStr) | |
206 | 206 | let address = toString(i.caller) | |
207 | 207 | let asset = value(assetInfo(assetId)) | |
208 | 208 | if (if ((asset.issuer != incubatorAddr)) | |
209 | 209 | then (asset.issuer != breederAddr) | |
210 | 210 | else false) | |
211 | 211 | then throw((("Unknown issuer of " + DUCKPREFIX) + " token")) | |
212 | 212 | else if (!(contains(asset.name, DUCKPREFIX))) | |
213 | 213 | then throw((("Only NFT " + DUCKPREFIX) + " tokens can be unstaked")) | |
214 | 214 | else { | |
215 | 215 | let timeKey = keyStakedTimeByAssetId(toBase58String(assetId)) | |
216 | 216 | if (!(isDefined(timeKey))) | |
217 | 217 | then throw((("NFT " + asset.name) + " is not staked")) | |
218 | 218 | else if (!(isDefined(keyStakedDuckByOwner(address)))) | |
219 | 219 | then throw((("The duck " + asset.name) + " is not staked")) | |
220 | 220 | else { | |
221 | 221 | let owner = valueOrErrorMessage(getString(keyAssetIdToOwner(toBase58String(assetId))), (("NFT " + asset.name) + " is orphaned")) | |
222 | 222 | if ((owner != address)) | |
223 | 223 | then throw("Staked NFT is not yours") | |
224 | 224 | else [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, assetIdStr, address)), DeleteEntry(keyStakedDuckByOwner(address))] | |
225 | 225 | } | |
226 | 226 | } | |
227 | 227 | } | |
228 | 228 | ||
229 | 229 | ||
230 | 230 | ||
231 | 231 | @Callable(i) | |
232 | 232 | func claimRes (amount,assetIdStr,message,sig,newLocation) = if (!(sigVerify_8Kb(message, sig, pub))) | |
233 | 233 | then throw("signature does not match") | |
234 | 234 | else if ((size(i.payments) != 0)) | |
235 | 235 | then throw("claimRes doesn't require any payments") | |
236 | 236 | else { | |
237 | 237 | let addr = toString(i.caller) | |
238 | 238 | let asset = value(assetInfo(fromBase58String(assetIdStr))) | |
239 | 239 | if (!(contains(asset.name, LANDPREFIX))) | |
240 | 240 | then throw((("NFT " + LANDPREFIX) + " token should be passed as param")) | |
241 | 241 | else { | |
242 | 242 | let timeKey = keyStakedTimeByAssetId(assetIdStr) | |
243 | 243 | let savedTime = getInteger(timeKey) | |
244 | 244 | if (!(isDefined(savedTime))) | |
245 | 245 | then throw((("NFT " + asset.name) + " is not staked")) | |
246 | 246 | else { | |
247 | 247 | let owner = getStringValue(keyAssetIdToOwner(assetIdStr)) | |
248 | 248 | if ((owner != addr)) | |
249 | 249 | then throw((LANDPREFIX + " is not yours")) | |
250 | 250 | else { | |
251 | 251 | let d = split(asset.description, "_") | |
252 | 252 | let landSize = d[recLandSize] | |
253 | 253 | let terrainCounts = countTerrains(d[recTerrains]) | |
254 | 254 | let landContinent = d[recContinent] | |
255 | 255 | let duck = getString(keyStakedDuckByOwner(addr)) | |
256 | 256 | if (!(isDefined(duck))) | |
257 | 257 | then throw("You don't have a duck staked") | |
258 | 258 | else { | |
259 | 259 | let duckAssetIdStr = value(duck) | |
260 | 260 | let curLocation = getString(keyDuckLocation(duckAssetIdStr)) | |
261 | 261 | let checkLocation = if (isDefined(curLocation)) | |
262 | 262 | then { | |
263 | 263 | let loc = split(value(curLocation), "_") | |
264 | 264 | if ((loc[locIdxType] != "L")) | |
265 | 265 | then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L")) | |
266 | 266 | else if ((loc[locIdxId] != assetIdStr)) | |
267 | 267 | then throw(((("Duck location id is " + loc[locIdxId]) + ", but should be ") + assetIdStr)) | |
268 | 268 | else true | |
269 | 269 | } | |
270 | 270 | else true | |
271 | 271 | if ((checkLocation == checkLocation)) | |
272 | 272 | then { | |
273 | 273 | let deltaTime = (lastBlock.timestamp - value(savedTime)) | |
274 | 274 | if ((0 > deltaTime)) | |
275 | 275 | then throw(((("Saved timestamp is in future, saved = " + toString(value(savedTime))) + ", current = ") + toString(lastBlock.timestamp))) | |
276 | 276 | else { | |
277 | 277 | let pieces = numPiecesBySize(landSize) | |
278 | 278 | let availRes = (fraction(deltaTime, DAILYRESBYPIECE, DAYMILLIS) * pieces) | |
279 | 279 | if ((amount > availRes)) | |
280 | 280 | then throw(((("Not enough resources, available = " + toString(availRes)) + ", requested = ") + toString(amount))) | |
281 | 281 | else { | |
282 | 282 | let newDeltaTime = fraction((availRes - amount), DAYMILLIS, (pieces * DAILYRESBYPIECE)) | |
283 | 283 | let newTimestamp = (lastBlock.timestamp - newDeltaTime) | |
284 | 284 | let bpKey = keyBackpackResByDuck(duckAssetIdStr) | |
285 | 285 | 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)) | |
287 | 287 | $Tuple2([StringEntry(bpKey, bpRes), StringEntry(keyDuckLocation(duckAssetIdStr), newLocation), IntegerEntry(timeKey, newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, assetIdStr, owner), newTimestamp)], toUtf8String(message)) | |
288 | 288 | } | |
289 | 289 | } | |
290 | 290 | } | |
291 | 291 | else throw("Strict value is not equal to itself.") | |
292 | 292 | } | |
293 | 293 | } | |
294 | 294 | } | |
295 | 295 | } | |
296 | 296 | } | |
297 | 297 | ||
298 | 298 |
github/deemru/w8io/169f3d6 76.54 ms ◑