tx · Agy9bF4xqPBL3cMu2uDEkpo3LLg9xd5Lcda2KenXvhJk

3NAsFvuLwxz1iUtZ9fmhfmSN16r9NEsPqsh:  -0.01400000 Waves

2022.07.26 18:50 [2156972] smart account 3NAsFvuLwxz1iUtZ9fmhfmSN16r9NEsPqsh > SELF 0.00000000 Waves

{ "type": 13, "id": "Agy9bF4xqPBL3cMu2uDEkpo3LLg9xd5Lcda2KenXvhJk", "fee": 1400000, "feeAssetId": null, "timestamp": 1658850605677, "version": 1, "sender": "3NAsFvuLwxz1iUtZ9fmhfmSN16r9NEsPqsh", "senderPublicKey": "33fpjdpM9FMu87RZKePniPardKqQXM96sm7VhAk3JEVQ", "proofs": [ "4yuKSScnhT9vKSRqKusA1AMrSWsRRy7kDqksv187fyFLoBTS9yjGGz8Udx7Rsb9iadTopqAtRUbTfSmvNeZ3oF9v" ], "script": "base64:BgIyCAISBQoDCAgIEgYKBAgICAISBQoDCAgEEgYKBAgIAQESAwoBCBIECgIICBIDCgEIEgAUAAlzZXBhcmF0b3ICAl9fABNrZXlCYWNrZW5kUHVibGljS2V5CQC5CQIJAMwIAgICJXMJAMwIAgIQYmFja2VuZFB1bGJpY0tleQUDbmlsBQlzZXBhcmF0b3IBG2tleUV4aXN0c1JlZmVycmVyVG9SZWZlcnJhbAMLcHJvZ3JhbU5hbWUPcmVmZXJyZXJBZGRyZXNzD3JlZmVycmFsQWRkcmVzcwkAuQkCCQDMCAICCCVzJXMlcyVzCQDMCAICGGV4aXN0c1JlZmVycmVyVG9SZWZlcnJhbAkAzAgCBQtwcm9ncmFtTmFtZQkAzAgCBQ9yZWZlcnJlckFkZHJlc3MJAMwIAgUPcmVmZXJyYWxBZGRyZXNzBQNuaWwFCXNlcGFyYXRvcgEKa2V5Q2xhaW1lZAILcHJvZ3JhbU5hbWUOY2xhaW1lckFkZHJlc3MJALkJAgkAzAgCAgglcyVzJXMlcwkAzAgCAgdjbGFpbWVkCQDMCAIFC3Byb2dyYW1OYW1lCQDMCAIFD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vIGl0c2VsZi4BaQEOY29uZmlybU1hbmFnZXIABAJwbQkBHXBlbmRpbmdNYW5hZ2VyUHVibGljS2V5T3JVbml0AAQFaGFzUE0DCQEJaXNEZWZpbmVkAQUCcG0GCQEIdGhyb3dFcnIBAhJubyBwZW5kaW5nIG1hbmFnZXIDCQAAAgUFaGFzUE0FBWhhc1BNBAdjaGVja1BNAwkAAAIIBQFpD2NhbGxlclB1YmxpY0tleQkBBXZhbHVlAQUCcG0GCQEIdGhyb3dFcnIBAht5b3UgYXJlIG5vdCBwZW5kaW5nIG1hbmFnZXIDCQAAAgUHY2hlY2tQTQUHY2hlY2tQTQkAzAgCCQELU3RyaW5nRW50cnkCCQETa2V5TWFuYWdlclB1YmxpY0tleQAJANgEAQkBBXZhbHVlAQUCcG0JAMwIAgkBC0RlbGV0ZUVudHJ5AQkBGmtleVBlbmRpbmdNYW5hZ2VyUHVibGljS2V5AAUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJ0eAEGdmVyaWZ5AAQPdGFyZ2V0UHVibGljS2V5BAckbWF0Y2gwCQEWbWFuYWdlclB1YmxpY0tleU9yVW5pdAADCQABAgUHJG1hdGNoMAIKQnl0ZVZlY3RvcgQCcGsFByRtYXRjaDAFAnBrAwkAAQIFByRtYXRjaDACBFVuaXQIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUPdGFyZ2V0UHVibGljS2V5O9qiiA==", "chainId": 84, "height": 2156972, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5acnfoAU9CZCqooSmHi73jXLwaMraXiQBecBcKM6zvi7 Next: 2X75fJjWWvjP73CWsKSA7WinFVexpqgyGvNyG8TLuWxv Diff:
OldNewDifferences
9292 let checkCaller = mustManager(i)
9393 if ((checkCaller == checkCaller))
9494 then {
95- let checkProgramName = if ((getBoolean(programName) == true))
95+ let checkProgramName = if ((getBoolean(programName) == unit))
9696 then true
9797 else throwErr("program name already exists")
9898 if ((checkProgramName == checkProgramName))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = "__"
55
66 let keyBackendPublicKey = makeString(["%s", "backendPulbicKey"], 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 {
95- let checkProgramName = if ((getBoolean(programName) == true))
95+ let checkProgramName = if ((getBoolean(programName) == unit))
9696 then true
9797 else throwErr("program name already exists")
9898 if ((checkProgramName == checkProgramName))
9999 then $Tuple2([BooleanEntry(keyProgramName(programName), true), StringEntry(keyTreasuryContract(programName), treasuryContract), StringEntry(keyImplementationContract(programName), implementationContract)], unit)
100100 else throw("Strict value is not equal to itself.")
101101 }
102102 else throw("Strict value is not equal to itself.")
103103 }
104104
105105
106106
107107 @Callable(i)
108108 func createPair (programName,referrerAddress,referralAddress,signature) = {
109109 let pairReferrerToReferralExistCheck = if ((getString(keyExistsReferrerToReferral(programName, referrerAddress, referralAddress)) == unit))
110110 then true
111111 else throwErr("pair already exists")
112112 if ((pairReferrerToReferralExistCheck == pairReferrerToReferralExistCheck))
113113 then {
114114 let pair = toBytes(makeString([programName, referrerAddress, referralAddress], ":"))
115115 let backendPublicKey = toBytes(value(getString(keyBackendPublicKey)))
116116 let validateSignature = if (sigVerify(pair, signature, backendPublicKey))
117117 then true
118118 else throwErr("bad signature")
119119 if ((validateSignature == validateSignature))
120120 then {
121121 let totalReferralCount = valueOrElse(getInteger(keyTotalReferralCount(programName, referrerAddress)), 0)
122122 let newTotalReferralCount = (totalReferralCount + 1)
123123 $Tuple2([BooleanEntry(keyExistsReferrerToReferral(programName, referrerAddress, referralAddress), true), IntegerEntry(keyTotalReferralCount(programName, referrerAddress), newTotalReferralCount)], unit)
124124 }
125125 else throw("Strict value is not equal to itself.")
126126 }
127127 else throw("Strict value is not equal to itself.")
128128 }
129129
130130
131131
132132 @Callable(i)
133133 func updateReferralActivity (programName,referralAddress,isActive) = {
134134 let implementationContract = value(getString(keyImplementationContract(programName)))
135135 let isReferralActive = (getBoolean(keyIsReferralActive(programName, referralAddress)) != unit)
136136 let referrerAddress = value(getString(keyReferrer(programName, referralAddress)))
137137 let checkCaller = if ((toString(i.caller) == implementationContract))
138138 then true
139139 else throwErr("permission denied")
140140 if ((checkCaller == checkCaller))
141141 then {
142142 let update = if ((isReferralActive == isActive))
143143 then $Tuple2(nil, unit)
144144 else {
145145 let update = if ((isActive == true))
146146 then {
147147 let newActiveReferralCount = (valueOrElse(getInteger(keyActiveReferralCount(programName, referrerAddress)), 0) + 1)
148148 $Tuple2([BooleanEntry(keyIsReferralActive(programName, referralAddress), true), IntegerEntry(keyActiveReferralCount(programName, referrerAddress), newActiveReferralCount)], unit)
149149 }
150150 else {
151151 let newActiveReferralCount = (valueOrElse(getInteger(keyActiveReferralCount(programName, referrerAddress)), 0) - 1)
152152 $Tuple2([DeleteEntry(keyIsReferralActive(programName, referralAddress)), IntegerEntry(keyActiveReferralCount(programName, referrerAddress), newActiveReferralCount)], unit)
153153 }
154154 update
155155 }
156156 update
157157 }
158158 else throw("Strict value is not equal to itself.")
159159 }
160160
161161
162162
163163 @Callable(i)
164164 func incUnclaimed (programName,referralAddress,referrerReward,referralReward) = {
165165 let implementationContract = value(getString(keyImplementationContract(programName)))
166166 let checkCaller = if ((toString(i.caller) == implementationContract))
167167 then true
168168 else throwErr("permission denied")
169169 if ((checkCaller == checkCaller))
170170 then {
171171 let referrerAddress = value(getString(keyReferrer(programName, referralAddress)))
172172 let referrerUnclaimed = value(getInteger(keyUnclaimed(programName, referrerAddress)))
173173 let referralUnclaimed = value(getInteger(keyUnclaimed(programName, referralAddress)))
174174 let newReferrerUnclaimed = (referrerUnclaimed + referrerReward)
175175 let newReferralUnclaimed = (referralUnclaimed + referralReward)
176176 $Tuple2([IntegerEntry(keyClaimed(programName, referralAddress), newReferrerUnclaimed), IntegerEntry(keyUnclaimed(programName, referralAddress), newReferralUnclaimed)], unit)
177177 }
178178 else throw("Strict value is not equal to itself.")
179179 }
180180
181181
182182
183183 @Callable(i)
184184 func claim (programName) = {
185185 let claimedTotal = value(getInteger(keyClaimedTotal(programName)))
186186 let claimerClaimed = value(getInteger(keyClaimed(programName, toString(i.caller))))
187187 let claimerUnclaimed = value(getInteger(keyUnclaimed(programName, toString(i.caller))))
188188 let treasuryContract = value(addressFromString(value(getString(keyTreasuryContract(programName)))))
189189 let rewardAssetId = fromBase58String(value(getString(keyRewardAssetId(programName))))
190190 let checkCanClaim = if ((claimerUnclaimed > 0))
191191 then true
192192 else throwErr("nothing to claim")
193193 if ((checkCanClaim == checkCanClaim))
194194 then {
195195 let newClaimerClaimed = (claimerClaimed + claimerUnclaimed)
196196 let newClaimedTotal = (claimedTotal + claimerUnclaimed)
197197 let balanceBefore = value(assetBalance(this, rewardAssetId))
198198 if ((balanceBefore == balanceBefore))
199199 then {
200200 let res = invoke(treasuryContract, "withdrawReferralReward", [claimerUnclaimed], nil)
201201 if ((res == res))
202202 then {
203203 let balanceAfter = value(assetBalance(this, rewardAssetId))
204204 if ((balanceAfter == balanceAfter))
205205 then {
206206 let balanceDiff = (balanceAfter - balanceBefore)
207207 if ((balanceDiff == balanceDiff))
208208 then {
209209 let checkBalance = if ((balanceDiff == claimerUnclaimed))
210210 then true
211211 else throwErr("insufficient balance on referral contract")
212212 if ((checkBalance == checkBalance))
213213 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)
214214 else throw("Strict value is not equal to itself.")
215215 }
216216 else throw("Strict value is not equal to itself.")
217217 }
218218 else throw("Strict value is not equal to itself.")
219219 }
220220 else throw("Strict value is not equal to itself.")
221221 }
222222 else throw("Strict value is not equal to itself.")
223223 }
224224 else throw("Strict value is not equal to itself.")
225225 }
226226
227227
228228
229229 @Callable(i)
230230 func claimREADONLY (programName,referralAddress) = {
231231 let claimerClaimed = value(getInteger(keyClaimed(programName, referralAddress)))
232232 let claimerUnclaimed = value(getInteger(keyUnclaimed(programName, referralAddress)))
233233 let newClaimerClaimed = (claimerClaimed + claimerUnclaimed)
234234 $Tuple2(nil, newClaimerClaimed)
235235 }
236236
237237
238238
239239 @Callable(i)
240240 func setManager (pendingManagerPublicKey) = {
241241 let checkCaller = mustManager(i)
242242 if ((checkCaller == checkCaller))
243243 then {
244244 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
245245 if ((checkManagerPublicKey == checkManagerPublicKey))
246246 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
247247 else throw("Strict value is not equal to itself.")
248248 }
249249 else throw("Strict value is not equal to itself.")
250250 }
251251
252252
253253
254254 @Callable(i)
255255 func confirmManager () = {
256256 let pm = pendingManagerPublicKeyOrUnit()
257257 let hasPM = if (isDefined(pm))
258258 then true
259259 else throwErr("no pending manager")
260260 if ((hasPM == hasPM))
261261 then {
262262 let checkPM = if ((i.callerPublicKey == value(pm)))
263263 then true
264264 else throwErr("you are not pending manager")
265265 if ((checkPM == checkPM))
266266 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
267267 else throw("Strict value is not equal to itself.")
268268 }
269269 else throw("Strict value is not equal to itself.")
270270 }
271271
272272
273273 @Verifier(tx)
274274 func verify () = {
275275 let targetPublicKey = match managerPublicKeyOrUnit() {
276276 case pk: ByteVector =>
277277 pk
278278 case _: Unit =>
279279 tx.senderPublicKey
280280 case _ =>
281281 throw("Match error")
282282 }
283283 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
284284 }
285285

github/deemru/w8io/026f985 
53.23 ms