tx · 3SZdT4A2AC49CgBu4dTBX3PDi45nYYZyBdXn9YUUHVRv 3MyAmtzgWwsdDctVNZeBQKDE1PUB9K29tnt: -0.01000000 Waves 2022.01.12 13:45 [1875634] smart account 3MyAmtzgWwsdDctVNZeBQKDE1PUB9K29tnt > SELF 0.00000000 Waves
{ "type": 13, "id": "3SZdT4A2AC49CgBu4dTBX3PDi45nYYZyBdXn9YUUHVRv", "fee": 1000000, "feeAssetId": null, "timestamp": 1641984357453, "version": 2, "chainId": 84, "sender": "3MyAmtzgWwsdDctVNZeBQKDE1PUB9K29tnt", "senderPublicKey": "GoJhEU3wAAFfMr5FSQjxHee6nTBjhoQM4RWkkqHmPhgP", "proofs": [ "23eSGrJaYf9eXvjfFEi8kQ5RB9hgG8docPWjShe3fddA8WeQbbUWfDY1t1Lm3ecJVz7tEL7Hk616JnV1JXQ79yhK" ], "script": "base64:AAIFAAAAAAAAACkIAhIHCgUICAEBARIDCgEBEgMKAQESABIDCgEIEgQKAgEBEgASAwoBCAAAACcAAAAAC3JldmlzaW9uTnVtAgAAAAAAAAAACXNlcGFyYXRvcgIAAAACX18AAAAABVNDQUxFAAAAAAAAAAPoAQAAAAxrZXlCb25kQXNzZXQAAAAAAgAAAA1ib25kX2Fzc2V0X2lkAQAAABprZXlOZXV0cmlub0NvbnRyYWN0QWRkcmVzcwAAAAAJAAS5AAAAAgkABEwAAAACAgAAAAIlcwkABEwAAAACAgAAABduZXV0cmlub0NvbnRyYWN0QWRkcmVzcwUAAAADbmlsBQAAAAlzZXBhcmF0b3IBAAAAF2tleUdOc2J0Q29udHJhY3RBZGRyZXNzAAAAAAkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAAAICAAAAFGdOc2J0Q29udHJhY3RBZGRyZXNzBQAAAANuaWwFAAAACXNlcGFyYXRvcgEAAAAQa2V5TWluTG9ja0Ftb3VudAAAAAAJAAS5AAAAAgkABEwAAAACAgAAAAIlcwkABEwAAAACAgAAAA1taW5Mb2NrQW1vdW50B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NzU3RyAwkBAAAADGlzVXNlckV4aXN0cwAAAAEFAAAAC3VzZXJBZGRyZXNzBAAAAA0kdDAxMzgyNDEzOTA0CQEAAAATZ2V0VXNlclBhcmFtc09yRmFpbAAAAAEFAAAAC3VzZXJBZGRyZXNzBAAAAAd1c2VyTnVtCAUAAAANJHQwMTM4MjQxMzkwNAAAAAJfMQQAAAAGYW1vdW50CAUAAAANJHQwMTM4MjQxMzkwNAAAAAJfMgQAAAAFc3RhcnQIBQAAAA0kdDAxMzgyNDEzOTA0AAAAAl8zBAAAAAhkdXJhdGlvbggFAAAADSR0MDEzODI0MTM5MDQAAAACXzQEAAAAAWsIBQAAAA0kdDAxMzgyNDEzOTA0AAAAAl81BAAAAAFiCAUAAAANJHQwMTM4MjQxMzkwNAAAAAJfNgkABRQAAAACBQAAAANuaWwJAARMAAAAAgUAAAAHdXNlck51bQkABEwAAAACBQAAAAZhbW91bnQJAARMAAAAAgUAAAAFc3RhcnQJAARMAAAAAgUAAAAIZHVyYXRpb24JAARMAAAAAgUAAAABawkABEwAAAACBQAAAAFiBQAAAANuaWwJAAUUAAAAAgUAAAADbmlsBQAAAAR1bml0AAAAAAcM2aE=", "height": 1875634, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let revisionNum = "" | |
5 | + | ||
6 | + | let separator = "__" | |
7 | + | ||
8 | + | let SCALE = 1000 | |
9 | + | ||
10 | + | func keyBondAsset () = "bond_asset_id" | |
11 | + | ||
12 | + | ||
13 | + | func keyNeutrinoContractAddress () = makeString(["%s", "neutrinoContractAddress"], separator) | |
14 | + | ||
15 | + | ||
16 | + | func keyGNsbtContractAddress () = makeString(["%s", "gNsbtContractAddress"], separator) | |
17 | + | ||
18 | + | ||
19 | + | func keyMinLockAmount () = makeString(["%s", "minLockAmount"], separator) | |
20 | + | ||
21 | + | ||
22 | + | func keyMinLockDuration () = makeString(["%s", "minLockDuration"], separator) | |
23 | + | ||
24 | + | ||
25 | + | func keyMaxLockDuration () = makeString(["%s", "maxLockDuration"], separator) | |
26 | + | ||
27 | + | ||
28 | + | func keyNextUserNum () = makeString(["%s", "nextUserNum"], separator) | |
29 | + | ||
30 | + | ||
31 | + | func keyUser2NumMapping (userAddress) = makeString(["%s%s%s", "mapping", "user2num", toString(userAddress)], separator) | |
32 | + | ||
33 | + | ||
34 | + | func keyNum2UserMapping (num) = makeString(["%s%s%s", "mapping", "num2user", toString(num)], separator) | |
35 | + | ||
36 | + | ||
37 | + | func keyLockParamUserAmount (userNum) = makeString(["%s%d%s", "paramByUserNum", toString(userNum), "amount"], separator) | |
38 | + | ||
39 | + | ||
40 | + | func keyLockParamStartBlock (userNum) = makeString(["%s%d%s", "paramByUserNum", toString(userNum), "start"], separator) | |
41 | + | ||
42 | + | ||
43 | + | func keyLockParamDuration (userNum) = makeString(["%s%d%s", "paramByUserNum", toString(userNum), "duration"], separator) | |
44 | + | ||
45 | + | ||
46 | + | func keyLockParamK (userNum) = makeString(["%s%d%s", "paramByUserNum", toString(userNum), "k"], separator) | |
47 | + | ||
48 | + | ||
49 | + | func keyLockParamB (userNum) = makeString(["%s%d%s", "paramByUserNum", toString(userNum), "b"], separator) | |
50 | + | ||
51 | + | ||
52 | + | func keyLockParamByPeriodK (userNum,period) = makeString(["%s%d%s%d", "paramByPeriod", toString(userNum), "k", toString(period)], separator) | |
53 | + | ||
54 | + | ||
55 | + | func keyLockParamByPeriodB (userNum,period) = makeString(["%s%d%s%d", "paramByPeriod", toString(userNum), "b", toString(period)], separator) | |
56 | + | ||
57 | + | ||
58 | + | func keyHistoryRecord (type,userAddress,txId) = makeString(["%s%s%s%s", "history", type, toString(userAddress), toBase58String(txId)], separator) | |
59 | + | ||
60 | + | ||
61 | + | func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], separator) | |
62 | + | ||
63 | + | ||
64 | + | func keyStatsLocksDurationSumInBlocks () = makeString(["%s%s", "stats", "locksDurationSumInBlocks"], separator) | |
65 | + | ||
66 | + | ||
67 | + | func keyStatsLocksCount () = makeString(["%s%s", "stats", "locksCount"], separator) | |
68 | + | ||
69 | + | ||
70 | + | func keyStatsUsersCount () = makeString(["%s%s", "stats", "activeUsersCount"], separator) | |
71 | + | ||
72 | + | ||
73 | + | func keyNextPeriod () = makeString(["%s", "nextPeriod"], separator) | |
74 | + | ||
75 | + | ||
76 | + | func thisOnly (i) = if ((i.caller != this)) | |
77 | + | then throw("Permission denied") | |
78 | + | else true | |
79 | + | ||
80 | + | ||
81 | + | func getIntOrZero (key) = valueOrElse(getInteger(this, key), 0) | |
82 | + | ||
83 | + | ||
84 | + | func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("Mandatory this." + key) + " is not defined")) | |
85 | + | ||
86 | + | ||
87 | + | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (("Mandatory this." + key) + " is not defined")) | |
88 | + | ||
89 | + | ||
90 | + | func getStartGNsbtAmount (nsbtAmount,duration,maxDuration) = fraction(nsbtAmount, duration, maxDuration) | |
91 | + | ||
92 | + | ||
93 | + | func getSlopeInterceptFormParams (amount,duration,maxDuration,startHeight) = { | |
94 | + | let endHeight = (startHeight + duration) | |
95 | + | let k = -(fraction(amount, SCALE, maxDuration)) | |
96 | + | let b = (-(k) * endHeight) | |
97 | + | $Tuple2(k, b) | |
98 | + | } | |
99 | + | ||
100 | + | ||
101 | + | func formatHistoryRecord (amount,start,duration,k,b) = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(amount), toString(start), toString(duration), toString(k), toString(b)], separator) | |
102 | + | ||
103 | + | ||
104 | + | func HistoryRecordEntry (type,userAddress,txId,amount,start,duration,k,b) = [StringEntry(keyHistoryRecord(type, userAddress, txId), formatHistoryRecord(amount, start, duration, k, b))] | |
105 | + | ||
106 | + | ||
107 | + | func StatsEntry (totalLockedInc,durationInc,lockCountInc,usersCountInc) = { | |
108 | + | let locksDurationSumInBlocks = getIntOrZero(keyStatsLocksDurationSumInBlocks()) | |
109 | + | let locksCount = getIntOrZero(keyStatsLocksCount()) | |
110 | + | let usersCount = getIntOrZero(keyStatsUsersCount()) | |
111 | + | let totalAmount = getIntOrZero(keyLockParamTotalAmount()) | |
112 | + | [IntegerEntry(keyStatsLocksDurationSumInBlocks(), (locksDurationSumInBlocks + durationInc)), IntegerEntry(keyStatsLocksCount(), (locksCount + lockCountInc)), IntegerEntry(keyStatsUsersCount(), (usersCount + usersCountInc)), IntegerEntry(keyLockParamTotalAmount(), (totalAmount + totalLockedInc))] | |
113 | + | } | |
114 | + | ||
115 | + | ||
116 | + | func LockParamsEntry (userNum,amount,start,duration,k,b,period) = [IntegerEntry(keyLockParamUserAmount(userNum), amount), IntegerEntry(keyLockParamStartBlock(userNum), start), IntegerEntry(keyLockParamDuration(userNum), duration), IntegerEntry(keyLockParamK(userNum), k), IntegerEntry(keyLockParamB(userNum), b), IntegerEntry(keyLockParamByPeriodK(userNum, period), k), IntegerEntry(keyLockParamByPeriodB(userNum, period), b)] | |
117 | + | ||
118 | + | ||
119 | + | func getParamsOrFail () = { | |
120 | + | let neutrinoContract = addressFromStringValue(getStringOrFail(keyNeutrinoContractAddress())) | |
121 | + | let gNsbtContract = addressFromStringValue(getStringOrFail(keyGNsbtContractAddress())) | |
122 | + | let bondAssetId = fromBase58String(getStringValue(neutrinoContract, keyBondAsset())) | |
123 | + | let minLockAmount = getIntOrFail(keyMinLockAmount()) | |
124 | + | let minLockDuration = getIntOrFail(keyMinLockDuration()) | |
125 | + | let maxLockDuration = getIntOrFail(keyMaxLockDuration()) | |
126 | + | let nextUserNum = getIntOrFail(keyNextUserNum()) | |
127 | + | $Tuple6(gNsbtContract, bondAssetId, minLockAmount, minLockDuration, maxLockDuration, nextUserNum) | |
128 | + | } | |
129 | + | ||
130 | + | ||
131 | + | func isUserExists (userAddress) = isDefined(getInteger(this, keyUser2NumMapping(userAddress))) | |
132 | + | ||
133 | + | ||
134 | + | func getUserParamsOrUnit (userAddress) = if (isUserExists(userAddress)) | |
135 | + | then { | |
136 | + | let userNum = getIntOrFail(keyUser2NumMapping(userAddress)) | |
137 | + | $Tuple6(userNum, getIntOrFail(keyLockParamUserAmount(userNum)), getIntOrFail(keyLockParamStartBlock(userNum)), getIntOrFail(keyLockParamDuration(userNum)), getIntOrFail(keyLockParamK(userNum)), getIntOrFail(keyLockParamB(userNum))) | |
138 | + | } | |
139 | + | else unit | |
140 | + | ||
141 | + | ||
142 | + | func getUserParamsOrFail (userAddress) = valueOrErrorMessage(getUserParamsOrUnit(userAddress), (("User " + toString(userAddress)) + " is not defined")) | |
143 | + | ||
144 | + | ||
145 | + | @Callable(i) | |
146 | + | func constructor (neutrinoContractAddress,gNsbtContractAddress,minLockAmount,minLockDuration,maxLockDuration) = { | |
147 | + | let checks = [thisOnly(i)] | |
148 | + | if ((checks == checks)) | |
149 | + | then [StringEntry(keyNeutrinoContractAddress(), neutrinoContractAddress), StringEntry(keyGNsbtContractAddress(), gNsbtContractAddress), IntegerEntry(keyMinLockAmount(), minLockAmount), IntegerEntry(keyMinLockDuration(), minLockDuration), IntegerEntry(keyMaxLockDuration(), maxLockDuration), IntegerEntry(keyNextUserNum(), 0)] | |
150 | + | else throw("Strict value is not equal to itself.") | |
151 | + | } | |
152 | + | ||
153 | + | ||
154 | + | ||
155 | + | @Callable(i) | |
156 | + | func lock (duration) = { | |
157 | + | let paymentsRequiredSize = 1 | |
158 | + | let $t071577299 = getParamsOrFail() | |
159 | + | let gNsbtContract = $t071577299._1 | |
160 | + | let bondAssetId = $t071577299._2 | |
161 | + | let minLockAmount = $t071577299._3 | |
162 | + | let minLockDuration = $t071577299._4 | |
163 | + | let maxLockDuration = $t071577299._5 | |
164 | + | let nextUserNum = $t071577299._6 | |
165 | + | let checkPaymentsSize = if ((size(i.payments) != paymentsRequiredSize)) | |
166 | + | then throw("Invalid payments size") | |
167 | + | else true | |
168 | + | if ((checkPaymentsSize == checkPaymentsSize)) | |
169 | + | then { | |
170 | + | let payment = i.payments[0] | |
171 | + | let amount = payment.amount | |
172 | + | let invalidAssetMessage = (("Invalid asset. " + toBase58String(bondAssetId)) + " is expected") | |
173 | + | let assetId = valueOrErrorMessage(payment.assetId, invalidAssetMessage) | |
174 | + | let checkAssetId = if ((assetId != bondAssetId)) | |
175 | + | then throw(invalidAssetMessage) | |
176 | + | else true | |
177 | + | if ((checkAssetId == checkAssetId)) | |
178 | + | then { | |
179 | + | let userAddress = i.caller | |
180 | + | let checkScript = if (isDefined(scriptHash(userAddress))) | |
181 | + | then throw("Address is scripted. Access denied") | |
182 | + | else true | |
183 | + | if ((checkScript == checkScript)) | |
184 | + | then { | |
185 | + | let userParamsOrUnit = getUserParamsOrUnit(userAddress) | |
186 | + | let $t079608258 = match userParamsOrUnit { | |
187 | + | case params: (Int, Int, Int, Int, Int, Int) => | |
188 | + | $Tuple5(false, params._1, params._2, params._3, params._4) | |
189 | + | case _: Unit => | |
190 | + | $Tuple5(true, nextUserNum, 0, unit, unit) | |
191 | + | case _ => | |
192 | + | throw("Match error") | |
193 | + | } | |
194 | + | let isNewUser = $t079608258._1 | |
195 | + | let userNum = $t079608258._2 | |
196 | + | let lockAmount = $t079608258._3 | |
197 | + | let currentStartHeightOrUnit = $t079608258._4 | |
198 | + | let currentDurationOrUnit = $t079608258._5 | |
199 | + | let checkAmountAndDuration = [if ((lockAmount > 0)) | |
200 | + | then { | |
201 | + | let isLockExpired = if (!(isNewUser)) | |
202 | + | then (height > (value(currentStartHeightOrUnit) + value(currentDurationOrUnit))) | |
203 | + | else false | |
204 | + | throw(("There is an active lock. Consider to use increaseLock" + (if (isLockExpired) | |
205 | + | then " or unlock" | |
206 | + | else ""))) | |
207 | + | } | |
208 | + | else true, if ((minLockAmount > amount)) | |
209 | + | then throw(("Min lock amount is " + toString(minLockAmount))) | |
210 | + | else true, if ((minLockDuration > duration)) | |
211 | + | then throw((("Min lock duration is " + toString(minLockDuration)) + " blocks")) | |
212 | + | else true, if ((duration > maxLockDuration)) | |
213 | + | then throw((("Max lock duration is " + toString(maxLockDuration)) + " blocks")) | |
214 | + | else true] | |
215 | + | if ((checkAmountAndDuration == checkAmountAndDuration)) | |
216 | + | then { | |
217 | + | let nextPeriod = valueOrElse(getInteger(gNsbtContract, keyNextPeriod()), 0) | |
218 | + | let lockStart = height | |
219 | + | let $t090339119 = getSlopeInterceptFormParams(amount, duration, maxLockDuration, lockStart) | |
220 | + | let k = $t090339119._1 | |
221 | + | let b = $t090339119._2 | |
222 | + | let nextUserNumInc = if (isNewUser) | |
223 | + | then 1 | |
224 | + | else 0 | |
225 | + | ((([IntegerEntry(keyNextUserNum(), (nextUserNum + nextUserNumInc)), IntegerEntry(keyUser2NumMapping(userAddress), userNum), StringEntry(keyNum2UserMapping(userNum), toString(userAddress))] ++ LockParamsEntry(userNum, amount, lockStart, duration, k, b, nextPeriod)) ++ HistoryRecordEntry("lock", userAddress, i.transactionId, amount, lockStart, duration, k, b)) ++ StatsEntry(amount, duration, 1, 1)) | |
226 | + | } | |
227 | + | else throw("Strict value is not equal to itself.") | |
228 | + | } | |
229 | + | else throw("Strict value is not equal to itself.") | |
230 | + | } | |
231 | + | else throw("Strict value is not equal to itself.") | |
232 | + | } | |
233 | + | else throw("Strict value is not equal to itself.") | |
234 | + | } | |
235 | + | ||
236 | + | ||
237 | + | ||
238 | + | @Callable(i) | |
239 | + | func increaseLock (deltaDuration) = { | |
240 | + | let paymentsMaxSize = 1 | |
241 | + | let params = getParamsOrFail() | |
242 | + | let $t097179830 = $Tuple4(params._1, params._2, params._4, params._5) | |
243 | + | let gNsbtContract = $t097179830._1 | |
244 | + | let bondAssetId = $t097179830._2 | |
245 | + | let minLockDuration = $t097179830._3 | |
246 | + | let maxLockDuration = $t097179830._4 | |
247 | + | let paymentsSize = size(i.payments) | |
248 | + | let checkPaymentsSize = if ((paymentsSize > paymentsMaxSize)) | |
249 | + | then throw("Invalid payments size") | |
250 | + | else true | |
251 | + | if ((checkPaymentsSize == checkPaymentsSize)) | |
252 | + | then { | |
253 | + | let $t0998310420 = if ((paymentsSize == paymentsMaxSize)) | |
254 | + | then { | |
255 | + | let payment = i.payments[0] | |
256 | + | let invalidAssetMessage = (("Invalid asset. " + toBase58String(bondAssetId)) + " is expected") | |
257 | + | let assetId = valueOrErrorMessage(payment.assetId, invalidAssetMessage) | |
258 | + | let checkAssetId = if ((assetId != bondAssetId)) | |
259 | + | then throw(invalidAssetMessage) | |
260 | + | else true | |
261 | + | if ((checkAssetId == checkAssetId)) | |
262 | + | then $Tuple2(payment.amount, assetId) | |
263 | + | else throw("Strict value is not equal to itself.") | |
264 | + | } | |
265 | + | else $Tuple2(0, unit) | |
266 | + | let amount = $t0998310420._1 | |
267 | + | let assetId = $t0998310420._2 | |
268 | + | let userAddress = i.caller | |
269 | + | let checkScript = if (isDefined(scriptHash(userAddress))) | |
270 | + | then throw("Address is scripted. Access denied") | |
271 | + | else true | |
272 | + | if ((checkScript == checkScript)) | |
273 | + | then { | |
274 | + | let userParams = getUserParamsOrFail(userAddress) | |
275 | + | let $t01063110744 = $Tuple4(userParams._1, userParams._2, userParams._3, userParams._4) | |
276 | + | let userNum = $t01063110744._1 | |
277 | + | let lockAmount = $t01063110744._2 | |
278 | + | let lockStart = $t01063110744._3 | |
279 | + | let lockDuration = $t01063110744._4 | |
280 | + | let lockEnd = (lockStart + lockDuration) | |
281 | + | let newAmount = (lockAmount + amount) | |
282 | + | let newLockStart = height | |
283 | + | let newLockDuration = (deltaDuration + max([0, (lockEnd - newLockStart)])) | |
284 | + | let checkDuration = [if ((0 > deltaDuration)) | |
285 | + | then throw("Increase in duration is less then zero") | |
286 | + | else true, if ((minLockDuration > newLockDuration)) | |
287 | + | then throw((("Min lock duration is " + toString(minLockDuration)) + " blocks")) | |
288 | + | else true, if ((newLockDuration > maxLockDuration)) | |
289 | + | then throw((("Max lock duration is " + toString(maxLockDuration)) + " blocks")) | |
290 | + | else true] | |
291 | + | if ((checkDuration == checkDuration)) | |
292 | + | then { | |
293 | + | let nextPeriod = valueOrElse(getInteger(gNsbtContract, keyNextPeriod()), 0) | |
294 | + | let $t01138811493 = getSlopeInterceptFormParams(newAmount, newLockDuration, maxLockDuration, newLockStart) | |
295 | + | let kNew = $t01138811493._1 | |
296 | + | let bNew = $t01138811493._2 | |
297 | + | ((LockParamsEntry(userNum, newAmount, newLockStart, newLockDuration, kNew, bNew, nextPeriod) ++ HistoryRecordEntry("increaseLock", userAddress, i.transactionId, newAmount, newLockStart, newLockDuration, kNew, bNew)) ++ StatsEntry(amount, deltaDuration, 0, 0)) | |
298 | + | } | |
299 | + | else throw("Strict value is not equal to itself.") | |
300 | + | } | |
301 | + | else throw("Strict value is not equal to itself.") | |
302 | + | } | |
303 | + | else throw("Strict value is not equal to itself.") | |
304 | + | } | |
305 | + | ||
306 | + | ||
307 | + | ||
308 | + | @Callable(i) | |
309 | + | func unlock () = { | |
310 | + | let userAddress = i.caller | |
311 | + | let params = getParamsOrFail() | |
312 | + | let $t01186011917 = $Tuple2(params._1, params._2) | |
313 | + | let gNsbtContract = $t01186011917._1 | |
314 | + | let bondAssetId = $t01186011917._2 | |
315 | + | let userParams = getUserParamsOrFail(userAddress) | |
316 | + | let $t01197312086 = $Tuple4(userParams._1, userParams._2, userParams._3, userParams._4) | |
317 | + | let userNum = $t01197312086._1 | |
318 | + | let lockAmount = $t01197312086._2 | |
319 | + | let lockStart = $t01197312086._3 | |
320 | + | let lockDuration = $t01197312086._4 | |
321 | + | let lockEnd = (lockStart + lockDuration) | |
322 | + | let checks = [if ((lockEnd > height)) | |
323 | + | then throw((("Wait " + toString((lockEnd - height))) + " blocks to unlock")) | |
324 | + | else true, if ((0 >= lockAmount)) | |
325 | + | then throw("Nothing to unlock") | |
326 | + | else true] | |
327 | + | if ((checks == checks)) | |
328 | + | then { | |
329 | + | let nextPeriod = valueOrElse(getInteger(gNsbtContract, keyNextPeriod()), 0) | |
330 | + | (((LockParamsEntry(userNum, 0, lockStart, lockDuration, 0, 0, nextPeriod) ++ HistoryRecordEntry("unlock", userAddress, i.transactionId, lockAmount, lockStart, lockDuration, 0, 0)) ++ StatsEntry(-(lockAmount), 0, 0, -1)) :+ ScriptTransfer(userAddress, lockAmount, bondAssetId)) | |
331 | + | } | |
332 | + | else throw("Strict value is not equal to itself.") | |
333 | + | } | |
334 | + | ||
335 | + | ||
336 | + | ||
337 | + | @Callable(i) | |
338 | + | func gNsbtAmountREADONLY (userAddressStr) = { | |
339 | + | let userAddress = addressFromStringValue(userAddressStr) | |
340 | + | if (isUserExists(userAddress)) | |
341 | + | then { | |
342 | + | let userParams = getUserParamsOrFail(userAddress) | |
343 | + | let $t01296113004 = $Tuple2(userParams._5, userParams._6) | |
344 | + | let k = $t01296113004._1 | |
345 | + | let b = $t01296113004._2 | |
346 | + | let gNsbtAmount = ((k * height) + b) | |
347 | + | $Tuple2(nil, gNsbtAmount) | |
348 | + | } | |
349 | + | else $Tuple2(nil, 0) | |
350 | + | } | |
351 | + | ||
352 | + | ||
353 | + | ||
354 | + | @Callable(i) | |
355 | + | func startGNsbtAmountREADONLY (nsbtAmount,duration) = { | |
356 | + | let maxDuration = getParamsOrFail()._5 | |
357 | + | let startAmount = getStartGNsbtAmount(nsbtAmount, duration, maxDuration) | |
358 | + | $Tuple2(nil, startAmount) | |
359 | + | } | |
360 | + | ||
361 | + | ||
362 | + | ||
363 | + | @Callable(i) | |
364 | + | func paramsREADONLY () = { | |
365 | + | let params = getParamsOrFail() | |
366 | + | $Tuple2(nil, [params._3, params._4, params._5]) | |
367 | + | } | |
368 | + | ||
369 | + | ||
370 | + | ||
371 | + | @Callable(i) | |
372 | + | func lockParamsREADONLY (userAddressStr) = { | |
373 | + | let userAddress = addressFromStringValue(userAddressStr) | |
374 | + | if (isUserExists(userAddress)) | |
375 | + | then { | |
376 | + | let $t01382413904 = getUserParamsOrFail(userAddress) | |
377 | + | let userNum = $t01382413904._1 | |
378 | + | let amount = $t01382413904._2 | |
379 | + | let start = $t01382413904._3 | |
380 | + | let duration = $t01382413904._4 | |
381 | + | let k = $t01382413904._5 | |
382 | + | let b = $t01382413904._6 | |
383 | + | $Tuple2(nil, [userNum, amount, start, duration, k, b]) | |
384 | + | } | |
385 | + | else $Tuple2(nil, unit) | |
386 | + | } | |
387 | + | ||
388 | + |
github/deemru/w8io/169f3d6 28.57 ms ◑