tx · 7x7r7sfftvRbA4B6FAYHXUQ4sjVkCDgNR25w9jpN8pcW
3NCdyrMGZ5jfKPu79jjNiUejWRdQtEwKduD: -0.10000000 Waves
2021.02.01 12:14 [1378908] smart account 3NCdyrMGZ5jfKPu79jjNiUejWRdQtEwKduD > SELF 0.00000000 Waves
{
"type": 13,
"id": "7x7r7sfftvRbA4B6FAYHXUQ4sjVkCDgNR25w9jpN8pcW",
"fee": 10000000,
"feeAssetId": null,
"timestamp": 1612170902012,
"version": 2,
"chainId": 84,
"sender": "3NCdyrMGZ5jfKPu79jjNiUejWRdQtEwKduD",
"senderPublicKey": "GHCcpQWhq3KPA8MHcLKffvcHoJFXk6bdo67cHXjbpKy1",
"proofs": [
"3SCniVNf5NBaSHU4rBFgeP4jgwns8xFgL2NJ2LJ3A3hhbriFx7v2MsdTtY3NrWWrvKLJ1hJeZYZLsjBUWw4zYYiP"
],
"script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAQEAAAAIZm9sZEZ1bmMAAAACAAAAA3N1bQAAAAFlAwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAAFlAAAAB2Fzc2V0SWQAAAAAAAAAAAAJAABkAAAAAgUAAAADc3VtCAUAAAABZQAAAAZhbW91bnQAAAABAAAAAWkBAAAABHN3YXAAAAAABAAAAANzdW0EAAAACyRsaXN0MjI4MjYwCAUAAAABaQAAAAhwYXltZW50cwQAAAALJHNpemUyMjgyNjAJAAGQAAAAAQUAAAALJGxpc3QyMjgyNjAEAAAACyRhY2MwMjI4MjYwAAAAAAAAAAAAAwkAAAAAAAACBQAAAAskc2l6ZTIyODI2MAAAAAAAAAAAAAUAAAALJGFjYzAyMjgyNjAEAAAACyRhY2MxMjI4MjYwCQEAAAAIZm9sZEZ1bmMAAAACBQAAAAskYWNjMDIyODI2MAkAAZEAAAACBQAAAAskbGlzdDIyODI2MAAAAAAAAAAAAAMJAAAAAAAAAgUAAAALJHNpemUyMjgyNjAAAAAAAAAAAAEFAAAACyRhY2MxM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ABJ4eHhJbnZlc3RvckJhbGFuY2UFAAAAA3N1bQUAAAADbmlsAAAAAJRo0n4=",
"height": 1378908,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 2QkJx1ZTwpUzHKP57ZeG4ePXPNjVt1ew9KywbZHa7aYe
Next: 442judYMPUs2LB3wWr41trT2xo35cbXuGVWhy4TaVwB1
Diff:
Old | New | | Differences |
---|
20 | 20 | | then $acc1228260 |
---|
21 | 21 | | else { |
---|
22 | 22 | | let $acc2228260 = foldFunc($acc1228260, $list228260[1]) |
---|
23 | | - | throw("List size exceed 1") |
---|
| 23 | + | if (($size228260 == 2)) |
---|
| 24 | + | then $acc2228260 |
---|
| 25 | + | else { |
---|
| 26 | + | let $acc3228260 = foldFunc($acc2228260, $list228260[2]) |
---|
| 27 | + | if (($size228260 == 3)) |
---|
| 28 | + | then $acc3228260 |
---|
| 29 | + | else { |
---|
| 30 | + | let $acc4228260 = foldFunc($acc3228260, $list228260[3]) |
---|
| 31 | + | if (($size228260 == 4)) |
---|
| 32 | + | then $acc4228260 |
---|
| 33 | + | else { |
---|
| 34 | + | let $acc5228260 = foldFunc($acc4228260, $list228260[4]) |
---|
| 35 | + | if (($size228260 == 5)) |
---|
| 36 | + | then $acc5228260 |
---|
| 37 | + | else { |
---|
| 38 | + | let $acc6228260 = foldFunc($acc5228260, $list228260[5]) |
---|
| 39 | + | throw("List size exceed 5") |
---|
| 40 | + | } |
---|
| 41 | + | } |
---|
| 42 | + | } |
---|
| 43 | + | } |
---|
24 | 44 | | } |
---|
25 | 45 | | } |
---|
26 | 46 | | } |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | func foldFunc (sum,e) = if (isDefined(e.assetId)) |
---|
5 | 5 | | then 0 |
---|
6 | 6 | | else (sum + e.amount) |
---|
7 | 7 | | |
---|
8 | 8 | | |
---|
9 | 9 | | @Callable(i) |
---|
10 | 10 | | func swap () = { |
---|
11 | 11 | | let sum = { |
---|
12 | 12 | | let $list228260 = i.payments |
---|
13 | 13 | | let $size228260 = size($list228260) |
---|
14 | 14 | | let $acc0228260 = 0 |
---|
15 | 15 | | if (($size228260 == 0)) |
---|
16 | 16 | | then $acc0228260 |
---|
17 | 17 | | else { |
---|
18 | 18 | | let $acc1228260 = foldFunc($acc0228260, $list228260[0]) |
---|
19 | 19 | | if (($size228260 == 1)) |
---|
20 | 20 | | then $acc1228260 |
---|
21 | 21 | | else { |
---|
22 | 22 | | let $acc2228260 = foldFunc($acc1228260, $list228260[1]) |
---|
23 | | - | throw("List size exceed 1") |
---|
| 23 | + | if (($size228260 == 2)) |
---|
| 24 | + | then $acc2228260 |
---|
| 25 | + | else { |
---|
| 26 | + | let $acc3228260 = foldFunc($acc2228260, $list228260[2]) |
---|
| 27 | + | if (($size228260 == 3)) |
---|
| 28 | + | then $acc3228260 |
---|
| 29 | + | else { |
---|
| 30 | + | let $acc4228260 = foldFunc($acc3228260, $list228260[3]) |
---|
| 31 | + | if (($size228260 == 4)) |
---|
| 32 | + | then $acc4228260 |
---|
| 33 | + | else { |
---|
| 34 | + | let $acc5228260 = foldFunc($acc4228260, $list228260[4]) |
---|
| 35 | + | if (($size228260 == 5)) |
---|
| 36 | + | then $acc5228260 |
---|
| 37 | + | else { |
---|
| 38 | + | let $acc6228260 = foldFunc($acc5228260, $list228260[5]) |
---|
| 39 | + | throw("List size exceed 5") |
---|
| 40 | + | } |
---|
| 41 | + | } |
---|
| 42 | + | } |
---|
| 43 | + | } |
---|
24 | 44 | | } |
---|
25 | 45 | | } |
---|
26 | 46 | | } |
---|
27 | 47 | | let currentKey = toBase58String(i.caller.bytes) |
---|
28 | 48 | | let xxxInvestorBalance = ((currentKey + "_") + "deposit") |
---|
29 | 49 | | [IntegerEntry(xxxInvestorBalance, sum)] |
---|
30 | 50 | | } |
---|
31 | 51 | | |
---|
32 | 52 | | |
---|