tx · 3CgS6g187uELSF8hEPPQ8sNDnf5arpLZ3SLUdA2mT1Tb 3Mynj79w9PikhwUwMwFPk2vifkm8zkDt2Zt: -0.01400000 Waves 2022.03.11 17:25 [1959405] smart account 3Mynj79w9PikhwUwMwFPk2vifkm8zkDt2Zt > SELF 0.00000000 Waves
{ "type": 13, "id": "3CgS6g187uELSF8hEPPQ8sNDnf5arpLZ3SLUdA2mT1Tb", "fee": 1400000, "feeAssetId": null, "timestamp": 1647008756270, "version": 1, "sender": "3Mynj79w9PikhwUwMwFPk2vifkm8zkDt2Zt", "senderPublicKey": "5195SwZ4ifX6bBstZ6tN31kEQFVHaKpFYLc1GCa3Myrh", "proofs": [ "47xSPU1AfpkBLLcP35BhgkKDFF3jbeYTUqyyPeqjddzgBT4KqJNAvAg1zEWGeaV1LjKevFmQsDBtPSbiY6kyRdEb" ], "script": "base64:AAIFAAAAAAAAACIIAhIJCgcBAQEBAQgBEgASBAoCCAgSBAoCCAgSAwoBCBIAAAAALwEAAAAPZ2V0U3RyaW5nT3JGYWlsAAAAAQAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABCIAAAABBQAAAANrZXkJAAEsAAAAAgkAASwAAAACAgAAAA9tYW5kYXRvcnkgdGhpcy4FAAAAA2tleQIAAAAPIGlzIG5vdCBkZWZpbmVkAAAAAANTRVACAAAAAl9fAAAAAAhCVUZTQ0FMRQkAATYAAAABAA3gtrOnZAAAAQAAAB1jb252ZXJ0UHJpY2VBc3NldEludG9JZG9Bc3NldAAAAAUAAAAQcHJpY2VBc3NldEFtb3VudAAAAA5wcmljZUFzc2V0TVVMVAAAAAVwcmljZQAAAAlwcmljZU1VTFQAAAAMaWRvQXNzZXRNVUxUBAAAAA9iUHJpY2VBc3NldE1VTFQJAAE2AAAAAQUAAAAOcHJpY2VBc3NldE1VTFQEAAAADWJJZG9Bc3NldE1VTFQJAAE2AAAAAQUAAAAMaWRvQXNzZXRNVUxUBAAAAA5iUHJpY2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HJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAPdGFyZ2V0UHVibGljS2V5BAAAAAckbWF0Y2gwCQEAAAAWbWFuYWdlclB1YmxpY0tleU9yVW5pdAAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAnBrBQAAAAckbWF0Y2gwBQAAAAJwawMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAD3RhcmdldFB1YmxpY0tleXyBoDE=", "chainId": 84, "height": 1959405, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CgNH7Va1KMxmJGvqDHn6KwDhAmHyPZQSAm1YUaumXS8w Next: DnqRDhj4rEU5QBPacjKFSUpyowNaUSCZD8jBVP5JEVJW Diff:
Old | New | Differences | |
---|---|---|---|
74 | 74 | ||
75 | 75 | ||
76 | 76 | func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP) | |
77 | + | ||
78 | + | ||
79 | + | func keyManagerPublicKey () = "%s__managerPublicKey" | |
80 | + | ||
81 | + | ||
82 | + | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
77 | 83 | ||
78 | 84 | ||
79 | 85 | func readConfigArray () = split(getStringOrFail(keyConfig()), SEP) | |
157 | 163 | } | |
158 | 164 | ||
159 | 165 | ||
166 | + | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
167 | + | case s: String => | |
168 | + | fromBase58String(s) | |
169 | + | case _: Unit => | |
170 | + | unit | |
171 | + | case _ => | |
172 | + | throw("Match error") | |
173 | + | } | |
174 | + | ||
175 | + | ||
176 | + | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
177 | + | case s: String => | |
178 | + | fromBase58String(s) | |
179 | + | case _: Unit => | |
180 | + | unit | |
181 | + | case _ => | |
182 | + | throw("Match error") | |
183 | + | } | |
184 | + | ||
185 | + | ||
186 | + | func mustManager (i) = { | |
187 | + | let pd = throw("Permission denied") | |
188 | + | match managerPublicKeyOrUnit() { | |
189 | + | case pk: ByteVector => | |
190 | + | if ((i.callerPublicKey == pk)) | |
191 | + | then true | |
192 | + | else pd | |
193 | + | case _: Unit => | |
194 | + | if ((i.caller == this)) | |
195 | + | then true | |
196 | + | else pd | |
197 | + | case _ => | |
198 | + | throw("Match error") | |
199 | + | } | |
200 | + | } | |
201 | + | ||
202 | + | ||
160 | 203 | @Callable(i) | |
161 | 204 | func constructor (idoStart,idoDuration,claimStart,claimDuration,price,priceAssetId58,minInvestAmount) = { | |
162 | 205 | let priceMult = ((100 * 1000) * 1000) | |
163 | 206 | let idoEnd = (idoStart + idoDuration) | |
164 | 207 | if (isDefined(getString(keyConfig()))) | |
165 | 208 | then throw("already initialized") | |
166 | - | else if ((" | |
209 | + | else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString(i.caller))) | |
167 | 210 | then throw("not authorized") | |
168 | 211 | else if ((size(i.payments) != 1)) | |
169 | 212 | then throw("exactly 1 payment must be attached") | |
268 | 311 | } | |
269 | 312 | ||
270 | 313 | ||
314 | + | ||
315 | + | @Callable(i) | |
316 | + | func setManager (pendingManagerPublicKey) = { | |
317 | + | let checkCaller = mustManager(i) | |
318 | + | if ((checkCaller == checkCaller)) | |
319 | + | then { | |
320 | + | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
321 | + | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
322 | + | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
323 | + | else throw("Strict value is not equal to itself.") | |
324 | + | } | |
325 | + | else throw("Strict value is not equal to itself.") | |
326 | + | } | |
327 | + | ||
328 | + | ||
329 | + | ||
330 | + | @Callable(i) | |
331 | + | func confirmManager () = { | |
332 | + | let pm = pendingManagerPublicKeyOrUnit() | |
333 | + | let hasPM = if (isDefined(pm)) | |
334 | + | then true | |
335 | + | else throw("No pending manager") | |
336 | + | if ((hasPM == hasPM)) | |
337 | + | then { | |
338 | + | let checkPM = if ((i.callerPublicKey == value(pm))) | |
339 | + | then true | |
340 | + | else throw("You are not pending manager") | |
341 | + | if ((checkPM == checkPM)) | |
342 | + | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
343 | + | else throw("Strict value is not equal to itself.") | |
344 | + | } | |
345 | + | else throw("Strict value is not equal to itself.") | |
346 | + | } | |
347 | + | ||
348 | + | ||
349 | + | @Verifier(tx) | |
350 | + | func verify () = { | |
351 | + | let targetPublicKey = match managerPublicKeyOrUnit() { | |
352 | + | case pk: ByteVector => | |
353 | + | pk | |
354 | + | case _: Unit => | |
355 | + | tx.senderPublicKey | |
356 | + | case _ => | |
357 | + | throw("Match error") | |
358 | + | } | |
359 | + | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
360 | + | } | |
361 | + |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined")) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | let SEP = "__" | |
8 | 8 | ||
9 | 9 | let BUFSCALE = toBigInt(1000000000000000000) | |
10 | 10 | ||
11 | 11 | func convertPriceAssetIntoIdoAsset (priceAssetAmount,priceAssetMULT,price,priceMULT,idoAssetMULT) = { | |
12 | 12 | let bPriceAssetMULT = toBigInt(priceAssetMULT) | |
13 | 13 | let bIdoAssetMULT = toBigInt(idoAssetMULT) | |
14 | 14 | let bPriceAssetBUF = fraction(toBigInt(priceAssetAmount), BUFSCALE, bPriceAssetMULT) | |
15 | 15 | let bAmountAssetBUF = fraction(bPriceAssetBUF, toBigInt(priceMULT), toBigInt(price)) | |
16 | 16 | toInt(fraction(bAmountAssetBUF, toBigInt(idoAssetMULT), BUFSCALE)) | |
17 | 17 | } | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | let IdxCfgIdoStart = 1 | |
21 | 21 | ||
22 | 22 | let IdxCfgIdoDuration = 2 | |
23 | 23 | ||
24 | 24 | let IdxCfgClaimStart = 3 | |
25 | 25 | ||
26 | 26 | let IdxCfgClaimDuration = 4 | |
27 | 27 | ||
28 | 28 | let IdxCfgPrice = 5 | |
29 | 29 | ||
30 | 30 | let IdxCfgPriceMult = 6 | |
31 | 31 | ||
32 | 32 | let IdxCfgIdoAssetId = 7 | |
33 | 33 | ||
34 | 34 | let IdxCfgIdoAssetMult = 8 | |
35 | 35 | ||
36 | 36 | let IdxCfgPriceAssetId = 9 | |
37 | 37 | ||
38 | 38 | let IdxCfgPriceAssetMult = 10 | |
39 | 39 | ||
40 | 40 | let IdxCfgMinInvestAmount = 11 | |
41 | 41 | ||
42 | 42 | func fromatConfigS (idoStart,idoDuration,claimStart,claimDuration,price,priceMult,idoAssetId58,idoAssetMult,priceAssetId58,priceAssetMult,minInvestAmount,totalIdoAssetToSell) = makeString(["%d%d%d%d%d%d%s%d%s%d%d%d", idoStart, idoDuration, claimStart, claimDuration, price, priceMult, idoAssetId58, idoAssetMult, priceAssetId58, priceAssetMult, minInvestAmount, totalIdoAssetToSell], SEP) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func fromatConfig (idoStart,idoDuration,claimStart,claimDuration,price,priceMult,idoAssetId58,idoAssetMult,priceAssetId58,priceAssetMult,minInvestAmount,totalIdoAssetToSell) = fromatConfigS(toString(idoStart), toString(idoDuration), toString(claimStart), toString(claimDuration), toString(price), toString(priceMult), idoAssetId58, toString(idoAssetMult), priceAssetId58, toString(priceAssetMult), toString(minInvestAmount), toString(totalIdoAssetToSell)) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | let IdxInvTotalAmount = 1 | |
49 | 49 | ||
50 | 50 | let IdxInvRemainingAmount = 2 | |
51 | 51 | ||
52 | 52 | let IdxInvClaimedPriceAssetAmount = 3 | |
53 | 53 | ||
54 | 54 | let IdxInvClaimedIdoAssetAmount = 4 | |
55 | 55 | ||
56 | 56 | let IdxInvLastClaimedHeight = 5 | |
57 | 57 | ||
58 | 58 | func formatInvestorS (totalAmount,remainingAmount,claimedPriceAssetAmount,claimedIdoAssetAmount,lastClaimedHeight) = makeString(["%d%d%d%d%d", totalAmount, remainingAmount, claimedPriceAssetAmount, claimedIdoAssetAmount, lastClaimedHeight], SEP) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func formatInvestor (totalAmount,remainingAmount,claimedPriceAssetAmount,claimedIdoAssetAmount,lastClaimedHeight) = formatInvestorS(toString(totalAmount), toString(remainingAmount), toString(claimedPriceAssetAmount), toString(claimedIdoAssetAmount), toString(lastClaimedHeight)) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func formatHistoryRecord (priceAssetAmount,idoAssetAmount) = makeString(["%d%d%d%d", toString(height), toString(lastBlock.timestamp), toString(priceAssetAmount), toString(idoAssetAmount)], SEP) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func keyConfig () = "%s__config" | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func keyInvestor (userAddress) = ("%s__" + userAddress) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func keyTotals () = "%s__totals" | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP) | |
77 | + | ||
78 | + | ||
79 | + | func keyManagerPublicKey () = "%s__managerPublicKey" | |
80 | + | ||
81 | + | ||
82 | + | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
77 | 83 | ||
78 | 84 | ||
79 | 85 | func readConfigArray () = split(getStringOrFail(keyConfig()), SEP) | |
80 | 86 | ||
81 | 87 | ||
82 | 88 | func readTotalsArrayOrDefaultByCustomKey (customKey) = split(valueOrElse(getString(customKey), formatInvestorS("0", "0", "0", "0", "0")), SEP) | |
83 | 89 | ||
84 | 90 | ||
85 | 91 | func readTotalsArrayOrDefault () = readTotalsArrayOrDefaultByCustomKey(keyTotals()) | |
86 | 92 | ||
87 | 93 | ||
88 | 94 | func readInvestorArrayOrDefault (userAddress) = readTotalsArrayOrDefaultByCustomKey(keyInvestor(userAddress)) | |
89 | 95 | ||
90 | 96 | ||
91 | 97 | func readInvestorArrayOrFail (userAddress) = split(getStringOrFail(keyInvestor(userAddress)), SEP) | |
92 | 98 | ||
93 | 99 | ||
94 | 100 | let IdxDiffTotalIncrement = 0 | |
95 | 101 | ||
96 | 102 | let IdxDiffRemainingPriceAmountIncrement = 1 | |
97 | 103 | ||
98 | 104 | let IdxDiffClaimedPriceAmountIncrement = 2 | |
99 | 105 | ||
100 | 106 | let IdxDiffClaimedIdoAssetAmountIncrement = 3 | |
101 | 107 | ||
102 | 108 | func TotalsEntry (key,origArray,incrementDiff,newLastClaimedHeight) = { | |
103 | 109 | let totalAmount = parseIntValue(origArray[IdxInvTotalAmount]) | |
104 | 110 | let remainingAmount = parseIntValue(origArray[IdxInvRemainingAmount]) | |
105 | 111 | let claimedPriceAssetAmount = parseIntValue(origArray[IdxInvClaimedPriceAssetAmount]) | |
106 | 112 | let claimedIdoAssetAmount = parseIntValue(origArray[IdxInvClaimedIdoAssetAmount]) | |
107 | 113 | let lastClaimedHeight = parseIntValue(origArray[IdxInvLastClaimedHeight]) | |
108 | 114 | let newTotalAmount = (totalAmount + incrementDiff[IdxDiffTotalIncrement]) | |
109 | 115 | let newRemainingAmount = (remainingAmount + incrementDiff[IdxDiffRemainingPriceAmountIncrement]) | |
110 | 116 | let newClaimedPriceAssetAmount = (claimedPriceAssetAmount + incrementDiff[IdxDiffClaimedPriceAmountIncrement]) | |
111 | 117 | let newClaimedIdoAssetAmount = (claimedIdoAssetAmount + incrementDiff[IdxDiffClaimedIdoAssetAmountIncrement]) | |
112 | 118 | if ((0 > newRemainingAmount)) | |
113 | 119 | then throw("invalid math") | |
114 | 120 | else StringEntry(key, formatInvestor(newTotalAmount, newRemainingAmount, newClaimedPriceAssetAmount, newClaimedIdoAssetAmount, newLastClaimedHeight)) | |
115 | 121 | } | |
116 | 122 | ||
117 | 123 | ||
118 | 124 | func InvestOperationHistoryEntry (userAddress,priceAssetAmount,idoAssetAmount,txId) = StringEntry(keyOperationHistoryRecord("invest", userAddress, toBase58String(txId)), formatHistoryRecord(priceAssetAmount, idoAssetAmount)) | |
119 | 125 | ||
120 | 126 | ||
121 | 127 | func ClaimOperationHistoryEntry (userAddress,priceAssetAmount,idoAssetAmount,txId) = StringEntry(keyOperationHistoryRecord("claim", userAddress, toBase58String(txId)), formatHistoryRecord(priceAssetAmount, idoAssetAmount)) | |
122 | 128 | ||
123 | 129 | ||
124 | 130 | func internalClaim (claimedAssetId58,userAddress,txId) = { | |
125 | 131 | let cfgArray = readConfigArray() | |
126 | 132 | let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart]) | |
127 | 133 | let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration]) | |
128 | 134 | let claimEnd = (claimStart + claimDuration) | |
129 | 135 | let price = parseIntValue(cfgArray[IdxCfgPrice]) | |
130 | 136 | let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult]) | |
131 | 137 | let idoAssetId58 = cfgArray[IdxCfgIdoAssetId] | |
132 | 138 | let idoAssetId = fromBase58String(idoAssetId58) | |
133 | 139 | let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult]) | |
134 | 140 | let priceAssetId58 = cfgArray[IdxCfgPriceAssetId] | |
135 | 141 | let priceAssetId = fromBase58String(priceAssetId58) | |
136 | 142 | let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult]) | |
137 | 143 | let userAddress58 = toString(userAddress) | |
138 | 144 | let origInvestArray = readInvestorArrayOrFail(userAddress58) | |
139 | 145 | let investTotalAmount = parseIntValue(origInvestArray[IdxInvTotalAmount]) | |
140 | 146 | let investLastClaimedHeightTMP = parseIntValue(origInvestArray[IdxInvLastClaimedHeight]) | |
141 | 147 | let investLastClaimedHeight = if ((claimStart >= investLastClaimedHeightTMP)) | |
142 | 148 | then claimStart | |
143 | 149 | else investLastClaimedHeightTMP | |
144 | 150 | let newClaimPeriodHeight = if ((height > claimEnd)) | |
145 | 151 | then claimEnd | |
146 | 152 | else if ((claimStart > height)) | |
147 | 153 | then claimStart | |
148 | 154 | else height | |
149 | 155 | let claimingBlocks = (newClaimPeriodHeight - investLastClaimedHeight) | |
150 | 156 | let claimingPriceAssetAmount = fraction(investTotalAmount, claimingBlocks, claimDuration) | |
151 | 157 | let claimingIdoAssetAmount = convertPriceAssetIntoIdoAsset(claimingPriceAssetAmount, priceAssetMult, price, priceMult, idoAssetMult) | |
152 | 158 | if ((claimedAssetId58 == priceAssetId58)) | |
153 | 159 | then $Tuple6([0, -(claimingPriceAssetAmount), claimingPriceAssetAmount, 0], claimingPriceAssetAmount, priceAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount]) | |
154 | 160 | else if ((claimedAssetId58 == idoAssetId58)) | |
155 | 161 | then $Tuple6([0, -(claimingPriceAssetAmount), 0, claimingIdoAssetAmount], claimingIdoAssetAmount, idoAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount]) | |
156 | 162 | else throw(("unsupported assetId: " + claimedAssetId58)) | |
157 | 163 | } | |
158 | 164 | ||
159 | 165 | ||
166 | + | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
167 | + | case s: String => | |
168 | + | fromBase58String(s) | |
169 | + | case _: Unit => | |
170 | + | unit | |
171 | + | case _ => | |
172 | + | throw("Match error") | |
173 | + | } | |
174 | + | ||
175 | + | ||
176 | + | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
177 | + | case s: String => | |
178 | + | fromBase58String(s) | |
179 | + | case _: Unit => | |
180 | + | unit | |
181 | + | case _ => | |
182 | + | throw("Match error") | |
183 | + | } | |
184 | + | ||
185 | + | ||
186 | + | func mustManager (i) = { | |
187 | + | let pd = throw("Permission denied") | |
188 | + | match managerPublicKeyOrUnit() { | |
189 | + | case pk: ByteVector => | |
190 | + | if ((i.callerPublicKey == pk)) | |
191 | + | then true | |
192 | + | else pd | |
193 | + | case _: Unit => | |
194 | + | if ((i.caller == this)) | |
195 | + | then true | |
196 | + | else pd | |
197 | + | case _ => | |
198 | + | throw("Match error") | |
199 | + | } | |
200 | + | } | |
201 | + | ||
202 | + | ||
160 | 203 | @Callable(i) | |
161 | 204 | func constructor (idoStart,idoDuration,claimStart,claimDuration,price,priceAssetId58,minInvestAmount) = { | |
162 | 205 | let priceMult = ((100 * 1000) * 1000) | |
163 | 206 | let idoEnd = (idoStart + idoDuration) | |
164 | 207 | if (isDefined(getString(keyConfig()))) | |
165 | 208 | then throw("already initialized") | |
166 | - | else if ((" | |
209 | + | else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString(i.caller))) | |
167 | 210 | then throw("not authorized") | |
168 | 211 | else if ((size(i.payments) != 1)) | |
169 | 212 | then throw("exactly 1 payment must be attached") | |
170 | 213 | else if ((idoEnd >= claimStart)) | |
171 | 214 | then throw("claimStart must be greater than idoEnd") | |
172 | 215 | else { | |
173 | 216 | let pmt = value(i.payments[0]) | |
174 | 217 | let idoAssetId = value(pmt.assetId) | |
175 | 218 | let idoAssetInfo = valueOrErrorMessage(assetInfo(idoAssetId), "fail to load ido asset info") | |
176 | 219 | let idoAssetId58 = toBase58String(idoAssetId) | |
177 | 220 | let idoAssetMult = pow(10, 0, idoAssetInfo.decimals, 0, 0, DOWN) | |
178 | 221 | let priceAssetId = fromBase58String(priceAssetId58) | |
179 | 222 | let priceAssetInfo = valueOrErrorMessage(assetInfo(priceAssetId), "fail to load price asset info") | |
180 | 223 | let priceAssetMult = pow(10, 0, priceAssetInfo.decimals, 0, 0, DOWN) | |
181 | 224 | let origTotalsArray = readTotalsArrayOrDefault() | |
182 | 225 | let totalsDiff = [0, 0, 0, 0] | |
183 | 226 | [StringEntry(keyConfig(), fromatConfig(idoStart, idoDuration, claimStart, claimDuration, price, priceMult, idoAssetId58, idoAssetMult, priceAssetId58, priceAssetMult, minInvestAmount, pmt.amount)), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart)] | |
184 | 227 | } | |
185 | 228 | } | |
186 | 229 | ||
187 | 230 | ||
188 | 231 | ||
189 | 232 | @Callable(i) | |
190 | 233 | func invest () = { | |
191 | 234 | let cfgArray = readConfigArray() | |
192 | 235 | let idoStart = parseIntValue(cfgArray[IdxCfgIdoStart]) | |
193 | 236 | let idoDuration = parseIntValue(cfgArray[IdxCfgIdoDuration]) | |
194 | 237 | let idoEnd = (idoStart + idoDuration) | |
195 | 238 | let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart]) | |
196 | 239 | let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration]) | |
197 | 240 | let price = parseIntValue(cfgArray[IdxCfgPrice]) | |
198 | 241 | let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult]) | |
199 | 242 | let idoAssetId58 = cfgArray[IdxCfgIdoAssetId] | |
200 | 243 | let idoAssetId = fromBase58String(idoAssetId58) | |
201 | 244 | let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult]) | |
202 | 245 | let priceAssetId58 = cfgArray[IdxCfgPriceAssetId] | |
203 | 246 | let priceAssetId = fromBase58String(priceAssetId58) | |
204 | 247 | let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult]) | |
205 | 248 | let minIvestAmount = parseIntValue(cfgArray[IdxCfgMinInvestAmount]) | |
206 | 249 | let userAddress = toString(i.caller) | |
207 | 250 | if ((idoStart > height)) | |
208 | 251 | then throw("ido has not been started yet") | |
209 | 252 | else if ((height > idoEnd)) | |
210 | 253 | then throw("ido has been already ended") | |
211 | 254 | else if ((size(i.payments) != 1)) | |
212 | 255 | then throw("exactly 1 payment is expected") | |
213 | 256 | else { | |
214 | 257 | let pmt = value(i.payments[0]) | |
215 | 258 | let pmtAssetId = value(pmt.assetId) | |
216 | 259 | let pmtAmount = pmt.amount | |
217 | 260 | if ((pmtAssetId != priceAssetId)) | |
218 | 261 | then throw((("invalid payment asset id: " + toBase58String(pmtAssetId)) + " is expected")) | |
219 | 262 | else { | |
220 | 263 | let origInvestorArray = readInvestorArrayOrDefault(userAddress) | |
221 | 264 | let origTotalsArray = readTotalsArrayOrDefault() | |
222 | 265 | let newPriceTotalAmount = (parseIntValue(origTotalsArray[IdxInvTotalAmount]) + pmtAmount) | |
223 | 266 | let requiredIdoAssetAmount = (newPriceTotalAmount * 100) | |
224 | 267 | if ((requiredIdoAssetAmount > assetBalance(this, idoAssetId))) | |
225 | 268 | then throw("IDO asset has been - sold consider to use smaller payment") | |
226 | 269 | else { | |
227 | 270 | let totalsDiff = [pmtAmount, pmtAmount, 0, 0] | |
228 | 271 | [TotalsEntry(keyInvestor(userAddress), origInvestorArray, totalsDiff, claimStart), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart), InvestOperationHistoryEntry(userAddress, pmtAmount, 0, i.transactionId)] | |
229 | 272 | } | |
230 | 273 | } | |
231 | 274 | } | |
232 | 275 | } | |
233 | 276 | ||
234 | 277 | ||
235 | 278 | ||
236 | 279 | @Callable(i) | |
237 | 280 | func claim (claimedAssetId58,userAddress58) = { | |
238 | 281 | let callerAddress58 = toString(i.caller) | |
239 | 282 | if ((userAddress58 != callerAddress58)) | |
240 | 283 | then throw("not authorized") | |
241 | 284 | else { | |
242 | 285 | let claimResultTuple = internalClaim(claimedAssetId58, i.caller, i.transactionId) | |
243 | 286 | let totalsDiff = claimResultTuple._1 | |
244 | 287 | let outAmount = claimResultTuple._2 | |
245 | 288 | let outAssetId = claimResultTuple._3 | |
246 | 289 | let origInvestArray = claimResultTuple._4 | |
247 | 290 | let newClaimPeriodHeight = claimResultTuple._5 | |
248 | 291 | let claimedPriceAmountFromDiff = totalsDiff[IdxDiffClaimedPriceAmountIncrement] | |
249 | 292 | let claimedIdoAssetAmountFromDiff = totalsDiff[IdxDiffClaimedIdoAssetAmountIncrement] | |
250 | 293 | $Tuple2([ScriptTransfer(i.caller, outAmount, outAssetId), TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight), ClaimOperationHistoryEntry(userAddress58, claimedPriceAmountFromDiff, claimedIdoAssetAmountFromDiff, i.transactionId)], unit) | |
251 | 294 | } | |
252 | 295 | } | |
253 | 296 | ||
254 | 297 | ||
255 | 298 | ||
256 | 299 | @Callable(i) | |
257 | 300 | func claimREADONLY (claimedAssetId58,userAddress58) = { | |
258 | 301 | let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String("")) | |
259 | 302 | let totalsDiff = claimResultTuple._1 | |
260 | 303 | let outAmount = claimResultTuple._2 | |
261 | 304 | let outAssetId = claimResultTuple._3 | |
262 | 305 | let origInvestArray = claimResultTuple._4 | |
263 | 306 | let newClaimPeriodHeight = claimResultTuple._5 | |
264 | 307 | let availableToClaimArray = claimResultTuple._6 | |
265 | 308 | let availablePriceAmountToClaim = availableToClaimArray[0] | |
266 | 309 | let availableIdoAmountToClaim = availableToClaimArray[1] | |
267 | 310 | $Tuple2(nil, makeString(["%s%d%d", userAddress58, toString(availablePriceAmountToClaim), toString(availableIdoAmountToClaim)], SEP)) | |
268 | 311 | } | |
269 | 312 | ||
270 | 313 | ||
314 | + | ||
315 | + | @Callable(i) | |
316 | + | func setManager (pendingManagerPublicKey) = { | |
317 | + | let checkCaller = mustManager(i) | |
318 | + | if ((checkCaller == checkCaller)) | |
319 | + | then { | |
320 | + | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
321 | + | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
322 | + | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
323 | + | else throw("Strict value is not equal to itself.") | |
324 | + | } | |
325 | + | else throw("Strict value is not equal to itself.") | |
326 | + | } | |
327 | + | ||
328 | + | ||
329 | + | ||
330 | + | @Callable(i) | |
331 | + | func confirmManager () = { | |
332 | + | let pm = pendingManagerPublicKeyOrUnit() | |
333 | + | let hasPM = if (isDefined(pm)) | |
334 | + | then true | |
335 | + | else throw("No pending manager") | |
336 | + | if ((hasPM == hasPM)) | |
337 | + | then { | |
338 | + | let checkPM = if ((i.callerPublicKey == value(pm))) | |
339 | + | then true | |
340 | + | else throw("You are not pending manager") | |
341 | + | if ((checkPM == checkPM)) | |
342 | + | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
343 | + | else throw("Strict value is not equal to itself.") | |
344 | + | } | |
345 | + | else throw("Strict value is not equal to itself.") | |
346 | + | } | |
347 | + | ||
348 | + | ||
349 | + | @Verifier(tx) | |
350 | + | func verify () = { | |
351 | + | let targetPublicKey = match managerPublicKeyOrUnit() { | |
352 | + | case pk: ByteVector => | |
353 | + | pk | |
354 | + | case _: Unit => | |
355 | + | tx.senderPublicKey | |
356 | + | case _ => | |
357 | + | throw("Match error") | |
358 | + | } | |
359 | + | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
360 | + | } | |
361 | + |
github/deemru/w8io/169f3d6 94.55 ms ◑