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