tx · Hr2KEJ7XcawRiWrsfsnDxKjocAURw7wixBjzGyXyfAsH 3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh: -0.01800000 Waves 2024.11.23 13:16 [3383979] smart account 3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh > SELF 0.00000000 Waves
{ "type": 13, "id": "Hr2KEJ7XcawRiWrsfsnDxKjocAURw7wixBjzGyXyfAsH", "fee": 1800000, "feeAssetId": null, "timestamp": 1732357031390, "version": 2, "chainId": 84, "sender": "3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh", "senderPublicKey": "3QtfC1XbLZXdeawMDeSERy9vvjUmj1XYd2GFmrvx7pWQ", "proofs": [ "4r43tUZEaEucGjk38pxe1qti7LcjxacnmxwcuMxtff7nLt85YNvwaPiKPP6P49JkcBrZe8B6VK9MLfxa9F9suyVG" ], "script": "base64:BgI9CAISABIECgIICBIDCgEEEgMKAQESABIAEgMKAQESABIECgIIARIAEgMKAQgSAwoBCBIECgIIARIECgIIAUIAA1NFUAICX18ABU1VTFQ2AMCEPQAFTVVMVDcAgK3iBAAFTVVMVDgAgMLXLwAKREFZX01JTExJUwCAuJkpABVVU0RUMkFDUkVTX01VTFRJUExJRVIACgATT05FX1BFUkNFTlRfRElWSVNPUgBkAAVjaGFpbgkAyQECCQDKAQIIBQR0aGlzBWJ5dGVzAAEAAQALdXNkdEFzc2V0SWQEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDABIITaerIIAz9O0bvKju6Lk7zJgt0LXfoHlqjUI/moD/+5AwkAAAIBAVQFByRtYXRjaDABIFWx2J9yh4Lv5eNbjawFq2XemkOhLxa7BfMat4el8cUYCQACAQINVW5rbm93biBjaGFpbgAWZGVmYXVsdFJlc3QyQWRkcmVzc1N0cgQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAIjM1BGd1l0YThiaUV6MzF6cGVGZTVESks4d0U1dHJTcFFWRjgDCQAAAgEBVAU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kAAAQKbmV3VG90YWxGcAkAZAIJAGUCBQpvbGRUb3RhbEZwBQVvbGRGcAUFbmV3RnAJAJQKAgUDbmlsCQDMCAIFBW9sZEZwCQDMCAIFBW5ld0ZwCQDMCAIFCm9sZFRvdGFsRnAJAMwIAgUKbmV3VG90YWxGcAUDbmlsAWkBCGlzc3VlTkZUAgpmb3JBZGRyZXNzCG5mdEluZGV4AwkBAiE9AggFAWkGY2FsbGVyBQt3bGdDb250cmFjdAkAAgECEVBlcm1pc3Npb24gZGVuaWVkCQEQaXNzdWVORlRpbnRlcm5hbAIFCG5mdEluZGV4CQERQGV4dHJOYXRpdmUoMTA2MikBBQpmb3JBZGRyZXNzAP1wsH4=", "height": 3383979, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3paaK7hWixdLRkKk2eiTRBE8vf6JMZ8AudVeszJV51mx Next: BhU1p7tfFZkMTyaoycRkLt7L5R6GnFDvKZ53kVoaXs8k Diff:
Old | New | Differences | |
---|---|---|---|
216 | 216 | ||
217 | 217 | let keyLastLimitLeft = "lastLimitLeft" | |
218 | 218 | ||
219 | - | let dtxArray = match chain { | |
220 | - | case _ => | |
221 | - | if ((base58'2W' == $match0)) | |
222 | - | then nil | |
223 | - | else if ((base58'2T' == $match0)) | |
224 | - | then ["Cy1b1cu6E5Vx67Mo2wvWi2pvJzT28exsb81maoyYPmvu", "6GEyPU5H2giZahjKnUfZ4djSMacEhSWswVp23Xr8B7wy"] | |
225 | - | else throw("Unknown chain") | |
226 | - | } | |
227 | - | ||
228 | 219 | let nftDescriptions = ["{\"name\": \"Gold shovel\", \"description\": \"Reward for early birds\", \"rare\": \"Promo\", \"bonus\": 3, \"bonusType\": \"FarmPower\"}", "{\"name\": \"Pickaxe\", \"description\": \"Increases FarmPower\", \"rare\": \"Common\", \"bonus\": 1, \"bonusType\": \"FarmPower\"}"] | |
229 | 220 | ||
230 | 221 | let nftNames = ["SHOVEL-P3", "PICKAXE-C1"] | |
222 | + | ||
223 | + | let contentKeys = ["contentShovelP3", "contentPickaxeC1"] | |
231 | 224 | ||
232 | 225 | func prolog (i) = if (if ((i.originCaller != rest2Contract)) | |
233 | 226 | then valueOrElse(getBoolean(keyBlocked()), false) | |
258 | 251 | } | |
259 | 252 | ||
260 | 253 | ||
261 | - | func issueNFTinternal (nftIndex,addr) = if ((nftIndex >= size( | |
254 | + | func issueNFTinternal (nftIndex,addr) = if ((nftIndex >= size(contentKeys))) | |
262 | 255 | then throw("nftIndex out of bounds") | |
263 | 256 | else { | |
264 | 257 | let nftSerial = (valueOrElse(getInteger(keyNftTotalIssued), -1) + 1) | |
265 | - | let issue = Issue(nftNames[nftIndex], makeString_2C([ | |
258 | + | let issue = Issue(nftNames[nftIndex], makeString_2C([contentKeys[nftIndex], toString(nftSerial), nftDescriptions[nftIndex]], SEP), 1, 0, false) | |
266 | 259 | let nftAssetId = calculateAssetId(issue) | |
267 | 260 | $Tuple2([issue, IntegerEntry(keyNftTotalIssued, nftSerial), IntegerEntry(keyNftNumberByAssetId(toBase58String(nftAssetId)), nftSerial), ScriptTransfer(addr, 1, nftAssetId)], nftAssetId) | |
268 | 261 | } | |
356 | 349 | if ((arbReleaseTime > lastBlock.timestamp)) | |
357 | 350 | then throw(("You traded some WLGOLD, cannot unstake until " + toString(arbReleaseTime))) | |
358 | 351 | else { | |
359 | - | let $ | |
360 | - | let actions = $ | |
361 | - | let wlgClaimedAmount = $ | |
352 | + | let $t073517428 = stakeUnstakeAcresInternal(-(amount), address) | |
353 | + | let actions = $t073517428._1 | |
354 | + | let wlgClaimedAmount = $t073517428._2 | |
362 | 355 | $Tuple2(((actions :+ ScriptTransfer(i.caller, amount, acresAssetId)) ++ prologActions), wlgClaimedAmount) | |
363 | 356 | } | |
364 | 357 | } | |
381 | 374 | else (value(pmt.assetId) != acresAssetId)) | |
382 | 375 | then throw("ACRES payments only!") | |
383 | 376 | else { | |
384 | - | let $ | |
385 | - | let actions = $ | |
386 | - | let wlgClaimedAmount = $ | |
377 | + | let $t078797952 = stakeUnstakeAcresInternal(amt, address) | |
378 | + | let actions = $t078797952._1 | |
379 | + | let wlgClaimedAmount = $t078797952._2 | |
387 | 380 | $Tuple2((actions ++ prologActions), wlgClaimedAmount) | |
388 | 381 | } | |
389 | 382 | } | |
447 | 440 | then throw((("Min payment should be " + fixedPoint(MULT7, 8)) + " ACRES")) | |
448 | 441 | else { | |
449 | 442 | let addr = toString(i.caller) | |
450 | - | let $ | |
451 | - | let limitAction = $ | |
452 | - | let maxUsdt = $ | |
443 | + | let $t098099857 = getSwapLimitAcres() | |
444 | + | let limitAction = $t098099857._1 | |
445 | + | let maxUsdt = $t098099857._2 | |
453 | 446 | let maxAcres = (maxUsdt * USDT2ACRES_MULTIPLIER) | |
454 | 447 | if ((acresAmount > maxAcres)) | |
455 | 448 | then throw((("You can sell max " + fixedPoint(maxAcres, 8)) + " ACRES")) | |
465 | 458 | ||
466 | 459 | @Callable(i) | |
467 | 460 | func sellAcresREADONLY (address,acresAmount) = { | |
468 | - | let $ | |
469 | - | let limitAction = $ | |
470 | - | let maxUsdt = $ | |
461 | + | let $t01035310401 = getSwapLimitAcres() | |
462 | + | let limitAction = $t01035310401._1 | |
463 | + | let maxUsdt = $t01035310401._2 | |
471 | 464 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
472 | 465 | $Tuple2(nil, [usdtAmount, MULT7, (maxUsdt * USDT2ACRES_MULTIPLIER), 0]) | |
473 | 466 | } | |
519 | 512 | let req = invoke(oldAcresAddress, "requestAcresCallback", [(((rr._1 + rr._2) + rr._3) + rr._4)], nil) | |
520 | 513 | if ((req == req)) | |
521 | 514 | then { | |
522 | - | let $ | |
523 | - | let nftActions = $ | |
524 | - | let nftAssetId = $ | |
515 | + | let $t01227312353 = issueNFTinternal(IdxDtx3PercConversion, i.caller) | |
516 | + | let nftActions = $t01227312353._1 | |
517 | + | let nftAssetId = $t01227312353._2 | |
525 | 518 | $Tuple5(rr._1, rr._2, rr._3, rr._4, nftActions) | |
526 | 519 | } | |
527 | 520 | else throw("Strict value is not equal to itself.") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let MULT6 = 1000000 | |
7 | 7 | ||
8 | 8 | let MULT7 = 10000000 | |
9 | 9 | ||
10 | 10 | let MULT8 = 100000000 | |
11 | 11 | ||
12 | 12 | let DAY_MILLIS = 86400000 | |
13 | 13 | ||
14 | 14 | let USDT2ACRES_MULTIPLIER = 10 | |
15 | 15 | ||
16 | 16 | let ONE_PERCENT_DIVISOR = 100 | |
17 | 17 | ||
18 | 18 | let chain = take(drop(this.bytes, 1), 1) | |
19 | 19 | ||
20 | 20 | let usdtAssetId = match chain { | |
21 | 21 | case _ => | |
22 | 22 | if ((base58'2W' == $match0)) | |
23 | 23 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
24 | 24 | else if ((base58'2T' == $match0)) | |
25 | 25 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
26 | 26 | else throw("Unknown chain") | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | let defaultRest2AddressStr = match chain { | |
30 | 30 | case _ => | |
31 | 31 | if ((base58'2W' == $match0)) | |
32 | 32 | then "3PFwYta8biEz31zpeFe5DJK8wE5trSpQVF8" | |
33 | 33 | else if ((base58'2T' == $match0)) | |
34 | 34 | then "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv" | |
35 | 35 | else throw("Unknown chain") | |
36 | 36 | } | |
37 | 37 | ||
38 | 38 | let arbitrageDelay = match chain { | |
39 | 39 | case _ => | |
40 | 40 | if ((base58'2W' == $match0)) | |
41 | 41 | then DAY_MILLIS | |
42 | 42 | else if ((base58'2T' == $match0)) | |
43 | 43 | then 60000 | |
44 | 44 | else throw("Unknown chain") | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | let oldStakingContractStr = match chain { | |
48 | 48 | case _ => | |
49 | 49 | if ((base58'2W' == $match0)) | |
50 | 50 | then "3PLncXtS1U83D6cQbFD3H8rBHPLgzxSFKZ1" | |
51 | 51 | else if ((base58'2T' == $match0)) | |
52 | 52 | then "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm" | |
53 | 53 | else throw("Unknown chain") | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | let IdxCfgAcres2Dapp = 1 | |
60 | 60 | ||
61 | 61 | let IdxCfgWlgDapp = 2 | |
62 | 62 | ||
63 | 63 | let IdxCfgInvestFundDapp = 5 | |
64 | 64 | ||
65 | 65 | func keyRestCfg () = "%s__restConfig" | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func keyRest2Address () = "%s__rest2Addr" | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func getContractAddressOrFail (rest2Cfg,idx) = valueOrErrorMessage(addressFromString(rest2Cfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | let rest2Contract = addressFromStringValue(valueOrElse(getString(this, keyRest2Address()), defaultRest2AddressStr)) | |
78 | 78 | ||
79 | 79 | let rest2Cfg = readRestCfgOrFail(rest2Contract) | |
80 | 80 | ||
81 | 81 | let acres2Contract = getContractAddressOrFail(rest2Cfg, IdxCfgAcres2Dapp) | |
82 | 82 | ||
83 | 83 | let wlgContract = getContractAddressOrFail(rest2Cfg, IdxCfgWlgDapp) | |
84 | 84 | ||
85 | 85 | let investFundContract = getContractAddressOrFail(rest2Cfg, IdxCfgInvestFundDapp) | |
86 | 86 | ||
87 | 87 | let oldAcresContractKey = "oldAcresContract" | |
88 | 88 | ||
89 | 89 | func keyBlocked () = "contractsBlocked" | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func keyLastWeekTxIdByUser (addr) = ("lastWeekTxIdByUser_" + addr) | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func keyCurWeekTxIdByUser (addr) = ("curWeekTxIdByUser_" + addr) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | let acresIssuedAmountKey = "acresIssuedAmount" | |
99 | 99 | ||
100 | 100 | let acresAssetIdKey = "acresAssetId" | |
101 | 101 | ||
102 | 102 | let acresAssetId = valueOrErrorMessage(getBinary(acres2Contract, acresAssetIdKey), "ACRES is not issued yet") | |
103 | 103 | ||
104 | 104 | func keyAcresStakedTimeByUser (addr) = ("acresStakedTimeByUser_" + addr) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func keyStakedLandsByOwner (ownerAddr) = ("stakedLandsByOwner_" + ownerAddr) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func asInt (v) = match v { | |
114 | 114 | case n: Int => | |
115 | 115 | n | |
116 | 116 | case _ => | |
117 | 117 | throw("fail to cast into Int") | |
118 | 118 | } | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func asTuple5Ints (val) = match val { | |
122 | 122 | case t: (Int, Int, Int, Int, Int) => | |
123 | 123 | t | |
124 | 124 | case _ => | |
125 | 125 | throw("fail to cast into (Int, Int, Int, Int, Int)") | |
126 | 126 | } | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func asTuple4Ints (val) = match val { | |
130 | 130 | case t: (Int, Int, Int, Int) => | |
131 | 131 | t | |
132 | 132 | case _ => | |
133 | 133 | throw("fail to cast into (Int, Int, Int, Int)") | |
134 | 134 | } | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func asTuple3Ints (val) = match val { | |
138 | 138 | case t: (Int, Int, Int) => | |
139 | 139 | t | |
140 | 140 | case _ => | |
141 | 141 | throw("fail to cast into (Int, Int, Int)") | |
142 | 142 | } | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func asTuple2Ints (val) = match val { | |
146 | 146 | case t: (Int, Int) => | |
147 | 147 | t | |
148 | 148 | case _ => | |
149 | 149 | throw("fail to cast into (Int, Int)") | |
150 | 150 | } | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func fixedPoint (val,decimals) = { | |
154 | 154 | let tenPow = pow(10, 0, decimals, 0, 0, DOWN) | |
155 | 155 | let lowPart = toString((val % tenPow)) | |
156 | 156 | let zeroes = drop(toString(tenPow), (1 + size(lowPart))) | |
157 | 157 | (((toString((val / tenPow)) + ".") + zeroes) + lowPart) | |
158 | 158 | } | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | let M8_ = 100000000 | |
162 | 162 | ||
163 | 163 | let WEEK_BLOCKS = 10080 | |
164 | 164 | ||
165 | 165 | let wlgIssuedAmtKey = "wlg_issuedAmount" | |
166 | 166 | ||
167 | 167 | let zbIssuedAmtKey = "zbill_issuedAmount" | |
168 | 168 | ||
169 | 169 | func keyAcresStakedAmtByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func keyFarmingPowerByUser (addr) = ("farmingPowerByUser_" + addr) | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | let acresStakdTotalKey = "acresStakedAmountTotal" | |
176 | 176 | ||
177 | 177 | let totalFarmingPowerKey = "totalFarmingPower" | |
178 | 178 | ||
179 | 179 | let IdxDtx3PercConversion = 0 | |
180 | 180 | ||
181 | 181 | let levelAcres = [0, 10, 20, 40, 80, 150, 250, 400, 700, 1000] | |
182 | 182 | ||
183 | 183 | func getLevelByAcres (acres) = { | |
184 | 184 | let acr = ((acres + 99999999) / M8_) | |
185 | 185 | func checker (acc,item) = if ((item >= acr)) | |
186 | 186 | then acc | |
187 | 187 | else (acc + 1) | |
188 | 188 | ||
189 | 189 | let $l = levelAcres | |
190 | 190 | let $s = size($l) | |
191 | 191 | let $acc0 = 0 | |
192 | 192 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
193 | 193 | then $a | |
194 | 194 | else checker($a, $l[$i]) | |
195 | 195 | ||
196 | 196 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
197 | 197 | then $a | |
198 | 198 | else throw("List size exceeds 10") | |
199 | 199 | ||
200 | 200 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
201 | 201 | } | |
202 | 202 | ||
203 | 203 | ||
204 | 204 | func getFarmingPowerByAcres (acres) = ((acres * 20) * (getLevelByAcres(acres) + 4)) | |
205 | 205 | ||
206 | 206 | ||
207 | 207 | let keyNftTotalIssued = "nftTotalIssued" | |
208 | 208 | ||
209 | 209 | func keyNftNumberByAssetId (assetId) = ("nftNumberByAssetId_" + assetId) | |
210 | 210 | ||
211 | 211 | ||
212 | 212 | func keyLastWlgTradeTimeByUser (addr) = ("lastArbTimeUser_" + addr) | |
213 | 213 | ||
214 | 214 | ||
215 | 215 | let keyLastAcresSellTime = "lastAcresSellTime" | |
216 | 216 | ||
217 | 217 | let keyLastLimitLeft = "lastLimitLeft" | |
218 | 218 | ||
219 | - | let dtxArray = match chain { | |
220 | - | case _ => | |
221 | - | if ((base58'2W' == $match0)) | |
222 | - | then nil | |
223 | - | else if ((base58'2T' == $match0)) | |
224 | - | then ["Cy1b1cu6E5Vx67Mo2wvWi2pvJzT28exsb81maoyYPmvu", "6GEyPU5H2giZahjKnUfZ4djSMacEhSWswVp23Xr8B7wy"] | |
225 | - | else throw("Unknown chain") | |
226 | - | } | |
227 | - | ||
228 | 219 | let nftDescriptions = ["{\"name\": \"Gold shovel\", \"description\": \"Reward for early birds\", \"rare\": \"Promo\", \"bonus\": 3, \"bonusType\": \"FarmPower\"}", "{\"name\": \"Pickaxe\", \"description\": \"Increases FarmPower\", \"rare\": \"Common\", \"bonus\": 1, \"bonusType\": \"FarmPower\"}"] | |
229 | 220 | ||
230 | 221 | let nftNames = ["SHOVEL-P3", "PICKAXE-C1"] | |
222 | + | ||
223 | + | let contentKeys = ["contentShovelP3", "contentPickaxeC1"] | |
231 | 224 | ||
232 | 225 | func prolog (i) = if (if ((i.originCaller != rest2Contract)) | |
233 | 226 | then valueOrElse(getBoolean(keyBlocked()), false) | |
234 | 227 | else false) | |
235 | 228 | then throw("Contracts are under maintenance") | |
236 | 229 | else { | |
237 | 230 | let addr = toString(i.originCaller) | |
238 | 231 | let week = (height / WEEK_BLOCKS) | |
239 | 232 | let lastWeekTxIdByUser = getString(keyLastWeekTxIdByUser(addr)) | |
240 | 233 | let txId = toBase58String(i.transactionId) | |
241 | 234 | let wtx = ((toString(week) + "_") + txId) | |
242 | 235 | if (isDefined(lastWeekTxIdByUser)) | |
243 | 236 | then { | |
244 | 237 | let lastWeekTx = split(value(lastWeekTxIdByUser), "_") | |
245 | 238 | if ((lastWeekTx[0] == toString(week))) | |
246 | 239 | then [StringEntry(keyLastWeekTxIdByUser(addr), wtx), StringEntry(keyCurWeekTxIdByUser(addr), wtx)] | |
247 | 240 | else if ((lastWeekTx[0] == toString((week - 1)))) | |
248 | 241 | then [StringEntry(keyCurWeekTxIdByUser(addr), wtx)] | |
249 | 242 | else { | |
250 | 243 | let curWeekTxIdByUser = getStringValue(keyLastWeekTxIdByUser(addr)) | |
251 | 244 | let curWeekTx = split(curWeekTxIdByUser, "_") | |
252 | 245 | if ((curWeekTx[0] == toString(week))) | |
253 | 246 | then [StringEntry(keyCurWeekTxIdByUser(addr), wtx)] | |
254 | 247 | else [StringEntry(keyLastWeekTxIdByUser(addr), curWeekTxIdByUser), StringEntry(keyCurWeekTxIdByUser(addr), wtx)] | |
255 | 248 | } | |
256 | 249 | } | |
257 | 250 | else [StringEntry(keyLastWeekTxIdByUser(addr), wtx), StringEntry(keyCurWeekTxIdByUser(addr), wtx)] | |
258 | 251 | } | |
259 | 252 | ||
260 | 253 | ||
261 | - | func issueNFTinternal (nftIndex,addr) = if ((nftIndex >= size( | |
254 | + | func issueNFTinternal (nftIndex,addr) = if ((nftIndex >= size(contentKeys))) | |
262 | 255 | then throw("nftIndex out of bounds") | |
263 | 256 | else { | |
264 | 257 | let nftSerial = (valueOrElse(getInteger(keyNftTotalIssued), -1) + 1) | |
265 | - | let issue = Issue(nftNames[nftIndex], makeString_2C([ | |
258 | + | let issue = Issue(nftNames[nftIndex], makeString_2C([contentKeys[nftIndex], toString(nftSerial), nftDescriptions[nftIndex]], SEP), 1, 0, false) | |
266 | 259 | let nftAssetId = calculateAssetId(issue) | |
267 | 260 | $Tuple2([issue, IntegerEntry(keyNftTotalIssued, nftSerial), IntegerEntry(keyNftNumberByAssetId(toBase58String(nftAssetId)), nftSerial), ScriptTransfer(addr, 1, nftAssetId)], nftAssetId) | |
268 | 261 | } | |
269 | 262 | ||
270 | 263 | ||
271 | 264 | func stakeUnstakeAcresInternal (amt,address) = { | |
272 | 265 | let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil) | |
273 | 266 | if ((wlgResult == wlgResult)) | |
274 | 267 | then { | |
275 | 268 | let now = lastBlock.timestamp | |
276 | 269 | let timeKey = keyAcresStakedTimeByUser(address) | |
277 | 270 | let amountKey = keyAcresStakedAmtByUser(address) | |
278 | 271 | let oldAcresAmount = valueOrElse(getInteger(amountKey), 0) | |
279 | 272 | if (if ((0 > amt)) | |
280 | 273 | then (0 > (oldAcresAmount + amt)) | |
281 | 274 | else false) | |
282 | 275 | then throw(((("You have only " + fixedPoint(oldAcresAmount, 8)) + " ACRES staked, tried to unstake ") + fixedPoint(-(amt), 8))) | |
283 | 276 | else { | |
284 | 277 | let newAcresAmount = (oldAcresAmount + amt) | |
285 | 278 | let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0) | |
286 | 279 | let userFpKey = keyFarmingPowerByUser(address) | |
287 | 280 | let oldFp = valueOrElse(getInteger(userFpKey), 0) | |
288 | 281 | let newFp = getFarmingPowerByAcres(newAcresAmount) | |
289 | 282 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
290 | 283 | $Tuple2([IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(amountKey, newAcresAmount), IntegerEntry(acresStakdTotalKey, (oldTotal + amt)), IntegerEntry(userFpKey, newFp), IntegerEntry(totalFarmingPowerKey, ((oldTotalFp - oldFp) + newFp))], wlgResult) | |
291 | 284 | } | |
292 | 285 | } | |
293 | 286 | else throw("Strict value is not equal to itself.") | |
294 | 287 | } | |
295 | 288 | ||
296 | 289 | ||
297 | 290 | func getWlgPrice (usdtBalanceCorrection) = { | |
298 | 291 | let issuedAmount = valueOrErrorMessage(getInteger(wlgContract, wlgIssuedAmtKey), "WLGOLD is not issued yet") | |
299 | 292 | let wlgUsd = assetBalance(wlgContract, usdtAssetId) | |
300 | 293 | let acres2Usd = (assetBalance(acres2Contract, usdtAssetId) - usdtBalanceCorrection) | |
301 | 294 | let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0)) | |
302 | 295 | let totalFundsUsd = ((acres2Usd + wlgUsd) + investFundTotal) | |
303 | 296 | fraction(totalFundsUsd, MULT8, issuedAmount) | |
304 | 297 | } | |
305 | 298 | ||
306 | 299 | ||
307 | 300 | func getSwapLimitAcres () = { | |
308 | 301 | let wlgUsd = assetBalance(wlgContract, usdtAssetId) | |
309 | 302 | let acres2Usd = assetBalance(this, usdtAssetId) | |
310 | 303 | let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0)) | |
311 | 304 | let defaultLimit = (((acres2Usd + wlgUsd) + investFundTotal) / ONE_PERCENT_DIVISOR) | |
312 | 305 | let lastLimitLeft = valueOrElse(getInteger(keyLastLimitLeft), defaultLimit) | |
313 | 306 | let lastTime = valueOrElse(getInteger(keyLastAcresSellTime), 0) | |
314 | 307 | let now = lastBlock.timestamp | |
315 | 308 | let currentLimit = (lastLimitLeft + fraction(defaultLimit, (now - lastTime), DAY_MILLIS)) | |
316 | 309 | let limitLeftUsdt = min([currentLimit, defaultLimit]) | |
317 | 310 | $Tuple2(IntegerEntry(keyLastAcresSellTime, now), limitLeftUsdt) | |
318 | 311 | } | |
319 | 312 | ||
320 | 313 | ||
321 | 314 | @Callable(i) | |
322 | 315 | func saveLastTx () = if (!(containsElement([wlgContract], i.caller))) | |
323 | 316 | then throw("Access denied") | |
324 | 317 | else $Tuple2(prolog(i), 42) | |
325 | 318 | ||
326 | 319 | ||
327 | 320 | ||
328 | 321 | @Callable(i) | |
329 | 322 | func constructorV1 (rest2Addr,oldAcrContract) = if ((i.caller != this)) | |
330 | 323 | then throw("Permission denied") | |
331 | 324 | else { | |
332 | 325 | let oldAcrContAddr = addressFromStringValue(oldAcrContract) | |
333 | 326 | [IntegerEntry(acresIssuedAmountKey, getIntegerValue(oldAcrContAddr, acresIssuedAmountKey)), BinaryEntry(acresAssetIdKey, getBinaryValue(oldAcrContAddr, acresAssetIdKey)), StringEntry(keyRest2Address(), rest2Addr), StringEntry(oldAcresContractKey, oldAcrContract)] | |
334 | 327 | } | |
335 | 328 | ||
336 | 329 | ||
337 | 330 | ||
338 | 331 | @Callable(i) | |
339 | 332 | func setBlocked (isBlocked) = if ((i.caller != this)) | |
340 | 333 | then throw("permission denied") | |
341 | 334 | else [BooleanEntry(keyBlocked(), isBlocked)] | |
342 | 335 | ||
343 | 336 | ||
344 | 337 | ||
345 | 338 | @Callable(i) | |
346 | 339 | func unstakeAcres (amount) = { | |
347 | 340 | let prologActions = prolog(i) | |
348 | 341 | if ((0 >= amount)) | |
349 | 342 | then throw("Amount should be positive") | |
350 | 343 | else { | |
351 | 344 | let address = toString(i.caller) | |
352 | 345 | if ((size(i.payments) != 0)) | |
353 | 346 | then throw("No payments required") | |
354 | 347 | else { | |
355 | 348 | let arbReleaseTime = (valueOrElse(getInteger(wlgContract, keyLastWlgTradeTimeByUser(address)), 0) + arbitrageDelay) | |
356 | 349 | if ((arbReleaseTime > lastBlock.timestamp)) | |
357 | 350 | then throw(("You traded some WLGOLD, cannot unstake until " + toString(arbReleaseTime))) | |
358 | 351 | else { | |
359 | - | let $ | |
360 | - | let actions = $ | |
361 | - | let wlgClaimedAmount = $ | |
352 | + | let $t073517428 = stakeUnstakeAcresInternal(-(amount), address) | |
353 | + | let actions = $t073517428._1 | |
354 | + | let wlgClaimedAmount = $t073517428._2 | |
362 | 355 | $Tuple2(((actions :+ ScriptTransfer(i.caller, amount, acresAssetId)) ++ prologActions), wlgClaimedAmount) | |
363 | 356 | } | |
364 | 357 | } | |
365 | 358 | } | |
366 | 359 | } | |
367 | 360 | ||
368 | 361 | ||
369 | 362 | ||
370 | 363 | @Callable(i) | |
371 | 364 | func stakeAcres () = { | |
372 | 365 | let prologActions = prolog(i) | |
373 | 366 | let address = toString(i.caller) | |
374 | 367 | if ((size(i.payments) != 1)) | |
375 | 368 | then throw("exactly 1 payment must be attached") | |
376 | 369 | else { | |
377 | 370 | let pmt = i.payments[0] | |
378 | 371 | let amt = pmt.amount | |
379 | 372 | if (if (!(isDefined(pmt.assetId))) | |
380 | 373 | then true | |
381 | 374 | else (value(pmt.assetId) != acresAssetId)) | |
382 | 375 | then throw("ACRES payments only!") | |
383 | 376 | else { | |
384 | - | let $ | |
385 | - | let actions = $ | |
386 | - | let wlgClaimedAmount = $ | |
377 | + | let $t078797952 = stakeUnstakeAcresInternal(amt, address) | |
378 | + | let actions = $t078797952._1 | |
379 | + | let wlgClaimedAmount = $t078797952._2 | |
387 | 380 | $Tuple2((actions ++ prologActions), wlgClaimedAmount) | |
388 | 381 | } | |
389 | 382 | } | |
390 | 383 | } | |
391 | 384 | ||
392 | 385 | ||
393 | 386 | ||
394 | 387 | @Callable(i) | |
395 | 388 | func buyAcres () = { | |
396 | 389 | let prologActions = prolog(i) | |
397 | 390 | if ((size(i.payments) != 1)) | |
398 | 391 | then throw("exactly 1 payment must be attached") | |
399 | 392 | else { | |
400 | 393 | let pmt = i.payments[0] | |
401 | 394 | let usdtAmount = pmt.amount | |
402 | 395 | if (if (!(isDefined(pmt.assetId))) | |
403 | 396 | then true | |
404 | 397 | else (value(pmt.assetId) != usdtAssetId)) | |
405 | 398 | then throw("USDT payments only!") | |
406 | 399 | else if ((MULT6 > usdtAmount)) | |
407 | 400 | then throw((("Min payment should be " + fixedPoint(MULT6, 6)) + " USDT")) | |
408 | 401 | else { | |
409 | 402 | let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER) | |
410 | 403 | let wlgAmount = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount)) | |
411 | 404 | let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey)) | |
412 | 405 | let req = invoke(oldAcresAddress, "requestAcresCallback", [acresAmount], nil) | |
413 | 406 | if ((req == req)) | |
414 | 407 | then { | |
415 | 408 | let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [wlgAmount], nil)) | |
416 | 409 | $Tuple2(([ScriptTransfer(i.caller, acresAmount, acresAssetId)] ++ prologActions), wlgRemain) | |
417 | 410 | } | |
418 | 411 | else throw("Strict value is not equal to itself.") | |
419 | 412 | } | |
420 | 413 | } | |
421 | 414 | } | |
422 | 415 | ||
423 | 416 | ||
424 | 417 | ||
425 | 418 | @Callable(i) | |
426 | 419 | func buyAcresREADONLY (usdtAmount) = { | |
427 | 420 | let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER) | |
428 | 421 | let wlgToBurn = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount)) | |
429 | 422 | $Tuple2(nil, [acresAmount, MULT6, acresAmount, wlgToBurn]) | |
430 | 423 | } | |
431 | 424 | ||
432 | 425 | ||
433 | 426 | ||
434 | 427 | @Callable(i) | |
435 | 428 | func sellAcres () = { | |
436 | 429 | let prologActions = prolog(i) | |
437 | 430 | if ((size(i.payments) != 1)) | |
438 | 431 | then throw("exactly 1 payment must be attached") | |
439 | 432 | else { | |
440 | 433 | let pmt = i.payments[0] | |
441 | 434 | let acresAmount = pmt.amount | |
442 | 435 | if (if (!(isDefined(pmt.assetId))) | |
443 | 436 | then true | |
444 | 437 | else (value(pmt.assetId) != acresAssetId)) | |
445 | 438 | then throw("ACRES payments only!") | |
446 | 439 | else if ((MULT7 > acresAmount)) | |
447 | 440 | then throw((("Min payment should be " + fixedPoint(MULT7, 8)) + " ACRES")) | |
448 | 441 | else { | |
449 | 442 | let addr = toString(i.caller) | |
450 | - | let $ | |
451 | - | let limitAction = $ | |
452 | - | let maxUsdt = $ | |
443 | + | let $t098099857 = getSwapLimitAcres() | |
444 | + | let limitAction = $t098099857._1 | |
445 | + | let maxUsdt = $t098099857._2 | |
453 | 446 | let maxAcres = (maxUsdt * USDT2ACRES_MULTIPLIER) | |
454 | 447 | if ((acresAmount > maxAcres)) | |
455 | 448 | then throw((("You can sell max " + fixedPoint(maxAcres, 8)) + " ACRES")) | |
456 | 449 | else { | |
457 | 450 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
458 | 451 | $Tuple2(([limitAction, IntegerEntry(keyLastLimitLeft, (maxUsdt - usdtAmount)), ScriptTransfer(i.caller, usdtAmount, usdtAssetId)] ++ prologActions), usdtAmount) | |
459 | 452 | } | |
460 | 453 | } | |
461 | 454 | } | |
462 | 455 | } | |
463 | 456 | ||
464 | 457 | ||
465 | 458 | ||
466 | 459 | @Callable(i) | |
467 | 460 | func sellAcresREADONLY (address,acresAmount) = { | |
468 | - | let $ | |
469 | - | let limitAction = $ | |
470 | - | let maxUsdt = $ | |
461 | + | let $t01035310401 = getSwapLimitAcres() | |
462 | + | let limitAction = $t01035310401._1 | |
463 | + | let maxUsdt = $t01035310401._2 | |
471 | 464 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
472 | 465 | $Tuple2(nil, [usdtAmount, MULT7, (maxUsdt * USDT2ACRES_MULTIPLIER), 0]) | |
473 | 466 | } | |
474 | 467 | ||
475 | 468 | ||
476 | 469 | ||
477 | 470 | @Callable(i) | |
478 | 471 | func convertOldStakes () = if ((i.caller != this)) | |
479 | 472 | then throw("Temporarily disabled") | |
480 | 473 | else { | |
481 | 474 | let address = toString(i.caller) | |
482 | 475 | if ((size(i.payments) != 0)) | |
483 | 476 | then throw("No payments required") | |
484 | 477 | else { | |
485 | 478 | let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey)) | |
486 | 479 | let amount = valueOrElse(getInteger(oldAcresAddress, keyAcresStakedAmtByUser(address)), 0) | |
487 | 480 | let gotAcres0 = if ((amount > 0)) | |
488 | 481 | then asTuple2Ints(invoke(oldAcresAddress, "unstakeAcresCallback", [amount, address], nil)) | |
489 | 482 | else $Tuple2(0, 0) | |
490 | 483 | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
491 | 484 | let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address)) | |
492 | 485 | let landsResult = if (isDefined(landsStr)) | |
493 | 486 | then { | |
494 | 487 | let lands = split_51C(value(landsStr), "_") | |
495 | 488 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
496 | 489 | then throw("landAssetId is required") | |
497 | 490 | else { | |
498 | 491 | let r = asTuple5Ints(invoke(oldStakingAddress, "unstakeLandCallback", [landAssetId, address], nil)) | |
499 | 492 | $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4)) | |
500 | 493 | } | |
501 | 494 | ||
502 | 495 | let rr = { | |
503 | 496 | let $l = lands | |
504 | 497 | let $s = size($l) | |
505 | 498 | let $acc0 = $Tuple4(0, 0, 0, 0) | |
506 | 499 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
507 | 500 | then $a | |
508 | 501 | else oneLand($a, $l[$i]) | |
509 | 502 | ||
510 | 503 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
511 | 504 | then $a | |
512 | 505 | else throw("List size exceeds 100") | |
513 | 506 | ||
514 | 507 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
515 | 508 | } | |
516 | 509 | let finalize = invoke(oldStakingAddress, "unstakeLandsFinalizeCallback", [address], nil) | |
517 | 510 | if ((finalize == finalize)) | |
518 | 511 | then { | |
519 | 512 | let req = invoke(oldAcresAddress, "requestAcresCallback", [(((rr._1 + rr._2) + rr._3) + rr._4)], nil) | |
520 | 513 | if ((req == req)) | |
521 | 514 | then { | |
522 | - | let $ | |
523 | - | let nftActions = $ | |
524 | - | let nftAssetId = $ | |
515 | + | let $t01227312353 = issueNFTinternal(IdxDtx3PercConversion, i.caller) | |
516 | + | let nftActions = $t01227312353._1 | |
517 | + | let nftAssetId = $t01227312353._2 | |
525 | 518 | $Tuple5(rr._1, rr._2, rr._3, rr._4, nftActions) | |
526 | 519 | } | |
527 | 520 | else throw("Strict value is not equal to itself.") | |
528 | 521 | } | |
529 | 522 | else throw("Strict value is not equal to itself.") | |
530 | 523 | } | |
531 | 524 | else $Tuple5(0, 0, 0, 0, nil) | |
532 | 525 | let duckAssetId = valueOrElse(getString(oldStakingAddress, keyStakedDuckByOwner(address)), "") | |
533 | 526 | let duckResult = if ((duckAssetId != "")) | |
534 | 527 | then asTuple3Ints(invoke(oldStakingAddress, "unstakeDuckCallback", [duckAssetId, address], nil)) | |
535 | 528 | else $Tuple3(0, 0, 0) | |
536 | 529 | let x = stakeUnstakeAcresInternal((((((((gotAcres0._1 + landsResult._1) + landsResult._2) + landsResult._3) + landsResult._4) + duckResult._1) + duckResult._2) + duckResult._3), address) | |
537 | 530 | $Tuple2((landsResult._5 ++ x._1), x._2) | |
538 | 531 | } | |
539 | 532 | } | |
540 | 533 | ||
541 | 534 | ||
542 | 535 | ||
543 | 536 | @Callable(i) | |
544 | 537 | func unstakeLandsREADONLY (address) = { | |
545 | 538 | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
546 | 539 | let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address)) | |
547 | 540 | let landsResult = if (isDefined(landsStr)) | |
548 | 541 | then { | |
549 | 542 | let lands = split_51C(value(landsStr), "_") | |
550 | 543 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
551 | 544 | then throw("landAssetId is required") | |
552 | 545 | else { | |
553 | 546 | let r = asTuple4Ints(invoke(oldStakingAddress, "unstakeLandREADONLY", [landAssetId, address], nil)) | |
554 | 547 | $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4)) | |
555 | 548 | } | |
556 | 549 | ||
557 | 550 | let $l = lands | |
558 | 551 | let $s = size($l) | |
559 | 552 | let $acc0 = $Tuple4(0, 0, 0, 0) | |
560 | 553 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
561 | 554 | then $a | |
562 | 555 | else oneLand($a, $l[$i]) | |
563 | 556 | ||
564 | 557 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
565 | 558 | then $a | |
566 | 559 | else throw("List size exceeds 100") | |
567 | 560 | ||
568 | 561 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
569 | 562 | } | |
570 | 563 | else $Tuple4(0, 0, 0, 0) | |
571 | 564 | $Tuple2(nil, landsResult) | |
572 | 565 | } | |
573 | 566 | ||
574 | 567 | ||
575 | 568 | ||
576 | 569 | @Callable(i) | |
577 | 570 | func stakeAcresCallback (addr) = if ((i.caller != addressFromStringValue(oldStakingContractStr))) | |
578 | 571 | then throw("Permission denied") | |
579 | 572 | else stakeUnstakeAcresInternal(i.payments[0].amount, addr) | |
580 | 573 | ||
581 | 574 | ||
582 | 575 | ||
583 | 576 | @Callable(i) | |
584 | 577 | func simulateStakeAcresREADONLY (address,addedAmount) = { | |
585 | 578 | let amountKey = keyAcresStakedAmtByUser(address) | |
586 | 579 | let newAcresAmount = (valueOrElse(getInteger(amountKey), 0) + addedAmount) | |
587 | 580 | let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0) | |
588 | 581 | let userFpKey = keyFarmingPowerByUser(address) | |
589 | 582 | let oldFp = valueOrElse(getInteger(userFpKey), 0) | |
590 | 583 | let newFp = getFarmingPowerByAcres(newAcresAmount) | |
591 | 584 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
592 | 585 | let newTotalFp = ((oldTotalFp - oldFp) + newFp) | |
593 | 586 | $Tuple2(nil, [oldFp, newFp, oldTotalFp, newTotalFp]) | |
594 | 587 | } | |
595 | 588 | ||
596 | 589 | ||
597 | 590 | ||
598 | 591 | @Callable(i) | |
599 | 592 | func issueNFT (forAddress,nftIndex) = if ((i.caller != wlgContract)) | |
600 | 593 | then throw("Permission denied") | |
601 | 594 | else issueNFTinternal(nftIndex, addressFromStringValue(forAddress)) | |
602 | 595 | ||
603 | 596 |
github/deemru/w8io/026f985 63.80 ms ◑