tx · 6G54oEiqaeuekS6sxMeSmqvpLwAT54wtJR753GFQrZ7S

3N4vzpD59ff2jn4H8uu1xxjWd7zBB3CFUi3:  -0.01000000 Waves

2020.09.26 11:12 [1194051] smart account 3N4vzpD59ff2jn4H8uu1xxjWd7zBB3CFUi3 > SELF 0.00000000 Waves

{ "type": 13, "id": "6G54oEiqaeuekS6sxMeSmqvpLwAT54wtJR753GFQrZ7S", "fee": 1000000, "feeAssetId": null, "timestamp": 1601104388456, "version": 2, "chainId": 84, "sender": "3N4vzpD59ff2jn4H8uu1xxjWd7zBB3CFUi3", "senderPublicKey": "GzYpHgDye6mFyAZYEhKTzhioZAfD55psfX5DE61XDaJh", "proofs": [ "3xViREh38QxtSRYxKYi3ZhHy1ixHk3xJHPkwWyQbHfJHMTmLu8PK8jupCmHJvNtBzDUZsM6UDrbuz1hCVeuHEfe9" ], "script": "base64:AAIEAAAAAAAAACIIAhIECgIIARIDCgEIEgQKAggIEgQKAggIEgUKAwgICBIAAAAACgAAAAAGTEVTU09OAQAAACDo50h8OI7Nb62zoWsqagYFDIe8iqPg4/7715QkgwDg6QAAAAAEUEFSNwEAAAAgzlhA/ZjitMWTd+McxVJoK0GcLLGrEdV8aco355LpR4wAAAAABEpQWU4BAAAAIKZMLdXcPx41+Mc+LsNVu8E7R6j/4aKvziD0vOVUnHdgAAAAAARVU0ROAQAAACAiZD8evmBG6RFqExPcpjP+Fn4H+Xfps/IV/JlJKjAKNwAAAAAHUEFSN1BBWQEAAAAgl51uEP4PAsqEAH8fboNjHhm/rGl87nuQzc5I5dIHQSMAAAAAFGxlc3Nvbk93bmVyUHVibGljS2V5AQAAACDW8r+QHNDEXX+7oojqOe4EcvIeuhvd8po2KJvI1DJFVAAAAAAHcGVuZGluZwAAAAAAAAAAAAAAAAAFc3RhcnQAAAAAAAAAAAEAAAAAA2VuZAAAAAAAAAAAAgAAAAAMcGF5bWVudFRva2VuBQAAAARQQVI3AAAABgAAAAFpAQAAABFpc3N1ZUxlc3Nvbl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"applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 4 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = base58'GgA8mL3SEYvuhYoZFd418Li4bqXAasGbYCKJshTt2MGU'
5+
6+let b = base58'EtV3CXQ4wqm28WPB1KaBv5B9ke2bpXRZMutYNEJUQcXm'
7+
8+let c = base58'CCA3xSCed22LYv22gZ646XjKQikbGYRe49StqbrSkNEK'
9+
10+let d = base58'3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC'
11+
12+let e = base58'BCqo4hvDBB2dzmidJQKkVtQtkgEQVVwMy1jjV4R4tNB4'
13+
14+let f = base58'FU4wEpLzTjfekkKGGSaXKgBmP1LNJu6ewSw82z6AjoXH'
15+
16+let g = 0
17+
18+let h = 1
19+
20+let i = 2
21+
22+let j = b
23+
24+@Callable(k)
25+func issueLessonTicket (l,m) = {
26+ let n = k.payments[0]
27+ if ((n.assetId != a))
28+ then throw("works with LESSON only")
29+ else {
30+ let o = "issueNumber"
31+ let p = {
32+ let q = getInteger(this, o)
33+ if ($isInstanceOf(q, "Int"))
34+ then {
35+ let r = q
36+ r
37+ }
38+ else 0
39+ }
40+ let s = (p + 1)
41+ let t = toString(s)
42+ let u = (("TICKET_" + t) + "_details")
43+ let v = (("TICKET_" + t) + "_price")
44+ let w = (("TICKET_" + t) + "_balance")
45+ let x = {
46+ let q = getInteger(this, w)
47+ if ($isInstanceOf(q, "Int"))
48+ then {
49+ let r = q
50+ r
51+ }
52+ else 0
53+ }
54+ let y = (x + n.amount)
55+[IntegerEntry(v, m), IntegerEntry(o, s), StringEntry(u, l), IntegerEntry(w, y)]
56+ }
57+ }
58+
59+
60+
61+@Callable(k)
62+func buyTicket (z) = {
63+ let n = k.payments[0]
64+ let v = (("TICKET_" + z) + "_price")
65+ let A = {
66+ let q = getInteger(this, v)
67+ if ($isInstanceOf(q, "Int"))
68+ then {
69+ let r = q
70+ r
71+ }
72+ else 0
73+ }
74+ let B = A
75+ let C = (n.amount / B)
76+ if ((n.assetId != j))
77+ then throw("works with Payment Token only")
78+ else {
79+ let D = ((("buy_TICKET_" + z) + "_") + toBase58String(k.caller.bytes))
80+ let E = {
81+ let q = getInteger(this, D)
82+ if ($isInstanceOf(q, "Int"))
83+ then {
84+ let r = q
85+ r
86+ }
87+ else 0
88+ }
89+ let F = (E + C)
90+ let G = ((("user_balance_TICKET_" + z) + "_") + toBase58String(k.caller.bytes))
91+ let H = {
92+ let q = getInteger(this, G)
93+ if ($isInstanceOf(q, "Int"))
94+ then {
95+ let r = q
96+ r
97+ }
98+ else 0
99+ }
100+ let I = (H + C)
101+ let w = (("TICKET_" + z) + "_balance")
102+ let x = {
103+ let q = getInteger(this, w)
104+ if ($isInstanceOf(q, "Int"))
105+ then {
106+ let r = q
107+ r
108+ }
109+ else 0
110+ }
111+ let y = (x - C)
112+[IntegerEntry(D, F), IntegerEntry(w, y), IntegerEntry(G, I), ScriptTransfer(k.caller, C, a)]
113+ }
114+ }
115+
116+
117+
118+@Callable(k)
119+func lessonSubscription (J,z) = {
120+ let n = k.payments[0]
121+ let K = n.assetId
122+ let L = toBase58String(k.caller.bytes)
123+ let G = ((("user_balance_TICKET_" + z) + "_") + toBase58String(k.caller.bytes))
124+ let H = {
125+ let q = getInteger(this, G)
126+ if ($isInstanceOf(q, "Int"))
127+ then {
128+ let r = q
129+ r
130+ }
131+ else 0
132+ }
133+ let I = (H - n.amount)
134+ let M = ((("status_" + J) + "_") + L)
135+ let N = ((("payment_" + J) + "_") + L)
136+ let O = {
137+ let q = getInteger(this, N)
138+ if ($isInstanceOf(q, "Int"))
139+ then {
140+ let r = q
141+ r
142+ }
143+ else 0
144+ }
145+ let P = (O + n.amount)
146+[IntegerEntry(G, I), IntegerEntry(M, g), IntegerEntry(N, P)]
147+ }
148+
149+
150+
151+@Callable(k)
152+func lessonStart (J,L) = {
153+ let M = ((("status_" + J) + "_") + L)
154+[IntegerEntry(M, h)]
155+ }
156+
157+
158+
159+@Callable(k)
160+func lessonFinish (J,L,z) = {
161+ let Q = toBase58String(value(a))
162+ let N = ((("payment_" + J) + "_") + L)
163+ let O = {
164+ let q = getInteger(this, N)
165+ if ($isInstanceOf(q, "Int"))
166+ then {
167+ let r = q
168+ r
169+ }
170+ else 0
171+ }
172+ let v = (("TICKET_" + z) + "_price")
173+ let A = {
174+ let q = getInteger(this, v)
175+ if ($isInstanceOf(q, "Int"))
176+ then {
177+ let r = q
178+ r
179+ }
180+ else 0
181+ }
182+ let R = (O * A)
183+ let S = ("owner_balance_" + toBase58String(k.caller.bytes))
184+ let T = {
185+ let q = getInteger(this, S)
186+ if ($isInstanceOf(q, "Int"))
187+ then {
188+ let r = q
189+ r
190+ }
191+ else 0
192+ }
193+ let U = (T + R)
194+ let M = ((("status_" + J) + "_") + L)
195+ let V = ((Q + "_") + L)
196+ let W = {
197+ let q = getInteger(this, V)
198+ if ($isInstanceOf(q, "Int"))
199+ then {
200+ let r = q
201+ r
202+ }
203+ else 0
204+ }
205+ let X = fromBase58String(Q)
206+[IntegerEntry(S, U), IntegerEntry(M, i), IntegerEntry(N, 0), Burn(a, O)]
207+ }
208+
209+
210+
211+@Callable(k)
212+func ownerWithdraw () = {
213+ let S = ("owner_balance_" + toBase58String(k.caller.bytes))
214+ let T = {
215+ let q = getInteger(this, S)
216+ if ($isInstanceOf(q, "Int"))
217+ then {
218+ let r = q
219+ r
220+ }
221+ else 0
222+ }
223+ if ((0 > T))
224+ then throw("Can't withdraw negative amount")
225+ else [IntegerEntry(S, 0), ScriptTransfer(k.caller, T, j)]
226+ }
227+
228+
229+@Verifier(Y)
230+func Z () = sigVerify(Y.bodyBytes, Y.proofs[0], f)
231+

github/deemru/w8io/169f3d6 
28.45 ms