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