tx · 3wKZBRkEzBQcUPVLC8KC8rHzr5iroC3aeXLtFyvr4bFE 3N377MSFzFdwxW97ENpfqfZLYSnGzSMWvNN: -0.01000000 Waves 2021.12.03 15:52 [1818116] smart account 3N377MSFzFdwxW97ENpfqfZLYSnGzSMWvNN > SELF 0.00000000 Waves
{ "type": 13, "id": "3wKZBRkEzBQcUPVLC8KC8rHzr5iroC3aeXLtFyvr4bFE", "fee": 1000000, "feeAssetId": null, "timestamp": 1638536065157, "version": 2, "chainId": 84, "sender": "3N377MSFzFdwxW97ENpfqfZLYSnGzSMWvNN", "senderPublicKey": "3TJhvM5a7VSAiRyvEVwygRkiPC9ow5nM4LQ252H4vxWK", "proofs": [ "41aKAoXgWf6gKccHojPqk7S2auxFYYk8Si6AC1oWxhxh8S2v83ugFpUbucMAUuHuYgDCHMZMoiFLkJw218WyTmnt" ], "script": "base64:AAIFAAAAAAAAAAwIAhIDCgEIEgMKAQgAAAACAAAAAAVjYW5kbwIAAAAjM011VzR0MWpDWEh0OFdSc0hWTFVhcjMyRW52SnhaYVFXQXgAAAAABXNlcGFyAgAAAAV8fHx8fAAAAAIAAAABaQEAAAAGY3JlYXRlAAAAAQAAAAJ4eQQAAAAMY2FsbGVyQWRyZXNzCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAABG1lc3MJAAS5AAAAAgkABEwAAAACAgAAACMzTjM3N01TRnpGZHd4Vzk3RU5wZnFmWkxZU25HelNNV3ZOTgkABEwAAAACAgAAAAN1cmwJAARMAAAAAgkAAaQAAAABAAAAAAAAAABkBQAAAANuaWwFAAAABXNlcGFyAwkAAAAAAAACBQAAAAVjYW5kbwUAAAAMY2FsbGVyQWRyZXNzCQAFFAAAAAIJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAACeHkFAAAABG1lc3MFAAAAA25pbAUAAAAEdW5pdAkAAAIAAAABAgAAACDQktGLINC90LUg0LzQvtC20LXRgtC1IHRvIGNyZWF0ZQAAAAFpAQAAAAZjaGFuZ2UAAAABAAAABXRyYW5zBAAAAAxjYWxsZXJBZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAACdHIJAAS1AAAAAgUAAAAFdHJhbnMFAAAABXNlcGFyBAAAAARtZXNzCQAEuQAAAAIJAARMAAAAAgUAAAAMY2FsbGVyQWRyZXNzCQAETAAAAAIJAAGRAAAAAgUAAAACdHIAAAAAAAAAAAEJAARMAAAAAgkAAZEAAAACBQAAAAJ0cgAAAAAAAAAAAgUAAAADbmlsBQAAAAVzZXBhcgQAAAADcG10AwkAAAAAAAACCQABkAAAAAEIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAAHEF0dGFjaGVkIHBheW1lbnQgaXMgcmVxdWlyZWQDCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQAAAgAAAAECAAAAFXdvcmtzIHdpdGggd2F2ZXMgb25seQMJAAAAAAAAAgUAAAAFY2FuZG8FAAAADGNhbGxlckFkcmVzcwkABRQAAAACCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAGRAAAAAgUAAAACdHIAAAAAAAAAAAAFAAAABG1lc3MJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyAAAAAAAF9eEABQAAAAR1bml0BQAAAANuaWwFAAAABHVuaXQJAAACAAAAAQIAAAAg0JLRiyDQvdC1INC80L7QttC10YLQtSB0byBjcmVhdGUAAAAA7cfaUw==", "height": 1818116, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9ZQZvEjFoxHpGEMNEFVPA4f8tBi2Kj77BUb5jxW5j1EA Next: J2RWo1srm7D2hyF1LSjCqXmftMaHnS5HhRkPpM1e86Gf Diff:
Old | New | Differences | |
---|---|---|---|
21 | 21 | let callerAdress = toBase58String(i.caller.bytes) | |
22 | 22 | let tr = split(trans, separ) | |
23 | 23 | let mess = makeString([callerAdress, tr[1], tr[2]], separ) | |
24 | - | if ((cando == callerAdress)) | |
25 | - | then $Tuple2([StringEntry(tr[0], mess), ScriptTransfer(i.caller, 100000000, unit)], unit) | |
26 | - | else throw("Вы не можете to create") | |
24 | + | let pmt = if ((size(i.payments) == 1)) | |
25 | + | then i.payments[0] | |
26 | + | else throw("Attached payment is required") | |
27 | + | if (isDefined(pmt.assetId)) | |
28 | + | then throw("works with waves only") | |
29 | + | else if ((cando == callerAdress)) | |
30 | + | then $Tuple2([StringEntry(tr[0], mess), ScriptTransfer(i.caller, 100000000, unit)], unit) | |
31 | + | else throw("Вы не можете to create") | |
27 | 32 | } | |
28 | 33 | ||
29 | 34 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let cando = "3MuW4t1jCXHt8WRsHVLUar32EnvJxZaQWAx" | |
5 | 5 | ||
6 | 6 | let separ = "|||||" | |
7 | 7 | ||
8 | 8 | @Callable(i) | |
9 | 9 | func create (xy) = { | |
10 | 10 | let callerAdress = toBase58String(i.caller.bytes) | |
11 | 11 | let mess = makeString(["3N377MSFzFdwxW97ENpfqfZLYSnGzSMWvNN", "url", toString(100)], separ) | |
12 | 12 | if ((cando == callerAdress)) | |
13 | 13 | then $Tuple2([StringEntry(xy, mess)], unit) | |
14 | 14 | else throw("Вы не можете to create") | |
15 | 15 | } | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | ||
19 | 19 | @Callable(i) | |
20 | 20 | func change (trans) = { | |
21 | 21 | let callerAdress = toBase58String(i.caller.bytes) | |
22 | 22 | let tr = split(trans, separ) | |
23 | 23 | let mess = makeString([callerAdress, tr[1], tr[2]], separ) | |
24 | - | if ((cando == callerAdress)) | |
25 | - | then $Tuple2([StringEntry(tr[0], mess), ScriptTransfer(i.caller, 100000000, unit)], unit) | |
26 | - | else throw("Вы не можете to create") | |
24 | + | let pmt = if ((size(i.payments) == 1)) | |
25 | + | then i.payments[0] | |
26 | + | else throw("Attached payment is required") | |
27 | + | if (isDefined(pmt.assetId)) | |
28 | + | then throw("works with waves only") | |
29 | + | else if ((cando == callerAdress)) | |
30 | + | then $Tuple2([StringEntry(tr[0], mess), ScriptTransfer(i.caller, 100000000, unit)], unit) | |
31 | + | else throw("Вы не можете to create") | |
27 | 32 | } | |
28 | 33 | ||
29 | 34 |
github/deemru/w8io/026f985 27.05 ms ◑