tx · 8pjN9uwrC3FatStX2FdQFWQQAfK1jXDaFgz5oZjBE95m
3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx: -0.01000000 Waves
2023.03.27 12:14 [2508189] smart account 3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx > SELF 0.00000000 Waves
{
"type": 13,
"id": "8pjN9uwrC3FatStX2FdQFWQQAfK1jXDaFgz5oZjBE95m",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1679908618120,
"version": 2,
"chainId": 84,
"sender": "3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx",
"senderPublicKey": "DyeDJ3fgwVVux2WRkxpLU9BbVjTM96AyV58b7bRFzCBx",
"proofs": [
"4ykfsvUe9v1ak3zcdk7TUwurWjTzZBDFmfW5Pad7vymnDRPhJncn95TcQyamtPdzFaosdfFjYVvHBghwWnKb3pcC"
],
"script": "base64:BgIHCAISAwoBGAABAWkBBmJ1eU5mdAEEbmZ0cwQFYnV5ZXIIBQFpBmNhbGxlcgQBYQUEbmZ0cwoBCGZvbGRGdW5jAgNhY2MBZQUBZQQFZmluYWwKAAIkbAUBYQoAAiRzCQCQAwEFAiRsCgAFJGFjYzAAAAoBBSRmMF8xAgIkYQIkaQMJAGcCBQIkaQUCJHMFAiRhCQEIZm9sZEZ1bmMCBQIkYQkAkQMCBQIkbAUCJGkKAQUkZjBfMgICJGECJGkDCQBnAgUCJGkFAiRzBQIkYQkAAgECE0xpc3Qgc2l6ZSBleGNlZWRzIDUJAQUkZjBfMgIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIFBSRhY2MwAAAAAQACAAMABAAFCQDMCAIJAQtTdHJpbmdFbnRyeQICBWZpbmFsCQCkAwEFBWZpbmFsBQNuaWwABuKM2w==",
"height": 2508189,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: D3y2GGR67oNVCg2Se978p8pJYXBjBfAPdry3zCr3266V
Next: 5Hwyc725iPcw68nQF23TSJiozzApnMPGGiKWm4xGTxNz
Diff:
Old | New | | Differences |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func buyNft (nfts) = { |
---|
8 | 8 | | let buyer = i.caller |
---|
9 | | - | let a = [1, 2, 3, 4, 5] |
---|
10 | | - | func foldFunc (acc,e) = (acc + e) |
---|
| 9 | + | let a = nfts |
---|
| 10 | + | func foldFunc (acc,e) = e |
---|
11 | 11 | | |
---|
12 | 12 | | let final = { |
---|
13 | 13 | | let $l = a |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func buyNft (nfts) = { |
---|
8 | 8 | | let buyer = i.caller |
---|
9 | | - | let a = [1, 2, 3, 4, 5] |
---|
10 | | - | func foldFunc (acc,e) = (acc + e) |
---|
| 9 | + | let a = nfts |
---|
| 10 | + | func foldFunc (acc,e) = e |
---|
11 | 11 | | |
---|
12 | 12 | | let final = { |
---|
13 | 13 | | let $l = a |
---|
14 | 14 | | let $s = size($l) |
---|
15 | 15 | | let $acc0 = 0 |
---|
16 | 16 | | func $f0_1 ($a,$i) = if (($i >= $s)) |
---|
17 | 17 | | then $a |
---|
18 | 18 | | else foldFunc($a, $l[$i]) |
---|
19 | 19 | | |
---|
20 | 20 | | func $f0_2 ($a,$i) = if (($i >= $s)) |
---|
21 | 21 | | then $a |
---|
22 | 22 | | else throw("List size exceeds 5") |
---|
23 | 23 | | |
---|
24 | 24 | | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) |
---|
25 | 25 | | } |
---|
26 | 26 | | [StringEntry("final", toString(final))] |
---|
27 | 27 | | } |
---|
28 | 28 | | |
---|
29 | 29 | | |
---|