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