tx · EJ5q1hnrhpibdVExg4PYcyGyBmvhgP6oLnkC3RtNHXeP 3N7KcuNZ2Pe7hakkyJhJqg63fTZdxPnSX4n: -0.01000000 Waves 2022.04.06 22:27 [1997123] smart account 3N7KcuNZ2Pe7hakkyJhJqg63fTZdxPnSX4n > SELF 0.00000000 Waves
{ "type": 13, "id": "EJ5q1hnrhpibdVExg4PYcyGyBmvhgP6oLnkC3RtNHXeP", "fee": 1000000, "feeAssetId": null, "timestamp": 1649273260290, "version": 2, "chainId": 84, "sender": "3N7KcuNZ2Pe7hakkyJhJqg63fTZdxPnSX4n", "senderPublicKey": "DohVVD3Qvdzb87xgN5f6HTwkopRNUzEXYmooZ7VqgAbP", "proofs": [ "4Q5GHJ6za3TvDaLYRoYYUPwc6rqVCvZy9Vx4XHR9hX7cqGEFYLPvnzvmtkToDW5tbUTpfEu3zVbHMkgLvd8REx9R" ], "script": "base64:AAIFAAAAAAAAAAoIAhIAEgQKAgIBAAAAAAAAAAIAAAABaQEAAAAQY3JlYXRlTXV0aHVUb2tlbgAAAAADCQAAAAAAAAIIBQAAAAFpAAAABmNhbGxlcgUAAAAEdGhpcwQAAAAFaXNzdWUJAARCAAAABQIAAAAFTVVUSFUCAAAAF0EgdGVzdCB0b2tlbiBieSBLLk11dGh1AAAAAAAAAAAKAAAAAAAAAAABBgQAAAACaWQJAAQ4AAAAAQUAAAAFaXNzdWUJAAUUAAAAAgkABEwAAAACBQAAAAVpc3N1ZQkABEwAAAACCQEAAAALQmluYXJ5RW50cnkAAAACAgAAAAJpZAUAAAACaWQFAAAAA25pbAUAAAAEdW5pdAkAAAIAAAABAgAAABRUb2tlbiBhbHJlYWR5IGlzc3VlZAAAAAFpAQAAAApnaXZlVG9rZW5zAAAAAgAAAAdhZGRyZXNzAAAABmFtb3VudAQAAAAHYXNzZXRJRAQAAAAHJG1hdGNoMAkABBwAAAACBQAAAAR0aGlzAgAAAAJpZAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAKQnl0ZVZlY3RvcgQAAAACaWQFAAAAByRtYXRjaDAFAAAAAmlkCQAAAgAAAAECAAAAFENhbid0IGZpbmQgQXNzZXN0IElEAwMJAAAAAAAAAggFAAAAAWkAAAAGY2FsbGVyBQAAAAR0aGlzCQAAZwAAAAIJAAPwAAAAAgUAAAAEdGhpcwUAAAAHYXNzZXRJRAUAAAAGYW1vdW50BwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAAlgAAAABBQAAAAdhZGRyZXNzBQAAAAZhbW91bnQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAB0FkZHJlc3MAAAABBQAAAAdhZGRyZXNzBQAAAAZhbW91bnQFAAAAB2Fzc2V0SUQFAAAAA25pbAkAAAIAAAABAgAAACBDYW4ndCBjYWxsIG9yIG5vdCBlbm91Z2ggYmFsYW5jZQAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5WOxbCw==", "height": 1997123, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: H6ETtdrTrWoX6swbVkLfTb8n5UAzwJLhgiP9tfB1CWxN Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | ||
5 | + | ||
6 | + | @Callable(i) | |
7 | + | func createMuthuToken () = if ((i.caller == this)) | |
8 | + | then { | |
9 | + | let issue = Issue("MUTHU", "A test token by K.Muthu", 10, 1, true) | |
10 | + | let id = calculateAssetId(issue) | |
11 | + | $Tuple2([issue, BinaryEntry("id", id)], unit) | |
12 | + | } | |
13 | + | else throw("Token already issued") | |
14 | + | ||
15 | + | ||
16 | + | ||
17 | + | @Callable(i) | |
18 | + | func giveTokens (address,amount) = { | |
19 | + | let assetID = match getBinary(this, "id") { | |
20 | + | case id: ByteVector => | |
21 | + | id | |
22 | + | case _ => | |
23 | + | throw("Can't find Assest ID") | |
24 | + | } | |
25 | + | if (if ((i.caller == this)) | |
26 | + | then (assetBalance(this, assetID) >= amount) | |
27 | + | else false) | |
28 | + | then [IntegerEntry(toBase58String(address), amount), ScriptTransfer(Address(address), amount, assetID)] | |
29 | + | else throw("Can't call or not enough balance") | |
30 | + | } | |
31 | + | ||
32 | + | ||
33 | + | @Verifier(tx) | |
34 | + | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
35 | + |
github/deemru/w8io/169f3d6 20.78 ms ◑