tx · BATTZ59GaiXtJc1DcH9SQ7z7wcMQ2jw8Kgro5XJVSAcW 3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp: -0.01400000 Waves 2021.05.13 13:08 [1523756] smart account 3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp > SELF 0.00000000 Waves
{ "type": 13, "id": "BATTZ59GaiXtJc1DcH9SQ7z7wcMQ2jw8Kgro5XJVSAcW", "fee": 1400000, "feeAssetId": null, "timestamp": 1620900525574, "version": 2, "chainId": 84, "sender": "3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp", "senderPublicKey": "ECgJ5aXMvEomM6yWA4tsqXdM3az7ddLr4cLr3yNJwJUb", "proofs": [ "25g2FC3GCempssVEggAScChVdC2cm8Pmk7nTwm8WQo6uSUaK6H3pCAEydP2Xsi5u3dX5CeRRNGHvFVcj3SFPfcQL" ], "script": "base64:AAIEAAAAAAAAADMIAhIDCgEIEgUKAwgBCBIGCgQIAQEIEggKBggBAQEICBIRCg8ICAgIAQgBCAEIAQgBCAEAAAABAQAAAAdjdXJyZW50AAAAAQAAAAFpBAAAAANwbXQJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAADCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQACWAAAAAEJAQAAAAV2YWx1ZQAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAIAAAAFV0FWRVMAAAAFAAAAAWkBAAAAFXJhbmtpbmdTcG9uc29yRGVwb3NpdAAAAAEAAAAObW9udGhUaW1lc3RhbXAEAAAAA3BtdAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAAJY3VycmVudElkCQEAAAAHY3VycmVudAAAAAEFAAAAAWkEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAAA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AQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAD25lYXJwaW4xYWRkcmVzcwUAAAAObmVhcnBpbjFhbW91bnQFAAAADmN1cnJlbnRBc3NldElkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAD25lYXJwaW4yYWRkcmVzcwUAAAAObmVhcnBpbjJhbW91bnQFAAAADmN1cnJlbnRBc3NldElkBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQJayjY=", "height": 1523756, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FharT9PjBWzg1BiAB8tAwhCaC3m7zxncqZ8imNHFU34v Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = { | |
5 | 5 | let c = b.payments[0] | |
6 | 6 | if (isDefined(c.assetId)) | |
7 | 7 | then toBase58String(value(c.assetId)) | |
8 | 8 | else "WAVES" | |
9 | 9 | } | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | @Callable(b) | |
13 | 13 | func rankingSponsorDeposit (d) = { | |
14 | 14 | let c = b.payments[0] | |
15 | 15 | let e = a(b) | |
16 | 16 | let f = toBase58String(b.caller.bytes) | |
17 | 17 | let g = { | |
18 | 18 | let h = getInteger(this, ((((("ranking-sponsor_" + f) + "_") + e) + "_") + d)) | |
19 | 19 | if ($isInstanceOf(h, "Int")) | |
20 | 20 | then { | |
21 | 21 | let i = h | |
22 | 22 | i | |
23 | 23 | } | |
24 | 24 | else 0 | |
25 | 25 | } | |
26 | 26 | let j = (g + c.amount) | |
27 | 27 | let k = { | |
28 | 28 | let h = getInteger(this, ((("ranking-sponsor_" + e) + "_") + d)) | |
29 | 29 | if ($isInstanceOf(h, "Int")) | |
30 | 30 | then { | |
31 | 31 | let i = h | |
32 | 32 | i | |
33 | 33 | } | |
34 | 34 | else 0 | |
35 | 35 | } | |
36 | 36 | let l = (k + c.amount) | |
37 | 37 | [IntegerEntry(((((("ranking-sponsor_" + f) + "_") + e) + "_") + d), j), IntegerEntry(((("ranking-sponsor_" + e) + "_") + d), l)] | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | ||
42 | 42 | @Callable(b) | |
43 | 43 | func rankingSponsorWithdraw (d,m,n) = { | |
44 | 44 | let f = toBase58String(b.caller.bytes) | |
45 | 45 | let o = fromBase58String(n) | |
46 | 46 | let g = { | |
47 | 47 | let h = getInteger(this, ((((("ranking-sponsor_" + f) + "_") + n) + "_") + d)) | |
48 | 48 | if ($isInstanceOf(h, "Int")) | |
49 | 49 | then { | |
50 | 50 | let i = h | |
51 | 51 | i | |
52 | 52 | } | |
53 | 53 | else 0 | |
54 | 54 | } | |
55 | 55 | let j = (g - m) | |
56 | 56 | let p = { | |
57 | 57 | let h = getInteger(this, ((("ranking-sponsor_" + n) + "_") + d)) | |
58 | 58 | if ($isInstanceOf(h, "Int")) | |
59 | 59 | then { | |
60 | 60 | let i = h | |
61 | 61 | i | |
62 | 62 | } | |
63 | 63 | else 0 | |
64 | 64 | } | |
65 | 65 | let l = (p - m) | |
66 | 66 | if ((0 > m)) | |
67 | 67 | then throw("Can't withdraw negative amount") | |
68 | 68 | else if ((0 > j)) | |
69 | 69 | then throw("Not enough sponsord balance") | |
70 | 70 | else if ((0 > l)) | |
71 | 71 | then throw("Not enough total bounty balance") | |
72 | 72 | else [IntegerEntry(((((("ranking-sponsor_" + f) + "_") + n) + "_") + d), j), IntegerEntry(((("ranking-sponsor_" + n) + "_") + d), l), ScriptTransfer(b.caller, m, o)] | |
73 | 73 | } | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | ||
77 | 77 | @Callable(b) | |
78 | 78 | func sponsorDeposit (q,r,s,t) = { | |
79 | 79 | let c = b.payments[0] | |
80 | 80 | let e = a(b) | |
81 | 81 | if ((s > r)) | |
82 | 82 | then throw("Competition is finished") | |
83 | 83 | else { | |
84 | 84 | let f = toBase58String(b.caller.bytes) | |
85 | 85 | let g = { | |
86 | 86 | let h = getInteger(this, ((((("sponsor_" + f) + "_") + e) + "_") + q)) | |
87 | 87 | if ($isInstanceOf(h, "Int")) | |
88 | 88 | then { | |
89 | 89 | let i = h | |
90 | 90 | i | |
91 | 91 | } | |
92 | 92 | else 0 | |
93 | 93 | } | |
94 | 94 | let j = (g + c.amount) | |
95 | 95 | let u = { | |
96 | 96 | let h = getInteger(this, ((((q + "_") + t) + "_") + e)) | |
97 | 97 | if ($isInstanceOf(h, "Int")) | |
98 | 98 | then { | |
99 | 99 | let i = h | |
100 | 100 | i | |
101 | 101 | } | |
102 | 102 | else 0 | |
103 | 103 | } | |
104 | 104 | let v = (u + c.amount) | |
105 | 105 | [IntegerEntry(((((("sponsor_" + f) + "_") + e) + "_") + q), j), IntegerEntry(((((q + "_") + t) + "_") + e), v)] | |
106 | 106 | } | |
107 | 107 | } | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | ||
111 | 111 | @Callable(b) | |
112 | 112 | func sponsorWithdraw (q,r,s,m,n,t) = { | |
113 | 113 | let f = toBase58String(b.caller.bytes) | |
114 | 114 | let o = fromBase58String(n) | |
115 | 115 | let g = { | |
116 | 116 | let h = getInteger(this, ((((("sponsor_" + f) + "_") + n) + "_") + q)) | |
117 | 117 | if ($isInstanceOf(h, "Int")) | |
118 | 118 | then { | |
119 | 119 | let i = h | |
120 | 120 | i | |
121 | 121 | } | |
122 | 122 | else 0 | |
123 | 123 | } | |
124 | 124 | let j = (g - m) | |
125 | 125 | let u = { | |
126 | 126 | let h = getInteger(this, ((((q + "_") + t) + "_") + n)) | |
127 | 127 | if ($isInstanceOf(h, "Int")) | |
128 | 128 | then { | |
129 | 129 | let i = h | |
130 | 130 | i | |
131 | 131 | } | |
132 | 132 | else 0 | |
133 | 133 | } | |
134 | 134 | let v = (u - m) | |
135 | 135 | if ((s > r)) | |
136 | 136 | then throw("Competition is finished") | |
137 | 137 | else if ((0 > m)) | |
138 | 138 | then throw("Can't withdraw negative amount") | |
139 | 139 | else if ((0 > j)) | |
140 | 140 | then throw("Not enough balance") | |
141 | 141 | else if ((0 > v)) | |
142 | 142 | then throw("Can't withdraw negative bounty amount") | |
143 | 143 | else [IntegerEntry(((((("sponsor_" + f) + "_") + n) + "_") + q), j), IntegerEntry(((((q + "_") + t) + "_") + n), v), ScriptTransfer(b.caller, m, o)] | |
144 | 144 | } | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | ||
148 | 148 | @Callable(b) | |
149 | 149 | func sponsorDistribution (q,n,t,w,x,y,z,A,B,C,D,E,F,G,H) = { | |
150 | 150 | let o = fromBase58String(n) | |
151 | 151 | let u = { | |
152 | 152 | let h = getInteger(this, ((((q + "_") + t) + "_") + n)) | |
153 | 153 | if ($isInstanceOf(h, "Int")) | |
154 | 154 | then { | |
155 | 155 | let i = h | |
156 | 156 | i | |
157 | 157 | } | |
158 | 158 | else 0 | |
159 | 159 | } | |
160 | 160 | let I = addressFromStringValue(w) | |
161 | 161 | let J = (u * (x / 100)) | |
162 | 162 | let K = addressFromStringValue(y) | |
163 | 163 | let L = (u * (z / 100)) | |
164 | 164 | let M = addressFromStringValue(A) | |
165 | 165 | let N = (u * (B / 100)) | |
166 | 166 | let O = addressFromStringValue(C) | |
167 | 167 | let P = (u * (D / 100)) | |
168 | 168 | let Q = addressFromStringValue(E) | |
169 | 169 | let R = (u * (F / 100)) | |
170 | 170 | let S = addressFromStringValue(G) | |
171 | 171 | let T = (u * (H / 100)) | |
172 | 172 | if ((u == 0)) | |
173 | 173 | then throw("Can't distribution negative amount") | |
174 | 174 | else [IntegerEntry(((((q + "_") + t) + "_") + n), 0), ScriptTransfer(I, J, o), ScriptTransfer(K, L, o), ScriptTransfer(M, N, o), ScriptTransfer(O, P, o), ScriptTransfer(Q, R, o), ScriptTransfer(S, T, o)] | |
175 | 175 | } | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | @Verifier(U) | |
179 | 179 | func V () = sigVerify(U.bodyBytes, U.proofs[0], U.senderPublicKey) | |
180 | 180 |
github/deemru/w8io/169f3d6 45.02 ms ◑