tx · 42sDPtpArEK2gwR6xBhzArBTrLnUdbGVPaKdCt2zHWMi 3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6: -0.01000000 Waves 2021.12.05 12:34 [1820794] smart account 3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6 > SELF 0.00000000 Waves
{ "type": 13, "id": "42sDPtpArEK2gwR6xBhzArBTrLnUdbGVPaKdCt2zHWMi", "fee": 1000000, "feeAssetId": null, "timestamp": 1638696903640, "version": 2, "chainId": 84, "sender": "3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6", "senderPublicKey": "2LizaCNygFYwGFKe34vvFHgJc4ckK7MpzRzziRNn56Cu", "proofs": [ "4RD5yN1KqxAm62RkKjhSjBH9DZzrsQMzTKBjC6j3k3xnsbynkE17PDyLufs74pUG36HWhCkrZYTkS2fpdAEmHBBu" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAAAwAAAAAGbWFzdGVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUPUYGSQjhSwi99Mcha5hyYJjHFzCelkk9AAAAAAVzZXBhcgIAAAAFfHx8fHwAAAAACWluaXRwcmljZQIAAAAGMTAwMDAwAAAAAQAAAAFpAQAAAAVwYWludAAAAAEAAAAFaWRhdGEEAAAADGNhbGxlckFkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwaXh4eQkABLUAAAACBQAAAAVpZGF0YQUAAAAFc2VwYXIEAAAABm51bWJlcgkAAZcAAAABCQAETAAAAAIAAAAAAAAAAAUJAARMAAAAAgkAAZAAAAABBQAAAAVwaXh4eQUAAAADbmlsBAAAAAxlbXB0eWNvbW1hbmQJAARMAAAAAgIAAAACLS0JAARMAAAAAgIAAAACLS0JAARMAAAAAgIAAAACLS0JAARMAAAAAgIAAAABMAUAAAADbmlsBAAAAAluZXdyZWNvcmQJAARMAAAAAgUAAAAMY2FsbGVyQWRyZXNzCQAETAAAAAIFAAAACWluaX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AQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAAAdBZGRyZXNzAAAAAQkAAlkAAAABCQABkQAAAAIJAAGRAAAAAgUAAAADYWxsAAAAAAAAAAADAAAAAAAAAAACCQEAAAANcGFyc2VJbnRWYWx1ZQAAAAEJAAGRAAAAAgkAAZEAAAACBQAAAANhbGwAAAAAAAAAAAMAAAAAAAAAAAMFAAAABHVuaXQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAAZEAAAACCQABkQAAAAIFAAAAA2FsbAAAAAAAAAAABAAAAAAAAAAAAAkAAZEAAAACCQABkQAAAAIFAAAAA2FsbAAAAAAAAAAABAAAAAAAAAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAHQWRkcmVzcwAAAAEJAAJZAAAAAQkAAZEAAAACCQABkQAAAAIFAAAAA2FsbAAAAAAAAAAABAAAAAAAAAAAAgkBAAAADXBhcnNlSW50VmFsdWUAAAABCQABkQAAAAIJAAGRAAAAAgUAAAADYWxsAAAAAAAAAAAEAAAAAAAAAAADBQAAAAR1bml0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgkAAGUAAAACCAUAAAADcG10AAAABmFtb3VudAkBAAAADXBhcnNlSW50VmFsdWUAAAABBQAAAAdwYXltZW50BQAAAAR1bml0BQAAAANuaWwFAAAABHVuaXQAAAAALIwXYg==", "height": 1820794, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: A4cYFd3GATX99u68tkc1ykj6s9JzzX5cV9gM6Lm6gdhd Next: 7iC7mu1Ypd9r4Wh6ejhkifbdYFzdXcu3uKNhwek3jsEw Diff:
Old | New | Differences | |
---|---|---|---|
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 | - | 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( | |
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 |
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 | 40 | then [pixxy[x], makeString(newrecord, separ), "reciever=master", 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 | - | 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( | |
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 33.85 ms ◑