tx · Cf9eeUpsHU2UFFkt3fWEXyjCgA55ru8X2K1hWU96te6C

3N9AyhDkGcMusujZTk6zGTswZ3ubzvZtzDo:  -0.01400000 Waves

2019.09.07 20:24 [665961] smart account 3N9AyhDkGcMusujZTk6zGTswZ3ubzvZtzDo > SELF 0.00000000 Waves

{ "type": 13, "id": "Cf9eeUpsHU2UFFkt3fWEXyjCgA55ru8X2K1hWU96te6C", "fee": 1400000, "feeAssetId": null, "timestamp": 1567877013593, "version": 1, "sender": "3N9AyhDkGcMusujZTk6zGTswZ3ubzvZtzDo", "senderPublicKey": "BK7BG4WB6fH1cw6jwHd5EditXDSkVR7W1CjmVf5RMEVx", "proofs": [ "UojZrs87Q7Y8wrdvKFdah1bHGRiT2gHvntW8B8tWBypeERWo8SzCwbjUd4DyYPmvoefxMDV7XRh8oUKLGfoTyrQ" ], "script": "base64:AAIDAAAAAAAAAAAAAAACAQAAAApyYW5kb21pemVyAAAAAQAAAANpbnYEAAAACGxhc3RQbGF5BAAAAAckbWF0Y2gwCQAEHAAAAAIFAAAABHRoaXMCAAAACGxhc3RQbGF5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAFzBQAAAAckbWF0Y2gwBQAAAAFzAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAARVbml0BAAAAAFhBQAAAAckbWF0Y2gwAQAAAAxXYXZlc0xvdHRvVjIJAQAAAAV0aHJvdwAAAAAEAAAABHJhbmQJAADLAAAAAgkAAMsAAAACCQAAywAAAAIJAADLAAAAAgkAAMsAAAACBQAAAAhsYXN0UGxheQgFAAAAA2ludgAAAA10cmFuc2FjdGlvbklkCAUAAAADaW52AAAAD2NhbGxlclB1YmxpY0tleQgFAAAACWxhc3RCbG9jawAAABNnZW5lcmF0aW9uU2lnbmF0dXJlCQABmgAAAAEIBQAAAAlsYXN0QmxvY2sAAAAJdGltZXN0YW1wCQABmgAAAAEIBQAAAAlsYXN0QmxvY2sAAAAGaGVpZ2h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NjcmlwdFJlc3VsdAAAAAIFAAAADXdyaXRlTGFzdFBsYXkFAAAAC3dpblRyYW5zZmVyCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgUAAAANd3JpdGVMYXN0UGxheQkBAAAAC1RyYW5zZmVyU2V0AAAAAQUAAAADbmlsAAAAAgAAAANpbnYBAAAABWxvdHRvAAAAAAkBAAAACnN0YXJ0TG90dG8AAAABBQAAAANpbnYAAAADaW52AQAAAAdkZWZhdWx0AAAAAAkBAAAACnN0YXJ0TG90dG8AAAABBQAAAANpbnYAAAAAVOd4XQ==", "chainId": 84, "height": 665961, "spentComplexity": 0 } View: original | compacted Prev: 8BEtfwXCrRacfy9ECUSETkAkpNGZt9aLAdV2s2yhm8Lj Next: FqTcP3grSEKD4mt7Ty3hVR2uqhe3yExPYTAX8BNcQjur Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = 20
5-
6-let b = ["It is certain.", "It is decidedly so.", "Without a doubt.", "Yes - definitely.", "You may rely on it.", "As I see it, yes.", "Most likely.", "Outlook good.", "Yes.", "Signs point to yes.", "Reply hazy, try again.", "Ask again later.", "Better not tell you now.", "Cannot predict now.", "Concentrate and ask again.", "Don't count on it.", "My reply is no.", "My sources say no.", "Outlook not so good.", "Very doubtful."]
7-
8-func c (d,e) = {
9- let f = sha256(toBytes((d + e)))
10- let g = toInt(f)
11-b[(g % a)]
4+func a (b) = {
5+ let c = {
6+ let d = getBinary(this, "lastPlay")
7+ if ($isInstanceOf(d, "ByteVector"))
8+ then {
9+ let e = d
10+ e
11+ }
12+ else if ($isInstanceOf(d, "Unit"))
13+ then {
14+ let f = d
15+ base58'2ee4oFDYriWJ9EMeR'
16+ }
17+ else throw()
18+ }
19+ let g = (((((c + b.transactionId) + b.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
20+ sha256(g)
1221 }
1322
1423
15-func h (i) = {
16- let j = getString(this, (i + "_a"))
17- if ($isInstanceOf(j, "String"))
18- then {
19- let k = j
20- k
21- }
22- else i
24+func h (b) = {
25+ let i = (wavesBalance(this) / 100)
26+ let j = extract(b.payment)
27+ if (!(isDefined(b.payment)))
28+ then throw("Should be with Payment in Waves")
29+ else if (isDefined(j.assetId))
30+ then throw("Payment should be in Waves")
31+ else if ((j.amount > i))
32+ then throw(("Payment should be less than " + toString(i)))
33+ else {
34+ let k = a(b)
35+ let l = TransferSet([ScriptTransfer(b.caller, ((j.amount * 190) / 100), unit)])
36+ let m = WriteSet([DataEntry("lastPlay", k)])
37+ if ((500 > (toInt(k) % 1000)))
38+ then ScriptResult(m, l)
39+ else ScriptResult(m, TransferSet(nil))
40+ }
2341 }
2442
2543
26-@Callable(l)
27-func tellme (d) = {
28- let m = toBase58String(l.caller.bytes)
29- let n = c(d, h(m))
30- WriteSet([DataEntry((m + "_q"), d), DataEntry((m + "_a"), n)])
31- }
44+@Callable(b)
45+func lotto () = h(b)
46+
47+
48+
49+@Callable(b)
50+func default () = h(b)
3251
3352

github/deemru/w8io/169f3d6 
46.42 ms