tx · Dw5RnSGvs7v8jz76KMewNAS473Fwxx6hW7uaJFvmDgso 3N377MSFzFdwxW97ENpfqfZLYSnGzSMWvNN: -0.01000000 Waves 2021.12.03 20:46 [1818423] smart account 3N377MSFzFdwxW97ENpfqfZLYSnGzSMWvNN > SELF 0.00000000 Waves
{ "type": 13, "id": "Dw5RnSGvs7v8jz76KMewNAS473Fwxx6hW7uaJFvmDgso", "fee": 1000000, "feeAssetId": null, "timestamp": 1638553630377, "version": 2, "chainId": 84, "sender": "3N377MSFzFdwxW97ENpfqfZLYSnGzSMWvNN", "senderPublicKey": "3TJhvM5a7VSAiRyvEVwygRkiPC9ow5nM4LQ252H4vxWK", "proofs": [ "51R9ThsriuVHWYNy9dAztEHYuo2qcYnBHXkEyqF1zYofYHY5Y5vH1WyFPFkoTp9am3EmYBmUXuhTqtg6qYyJChys" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAAAgAAAAAGbWFzdGVyAgAAACMzTXVXNHQxakNYSHQ4V1JzSFZMVWFyMzJFbnZKeFphUVdBeAAAAAAFc2VwYXICAAAABXx8fHx8AAAAAQAAAAFpAQAAAAVwYWludAAAAAEAAAAFaWRhdGEEAAAADGNhbGxlckFkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwaXh4eQkABLUAAAACBQAAAAVpZGF0YQUAAAAFc2VwYXIEAAAAB3JlY29yZHMFAAAAA25pbAoBAAAAB3ZhbGlkeHkAAAABAAAAAXgEAAAAByRtYXRjaDAJAAS2AAAAAQkAAZEAAAACBQAAAAVwaXh4eQUAAAABeAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwAwMJAABmAAAAAgkBAAAADXBhcnNlSW50VmFsdWUAAAABCQABkQAAAAIFAAAABXBpeHh5BQAAAAF4AP//////////CQAAZgAAAAIAAAAAAAAAA+gJAQAAAA1wYXJzZUludFZhbHVlAAAAAQkAAZE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EwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABkQAAAAIFAAAAA3JlcwAAAAAAAAAAAAkAAZEAAAACBQAAAANyZXMAAAAAAAAAAAEFAAAAA25pbAUAAAAEdW5pdAAAAACbNvOA", "height": 1818423, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CNnzQaBHNRiW3JUtG5zPncmtU8Hh7woDo7WoAubm6Tt7 Next: AmA6T9GqiqKNdUWgEDbt5v5JZLHnLdDLJqZQWkSU9m7b Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | ||
8 | 8 | @Callable(i) | |
9 | 9 | func paint (idata) = { | |
10 | - | let maxi = 1 | |
11 | - | let pixi = 0 | |
12 | 10 | let callerAdress = toBase58String(i.caller.bytes) | |
13 | 11 | let pixxy = split(idata, separ) | |
14 | - | let | |
15 | - | func | |
12 | + | let records = nil | |
13 | + | func validxy (x) = match parseInt(pixxy[x]) { | |
16 | 14 | case a: Int => | |
17 | - | parseInt(pixxy[x]) | |
15 | + | if (if ((parseIntValue(pixxy[x]) > -1)) | |
16 | + | then (1000 > parseIntValue(pixxy[x])) | |
17 | + | else false) | |
18 | + | then parseInt(pixxy[x]) | |
19 | + | else false | |
18 | 20 | case _ => | |
19 | 21 | false | |
20 | 22 | } | |
26 | 28 | false | |
27 | 29 | } | |
28 | 30 | ||
29 | - | if (( | |
30 | - | then | |
31 | - | else | |
32 | - | | |
33 | - | | |
34 | - | | |
35 | - | ||
36 | - | | |
37 | - | ||
38 | - | | |
39 | - | | |
40 | - | | |
31 | + | func makerecord (x) = if ((validxy(x) == false)) | |
32 | + | then ["--", "--"] | |
33 | + | else if ((getrecord(x) == false)) | |
34 | + | then [pixxy[x], makeString([callerAdress, "100", "color", "url"], separ)] | |
35 | + | else { | |
36 | + | let price = (parseIntValue(split(getStringValue(pixxy[x]), separ)[1]) + 100) | |
37 | + | [pixxy[x], makeString([callerAdress, toString(price), "color", "url"], separ)] | |
38 | + | } | |
39 | + | ||
40 | + | let x = 0 | |
41 | + | let res = makerecord(x) | |
42 | + | $Tuple2([StringEntry(res[0], res[1])], unit) | |
41 | 43 | } | |
42 | 44 | ||
43 | 45 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let master = "3MuW4t1jCXHt8WRsHVLUar32EnvJxZaQWAx" | |
5 | 5 | ||
6 | 6 | let separ = "|||||" | |
7 | 7 | ||
8 | 8 | @Callable(i) | |
9 | 9 | func paint (idata) = { | |
10 | - | let maxi = 1 | |
11 | - | let pixi = 0 | |
12 | 10 | let callerAdress = toBase58String(i.caller.bytes) | |
13 | 11 | let pixxy = split(idata, separ) | |
14 | - | let | |
15 | - | func | |
12 | + | let records = nil | |
13 | + | func validxy (x) = match parseInt(pixxy[x]) { | |
16 | 14 | case a: Int => | |
17 | - | parseInt(pixxy[x]) | |
15 | + | if (if ((parseIntValue(pixxy[x]) > -1)) | |
16 | + | then (1000 > parseIntValue(pixxy[x])) | |
17 | + | else false) | |
18 | + | then parseInt(pixxy[x]) | |
19 | + | else false | |
18 | 20 | case _ => | |
19 | 21 | false | |
20 | 22 | } | |
21 | 23 | ||
22 | 24 | func getrecord (x) = match getString(pixxy[x]) { | |
23 | 25 | case a: String => | |
24 | 26 | a | |
25 | 27 | case _ => | |
26 | 28 | false | |
27 | 29 | } | |
28 | 30 | ||
29 | - | if (( | |
30 | - | then | |
31 | - | else | |
32 | - | | |
33 | - | | |
34 | - | | |
35 | - | ||
36 | - | | |
37 | - | ||
38 | - | | |
39 | - | | |
40 | - | | |
31 | + | func makerecord (x) = if ((validxy(x) == false)) | |
32 | + | then ["--", "--"] | |
33 | + | else if ((getrecord(x) == false)) | |
34 | + | then [pixxy[x], makeString([callerAdress, "100", "color", "url"], separ)] | |
35 | + | else { | |
36 | + | let price = (parseIntValue(split(getStringValue(pixxy[x]), separ)[1]) + 100) | |
37 | + | [pixxy[x], makeString([callerAdress, toString(price), "color", "url"], separ)] | |
38 | + | } | |
39 | + | ||
40 | + | let x = 0 | |
41 | + | let res = makerecord(x) | |
42 | + | $Tuple2([StringEntry(res[0], res[1])], unit) | |
41 | 43 | } | |
42 | 44 | ||
43 | 45 |
github/deemru/w8io/026f985 29.57 ms ◑