tx · 3LJEkDYjQP13K4hbaG8schQnWPWigTSTCukiDpHmiftJ

3Mvjrd9jd9BEQvHoiHnPKR2WqtZnvxopDcx:  -0.01000000 Waves

2022.04.03 19:14 [1992622] smart account 3Mvjrd9jd9BEQvHoiHnPKR2WqtZnvxopDcx > SELF 0.00000000 Waves

{ "type": 13, "id": "3LJEkDYjQP13K4hbaG8schQnWPWigTSTCukiDpHmiftJ", "fee": 1000000, "feeAssetId": null, "timestamp": 1649002455962, "version": 2, "chainId": 84, "sender": "3Mvjrd9jd9BEQvHoiHnPKR2WqtZnvxopDcx", "senderPublicKey": "B37Jiw5CgfjxqxYgkAGeJpTmiCa4Cb6a9mh9fynZppFR", "proofs": [ "2iN8H6v6FLvc58KpVxpFi86ENxr7f8H9YQJBirYUiRANkQHFJxNTuYsEdGqnyrdv7b8dhKgKnuffr7Q9vYJHSGEy" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAAEAAAAAAVvd25lcgkBAAAAB0FkZHJlc3MAAAABAQAAABoBVIxWe3zo2WPdJvaZ/FYhrveeShfFdKOL0AAAAAAHcGxheWVycwUAAAADbmlsAQAAAApyYW5kb21pemVyAAAAAQAAAANpbnYEAAAABHJhbmQJAADLAAAAAggFAAAAA2ludgAAAA10cmFuc2FjdGlvbklkCAUAAAADaW52AAAAD2NhbGxlclB1YmxpY0tleQkAAfcAAAABBQAAAARyYW5kAQAAABBhZGRQbGF5ZXJzVG9MaXN0AAAAAQAAAAFpCQAETQAAAAIFAAAAB3BsYXllcnMIBQAAAAFpAAAABmNhbGxlcgAAAAIAAAABaQEAAAAFZW50ZXIAAAAABAAAAAFhCQEAAAAQYWRkUGxheWVyc1RvTGlzdAAAAAEFAAAAAWkJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAEdGhpcwgJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAAAAAGYW1vdW50BQAAAAR1bml0BQAAAANuaWwAAAABaQEAAAAKcGlja1dpbm5lcgAAAAADCQAAAAAAAAIIBQAAAAFpAAAABmNhbGxlcgUAAAAFb3duZXIEAAAAD251bWJlck9mUGxheWVycwkAAZAAAAABBQAAAAdwbGF5ZXJzBAAAAARyYW5kCQAEsQAAAAEJAQAAAApyYW5kb21pemVyAAAAAQUAAAABaQQAAAAOc2VsZWN0ZWRQbGF5ZXIJAAGRAAAAAgUAAAAHcGxheWVycwkAAGoAAAACBQAAAARyYW5kBQAAAA9udW1iZXJPZlBsYXllcnMJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAOc2VsZWN0ZWRQbGF5ZXIJAABpAAAAAgkAAGgAAAACCAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAAAAAZhbW91bnQAAAAAAAAAAFAAAAAAAAAAAGQFAAAABHVuaXQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAFb3duZXIJAABpAAAAAgkAAGgAAAACCAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAAAAAZhbW91bnQAAAAAAAAAABQAAAAAAAAAAGQFAAAABHVuaXQFAAAAA25pbAkAAAIAAAABAgAAABZZb3UgaGF2ZW50IHBlcm1pc3Npb25zAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkuBpwy", "height": 1992622, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8kfuxeZDrfay4hTwuabCkr38tbrwXWgN5nAnAP4J8JNq Next: BUkATxQA4GqH7itNNGhY8V4HnggxEkofvX1uAa8KFxpe Full:
OldNewDifferences
1-{-# STDLIB_VERSION 3 #-}
1+{-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = 20
4+let a = Address(base58'3N2i7ygFVfQLEoupDNpBT7FLcjh4Sb38wm9')
55
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."]
6+let b = nil
77
8-func c (d,e) = {
9- let f = sha256(toBytes((d + e)))
10- let g = toInt(f)
11-b[(g % a)]
8+func c (d) = {
9+ let e = (d.transactionId + d.callerPublicKey)
10+ sha256(e)
1211 }
1312
1413
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
14+func f (g) = (b :+ g.caller)
15+
16+
17+@Callable(g)
18+func enter () = {
19+ let h = f(g)
20+[ScriptTransfer(this, g.payments[0].amount, unit)]
2321 }
2422
2523
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- }
3224
25+@Callable(g)
26+func pickWinner () = if ((g.caller == a))
27+ then {
28+ let i = size(b)
29+ let e = toInt(c(g))
30+ let j = b[(e % i)]
31+[ScriptTransfer(j, ((g.payments[0].amount * 80) / 100), unit), ScriptTransfer(a, ((g.payments[0].amount * 20) / 100), unit)]
32+ }
33+ else throw("You havent permissions")
34+
35+
36+@Verifier(k)
37+func l () = sigVerify(k.bodyBytes, k.proofs[0], k.senderPublicKey)
3338

github/deemru/w8io/026f985 
33.77 ms