tx · 5gsdprFtzrKQ2xP4eRbY4Z1mPkPf8UnBnyV337HmAa7h

3MwGdE779Vhf4bkn8UbqQqEQwos38KtWhsn:  -0.01400000 Waves

2019.06.27 10:38 [560244] smart account 3MwGdE779Vhf4bkn8UbqQqEQwos38KtWhsn > SELF 0.00000000 Waves

{ "type": 13, "id": "5gsdprFtzrKQ2xP4eRbY4Z1mPkPf8UnBnyV337HmAa7h", "fee": 1400000, "feeAssetId": null, "timestamp": 1561621100184, "version": 1, "sender": "3MwGdE779Vhf4bkn8UbqQqEQwos38KtWhsn", "senderPublicKey": "H4suXc6RCHTrdq9J8rbqDw6qw4Rcc1QXgy8Zj19AqRSh", "proofs": [ "3F2wqaPrJih2ARkK6yRjY5FBWZMd9Fsa2Js7UaKD9dckqSkwTvCcshkyUJbm6zwhQPerfPkNFcNJADgQBBdZtJCh" ], "script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAQAAAAFpAQAAAANmb28AAAABAAAABXZhbHVlCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAARkYXRhCQABMQAAAAEFAAAABXZhbHVlBQAAAANuaWwAAAAAbvNV4Q==", "chainId": 84, "height": 560244, "spentComplexity": 0 } View: original | compacted Prev: hfYMM1FSDQjeCJZDK3yLH6kefENk7H7ZrdfsnSBraSP Next: 7HkMoEqhhXrGvEg5Gg6uGiuzK8uEoGFHQHH5P3oGn4bk Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = 100000000
5-
6-let b = base58''
7-
8-let c = 32
9-
10-let d = 32
11-
12-let e = 8
13-
14-let f = 100
15-
16-let g = 3
17-
18-let h = base58'1'
19-
20-let i = base58'2'
21-
22-let j = base58'3'
23-
24-func k (l,m) = take(drop(l, m), 1)
254
265
27-func n (o,p) = if (isDefined(getBinary(this, o)))
28- then getBinaryValue(this, o)
29- else p
30-
31-
32-func q (r) = if (if ((r == h))
33- then true
34- else (r == i))
35- then true
36- else (r == j)
37-
38-
39-func s (t) = if (if (if ((size(t) >= g))
40- then q(k(t, 0))
41- else false)
42- then q(k(t, 1))
43- else false)
44- then q(k(t, 2))
45- else false
46-
47-
48-func u (v,w,u) = {
49- let x = k(v, u)
50- let y = k(w, u)
51- if ((x == y))
52- then 0
53- else if (if (if (if ((x == j))
54- then (y == i)
55- else false)
56- then true
57- else if ((x == h))
58- then (y == j)
59- else false)
60- then true
61- else if ((x == i))
62- then (y == h)
63- else false)
64- then -1
65- else 1
66- }
67-
68-
69-func z (v,w) = ((u(v, w, 0) + u(v, w, 1)) + u(v, w, 2))
70-
71-
72-func A (B,C) = DataEntry(B, (n(B, b) + C))
73-
74-
75-@Callable(D)
76-func create (E) = {
77- let F = extract(D.payment)
78- if (isDefined(F.assetId))
79- then throw("Payment should be in WAVES.")
80- else if ((F.amount != (1 * a)))
81- then throw("Amount should be 1 WAVE.")
82- else if ((size(E) != c))
83- then throw("Invalid moves.")
84- else WriteSet([A(((toBase58String(D.callerPublicKey) + "_") + toBase58String(D.transactionId)), E)])
85- }
86-
87-
88-
89-@Callable(D)
90-func join (B,t) = {
91- let F = extract(D.payment)
92- if (isDefined(F.assetId))
93- then throw("Payment should be in WAVES.")
94- else if ((F.amount != (1 * a)))
95- then throw("Amount should be 1 WAVE.")
96- else if (!(isDefined(getBinary(this, B))))
97- then throw("Fight is not found.")
98- else if ((size(getBinaryValue(this, B)) != c))
99- then throw("Fight is already started.")
100- else if (!(s(t)))
101- then throw("Invalid moves.")
102- else WriteSet([A(B, ((toBytes(height) + D.callerPublicKey) + t))])
103- }
104-
105-
106-
107-@Callable(D)
108-func complete (B,t) = if (!(isDefined(getBinary(this, B))))
109- then throw("Fight is not found.")
110- else {
111- let G = getBinaryValue(this, B)
112- if ((size(G) == c))
113- then throw("Fight is not started.")
114- else if ((size(G) > (((c + e) + d) + g)))
115- then throw("Fight is already finished.")
116- else {
117- let H = take(getBinaryValue(this, B), c)
118- if (if ((H != blake2b256(t)))
119- then true
120- else !(s(t)))
121- then throw("Invalid moves.")
122- else {
123- let I = takeRightBytes(dropRightBytes(G, g), d)
124- let J = z(take(t, g), takeRightBytes(G, g))
125- ScriptResult(WriteSet([A(B, t)]), TransferSet(if ((J == 0))
126- then [ScriptTransfer(D.caller, (1 * a), unit), ScriptTransfer(addressFromPublicKey(I), (1 * a), unit)]
127- else if ((0 > J))
128- then [ScriptTransfer(D.caller, (2 * a), unit)]
129- else [ScriptTransfer(addressFromPublicKey(I), (2 * a), unit)]))
130- }
131- }
132- }
133-
134-
135-
136-@Callable(D)
137-func timeout (B) = if (!(isDefined(getBinary(this, B))))
138- then throw("Fight is not found.")
139- else {
140- let G = getBinaryValue(this, B)
141- if ((size(G) == c))
142- then throw("Fight is not started.")
143- else if ((size(G) > (((c + e) + d) + g)))
144- then throw("Fight is already finished.")
145- else {
146- let K = toInt(take(drop(G, c), e))
147- if ((f > (height - K)))
148- then throw("Player1 still has a time to complete the fight.")
149- else {
150- let I = takeRightBytes(dropRightBytes(G, g), d)
151- ScriptResult(WriteSet([A(B, I)]), TransferSet([ScriptTransfer(addressFromPublicKey(I), (2 * a), unit)]))
152- }
153- }
154- }
6+@Callable(a)
7+func foo (b) = WriteSet([DataEntry("data", size(b))])
1558
1569

github/deemru/w8io/026f985 
23.50 ms