tx · 67ujRgftPDhNHFEp1W6b7v4gzCp3AwTZDe46zEHAGyt2

3NBiXxLpuHVS2dGSaLvyPfCQYMPRKCtGCVg:  -0.01000000 Waves

2019.06.23 10:45 [554401] smart account 3NBiXxLpuHVS2dGSaLvyPfCQYMPRKCtGCVg > SELF 0.00000000 Waves

{ "type": 13, "id": "67ujRgftPDhNHFEp1W6b7v4gzCp3AwTZDe46zEHAGyt2", "fee": 1000000, "feeAssetId": null, "timestamp": 1561275927012, "version": 1, "sender": "3NBiXxLpuHVS2dGSaLvyPfCQYMPRKCtGCVg", "senderPublicKey": "H2yzJU1BtKf9NAhJSK6nCVgmFdaRaFBs5y3zgajHTLGs", "proofs": [ "3iVy7xuXhku5cM6Aro2r9SphSEZ1tKLA5JFDZNZpppWYo9SJ1nHCpADUcULuXXbqvHSscJs1ondujZFQK6GbBiTA" ], "script": "base64:AAIDAAAAAAAAAAAAAAAJAAAAAA5hZG1pblB1YmxpY0tleQEAAAAgoPq5TrIPqNMyX9LJ5ea1kHoixxLdZLkjdZ9lUlSz41QAAAAABXdjdElkAQAAACBAkwcahwxqDOVmEdNdlcYsRPoEBwsu3SMjVjLFv3jP4gAAAAAId3ZzUHJpY2UAAAAAAAX14QAAAAAACHdjdFByaWNlAAAAAAAAAABkAAAAAAhsYXN0Q2VsbAAAAAAAAAAAYwAAAAANYWRkcmVzc0xlbmd0aAAAAAAAAAAAIwAAAAAIcm91bmRLZXkCAAAABXJvdW5kAAAAAAhjZWxsc0tleQIAAAAFY2VsbHMAAAAACmxhc3RXaW5LZXkCAAAAB2xhc3RXaW4AAAACAAAAAWkBAAAABHRlc3QAAAAABAAAAAd3aW5DZWxsCQAAagAAAAIJAASxAAAAAQgFAAAACWxhc3RCbG9jawAAABNnZW5lcmF0aW9uU2lnbmF0dXJlAAAAAAAAAAAKCQAAAgAAAAEJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAAlgAAAABCAUAAAAJbGFzdEJsb2NrAAAAE2dl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dFRyYW5zZmVyAAAAAwUAAAAKd2luQWRkcmVzcwUAAAALd2N0V2luU2hhcmUFAAAABXdjdElkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAADGFkbWluQWRkcmVzcwUAAAANd2N0QWRtaW5TaGFyZQUAAAAFd2N0SWQFAAAAA25pbAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAAaQAAAABBQAAAARjZWxsCQABLAAAAAIJAAEsAAAAAgkABCUAAAABCAUAAAABaQAAAAZjYWxsZXICAAAAAV8JAAGkAAAAAQUAAAAFcm91bmQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAACGNlbGxzS2V5CQAAZAAAAAIFAAAABWNlbGxzAAAAAAAAAAABBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnP2nlU", "chainId": 84, "height": 554401, "spentComplexity": 0 } View: original | compacted Prev: none Next: DGn5BtdPMuxHhrXBcKtQQ8BVQUDBabbhwB6oJnbuioQJ Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = base58'BqPySUvbKdRTRZ33nGTtrQRdus5qwhnQkqZ7G9iNcDto'
5+
6+let b = base58'5M58Edq3qciFLWMFS9kLLKfFQoENxokdi2hdE3ju4hrq'
7+
8+let c = 100000000
9+
10+let d = 100
11+
12+let e = 99
13+
14+let f = 35
15+
16+let g = "round"
17+
18+let h = "cells"
19+
20+let i = "lastWin"
21+
22+@Callable(j)
23+func test () = {
24+ let k = (toInt(lastBlock.generationSignature) % 10)
25+ throw(((((toBase58String(lastBlock.generationSignature) + ", ") + toBase64String(lastBlock.generationSignature)) + ", ") + toString(k)))
26+ }
27+
28+
29+
30+@Callable(j)
31+func buy (l) = {
32+ let m = extract(getInteger(this, g))
33+ let n = extract(getInteger(this, h))
34+ if (if ((0 > l))
35+ then true
36+ else (l > e))
37+ then throw("invalid cell number")
38+ else {
39+ let o = valueOrErrorMessage(j.payment, "Where is payment?")
40+ let p = !(isDefined(o.assetId))
41+ let q = (o.assetId == b)
42+ if (if (if (if (!(q))
43+ then !(p)
44+ else false)
45+ then true
46+ else if (q)
47+ then (o.amount != d)
48+ else false)
49+ then true
50+ else if (p)
51+ then (o.amount != c)
52+ else false)
53+ then throw("ticket price is 1 WCT or 1 WAVES")
54+ else {
55+ let r = getString(this, toString(l))
56+ let s = if (isDefined(r))
57+ then {
58+ let t = split(extract(r), "_")[1]
59+ if ((t == toString(m)))
60+ then true
61+ else false
62+ }
63+ else false
64+ if (s)
65+ then throw("already bought")
66+ else {
67+ let u = (n == e)
68+ if (u)
69+ then {
70+ let v = if (q)
71+ then 1
72+ else 0
73+ let w = if (p)
74+ then 1
75+ else 0
76+ let x = (assetBalance(this, b) + (o.amount * v))
77+ let y = (wavesBalance(this) + (o.amount * w))
78+ let z = (y / 10)
79+ let A = (y - z)
80+ let B = (x / 10)
81+ let C = (x - B)
82+ let D = addressFromPublicKey(a)
83+ let k = (toInt(lastBlock.generationSignature) % (e + 1))
84+ let E = extract(getString(this, toString(k)))
85+ let F = if ((k == l))
86+ then j.caller
87+ else extract(addressFromString(split(E, "_")[0]))
88+ ScriptResult(WriteSet([DataEntry(toString(l), ((toString(j.caller) + "_") + toString(m))), DataEntry(h, 0), DataEntry(g, (m + 1)), DataEntry(i, ((toString(k) + "_") + toString(F)))]), TransferSet([ScriptTransfer(F, A, unit), ScriptTransfer(D, z, unit), ScriptTransfer(F, C, b), ScriptTransfer(D, B, b)]))
89+ }
90+ else WriteSet([DataEntry(toString(l), ((toString(j.caller) + "_") + toString(m))), DataEntry(h, (n + 1))])
91+ }
92+ }
93+ }
94+ }
95+
96+
97+@Verifier(G)
98+func H () = {
99+ let I = G
100+ sigVerify(G.bodyBytes, G.proofs[0], G.senderPublicKey)
101+ }
102+

github/deemru/w8io/169f3d6 
39.52 ms