tx · BUkATxQA4GqH7itNNGhY8V4HnggxEkofvX1uAa8KFxpe

3Mvjrd9jd9BEQvHoiHnPKR2WqtZnvxopDcx:  -1.00900000 Waves

2022.04.06 23:03 [1997160] smart account 3Mvjrd9jd9BEQvHoiHnPKR2WqtZnvxopDcx > SELF 0.00000000 Waves

{ "type": 13, "id": "BUkATxQA4GqH7itNNGhY8V4HnggxEkofvX1uAa8KFxpe", "fee": 100900000, "feeAssetId": null, "timestamp": 1649275074286, "version": 2, "chainId": 84, "sender": "3Mvjrd9jd9BEQvHoiHnPKR2WqtZnvxopDcx", "senderPublicKey": "B37Jiw5CgfjxqxYgkAGeJpTmiCa4Cb6a9mh9fynZppFR", "proofs": [ "63P266gZBMpenj6gheJVXYn9Tso7zAwH8E3Xxg6C75TnN8h4DkkJSe9k61SjkTbtzYwHDgXrVMMEP4jpHLvfP1nh" ], "script": "base64:AAIFAAAAAAAAAAoIAhIAEgQKAgIBAAAAAAAAAAIAAAABaQEAAAAQY3JlYXRlTXV0aHVUb2tlbgAAAAADCQAAAAAAAAIIBQAAAAFpAAAABmNhbGxlcgUAAAAEdGhpcwQAAAAFaXNzdWUJAARCAAAABQIAAAAFTVVUSFUCAAAAF0EgdGVzdCB0b2tlbiBieSBLLk11dGh1AAAAAAAAAYagAAAAAAAAAAACBgQAAAACaWQJAAQ4AAAAAQUAAAAFaXNzdWUJAAUUAAAAAgkABEwAAAACBQAAAAVpc3N1ZQkABEwAAAACCQEAAAALQmluYXJ5RW50cnkAAAACAgAAAAJpZAUAAAACaWQFAAAAA25pbAUAAAAEdW5pdAkAAAIAAAABAgAAABRUb2tlbiBhbHJlYWR5IGlzc3VlZAAAAAFpAQAAAApnaXZlVG9rZW5zAAAAAgAAAAdhZGRyZXNzAAAABmFtb3VudAQAAAAHYXNzZXRJRAQAAAAHJG1hdGNoMAkABBwAAAACBQAAAAR0aGlzAgAAAAJpZAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAKQnl0ZVZlY3RvcgQAAAACaWQFAAAAByRtYXRjaDAFAAAAAmlkCQAAAgAAAAECAAAAFENhbid0IGZpbmQgQXNzZXN0IElEAwMJAAAAAAAAAggFAAAAAWkAAAAGY2FsbGVyBQAAAAR0aGlzCQAAZwAAAAIJAAPwAAAAAgUAAAAEdGhpcwUAAAAHYXNzZXRJRAUAAAAGYW1vdW50BwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAAlgAAAABBQAAAAdhZGRyZXNzBQAAAAZhbW91bnQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAB0FkZHJlc3MAAAABBQAAAAdhZGRyZXNzBQAAAAZhbW91bnQFAAAAB2Fzc2V0SUQFAAAAA25pbAkAAAIAAAABAgAAACBDYW4ndCBjYWxsIG9yIG5vdCBlbm91Z2ggYmFsYW5jZQAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5rbWLrg==", "height": 1997160, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3LJEkDYjQP13K4hbaG8schQnWPWigTSTCukiDpHmiftJ Next: Eje9D2U45MC68NKGQFGEKxGRziai73Ak6ejdi76erDsm Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = Address(base58'3N2i7ygFVfQLEoupDNpBT7FLcjh4Sb38wm9')
54
6-let b = nil
75
8-func c (d) = {
9- let e = (d.transactionId + d.callerPublicKey)
10- sha256(e)
6+@Callable(a)
7+func createMuthuToken () = if ((a.caller == this))
8+ then {
9+ let b = Issue("MUTHU", "A test token by K.Muthu", 100000, 2, true)
10+ let c = calculateAssetId(b)
11+ $Tuple2([b, BinaryEntry("id", c)], unit)
12+ }
13+ else throw("Token already issued")
14+
15+
16+
17+@Callable(a)
18+func giveTokens (d,e) = {
19+ let f = {
20+ let g = getBinary(this, "id")
21+ if ($isInstanceOf(g, "ByteVector"))
22+ then {
23+ let c = g
24+ c
25+ }
26+ else throw("Can't find Assest ID")
27+ }
28+ if (if ((a.caller == this))
29+ then (assetBalance(this, f) >= e)
30+ else false)
31+ then [IntegerEntry(toBase58String(d), e), ScriptTransfer(Address(d), e, f)]
32+ else throw("Can't call or not enough balance")
1133 }
1234
1335
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)]
21- }
22-
23-
24-
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)
36+@Verifier(h)
37+func i () = sigVerify(h.bodyBytes, h.proofs[0], h.senderPublicKey)
3838

github/deemru/w8io/026f985 
26.64 ms