tx · HfudnxCJ3gsHv6TDVkFmQ3rkK8aY61DemQoAkrnVFWe6 3My8tTnDkPBZbn7KzhX8iTKXHEEScgViArT: -0.01000000 Waves 2022.01.13 16:42 [1877256] smart account 3My8tTnDkPBZbn7KzhX8iTKXHEEScgViArT > SELF 0.00000000 Waves
{ "type": 13, "id": "HfudnxCJ3gsHv6TDVkFmQ3rkK8aY61DemQoAkrnVFWe6", "fee": 1000000, "feeAssetId": null, "timestamp": 1642081407933, "version": 1, "sender": "3My8tTnDkPBZbn7KzhX8iTKXHEEScgViArT", "senderPublicKey": "6hkJyy3VMiZS1q9uhTTwZenuCbL7Qek9vuQeCqMdJDxD", "proofs": [ "4yc93CSk2c1fomhm3wpoxjpjGYJ88VxzbydnK8oqsHaLLNmBTcSmEt8QqoaHYMY7oDQGoc93C76x2RiE9spXCk7o" ], "script": "base64:AAIFAAAAAAAAAJ8IAhIDCgEIGgYKAWESAWkaDAoBYhIHYWRkcmVzcxoOCgFjEglyZWNpcGllbnQaFAoBZBIPcHJlcGFyZVRyYW5zZmVyGggKAWUSA2FjYxoICgFmEgNwbXQaBwoBZxICJGwaBwoBaBICJHMaCgoBaRIFJGFjYzAaCgoBahIFJGYwXzEaBwoBaxICJGEaBwoBbBICJGkaCgoBbRIFJGYwXzIAAAAAAAAAAQAAAAFhAQAAAAh0cmFuc2ZlcgAAAAEAAAABYgQAAAABYwkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEJgAAAAEFAAAAAWICAAAAC0JhZCBhZGRyZXNzCgEAAAABZAAAAAIAAAABZQAAAAFmCQAETQAAAAIFAAAAAWUJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAAWMIBQAAAAFmAAAABmFtb3VudAgFAAAAAWYAAAAHYXNzZXRJZAMJAAAAAAAAAgkAAZAAAAABCAUAAAABYQAAAAhwYXltZW50cwAAAAAAAAAAAAkAAAIAAAABAgAAACtQbGVhc2UgYXR0YWNoIHBheW1lbnRzLCBub3RoaW5nIHRvIHRyYW5zZmVyCgAAAAABZwgFAAAAAWEAAAAIcGF5bWVudHMKAAAAAAFoCQABkAAAAAEFAAAAAWcKAAAAAAFpBQAAAANuaWwKAQAAAAFqAAAAAgAAAAFrAAAAAWwDCQAAZwAAAAIFAAAAAWwFAAAAAWgFAAAAAWsJAQAAAAFkAAAAAgUAAAABawkAAZEAAAACBQAAAAFnBQAAAAFsCgEAAAABbQAAAAIAAAABawAAAAFsAwkAAGcAAAACBQAAAAFsBQAAAAFoBQAAAAFrCQAAAgAAAAECAAAAFExpc3Qgc2l6ZSBleGNlZWRzIDIwCQEAAAABbQAAAAIJAQAAAAFqAAAAAgkBAAAAAWoAAAACCQEAAAABagAAAAIJAQAAAAFqAAAAAgkBAAAAAWoAAAACCQEAAAABagAAAAIJAQAAAAFqAAAAAgkBAAAAAWoAAAACCQEAAAABagAAAAIJAQAAAAFqAAAAAgkBAAAAAWoAAAACCQEAAAABagAAAAIJAQAAAAFqAAAAAgkBAAAAAWoAAAACCQEAAAABagAAAAIJAQAAAAFqAAAAAgkBAAAAAWoAAAACCQEAAAABagAAAAIJAQAAAAFqAAAAAgkBAAAAAWoAAAACBQAAAAFpAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAACAAAAAAAAAAADAAAAAAAAAAAEAAAAAAAAAAAFAAAAAAAAAAAGAAAAAAAAAAAHAAAAAAAAAAAIAAAAAAAAAAAJAAAAAAAAAAAKAAAAAAAAAAALAAAAAAAAAAAMAAAAAAAAAAANAAAAAAAAAAAOAAAAAAAAAAAPAAAAAAAAAAAQAAAAAAAAAAARAAAAAAAAAAASAAAAAAAAAAATAAAAAAAAAAAUAAAAADJg7E8=", "chainId": 84, "height": 1877256, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AzwNUkRCNPg7PzxzTf4d3LPj81fHMQCjGD3nt1wqdNTq Next: none Diff:
Old | New | Differences | |
---|---|---|---|
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | - | func transfer (address) = if ((size(i.payments) == 0)) | |
8 | - | then throw("Please attach payment, nothing to transfer") | |
9 | - | else { | |
10 | - | let recipient = valueOrErrorMessage(addressFromString(address), "Bad address") | |
11 | - | let pmt = i.payments[0] | |
12 | - | [ScriptTransfer(recipient, pmt.amount, pmt.assetId)] | |
13 | - | } | |
7 | + | func transfer (address) = { | |
8 | + | let recipient = valueOrErrorMessage(addressFromString(address), "Bad address") | |
9 | + | func prepareTransfer (acc,pmt) = (acc :+ ScriptTransfer(recipient, pmt.amount, pmt.assetId)) | |
10 | + | ||
11 | + | if ((size(i.payments) == 0)) | |
12 | + | then throw("Please attach payments, nothing to transfer") | |
13 | + | else { | |
14 | + | let $l = i.payments | |
15 | + | let $s = size($l) | |
16 | + | let $acc0 = nil | |
17 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
18 | + | then $a | |
19 | + | else prepareTransfer($a, $l[$i]) | |
20 | + | ||
21 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
22 | + | then $a | |
23 | + | else throw("List size exceeds 20") | |
24 | + | ||
25 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
26 | + | } | |
27 | + | } | |
14 | 28 | ||
15 | 29 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | - | func transfer (address) = if ((size(i.payments) == 0)) | |
8 | - | then throw("Please attach payment, nothing to transfer") | |
9 | - | else { | |
10 | - | let recipient = valueOrErrorMessage(addressFromString(address), "Bad address") | |
11 | - | let pmt = i.payments[0] | |
12 | - | [ScriptTransfer(recipient, pmt.amount, pmt.assetId)] | |
13 | - | } | |
7 | + | func transfer (address) = { | |
8 | + | let recipient = valueOrErrorMessage(addressFromString(address), "Bad address") | |
9 | + | func prepareTransfer (acc,pmt) = (acc :+ ScriptTransfer(recipient, pmt.amount, pmt.assetId)) | |
10 | + | ||
11 | + | if ((size(i.payments) == 0)) | |
12 | + | then throw("Please attach payments, nothing to transfer") | |
13 | + | else { | |
14 | + | let $l = i.payments | |
15 | + | let $s = size($l) | |
16 | + | let $acc0 = nil | |
17 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
18 | + | then $a | |
19 | + | else prepareTransfer($a, $l[$i]) | |
20 | + | ||
21 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
22 | + | then $a | |
23 | + | else throw("List size exceeds 20") | |
24 | + | ||
25 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
26 | + | } | |
27 | + | } | |
14 | 28 | ||
15 | 29 |
github/deemru/w8io/169f3d6 20.21 ms ◑