tx · AD8cdBS4gbR43u5737PCaMPVfJYGMfaCuUGvATCwFTYu

3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6:  -0.01000000 Waves

2021.12.05 11:07 [1820703] smart account 3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6 > SELF 0.00000000 Waves

{ "type": 13, "id": "AD8cdBS4gbR43u5737PCaMPVfJYGMfaCuUGvATCwFTYu", "fee": 1000000, "feeAssetId": null, "timestamp": 1638691708420, "version": 2, "chainId": 84, "sender": "3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6", "senderPublicKey": "2LizaCNygFYwGFKe34vvFHgJc4ckK7MpzRzziRNn56Cu", "proofs": [ "5rf2RBrFW4XKmAHxHMjoHqPQYiWSynS1TeVmvCZXvjw23uUwH1efw5SX2dP2YhMjUqj19cMhWc8bUNXHpqRyVtEJ" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAAAwAAAAAGbWFzdGVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUPUYGSQjhSwi99Mcha5hyYJjHFzCelkk9AAAAAAVzZXBhcgIAAAAFfHx8fHwAAAAACWluaXRwcmljZQIAAAAGMTAwMDAwAAAAAQAAAAFpAQAAAAVwYWludAAAAAEAAAAFaWRhdGEEAAAADGNhbGxlckFkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwaXh4eQkABLUAAAACBQAAAAVpZGF0YQUAAAAFc2VwYXIEAAAABm51bWJlcgkAAZcAAAABCQAETAAAAAIAAAAAAAAAAAUJAARMAAAAAgkAAZAAAAABBQAAAAVwaXh4eQUAAAADbmlsBAAAAAdyZWNvcmRzBQAAAANuaWwEAAAADGVtcHR5Y29tbWFuZAkABEwAAAACAgAAAAItLQkABEwAAAACAgAAAAItLQkABEwAAAACAgAAAAItLQkABEwAAAACAgAAAAEwBQAAAANuaWwEAAAACW5ld3JlY29yZAkABEwAAAACBQAAAAxjYWxsZXJBZHJlc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QkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAZtYXN0ZXIJAQAAAA1wYXJzZUludFZhbHVlAAAAAQkAAZEAAAACCQABkQAAAAIFAAAAA2FsbAAAAAAAAAAABAAAAAAAAAAAAwUAAAAEdW5pdAUAAAADbmlsBQAAAAR1bml0AAAAABszhEM=", "height": 1820703, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DWvWq7mzDhzeu9uMFvH9c3Vvqmt3vZu2Ct1Bc6K7n339 Next: D9suBR4dvRcC3AVCvHcf5h13aC8W8dvykusw8qscA1rh Diff:
OldNewDifferences
66 let separ = "|||||"
77
88 let initprice = "100000"
9-
10-func towaves (a) = if ((9 > size(a)))
11- then (("0" + ".") + a)
12- else ((take(a, (size(a) - 8)) + ".") + takeRight(a, 8))
13-
149
1510 @Callable(i)
1611 func paint (idata) = {
5247 let payment = toString(((((parseIntValue(command(0)[3]) + parseIntValue(command(1)[3])) + parseIntValue(command(2)[3])) + parseIntValue(command(3)[3])) + parseIntValue(command(4)[3])))
5348 let pmt = if ((size(i.payments) == 1))
5449 then i.payments[0]
55- else throw(((("Attached payment is required: " + towaves(payment)) + " peymentstr=") + payment))
50+ else throw(((("Attached payment is required: " + payment) + " peymentstr=") + payment))
5651 if (isDefined(pmt.assetId))
5752 then throw("works with waves only")
5853 else if ((parseIntValue(payment) > pmt.amount))
59- then throw(((("you give: " + towaves(toString(pmt.amount))) + ", but deal needs: ") + towaves(payment)))
54+ then throw(((("you give: " + toString(pmt.amount)) + ", but deal needs: ") + payment))
6055 else {
6156 let all = [command(0), command(1), command(2), command(3), command(4)]
6257 $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)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let master = Address(base58'3MuW4t1jCXHt8WRsHVLUar32EnvJxZaQWAx')
55
66 let separ = "|||||"
77
88 let initprice = "100000"
9-
10-func towaves (a) = if ((9 > size(a)))
11- then (("0" + ".") + a)
12- else ((take(a, (size(a) - 8)) + ".") + takeRight(a, 8))
13-
149
1510 @Callable(i)
1611 func paint (idata) = {
1712 let callerAdress = toBase58String(i.caller.bytes)
1813 let pixxy = split(idata, separ)
1914 let number = min([5, size(pixxy)])
2015 let records = nil
2116 let emptycommand = ["--", "--", "--", "0"]
2217 let newrecord = [callerAdress, initprice, "color", "url"]
2318 func validxy (x) = match parseInt(pixxy[x]) {
2419 case a: Int =>
2520 if (if ((parseIntValue(pixxy[x]) > -1))
2621 then (1000 > parseIntValue(pixxy[x]))
2722 else false)
2823 then parseIntValue(pixxy[x])
2924 else -1
3025 case _ =>
3126 -1
3227 }
3328
3429 func getrecord (x) = match getString(pixxy[x]) {
3530 case a: String =>
3631 getStringValue(pixxy[x])
3732 case _ =>
3833 ""
3934 }
4035
4136 func command (x) = if (if ((x > (number - 1)))
4237 then true
4338 else (0 > validxy(x)))
4439 then emptycommand
4540 else if ((getrecord(x) == ""))
4641 then [pixxy[x], makeString(newrecord, separ), "reciever=master", initprice]
4742 else {
4843 let price = parseIntValue(split(getStringValue(pixxy[x]), separ)[1])
4944 [pixxy[x], makeString([callerAdress, toString((price + parseIntValue(initprice))), "color", "url"], separ), "", toString(price)]
5045 }
5146
5247 let payment = toString(((((parseIntValue(command(0)[3]) + parseIntValue(command(1)[3])) + parseIntValue(command(2)[3])) + parseIntValue(command(3)[3])) + parseIntValue(command(4)[3])))
5348 let pmt = if ((size(i.payments) == 1))
5449 then i.payments[0]
55- else throw(((("Attached payment is required: " + towaves(payment)) + " peymentstr=") + payment))
50+ else throw(((("Attached payment is required: " + payment) + " peymentstr=") + payment))
5651 if (isDefined(pmt.assetId))
5752 then throw("works with waves only")
5853 else if ((parseIntValue(payment) > pmt.amount))
59- then throw(((("you give: " + towaves(toString(pmt.amount))) + ", but deal needs: ") + towaves(payment)))
54+ then throw(((("you give: " + toString(pmt.amount)) + ", but deal needs: ") + payment))
6055 else {
6156 let all = [command(0), command(1), command(2), command(3), command(4)]
6257 $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)
6358 }
6459 }
6560
6661

github/deemru/w8io/169f3d6 
26.90 ms