tx · 5AuiPoBDSk1moWfuHfWwJAn2kk1ggJStS7d8dEpYBWuQ

3NBDtDkWn1aLDELVCm2jnNVZkTDsQNybbYU:  -0.02500000 Waves

2023.02.22 14:49 [2460816] smart account 3NBDtDkWn1aLDELVCm2jnNVZkTDsQNybbYU > SELF 0.00000000 Waves

{ "type": 13, "id": "5AuiPoBDSk1moWfuHfWwJAn2kk1ggJStS7d8dEpYBWuQ", "fee": 2500000, "feeAssetId": null, "timestamp": 1677066620906, "version": 1, "sender": "3NBDtDkWn1aLDELVCm2jnNVZkTDsQNybbYU", "senderPublicKey": "Dibjxh7RrkDnL9zkwnd9HtKGCy924pjTtaFBs9fzMigu", "proofs": [ "4Xo3TDHS8fqr2zi9tHw7JFNag87mvHEQsax2cXebVcPKMahEB8VzaLKzyKb2FgPtJgWgNHmueybbvqyGhkw2rcFy" ], "script": "base64:BgJdCAISBQoDCAgEEgUKAwgYARIHCgURCBgBARIGCgQICAgIEgYKBAgICAISBQoDCAgEEgYKBAgIAQESBAoCCBgSAwoBCBIAEgQKAggIEgMKAQgSBAoCCAgSAwoBCBIAHgAJc2VwYXJhdG9yAgJfXwEMa2V5V3hBc3NldElkAAkAuQkCCQDMCAICAiVzCQDMCAICCXd4QXNzZXRJZAUDbmlsBQlzZXBhcmF0b3IAE2tleUJhY2tlbmRQdWJsaWNLZXkJALkJAgkAzAgCAgIlcwkAzAgCAhBiYWNrZW5kUHVibGljS2V5BQNuaWwFCXNlcGFyYXRvcgEba2V5RXhpc3RzUmVmZXJyZXJUb1JlZmVycmFsAwtwcm9ncmFtTmFtZQ9yZWZlcnJlckFkZHJlc3MPcmVmZXJyYWxBZGRyZXNzCQC5CQIJAMwIAgIIJXMlcyVzJXMJAMwIAgIYZXhpc3RzUmVmZXJyZXJUb1JlZmVycmFsCQDMCAIFC3Byb2dyYW1OYW1lCQDMCAIFD3JlZmVycmVyQWRkcmVzcwkAzAgCBQ9yZWZlcnJhbEFkZHJlc3MFA25pbAUJc2VwYXJhdG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bHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAWkBDmNvbmZpcm1NYW5hZ2VyAAQCcG0JAR1wZW5kaW5nTWFuYWdlclB1YmxpY0tleU9yVW5pdAAEBWhhc1BNAwkBCWlzRGVmaW5lZAEFAnBtBgkBCHRocm93RXJyAQISbm8gcGVuZGluZyBtYW5hZ2VyAwkAAAIFBWhhc1BNBQVoYXNQTQQHY2hlY2tQTQMJAAACCAUBaQ9jYWxsZXJQdWJsaWNLZXkJAQV2YWx1ZQEFAnBtBgkBCHRocm93RXJyAQIbeW91IGFyZSBub3QgcGVuZGluZyBtYW5hZ2VyAwkAAAIFB2NoZWNrUE0FB2NoZWNrUE0JAMwIAgkBC1N0cmluZ0VudHJ5AgkBE2tleU1hbmFnZXJQdWJsaWNLZXkACQDYBAEJAQV2YWx1ZQEFAnBtCQDMCAIJAQtEZWxldGVFbnRyeQEJARprZXlQZW5kaW5nTWFuYWdlclB1YmxpY0tleQAFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAED3RhcmdldFB1YmxpY0tleQQHJG1hdGNoMAkBFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEAnBrBQckbWF0Y2gwBQJwawMJAAECBQckbWF0Y2gwAgRVbml0CAUCdHgPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFD3RhcmdldFB1YmxpY0tleZZaMrc=", "chainId": 84, "height": 2460816, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: A289Np2XtcpHTqApt9H5DZNPtYuWCpA5VCcnog9VLnNQ Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = "__"
55
66 func keyWxAssetId () = makeString(["%s", "wxAssetId"], separator)
77
88
99 let keyBackendPublicKey = makeString(["%s", "backendPublicKey"], separator)
1010
1111 func keyExistsReferrerToReferral (programName,referrerAddress,referralAddress) = makeString(["%s%s%s%s", "existsReferrerToReferral", programName, referrerAddress, referralAddress], separator)
1212
1313
1414 func keyClaimedReferrer (programName,claimerAddress) = makeString(["%s%s%s", "claimedReferrer", programName, claimerAddress], separator)
1515
1616
1717 func keyClaimedReferral (programName,claimerAddress) = makeString(["%s%s%s", "claimedReferral", programName, claimerAddress], separator)
1818
1919
2020 func keyUnclaimedReferrer (programName,claimerAddress) = makeString(["%s%s%s", "unclaimedReferrer", programName, claimerAddress], separator)
2121
2222
2323 func keyUnclaimedReferral (programName,claimerAddress) = makeString(["%s%s%s", "unclaimedReferral", programName, claimerAddress], separator)
2424
2525
2626 func keyReferrer (programName,referralAddress) = makeString(["%s%s%s", "referrer", programName, referralAddress], separator)
2727
2828
2929 func keyProgramName (programName) = makeString(["%s%s", "programName", programName], separator)
3030
3131
3232 func keyTotalReferralCount (programName,referrerAddress) = makeString(["%s%s%s", "totalReferralCount", programName, referrerAddress], separator)
3333
3434
3535 func keyActiveReferralCount (programName,referrerAddress) = makeString(["%s%s%s", "activeReferralCount", programName, referrerAddress], separator)
3636
3737
3838 func keyIsReferralActive (programName,referralAddress) = makeString(["%s%s%s", "activeReferral", programName, referralAddress], separator)
3939
4040
4141 func keyClaimedTotalAddress (address) = makeString(["%s%s", "claimedTotalAddress", address], separator)
4242
4343
4444 func keyUnclaimedTotalAddress (address) = makeString(["%s%s", "unclaimedTotalAddress", address], separator)
4545
4646
4747 func keyClaimedTotal (programName) = makeString(["%s%s", "claimedTotal", programName], separator)
4848
4949
5050 func keyRewardsTotal (programName) = makeString(["%s%s", "rewardsTotal", programName], separator)
5151
5252
5353 func keyRewardAssetId (programName) = makeString(["%s%s", "rewardAssetId", programName], separator)
5454
5555
5656 func keyTreasuryContract (programName) = makeString(["%s%s", "treasuryContract", programName], separator)
5757
5858
5959 func keyImplementationContract (programName) = makeString(["%s%s", "implementationContract", programName], separator)
6060
6161
6262 func keyAllReferralPrograms (address) = makeString(["%s%s", "allReferralPrograms", address], separator)
6363
6464
6565 func keyManagerPublicKey () = "%s__managerPublicKey"
6666
6767
6868 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
6969
7070
7171 func keyClaimHistory (programName,userAddress,transactionId,type) = makeString(["%s%s%s%s%s", "history", type, programName, userAddress, transactionId], separator)
7272
7373
7474 func formatClaimHistory (amount) = makeString(["%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(amount)], separator)
7575
7676
7777 func throwErr (msg) = throw(makeString(["referral.ride:", msg], " "))
7878
7979
8080 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
8181 case s: String =>
8282 fromBase58String(s)
8383 case _: Unit =>
8484 unit
8585 case _ =>
8686 throw("Match error")
8787 }
8888
8989
9090 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
9191 case s: String =>
9292 fromBase58String(s)
9393 case _: Unit =>
9494 unit
9595 case _ =>
9696 throw("Match error")
9797 }
9898
9999
100100 func mustManager (i) = {
101101 let pd = throwErr("permission denied")
102102 match managerPublicKeyOrUnit() {
103103 case pk: ByteVector =>
104104 if ((i.callerPublicKey == pk))
105105 then true
106106 else pd
107107 case _: Unit =>
108108 if ((i.caller == this))
109109 then true
110110 else pd
111111 case _ =>
112112 throw("Match error")
113113 }
114114 }
115115
116116
117117 func updateAllReferralPrograms (address,programName) = {
118118 let allReferralPrograms = valueOrElse(getString(keyAllReferralPrograms(address)), "")
119119 let updatedAllReferralPrograms = if (contains(allReferralPrograms, programName))
120120 then nil
121121 else {
122122 let newAllReferralPrograms = if ((allReferralPrograms == ""))
123123 then programName
124124 else makeString([allReferralPrograms, programName], separator)
125125 [StringEntry(keyAllReferralPrograms(address), newAllReferralPrograms)]
126126 }
127127 updatedAllReferralPrograms
128128 }
129129
130130
131131 @Callable(i)
132132 func claimInternal (programName,claimerAddress,isImplementationContract) = {
133133 let checkProgramExists = if (valueOrElse(getBoolean(keyProgramName(programName)), false))
134134 then true
135135 else throwErr("program does not exist")
136136 if ((checkProgramExists == checkProgramExists))
137137 then {
138138 let $t047945753 = if (isImplementationContract)
139139 then $Tuple5(valueOrElse(getInteger(keyClaimedReferral(programName, claimerAddress)), 0), valueOrElse(getInteger(keyUnclaimedReferral(programName, claimerAddress)), 0), keyClaimedReferral(programName, claimerAddress), keyUnclaimedReferral(programName, claimerAddress), keyClaimHistory(programName, claimerAddress, toBase58String(i.transactionId), "claimReferral"))
140140 else $Tuple5(valueOrElse(getInteger(keyClaimedReferrer(programName, claimerAddress)), 0), valueOrElse(getInteger(keyUnclaimedReferrer(programName, claimerAddress)), 0), keyClaimedReferrer(programName, claimerAddress), keyUnclaimedReferrer(programName, claimerAddress), keyClaimHistory(programName, claimerAddress, toBase58String(i.transactionId), "claimReferrer"))
141141 let claimerClaimed = $t047945753._1
142142 let claimerUnclaimed = $t047945753._2
143143 let keyClaimed = $t047945753._3
144144 let keyUnclaimed = $t047945753._4
145145 let claimHistoryKey = $t047945753._5
146146 let claimedTotal = valueOrElse(getInteger(keyClaimedTotal(programName)), 0)
147147 let treasuryContract = value(addressFromString(value(getString(keyTreasuryContract(programName)))))
148148 let rewardAssetId = fromBase58String(value(getString(keyRewardAssetId(programName))))
149149 let claimedTotalAddress = valueOrElse(getInteger(keyClaimedTotalAddress(claimerAddress)), 0)
150150 let unclaimedTotalAddress = valueOrElse(getInteger(keyUnclaimedTotalAddress(claimerAddress)), 0)
151151 if (if (isImplementationContract)
152152 then (claimerUnclaimed == 0)
153153 else false)
154154 then $Tuple2(nil, 0)
155155 else {
156156 let checkCanClaim = if ((claimerUnclaimed > 0))
157157 then true
158158 else throwErr("nothing to claim")
159159 if ((checkCanClaim == checkCanClaim))
160160 then {
161161 let newClaimerClaimed = (claimerClaimed + claimerUnclaimed)
162162 let newClaimedTotal = (claimedTotal + claimerUnclaimed)
163163 let newClaimedTotalAddress = (claimedTotalAddress + claimerUnclaimed)
164164 let newUnclaimedTotalAddress = (unclaimedTotalAddress - claimerUnclaimed)
165165 let balanceBefore = value(assetBalance(this, rewardAssetId))
166166 if ((balanceBefore == balanceBefore))
167167 then {
168168 let res = invoke(treasuryContract, "withdrawReferralReward", [claimerUnclaimed], nil)
169169 if ((res == res))
170170 then {
171171 let balanceAfter = value(assetBalance(this, rewardAssetId))
172172 if ((balanceAfter == balanceAfter))
173173 then {
174174 let balanceDiff = (balanceAfter - balanceBefore)
175175 if ((balanceDiff == balanceDiff))
176176 then {
177177 let checkBalance = if ((balanceDiff == claimerUnclaimed))
178178 then true
179179 else throwErr("insufficient balance on referral contract")
180180 if ((checkBalance == checkBalance))
181181 then $Tuple2([IntegerEntry(keyClaimed, newClaimerClaimed), IntegerEntry(keyUnclaimed, 0), IntegerEntry(keyClaimedTotal(programName), newClaimedTotal), IntegerEntry(keyClaimedTotalAddress(claimerAddress), newClaimedTotalAddress), IntegerEntry(keyUnclaimedTotalAddress(claimerAddress), newUnclaimedTotalAddress), ScriptTransfer(addressFromStringValue(claimerAddress), claimerUnclaimed, rewardAssetId), StringEntry(claimHistoryKey, formatClaimHistory(claimerUnclaimed))], claimerUnclaimed)
182182 else throw("Strict value is not equal to itself.")
183183 }
184184 else throw("Strict value is not equal to itself.")
185185 }
186186 else throw("Strict value is not equal to itself.")
187187 }
188188 else throw("Strict value is not equal to itself.")
189189 }
190190 else throw("Strict value is not equal to itself.")
191191 }
192192 else throw("Strict value is not equal to itself.")
193193 }
194194 }
195195 else throw("Strict value is not equal to itself.")
196196 }
197197
198198
199199
200200 @Callable(i)
201201 func claimBulkInternal (claimer,programNames,currentIter) = {
202202 let checkCaller = if ((i.caller == this))
203203 then true
204204 else throwErr("permission denied")
205205 if ((checkCaller == checkCaller))
206206 then if ((currentIter == size(programNames)))
207207 then nil
208208 else {
209209 let programName = programNames[currentIter]
210210 let programUnclaimed = valueOrElse(getInteger(keyUnclaimedReferrer(programName, claimer)), 0)
211211 let claimHistoryKey = keyClaimHistory(programName, claimer, toBase58String(i.transactionId), "claimBulk")
212212 let claimBulkInternal = invoke(this, "claimBulkInternal", [claimer, programNames, (currentIter + 1)], nil)
213213 if ((claimBulkInternal == claimBulkInternal))
214214 then {
215215 let unclaimedReferrer = valueOrElse(getInteger(keyUnclaimedReferrer(programName, claimer)), 0)
216216 let claim = if ((unclaimedReferrer > 0))
217217 then invoke(this, "claimInternal", [programName, claimer, false], nil)
218218 else unit
219219 if ((claim == claim))
220220 then $Tuple2(nil, [claimBulkInternal, claim])
221221 else throw("Strict value is not equal to itself.")
222222 }
223223 else throw("Strict value is not equal to itself.")
224224 }
225225 else throw("Strict value is not equal to itself.")
226226 }
227227
228228
229229
230230 @Callable(i)
231231 func incUnclaimedWithPaymentInternal (paymentAmounts,programName,referrerAddresses,currentIter,resAmount) = {
232232 let checkCaller = if ((i.caller == this))
233233 then true
234234 else throwErr("permission denied")
235235 if ((checkCaller == checkCaller))
236236 then {
237237 let argsComparison = (size(paymentAmounts) == size(referrerAddresses))
238238 let check = if (argsComparison)
239239 then true
240240 else throwErr("lists in args must be same size")
241241 if ((check == check))
242242 then if ((currentIter == size(paymentAmounts)))
243243 then $Tuple2(nil, resAmount)
244244 else {
245245 let referrerAddress = referrerAddresses[currentIter]
246246 let unclaimedTotalAddress = valueOrElse(getInteger(keyUnclaimedTotalAddress(referrerAddress)), 0)
247247 let referrerUnclaimed = valueOrElse(getInteger(keyUnclaimedReferrer(programName, referrerAddress)), 0)
248248 let rewardsTotal = valueOrElse(getInteger(keyRewardsTotal(programName)), 0)
249249 let newUnclaimedTotalAddress = (unclaimedTotalAddress + paymentAmounts[currentIter])
250250 let newReferrerUnclaimed = (referrerUnclaimed + paymentAmounts[currentIter])
251251 let newResAmount = (resAmount + paymentAmounts[currentIter])
252252 let inv = invoke(this, "incUnclaimedWithPaymentInternal", [paymentAmounts, programName, referrerAddresses, (currentIter + 1), newResAmount], nil)
253253 if ((inv == inv))
254254 then {
255255 let updatedAllReferrerPrograms = updateAllReferralPrograms(referrerAddress, programName)
256256 $Tuple2(([IntegerEntry(keyUnclaimedTotalAddress(referrerAddress), newUnclaimedTotalAddress), IntegerEntry(keyUnclaimedReferrer(programName, referrerAddress), newReferrerUnclaimed), IntegerEntry(keyRewardsTotal(programName), (rewardsTotal + paymentAmounts[currentIter]))] ++ updatedAllReferrerPrograms), inv)
257257 }
258258 else throw("Strict value is not equal to itself.")
259259 }
260260 else throw("Strict value is not equal to itself.")
261261 }
262262 else throw("Strict value is not equal to itself.")
263263 }
264264
265265
266266
267267 @Callable(i)
268268 func createReferralProgram (programName,treasuryContract,implementationContract,rewardAssetId) = {
269269 let checkCaller = mustManager(i)
270270 if ((checkCaller == checkCaller))
271271 then {
272272 let checkProgramName = if ((getBoolean(keyProgramName(programName)) == unit))
273273 then true
274274 else throwErr("program name already exists")
275275 if ((checkProgramName == checkProgramName))
276276 then {
277277 let programNameIsValid = if (!(contains(programName, separator)))
278278 then !(contains(programName, " "))
279279 else false
280280 let checkProgramExists = if (programNameIsValid)
281281 then true
282282 else throwErr("invalid program name")
283283 if ((checkProgramExists == checkProgramExists))
284284 then {
285285 let checkRewardAsset = if ((assetInfo(fromBase58String(rewardAssetId)) != unit))
286286 then true
287287 else throwErr("invalid reward asset id")
288288 if ((checkRewardAsset == checkRewardAsset))
289289 then $Tuple2([BooleanEntry(keyProgramName(programName), true), StringEntry(keyTreasuryContract(programName), treasuryContract), StringEntry(keyImplementationContract(programName), implementationContract), StringEntry(keyRewardAssetId(programName), rewardAssetId), IntegerEntry(keyRewardsTotal(programName), 0)], unit)
290290 else throw("Strict value is not equal to itself.")
291291 }
292292 else throw("Strict value is not equal to itself.")
293293 }
294294 else throw("Strict value is not equal to itself.")
295295 }
296296 else throw("Strict value is not equal to itself.")
297297 }
298298
299299
300300
301301 @Callable(i)
302302 func createPair (programName,referrerAddress,referralAddress,signature) = {
303303 let checkProgramExists = if (valueOrElse(getBoolean(keyProgramName(programName)), false))
304304 then true
305305 else throwErr("program does not exist")
306306 if ((checkProgramExists == checkProgramExists))
307307 then {
308308 let pairReferrerToReferralExistCheck = if ((getBoolean(keyExistsReferrerToReferral(programName, referrerAddress, referralAddress)) == unit))
309309 then true
310310 else throwErr("pair already exists")
311311 if ((pairReferrerToReferralExistCheck == pairReferrerToReferralExistCheck))
312312 then {
313313 let noRefSelf = if ((referrerAddress != referralAddress))
314314 then true
315315 else throwErr("cannot refer to self")
316316 if ((noRefSelf == noRefSelf))
317317 then {
318318 let pair = toBytes(makeString([programName, referrerAddress, referralAddress], ":"))
319319 let backendPublicKey = fromBase58String(value(getString(keyBackendPublicKey)))
320320 let validateSignature = if (sigVerify(pair, signature, backendPublicKey))
321321 then true
322322 else throwErr("bad signature")
323323 if ((validateSignature == validateSignature))
324324 then {
325325 let totalReferralCount = valueOrElse(getInteger(keyTotalReferralCount(programName, referrerAddress)), 0)
326326 let newTotalReferralCount = (totalReferralCount + 1)
327327 let updatedAllReferrerPrograms = updateAllReferralPrograms(referrerAddress, programName)
328328 let updatedAllReferralPrograms = updateAllReferralPrograms(referralAddress, programName)
329329 $Tuple2((([BooleanEntry(keyExistsReferrerToReferral(programName, referrerAddress, referralAddress), true), IntegerEntry(keyTotalReferralCount(programName, referrerAddress), newTotalReferralCount), StringEntry(keyReferrer(programName, referralAddress), referrerAddress)] ++ updatedAllReferrerPrograms) ++ updatedAllReferralPrograms), unit)
330330 }
331331 else throw("Strict value is not equal to itself.")
332332 }
333333 else throw("Strict value is not equal to itself.")
334334 }
335335 else throw("Strict value is not equal to itself.")
336336 }
337337 else throw("Strict value is not equal to itself.")
338338 }
339339
340340
341341
342342 @Callable(i)
343343 func updateReferralActivity (programName,referralAddress,isActive) = {
344344 let implementationContract = value(getString(keyImplementationContract(programName)))
345345 let isReferralActive = (getBoolean(keyIsReferralActive(programName, referralAddress)) != unit)
346346 let referrerAddress = value(getString(keyReferrer(programName, referralAddress)))
347347 let checkCaller = if ((toString(i.caller) == implementationContract))
348348 then true
349349 else throwErr("permission denied")
350350 if ((checkCaller == checkCaller))
351351 then {
352352 let update = if ((isReferralActive == isActive))
353353 then $Tuple2(nil, unit)
354354 else {
355355 let update = if ((isActive == true))
356356 then {
357357 let newActiveReferralCount = (valueOrElse(getInteger(keyActiveReferralCount(programName, referrerAddress)), 0) + 1)
358358 $Tuple2([BooleanEntry(keyIsReferralActive(programName, referralAddress), true), IntegerEntry(keyActiveReferralCount(programName, referrerAddress), newActiveReferralCount)], unit)
359359 }
360360 else {
361361 let newActiveReferralCount = (valueOrElse(getInteger(keyActiveReferralCount(programName, referrerAddress)), 0) - 1)
362362 $Tuple2([DeleteEntry(keyIsReferralActive(programName, referralAddress)), IntegerEntry(keyActiveReferralCount(programName, referrerAddress), newActiveReferralCount)], unit)
363363 }
364364 update
365365 }
366366 update
367367 }
368368 else throw("Strict value is not equal to itself.")
369369 }
370370
371371
372372
373373 @Callable(i)
374374 func incUnclaimed (programName,referralAddress,referrerReward,referralReward) = {
375375 let implementationContract = value(getString(keyImplementationContract(programName)))
376376 let referrerAddress = value(getString(keyReferrer(programName, referralAddress)))
377377 let checkCaller = if ((toString(i.caller) == implementationContract))
378378 then true
379379 else throwErr("permission denied")
380380 if ((checkCaller == checkCaller))
381381 then {
382382 let checkProgram = if ((programName == "wxlock"))
383383 then true
384384 else throwErr("invalid program")
385385 if ((checkProgram == checkProgram))
386386 then {
387387 let checkReferrerInProgram = if (contains(valueOrElse(getString(keyAllReferralPrograms(referrerAddress)), ""), programName))
388388 then true
389389 else throwErr(((("referrer not in program=" + programName) + " addr=") + referrerAddress))
390390 if ((checkReferrerInProgram == checkReferrerInProgram))
391391 then {
392392 let checkReferralInProgram = if (contains(valueOrElse(getString(keyAllReferralPrograms(referralAddress)), ""), programName))
393393 then true
394394 else throwErr(((("referral not in program=" + programName) + " addr=") + referralAddress))
395395 if ((checkReferralInProgram == checkReferralInProgram))
396396 then {
397397 let unclaimedTotalReferrer = valueOrElse(getInteger(keyUnclaimedTotalAddress(referrerAddress)), 0)
398398 let referrerUnclaimed = valueOrElse(getInteger(keyUnclaimedReferrer(programName, referrerAddress)), 0)
399399 let unclaimedTotalReferral = valueOrElse(getInteger(keyUnclaimedTotalAddress(referralAddress)), 0)
400400 let referralUnclaimed = valueOrElse(getInteger(keyUnclaimedReferral(programName, referralAddress)), 0)
401401 let rewardsTotal = valueOrElse(getInteger(keyRewardsTotal(programName)), 0)
402402 let newUnclaimedTotalReferrer = (unclaimedTotalReferrer + referrerReward)
403403 let newReferrerUnclaimed = (referrerUnclaimed + referrerReward)
404404 let newUnclaimedTotalReferral = (unclaimedTotalReferral + referralReward)
405405 let newReferralUnclaimed = (referralUnclaimed + referralReward)
406406 $Tuple2([IntegerEntry(keyUnclaimedTotalAddress(referrerAddress), newUnclaimedTotalReferrer), IntegerEntry(keyUnclaimedTotalAddress(referralAddress), newUnclaimedTotalReferral), IntegerEntry(keyUnclaimedReferrer(programName, referrerAddress), newReferrerUnclaimed), IntegerEntry(keyUnclaimedReferral(programName, referralAddress), newReferralUnclaimed), IntegerEntry(keyRewardsTotal(programName), ((rewardsTotal + referrerReward) + referralReward))], unit)
407407 }
408408 else throw("Strict value is not equal to itself.")
409409 }
410410 else throw("Strict value is not equal to itself.")
411411 }
412412 else throw("Strict value is not equal to itself.")
413413 }
414414 else throw("Strict value is not equal to itself.")
415415 }
416416
417417
418418
419419 @Callable(i)
420420 func incUnclaimedWithPayment (programName,referrerAddresses) = {
421421 let checkProgram = if ((programName == "wxSpotFee"))
422422 then true
423423 else throwErr("invalid program")
424424 if ((checkProgram == checkProgram))
425425 then {
426426 func map (accum,next) = {
427427 let assetIdCheck = (toBase58String(value(next.assetId)) == value(getString(keyRewardAssetId(programName))))
428428 let amountCheck = if (assetIdCheck)
429429 then true
430430 else throwErr("invalid asset id")
431431 if ((amountCheck == amountCheck))
432432 then (accum :+ next.amount)
433433 else throw("Strict value is not equal to itself.")
434434 }
435435
436436 let payments = {
437437 let $l = i.payments
438438 let $s = size($l)
439439 let $acc0 = nil
440440 func $f0_1 ($a,$i) = if (($i >= $s))
441441 then $a
442442 else map($a, $l[$i])
443443
444444 func $f0_2 ($a,$i) = if (($i >= $s))
445445 then $a
446446 else throw("List size exceeds 10")
447447
448448 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
449449 }
450450 let resAmount = {
451451 let @ = invoke(this, "incUnclaimedWithPaymentInternal", [payments, programName, referrerAddresses, 0, 0], nil)
452452 if ($isInstanceOf(@, "Int"))
453453 then @
454454 else throw(($getType(@) + " couldn't be cast to Int"))
455455 }
456456 if ((resAmount == resAmount))
457457 then {
458458 let treasuryContract = addressFromStringValue(value(getString(keyTreasuryContract(programName))))
459459 let rewardAssetId = fromBase58String(value(getString(keyRewardAssetId(programName))))
460460 [ScriptTransfer(treasuryContract, resAmount, rewardAssetId)]
461461 }
462462 else throw("Strict value is not equal to itself.")
463463 }
464464 else throw("Strict value is not equal to itself.")
465465 }
466466
467467
468468
469469 @Callable(i)
470470 func claim (programName) = {
471471 let checkProgramExists = if (valueOrElse(getBoolean(keyProgramName(programName)), false))
472472 then true
473473 else throwErr("program does not exist")
474474 if ((checkProgramExists == checkProgramExists))
475475 then {
476476 let isImplementationContract = (toString(i.caller) == value(getString(keyImplementationContract(programName))))
477477 let claimerAddress = if (isImplementationContract)
478478 then toString(i.originCaller)
479479 else toString(i.caller)
480480 let claimInternal = invoke(this, "claimInternal", [programName, claimerAddress, isImplementationContract], nil)
481481 if ((claimInternal == claimInternal))
482482 then $Tuple2(nil, claimInternal)
483483 else throw("Strict value is not equal to itself.")
484484 }
485485 else throw("Strict value is not equal to itself.")
486486 }
487487
488488
489489
490490 @Callable(i)
491491 func claimBulk () = {
492492 let callerAddress = toString(i.caller)
493493 let callerProgramsStr = getString(keyAllReferralPrograms(toString(i.caller)))
494494 let programsExists = if (isDefined(callerProgramsStr))
495495 then true
496496 else throwErr("no referral programs")
497497 if ((programsExists == programsExists))
498498 then {
499499 let callerPrograms = split(value(callerProgramsStr), "__")
500500 let bulkClaim = invoke(this, "claimBulkInternal", [callerAddress, callerPrograms, 0], nil)
501501 if ((bulkClaim == bulkClaim))
502502 then $Tuple2(nil, bulkClaim)
503503 else throw("Strict value is not equal to itself.")
504504 }
505505 else throw("Strict value is not equal to itself.")
506506 }
507507
508508
509509
510510 @Callable(i)
511511 func claimREADONLY (programName,userAddress) = {
512512 let claimerClaimed = valueOrElse(getInteger(keyClaimedReferrer(programName, userAddress)), 0)
513513 let claimerUnclaimed = valueOrElse(getInteger(keyUnclaimedReferrer(programName, userAddress)), 0)
514514 $Tuple2(nil, [claimerUnclaimed, claimerClaimed])
515515 }
516516
517517
518518
519519 @Callable(i)
520520 func claimBulkREADONLY (claimer) = {
521521 let claimedTotalAddress = valueOrElse(getInteger(keyClaimedTotalAddress(claimer)), 0)
522522 let unclaimedTotalAddress = valueOrElse(getInteger(keyUnclaimedTotalAddress(claimer)), 0)
523523 $Tuple2(nil, [unclaimedTotalAddress, claimedTotalAddress])
524524 }
525525
526526
527527
528528 @Callable(i)
529529 func setTotalKeys (programName,address) = {
530530 let claimedReferrer = valueOrElse(getInteger(keyClaimedReferrer(programName, address)), 0)
531531 let claimedReferral = valueOrElse(getInteger(keyClaimedReferral(programName, address)), 0)
532532 let unclaimedReferrer = valueOrElse(getInteger(keyUnclaimedReferrer(programName, address)), 0)
533533 let unclaimedReferral = valueOrElse(getInteger(keyUnclaimedReferral(programName, address)), 0)
534534 let claimedTotalAddress = (claimedReferrer + claimedReferral)
535535 let unclaimedTotalAddress = (unclaimedReferrer + unclaimedReferral)
536536 $Tuple2([IntegerEntry(keyClaimedTotalAddress(address), claimedTotalAddress), IntegerEntry(keyUnclaimedTotalAddress(address), unclaimedTotalAddress)], unit)
537537 }
538538
539539
540540
541541 @Callable(i)
542542 func setManager (pendingManagerPublicKey) = {
543543 let checkCaller = mustManager(i)
544544 if ((checkCaller == checkCaller))
545545 then {
546546 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
547547 if ((checkManagerPublicKey == checkManagerPublicKey))
548548 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
549549 else throw("Strict value is not equal to itself.")
550550 }
551551 else throw("Strict value is not equal to itself.")
552552 }
553553
554554
555555
556556 @Callable(i)
557557 func confirmManager () = {
558558 let pm = pendingManagerPublicKeyOrUnit()
559559 let hasPM = if (isDefined(pm))
560560 then true
561561 else throwErr("no pending manager")
562562 if ((hasPM == hasPM))
563563 then {
564564 let checkPM = if ((i.callerPublicKey == value(pm)))
565565 then true
566566 else throwErr("you are not pending manager")
567567 if ((checkPM == checkPM))
568568 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
569569 else throw("Strict value is not equal to itself.")
570570 }
571571 else throw("Strict value is not equal to itself.")
572572 }
573573
574574
575575 @Verifier(tx)
576576 func verify () = {
577577 let targetPublicKey = match managerPublicKeyOrUnit() {
578578 case pk: ByteVector =>
579579 pk
580580 case _: Unit =>
581581 tx.senderPublicKey
582582 case _ =>
583583 throw("Match error")
584584 }
585585 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
586586 }
587587

github/deemru/w8io/026f985 
57.18 ms