tx · 7iC7mu1Ypd9r4Wh6ejhkifbdYFzdXcu3uKNhwek3jsEw 3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6: -0.01000000 Waves 2021.12.05 12:35 [1820795] smart account 3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6 > SELF 0.00000000 Waves
{ "type": 13, "id": "7iC7mu1Ypd9r4Wh6ejhkifbdYFzdXcu3uKNhwek3jsEw", "fee": 1000000, "feeAssetId": null, "timestamp": 1638696991893, "version": 2, "chainId": 84, "sender": "3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6", "senderPublicKey": "2LizaCNygFYwGFKe34vvFHgJc4ckK7MpzRzziRNn56Cu", "proofs": [ "23s6cR9TG23xkTaZKAzk6fua12naQizjPahiGqd5Gz6HBebJofndDqrFMWrMDAB6Tdf8Wvp5k5fAy2QaSyv4fGWN" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAAAwAAAAAGbWFzdGVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUPUYGSQjhSwi99Mcha5hyYJjHFzCelkk9AAAAAAVzZXBhcgIAAAAFfHx8fHwAAAAACWluaXRwcmljZQIAAAAGMTAwMDAwAAAAAQAAAAFpAQAAAAVwYWludAAAAAEAAAAFaWRhdGEEAAAADGNhbGxlckFkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwaXh4eQkABLUAAAACBQAAAAVpZGF0YQUAAAAFc2VwYXIEAAAABm51bWJlcgkAAZcAAAABCQAETAAAAAIAAAAAAAAAAAUJAARMAAAAAgkAAZAAAAABBQAAAAVwaXh4eQUAAAADbmlsBAAAAAxlbXB0eWNvbW1hbmQJAARMAAAAAgIAAAACLS0JAARMAAAAAgIAAAACLS0JAARMAAAAAgIAAAACLS0JAARMAAAAAgIAAAABMAUAAAADbmlsBAAAAAluZXdyZWNvcmQJAARMAAAAAgUAAAAMY2FsbGVyQWRyZXNzCQAETAAAAAIFAAA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AAAMAAAAAAAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAB0FkZHJlc3MAAAABCQACWQAAAAEJAAGRAAAAAgkAAZEAAAACBQAAAANhbGwAAAAAAAAAAAMAAAAAAAAAAAIJAQAAAA1wYXJzZUludFZhbHVlAAAAAQkAAZEAAAACCQABkQAAAAIFAAAAA2FsbAAAAAAAAAAAAwAAAAAAAAAAAwUAAAAEdW5pdAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABkQAAAAIJAAGRAAAAAgUAAAADYWxsAAAAAAAAAAAEAAAAAAAAAAAACQABkQAAAAIJAAGRAAAAAgUAAAADYWxsAAAAAAAAAAAEAAAAAAAAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAAAdBZGRyZXNzAAAAAQkAAlkAAAABCQABkQAAAAIJAAGRAAAAAgUAAAADYWxsAAAAAAAAAAAEAAAAAAAAAAACCQEAAAANcGFyc2VJbnRWYWx1ZQAAAAEJAAGRAAAAAgkAAZEAAAACBQAAAANhbGwAAAAAAAAAAAQAAAAAAAAAAAMFAAAABHVuaXQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyCQAAZQAAAAIIBQAAAANwbXQAAAAGYW1vdW50CQEAAAANcGFyc2VJbnRWYWx1ZQAAAAEFAAAAB3BheW1lbnQFAAAABHVuaXQFAAAAA25pbAUAAAAEdW5pdAAAAADYGHzw", "height": 1820795, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 42sDPtpArEK2gwR6xBhzArBTrLnUdbGVPaKdCt2zHWMi Next: AvTc6eoh2aFKnwkwcMNNVoQyYmrjt1isw8QCVyuzkV4k Diff:
Old | New | Differences | |
---|---|---|---|
37 | 37 | else (0 > validxy(x))) | |
38 | 38 | then emptycommand | |
39 | 39 | else if ((getrecord(x) == "")) | |
40 | - | then [pixxy[x], makeString(newrecord, separ), " | |
40 | + | then [pixxy[x], makeString(newrecord, separ), "3MuW4t1jCXHt8WRsHVLUar32EnvJxZaQWAx", initprice] | |
41 | 41 | else { | |
42 | 42 | let oldrecord = split(getStringValue(pixxy[x]), separ) | |
43 | 43 | let price = parseIntValue(oldrecord[1]) |
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 | @Callable(i) | |
11 | 11 | func paint (idata) = { | |
12 | 12 | let callerAdress = toBase58String(i.caller.bytes) | |
13 | 13 | let pixxy = split(idata, separ) | |
14 | 14 | let number = min([5, size(pixxy)]) | |
15 | 15 | let emptycommand = ["--", "--", "--", "0"] | |
16 | 16 | let newrecord = [callerAdress, initprice, "color", "url"] | |
17 | 17 | func validxy (x) = match parseInt(pixxy[x]) { | |
18 | 18 | case a: Int => | |
19 | 19 | if (if ((parseIntValue(pixxy[x]) > -1)) | |
20 | 20 | then (1000 > parseIntValue(pixxy[x])) | |
21 | 21 | else false) | |
22 | 22 | then parseIntValue(pixxy[x]) | |
23 | 23 | else -1 | |
24 | 24 | case _ => | |
25 | 25 | -1 | |
26 | 26 | } | |
27 | 27 | ||
28 | 28 | func getrecord (x) = match getString(pixxy[x]) { | |
29 | 29 | case a: String => | |
30 | 30 | getStringValue(pixxy[x]) | |
31 | 31 | case _ => | |
32 | 32 | "" | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | func command (x) = if (if ((x > (number - 1))) | |
36 | 36 | then true | |
37 | 37 | else (0 > validxy(x))) | |
38 | 38 | then emptycommand | |
39 | 39 | else if ((getrecord(x) == "")) | |
40 | - | then [pixxy[x], makeString(newrecord, separ), " | |
40 | + | then [pixxy[x], makeString(newrecord, separ), "3MuW4t1jCXHt8WRsHVLUar32EnvJxZaQWAx", initprice] | |
41 | 41 | else { | |
42 | 42 | let oldrecord = split(getStringValue(pixxy[x]), separ) | |
43 | 43 | let price = parseIntValue(oldrecord[1]) | |
44 | 44 | let receiver = oldrecord[0] | |
45 | 45 | [pixxy[x], makeString([callerAdress, toString((price + parseIntValue(initprice))), "color", "url"], separ), receiver, toString(price)] | |
46 | 46 | } | |
47 | 47 | ||
48 | 48 | let all = [command(0), command(1), command(2), command(3), command(4)] | |
49 | 49 | let payment = toString(((((parseIntValue(all[0][3]) + parseIntValue(all[1][3])) + parseIntValue(all[2][3])) + parseIntValue(all[3][3])) + parseIntValue(all[4][3]))) | |
50 | 50 | let pmt = if ((size(i.payments) == 1)) | |
51 | 51 | then i.payments[0] | |
52 | 52 | else throw(((("Attached payment is required: " + payment) + " peymentstr=") + payment)) | |
53 | 53 | if (isDefined(pmt.assetId)) | |
54 | 54 | then throw("works with waves only") | |
55 | 55 | else if ((parseIntValue(payment) > pmt.amount)) | |
56 | 56 | then throw(((("you give: " + toString(pmt.amount)) + ", but deal needs: ") + payment)) | |
57 | 57 | 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), ScriptTransfer(i.caller, (pmt.amount - parseIntValue(payment)), unit)], unit) | |
58 | 58 | } | |
59 | 59 | ||
60 | 60 |
github/deemru/w8io/169f3d6 40.85 ms ◑