tx · 5TNbaMjkQCQLLwXn3fCakJy7wcH3BEAUrFpvEgmMRyv6
3N49shcErzZepEy7HDR1fjAce8humpL7QiH: -0.01000000 Waves
2022.12.18 13:52 [2365637] smart account 3N49shcErzZepEy7HDR1fjAce8humpL7QiH > SELF 0.00000000 Waves
{
"type": 13,
"id": "5TNbaMjkQCQLLwXn3fCakJy7wcH3BEAUrFpvEgmMRyv6",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1671360775807,
"version": 2,
"chainId": 84,
"sender": "3N49shcErzZepEy7HDR1fjAce8humpL7QiH",
"senderPublicKey": "9frGdXQHcSntKXRWwZ4YJZWnnKREWwYH4cEzMVQwcwYj",
"proofs": [
"5svKXagaN6LdgEqNcMyhEGLxfYRNojeHFLQXHjWr9DWJoJQbv5YFNB85o7N3vws63V8UKDvaPLwmgkGGpKuwTTXk"
],
"script": "base64:BgIHCAISAwoBAQMAClVTRE5fQVNTRVQBILYmKcME9c5TkaQOS3UkL2SMUbH6369UKb1I0h0qsqrRAAdmZWVUYW5rCQEHQWRkcmVzcwEBGgFU9GvUVJNFXoSXj7xOmWa1IymKLYRQVnz/AANjNWEJAMwIAgkAzAgCCQEHQWRkcmVzcwEBGgFUS3fm+75TnNg+HnuLfNvwkPafVr1SF5SWCQDMCAIJAQdBZGRyZXNzAQEaAVRLd+b7vlOc2D4ee4t82/CQ9p9WvVIXlJYJAMwIAgkBB0FkZHJlc3MBARoBVEt35vu+U5zYPh57i3zb8JD2n1a9UheUlgkAzAgCCQEHQWRkcmVzcwEBGgFUS3fm+75TnNg+HnuLfNvwkPafVr1SF5SWCQDMCAIJAQdBZGRyZXNzAQEaAVRLd+b7vlOc2D4ee4t82/CQ9p9WvVIXlJYFA25pbAUDbmlsAQFpAQJjNQECY2kKAQF3AgVhY2N1bQdhZGRyZXNzBANyZXMJAPwHBAUHYWRkcmVzcwICdmYFA25pbAUDbmlsAwkAAAIFA3JlcwUDcmVzBAckbWF0Y2gwBQNyZXMDCQABAgUHJG1h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lib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5CQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5qic/yw==",
"height": 2365637,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: qtbp8vGH9uXgQ1NFuADk2MKRf6Kx7VUEjmV8b7k6yoS
Next: H2FPthrNJeXCLF4fxMEcmxWQTzWy35CGtJP5Vu6eAn9j
Diff:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
| 4 | + | let USDN_ASSET = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' |
---|
| 5 | + | |
---|
4 | 6 | | let feeTank = Address(base58'3NCCTpr3CvajyxfmNGFv2nzx6iajXDk2zPg') |
---|
5 | 7 | | |
---|
6 | 8 | | let c5a = [[Address(base58'3Mvo86GH3NdYW1XXd6h6YpGFef5Y5WNVYgM'), Address(base58'3Mvo86GH3NdYW1XXd6h6YpGFef5Y5WNVYgM'), Address(base58'3Mvo86GH3NdYW1XXd6h6YpGFef5Y5WNVYgM'), Address(base58'3Mvo86GH3NdYW1XXd6h6YpGFef5Y5WNVYgM'), Address(base58'3Mvo86GH3NdYW1XXd6h6YpGFef5Y5WNVYgM')]] |
---|
|
8 | 10 | | @Callable(i) |
---|
9 | 11 | | func c5 (ci) = { |
---|
10 | 12 | | func w (accum,address) = { |
---|
11 | | - | let res = invoke(address, "vf", [false, true], nil) |
---|
| 13 | + | let res = invoke(address, "vf", nil, nil) |
---|
12 | 14 | | if ((res == res)) |
---|
13 | 15 | | then match res { |
---|
14 | 16 | | case res: Int => |
---|
15 | 17 | | (accum + res) |
---|
16 | 18 | | case _ => |
---|
17 | | - | throw("Res not Int") |
---|
| 19 | + | throw("res not Int") |
---|
18 | 20 | | } |
---|
19 | 21 | | else throw("Strict value is not equal to itself.") |
---|
20 | 22 | | } |
---|
|
23 | 25 | | then throw("only admin allowed") |
---|
24 | 26 | | else { |
---|
25 | 27 | | let addr = c5a[ci] |
---|
26 | | - | let resFold = { |
---|
| 28 | + | let fold = { |
---|
27 | 29 | | let $l = addr |
---|
28 | 30 | | let $s = size($l) |
---|
29 | 31 | | let $acc0 = 0 |
---|
|
37 | 39 | | |
---|
38 | 40 | | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) |
---|
39 | 41 | | } |
---|
40 | | - | if ((resFold == resFold)) |
---|
| 42 | + | if ((fold == fold)) |
---|
41 | 43 | | then { |
---|
42 | 44 | | let gFee = invoke(feeTank, "smf", [i.fee], nil) |
---|
43 | 45 | | if ((gFee == gFee)) |
---|
44 | | - | then match resFold { |
---|
45 | | - | case resFold: Int => |
---|
46 | | - | [IntegerEntry("resFold", (valueOrElse(getInteger("resFold"), 0) + resFold))] |
---|
| 46 | + | then match fold { |
---|
| 47 | + | case sumFees: Int => |
---|
| 48 | + | [ScriptTransfer(feeTank, sumFees, unit)] |
---|
47 | 49 | | case _ => |
---|
48 | | - | throw("Res not Int") |
---|
| 50 | + | throw("sumFees not Int") |
---|
49 | 51 | | } |
---|
50 | 52 | | else throw("Strict value is not equal to itself.") |
---|
51 | 53 | | } |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
| 4 | + | let USDN_ASSET = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' |
---|
| 5 | + | |
---|
4 | 6 | | let feeTank = Address(base58'3NCCTpr3CvajyxfmNGFv2nzx6iajXDk2zPg') |
---|
5 | 7 | | |
---|
6 | 8 | | let c5a = [[Address(base58'3Mvo86GH3NdYW1XXd6h6YpGFef5Y5WNVYgM'), Address(base58'3Mvo86GH3NdYW1XXd6h6YpGFef5Y5WNVYgM'), Address(base58'3Mvo86GH3NdYW1XXd6h6YpGFef5Y5WNVYgM'), Address(base58'3Mvo86GH3NdYW1XXd6h6YpGFef5Y5WNVYgM'), Address(base58'3Mvo86GH3NdYW1XXd6h6YpGFef5Y5WNVYgM')]] |
---|
7 | 9 | | |
---|
8 | 10 | | @Callable(i) |
---|
9 | 11 | | func c5 (ci) = { |
---|
10 | 12 | | func w (accum,address) = { |
---|
11 | | - | let res = invoke(address, "vf", [false, true], nil) |
---|
| 13 | + | let res = invoke(address, "vf", nil, nil) |
---|
12 | 14 | | if ((res == res)) |
---|
13 | 15 | | then match res { |
---|
14 | 16 | | case res: Int => |
---|
15 | 17 | | (accum + res) |
---|
16 | 18 | | case _ => |
---|
17 | | - | throw("Res not Int") |
---|
| 19 | + | throw("res not Int") |
---|
18 | 20 | | } |
---|
19 | 21 | | else throw("Strict value is not equal to itself.") |
---|
20 | 22 | | } |
---|
21 | 23 | | |
---|
22 | 24 | | if ((i.caller != this)) |
---|
23 | 25 | | then throw("only admin allowed") |
---|
24 | 26 | | else { |
---|
25 | 27 | | let addr = c5a[ci] |
---|
26 | | - | let resFold = { |
---|
| 28 | + | let fold = { |
---|
27 | 29 | | let $l = addr |
---|
28 | 30 | | let $s = size($l) |
---|
29 | 31 | | let $acc0 = 0 |
---|
30 | 32 | | func $f0_1 ($a,$i) = if (($i >= $s)) |
---|
31 | 33 | | then $a |
---|
32 | 34 | | else w($a, $l[$i]) |
---|
33 | 35 | | |
---|
34 | 36 | | func $f0_2 ($a,$i) = if (($i >= $s)) |
---|
35 | 37 | | then $a |
---|
36 | 38 | | else throw("List size exceeds 5") |
---|
37 | 39 | | |
---|
38 | 40 | | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) |
---|
39 | 41 | | } |
---|
40 | | - | if ((resFold == resFold)) |
---|
| 42 | + | if ((fold == fold)) |
---|
41 | 43 | | then { |
---|
42 | 44 | | let gFee = invoke(feeTank, "smf", [i.fee], nil) |
---|
43 | 45 | | if ((gFee == gFee)) |
---|
44 | | - | then match resFold { |
---|
45 | | - | case resFold: Int => |
---|
46 | | - | [IntegerEntry("resFold", (valueOrElse(getInteger("resFold"), 0) + resFold))] |
---|
| 46 | + | then match fold { |
---|
| 47 | + | case sumFees: Int => |
---|
| 48 | + | [ScriptTransfer(feeTank, sumFees, unit)] |
---|
47 | 49 | | case _ => |
---|
48 | | - | throw("Res not Int") |
---|
| 50 | + | throw("sumFees not Int") |
---|
49 | 51 | | } |
---|
50 | 52 | | else throw("Strict value is not equal to itself.") |
---|
51 | 53 | | } |
---|
52 | 54 | | else throw("Strict value is not equal to itself.") |
---|
53 | 55 | | } |
---|
54 | 56 | | } |
---|
55 | 57 | | |
---|
56 | 58 | | |
---|
57 | 59 | | @Verifier(tx) |
---|
58 | 60 | | func verify () = match tx { |
---|
59 | 61 | | case inv: InvokeScriptTransaction => |
---|
60 | 62 | | if ((addressFromRecipient(inv.dApp) == this)) |
---|
61 | 63 | | then true |
---|
62 | 64 | | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
63 | 65 | | case _ => |
---|
64 | 66 | | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
65 | 67 | | } |
---|
66 | 68 | | |
---|