tx · 9idqNa8EzcRooxoadRjadZNMYUuB1PMRVf8nvPdT6BgE 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep: -0.03100000 Waves 2023.06.02 19:45 [2605317] smart account 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep > SELF 0.00000000 Waves
{ "type": 13, "id": "9idqNa8EzcRooxoadRjadZNMYUuB1PMRVf8nvPdT6BgE", "fee": 3100000, "feeAssetId": null, "timestamp": 1685724348335, "version": 2, "chainId": 84, "sender": "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep", "senderPublicKey": "7v5L7QkXxfkirALdyqmox38QCsa9jtfAtgUfHTh34eWq", "proofs": [ "4uaWeUzSoSwNX6DvFaFPczWC1pe8T3RdNm2Q4xkH58myyUXHtjz7pd5ZDH91DVQMJDzRfL2q5wHBjrJawNDusmRW" ], "script": "base64:BgIxCAISBAoCCBgSAwoBCBIECgIRERIECgIRERIDCgEREgQKAgEBEgQKAggIEgUKAwgICEYABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2R0QXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAEghNp6sggDP07Ru8qO7ouTvMmC3Qtd+geWqNQj+agP/7kDCQAAAgEBVAUHJG1hdGNoMAEgVbHYn3KHgu/l41uNrAWrZd6aQ6EvFrsF8xq3h6XxxRgJAAIBAg1Vbmtub3duIGNoYWluABVkZWZhdWx0UmVzdEFkZHJlc3NTdHIEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDACIzNQUUN1dkZidmg0TGtQVW5yblUxejNqbmJBMXA5bTNXTmh2AwkAAAIBAVQFByRtYXRjaDACIzNNdW1rR0d6dENLQVhwV0RxeGtkZG9mcVhTVWJxUWt2U0p5CQACAQINVW5rbm93biBjaGFpbgADU0VQAgJfXwAFTVVMVDYAwIQ9AAVNVUxUNwCAreIEAAVNVUxUOACAwtcvAAZNVUxUMTAAgMivoCUAC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0BQt1c2RCcDJXaEZlZQULdXNkdEFzc2V0SWQJAQ5TY3JpcHRUcmFuc2ZlcgMJARFAZXh0ck5hdGl2ZSgxMDYyKQEJAQV2YWx1ZQEFBXJlZkJ5BQt1c2RCcDJXaEZlZQULdXNkdEFzc2V0SWQJAM0IAgkAzQgCBQhhY3Rpb25zMQkBDlNjcmlwdFRyYW5zZmVyAwkBEUBleHRyTmF0aXZlKDEwNjIpAQUJbGFuZE93bmVyCQBlAggFAXACXzYJAGgCAAMFC3VzZEJwMldoRmVlBQt1c2R0QXNzZXRJZAkBDlNjcmlwdFRyYW5zZmVyAwUMcmVzdENvbnRyYWN0BQt1c2RCcDJXaEZlZQULdXNkdEFzc2V0SWQDCQECIT0CCQCQAwEIBQFpCHBheW1lbnRzAAAJAAIBAhJObyBwYXltZW50cyBuZWVkZWQFCGFjdGlvbnMxCQCUCgIFCGFjdGlvbnMyCQCVCgMFB2Jsb2NrZWQFBndoU2F2ZQUGYnBTYXZlAJrvlgU=", "height": 2605317, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3wQ8pjGoxB995d3EYL98dkcif5V53i2GoLKQSw62f6sH Next: GfMbtyAJ2t8HJDNRvwkUTqV4jqgibj3i3Ac2NcW23GhP Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let SEP = "__" | |
5 | - | ||
6 | - | let MULT6 = 1000000 | |
7 | - | ||
8 | - | let MULT7 = 10000000 | |
9 | - | ||
10 | - | let MULT8 = 100000000 | |
11 | - | ||
12 | - | let MULT10 = 10000000000 | |
13 | - | ||
14 | 4 | let chain = take(drop(this.bytes, 1), 1) | |
15 | 5 | ||
16 | 6 | let usdtAssetId = match chain { | |
31 | 21 | else throw("Unknown chain") | |
32 | 22 | } | |
33 | 23 | ||
24 | + | let SEP = "__" | |
25 | + | ||
26 | + | let MULT6 = 1000000 | |
27 | + | ||
28 | + | let MULT7 = 10000000 | |
29 | + | ||
30 | + | let MULT8 = 100000000 | |
31 | + | ||
32 | + | let MULT10 = 10000000000 | |
33 | + | ||
34 | + | let LANDPREFIX = "LAND" | |
35 | + | ||
36 | + | let NUMRES = 6 | |
37 | + | ||
38 | + | let DEFAULTLOCATION = "Africa_F_Africa" | |
39 | + | ||
40 | + | let RESOURCEPRICEMIN = 39637 | |
41 | + | ||
42 | + | let resTypes = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"] | |
43 | + | ||
44 | + | let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
45 | + | ||
46 | + | let prodTypes = ["First Aid Kit", "Backpack", "Food Ration", "Jet Pack", "Shield"] | |
47 | + | ||
48 | + | let continents = ["Asia", "Europe", "Americas", "Oceania", "Africa"] | |
49 | + | ||
50 | + | let productionMatrix = ["1_1_1_2_2_5_1_10_0", "2_2_2_4_4_10_1_10_0", "3_3_3_6_6_15_1_10_0", "2_5_5_2_7_5_2_100_1", "4_10_10_4_14_10_2_100_1", "6_15_15_6_21_15_2_100_1", "1_1_1_1_1_8_1_10_2", "2_2_2_2_2_16_1_10_2", "3_3_3_3_3_24_1_10_2", "9_9_1_5_5_1_5_100_3", "18_18_2_10_10_2_5_100_3", "27_27_3_15_15_3_5_100_3", "2_2_1_2_2_2_1_10_4", "4_4_2_4_4_4_1_10_4", "6_6_3_6_6_6_1_10_4"] | |
51 | + | ||
52 | + | let recipeIdxPacksize = 7 | |
53 | + | ||
54 | + | let recipeIdxContinent = 8 | |
55 | + | ||
56 | + | let whIdxLevels = 0 | |
57 | + | ||
58 | + | let whIdxRes = 1 | |
59 | + | ||
60 | + | let whIdxMat = 2 | |
61 | + | ||
62 | + | let whIdxProd = 3 | |
63 | + | ||
64 | + | let whIdxLOFT = 4 | |
65 | + | ||
66 | + | let volLocked = 0 | |
67 | + | ||
68 | + | let volOccupied = 1 | |
69 | + | ||
70 | + | let volTotal = 3 | |
71 | + | ||
72 | + | let bpIdxLevel = 0 | |
73 | + | ||
74 | + | let bpIdxRes = 1 | |
75 | + | ||
76 | + | let bpIdxMat = 2 | |
77 | + | ||
78 | + | let bpIdxProd = 3 | |
79 | + | ||
34 | 80 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
35 | 81 | ||
36 | 82 | ||
37 | - | func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal) | |
38 | - | ||
39 | - | ||
40 | 83 | let IdxCfgStakingDapp = 1 | |
41 | - | ||
42 | - | let IdxCfgEconomyDapp = 2 | |
43 | - | ||
44 | - | let IdxCfgGovernanceDapp = 3 | |
45 | 84 | ||
46 | 85 | func keyRestCfg () = "%s__restConfig" | |
47 | 86 | ||
61 | 100 | ||
62 | 101 | let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp) | |
63 | 102 | ||
64 | - | let DEFAULTLOCATION = "Africa_F_Africa" | |
65 | - | ||
66 | - | let NUMRES = 6 | |
67 | - | ||
68 | 103 | let FACTORYMAXWAREHOUSE = 10000000000 | |
69 | - | ||
70 | - | let RESOURCEPRICEMIN = 39637 | |
71 | - | ||
72 | - | let MINPAYMENT = 10000 | |
73 | 104 | ||
74 | 105 | let SELLMULTIPLIER = 200 | |
75 | 106 | ||
76 | 107 | let BUYMULTIPLIER = 300 | |
77 | 108 | ||
78 | - | let LANDPREFIX = "LAND" | |
79 | - | ||
80 | - | let DUCKPREFIX = "DUCK" | |
81 | - | ||
82 | - | let WHMULTIPLIER = 10000000000 | |
83 | - | ||
84 | 109 | let AUCTIONFEE = 10000 | |
85 | 110 | ||
86 | 111 | let MINSHOPPAYMENT = 100000 | |
87 | - | ||
88 | - | let resTypes = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"] | |
89 | - | ||
90 | - | let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
91 | - | ||
92 | - | let prodTypes = ["First Aid Kit", "Backpack", "Food Ration", "Jet Pack", "Shield"] | |
93 | - | ||
94 | - | let continents = ["Americas", "Europe", "Asia", "Africa", "Oceania"] | |
95 | - | ||
96 | - | let productionMatrix = ["1_1_1_2_2_5_1_10_0", "2_2_2_4_4_10_1_10_0", "3_3_3_6_6_15_1_10_0", "2_5_5_2_7_5_2_100_1", "4_10_10_4_14_10_2_100_1", "6_15_15_6_21_15_2_100_1", "1_1_1_1_1_8_1_10_2", "2_2_2_2_2_16_1_10_2", "3_3_3_3_3_24_1_10_2", "9_9_1_5_5_1_5_100_3", "18_18_2_10_10_2_5_100_3", "27_27_3_15_15_3_5_100_3", "2_2_1_2_2_2_1_10_4", "4_4_2_4_4_4_1_10_4", "6_6_3_6_6_6_1_10_4"] | |
97 | - | ||
98 | - | let contIdxAmericas = 0 | |
99 | - | ||
100 | - | let contIdxEurope = 1 | |
101 | - | ||
102 | - | let contIdxAsia = 2 | |
103 | - | ||
104 | - | let contIdxAfrica = 3 | |
105 | - | ||
106 | - | let contIdxOceania = 4 | |
107 | - | ||
108 | - | let recipeIdxFuel = 0 | |
109 | - | ||
110 | - | let recipeIdxMetal = 1 | |
111 | - | ||
112 | - | let recipeIdxPlank = 2 | |
113 | - | ||
114 | - | let recipeIdxGlass = 3 | |
115 | - | ||
116 | - | let recipeIdxPlastic = 4 | |
117 | - | ||
118 | - | let recipeIdxProtein = 5 | |
119 | - | ||
120 | - | let recipeIdxWeight = 6 | |
121 | - | ||
122 | - | let recipeIdxPacksize = 7 | |
123 | - | ||
124 | - | let recipeIdxContinent = 8 | |
125 | 112 | ||
126 | 113 | func keyFactoryWarehouseByIdAndType (factoryId,resType) = ((("factoryWhByContinentAndRes_" + factoryId) + "_") + toString(resType)) | |
127 | 114 | ||
155 | 142 | let locIdxType = 1 | |
156 | 143 | ||
157 | 144 | let locIdxId = 2 | |
158 | - | ||
159 | - | let bpIdxLevel = 0 | |
160 | - | ||
161 | - | let bpIdxRes = 1 | |
162 | - | ||
163 | - | let bpIdxMat = 2 | |
164 | - | ||
165 | - | let bpIdxProd = 3 | |
166 | - | ||
167 | - | let whIdxLevels = 0 | |
168 | - | ||
169 | - | let whIdxRes = 1 | |
170 | - | ||
171 | - | let whIdxMat = 2 | |
172 | - | ||
173 | - | let whIdxProd = 3 | |
174 | - | ||
175 | - | let whIdxLOFT = 4 | |
176 | - | ||
177 | - | let volLocked = 0 | |
178 | - | ||
179 | - | let volOccupied = 1 | |
180 | - | ||
181 | - | let volFree = 2 | |
182 | - | ||
183 | - | let volTotal = 3 | |
184 | 145 | ||
185 | 146 | let ordIdxRes = 0 | |
186 | 147 | ||
327 | 288 | then nil | |
328 | 289 | else split(currentOrd[ordIdxProd], "_") | |
329 | 290 | if ((size(newOrd) != 3)) | |
330 | - | then throw(" | |
291 | + | then throw("newOrderStr should contain exactly 2 ':' separators") | |
331 | 292 | else { | |
332 | 293 | let resParts = split(newOrd[0], "_") | |
333 | 294 | let matParts = split(newOrd[1], "_") | |
411 | 372 | let whInit = if ((size(acc._9) > j)) | |
412 | 373 | then parseIntValue(acc._9[j]) | |
413 | 374 | else 0 | |
414 | - | let whOrdParts = split(acc._10[j], "@") | |
375 | + | let whOrdInit = if ((size(acc._10) > j)) | |
376 | + | then acc._10[j] | |
377 | + | else "0@0" | |
378 | + | let whOrdParts = split(whOrdInit, "@") | |
415 | 379 | let whOrdAm = parseIntValue(whOrdParts[0]) | |
416 | 380 | let whOrdPr = parseIntValue(whOrdParts[1]) | |
417 | 381 | if (if ((bpOrdAm != 0)) | |
422 | 386 | let whOrdUsd = fraction(whOrdAm, whOrdPr, MULT8) | |
423 | 387 | let deltaVol = toVolume(bpOrdAm, pkgSize, isProd) | |
424 | 388 | if ((bpOrdAm == 0)) | |
425 | - | then $Tuple12((acc._1 :+ toString(whInit)), (acc._2 :+ | |
389 | + | then $Tuple12((acc._1 :+ toString(whInit)), (acc._2 :+ whOrdInit), (acc._3 :+ toString(bpInit)), acc._4, acc._5, acc._6, (acc._7 + 1), acc._8, acc._9, acc._10, acc._11, isProd) | |
426 | 390 | else if ((bpOrdAm > 0)) | |
427 | 391 | then if ((0 > whOrdAm)) | |
428 | 392 | then if ((bpOrdAm > -(whOrdAm))) | |
750 | 714 | ||
751 | 715 | ||
752 | 716 | @Callable(i) | |
753 | - | func setWarehouseOrder ( | |
717 | + | func setWarehouseOrder (newOrderStr,landAssetId) = { | |
754 | 718 | let user = i.originCaller | |
755 | 719 | let addr = toString(user) | |
756 | 720 | let result = if ((user != restContract)) | |
766 | 730 | else false) | |
767 | 731 | then throw((LANDPREFIX + " is not yours")) | |
768 | 732 | else { | |
769 | - | let | |
733 | + | let newOrder = split_4C(newOrderStr, ":") | |
770 | 734 | let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil)) | |
771 | 735 | let currentWh = split_4C(wh, ":") | |
772 | 736 | let loft = split(currentWh[whIdxLOFT], "_") | |
774 | 738 | let whTotal = parseIntValue(loft[volTotal]) | |
775 | 739 | let ordKey = keyOrderByLand(landAssetId) | |
776 | 740 | let currentOrd = getOrder(ordKey) | |
777 | - | let z = setInternal(currentWh, currentOrd, | |
741 | + | let z = setInternal(currentWh, currentOrd, newOrder) | |
778 | 742 | let buyVolSaldo = z._4 | |
779 | 743 | let sellVolSaldo = z._5 | |
780 | 744 | let whLocked = (buyVolSaldo + sellVolSaldo) | |
781 | 745 | let whFree = ((whTotal - whOccupied) - whLocked) | |
782 | - | if ((buyVolSaldo > whFree)) | |
783 | - | then throw((((("Attempt to reserve " + toString(buyVolSaldo)) + " space for buy orders, but only ") + toString(whFree)) + " warehouse empty space left")) | |
784 | - | else if ((sellVolSaldo > whOccupied)) | |
785 | - | then throw((((("Attempt to lock " + toString(sellVolSaldo)) + " space for sell orders, but only ") + toString(whOccupied)) + " warehouse space occupied")) | |
786 | - | else { | |
787 | - | let whStr = makeString_2C([currentWh[whIdxLevels], makeString(z._1, "_"), makeString(z._2, "_"), makeString(z._3, "_"), toString(whLocked)], ":") | |
788 | - | let whSave = invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil) | |
789 | - | if ((whSave == whSave)) | |
790 | - | then { | |
791 | - | let usdSaldo = z._6 | |
792 | - | let actions = if ((usdSaldo > 0)) | |
793 | - | then if ((size(i.payments) != 1)) | |
794 | - | then throw("exactly 1 payment must be attached") | |
795 | - | else { | |
796 | - | let pmt = i.payments[0] | |
797 | - | let amt = pmt.amount | |
798 | - | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment") | |
799 | - | if ((pmtAssetId != usdtAssetId)) | |
800 | - | then throw("USDT payments only!") | |
801 | - | else if ((amt != usdSaldo)) | |
802 | - | then throw(("Payment needed is " + toString(usdSaldo))) | |
803 | - | else [StringEntry(ordKey, cargoListStr)] | |
804 | - | } | |
805 | - | else if ((usdSaldo == 0)) | |
806 | - | then if ((size(i.payments) != 0)) | |
807 | - | then throw("No payments needed") | |
808 | - | else [StringEntry(ordKey, cargoListStr)] | |
809 | - | else if ((size(i.payments) != 0)) | |
810 | - | then throw("No payments needed") | |
811 | - | else [ScriptTransfer(addressFromStringValue(owner), -(usdSaldo), usdtAssetId), StringEntry(ordKey, cargoListStr)] | |
812 | - | $Tuple2(actions, result) | |
746 | + | if ((0 > whFree)) | |
747 | + | then throw((((("Attempt to reserve " + toString(buyVolSaldo)) + " space for buy orders, and ") + toString(sellVolSaldo)) + " space for sell orders, leads to negative free space")) | |
748 | + | else { | |
749 | + | let whStr = makeString_2C([currentWh[whIdxLevels], makeString(z._1, "_"), makeString(z._2, "_"), makeString(z._3, "_"), toString(whLocked)], ":") | |
750 | + | let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil)) | |
751 | + | let usdSaldo = z._6 | |
752 | + | let actions = if ((usdSaldo > 0)) | |
753 | + | then if ((size(i.payments) != 1)) | |
754 | + | then throw("exactly 1 payment must be attached") | |
755 | + | else { | |
756 | + | let pmt = i.payments[0] | |
757 | + | let amt = pmt.amount | |
758 | + | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment") | |
759 | + | if ((pmtAssetId != usdtAssetId)) | |
760 | + | then throw("USDT payments only!") | |
761 | + | else if ((amt != usdSaldo)) | |
762 | + | then throw(("Payment needed is " + toString(usdSaldo))) | |
763 | + | else [StringEntry(ordKey, newOrderStr)] | |
813 | 764 | } | |
814 | - | else throw("Strict value is not equal to itself.") | |
815 | - | } | |
765 | + | else if ((usdSaldo == 0)) | |
766 | + | then if ((size(i.payments) != 0)) | |
767 | + | then throw("No payments needed") | |
768 | + | else [StringEntry(ordKey, newOrderStr)] | |
769 | + | else if ((size(i.payments) != 0)) | |
770 | + | then throw("No payments needed") | |
771 | + | else [ScriptTransfer(addressFromStringValue(owner), -(usdSaldo), usdtAssetId), StringEntry(ordKey, newOrderStr)] | |
772 | + | $Tuple2(actions, $Tuple2(result, whSave)) | |
773 | + | } | |
816 | 774 | } | |
817 | 775 | } | |
818 | 776 | } | |
822 | 780 | @Callable(i) | |
823 | 781 | func acceptWarehouseOrder (bpOrderStr,landAssetId,duckAssetId) = { | |
824 | 782 | let blocked = checkBlocked() | |
825 | - | if ((blocked == blocked)) | |
826 | - | then { | |
827 | - | let caller = i.originCaller | |
828 | - | let callerAddr = toString(caller) | |
829 | - | let stakedDuckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(callerAddr)), "You don't have a duck staked") | |
830 | - | let curLocation = valueOrElse(getString(stakingContract, keyDuckLocation(stakedDuckAssetId)), DEFAULTLOCATION) | |
831 | - | let loc = split(value(curLocation), "_") | |
832 | - | if ((loc[locIdxType] != "L")) | |
833 | - | then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L")) | |
834 | - | else if ((stakedDuckAssetId != duckAssetId)) | |
835 | - | then throw(((("Your staked duck is " + stakedDuckAssetId) + ", but passed ") + duckAssetId)) | |
783 | + | let caller = i.originCaller | |
784 | + | let callerAddr = toString(caller) | |
785 | + | let stakedDuckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(callerAddr)), "You don't have a duck staked") | |
786 | + | let curLocation = valueOrElse(getString(stakingContract, keyDuckLocation(stakedDuckAssetId)), DEFAULTLOCATION) | |
787 | + | let loc = split(value(curLocation), "_") | |
788 | + | if ((loc[locIdxType] != "L")) | |
789 | + | then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L")) | |
790 | + | else if ((stakedDuckAssetId != duckAssetId)) | |
791 | + | then throw(((("Your staked duck is " + stakedDuckAssetId) + ", but passed ") + duckAssetId)) | |
792 | + | else { | |
793 | + | let landAsset = value(assetInfo(fromBase58String(landAssetId))) | |
794 | + | if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId))))) | |
795 | + | then throw((("NFT " + landAsset.name) + " is not staked")) | |
836 | 796 | else { | |
837 | - | let | |
838 | - | if ( | |
839 | - | then throw( | |
797 | + | let landOwner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + landAsset.name) + " is orphaned")) | |
798 | + | if ((landOwner == callerAddr)) | |
799 | + | then throw("You cannot trade with yourself") | |
840 | 800 | else { | |
841 | - | let | |
842 | - | if (( | |
843 | - | then throw(" | |
801 | + | let bpOrderParts = split_4C(bpOrderStr, ":") | |
802 | + | if ((size(bpOrderParts) != 3)) | |
803 | + | then throw("bpOrderStr should contain exactly 2 ':' separators") | |
844 | 804 | else { | |
845 | - | let bpOrderParts = split_4C(bpOrderStr, ":") | |
846 | - | if ((size(bpOrderParts) != 3)) | |
847 | - | then throw("bpOrderStr should contain exactly 2 ':' separators") | |
848 | - | else { | |
849 | - | let bpOrdRes = split(bpOrderParts[0], "_") | |
850 | - | let bpOrdMat = split(bpOrderParts[1], "_") | |
851 | - | let bpOrdProd = if ((bpOrderParts[2] == "")) | |
852 | - | then nil | |
853 | - | else split(bpOrderParts[2], "_") | |
854 | - | if ((size(bpOrdRes) != NUMRES)) | |
855 | - | then throw("All 6 resources should be passed") | |
856 | - | else if ((size(bpOrdMat) != NUMRES)) | |
857 | - | then throw("All 6 materials should be passed") | |
858 | - | else { | |
859 | - | let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil)) | |
860 | - | let currentWh = split_4C(wh, ":") | |
861 | - | let currWhRes = split(currentWh[whIdxRes], "_") | |
862 | - | let currWhMat = split(currentWh[whIdxMat], "_") | |
863 | - | let currWhProd = if ((currentWh[whIdxProd] == "")) | |
864 | - | then nil | |
865 | - | else split(currentWh[whIdxProd], "_") | |
866 | - | let currWhLockedVol = parseIntValue(split(currentWh[whIdxLOFT], "_")[volLocked]) | |
867 | - | let bpKey = keyBackpackByDuck(duckAssetId) | |
868 | - | let currentPack = getBackpack(bpKey) | |
869 | - | let bpResList = split(currentPack[bpIdxRes], "_") | |
870 | - | let bpMatList = split(currentPack[bpIdxMat], "_") | |
871 | - | let bpProdList = if ((currentPack[bpIdxProd] == "")) | |
872 | - | then nil | |
873 | - | else split(currentPack[bpIdxProd], "_") | |
874 | - | let ordKey = keyOrderByLand(landAssetId) | |
875 | - | let whOrd = getOrder(ordKey) | |
876 | - | let whOrdRes = split(whOrd[ordIdxRes], "_") | |
877 | - | let whOrdMat = split(whOrd[ordIdxMat], "_") | |
878 | - | let whOrdProd = if ((whOrd[ordIdxProd] == "")) | |
879 | - | then nil | |
880 | - | else split(whOrd[ordIdxProd], "_") | |
881 | - | let r = { | |
882 | - | let $l = bpOrdRes | |
883 | - | let $s = size($l) | |
884 | - | let $acc0 = $Tuple12(nil, nil, nil, 0, 0, 0, 0, bpResList, currWhRes, whOrdRes, resTypes, false) | |
885 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
886 | - | then $a | |
887 | - | else acceptCommon($a, $l[$i]) | |
805 | + | let bpOrdRes = split(bpOrderParts[0], "_") | |
806 | + | let bpOrdMat = split(bpOrderParts[1], "_") | |
807 | + | let bpOrdProd = if ((bpOrderParts[2] == "")) | |
808 | + | then nil | |
809 | + | else split(bpOrderParts[2], "_") | |
810 | + | if ((size(bpOrdRes) != NUMRES)) | |
811 | + | then throw("All 6 resources should be passed") | |
812 | + | else if ((size(bpOrdMat) != NUMRES)) | |
813 | + | then throw("All 6 materials should be passed") | |
814 | + | else { | |
815 | + | let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil)) | |
816 | + | let currentWh = split_4C(wh, ":") | |
817 | + | let currWhRes = split(currentWh[whIdxRes], "_") | |
818 | + | let currWhMat = split(currentWh[whIdxMat], "_") | |
819 | + | let currWhProd = if ((currentWh[whIdxProd] == "")) | |
820 | + | then nil | |
821 | + | else split(currentWh[whIdxProd], "_") | |
822 | + | let currWhLockedVol = parseIntValue(split(currentWh[whIdxLOFT], "_")[volLocked]) | |
823 | + | let bpKey = keyBackpackByDuck(duckAssetId) | |
824 | + | let currentPack = getBackpack(bpKey) | |
825 | + | let bpResList = split(currentPack[bpIdxRes], "_") | |
826 | + | let bpMatList = split(currentPack[bpIdxMat], "_") | |
827 | + | let bpProdList = if ((currentPack[bpIdxProd] == "")) | |
828 | + | then nil | |
829 | + | else split(currentPack[bpIdxProd], "_") | |
830 | + | let ordKey = keyOrderByLand(landAssetId) | |
831 | + | let whOrd = getOrder(ordKey) | |
832 | + | let whOrdRes = split(whOrd[ordIdxRes], "_") | |
833 | + | let whOrdMat = split(whOrd[ordIdxMat], "_") | |
834 | + | let whOrdProd = if ((whOrd[ordIdxProd] == "")) | |
835 | + | then nil | |
836 | + | else split(whOrd[ordIdxProd], "_") | |
837 | + | let r = { | |
838 | + | let $l = bpOrdRes | |
839 | + | let $s = size($l) | |
840 | + | let $acc0 = $Tuple12(nil, nil, nil, 0, 0, 0, 0, bpResList, currWhRes, whOrdRes, resTypes, false) | |
841 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
842 | + | then $a | |
843 | + | else acceptCommon($a, $l[$i]) | |
888 | 844 | ||
889 | - | ||
890 | - | ||
891 | - | ||
845 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
846 | + | then $a | |
847 | + | else throw("List size exceeds 6") | |
892 | 848 | ||
893 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
849 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
850 | + | } | |
851 | + | let m = { | |
852 | + | let $l = bpOrdMat | |
853 | + | let $s = size($l) | |
854 | + | let $acc0 = $Tuple12(nil, nil, nil, r._4, r._5, r._6, 0, bpMatList, currWhMat, whOrdMat, matTypes, false) | |
855 | + | func $f1_1 ($a,$i) = if (($i >= $s)) | |
856 | + | then $a | |
857 | + | else acceptCommon($a, $l[$i]) | |
858 | + | ||
859 | + | func $f1_2 ($a,$i) = if (($i >= $s)) | |
860 | + | then $a | |
861 | + | else throw("List size exceeds 6") | |
862 | + | ||
863 | + | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
864 | + | } | |
865 | + | let p = if ((size(bpOrdProd) != 0)) | |
866 | + | then { | |
867 | + | let $l = bpOrdProd | |
868 | + | let $s = size($l) | |
869 | + | let $acc0 = $Tuple12(nil, nil, nil, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true) | |
870 | + | func $f2_1 ($a,$i) = if (($i >= $s)) | |
871 | + | then $a | |
872 | + | else acceptCommon($a, $l[$i]) | |
873 | + | ||
874 | + | func $f2_2 ($a,$i) = if (($i >= $s)) | |
875 | + | then $a | |
876 | + | else throw("List size exceeds 50") | |
877 | + | ||
878 | + | $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_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) | |
879 | + | } | |
880 | + | else $Tuple12(currWhProd, whOrdProd, bpProdList, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true) | |
881 | + | let volSaldo = p._4 | |
882 | + | let newLockedVol = if ((0 > (currWhLockedVol - volSaldo))) | |
883 | + | then 0 | |
884 | + | else (currWhLockedVol - volSaldo) | |
885 | + | let whStr = makeString_2C([currentWh[whIdxLevels], makeString(r._1, "_"), makeString(m._1, "_"), makeString(p._1, "_"), toString(newLockedVol)], ":") | |
886 | + | let newWhOrdStr = makeString_2C([makeString(r._2, "_"), makeString(m._2, "_"), makeString(p._2, "_")], ":") | |
887 | + | let newBpStr = makeString_2C([currentPack[bpIdxLevel], makeString(r._3, "_"), makeString(m._3, "_"), makeString(p._3, "_")], ":") | |
888 | + | let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil)) | |
889 | + | let bpSave = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil)) | |
890 | + | let actions = [StringEntry(ordKey, newWhOrdStr)] | |
891 | + | let usdWh2BpSaldo = p._5 | |
892 | + | let actions1 = if ((usdWh2BpSaldo > 0)) | |
893 | + | then { | |
894 | + | let usdWh2BpFee = fraction(p._5, AUCTIONFEE, MULT6) | |
895 | + | let refByKey = keyAddressRefBy(callerAddr) | |
896 | + | let refBy = getString(stakingContract, refByKey) | |
897 | + | if (isDefined(refBy)) | |
898 | + | then (((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdWh2BpFee, usdtAssetId)) | |
899 | + | else ((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId)) | |
900 | + | } | |
901 | + | else actions | |
902 | + | let usdBp2WhSaldo = p._6 | |
903 | + | let actions2 = if ((usdBp2WhSaldo > 0)) | |
904 | + | then if ((size(i.payments) != 1)) | |
905 | + | then throw("exactly 1 payment must be attached") | |
906 | + | else { | |
907 | + | let pmt = i.payments[0] | |
908 | + | let amt = pmt.amount | |
909 | + | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment") | |
910 | + | if ((pmtAssetId != usdtAssetId)) | |
911 | + | then throw("USDT payments only!") | |
912 | + | else if ((amt != usdBp2WhSaldo)) | |
913 | + | then throw(("Payment needed is " + toString(usdBp2WhSaldo))) | |
914 | + | else if ((MINSHOPPAYMENT > amt)) | |
915 | + | then throw(("Payment should be at least " + toString(MINSHOPPAYMENT))) | |
916 | + | else { | |
917 | + | let usdBp2WhFee = fraction(p._6, AUCTIONFEE, MULT6) | |
918 | + | let refByKey = keyAddressRefBy(landOwner) | |
919 | + | let refBy = getString(stakingContract, refByKey) | |
920 | + | if (isDefined(refBy)) | |
921 | + | then (((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdBp2WhFee, usdtAssetId)) | |
922 | + | else ((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId)) | |
923 | + | } | |
894 | 924 | } | |
895 | - | let m = { | |
896 | - | let $l = bpOrdMat | |
897 | - | let $s = size($l) | |
898 | - | let $acc0 = $Tuple12(nil, nil, nil, r._4, r._5, r._6, 0, bpMatList, currWhMat, whOrdMat, matTypes, false) | |
899 | - | func $f1_1 ($a,$i) = if (($i >= $s)) | |
900 | - | then $a | |
901 | - | else acceptCommon($a, $l[$i]) | |
902 | - | ||
903 | - | func $f1_2 ($a,$i) = if (($i >= $s)) | |
904 | - | then $a | |
905 | - | else throw("List size exceeds 6") | |
906 | - | ||
907 | - | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
908 | - | } | |
909 | - | let p = if ((size(bpOrdProd) != 0)) | |
910 | - | then { | |
911 | - | let $l = bpOrdProd | |
912 | - | let $s = size($l) | |
913 | - | let $acc0 = $Tuple12(nil, nil, nil, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true) | |
914 | - | func $f2_1 ($a,$i) = if (($i >= $s)) | |
915 | - | then $a | |
916 | - | else acceptCommon($a, $l[$i]) | |
917 | - | ||
918 | - | func $f2_2 ($a,$i) = if (($i >= $s)) | |
919 | - | then $a | |
920 | - | else throw("List size exceeds 50") | |
921 | - | ||
922 | - | $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_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) | |
923 | - | } | |
924 | - | else $Tuple12(currWhProd, whOrdProd, bpProdList, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true) | |
925 | - | let volSaldo = p._4 | |
926 | - | let newLockedVol = if ((0 > (currWhLockedVol - volSaldo))) | |
927 | - | then 0 | |
928 | - | else (currWhLockedVol - volSaldo) | |
929 | - | let whStr = makeString_2C([currentWh[whIdxLevels], makeString(r._1, "_"), makeString(m._1, "_"), makeString(p._1, "_"), toString(newLockedVol)], ":") | |
930 | - | let newWhOrdStr = makeString_2C([makeString(r._2, "_"), makeString(m._2, "_"), makeString(p._2, "_")], ":") | |
931 | - | let newBpStr = makeString_2C([currentPack[bpIdxLevel], makeString(r._3, "_"), makeString(m._3, "_"), makeString(p._3, "_")], ":") | |
932 | - | let whSave = invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil) | |
933 | - | if ((whSave == whSave)) | |
934 | - | then { | |
935 | - | let bpSave = invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil) | |
936 | - | if ((bpSave == bpSave)) | |
937 | - | then { | |
938 | - | let actions = [StringEntry(ordKey, newWhOrdStr)] | |
939 | - | let usdWh2BpSaldo = p._5 | |
940 | - | let actions1 = if ((usdWh2BpSaldo > 0)) | |
941 | - | then { | |
942 | - | let usdWh2BpFee = fraction(p._5, AUCTIONFEE, MULT6) | |
943 | - | let refByKey = keyAddressRefBy(callerAddr) | |
944 | - | let refBy = getString(stakingContract, refByKey) | |
945 | - | if (isDefined(refBy)) | |
946 | - | then (((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdWh2BpFee, usdtAssetId)) | |
947 | - | else ((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId)) | |
948 | - | } | |
949 | - | else actions | |
950 | - | let usdBp2WhSaldo = p._6 | |
951 | - | if ((usdBp2WhSaldo > 0)) | |
952 | - | then if ((size(i.payments) != 1)) | |
953 | - | then throw("exactly 1 payment must be attached") | |
954 | - | else { | |
955 | - | let pmt = i.payments[0] | |
956 | - | let amt = pmt.amount | |
957 | - | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment") | |
958 | - | if ((pmtAssetId != usdtAssetId)) | |
959 | - | then throw("USDT payments only!") | |
960 | - | else if ((amt != usdBp2WhSaldo)) | |
961 | - | then throw(("Payment needed is " + toString(usdBp2WhSaldo))) | |
962 | - | else if ((MINSHOPPAYMENT > amt)) | |
963 | - | then throw(("Payment should be at least " + toString(MINSHOPPAYMENT))) | |
964 | - | else { | |
965 | - | let usdBp2WhFee = fraction(p._6, AUCTIONFEE, MULT6) | |
966 | - | let refByKey = keyAddressRefBy(landOwner) | |
967 | - | let refBy = getString(stakingContract, refByKey) | |
968 | - | if (isDefined(refBy)) | |
969 | - | then (((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdBp2WhFee, usdtAssetId)) | |
970 | - | else ((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId)) | |
971 | - | } | |
972 | - | } | |
973 | - | else if ((size(i.payments) != 0)) | |
974 | - | then throw("No payments needed") | |
975 | - | else actions1 | |
976 | - | } | |
977 | - | else throw("Strict value is not equal to itself.") | |
978 | - | } | |
979 | - | else throw("Strict value is not equal to itself.") | |
980 | - | } | |
981 | - | } | |
925 | + | else if ((size(i.payments) != 0)) | |
926 | + | then throw("No payments needed") | |
927 | + | else actions1 | |
928 | + | $Tuple2(actions2, $Tuple3(blocked, whSave, bpSave)) | |
929 | + | } | |
982 | 930 | } | |
983 | 931 | } | |
984 | 932 | } | |
985 | - | } | |
986 | - | else throw("Strict value is not equal to itself.") | |
933 | + | } | |
987 | 934 | } | |
988 | 935 | ||
989 | 936 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let SEP = "__" | |
5 | - | ||
6 | - | let MULT6 = 1000000 | |
7 | - | ||
8 | - | let MULT7 = 10000000 | |
9 | - | ||
10 | - | let MULT8 = 100000000 | |
11 | - | ||
12 | - | let MULT10 = 10000000000 | |
13 | - | ||
14 | 4 | let chain = take(drop(this.bytes, 1), 1) | |
15 | 5 | ||
16 | 6 | let usdtAssetId = match chain { | |
17 | 7 | case _ => | |
18 | 8 | if ((base58'2W' == $match0)) | |
19 | 9 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
20 | 10 | else if ((base58'2T' == $match0)) | |
21 | 11 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
22 | 12 | else throw("Unknown chain") | |
23 | 13 | } | |
24 | 14 | ||
25 | 15 | let defaultRestAddressStr = match chain { | |
26 | 16 | case _ => | |
27 | 17 | if ((base58'2W' == $match0)) | |
28 | 18 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
29 | 19 | else if ((base58'2T' == $match0)) | |
30 | 20 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
31 | 21 | else throw("Unknown chain") | |
32 | 22 | } | |
33 | 23 | ||
24 | + | let SEP = "__" | |
25 | + | ||
26 | + | let MULT6 = 1000000 | |
27 | + | ||
28 | + | let MULT7 = 10000000 | |
29 | + | ||
30 | + | let MULT8 = 100000000 | |
31 | + | ||
32 | + | let MULT10 = 10000000000 | |
33 | + | ||
34 | + | let LANDPREFIX = "LAND" | |
35 | + | ||
36 | + | let NUMRES = 6 | |
37 | + | ||
38 | + | let DEFAULTLOCATION = "Africa_F_Africa" | |
39 | + | ||
40 | + | let RESOURCEPRICEMIN = 39637 | |
41 | + | ||
42 | + | let resTypes = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"] | |
43 | + | ||
44 | + | let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
45 | + | ||
46 | + | let prodTypes = ["First Aid Kit", "Backpack", "Food Ration", "Jet Pack", "Shield"] | |
47 | + | ||
48 | + | let continents = ["Asia", "Europe", "Americas", "Oceania", "Africa"] | |
49 | + | ||
50 | + | let productionMatrix = ["1_1_1_2_2_5_1_10_0", "2_2_2_4_4_10_1_10_0", "3_3_3_6_6_15_1_10_0", "2_5_5_2_7_5_2_100_1", "4_10_10_4_14_10_2_100_1", "6_15_15_6_21_15_2_100_1", "1_1_1_1_1_8_1_10_2", "2_2_2_2_2_16_1_10_2", "3_3_3_3_3_24_1_10_2", "9_9_1_5_5_1_5_100_3", "18_18_2_10_10_2_5_100_3", "27_27_3_15_15_3_5_100_3", "2_2_1_2_2_2_1_10_4", "4_4_2_4_4_4_1_10_4", "6_6_3_6_6_6_1_10_4"] | |
51 | + | ||
52 | + | let recipeIdxPacksize = 7 | |
53 | + | ||
54 | + | let recipeIdxContinent = 8 | |
55 | + | ||
56 | + | let whIdxLevels = 0 | |
57 | + | ||
58 | + | let whIdxRes = 1 | |
59 | + | ||
60 | + | let whIdxMat = 2 | |
61 | + | ||
62 | + | let whIdxProd = 3 | |
63 | + | ||
64 | + | let whIdxLOFT = 4 | |
65 | + | ||
66 | + | let volLocked = 0 | |
67 | + | ||
68 | + | let volOccupied = 1 | |
69 | + | ||
70 | + | let volTotal = 3 | |
71 | + | ||
72 | + | let bpIdxLevel = 0 | |
73 | + | ||
74 | + | let bpIdxRes = 1 | |
75 | + | ||
76 | + | let bpIdxMat = 2 | |
77 | + | ||
78 | + | let bpIdxProd = 3 | |
79 | + | ||
34 | 80 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
35 | 81 | ||
36 | 82 | ||
37 | - | func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal) | |
38 | - | ||
39 | - | ||
40 | 83 | let IdxCfgStakingDapp = 1 | |
41 | - | ||
42 | - | let IdxCfgEconomyDapp = 2 | |
43 | - | ||
44 | - | let IdxCfgGovernanceDapp = 3 | |
45 | 84 | ||
46 | 85 | func keyRestCfg () = "%s__restConfig" | |
47 | 86 | ||
48 | 87 | ||
49 | 88 | func keyRestAddress () = "%s__restAddr" | |
50 | 89 | ||
51 | 90 | ||
52 | 91 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
53 | 92 | ||
54 | 93 | ||
55 | 94 | func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
56 | 95 | ||
57 | 96 | ||
58 | 97 | let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr)) | |
59 | 98 | ||
60 | 99 | let restCfg = readRestCfgOrFail(restContract) | |
61 | 100 | ||
62 | 101 | let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp) | |
63 | 102 | ||
64 | - | let DEFAULTLOCATION = "Africa_F_Africa" | |
65 | - | ||
66 | - | let NUMRES = 6 | |
67 | - | ||
68 | 103 | let FACTORYMAXWAREHOUSE = 10000000000 | |
69 | - | ||
70 | - | let RESOURCEPRICEMIN = 39637 | |
71 | - | ||
72 | - | let MINPAYMENT = 10000 | |
73 | 104 | ||
74 | 105 | let SELLMULTIPLIER = 200 | |
75 | 106 | ||
76 | 107 | let BUYMULTIPLIER = 300 | |
77 | 108 | ||
78 | - | let LANDPREFIX = "LAND" | |
79 | - | ||
80 | - | let DUCKPREFIX = "DUCK" | |
81 | - | ||
82 | - | let WHMULTIPLIER = 10000000000 | |
83 | - | ||
84 | 109 | let AUCTIONFEE = 10000 | |
85 | 110 | ||
86 | 111 | let MINSHOPPAYMENT = 100000 | |
87 | - | ||
88 | - | let resTypes = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"] | |
89 | - | ||
90 | - | let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
91 | - | ||
92 | - | let prodTypes = ["First Aid Kit", "Backpack", "Food Ration", "Jet Pack", "Shield"] | |
93 | - | ||
94 | - | let continents = ["Americas", "Europe", "Asia", "Africa", "Oceania"] | |
95 | - | ||
96 | - | let productionMatrix = ["1_1_1_2_2_5_1_10_0", "2_2_2_4_4_10_1_10_0", "3_3_3_6_6_15_1_10_0", "2_5_5_2_7_5_2_100_1", "4_10_10_4_14_10_2_100_1", "6_15_15_6_21_15_2_100_1", "1_1_1_1_1_8_1_10_2", "2_2_2_2_2_16_1_10_2", "3_3_3_3_3_24_1_10_2", "9_9_1_5_5_1_5_100_3", "18_18_2_10_10_2_5_100_3", "27_27_3_15_15_3_5_100_3", "2_2_1_2_2_2_1_10_4", "4_4_2_4_4_4_1_10_4", "6_6_3_6_6_6_1_10_4"] | |
97 | - | ||
98 | - | let contIdxAmericas = 0 | |
99 | - | ||
100 | - | let contIdxEurope = 1 | |
101 | - | ||
102 | - | let contIdxAsia = 2 | |
103 | - | ||
104 | - | let contIdxAfrica = 3 | |
105 | - | ||
106 | - | let contIdxOceania = 4 | |
107 | - | ||
108 | - | let recipeIdxFuel = 0 | |
109 | - | ||
110 | - | let recipeIdxMetal = 1 | |
111 | - | ||
112 | - | let recipeIdxPlank = 2 | |
113 | - | ||
114 | - | let recipeIdxGlass = 3 | |
115 | - | ||
116 | - | let recipeIdxPlastic = 4 | |
117 | - | ||
118 | - | let recipeIdxProtein = 5 | |
119 | - | ||
120 | - | let recipeIdxWeight = 6 | |
121 | - | ||
122 | - | let recipeIdxPacksize = 7 | |
123 | - | ||
124 | - | let recipeIdxContinent = 8 | |
125 | 112 | ||
126 | 113 | func keyFactoryWarehouseByIdAndType (factoryId,resType) = ((("factoryWhByContinentAndRes_" + factoryId) + "_") + toString(resType)) | |
127 | 114 | ||
128 | 115 | ||
129 | 116 | func keyOrderByLand (landAssetId) = ("landOrder_" + landAssetId) | |
130 | 117 | ||
131 | 118 | ||
132 | 119 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
133 | 120 | ||
134 | 121 | ||
135 | 122 | func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId) | |
136 | 123 | ||
137 | 124 | ||
138 | 125 | func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId) | |
139 | 126 | ||
140 | 127 | ||
141 | 128 | func keyBlocked () = "contractsBlocked" | |
142 | 129 | ||
143 | 130 | ||
144 | 131 | func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId) | |
145 | 132 | ||
146 | 133 | ||
147 | 134 | func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId) | |
148 | 135 | ||
149 | 136 | ||
150 | 137 | func keyAddressRefBy (addr) = ("accRefBy_" + addr) | |
151 | 138 | ||
152 | 139 | ||
153 | 140 | let locIdxContinent = 0 | |
154 | 141 | ||
155 | 142 | let locIdxType = 1 | |
156 | 143 | ||
157 | 144 | let locIdxId = 2 | |
158 | - | ||
159 | - | let bpIdxLevel = 0 | |
160 | - | ||
161 | - | let bpIdxRes = 1 | |
162 | - | ||
163 | - | let bpIdxMat = 2 | |
164 | - | ||
165 | - | let bpIdxProd = 3 | |
166 | - | ||
167 | - | let whIdxLevels = 0 | |
168 | - | ||
169 | - | let whIdxRes = 1 | |
170 | - | ||
171 | - | let whIdxMat = 2 | |
172 | - | ||
173 | - | let whIdxProd = 3 | |
174 | - | ||
175 | - | let whIdxLOFT = 4 | |
176 | - | ||
177 | - | let volLocked = 0 | |
178 | - | ||
179 | - | let volOccupied = 1 | |
180 | - | ||
181 | - | let volFree = 2 | |
182 | - | ||
183 | - | let volTotal = 3 | |
184 | 145 | ||
185 | 146 | let ordIdxRes = 0 | |
186 | 147 | ||
187 | 148 | let ordIdxMat = 1 | |
188 | 149 | ||
189 | 150 | let ordIdxProd = 2 | |
190 | 151 | ||
191 | 152 | func asString (v) = match v { | |
192 | 153 | case s: String => | |
193 | 154 | s | |
194 | 155 | case _ => | |
195 | 156 | throw("fail to cast into String") | |
196 | 157 | } | |
197 | 158 | ||
198 | 159 | ||
199 | 160 | func getOrder (ordKey) = { | |
200 | 161 | let p = split(valueOrElse(getString(ordKey), "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"), ":") | |
201 | 162 | [if ((size(split(p[ordIdxRes], "_")) == NUMRES)) | |
202 | 163 | then p[ordIdxRes] | |
203 | 164 | else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split(p[ordIdxMat], "_")) == NUMRES)) | |
204 | 165 | then p[ordIdxMat] | |
205 | 166 | else "0@0_0@0_0@0_0@0_0@0_0@0", p[ordIdxProd]] | |
206 | 167 | } | |
207 | 168 | ||
208 | 169 | ||
209 | 170 | func toVolume (amount,pkgSize,isProduct) = if (isProduct) | |
210 | 171 | then { | |
211 | 172 | let pkgs = if ((amount >= 0)) | |
212 | 173 | then (((amount + pkgSize) - 1) / pkgSize) | |
213 | 174 | else -((((-(amount) + pkgSize) - 1) / pkgSize)) | |
214 | 175 | (pkgs * MULT8) | |
215 | 176 | } | |
216 | 177 | else amount | |
217 | 178 | ||
218 | 179 | ||
219 | 180 | func sellInternal (locId,resType,amount,minPrice) = { | |
220 | 181 | let whKey = keyFactoryWarehouseByIdAndType(locId, resType) | |
221 | 182 | let w0 = valueOrElse(getInteger(whKey), 0) | |
222 | 183 | let r0 = if ((w0 > FACTORYMAXWAREHOUSE)) | |
223 | 184 | then 0 | |
224 | 185 | else if (((w0 + amount) > FACTORYMAXWAREHOUSE)) | |
225 | 186 | then (FACTORYMAXWAREHOUSE - w0) | |
226 | 187 | else amount | |
227 | 188 | let usdtReceived = (fraction(r0, ((SELLMULTIPLIER * RESOURCEPRICEMIN) - fraction(((100 * w0) + (50 * r0)), RESOURCEPRICEMIN, FACTORYMAXWAREHOUSE)), MULT10) + fraction((amount - r0), RESOURCEPRICEMIN, MULT8)) | |
228 | 189 | let min99 = (minPrice - (minPrice / 100)) | |
229 | 190 | if (((min99 * amount) > (usdtReceived * MULT8))) | |
230 | 191 | then throw((((((((((("Actual price = " + toString(usdtReceived)) + " / ") + toString(amount)) + " < minPrice = ") + toString(minPrice)) + ", (") + locId) + ", ") + resTypes[resType]) + ")")) | |
231 | 192 | else $Tuple2(IntegerEntry(whKey, (w0 + amount)), usdtReceived) | |
232 | 193 | } | |
233 | 194 | ||
234 | 195 | ||
235 | 196 | func buyInternal (locId,matType,amount,maxPrice) = { | |
236 | 197 | let whKey = keyFactoryWarehouseByIdAndType(locId, matType) | |
237 | 198 | let w0 = valueOrElse(getInteger(whKey), 0) | |
238 | 199 | let m1 = if ((w0 > FACTORYMAXWAREHOUSE)) | |
239 | 200 | then min([amount, (w0 - FACTORYMAXWAREHOUSE)]) | |
240 | 201 | else 0 | |
241 | 202 | let m0 = min([w0, (amount - m1)]) | |
242 | 203 | let m = (m0 + m1) | |
243 | 204 | let usdtSpent = (fraction(m0, ((BUYMULTIPLIER * RESOURCEPRICEMIN) - fraction(((100 * w0) - (50 * m0)), RESOURCEPRICEMIN, FACTORYMAXWAREHOUSE)), MULT10) + fraction(m1, (2 * RESOURCEPRICEMIN), MULT8)) | |
244 | 205 | let max101 = (maxPrice + (maxPrice / 100)) | |
245 | 206 | if (((usdtSpent * MULT8) > (max101 * m))) | |
246 | 207 | then throw((((((((((("Actual price = " + toString(usdtSpent)) + " / ") + toString(m)) + " > maxPrice = ") + toString(maxPrice)) + ", (") + locId) + ", ") + matTypes[matType]) + ")")) | |
247 | 208 | else $Tuple3(IntegerEntry(whKey, (w0 - m)), usdtSpent, m) | |
248 | 209 | } | |
249 | 210 | ||
250 | 211 | ||
251 | 212 | func getBackpack (bpKey) = { | |
252 | 213 | let p = split(valueOrElse(getString(stakingContract, bpKey), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
253 | 214 | [toString(valueOrElse(parseInt(p[bpIdxLevel]), 0)), if ((size(split(p[bpIdxRes], "_")) == NUMRES)) | |
254 | 215 | then p[bpIdxRes] | |
255 | 216 | else "0_0_0_0_0_0", if ((size(split(p[bpIdxMat], "_")) == NUMRES)) | |
256 | 217 | then p[bpIdxMat] | |
257 | 218 | else "0_0_0_0_0_0", p[bpIdxProd]] | |
258 | 219 | } | |
259 | 220 | ||
260 | 221 | ||
261 | 222 | func checkBlocked () = if (valueOrElse(getBoolean(stakingContract, keyBlocked()), false)) | |
262 | 223 | then throw("Contracts are under maintenance") | |
263 | 224 | else unit | |
264 | 225 | ||
265 | 226 | ||
266 | 227 | func setCommon (acc,item) = { | |
267 | 228 | let j = acc._1 | |
268 | 229 | let isProd = acc._8 | |
269 | 230 | let pkgSize = if (isProd) | |
270 | 231 | then parseIntValue(split(productionMatrix[j], "_")[recipeIdxPacksize]) | |
271 | 232 | else 0 | |
272 | 233 | let itemParts = split(item, "@") | |
273 | 234 | if ((size(itemParts) != 2)) | |
274 | 235 | then throw("Incorrect order format, should be amount@price") | |
275 | 236 | else { | |
276 | 237 | let newOrdAm = parseIntValue(itemParts[0]) | |
277 | 238 | let newOrdPr = parseIntValue(itemParts[1]) | |
278 | 239 | let newOrdUsd = fraction(newOrdAm, newOrdPr, MULT8) | |
279 | 240 | let newOrdVol = toVolume(newOrdAm, pkgSize, isProd) | |
280 | 241 | let whInit = if ((size(acc._6) > j)) | |
281 | 242 | then parseIntValue(acc._6[j]) | |
282 | 243 | else 0 | |
283 | 244 | let curOrdParts = split(if ((size(acc._7) > j)) | |
284 | 245 | then acc._7[j] | |
285 | 246 | else "0@0", "@") | |
286 | 247 | let curOrdAm = parseIntValue(curOrdParts[0]) | |
287 | 248 | let curOrdPr = parseIntValue(curOrdParts[1]) | |
288 | 249 | if (if ((0 > curOrdPr)) | |
289 | 250 | then true | |
290 | 251 | else (0 > newOrdPr)) | |
291 | 252 | then throw("Price can't be negative") | |
292 | 253 | else { | |
293 | 254 | let curOrdUsd = fraction(curOrdAm, curOrdPr, MULT8) | |
294 | 255 | let curOrdVol = toVolume(curOrdAm, pkgSize, isProd) | |
295 | 256 | if ((newOrdAm == 0)) | |
296 | 257 | then if ((curOrdAm > 0)) | |
297 | 258 | then $Tuple8((j + 1), (acc._2 :+ toString(whInit)), acc._3, acc._4, (acc._5 - curOrdUsd), acc._6, acc._7, isProd) | |
298 | 259 | else $Tuple8((j + 1), (acc._2 :+ toString((whInit - curOrdAm))), acc._3, acc._4, acc._5, acc._6, acc._7, isProd) | |
299 | 260 | else if ((newOrdAm > 0)) | |
300 | 261 | then if ((0 > curOrdAm)) | |
301 | 262 | then $Tuple8((j + 1), (acc._2 :+ toString((whInit - curOrdAm))), (acc._3 + newOrdVol), acc._4, (acc._5 + newOrdUsd), acc._6, acc._7, isProd) | |
302 | 263 | else $Tuple8((j + 1), (acc._2 :+ toString(whInit)), (acc._3 + newOrdVol), acc._4, ((acc._5 + newOrdUsd) - curOrdUsd), acc._6, acc._7, isProd) | |
303 | 264 | else if ((0 > curOrdAm)) | |
304 | 265 | then { | |
305 | 266 | let amDiff = (curOrdAm - newOrdAm) | |
306 | 267 | if ((0 > (whInit - amDiff))) | |
307 | 268 | then throw((((("Attempt to take " + toString(amDiff)) + " from warehouse, but only ") + toString(whInit)) + " available")) | |
308 | 269 | else $Tuple8((j + 1), (acc._2 :+ toString((whInit - amDiff))), acc._3, (acc._4 - newOrdVol), acc._5, acc._6, acc._7, isProd) | |
309 | 270 | } | |
310 | 271 | else if ((0 > (whInit + newOrdAm))) | |
311 | 272 | then throw((((("Attempt to take " + toString(-(newOrdAm))) + " from warehouse, but only ") + toString(whInit)) + " available")) | |
312 | 273 | else $Tuple8((j + 1), (acc._2 :+ toString((whInit + newOrdAm))), acc._3, (acc._4 - newOrdVol), (acc._5 - curOrdUsd), acc._6, acc._7, isProd) | |
313 | 274 | } | |
314 | 275 | } | |
315 | 276 | } | |
316 | 277 | ||
317 | 278 | ||
318 | 279 | func setInternal (currentWh,currentOrd,newOrd) = { | |
319 | 280 | let currWhRes = split(currentWh[whIdxRes], "_") | |
320 | 281 | let currWhMat = split(currentWh[whIdxMat], "_") | |
321 | 282 | let currWhProd = if ((currentWh[whIdxProd] == "")) | |
322 | 283 | then nil | |
323 | 284 | else split(currentWh[whIdxProd], "_") | |
324 | 285 | let currentOrdRes = split(currentOrd[ordIdxRes], "_") | |
325 | 286 | let currentOrdMat = split(currentOrd[ordIdxMat], "_") | |
326 | 287 | let currentOrdProd = if ((currentOrd[ordIdxProd] == "")) | |
327 | 288 | then nil | |
328 | 289 | else split(currentOrd[ordIdxProd], "_") | |
329 | 290 | if ((size(newOrd) != 3)) | |
330 | - | then throw(" | |
291 | + | then throw("newOrderStr should contain exactly 2 ':' separators") | |
331 | 292 | else { | |
332 | 293 | let resParts = split(newOrd[0], "_") | |
333 | 294 | let matParts = split(newOrd[1], "_") | |
334 | 295 | let prodParts = if ((newOrd[2] == "")) | |
335 | 296 | then nil | |
336 | 297 | else split(newOrd[2], "_") | |
337 | 298 | if ((size(resParts) != NUMRES)) | |
338 | 299 | then throw("All 6 resources should be passed") | |
339 | 300 | else if ((size(matParts) != NUMRES)) | |
340 | 301 | then throw("All 6 materials should be passed") | |
341 | 302 | else { | |
342 | 303 | let r = { | |
343 | 304 | let $l = resParts | |
344 | 305 | let $s = size($l) | |
345 | 306 | let $acc0 = $Tuple8(0, nil, 0, 0, 0, currWhRes, currentOrdRes, false) | |
346 | 307 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
347 | 308 | then $a | |
348 | 309 | else setCommon($a, $l[$i]) | |
349 | 310 | ||
350 | 311 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
351 | 312 | then $a | |
352 | 313 | else throw("List size exceeds 6") | |
353 | 314 | ||
354 | 315 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
355 | 316 | } | |
356 | 317 | let m = { | |
357 | 318 | let $l = matParts | |
358 | 319 | let $s = size($l) | |
359 | 320 | let $acc0 = $Tuple8(0, nil, r._3, r._4, r._5, currWhMat, currentOrdMat, false) | |
360 | 321 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
361 | 322 | then $a | |
362 | 323 | else setCommon($a, $l[$i]) | |
363 | 324 | ||
364 | 325 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
365 | 326 | then $a | |
366 | 327 | else throw("List size exceeds 6") | |
367 | 328 | ||
368 | 329 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
369 | 330 | } | |
370 | 331 | let p = if ((size(prodParts) != 0)) | |
371 | 332 | then { | |
372 | 333 | let $l = prodParts | |
373 | 334 | let $s = size($l) | |
374 | 335 | let $acc0 = $Tuple8(0, nil, m._3, m._4, m._5, currWhProd, currentOrdProd, true) | |
375 | 336 | func $f2_1 ($a,$i) = if (($i >= $s)) | |
376 | 337 | then $a | |
377 | 338 | else setCommon($a, $l[$i]) | |
378 | 339 | ||
379 | 340 | func $f2_2 ($a,$i) = if (($i >= $s)) | |
380 | 341 | then $a | |
381 | 342 | else throw("List size exceeds 50") | |
382 | 343 | ||
383 | 344 | $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_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) | |
384 | 345 | } | |
385 | 346 | else $Tuple8(0, currWhProd, m._3, m._4, m._5, currWhProd, currentOrdProd, true) | |
386 | 347 | $Tuple6(r._2, m._2, p._2, p._3, p._4, p._5) | |
387 | 348 | } | |
388 | 349 | } | |
389 | 350 | } | |
390 | 351 | ||
391 | 352 | ||
392 | 353 | func acceptCommon (acc,bpOrdItem) = { | |
393 | 354 | let j = acc._7 | |
394 | 355 | let isProd = acc._12 | |
395 | 356 | let pkgSize = if (isProd) | |
396 | 357 | then parseIntValue(split(productionMatrix[j], "_")[recipeIdxPacksize]) | |
397 | 358 | else 0 | |
398 | 359 | let bpOrdParts = split(bpOrdItem, "@") | |
399 | 360 | if ((size(bpOrdParts) != 2)) | |
400 | 361 | then throw("Incorrect order format, should be amount@price") | |
401 | 362 | else { | |
402 | 363 | let bpOrdAm = parseIntValue(bpOrdParts[0]) | |
403 | 364 | let bpOrdPr = parseIntValue(bpOrdParts[1]) | |
404 | 365 | if ((0 > bpOrdPr)) | |
405 | 366 | then throw("Price can't be negative") | |
406 | 367 | else { | |
407 | 368 | let bpOrdUsd = fraction(bpOrdAm, bpOrdPr, MULT8) | |
408 | 369 | let bpInit = if ((size(acc._8) > j)) | |
409 | 370 | then parseIntValue(acc._8[j]) | |
410 | 371 | else 0 | |
411 | 372 | let whInit = if ((size(acc._9) > j)) | |
412 | 373 | then parseIntValue(acc._9[j]) | |
413 | 374 | else 0 | |
414 | - | let whOrdParts = split(acc._10[j], "@") | |
375 | + | let whOrdInit = if ((size(acc._10) > j)) | |
376 | + | then acc._10[j] | |
377 | + | else "0@0" | |
378 | + | let whOrdParts = split(whOrdInit, "@") | |
415 | 379 | let whOrdAm = parseIntValue(whOrdParts[0]) | |
416 | 380 | let whOrdPr = parseIntValue(whOrdParts[1]) | |
417 | 381 | if (if ((bpOrdAm != 0)) | |
418 | 382 | then (bpOrdPr != whOrdPr) | |
419 | 383 | else false) | |
420 | 384 | then throw(((((("Prices of " + acc._11[j]) + " don't match! WH price=") + toString(whOrdPr)) + ", your price=") + toString(bpOrdPr))) | |
421 | 385 | else { | |
422 | 386 | let whOrdUsd = fraction(whOrdAm, whOrdPr, MULT8) | |
423 | 387 | let deltaVol = toVolume(bpOrdAm, pkgSize, isProd) | |
424 | 388 | if ((bpOrdAm == 0)) | |
425 | - | then $Tuple12((acc._1 :+ toString(whInit)), (acc._2 :+ | |
389 | + | then $Tuple12((acc._1 :+ toString(whInit)), (acc._2 :+ whOrdInit), (acc._3 :+ toString(bpInit)), acc._4, acc._5, acc._6, (acc._7 + 1), acc._8, acc._9, acc._10, acc._11, isProd) | |
426 | 390 | else if ((bpOrdAm > 0)) | |
427 | 391 | then if ((0 > whOrdAm)) | |
428 | 392 | then if ((bpOrdAm > -(whOrdAm))) | |
429 | 393 | then throw(((((("Attempt to buy " + toString(bpOrdAm)) + " of ") + acc._11[j]) + ", but warehouse only sells ") + toString(-(whOrdAm)))) | |
430 | 394 | else $Tuple12((acc._1 :+ toString(whInit)), (acc._2 :+ ((toString((whOrdAm + bpOrdAm)) + "@") + toString(whOrdPr))), (acc._3 :+ toString((bpInit + bpOrdAm))), (acc._4 + deltaVol), acc._5, (acc._6 + bpOrdUsd), (acc._7 + 1), acc._8, acc._9, acc._10, acc._11, isProd) | |
431 | 395 | else throw((("Attempt to buy " + acc._11[j]) + " while warehouse doesn't sell it")) | |
432 | 396 | else if ((whOrdAm > 0)) | |
433 | 397 | then if ((-(bpOrdAm) > whOrdAm)) | |
434 | 398 | then throw(((((("Attempt to sell " + toString(-(bpOrdAm))) + " of ") + acc._11[j]) + ", but warehouse only buys ") + toString(whOrdAm))) | |
435 | 399 | else if ((-(bpOrdAm) > bpInit)) | |
436 | 400 | then throw(((((("Attempt to sell " + toString(-(bpOrdAm))) + ", but you only have ") + toString(bpInit)) + " of ") + acc._11[j])) | |
437 | 401 | else $Tuple12((acc._1 :+ toString((whInit - bpOrdAm))), (acc._2 :+ ((toString((whOrdAm + bpOrdAm)) + "@") + toString(whOrdPr))), (acc._3 :+ toString((bpInit + bpOrdAm))), (acc._4 - deltaVol), (acc._5 - bpOrdUsd), acc._6, (acc._7 + 1), acc._8, acc._9, acc._10, acc._11, isProd) | |
438 | 402 | else throw((("Attempt to sell " + acc._11[j]) + " while warehouse doesn't buy it")) | |
439 | 403 | } | |
440 | 404 | } | |
441 | 405 | } | |
442 | 406 | } | |
443 | 407 | ||
444 | 408 | ||
445 | 409 | @Callable(i) | |
446 | 410 | func recalcLockedVolumeREADONLY (landAssetId,wh) = { | |
447 | 411 | let currentOrd = getOrder(keyOrderByLand(landAssetId)) | |
448 | 412 | let z = setInternal(wh, currentOrd, currentOrd) | |
449 | 413 | $Tuple2(nil, (z._4 + z._5)) | |
450 | 414 | } | |
451 | 415 | ||
452 | 416 | ||
453 | 417 | ||
454 | 418 | @Callable(i) | |
455 | 419 | func constructorV1 (restAddr) = if ((i.caller != this)) | |
456 | 420 | then throw("Permission denied") | |
457 | 421 | else [StringEntry(keyRestAddress(), restAddr)] | |
458 | 422 | ||
459 | 423 | ||
460 | 424 | ||
461 | 425 | @Callable(i) | |
462 | 426 | func sellResources (amounts,minPrices) = { | |
463 | 427 | let blocked = checkBlocked() | |
464 | 428 | if ((blocked == blocked)) | |
465 | 429 | then { | |
466 | 430 | let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
467 | 431 | if ((size(i.payments) != 0)) | |
468 | 432 | then throw("sellResources doesn't require any payments") | |
469 | 433 | else { | |
470 | 434 | let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_") | |
471 | 435 | if ((curLocation[locIdxType] != "F")) | |
472 | 436 | then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType])) | |
473 | 437 | else { | |
474 | 438 | let locId = curLocation[locIdxId] | |
475 | 439 | let currentPack = getBackpack(keyBackpackByDuck(duckAssetId)) | |
476 | 440 | let resList = split(currentPack[bpIdxRes], "_") | |
477 | 441 | func adder (acc,j) = if ((amounts[j] > parseIntValue(resList[j]))) | |
478 | 442 | then throw(((((("You have " + resList[j]) + " of ") + resTypes[j]) + ", but tried to sell ") + toString(amounts[j]))) | |
479 | 443 | else if ((0 > amounts[j])) | |
480 | 444 | then throw(((("You tried to sell negative amount of " + resTypes[j]) + ": ") + toString(amounts[j]))) | |
481 | 445 | else if ((amounts[j] > 0)) | |
482 | 446 | then { | |
483 | 447 | let b = sellInternal(locId, j, amounts[j], minPrices[j]) | |
484 | 448 | $Tuple3((acc._1 :+ b._1), (acc._2 :+ toString((parseIntValue(resList[j]) - amounts[j]))), (acc._3 + b._2)) | |
485 | 449 | } | |
486 | 450 | else $Tuple3(acc._1, (acc._2 :+ resList[j]), acc._3) | |
487 | 451 | ||
488 | 452 | let merged = { | |
489 | 453 | let $l = [0, 1, 2, 3, 4, 5] | |
490 | 454 | let $s = size($l) | |
491 | 455 | let $acc0 = $Tuple3(nil, nil, 0) | |
492 | 456 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
493 | 457 | then $a | |
494 | 458 | else adder($a, $l[$i]) | |
495 | 459 | ||
496 | 460 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
497 | 461 | then $a | |
498 | 462 | else throw("List size exceeds 6") | |
499 | 463 | ||
500 | 464 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
501 | 465 | } | |
502 | 466 | let newPack = makeString([currentPack[bpIdxLevel], makeString(merged._2, "_"), currentPack[bpIdxMat], currentPack[bpIdxProd]], ":") | |
503 | 467 | let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil)) | |
504 | 468 | $Tuple2((merged._1 :+ ScriptTransfer(i.caller, merged._3, usdtAssetId)), result) | |
505 | 469 | } | |
506 | 470 | } | |
507 | 471 | } | |
508 | 472 | else throw("Strict value is not equal to itself.") | |
509 | 473 | } | |
510 | 474 | ||
511 | 475 | ||
512 | 476 | ||
513 | 477 | @Callable(i) | |
514 | 478 | func buyMaterials (amounts,maxPrices) = { | |
515 | 479 | let blocked = checkBlocked() | |
516 | 480 | if ((blocked == blocked)) | |
517 | 481 | then { | |
518 | 482 | let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
519 | 483 | if ((size(i.payments) != 1)) | |
520 | 484 | then throw("exactly 1 payment must be attached") | |
521 | 485 | else { | |
522 | 486 | let pmt = i.payments[0] | |
523 | 487 | let amt = pmt.amount | |
524 | 488 | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment") | |
525 | 489 | if ((pmtAssetId != usdtAssetId)) | |
526 | 490 | then throw("USDT payments only!") | |
527 | 491 | else { | |
528 | 492 | let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_") | |
529 | 493 | if ((curLocation[locIdxType] != "F")) | |
530 | 494 | then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType])) | |
531 | 495 | else { | |
532 | 496 | let locId = curLocation[locIdxId] | |
533 | 497 | let currentPack = getBackpack(keyBackpackByDuck(duckAssetId)) | |
534 | 498 | let matList = split(currentPack[bpIdxMat], "_") | |
535 | 499 | func mUpdater (acc,j) = if ((0 > amounts[j])) | |
536 | 500 | then throw(((("You tried to buy negative amount of " + matTypes[j]) + ": ") + toString(amounts[j]))) | |
537 | 501 | else if ((amounts[j] > 0)) | |
538 | 502 | then { | |
539 | 503 | let b = buyInternal(locId, j, amounts[j], maxPrices[j]) | |
540 | 504 | $Tuple3((acc._1 :+ b._1), (acc._2 :+ toString((parseIntValue(matList[j]) + b._3))), (acc._3 + b._2)) | |
541 | 505 | } | |
542 | 506 | else $Tuple3(acc._1, (acc._2 :+ matList[j]), acc._3) | |
543 | 507 | ||
544 | 508 | let merged = { | |
545 | 509 | let $l = [0, 1, 2, 3, 4, 5] | |
546 | 510 | let $s = size($l) | |
547 | 511 | let $acc0 = $Tuple3(nil, nil, 0) | |
548 | 512 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
549 | 513 | then $a | |
550 | 514 | else mUpdater($a, $l[$i]) | |
551 | 515 | ||
552 | 516 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
553 | 517 | then $a | |
554 | 518 | else throw("List size exceeds 6") | |
555 | 519 | ||
556 | 520 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
557 | 521 | } | |
558 | 522 | if ((merged._3 > amt)) | |
559 | 523 | then throw(((("Insufficient payment! Attached=" + toString(amt)) + ", required=") + toString(merged._3))) | |
560 | 524 | else { | |
561 | 525 | let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(merged._2, "_"), currentPack[bpIdxProd]], ":") | |
562 | 526 | let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil)) | |
563 | 527 | let rest = if (((amt - merged._3) > 0)) | |
564 | 528 | then [ScriptTransfer(i.caller, (amt - merged._3), usdtAssetId)] | |
565 | 529 | else nil | |
566 | 530 | let activitiesAmount = (merged._3 / 100) | |
567 | 531 | $Tuple2(((merged._1 ++ rest) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), result) | |
568 | 532 | } | |
569 | 533 | } | |
570 | 534 | } | |
571 | 535 | } | |
572 | 536 | } | |
573 | 537 | else throw("Strict value is not equal to itself.") | |
574 | 538 | } | |
575 | 539 | ||
576 | 540 | ||
577 | 541 | ||
578 | 542 | @Callable(i) | |
579 | 543 | func exchangeResources (amounts) = { | |
580 | 544 | let blocked = checkBlocked() | |
581 | 545 | if ((blocked == blocked)) | |
582 | 546 | then { | |
583 | 547 | let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
584 | 548 | if ((size(i.payments) != 1)) | |
585 | 549 | then throw("exactly 1 payment must be attached") | |
586 | 550 | else { | |
587 | 551 | let pmt = i.payments[0] | |
588 | 552 | let amt = pmt.amount | |
589 | 553 | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment") | |
590 | 554 | if ((pmtAssetId != usdtAssetId)) | |
591 | 555 | then throw("USDT payments only!") | |
592 | 556 | else { | |
593 | 557 | let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_") | |
594 | 558 | if ((curLocation[locIdxType] != "F")) | |
595 | 559 | then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType])) | |
596 | 560 | else { | |
597 | 561 | let locId = curLocation[locIdxId] | |
598 | 562 | let currentPack = getBackpack(keyBackpackByDuck(duckAssetId)) | |
599 | 563 | let resList = split(currentPack[bpIdxRes], "_") | |
600 | 564 | let matList = split(currentPack[bpIdxMat], "_") | |
601 | 565 | func exchanger (acc,j) = { | |
602 | 566 | let whKey = keyFactoryWarehouseByIdAndType(locId, j) | |
603 | 567 | let w0 = valueOrElse(getInteger(whKey), 0) | |
604 | 568 | let amj = amounts[j] | |
605 | 569 | if ((amj > parseIntValue(resList[j]))) | |
606 | 570 | then throw(((((("You have " + resList[j]) + " of ") + resTypes[j]) + ", but tried to exchange ") + toString(amj))) | |
607 | 571 | else if ((0 > amj)) | |
608 | 572 | then throw(((("You tried to exchange negative amount of " + resTypes[j]) + ": ") + toString(amj))) | |
609 | 573 | else if ((amj > 0)) | |
610 | 574 | then $Tuple4((acc._1 :+ toString((parseIntValue(resList[j]) - amj))), (acc._2 :+ toString((parseIntValue(matList[j]) + amj))), (acc._3 + fraction(amj, RESOURCEPRICEMIN, MULT8)), (acc._4 :+ IntegerEntry(whKey, w0))) | |
611 | 575 | else $Tuple4((acc._1 :+ resList[j]), (acc._2 :+ matList[j]), acc._3, acc._4) | |
612 | 576 | } | |
613 | 577 | ||
614 | 578 | let merged = { | |
615 | 579 | let $l = [0, 1, 2, 3, 4, 5] | |
616 | 580 | let $s = size($l) | |
617 | 581 | let $acc0 = $Tuple4(nil, nil, 0, nil) | |
618 | 582 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
619 | 583 | then $a | |
620 | 584 | else exchanger($a, $l[$i]) | |
621 | 585 | ||
622 | 586 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
623 | 587 | then $a | |
624 | 588 | else throw("List size exceeds 6") | |
625 | 589 | ||
626 | 590 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
627 | 591 | } | |
628 | 592 | if ((merged._3 > amt)) | |
629 | 593 | then throw(((("Insufficient payment! Attached=" + toString(amt)) + ", required=") + toString(merged._3))) | |
630 | 594 | else { | |
631 | 595 | let newPack = makeString([currentPack[bpIdxLevel], makeString(merged._1, "_"), makeString(merged._2, "_"), currentPack[bpIdxProd]], ":") | |
632 | 596 | let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil)) | |
633 | 597 | let rest = if (((amt - merged._3) > 0)) | |
634 | 598 | then [ScriptTransfer(i.caller, (amt - merged._3), usdtAssetId)] | |
635 | 599 | else nil | |
636 | 600 | let activitiesAmount = (merged._3 / 100) | |
637 | 601 | $Tuple2(((rest ++ merged._4) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), result) | |
638 | 602 | } | |
639 | 603 | } | |
640 | 604 | } | |
641 | 605 | } | |
642 | 606 | } | |
643 | 607 | else throw("Strict value is not equal to itself.") | |
644 | 608 | } | |
645 | 609 | ||
646 | 610 | ||
647 | 611 | ||
648 | 612 | @Callable(i) | |
649 | 613 | func craftGoods (productIdx,quantity) = { | |
650 | 614 | let blocked = checkBlocked() | |
651 | 615 | if ((blocked == blocked)) | |
652 | 616 | then if ((size(i.payments) != 1)) | |
653 | 617 | then throw("exactly 1 payment must be attached") | |
654 | 618 | else { | |
655 | 619 | let pmt = i.payments[0] | |
656 | 620 | let amt = pmt.amount | |
657 | 621 | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment") | |
658 | 622 | if ((pmtAssetId != usdtAssetId)) | |
659 | 623 | then throw("USDT payments only!") | |
660 | 624 | else if ((amt != MULT6)) | |
661 | 625 | then throw("exactly 1 USDT must be attached as payment") | |
662 | 626 | else if ((0 >= quantity)) | |
663 | 627 | then throw("Quantity should be positive") | |
664 | 628 | else { | |
665 | 629 | let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
666 | 630 | let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_") | |
667 | 631 | if ((curLocation[locIdxType] != "M")) | |
668 | 632 | then throw(("Duck location type should be Manufactory, but is " + curLocation[locIdxType])) | |
669 | 633 | else { | |
670 | 634 | let cont = curLocation[locIdxContinent] | |
671 | 635 | let currentPack = getBackpack(keyBackpackByDuck(duckAssetId)) | |
672 | 636 | let matList = split(currentPack[bpIdxMat], "_") | |
673 | 637 | if (if ((0 > productIdx)) | |
674 | 638 | then true | |
675 | 639 | else (productIdx >= size(productionMatrix))) | |
676 | 640 | then throw(("Unknown product idx=" + toString(productIdx))) | |
677 | 641 | else { | |
678 | 642 | let recipe = split(productionMatrix[productIdx], "_") | |
679 | 643 | if ((size(recipe) != (NUMRES + 3))) | |
680 | 644 | then throw(("Fatal: unknown recipe: " + productionMatrix[productIdx])) | |
681 | 645 | else { | |
682 | 646 | let productContIdx = parseIntValue(recipe[recipeIdxContinent]) | |
683 | 647 | if ((continents[productContIdx] != cont)) | |
684 | 648 | then throw(((("This product is available in " + continents[productContIdx]) + ", but you are in ") + cont)) | |
685 | 649 | else { | |
686 | 650 | let prodList = if ((currentPack[bpIdxProd] == "")) | |
687 | 651 | then nil | |
688 | 652 | else split(currentPack[bpIdxProd], "_") | |
689 | 653 | func filler (acc,ignoredItem) = { | |
690 | 654 | let n = acc._2 | |
691 | 655 | let xs = if ((size(prodList) > n)) | |
692 | 656 | then prodList[n] | |
693 | 657 | else "0" | |
694 | 658 | let x = parseIntValue(xs) | |
695 | 659 | let amount = (quantity * parseIntValue(recipe[recipeIdxPacksize])) | |
696 | 660 | let y = if ((n == productIdx)) | |
697 | 661 | then toString((x + amount)) | |
698 | 662 | else xs | |
699 | 663 | $Tuple2((acc._1 :+ y), (n + 1)) | |
700 | 664 | } | |
701 | 665 | ||
702 | 666 | let bpProd = ( let $l = productionMatrix | |
703 | 667 | let $s = size($l) | |
704 | 668 | let $acc0 = $Tuple2(nil, 0) | |
705 | 669 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
706 | 670 | then $a | |
707 | 671 | else filler($a, $l[$i]) | |
708 | 672 | ||
709 | 673 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
710 | 674 | then $a | |
711 | 675 | else throw("List size exceeds 50") | |
712 | 676 | ||
713 | 677 | $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($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))._1 | |
714 | 678 | func producer (acc,j) = { | |
715 | 679 | let needMat = ((parseIntValue(recipe[j]) * MULT7) * quantity) | |
716 | 680 | let haveMat = parseIntValue(matList[j]) | |
717 | 681 | if ((needMat > haveMat)) | |
718 | 682 | then throw(((((((("You have " + matList[j]) + " of ") + matTypes[j]) + ", but recipe requires ") + toString(needMat)) + " for quantity ") + toString(quantity))) | |
719 | 683 | else if ((needMat > 0)) | |
720 | 684 | then (acc :+ toString((haveMat - needMat))) | |
721 | 685 | else (acc :+ matList[j]) | |
722 | 686 | } | |
723 | 687 | ||
724 | 688 | let merged = { | |
725 | 689 | let $l = [0, 1, 2, 3, 4, 5] | |
726 | 690 | let $s = size($l) | |
727 | 691 | let $acc0 = nil | |
728 | 692 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
729 | 693 | then $a | |
730 | 694 | else producer($a, $l[$i]) | |
731 | 695 | ||
732 | 696 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
733 | 697 | then $a | |
734 | 698 | else throw("List size exceeds 6") | |
735 | 699 | ||
736 | 700 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
737 | 701 | } | |
738 | 702 | let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(merged, "_"), makeString(bpProd, "_")], ":") | |
739 | 703 | let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil)) | |
740 | 704 | $Tuple2(nil, result) | |
741 | 705 | } | |
742 | 706 | } | |
743 | 707 | } | |
744 | 708 | } | |
745 | 709 | } | |
746 | 710 | } | |
747 | 711 | else throw("Strict value is not equal to itself.") | |
748 | 712 | } | |
749 | 713 | ||
750 | 714 | ||
751 | 715 | ||
752 | 716 | @Callable(i) | |
753 | - | func setWarehouseOrder ( | |
717 | + | func setWarehouseOrder (newOrderStr,landAssetId) = { | |
754 | 718 | let user = i.originCaller | |
755 | 719 | let addr = toString(user) | |
756 | 720 | let result = if ((user != restContract)) | |
757 | 721 | then checkBlocked() | |
758 | 722 | else false | |
759 | 723 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
760 | 724 | if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId))))) | |
761 | 725 | then throw((("NFT " + asset.name) + " is not staked")) | |
762 | 726 | else { | |
763 | 727 | let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned")) | |
764 | 728 | if (if ((user != restContract)) | |
765 | 729 | then (owner != addr) | |
766 | 730 | else false) | |
767 | 731 | then throw((LANDPREFIX + " is not yours")) | |
768 | 732 | else { | |
769 | - | let | |
733 | + | let newOrder = split_4C(newOrderStr, ":") | |
770 | 734 | let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil)) | |
771 | 735 | let currentWh = split_4C(wh, ":") | |
772 | 736 | let loft = split(currentWh[whIdxLOFT], "_") | |
773 | 737 | let whOccupied = parseIntValue(loft[volOccupied]) | |
774 | 738 | let whTotal = parseIntValue(loft[volTotal]) | |
775 | 739 | let ordKey = keyOrderByLand(landAssetId) | |
776 | 740 | let currentOrd = getOrder(ordKey) | |
777 | - | let z = setInternal(currentWh, currentOrd, | |
741 | + | let z = setInternal(currentWh, currentOrd, newOrder) | |
778 | 742 | let buyVolSaldo = z._4 | |
779 | 743 | let sellVolSaldo = z._5 | |
780 | 744 | let whLocked = (buyVolSaldo + sellVolSaldo) | |
781 | 745 | let whFree = ((whTotal - whOccupied) - whLocked) | |
782 | - | if ((buyVolSaldo > whFree)) | |
783 | - | then throw((((("Attempt to reserve " + toString(buyVolSaldo)) + " space for buy orders, but only ") + toString(whFree)) + " warehouse empty space left")) | |
784 | - | else if ((sellVolSaldo > whOccupied)) | |
785 | - | then throw((((("Attempt to lock " + toString(sellVolSaldo)) + " space for sell orders, but only ") + toString(whOccupied)) + " warehouse space occupied")) | |
786 | - | else { | |
787 | - | let whStr = makeString_2C([currentWh[whIdxLevels], makeString(z._1, "_"), makeString(z._2, "_"), makeString(z._3, "_"), toString(whLocked)], ":") | |
788 | - | let whSave = invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil) | |
789 | - | if ((whSave == whSave)) | |
790 | - | then { | |
791 | - | let usdSaldo = z._6 | |
792 | - | let actions = if ((usdSaldo > 0)) | |
793 | - | then if ((size(i.payments) != 1)) | |
794 | - | then throw("exactly 1 payment must be attached") | |
795 | - | else { | |
796 | - | let pmt = i.payments[0] | |
797 | - | let amt = pmt.amount | |
798 | - | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment") | |
799 | - | if ((pmtAssetId != usdtAssetId)) | |
800 | - | then throw("USDT payments only!") | |
801 | - | else if ((amt != usdSaldo)) | |
802 | - | then throw(("Payment needed is " + toString(usdSaldo))) | |
803 | - | else [StringEntry(ordKey, cargoListStr)] | |
804 | - | } | |
805 | - | else if ((usdSaldo == 0)) | |
806 | - | then if ((size(i.payments) != 0)) | |
807 | - | then throw("No payments needed") | |
808 | - | else [StringEntry(ordKey, cargoListStr)] | |
809 | - | else if ((size(i.payments) != 0)) | |
810 | - | then throw("No payments needed") | |
811 | - | else [ScriptTransfer(addressFromStringValue(owner), -(usdSaldo), usdtAssetId), StringEntry(ordKey, cargoListStr)] | |
812 | - | $Tuple2(actions, result) | |
746 | + | if ((0 > whFree)) | |
747 | + | then throw((((("Attempt to reserve " + toString(buyVolSaldo)) + " space for buy orders, and ") + toString(sellVolSaldo)) + " space for sell orders, leads to negative free space")) | |
748 | + | else { | |
749 | + | let whStr = makeString_2C([currentWh[whIdxLevels], makeString(z._1, "_"), makeString(z._2, "_"), makeString(z._3, "_"), toString(whLocked)], ":") | |
750 | + | let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil)) | |
751 | + | let usdSaldo = z._6 | |
752 | + | let actions = if ((usdSaldo > 0)) | |
753 | + | then if ((size(i.payments) != 1)) | |
754 | + | then throw("exactly 1 payment must be attached") | |
755 | + | else { | |
756 | + | let pmt = i.payments[0] | |
757 | + | let amt = pmt.amount | |
758 | + | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment") | |
759 | + | if ((pmtAssetId != usdtAssetId)) | |
760 | + | then throw("USDT payments only!") | |
761 | + | else if ((amt != usdSaldo)) | |
762 | + | then throw(("Payment needed is " + toString(usdSaldo))) | |
763 | + | else [StringEntry(ordKey, newOrderStr)] | |
813 | 764 | } | |
814 | - | else throw("Strict value is not equal to itself.") | |
815 | - | } | |
765 | + | else if ((usdSaldo == 0)) | |
766 | + | then if ((size(i.payments) != 0)) | |
767 | + | then throw("No payments needed") | |
768 | + | else [StringEntry(ordKey, newOrderStr)] | |
769 | + | else if ((size(i.payments) != 0)) | |
770 | + | then throw("No payments needed") | |
771 | + | else [ScriptTransfer(addressFromStringValue(owner), -(usdSaldo), usdtAssetId), StringEntry(ordKey, newOrderStr)] | |
772 | + | $Tuple2(actions, $Tuple2(result, whSave)) | |
773 | + | } | |
816 | 774 | } | |
817 | 775 | } | |
818 | 776 | } | |
819 | 777 | ||
820 | 778 | ||
821 | 779 | ||
822 | 780 | @Callable(i) | |
823 | 781 | func acceptWarehouseOrder (bpOrderStr,landAssetId,duckAssetId) = { | |
824 | 782 | let blocked = checkBlocked() | |
825 | - | if ((blocked == blocked)) | |
826 | - | then { | |
827 | - | let caller = i.originCaller | |
828 | - | let callerAddr = toString(caller) | |
829 | - | let stakedDuckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(callerAddr)), "You don't have a duck staked") | |
830 | - | let curLocation = valueOrElse(getString(stakingContract, keyDuckLocation(stakedDuckAssetId)), DEFAULTLOCATION) | |
831 | - | let loc = split(value(curLocation), "_") | |
832 | - | if ((loc[locIdxType] != "L")) | |
833 | - | then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L")) | |
834 | - | else if ((stakedDuckAssetId != duckAssetId)) | |
835 | - | then throw(((("Your staked duck is " + stakedDuckAssetId) + ", but passed ") + duckAssetId)) | |
783 | + | let caller = i.originCaller | |
784 | + | let callerAddr = toString(caller) | |
785 | + | let stakedDuckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(callerAddr)), "You don't have a duck staked") | |
786 | + | let curLocation = valueOrElse(getString(stakingContract, keyDuckLocation(stakedDuckAssetId)), DEFAULTLOCATION) | |
787 | + | let loc = split(value(curLocation), "_") | |
788 | + | if ((loc[locIdxType] != "L")) | |
789 | + | then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L")) | |
790 | + | else if ((stakedDuckAssetId != duckAssetId)) | |
791 | + | then throw(((("Your staked duck is " + stakedDuckAssetId) + ", but passed ") + duckAssetId)) | |
792 | + | else { | |
793 | + | let landAsset = value(assetInfo(fromBase58String(landAssetId))) | |
794 | + | if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId))))) | |
795 | + | then throw((("NFT " + landAsset.name) + " is not staked")) | |
836 | 796 | else { | |
837 | - | let | |
838 | - | if ( | |
839 | - | then throw( | |
797 | + | let landOwner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + landAsset.name) + " is orphaned")) | |
798 | + | if ((landOwner == callerAddr)) | |
799 | + | then throw("You cannot trade with yourself") | |
840 | 800 | else { | |
841 | - | let | |
842 | - | if (( | |
843 | - | then throw(" | |
801 | + | let bpOrderParts = split_4C(bpOrderStr, ":") | |
802 | + | if ((size(bpOrderParts) != 3)) | |
803 | + | then throw("bpOrderStr should contain exactly 2 ':' separators") | |
844 | 804 | else { | |
845 | - | let bpOrderParts = split_4C(bpOrderStr, ":") | |
846 | - | if ((size(bpOrderParts) != 3)) | |
847 | - | then throw("bpOrderStr should contain exactly 2 ':' separators") | |
848 | - | else { | |
849 | - | let bpOrdRes = split(bpOrderParts[0], "_") | |
850 | - | let bpOrdMat = split(bpOrderParts[1], "_") | |
851 | - | let bpOrdProd = if ((bpOrderParts[2] == "")) | |
852 | - | then nil | |
853 | - | else split(bpOrderParts[2], "_") | |
854 | - | if ((size(bpOrdRes) != NUMRES)) | |
855 | - | then throw("All 6 resources should be passed") | |
856 | - | else if ((size(bpOrdMat) != NUMRES)) | |
857 | - | then throw("All 6 materials should be passed") | |
858 | - | else { | |
859 | - | let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil)) | |
860 | - | let currentWh = split_4C(wh, ":") | |
861 | - | let currWhRes = split(currentWh[whIdxRes], "_") | |
862 | - | let currWhMat = split(currentWh[whIdxMat], "_") | |
863 | - | let currWhProd = if ((currentWh[whIdxProd] == "")) | |
864 | - | then nil | |
865 | - | else split(currentWh[whIdxProd], "_") | |
866 | - | let currWhLockedVol = parseIntValue(split(currentWh[whIdxLOFT], "_")[volLocked]) | |
867 | - | let bpKey = keyBackpackByDuck(duckAssetId) | |
868 | - | let currentPack = getBackpack(bpKey) | |
869 | - | let bpResList = split(currentPack[bpIdxRes], "_") | |
870 | - | let bpMatList = split(currentPack[bpIdxMat], "_") | |
871 | - | let bpProdList = if ((currentPack[bpIdxProd] == "")) | |
872 | - | then nil | |
873 | - | else split(currentPack[bpIdxProd], "_") | |
874 | - | let ordKey = keyOrderByLand(landAssetId) | |
875 | - | let whOrd = getOrder(ordKey) | |
876 | - | let whOrdRes = split(whOrd[ordIdxRes], "_") | |
877 | - | let whOrdMat = split(whOrd[ordIdxMat], "_") | |
878 | - | let whOrdProd = if ((whOrd[ordIdxProd] == "")) | |
879 | - | then nil | |
880 | - | else split(whOrd[ordIdxProd], "_") | |
881 | - | let r = { | |
882 | - | let $l = bpOrdRes | |
883 | - | let $s = size($l) | |
884 | - | let $acc0 = $Tuple12(nil, nil, nil, 0, 0, 0, 0, bpResList, currWhRes, whOrdRes, resTypes, false) | |
885 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
886 | - | then $a | |
887 | - | else acceptCommon($a, $l[$i]) | |
805 | + | let bpOrdRes = split(bpOrderParts[0], "_") | |
806 | + | let bpOrdMat = split(bpOrderParts[1], "_") | |
807 | + | let bpOrdProd = if ((bpOrderParts[2] == "")) | |
808 | + | then nil | |
809 | + | else split(bpOrderParts[2], "_") | |
810 | + | if ((size(bpOrdRes) != NUMRES)) | |
811 | + | then throw("All 6 resources should be passed") | |
812 | + | else if ((size(bpOrdMat) != NUMRES)) | |
813 | + | then throw("All 6 materials should be passed") | |
814 | + | else { | |
815 | + | let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil)) | |
816 | + | let currentWh = split_4C(wh, ":") | |
817 | + | let currWhRes = split(currentWh[whIdxRes], "_") | |
818 | + | let currWhMat = split(currentWh[whIdxMat], "_") | |
819 | + | let currWhProd = if ((currentWh[whIdxProd] == "")) | |
820 | + | then nil | |
821 | + | else split(currentWh[whIdxProd], "_") | |
822 | + | let currWhLockedVol = parseIntValue(split(currentWh[whIdxLOFT], "_")[volLocked]) | |
823 | + | let bpKey = keyBackpackByDuck(duckAssetId) | |
824 | + | let currentPack = getBackpack(bpKey) | |
825 | + | let bpResList = split(currentPack[bpIdxRes], "_") | |
826 | + | let bpMatList = split(currentPack[bpIdxMat], "_") | |
827 | + | let bpProdList = if ((currentPack[bpIdxProd] == "")) | |
828 | + | then nil | |
829 | + | else split(currentPack[bpIdxProd], "_") | |
830 | + | let ordKey = keyOrderByLand(landAssetId) | |
831 | + | let whOrd = getOrder(ordKey) | |
832 | + | let whOrdRes = split(whOrd[ordIdxRes], "_") | |
833 | + | let whOrdMat = split(whOrd[ordIdxMat], "_") | |
834 | + | let whOrdProd = if ((whOrd[ordIdxProd] == "")) | |
835 | + | then nil | |
836 | + | else split(whOrd[ordIdxProd], "_") | |
837 | + | let r = { | |
838 | + | let $l = bpOrdRes | |
839 | + | let $s = size($l) | |
840 | + | let $acc0 = $Tuple12(nil, nil, nil, 0, 0, 0, 0, bpResList, currWhRes, whOrdRes, resTypes, false) | |
841 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
842 | + | then $a | |
843 | + | else acceptCommon($a, $l[$i]) | |
888 | 844 | ||
889 | - | ||
890 | - | ||
891 | - | ||
845 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
846 | + | then $a | |
847 | + | else throw("List size exceeds 6") | |
892 | 848 | ||
893 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
849 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
850 | + | } | |
851 | + | let m = { | |
852 | + | let $l = bpOrdMat | |
853 | + | let $s = size($l) | |
854 | + | let $acc0 = $Tuple12(nil, nil, nil, r._4, r._5, r._6, 0, bpMatList, currWhMat, whOrdMat, matTypes, false) | |
855 | + | func $f1_1 ($a,$i) = if (($i >= $s)) | |
856 | + | then $a | |
857 | + | else acceptCommon($a, $l[$i]) | |
858 | + | ||
859 | + | func $f1_2 ($a,$i) = if (($i >= $s)) | |
860 | + | then $a | |
861 | + | else throw("List size exceeds 6") | |
862 | + | ||
863 | + | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
864 | + | } | |
865 | + | let p = if ((size(bpOrdProd) != 0)) | |
866 | + | then { | |
867 | + | let $l = bpOrdProd | |
868 | + | let $s = size($l) | |
869 | + | let $acc0 = $Tuple12(nil, nil, nil, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true) | |
870 | + | func $f2_1 ($a,$i) = if (($i >= $s)) | |
871 | + | then $a | |
872 | + | else acceptCommon($a, $l[$i]) | |
873 | + | ||
874 | + | func $f2_2 ($a,$i) = if (($i >= $s)) | |
875 | + | then $a | |
876 | + | else throw("List size exceeds 50") | |
877 | + | ||
878 | + | $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_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) | |
879 | + | } | |
880 | + | else $Tuple12(currWhProd, whOrdProd, bpProdList, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true) | |
881 | + | let volSaldo = p._4 | |
882 | + | let newLockedVol = if ((0 > (currWhLockedVol - volSaldo))) | |
883 | + | then 0 | |
884 | + | else (currWhLockedVol - volSaldo) | |
885 | + | let whStr = makeString_2C([currentWh[whIdxLevels], makeString(r._1, "_"), makeString(m._1, "_"), makeString(p._1, "_"), toString(newLockedVol)], ":") | |
886 | + | let newWhOrdStr = makeString_2C([makeString(r._2, "_"), makeString(m._2, "_"), makeString(p._2, "_")], ":") | |
887 | + | let newBpStr = makeString_2C([currentPack[bpIdxLevel], makeString(r._3, "_"), makeString(m._3, "_"), makeString(p._3, "_")], ":") | |
888 | + | let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil)) | |
889 | + | let bpSave = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil)) | |
890 | + | let actions = [StringEntry(ordKey, newWhOrdStr)] | |
891 | + | let usdWh2BpSaldo = p._5 | |
892 | + | let actions1 = if ((usdWh2BpSaldo > 0)) | |
893 | + | then { | |
894 | + | let usdWh2BpFee = fraction(p._5, AUCTIONFEE, MULT6) | |
895 | + | let refByKey = keyAddressRefBy(callerAddr) | |
896 | + | let refBy = getString(stakingContract, refByKey) | |
897 | + | if (isDefined(refBy)) | |
898 | + | then (((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdWh2BpFee, usdtAssetId)) | |
899 | + | else ((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId)) | |
900 | + | } | |
901 | + | else actions | |
902 | + | let usdBp2WhSaldo = p._6 | |
903 | + | let actions2 = if ((usdBp2WhSaldo > 0)) | |
904 | + | then if ((size(i.payments) != 1)) | |
905 | + | then throw("exactly 1 payment must be attached") | |
906 | + | else { | |
907 | + | let pmt = i.payments[0] | |
908 | + | let amt = pmt.amount | |
909 | + | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment") | |
910 | + | if ((pmtAssetId != usdtAssetId)) | |
911 | + | then throw("USDT payments only!") | |
912 | + | else if ((amt != usdBp2WhSaldo)) | |
913 | + | then throw(("Payment needed is " + toString(usdBp2WhSaldo))) | |
914 | + | else if ((MINSHOPPAYMENT > amt)) | |
915 | + | then throw(("Payment should be at least " + toString(MINSHOPPAYMENT))) | |
916 | + | else { | |
917 | + | let usdBp2WhFee = fraction(p._6, AUCTIONFEE, MULT6) | |
918 | + | let refByKey = keyAddressRefBy(landOwner) | |
919 | + | let refBy = getString(stakingContract, refByKey) | |
920 | + | if (isDefined(refBy)) | |
921 | + | then (((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdBp2WhFee, usdtAssetId)) | |
922 | + | else ((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId)) | |
923 | + | } | |
894 | 924 | } | |
895 | - | let m = { | |
896 | - | let $l = bpOrdMat | |
897 | - | let $s = size($l) | |
898 | - | let $acc0 = $Tuple12(nil, nil, nil, r._4, r._5, r._6, 0, bpMatList, currWhMat, whOrdMat, matTypes, false) | |
899 | - | func $f1_1 ($a,$i) = if (($i >= $s)) | |
900 | - | then $a | |
901 | - | else acceptCommon($a, $l[$i]) | |
902 | - | ||
903 | - | func $f1_2 ($a,$i) = if (($i >= $s)) | |
904 | - | then $a | |
905 | - | else throw("List size exceeds 6") | |
906 | - | ||
907 | - | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
908 | - | } | |
909 | - | let p = if ((size(bpOrdProd) != 0)) | |
910 | - | then { | |
911 | - | let $l = bpOrdProd | |
912 | - | let $s = size($l) | |
913 | - | let $acc0 = $Tuple12(nil, nil, nil, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true) | |
914 | - | func $f2_1 ($a,$i) = if (($i >= $s)) | |
915 | - | then $a | |
916 | - | else acceptCommon($a, $l[$i]) | |
917 | - | ||
918 | - | func $f2_2 ($a,$i) = if (($i >= $s)) | |
919 | - | then $a | |
920 | - | else throw("List size exceeds 50") | |
921 | - | ||
922 | - | $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_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) | |
923 | - | } | |
924 | - | else $Tuple12(currWhProd, whOrdProd, bpProdList, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true) | |
925 | - | let volSaldo = p._4 | |
926 | - | let newLockedVol = if ((0 > (currWhLockedVol - volSaldo))) | |
927 | - | then 0 | |
928 | - | else (currWhLockedVol - volSaldo) | |
929 | - | let whStr = makeString_2C([currentWh[whIdxLevels], makeString(r._1, "_"), makeString(m._1, "_"), makeString(p._1, "_"), toString(newLockedVol)], ":") | |
930 | - | let newWhOrdStr = makeString_2C([makeString(r._2, "_"), makeString(m._2, "_"), makeString(p._2, "_")], ":") | |
931 | - | let newBpStr = makeString_2C([currentPack[bpIdxLevel], makeString(r._3, "_"), makeString(m._3, "_"), makeString(p._3, "_")], ":") | |
932 | - | let whSave = invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil) | |
933 | - | if ((whSave == whSave)) | |
934 | - | then { | |
935 | - | let bpSave = invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil) | |
936 | - | if ((bpSave == bpSave)) | |
937 | - | then { | |
938 | - | let actions = [StringEntry(ordKey, newWhOrdStr)] | |
939 | - | let usdWh2BpSaldo = p._5 | |
940 | - | let actions1 = if ((usdWh2BpSaldo > 0)) | |
941 | - | then { | |
942 | - | let usdWh2BpFee = fraction(p._5, AUCTIONFEE, MULT6) | |
943 | - | let refByKey = keyAddressRefBy(callerAddr) | |
944 | - | let refBy = getString(stakingContract, refByKey) | |
945 | - | if (isDefined(refBy)) | |
946 | - | then (((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdWh2BpFee, usdtAssetId)) | |
947 | - | else ((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId)) | |
948 | - | } | |
949 | - | else actions | |
950 | - | let usdBp2WhSaldo = p._6 | |
951 | - | if ((usdBp2WhSaldo > 0)) | |
952 | - | then if ((size(i.payments) != 1)) | |
953 | - | then throw("exactly 1 payment must be attached") | |
954 | - | else { | |
955 | - | let pmt = i.payments[0] | |
956 | - | let amt = pmt.amount | |
957 | - | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment") | |
958 | - | if ((pmtAssetId != usdtAssetId)) | |
959 | - | then throw("USDT payments only!") | |
960 | - | else if ((amt != usdBp2WhSaldo)) | |
961 | - | then throw(("Payment needed is " + toString(usdBp2WhSaldo))) | |
962 | - | else if ((MINSHOPPAYMENT > amt)) | |
963 | - | then throw(("Payment should be at least " + toString(MINSHOPPAYMENT))) | |
964 | - | else { | |
965 | - | let usdBp2WhFee = fraction(p._6, AUCTIONFEE, MULT6) | |
966 | - | let refByKey = keyAddressRefBy(landOwner) | |
967 | - | let refBy = getString(stakingContract, refByKey) | |
968 | - | if (isDefined(refBy)) | |
969 | - | then (((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdBp2WhFee, usdtAssetId)) | |
970 | - | else ((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId)) | |
971 | - | } | |
972 | - | } | |
973 | - | else if ((size(i.payments) != 0)) | |
974 | - | then throw("No payments needed") | |
975 | - | else actions1 | |
976 | - | } | |
977 | - | else throw("Strict value is not equal to itself.") | |
978 | - | } | |
979 | - | else throw("Strict value is not equal to itself.") | |
980 | - | } | |
981 | - | } | |
925 | + | else if ((size(i.payments) != 0)) | |
926 | + | then throw("No payments needed") | |
927 | + | else actions1 | |
928 | + | $Tuple2(actions2, $Tuple3(blocked, whSave, bpSave)) | |
929 | + | } | |
982 | 930 | } | |
983 | 931 | } | |
984 | 932 | } | |
985 | - | } | |
986 | - | else throw("Strict value is not equal to itself.") | |
933 | + | } | |
987 | 934 | } | |
988 | 935 | ||
989 | 936 |
github/deemru/w8io/026f985 154.10 ms ◑