tx · 8ZyYmHYVunKjdQ4eBhnJhRwmfsmWH8HdPmt8kBZcQVyn
3Mz3A1UYGJv1646xRXHZzTy4nofAbg4QPaH: -0.01400000 Waves
2023.03.05 01:08 [2475904] smart account 3Mz3A1UYGJv1646xRXHZzTy4nofAbg4QPaH > SELF 0.00000000 Waves
{
"type": 13,
"id": "8ZyYmHYVunKjdQ4eBhnJhRwmfsmWH8HdPmt8kBZcQVyn",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1677967763643,
"version": 2,
"chainId": 84,
"sender": "3Mz3A1UYGJv1646xRXHZzTy4nofAbg4QPaH",
"senderPublicKey": "8wkcC4wZzidr4PipMnDKcJn4CP25PZn9Mj15Tx51kiB9",
"proofs": [
"5z78R2XyY719DLD6NiHdLLS3E1erSKKzjVYCRbJt7YR7jdhnLKKLeK5pvpkqsKqoZSU2FsVvQoMkeVKMYVNAs7b3"
],
"script": "base64:AAIFAAAAAAAAAAQIAhIAAAAAAAAAAAEAAAABaQEAAAAEY2FsbAAAAAAEAAAAA3BtdAMJAAAAAAAAAgkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAkAAAIAAAABAgAAADlObyBwYXltZW50IGF0dGFjaGVkLCBQbGVhc2UgQXR0YWNoICBUb2tlbnMgaW4gcGF5bWVudFsxXS4EAAAAAWEJAARMAAAAAgAAAAAAAKoeyAkABEwAAAACAAAAAAAAEYhIBQAAAANuaWwKAQAAAAhmb2xkRnVuYwAAAAIAAAADYWNjAAAAAWUJAARMAAAAAgkAAGQAAAACBQAAAAFlCAUAAAADcG10AAAABmFtb3VudAUAAAADYWNjBAAAAAx3aW5uaW5nVG9rZW4KAAAAAAIkbAUAAAABYQoAAAAAAiRzCQABkAAAAAEFAAAAAiRsCgAAAAAFJGFjYzAFAAAAA25pbAoBAAAABSRmMF8xAAAAAgAAAAIkYQAAAAIkaQMJAABnAAAAAgUAAAACJGkFAAAAAiRzBQAAAAIkYQkBAAAACGZvbGRGdW5jAAAAAgUAAAACJGEJAAGRAAAAAgUAAAACJGwFAAAAAiRpCgEAAAAFJGYwXzIAAAACAAAAAiRhAAAAAiRpAwkAAGcAAAACBQAAAAIkaQUAAAACJHMFAAAAAiRhCQAAAgAAAAECAAAAE0xpc3Qgc2l6ZSBleGNlZWRzIDIJAQAAAAUkZjBfMgAAAAIJAQAAAAUkZjBfMQAAAAIJAQAAAAUkZjBfMQAAAAIFAAAABSRhY2MwAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAACCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAARMaXN0CQABkQAAAAIFAAAADHdpbm5pbmdUb2tlbgAAAAAAAAAAAAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnlGOKp",
"height": 2475904,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 9xKf5HBMGuYtxBKoruKveWTn9snWhpRZzVfRSjZrtEKG
Next: CRRGwH4MohyuvNyhaK3id6JnHMqkT2GtAc2oswAaAbJ3
Diff:
Old | New | | Differences |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func call () = { |
---|
| 8 | + | let pmt = if ((size(i.payments) == 1)) |
---|
| 9 | + | then i.payments[0] |
---|
| 10 | + | else throw("No payment attached, Please Attach Tokens in payment[1].") |
---|
8 | 11 | | let a = [11149000, 1149000] |
---|
9 | | - | func foldFunc (acc,e) = e :: acc |
---|
| 12 | + | func foldFunc (acc,e) = (e + pmt.amount) :: acc |
---|
10 | 13 | | |
---|
11 | 14 | | let winningToken = { |
---|
12 | 15 | | let $l = a |
---|
|
22 | 25 | | |
---|
23 | 26 | | $f0_2($f0_1($f0_1($acc0, 0), 1), 2) |
---|
24 | 27 | | } |
---|
25 | | - | [IntegerEntry("List", winningToken[2])] |
---|
| 28 | + | [IntegerEntry("List", winningToken[0])] |
---|
26 | 29 | | } |
---|
27 | 30 | | |
---|
28 | 31 | | |
---|
Full:
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 | 7 | | func call () = { |
---|
| 8 | + | let pmt = if ((size(i.payments) == 1)) |
---|
| 9 | + | then i.payments[0] |
---|
| 10 | + | else throw("No payment attached, Please Attach Tokens in payment[1].") |
---|
8 | 11 | | let a = [11149000, 1149000] |
---|
9 | | - | func foldFunc (acc,e) = e :: acc |
---|
| 12 | + | func foldFunc (acc,e) = (e + pmt.amount) :: acc |
---|
10 | 13 | | |
---|
11 | 14 | | let winningToken = { |
---|
12 | 15 | | let $l = a |
---|
13 | 16 | | let $s = size($l) |
---|
14 | 17 | | let $acc0 = nil |
---|
15 | 18 | | func $f0_1 ($a,$i) = if (($i >= $s)) |
---|
16 | 19 | | then $a |
---|
17 | 20 | | else foldFunc($a, $l[$i]) |
---|
18 | 21 | | |
---|
19 | 22 | | func $f0_2 ($a,$i) = if (($i >= $s)) |
---|
20 | 23 | | then $a |
---|
21 | 24 | | else throw("List size exceeds 2") |
---|
22 | 25 | | |
---|
23 | 26 | | $f0_2($f0_1($f0_1($acc0, 0), 1), 2) |
---|
24 | 27 | | } |
---|
25 | | - | [IntegerEntry("List", winningToken[2])] |
---|
| 28 | + | [IntegerEntry("List", winningToken[0])] |
---|
26 | 29 | | } |
---|
27 | 30 | | |
---|
28 | 31 | | |
---|
29 | 32 | | @Verifier(tx) |
---|
30 | 33 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
31 | 34 | | |
---|