tx · D9suBR4dvRcC3AVCvHcf5h13aC8W8dvykusw8qscA1rh

3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6:  -0.01000000 Waves

2021.12.05 11:28 [1820725] smart account 3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6 > SELF 0.00000000 Waves

{ "type": 13, "id": "D9suBR4dvRcC3AVCvHcf5h13aC8W8dvykusw8qscA1rh", "fee": 1000000, "feeAssetId": null, "timestamp": 1638692935244, "version": 2, "chainId": 84, "sender": "3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6", "senderPublicKey": "2LizaCNygFYwGFKe34vvFHgJc4ckK7MpzRzziRNn56Cu", "proofs": [ "ZGDwbNhvA3WCKUj6M1ErU7wU315b9saYv1c5AXUbkQ148hHjiRJN6VZ3cVwT9keM4M44ww4ECAYqdw5hgXxAC3i" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAAAwAAAAAGbWFzdGVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUPUYGSQjhSwi99Mcha5hyYJjHFzCelkk9AAAAAAVzZXBhcgIAAAAFfHx8fHwAAAAACWluaXRwcmljZQIAAAAGMTAwMDAwAAAAAQAAAAFpAQAAAAVwYWludAAAAAEAAAAFaWRhdGEEAAAADGNhbGxlckFkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwaXh4eQkABLUAAAACBQAAAAVpZGF0YQUAAAAFc2VwYXIEAAAABm51bWJlcgkAAZcAAAABCQAETAAAAAIAAAAAAAAAAAUJAARMAAAAAgkAAZAAAAABBQAAAAVwaXh4eQUAAAADbmlsBAAAAAxlbXB0eWNvbW1hbmQJAARMAAAAAgIAAAACLS0JAARMAAAAAgIAAAACLS0JAARMAAAAAgIAAAACLS0JAARMAAAAAgIAAAABMAUAAAADbmlsBAAAAAluZXdyZWNvcmQJAARMAAAAAgUAAAAMY2FsbGVyQWRyZXNzCQAETAAAAAIFAAAACWluaXRwc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AABm1hc3RlcgkBAAAADXBhcnNlSW50VmFsdWUAAAABCQABkQAAAAIJAAGRAAAAAgUAAAADYWxsAAAAAAAAAAAEAAAAAAAAAAADBQAAAAR1bml0BQAAAANuaWwFAAAABHVuaXQAAAAAHmZKjg==", "height": 1820725, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AD8cdBS4gbR43u5737PCaMPVfJYGMfaCuUGvATCwFTYu Next: GA5hRdmTHGfgFJjYVfvodgviQpQ7rVitKU6k81Y6M1eU Diff:
OldNewDifferences
1212 let callerAdress = toBase58String(i.caller.bytes)
1313 let pixxy = split(idata, separ)
1414 let number = min([5, size(pixxy)])
15- let records = nil
1615 let emptycommand = ["--", "--", "--", "0"]
1716 let newrecord = [callerAdress, initprice, "color", "url"]
1817 func validxy (x) = match parseInt(pixxy[x]) {
4443 [pixxy[x], makeString([callerAdress, toString((price + parseIntValue(initprice))), "color", "url"], separ), "", toString(price)]
4544 }
4645
47- let payment = toString(((((parseIntValue(command(0)[3]) + parseIntValue(command(1)[3])) + parseIntValue(command(2)[3])) + parseIntValue(command(3)[3])) + parseIntValue(command(4)[3])))
46+ let all = [command(0), command(1), command(2), command(3), command(4)]
47+ let payment = toString(((((parseIntValue(all[0][3]) + parseIntValue(all[1][3])) + parseIntValue(all[2][3])) + parseIntValue(all[3][3])) + parseIntValue(all[4][3])))
4848 let pmt = if ((size(i.payments) == 1))
4949 then i.payments[0]
5050 else throw(((("Attached payment is required: " + payment) + " peymentstr=") + payment))
5252 then throw("works with waves only")
5353 else if ((parseIntValue(payment) > pmt.amount))
5454 then throw(((("you give: " + toString(pmt.amount)) + ", but deal needs: ") + payment))
55- else {
56- let all = [command(0), command(1), command(2), command(3), command(4)]
57- $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)
58- }
55+ else $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)
5956 }
6057
6158
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"
99
1010 @Callable(i)
1111 func paint (idata) = {
1212 let callerAdress = toBase58String(i.caller.bytes)
1313 let pixxy = split(idata, separ)
1414 let number = min([5, size(pixxy)])
15- let records = nil
1615 let emptycommand = ["--", "--", "--", "0"]
1716 let newrecord = [callerAdress, initprice, "color", "url"]
1817 func validxy (x) = match parseInt(pixxy[x]) {
1918 case a: Int =>
2019 if (if ((parseIntValue(pixxy[x]) > -1))
2120 then (1000 > parseIntValue(pixxy[x]))
2221 else false)
2322 then parseIntValue(pixxy[x])
2423 else -1
2524 case _ =>
2625 -1
2726 }
2827
2928 func getrecord (x) = match getString(pixxy[x]) {
3029 case a: String =>
3130 getStringValue(pixxy[x])
3231 case _ =>
3332 ""
3433 }
3534
3635 func command (x) = if (if ((x > (number - 1)))
3736 then true
3837 else (0 > validxy(x)))
3938 then emptycommand
4039 else if ((getrecord(x) == ""))
4140 then [pixxy[x], makeString(newrecord, separ), "reciever=master", initprice]
4241 else {
4342 let price = parseIntValue(split(getStringValue(pixxy[x]), separ)[1])
4443 [pixxy[x], makeString([callerAdress, toString((price + parseIntValue(initprice))), "color", "url"], separ), "", toString(price)]
4544 }
4645
47- let payment = toString(((((parseIntValue(command(0)[3]) + parseIntValue(command(1)[3])) + parseIntValue(command(2)[3])) + parseIntValue(command(3)[3])) + parseIntValue(command(4)[3])))
46+ let all = [command(0), command(1), command(2), command(3), command(4)]
47+ let payment = toString(((((parseIntValue(all[0][3]) + parseIntValue(all[1][3])) + parseIntValue(all[2][3])) + parseIntValue(all[3][3])) + parseIntValue(all[4][3])))
4848 let pmt = if ((size(i.payments) == 1))
4949 then i.payments[0]
5050 else throw(((("Attached payment is required: " + payment) + " peymentstr=") + payment))
5151 if (isDefined(pmt.assetId))
5252 then throw("works with waves only")
5353 else if ((parseIntValue(payment) > pmt.amount))
5454 then throw(((("you give: " + toString(pmt.amount)) + ", but deal needs: ") + payment))
55- else {
56- let all = [command(0), command(1), command(2), command(3), command(4)]
57- $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)
58- }
55+ else $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)
5956 }
6057
6158

github/deemru/w8io/169f3d6 
49.99 ms