tx · 3mLz1ZhY5HzWCyrQNXo8rFyWSbqWxqTTLGvtUUdyT8Ph

3N8CyctV8u3dhpwiT8KCDdrWP7RMBGtZCGY:  -0.01000000 Waves

2019.07.31 14:56 [610235] smart account 3N8CyctV8u3dhpwiT8KCDdrWP7RMBGtZCGY > SELF 0.00000000 Waves

{ "type": 13, "id": "3mLz1ZhY5HzWCyrQNXo8rFyWSbqWxqTTLGvtUUdyT8Ph", "fee": 1000000, "feeAssetId": null, "timestamp": 1564574199621, "version": 1, "sender": "3N8CyctV8u3dhpwiT8KCDdrWP7RMBGtZCGY", "senderPublicKey": "3MLAhELBjSWGfTu5GPgnM2jLgGrBis8weToBjwhrhreC", "proofs": [ "58WKroh7KhA83bGVY4b4zk5YuhjSLEwTFSWHc2o3k8mPv8PsejcURWRegzuxXpy6TLWTG95Y781DHwhYHxtF45EB" ], "script": "base64:AAIDAAAAAAAAAAAAAAAaAAAAAAptaW5WYXJpYW50AAAAAAAAAAABAAAAAAptYXhWYXJpYW50AAAAAAAAAAAkAAAAAAlzdG9wQmxvY2sAAAAAAAAKy/YAAAAAD2tPd25lckNvbWlzc2lvbgAAAAAAAAAABQAAAAASa1BsYXRmb3JtQ29taXNzaW9uAAAAAAAAAAAFAAAAAAprQ29taXNzaW9uCQAAZAAAAAIFAAAAD2tPd25lckNvbWlzc2lvbgUAAAASa1BsYXRmb3JtQ29taXNzaW9uAAAAABF3aW5uaW5nVmFyaWFudEtleQIAAAAHd2luX3ZhcgAAAAAQdG90YWxQYXltZW50c0tleQIAAAAOdG90YWxfcGF5bWVudHMAAAAADXBhaWRLZXlQcmVmaXgCAAAABXBhaWRfAAAAAAliaWRQcmVmaXgCAAAABGJpZF8AAAAAE2JpZFBheW1lbnRLZXlQcmVmaXgCAAAADGJpZF9wYXltZW50XwAAAAAZdG90YWxWYXJpYW50Qmlkc0tleVByZWZpeAIAAAAPdG90YWxfdmFyX2JpZHNfAQAAAA12ZXJpZnlEZWZhdWx0AAAAAQAAAAF0CQA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YXJpYW50IAkAAaQAAAABBQAAAA53aW5uaW5nVmFyaWFudAkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAApnZXRQYWlkS2V5AAAAAQUAAAANY2FsbGVyQWRkcmVzcwYJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAEXdpbm5pbmdWYXJpYW50S2V5BQAAAA53aW5uaW5nVmFyaWFudAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAANjdHgAAAAGY2FsbGVyBQAAAAdyZXZlbnVlBQAAAAR1bml0BQAAAANuaWwJAAACAAAAAQIAAAA7U3RvcCBibG9jayBoYWQgbm90IGJlZW4gcmVhY2hlZCBvciB0aGUgY2FsbGVyIGhhZCBiZWVuIHBhaWQAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24GAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBgkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAAAXQFAAAAByRtYXRjaDAJAQAAAA12ZXJpZnlEZWZhdWx0AAAAAQUAAAABdAkAAAIAAAABAgAAABpVbmhhbmRsZWQgdHJhbnNhY3Rpb24gdHlwZZlXWG8=", "chainId": 84, "height": 610235, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = 1
5+
6+let b = 36
7+
8+let c = 707574
9+
10+let d = 5
11+
12+let e = 5
13+
14+let f = (d + e)
15+
16+let g = "win_var"
17+
18+let h = "total_payments"
19+
20+let i = "paid_"
21+
22+let j = "bid_"
23+
24+let k = "bid_payment_"
25+
26+let l = "total_var_bids_"
27+
28+func m (n) = sigVerify(n.bodyBytes, n.proofs[0], n.senderPublicKey)
29+
30+
31+func o () = {
32+ let p = getInteger(this, h)
33+ if ($isInstanceOf(p, "Int"))
34+ then {
35+ let q = p
36+ q
37+ }
38+ else 0
39+ }
40+
41+
42+func r (s) = {
43+ let p = s.payment
44+ if ($isInstanceOf(p, "AttachedPayment"))
45+ then {
46+ let t = p
47+ let u = t.assetId
48+ if ($isInstanceOf(u, "ByteVector"))
49+ then {
50+ let v = u
51+ throw("Only WAVES asset is accepted")
52+ }
53+ else if ((t.amount != 0))
54+ then t.amount
55+ else throw("Payment amount must be non-zero")
56+ }
57+ else throw("Payment must be attached")
58+ }
59+
60+
61+func w (x,y) = {
62+ let z = (j + x)
63+ (z + toString(y))
64+ }
65+
66+
67+func A (x,y) = {
68+ let p = getInteger(this, w(x, y))
69+ if ($isInstanceOf(p, "Int"))
70+ then {
71+ let q = p
72+ q
73+ }
74+ else 0
75+ }
76+
77+
78+func B (y) = (l + toString(y))
79+
80+
81+func C (y) = {
82+ let p = getInteger(this, B(y))
83+ if ($isInstanceOf(p, "Int"))
84+ then {
85+ let q = p
86+ q
87+ }
88+ else 0
89+ }
90+
91+
92+func D (E,F,G,H,I) = ((((E - F) * (I - H)) / (G - F)) + H)
93+
94+
95+func J (s) = {
96+ let K = sha256(lastBlock.generationSignature)
97+ let L = toInt((fromBase16String("000000000000") + takeRightBytes(K, 2)))
98+ D(L, 0, 65535, a, b)
99+ }
100+
101+
102+func M (s) = {
103+ let p = getInteger(this, g)
104+ if ($isInstanceOf(p, "Int"))
105+ then {
106+ let q = p
107+ q
108+ }
109+ else J(s)
110+ }
111+
112+
113+func N (s) = toBase58String(addressFromPublicKey(s.callerPublicKey).bytes)
114+
115+
116+func O (x) = (i + x)
117+
118+
119+func P (x) = {
120+ let p = getBoolean(this, O(x))
121+ if ($isInstanceOf(p, "Boolean"))
122+ then {
123+ let Q = p
124+ Q
125+ }
126+ else false
127+ }
128+
129+
130+func R (x) = if (P(x))
131+ then throw("The caller has already been paid")
132+ else true
133+
134+
135+@Callable(s)
136+func randVar () = WriteSet([DataEntry("randVar", J(s))])
137+
138+
139+
140+@Callable(s)
141+func setBid (y) = if ((s.caller == this))
142+ then throw("Script owner is not allowed to bid")
143+ else if (if ((y > b))
144+ then true
145+ else (a > y))
146+ then throw("Variant is out of range")
147+ else {
148+ let S = N(s)
149+ let T = r(s)
150+ if ((height >= c))
151+ then throw((("Stop block " + toString(c)) + " reached"))
152+ else WriteSet([DataEntry(B(y), (C(y) + T)), DataEntry(w(S, y), (A(S, y) + T)), DataEntry(h, (o() + T))])
153+ }
154+
155+
156+
157+@Callable(s)
158+func resetPaid () = {
159+ let S = N(s)
160+ WriteSet([DataEntry(O(S), false)])
161+ }
162+
163+
164+
165+@Callable(s)
166+func payWinner () = {
167+ let S = N(s)
168+ if (if ((height >= c))
169+ then R(S)
170+ else false)
171+ then {
172+ let U = M(s)
173+ let V = C(U)
174+ let W = if ((V > 0))
175+ then fraction((o() * A(S, U)), f, (100 * V))
176+ else 0
177+ if ((0 >= W))
178+ then throw(("The caller has no bids for the variant " + toString(U)))
179+ else ScriptResult(WriteSet([DataEntry(O(S), true), DataEntry(g, U)]), TransferSet([ScriptTransfer(s.caller, W, unit)]))
180+ }
181+ else throw("Stop block had not been reached or the caller had been paid")
182+ }
183+
184+
185+@Verifier(X)
186+func Y () = {
187+ let p = X
188+ if (if ($isInstanceOf(p, "TransferTransaction"))
189+ then true
190+ else if ($isInstanceOf(p, "SetScriptTransaction"))
191+ then true
192+ else if ($isInstanceOf(p, "InvokeScriptTransaction"))
193+ then true
194+ else $isInstanceOf(p, "DataTransaction"))
195+ then {
196+ let n = p
197+ m(n)
198+ }
199+ else throw("Unhandled transaction type")
200+ }
201+

github/deemru/w8io/169f3d6 
21.80 ms