tx · 4CyWnUNPZw39UtupWS9fH9osYhXVF7sxhnEJPniUoev6

3NAsFvuLwxz1iUtZ9fmhfmSN16r9NEsPqsh:  -0.01400000 Waves

2022.07.27 17:12 [2158330] smart account 3NAsFvuLwxz1iUtZ9fmhfmSN16r9NEsPqsh > SELF 0.00000000 Waves

{ "type": 13, "id": "4CyWnUNPZw39UtupWS9fH9osYhXVF7sxhnEJPniUoev6", "fee": 1400000, "feeAssetId": null, "timestamp": 1658931188900, "version": 1, "sender": "3NAsFvuLwxz1iUtZ9fmhfmSN16r9NEsPqsh", "senderPublicKey": "33fpjdpM9FMu87RZKePniPardKqQXM96sm7VhAk3JEVQ", "proofs": [ "MxrsByMniLHwDVe5R8pF9PxqebHTspZYQ12XVuZbnxQUUGUWB39WBJk7BGwro9xyg1ytTW3g6ynCry6WiXAfHk6" ], "script": "base64:BgIyCAISBQoDCAgIEgYKBAgICAISBQoDCAgEEgYKBAgIAQESAwoBCBIECgIICBIDCgEIEgAUAAlzZXBhcmF0b3ICAl9fABNrZXlCYWNrZW5kUHVibGljS2V5CQC5CQIJAMwIAgICJXMJAMwIAgIQYmFja2VuZFB1YmxpY0tleQUDbmlsBQlzZXBhcmF0b3IBG2tleUV4aXN0c1JlZmVycmVyVG9SZWZlcnJhbAMLcHJvZ3JhbU5hbWUPcmVmZXJyZXJBZGRyZXNzD3JlZmVycmFsQWRkcmVzcwkAuQkCCQDMCAICCCVzJXMlcyVzCQDMCAICGGV4aXN0c1JlZmVycmVyVG9SZWZlcnJhbAkAzAgCBQtwcm9ncmFtTmFtZQkAzAgCBQ9yZWZlcnJlckFkZHJlc3MJAMwIAgUPcmVmZXJyYWxBZGRyZXNzBQNuaWwFCXNlcGFyYXRvcgEKa2V5Q2xhaW1lZAILcHJvZ3JhbU5hbWUOY2xhaW1lckFkZHJlc3MJALkJAgkAzAgCAgglcyVzJXMlcwkAzAgCAgdjbGFpbWVkCQDMCAIFC3Byb2dyYW1OYW1lCQDMCAIFDmNsYWltZXJB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MJAAACBQdjaGVja1BNBQdjaGVja1BNCQDMCAIJAQtTdHJpbmdFbnRyeQIJARNrZXlNYW5hZ2VyUHVibGljS2V5AAkA2AQBCQEFdmFsdWUBBQJwbQkAzAgCCQELRGVsZXRlRW50cnkBCQEaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkABQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkABA90YXJnZXRQdWJsaWNLZXkEByRtYXRjaDAJARZtYW5hZ2VyUHVibGljS2V5T3JVbml0AAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAJwawUHJG1hdGNoMAUCcGsDCQABAgUHJG1hdGNoMAIEVW5pdAgFAnR4D3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQ90YXJnZXRQdWJsaWNLZXnf2cSg", "chainId": 84, "height": 2158330, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4FPZ3eT275eDr3LBWrwprJStuQMLjGjhnohVNgPQ8Jb6 Next: 7oreTEse9T69bjn3AiR4u1nFZbDpVeUF7XeiiPxoxD2A Diff:
OldNewDifferences
186186 if ((checkCaller == checkCaller))
187187 then {
188188 let referrerAddress = value(getString(keyReferrer(programName, referralAddress)))
189- let referrerUnclaimed = value(getInteger(keyUnclaimed(programName, referrerAddress)))
190- let referralUnclaimed = value(getInteger(keyUnclaimed(programName, referralAddress)))
189+ let referrerUnclaimed = valueOrElse(getInteger(keyUnclaimed(programName, referrerAddress)), 0)
190+ let referralUnclaimed = valueOrElse(getInteger(keyUnclaimed(programName, referralAddress)), 0)
191191 let newReferrerUnclaimed = (referrerUnclaimed + referrerReward)
192192 let newReferralUnclaimed = (referralUnclaimed + referralReward)
193193 $Tuple2([IntegerEntry(keyClaimed(programName, referralAddress), newReferrerUnclaimed), IntegerEntry(keyUnclaimed(programName, referralAddress), newReferralUnclaimed)], unit)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = "__"
55
66 let keyBackendPublicKey = makeString(["%s", "backendPublicKey"], separator)
77
88 func keyExistsReferrerToReferral (programName,referrerAddress,referralAddress) = makeString(["%s%s%s%s", "existsReferrerToReferral", programName, referrerAddress, referralAddress], separator)
99
1010
1111 func keyClaimed (programName,claimerAddress) = makeString(["%s%s%s%s", "claimed", programName, claimerAddress], separator)
1212
1313
1414 func keyUnclaimed (programName,claimerAddress) = makeString(["%s%s%s%s", "unclaimed", programName, claimerAddress], separator)
1515
1616
1717 func keyReferrer (programName,referralAddress) = makeString(["%s%s%s", "referrer", programName, referralAddress], separator)
1818
1919
2020 func keyProgramName (programName) = makeString(["%s%s", "programName", programName], separator)
2121
2222
2323 func keyTotalReferralCount (programName,referrerAddress) = makeString(["%s%s%s", "totalReferralCount", programName, referrerAddress], separator)
2424
2525
2626 func keyActiveReferralCount (programName,referrerAddress) = makeString(["%s%s%s", "activeReferralCount", programName, referrerAddress], separator)
2727
2828
2929 func keyIsReferralActive (programName,referralAddress) = makeString(["%s%s%s", "activeReferral", programName, referralAddress], separator)
3030
3131
3232 func keyClaimedTotal (programName) = makeString(["%s%s", "claimedTotal", programName], separator)
3333
3434
3535 func keyRewardAssetId (programName) = makeString(["%s%s", "rewardAssetId", programName], separator)
3636
3737
3838 func keyTreasuryContract (programName) = makeString(["%s%s", "treasuryContract", programName], separator)
3939
4040
4141 func keyImplementationContract (programName) = makeString(["%s%s", "implementationContract", programName], separator)
4242
4343
4444 func keyManagerPublicKey () = "%s__managerPublicKey"
4545
4646
4747 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
4848
4949
5050 func throwErr (msg) = throw(makeString(["referral.ride:", msg], " "))
5151
5252
5353 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
5454 case s: String =>
5555 fromBase58String(s)
5656 case _: Unit =>
5757 unit
5858 case _ =>
5959 throw("Match error")
6060 }
6161
6262
6363 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
6464 case s: String =>
6565 fromBase58String(s)
6666 case _: Unit =>
6767 unit
6868 case _ =>
6969 throw("Match error")
7070 }
7171
7272
7373 func mustManager (i) = {
7474 let pd = throwErr("permission denied")
7575 match managerPublicKeyOrUnit() {
7676 case pk: ByteVector =>
7777 if ((i.callerPublicKey == pk))
7878 then true
7979 else pd
8080 case _: Unit =>
8181 if ((i.caller == this))
8282 then true
8383 else pd
8484 case _ =>
8585 throw("Match error")
8686 }
8787 }
8888
8989
9090 @Callable(i)
9191 func createReferralProgram (programName,treasuryContract,implementationContract) = {
9292 let checkCaller = mustManager(i)
9393 if ((checkCaller == checkCaller))
9494 then {
9595 let checkProgramName = if ((getBoolean(keyProgramName(programName)) == unit))
9696 then true
9797 else throwErr("program name already exists")
9898 if ((checkProgramName == checkProgramName))
9999 then {
100100 let programNameIsValid = if (!(contains(programName, separator)))
101101 then !(contains(programName, " "))
102102 else false
103103 let checkProgramExists = if (programNameIsValid)
104104 then true
105105 else throwErr("invalid program name")
106106 if ((checkProgramExists == checkProgramExists))
107107 then $Tuple2([BooleanEntry(keyProgramName(programName), true), StringEntry(keyTreasuryContract(programName), treasuryContract), StringEntry(keyImplementationContract(programName), implementationContract)], unit)
108108 else throw("Strict value is not equal to itself.")
109109 }
110110 else throw("Strict value is not equal to itself.")
111111 }
112112 else throw("Strict value is not equal to itself.")
113113 }
114114
115115
116116
117117 @Callable(i)
118118 func createPair (programName,referrerAddress,referralAddress,signature) = {
119119 let checkProgramExists = if (valueOrElse(getBoolean(keyProgramName(programName)), false))
120120 then true
121121 else throwErr("program does not exist")
122122 if ((checkProgramExists == checkProgramExists))
123123 then {
124124 let pairReferrerToReferralExistCheck = if ((getString(keyExistsReferrerToReferral(programName, referrerAddress, referralAddress)) == unit))
125125 then true
126126 else throwErr("pair already exists")
127127 if ((pairReferrerToReferralExistCheck == pairReferrerToReferralExistCheck))
128128 then {
129129 let pair = toBytes(makeString([programName, referrerAddress, referralAddress], ":"))
130130 let backendPublicKey = fromBase58String(value(getString(keyBackendPublicKey)))
131131 let validateSignature = if (sigVerify(pair, signature, backendPublicKey))
132132 then true
133133 else throwErr("bad signature")
134134 if ((validateSignature == validateSignature))
135135 then {
136136 let totalReferralCount = valueOrElse(getInteger(keyTotalReferralCount(programName, referrerAddress)), 0)
137137 let newTotalReferralCount = (totalReferralCount + 1)
138138 $Tuple2([BooleanEntry(keyExistsReferrerToReferral(programName, referrerAddress, referralAddress), true), IntegerEntry(keyTotalReferralCount(programName, referrerAddress), newTotalReferralCount), StringEntry(keyReferrer(programName, referralAddress), referrerAddress)], unit)
139139 }
140140 else throw("Strict value is not equal to itself.")
141141 }
142142 else throw("Strict value is not equal to itself.")
143143 }
144144 else throw("Strict value is not equal to itself.")
145145 }
146146
147147
148148
149149 @Callable(i)
150150 func updateReferralActivity (programName,referralAddress,isActive) = {
151151 let implementationContract = value(getString(keyImplementationContract(programName)))
152152 let isReferralActive = (getBoolean(keyIsReferralActive(programName, referralAddress)) != unit)
153153 let referrerAddress = value(getString(keyReferrer(programName, referralAddress)))
154154 let checkCaller = if ((toString(i.caller) == implementationContract))
155155 then true
156156 else throwErr("permission denied")
157157 if ((checkCaller == checkCaller))
158158 then {
159159 let update = if ((isReferralActive == isActive))
160160 then $Tuple2(nil, unit)
161161 else {
162162 let update = if ((isActive == true))
163163 then {
164164 let newActiveReferralCount = (valueOrElse(getInteger(keyActiveReferralCount(programName, referrerAddress)), 0) + 1)
165165 $Tuple2([BooleanEntry(keyIsReferralActive(programName, referralAddress), true), IntegerEntry(keyActiveReferralCount(programName, referrerAddress), newActiveReferralCount)], unit)
166166 }
167167 else {
168168 let newActiveReferralCount = (valueOrElse(getInteger(keyActiveReferralCount(programName, referrerAddress)), 0) - 1)
169169 $Tuple2([DeleteEntry(keyIsReferralActive(programName, referralAddress)), IntegerEntry(keyActiveReferralCount(programName, referrerAddress), newActiveReferralCount)], unit)
170170 }
171171 update
172172 }
173173 update
174174 }
175175 else throw("Strict value is not equal to itself.")
176176 }
177177
178178
179179
180180 @Callable(i)
181181 func incUnclaimed (programName,referralAddress,referrerReward,referralReward) = {
182182 let implementationContract = value(getString(keyImplementationContract(programName)))
183183 let checkCaller = if ((toString(i.caller) == implementationContract))
184184 then true
185185 else throwErr("permission denied")
186186 if ((checkCaller == checkCaller))
187187 then {
188188 let referrerAddress = value(getString(keyReferrer(programName, referralAddress)))
189- let referrerUnclaimed = value(getInteger(keyUnclaimed(programName, referrerAddress)))
190- let referralUnclaimed = value(getInteger(keyUnclaimed(programName, referralAddress)))
189+ let referrerUnclaimed = valueOrElse(getInteger(keyUnclaimed(programName, referrerAddress)), 0)
190+ let referralUnclaimed = valueOrElse(getInteger(keyUnclaimed(programName, referralAddress)), 0)
191191 let newReferrerUnclaimed = (referrerUnclaimed + referrerReward)
192192 let newReferralUnclaimed = (referralUnclaimed + referralReward)
193193 $Tuple2([IntegerEntry(keyClaimed(programName, referralAddress), newReferrerUnclaimed), IntegerEntry(keyUnclaimed(programName, referralAddress), newReferralUnclaimed)], unit)
194194 }
195195 else throw("Strict value is not equal to itself.")
196196 }
197197
198198
199199
200200 @Callable(i)
201201 func claim (programName) = {
202202 let claimedTotal = value(getInteger(keyClaimedTotal(programName)))
203203 let claimerClaimed = value(getInteger(keyClaimed(programName, toString(i.caller))))
204204 let claimerUnclaimed = value(getInteger(keyUnclaimed(programName, toString(i.caller))))
205205 let treasuryContract = value(addressFromString(value(getString(keyTreasuryContract(programName)))))
206206 let rewardAssetId = fromBase58String(value(getString(keyRewardAssetId(programName))))
207207 let checkCanClaim = if ((claimerUnclaimed > 0))
208208 then true
209209 else throwErr("nothing to claim")
210210 if ((checkCanClaim == checkCanClaim))
211211 then {
212212 let newClaimerClaimed = (claimerClaimed + claimerUnclaimed)
213213 let newClaimedTotal = (claimedTotal + claimerUnclaimed)
214214 let balanceBefore = value(assetBalance(this, rewardAssetId))
215215 if ((balanceBefore == balanceBefore))
216216 then {
217217 let res = invoke(treasuryContract, "withdrawReferralReward", [claimerUnclaimed], nil)
218218 if ((res == res))
219219 then {
220220 let balanceAfter = value(assetBalance(this, rewardAssetId))
221221 if ((balanceAfter == balanceAfter))
222222 then {
223223 let balanceDiff = (balanceAfter - balanceBefore)
224224 if ((balanceDiff == balanceDiff))
225225 then {
226226 let checkBalance = if ((balanceDiff == claimerUnclaimed))
227227 then true
228228 else throwErr("insufficient balance on referral contract")
229229 if ((checkBalance == checkBalance))
230230 then $Tuple2([IntegerEntry(keyClaimed(programName, toString(i.caller)), newClaimerClaimed), IntegerEntry(keyClaimedTotal(programName), newClaimedTotal), IntegerEntry(keyUnclaimed(programName, toString(i.caller)), 0), ScriptTransfer(i.caller, claimerUnclaimed, rewardAssetId)], unit)
231231 else throw("Strict value is not equal to itself.")
232232 }
233233 else throw("Strict value is not equal to itself.")
234234 }
235235 else throw("Strict value is not equal to itself.")
236236 }
237237 else throw("Strict value is not equal to itself.")
238238 }
239239 else throw("Strict value is not equal to itself.")
240240 }
241241 else throw("Strict value is not equal to itself.")
242242 }
243243
244244
245245
246246 @Callable(i)
247247 func claimREADONLY (programName,referralAddress) = {
248248 let claimerClaimed = value(getInteger(keyClaimed(programName, referralAddress)))
249249 let claimerUnclaimed = value(getInteger(keyUnclaimed(programName, referralAddress)))
250250 let newClaimerClaimed = (claimerClaimed + claimerUnclaimed)
251251 $Tuple2(nil, newClaimerClaimed)
252252 }
253253
254254
255255
256256 @Callable(i)
257257 func setManager (pendingManagerPublicKey) = {
258258 let checkCaller = mustManager(i)
259259 if ((checkCaller == checkCaller))
260260 then {
261261 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
262262 if ((checkManagerPublicKey == checkManagerPublicKey))
263263 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
264264 else throw("Strict value is not equal to itself.")
265265 }
266266 else throw("Strict value is not equal to itself.")
267267 }
268268
269269
270270
271271 @Callable(i)
272272 func confirmManager () = {
273273 let pm = pendingManagerPublicKeyOrUnit()
274274 let hasPM = if (isDefined(pm))
275275 then true
276276 else throwErr("no pending manager")
277277 if ((hasPM == hasPM))
278278 then {
279279 let checkPM = if ((i.callerPublicKey == value(pm)))
280280 then true
281281 else throwErr("you are not pending manager")
282282 if ((checkPM == checkPM))
283283 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
284284 else throw("Strict value is not equal to itself.")
285285 }
286286 else throw("Strict value is not equal to itself.")
287287 }
288288
289289
290290 @Verifier(tx)
291291 func verify () = {
292292 let targetPublicKey = match managerPublicKeyOrUnit() {
293293 case pk: ByteVector =>
294294 pk
295295 case _: Unit =>
296296 tx.senderPublicKey
297297 case _ =>
298298 throw("Match error")
299299 }
300300 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
301301 }
302302

github/deemru/w8io/169f3d6 
42.43 ms