tx · 2QkJx1ZTwpUzHKP57ZeG4ePXPNjVt1ew9KywbZHa7aYe
3NCdyrMGZ5jfKPu79jjNiUejWRdQtEwKduD: -0.10000000 Waves
2021.02.01 12:11 [1378906] smart account 3NCdyrMGZ5jfKPu79jjNiUejWRdQtEwKduD > SELF 0.00000000 Waves
{
"type": 13,
"id": "2QkJx1ZTwpUzHKP57ZeG4ePXPNjVt1ew9KywbZHa7aYe",
"fee": 10000000,
"feeAssetId": null,
"timestamp": 1612170779692,
"version": 2,
"chainId": 84,
"sender": "3NCdyrMGZ5jfKPu79jjNiUejWRdQtEwKduD",
"senderPublicKey": "GHCcpQWhq3KPA8MHcLKffvcHoJFXk6bdo67cHXjbpKy1",
"proofs": [
"3DdqZ4ndBN2PFkjFMbw9ugJekeQvNkbrLMKfkEYsMXZ1Wd3LMGez1bpfoDxYFSo9M7FiLsDFd2YjypWHSbxwcUgk"
],
"script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAQEAAAAIZm9sZEZ1bmMAAAACAAAAA3N1bQAAAAFlAwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAAFlAAAAB2Fzc2V0SWQAAAAAAAAAAAAJAABkAAAAAgUAAAADc3VtCAUAAAABZQAAAAZhbW91bnQAAAABAAAAAWkBAAAABHN3YXAAAAAABAAAAANzdW0EAAAACyRsaXN0MjI4MjYwCAUAAAABaQAAAAhwYXltZW50cwQAAAALJHNpemUyMjgyNjAJAAGQAAAAAQUAAAALJGxpc3QyMjgyNjAEAAAACyRhY2MwMjI4MjYwAAAAAAAAAAAAAwkAAAAAAAACBQAAAAskc2l6ZTIyODI2MAAAAAAAAAAAAAUAAAALJGFjYzAyMjgyNjAEAAAACyRhY2MxMjI4MjYwCQEAAAAIZm9sZEZ1bmMAAAACBQAAAAskYWNjMDIyODI2MAkAAZEAAAACBQAAAAskbGlzdDIyODI2MAAAAAAAAAAAAAMJAAAAAAAAAgUAAAALJHNpemUyMjgyNjAAAAAAAAAAAAEFAAAACyRhY2MxMjI4MjYwBAAAAAskYWNjMjIyODI2MAkBAAAACGZvbGRGdW5jAAAAAgUAAAALJGFjYzEyMjgyNjAJAAGRAAAAAgUAAAALJGxpc3QyMjgyNjAAAAAAAAAAAAEJAAACAAAAAQIAAAASTGlzdCBzaXplIGV4Y2VlZCAxBAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAEnh4eEludmVzdG9yQmFsYW5jZQkAASwAAAACCQABLAAAAAIFAAAACmN1cnJlbnRLZXkCAAAAAV8CAAAAB2RlcG9zaXQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAAEnh4eEludmVzdG9yQmFsYW5jZQUAAAADc3VtBQAAAANuaWwAAAAAOOVYYQ==",
"height": 1378906,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: BtZmfEqa5isVS487P4cVNP1L4svRzfqAv7wTaAuXEEE4
Next: 7x7r7sfftvRbA4B6FAYHXUQ4sjVkCDgNR25w9jpN8pcW
Diff:
Old | New | | Differences |
---|
8 | 8 | | |
---|
9 | 9 | | @Callable(i) |
---|
10 | 10 | | func swap () = { |
---|
11 | | - | let sum = 0 |
---|
| 11 | + | let sum = { |
---|
| 12 | + | let $list228260 = i.payments |
---|
| 13 | + | let $size228260 = size($list228260) |
---|
| 14 | + | let $acc0228260 = 0 |
---|
| 15 | + | if (($size228260 == 0)) |
---|
| 16 | + | then $acc0228260 |
---|
| 17 | + | else { |
---|
| 18 | + | let $acc1228260 = foldFunc($acc0228260, $list228260[0]) |
---|
| 19 | + | if (($size228260 == 1)) |
---|
| 20 | + | then $acc1228260 |
---|
| 21 | + | else { |
---|
| 22 | + | let $acc2228260 = foldFunc($acc1228260, $list228260[1]) |
---|
| 23 | + | throw("List size exceed 1") |
---|
| 24 | + | } |
---|
| 25 | + | } |
---|
| 26 | + | } |
---|
12 | 27 | | let currentKey = toBase58String(i.caller.bytes) |
---|
13 | 28 | | let xxxInvestorBalance = ((currentKey + "_") + "deposit") |
---|
14 | 29 | | [IntegerEntry(xxxInvestorBalance, sum)] |
---|
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 | | - | let sum = 0 |
---|
| 11 | + | let sum = { |
---|
| 12 | + | let $list228260 = i.payments |
---|
| 13 | + | let $size228260 = size($list228260) |
---|
| 14 | + | let $acc0228260 = 0 |
---|
| 15 | + | if (($size228260 == 0)) |
---|
| 16 | + | then $acc0228260 |
---|
| 17 | + | else { |
---|
| 18 | + | let $acc1228260 = foldFunc($acc0228260, $list228260[0]) |
---|
| 19 | + | if (($size228260 == 1)) |
---|
| 20 | + | then $acc1228260 |
---|
| 21 | + | else { |
---|
| 22 | + | let $acc2228260 = foldFunc($acc1228260, $list228260[1]) |
---|
| 23 | + | throw("List size exceed 1") |
---|
| 24 | + | } |
---|
| 25 | + | } |
---|
| 26 | + | } |
---|
12 | 27 | | let currentKey = toBase58String(i.caller.bytes) |
---|
13 | 28 | | let xxxInvestorBalance = ((currentKey + "_") + "deposit") |
---|
14 | 29 | | [IntegerEntry(xxxInvestorBalance, sum)] |
---|
15 | 30 | | } |
---|
16 | 31 | | |
---|
17 | 32 | | |
---|