tx · CzikbkX2EM2uxFbabx5BkK5WWZQTbsqBFcaufvbiipoT 3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6: -0.01000000 Waves 2021.12.05 15:51 [1820984] smart account 3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6 > SELF 0.00000000 Waves
{ "type": 13, "id": "CzikbkX2EM2uxFbabx5BkK5WWZQTbsqBFcaufvbiipoT", "fee": 1000000, "feeAssetId": null, "timestamp": 1638708686068, "version": 2, "chainId": 84, "sender": "3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6", "senderPublicKey": "2LizaCNygFYwGFKe34vvFHgJc4ckK7MpzRzziRNn56Cu", "proofs": [ "npPaav3mzp24yhPoosgEvDLCyfMfdkG38LjiJtA4ugFTnDFtcmmqCQz3KZ4exCpnSqqQbHsdeq84aNFZawrXzyG" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAABgAAAAAJbWFzdGVyYWRyAgAAACMzTXVXNHQxakNYSHQ4V1JzSFZMVWFyMzJFbnZKeFphUVdBeAAAAAAGbWFzdGVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUPUYGSQjhSwi99Mcha5hyYJjHFzCelkk9AAAAAAVzZXBhcgIAAAAFfHx8fHwAAAAACWluY3JwcmljZQAAAAAAAAAAMgAAAAAJaW5pdHByaWNlAgAAAAYxMDAwMDAAAAAACG1hc3JlZmVlAAAAAAAAAAABAAAAAQAAAAFpAQAAAAVwYWludAAAAAEAAAAFaWRhdGEEAAAADGNhbGxlckFkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAdyZXFkYXRhCQAEtQAAAAIFAAAABWlkYXRhAgAAAAMtfC0EAAAABWNvbG9yAwkAAGYAAAACCQABkAAAAAEFAAAAB3JlcWRhdGEAAAAAAAAAAAEJAAGRAAAAAgUAAAAHcmVxZGF0YQAAAAAAAAAAAQIAAAABMAQAAAADdXJsAwkAAGYAAAACCQABkAAAAA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mluZ0VudHJ5AAAAAgkAAZEAAAACCQABkQAAAAIFAAAAA2FsbAAAAAAAAAAACQAAAAAAAAAAAAkAAZEAAAACCQABkQAAAAIFAAAAA2FsbAAAAAAAAAAACQAAAAAAAAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAHQWRkcmVzcwAAAAEJAAJZAAAAAQkAAZEAAAACCQABkQAAAAIFAAAAA2FsbAAAAAAAAAAACQAAAAAAAAAAAgkBAAAADXBhcnNlSW50VmFsdWUAAAABCQABkQAAAAIJAAGRAAAAAgUAAAADYWxsAAAAAAAAAAAJAAAAAAAAAAADBQAAAAR1bml0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgkAAGUAAAACCAUAAAADcG10AAAABmFtb3VudAkBAAAADXBhcnNlSW50VmFsdWUAAAABBQAAAAdwYXltZW50BQAAAAR1bml0BQAAAANuaWwFAAAABHVuaXQAAAAAyFwADA==", "height": 1820984, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6uF5cWudUw3867MK5LRrCN6myCztX4v6p8kkfEqQaisf Next: qT5ijRU8RdYySPanReDugCW7fLuroSSkV1MXfXRJqeg Diff:
Old | New | Differences | |
---|---|---|---|
17 | 17 | func paint (idata) = { | |
18 | 18 | let callerAdress = toBase58String(i.caller.bytes) | |
19 | 19 | let reqdata = split(idata, "-|-") | |
20 | - | let color = if ( | |
20 | + | let color = if ((size(reqdata) > 1)) | |
21 | 21 | then reqdata[1] | |
22 | 22 | else "0" | |
23 | - | let url = if ( | |
23 | + | let url = if ((size(reqdata) > 2)) | |
24 | 24 | then reqdata[2] | |
25 | 25 | else "-" | |
26 | 26 | let pixxy = split(reqdata[0], separ) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let masteradr = "3MuW4t1jCXHt8WRsHVLUar32EnvJxZaQWAx" | |
5 | 5 | ||
6 | 6 | let master = Address(base58'3MuW4t1jCXHt8WRsHVLUar32EnvJxZaQWAx') | |
7 | 7 | ||
8 | 8 | let separ = "|||||" | |
9 | 9 | ||
10 | 10 | let incrprice = 50 | |
11 | 11 | ||
12 | 12 | let initprice = "100000" | |
13 | 13 | ||
14 | 14 | let masrefee = 1 | |
15 | 15 | ||
16 | 16 | @Callable(i) | |
17 | 17 | func paint (idata) = { | |
18 | 18 | let callerAdress = toBase58String(i.caller.bytes) | |
19 | 19 | let reqdata = split(idata, "-|-") | |
20 | - | let color = if ( | |
20 | + | let color = if ((size(reqdata) > 1)) | |
21 | 21 | then reqdata[1] | |
22 | 22 | else "0" | |
23 | - | let url = if ( | |
23 | + | let url = if ((size(reqdata) > 2)) | |
24 | 24 | then reqdata[2] | |
25 | 25 | else "-" | |
26 | 26 | let pixxy = split(reqdata[0], separ) | |
27 | 27 | let number = min([10, size(pixxy)]) | |
28 | 28 | let emptycommand = ["--", "--", masteradr, "0"] | |
29 | 29 | let newrecord = [callerAdress, initprice, color, url] | |
30 | 30 | func validxy (x) = match parseInt(pixxy[x]) { | |
31 | 31 | case a: Int => | |
32 | 32 | if (if ((parseIntValue(pixxy[x]) > -1)) | |
33 | 33 | then (1000 > parseIntValue(pixxy[x])) | |
34 | 34 | else false) | |
35 | 35 | then parseIntValue(pixxy[x]) | |
36 | 36 | else -1 | |
37 | 37 | case _ => | |
38 | 38 | -1 | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | func getrecord (x) = match getString(pixxy[x]) { | |
42 | 42 | case a: String => | |
43 | 43 | getStringValue(pixxy[x]) | |
44 | 44 | case _ => | |
45 | 45 | "" | |
46 | 46 | } | |
47 | 47 | ||
48 | 48 | func command (x) = if (if ((x > (number - 1))) | |
49 | 49 | then true | |
50 | 50 | else (0 > validxy(x))) | |
51 | 51 | then emptycommand | |
52 | 52 | else if ((getrecord(x) == "")) | |
53 | 53 | then [pixxy[x], makeString(newrecord, separ), masteradr, initprice] | |
54 | 54 | else { | |
55 | 55 | let oldrecord = split(getStringValue(pixxy[x]), separ) | |
56 | 56 | let price = parseIntValue(oldrecord[1]) | |
57 | 57 | let receiver = oldrecord[0] | |
58 | 58 | [pixxy[x], makeString([callerAdress, toString(fraction(price, (100 + incrprice), 100)), color, url], separ), receiver, toString(price)] | |
59 | 59 | } | |
60 | 60 | ||
61 | 61 | let all = [command(0), command(1), command(2), command(3), command(4), command(5), command(6), command(7), command(8), command(9)] | |
62 | 62 | let payment = toString((((((((((parseIntValue(all[0][3]) + parseIntValue(all[1][3])) + parseIntValue(all[2][3])) + parseIntValue(all[3][3])) + parseIntValue(all[4][3])) + parseIntValue(all[5][3])) + parseIntValue(all[6][3])) + parseIntValue(all[7][3])) + parseIntValue(all[8][3])) + parseIntValue(all[9][3]))) | |
63 | 63 | let pmt = if ((size(i.payments) == 1)) | |
64 | 64 | then i.payments[0] | |
65 | 65 | else throw(("Attached payment is required: " + payment)) | |
66 | 66 | if (isDefined(pmt.assetId)) | |
67 | 67 | then throw("works with waves only") | |
68 | 68 | else if ((parseIntValue(payment) > pmt.amount)) | |
69 | 69 | then throw(((("you give: " + toString(pmt.amount)) + ", but deal needs: ") + payment)) | |
70 | 70 | else $Tuple2([StringEntry(all[0][0], all[0][1]), ScriptTransfer(Address(fromBase58String(all[0][2])), parseIntValue(all[0][3]), unit), StringEntry(all[1][0], all[1][1]), ScriptTransfer(Address(fromBase58String(all[1][2])), parseIntValue(all[1][3]), unit), StringEntry(all[2][0], all[2][1]), ScriptTransfer(Address(fromBase58String(all[2][2])), parseIntValue(all[2][3]), unit), StringEntry(all[3][0], all[3][1]), ScriptTransfer(Address(fromBase58String(all[3][2])), parseIntValue(all[3][3]), unit), StringEntry(all[4][0], all[4][1]), ScriptTransfer(Address(fromBase58String(all[4][2])), parseIntValue(all[4][3]), unit), StringEntry(all[5][0], all[5][1]), ScriptTransfer(Address(fromBase58String(all[5][2])), parseIntValue(all[5][3]), unit), StringEntry(all[6][0], all[6][1]), ScriptTransfer(Address(fromBase58String(all[6][2])), parseIntValue(all[6][3]), unit), StringEntry(all[7][0], all[7][1]), ScriptTransfer(Address(fromBase58String(all[7][2])), parseIntValue(all[7][3]), unit), StringEntry(all[8][0], all[8][1]), ScriptTransfer(Address(fromBase58String(all[8][2])), parseIntValue(all[8][3]), unit), StringEntry(all[9][0], all[9][1]), ScriptTransfer(Address(fromBase58String(all[9][2])), parseIntValue(all[9][3]), unit), ScriptTransfer(i.caller, (pmt.amount - parseIntValue(payment)), unit)], unit) | |
71 | 71 | } | |
72 | 72 | ||
73 | 73 |
github/deemru/w8io/169f3d6 35.82 ms ◑