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:BgIyCAISBQoDCAgIEgYKBAgICAISBQoDCAgEEgYKBAgIAQESAwoBCBIECgIICBIDCgEIEgAUAAlzZXBhcmF0b3ICAl9fABNrZXlCYWNrZW5kUHVibGljS2V5CQC5CQIJAMwIAgICJXMJAMwIAgIQYmFja2VuZFB1YmxpY0tleQUDbmlsBQlzZXBhcmF0b3IBG2tleUV4aXN0c1JlZmVycmVyVG9SZWZlcnJhbAMLcHJvZ3JhbU5hbWUPcmVmZXJyZXJBZGRyZXNzD3JlZmVycmFsQWRkcmVzcwkAuQkCCQDMCAICCCVzJXMlcyVzCQDMCAICGGV4aXN0c1JlZmVycmVyVG9SZWZlcnJhbAkAzAgCBQtwcm9ncmFtTmFtZQkAzAgCBQ9yZWZlcnJlckFkZHJlc3MJAMwIAgUPcmVmZXJyYWxBZGRyZXNzBQNuaWwFCXNlcGFyYXRvcgEKa2V5Q2xhaW1lZAILcHJvZ3JhbU5hbWUOY2xhaW1lckFkZHJlc3MJALkJAgkAzAgCAgglcyVzJXMlcwkAzAgCAgdjbGFpbWVkCQDMCAIFC3Byb2dyYW1OYW1lCQDMCAIFDmNsYWltZXJBZ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JAAACBQdjaGVja1BNBQdjaGVja1BNCQDMCAIJAQtTdHJpbmdFbnRyeQIJARNrZXlNYW5hZ2VyUHVibGljS2V5AAkA2AQBCQEFdmFsdWUBBQJwbQkAzAgCCQELRGVsZXRlRW50cnkBCQEaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkABQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkABA90YXJnZXRQdWJsaWNLZXkEByRtYXRjaDAJARZtYW5hZ2VyUHVibGljS2V5T3JVbml0AAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAJwawUHJG1hdGNoMAUCcGsDCQABAgUHJG1hdGNoMAIEVW5pdAgFAnR4D3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQ90YXJnZXRQdWJsaWNLZXnf2cSg", "chainId": 84, "height": 2158330, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4FPZ3eT275eDr3LBWrwprJStuQMLjGjhnohVNgPQ8Jb6 Next: 7oreTEse9T69bjn3AiR4u1nFZbDpVeUF7XeiiPxoxD2A Diff:
Old | New | Differences | |
---|---|---|---|
186 | 186 | if ((checkCaller == checkCaller)) | |
187 | 187 | then { | |
188 | 188 | let referrerAddress = value(getString(keyReferrer(programName, referralAddress))) | |
189 | - | let referrerUnclaimed = | |
190 | - | let referralUnclaimed = | |
189 | + | let referrerUnclaimed = valueOrElse(getInteger(keyUnclaimed(programName, referrerAddress)), 0) | |
190 | + | let referralUnclaimed = valueOrElse(getInteger(keyUnclaimed(programName, referralAddress)), 0) | |
191 | 191 | let newReferrerUnclaimed = (referrerUnclaimed + referrerReward) | |
192 | 192 | let newReferralUnclaimed = (referralUnclaimed + referralReward) | |
193 | 193 | $Tuple2([IntegerEntry(keyClaimed(programName, referralAddress), newReferrerUnclaimed), IntegerEntry(keyUnclaimed(programName, referralAddress), newReferralUnclaimed)], unit) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "__" | |
5 | 5 | ||
6 | 6 | let keyBackendPublicKey = makeString(["%s", "backendPublicKey"], separator) | |
7 | 7 | ||
8 | 8 | func keyExistsReferrerToReferral (programName,referrerAddress,referralAddress) = makeString(["%s%s%s%s", "existsReferrerToReferral", programName, referrerAddress, referralAddress], separator) | |
9 | 9 | ||
10 | 10 | ||
11 | 11 | func keyClaimed (programName,claimerAddress) = makeString(["%s%s%s%s", "claimed", programName, claimerAddress], separator) | |
12 | 12 | ||
13 | 13 | ||
14 | 14 | func keyUnclaimed (programName,claimerAddress) = makeString(["%s%s%s%s", "unclaimed", programName, claimerAddress], separator) | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func keyReferrer (programName,referralAddress) = makeString(["%s%s%s", "referrer", programName, referralAddress], separator) | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func keyProgramName (programName) = makeString(["%s%s", "programName", programName], separator) | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func keyTotalReferralCount (programName,referrerAddress) = makeString(["%s%s%s", "totalReferralCount", programName, referrerAddress], separator) | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func keyActiveReferralCount (programName,referrerAddress) = makeString(["%s%s%s", "activeReferralCount", programName, referrerAddress], separator) | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func keyIsReferralActive (programName,referralAddress) = makeString(["%s%s%s", "activeReferral", programName, referralAddress], separator) | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func keyClaimedTotal (programName) = makeString(["%s%s", "claimedTotal", programName], separator) | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func keyRewardAssetId (programName) = makeString(["%s%s", "rewardAssetId", programName], separator) | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func keyTreasuryContract (programName) = makeString(["%s%s", "treasuryContract", programName], separator) | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func keyImplementationContract (programName) = makeString(["%s%s", "implementationContract", programName], separator) | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func throwErr (msg) = throw(makeString(["referral.ride:", msg], " ")) | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
54 | 54 | case s: String => | |
55 | 55 | fromBase58String(s) | |
56 | 56 | case _: Unit => | |
57 | 57 | unit | |
58 | 58 | case _ => | |
59 | 59 | throw("Match error") | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
64 | 64 | case s: String => | |
65 | 65 | fromBase58String(s) | |
66 | 66 | case _: Unit => | |
67 | 67 | unit | |
68 | 68 | case _ => | |
69 | 69 | throw("Match error") | |
70 | 70 | } | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func mustManager (i) = { | |
74 | 74 | let pd = throwErr("permission denied") | |
75 | 75 | match managerPublicKeyOrUnit() { | |
76 | 76 | case pk: ByteVector => | |
77 | 77 | if ((i.callerPublicKey == pk)) | |
78 | 78 | then true | |
79 | 79 | else pd | |
80 | 80 | case _: Unit => | |
81 | 81 | if ((i.caller == this)) | |
82 | 82 | then true | |
83 | 83 | else pd | |
84 | 84 | case _ => | |
85 | 85 | throw("Match error") | |
86 | 86 | } | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | @Callable(i) | |
91 | 91 | func createReferralProgram (programName,treasuryContract,implementationContract) = { | |
92 | 92 | let checkCaller = mustManager(i) | |
93 | 93 | if ((checkCaller == checkCaller)) | |
94 | 94 | then { | |
95 | 95 | let checkProgramName = if ((getBoolean(keyProgramName(programName)) == unit)) | |
96 | 96 | then true | |
97 | 97 | else throwErr("program name already exists") | |
98 | 98 | if ((checkProgramName == checkProgramName)) | |
99 | 99 | then { | |
100 | 100 | let programNameIsValid = if (!(contains(programName, separator))) | |
101 | 101 | then !(contains(programName, " ")) | |
102 | 102 | else false | |
103 | 103 | let checkProgramExists = if (programNameIsValid) | |
104 | 104 | then true | |
105 | 105 | else throwErr("invalid program name") | |
106 | 106 | if ((checkProgramExists == checkProgramExists)) | |
107 | 107 | then $Tuple2([BooleanEntry(keyProgramName(programName), true), StringEntry(keyTreasuryContract(programName), treasuryContract), StringEntry(keyImplementationContract(programName), implementationContract)], unit) | |
108 | 108 | else throw("Strict value is not equal to itself.") | |
109 | 109 | } | |
110 | 110 | else throw("Strict value is not equal to itself.") | |
111 | 111 | } | |
112 | 112 | else throw("Strict value is not equal to itself.") | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | ||
117 | 117 | @Callable(i) | |
118 | 118 | func createPair (programName,referrerAddress,referralAddress,signature) = { | |
119 | 119 | let checkProgramExists = if (valueOrElse(getBoolean(keyProgramName(programName)), false)) | |
120 | 120 | then true | |
121 | 121 | else throwErr("program does not exist") | |
122 | 122 | if ((checkProgramExists == checkProgramExists)) | |
123 | 123 | then { | |
124 | 124 | let pairReferrerToReferralExistCheck = if ((getString(keyExistsReferrerToReferral(programName, referrerAddress, referralAddress)) == unit)) | |
125 | 125 | then true | |
126 | 126 | else throwErr("pair already exists") | |
127 | 127 | if ((pairReferrerToReferralExistCheck == pairReferrerToReferralExistCheck)) | |
128 | 128 | then { | |
129 | 129 | let pair = toBytes(makeString([programName, referrerAddress, referralAddress], ":")) | |
130 | 130 | let backendPublicKey = fromBase58String(value(getString(keyBackendPublicKey))) | |
131 | 131 | let validateSignature = if (sigVerify(pair, signature, backendPublicKey)) | |
132 | 132 | then true | |
133 | 133 | else throwErr("bad signature") | |
134 | 134 | if ((validateSignature == validateSignature)) | |
135 | 135 | then { | |
136 | 136 | let totalReferralCount = valueOrElse(getInteger(keyTotalReferralCount(programName, referrerAddress)), 0) | |
137 | 137 | let newTotalReferralCount = (totalReferralCount + 1) | |
138 | 138 | $Tuple2([BooleanEntry(keyExistsReferrerToReferral(programName, referrerAddress, referralAddress), true), IntegerEntry(keyTotalReferralCount(programName, referrerAddress), newTotalReferralCount), StringEntry(keyReferrer(programName, referralAddress), referrerAddress)], unit) | |
139 | 139 | } | |
140 | 140 | else throw("Strict value is not equal to itself.") | |
141 | 141 | } | |
142 | 142 | else throw("Strict value is not equal to itself.") | |
143 | 143 | } | |
144 | 144 | else throw("Strict value is not equal to itself.") | |
145 | 145 | } | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | ||
149 | 149 | @Callable(i) | |
150 | 150 | func updateReferralActivity (programName,referralAddress,isActive) = { | |
151 | 151 | let implementationContract = value(getString(keyImplementationContract(programName))) | |
152 | 152 | let isReferralActive = (getBoolean(keyIsReferralActive(programName, referralAddress)) != unit) | |
153 | 153 | let referrerAddress = value(getString(keyReferrer(programName, referralAddress))) | |
154 | 154 | let checkCaller = if ((toString(i.caller) == implementationContract)) | |
155 | 155 | then true | |
156 | 156 | else throwErr("permission denied") | |
157 | 157 | if ((checkCaller == checkCaller)) | |
158 | 158 | then { | |
159 | 159 | let update = if ((isReferralActive == isActive)) | |
160 | 160 | then $Tuple2(nil, unit) | |
161 | 161 | else { | |
162 | 162 | let update = if ((isActive == true)) | |
163 | 163 | then { | |
164 | 164 | let newActiveReferralCount = (valueOrElse(getInteger(keyActiveReferralCount(programName, referrerAddress)), 0) + 1) | |
165 | 165 | $Tuple2([BooleanEntry(keyIsReferralActive(programName, referralAddress), true), IntegerEntry(keyActiveReferralCount(programName, referrerAddress), newActiveReferralCount)], unit) | |
166 | 166 | } | |
167 | 167 | else { | |
168 | 168 | let newActiveReferralCount = (valueOrElse(getInteger(keyActiveReferralCount(programName, referrerAddress)), 0) - 1) | |
169 | 169 | $Tuple2([DeleteEntry(keyIsReferralActive(programName, referralAddress)), IntegerEntry(keyActiveReferralCount(programName, referrerAddress), newActiveReferralCount)], unit) | |
170 | 170 | } | |
171 | 171 | update | |
172 | 172 | } | |
173 | 173 | update | |
174 | 174 | } | |
175 | 175 | else throw("Strict value is not equal to itself.") | |
176 | 176 | } | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | ||
180 | 180 | @Callable(i) | |
181 | 181 | func incUnclaimed (programName,referralAddress,referrerReward,referralReward) = { | |
182 | 182 | let implementationContract = value(getString(keyImplementationContract(programName))) | |
183 | 183 | let checkCaller = if ((toString(i.caller) == implementationContract)) | |
184 | 184 | then true | |
185 | 185 | else throwErr("permission denied") | |
186 | 186 | if ((checkCaller == checkCaller)) | |
187 | 187 | then { | |
188 | 188 | let referrerAddress = value(getString(keyReferrer(programName, referralAddress))) | |
189 | - | let referrerUnclaimed = | |
190 | - | let referralUnclaimed = | |
189 | + | let referrerUnclaimed = valueOrElse(getInteger(keyUnclaimed(programName, referrerAddress)), 0) | |
190 | + | let referralUnclaimed = valueOrElse(getInteger(keyUnclaimed(programName, referralAddress)), 0) | |
191 | 191 | let newReferrerUnclaimed = (referrerUnclaimed + referrerReward) | |
192 | 192 | let newReferralUnclaimed = (referralUnclaimed + referralReward) | |
193 | 193 | $Tuple2([IntegerEntry(keyClaimed(programName, referralAddress), newReferrerUnclaimed), IntegerEntry(keyUnclaimed(programName, referralAddress), newReferralUnclaimed)], unit) | |
194 | 194 | } | |
195 | 195 | else throw("Strict value is not equal to itself.") | |
196 | 196 | } | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | ||
200 | 200 | @Callable(i) | |
201 | 201 | func claim (programName) = { | |
202 | 202 | let claimedTotal = value(getInteger(keyClaimedTotal(programName))) | |
203 | 203 | let claimerClaimed = value(getInteger(keyClaimed(programName, toString(i.caller)))) | |
204 | 204 | let claimerUnclaimed = value(getInteger(keyUnclaimed(programName, toString(i.caller)))) | |
205 | 205 | let treasuryContract = value(addressFromString(value(getString(keyTreasuryContract(programName))))) | |
206 | 206 | let rewardAssetId = fromBase58String(value(getString(keyRewardAssetId(programName)))) | |
207 | 207 | let checkCanClaim = if ((claimerUnclaimed > 0)) | |
208 | 208 | then true | |
209 | 209 | else throwErr("nothing to claim") | |
210 | 210 | if ((checkCanClaim == checkCanClaim)) | |
211 | 211 | then { | |
212 | 212 | let newClaimerClaimed = (claimerClaimed + claimerUnclaimed) | |
213 | 213 | let newClaimedTotal = (claimedTotal + claimerUnclaimed) | |
214 | 214 | let balanceBefore = value(assetBalance(this, rewardAssetId)) | |
215 | 215 | if ((balanceBefore == balanceBefore)) | |
216 | 216 | then { | |
217 | 217 | let res = invoke(treasuryContract, "withdrawReferralReward", [claimerUnclaimed], nil) | |
218 | 218 | if ((res == res)) | |
219 | 219 | then { | |
220 | 220 | let balanceAfter = value(assetBalance(this, rewardAssetId)) | |
221 | 221 | if ((balanceAfter == balanceAfter)) | |
222 | 222 | then { | |
223 | 223 | let balanceDiff = (balanceAfter - balanceBefore) | |
224 | 224 | if ((balanceDiff == balanceDiff)) | |
225 | 225 | then { | |
226 | 226 | let checkBalance = if ((balanceDiff == claimerUnclaimed)) | |
227 | 227 | then true | |
228 | 228 | else throwErr("insufficient balance on referral contract") | |
229 | 229 | if ((checkBalance == checkBalance)) | |
230 | 230 | 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) | |
231 | 231 | else throw("Strict value is not equal to itself.") | |
232 | 232 | } | |
233 | 233 | else throw("Strict value is not equal to itself.") | |
234 | 234 | } | |
235 | 235 | else throw("Strict value is not equal to itself.") | |
236 | 236 | } | |
237 | 237 | else throw("Strict value is not equal to itself.") | |
238 | 238 | } | |
239 | 239 | else throw("Strict value is not equal to itself.") | |
240 | 240 | } | |
241 | 241 | else throw("Strict value is not equal to itself.") | |
242 | 242 | } | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | ||
246 | 246 | @Callable(i) | |
247 | 247 | func claimREADONLY (programName,referralAddress) = { | |
248 | 248 | let claimerClaimed = value(getInteger(keyClaimed(programName, referralAddress))) | |
249 | 249 | let claimerUnclaimed = value(getInteger(keyUnclaimed(programName, referralAddress))) | |
250 | 250 | let newClaimerClaimed = (claimerClaimed + claimerUnclaimed) | |
251 | 251 | $Tuple2(nil, newClaimerClaimed) | |
252 | 252 | } | |
253 | 253 | ||
254 | 254 | ||
255 | 255 | ||
256 | 256 | @Callable(i) | |
257 | 257 | func setManager (pendingManagerPublicKey) = { | |
258 | 258 | let checkCaller = mustManager(i) | |
259 | 259 | if ((checkCaller == checkCaller)) | |
260 | 260 | then { | |
261 | 261 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
262 | 262 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
263 | 263 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
264 | 264 | else throw("Strict value is not equal to itself.") | |
265 | 265 | } | |
266 | 266 | else throw("Strict value is not equal to itself.") | |
267 | 267 | } | |
268 | 268 | ||
269 | 269 | ||
270 | 270 | ||
271 | 271 | @Callable(i) | |
272 | 272 | func confirmManager () = { | |
273 | 273 | let pm = pendingManagerPublicKeyOrUnit() | |
274 | 274 | let hasPM = if (isDefined(pm)) | |
275 | 275 | then true | |
276 | 276 | else throwErr("no pending manager") | |
277 | 277 | if ((hasPM == hasPM)) | |
278 | 278 | then { | |
279 | 279 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
280 | 280 | then true | |
281 | 281 | else throwErr("you are not pending manager") | |
282 | 282 | if ((checkPM == checkPM)) | |
283 | 283 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
284 | 284 | else throw("Strict value is not equal to itself.") | |
285 | 285 | } | |
286 | 286 | else throw("Strict value is not equal to itself.") | |
287 | 287 | } | |
288 | 288 | ||
289 | 289 | ||
290 | 290 | @Verifier(tx) | |
291 | 291 | func verify () = { | |
292 | 292 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
293 | 293 | case pk: ByteVector => | |
294 | 294 | pk | |
295 | 295 | case _: Unit => | |
296 | 296 | tx.senderPublicKey | |
297 | 297 | case _ => | |
298 | 298 | throw("Match error") | |
299 | 299 | } | |
300 | 300 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
301 | 301 | } | |
302 | 302 |
github/deemru/w8io/169f3d6 42.43 ms ◑