tx · 9n6u2qcU3G1mZFMTRT1rn3wSv45cnBmRz4nRw1aDgo2t
3N7ZQDNskguAikFYpHDs3nSLEqZ1kcawW2w: -0.01400000 Waves
2020.08.02 19:38 [1114977] smart account 3N7ZQDNskguAikFYpHDs3nSLEqZ1kcawW2w > SELF 0.00000000 Waves
{
"type": 13,
"id": "9n6u2qcU3G1mZFMTRT1rn3wSv45cnBmRz4nRw1aDgo2t",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1596386334363,
"version": 1,
"sender": "3N7ZQDNskguAikFYpHDs3nSLEqZ1kcawW2w",
"senderPublicKey": "9Q2WA38S5hRejUw8CCQ7qorks92Bg8C8Mbfqwj6mQZgV",
"proofs": [
"366QE9YQTuZDF5qUMje21L5iP1j5Toam8h38VP5hifjFBvrWiTJdVWpcHHCfwzvCzDWY2aX2bQMYuyZn35KVC12N"
],
"script": "base64:AAIDAAAAAAAAAAgIARIECgIICAAAAAAAAAABAAAAAWkBAAAABXN3YXBwAAAAAgAAAAxzd2FwcEFzc2V0SWQAAAACaWQEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50BAAAAAlwbXRBbW91bnQIBQAAAANwbXQAAAAGYW1vdW50BAAAAAdhc3NldGlkCQACWQAAAAEFAAAAAmlkBAAAAAxzd2FwcGFzc2V0aWQJAAJZAAAAAQUAAAAMc3dhcHBBc3NldElkBAAAAA1hc3NldFF1YW50aXR5BAAAAAckbWF0Y2gwCQAD7AAAAAEFAAAAB2Fzc2V0aWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABUFzc2V0BAAAAAVhc3NldAUAAAAHJG1hdGNoMAgFAAAABWFzc2V0AAAACHF1YW50aXR5CQAAAgAAAAECAAAAEENhbid0IGZpbmQgYXNzZXQEAAAADHdhcHBRdWFudGl0eQQAAAAHJG1hdGNoMAkAA+wAAAABBQAAAAxzd2FwcGFzc2V0aWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABUFzc2V0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DAwIFdBUFAJAAACAAAAAQIAAAAJTm90IFNXQVBQAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAADZHR4BQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAANkdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAANkdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAADZHR4AAAAD3NlbmRlclB1YmxpY0tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAA3N0eAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAADc3R4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAADc3R4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAA3N0eAAAAA9zZW5kZXJQdWJsaWNLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAA3R0eAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAADdHR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAADdHR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAA3R0eAAAAA9zZW5kZXJQdWJsaWNLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF01hc3NUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAANtdHgFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAA210eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAA210eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAANtdHgAAAAPc2VuZGVyUHVibGljS2V5B/lcEgw=",
"chainId": 84,
"height": 1114977,
"spentComplexity": 0
}
View: original | compacted
Prev: 93Suy4uY89dQApWJsPJtCag9kuaPkHv7633rR1ZouqjY
Next: none
Diff:
Old | New | | Differences |
---|
28 | 28 | | else throw("Can't find asset") |
---|
29 | 29 | | } |
---|
30 | 30 | | let l = (k / h) |
---|
31 | | - | if ((l > 1)) |
---|
32 | | - | then { |
---|
33 | | - | let m = (e * 1) |
---|
34 | | - | if ((m > 100000000000)) |
---|
| 31 | + | let m = (e * 1) |
---|
| 32 | + | let n = (e * l) |
---|
| 33 | + | if (if ((l > 1)) |
---|
| 34 | + | then (1000 >= m) |
---|
| 35 | + | else false) |
---|
| 36 | + | then TransferSet([ScriptTransfer(a.caller, m, g)]) |
---|
| 37 | + | else if (if ((1 >= l)) |
---|
| 38 | + | then (1000 >= n) |
---|
| 39 | + | else false) |
---|
| 40 | + | then TransferSet([ScriptTransfer(a.caller, n, g)]) |
---|
| 41 | + | else if (if ((l > 1)) |
---|
| 42 | + | then (m > 1000) |
---|
| 43 | + | else false) |
---|
35 | 44 | | then throw("Not SWAPP over 1000 WAPP") |
---|
36 | | - | else TransferSet([ScriptTransfer(a.caller, m, g)]) |
---|
37 | | - | } |
---|
38 | | - | else if ((1 > l)) |
---|
39 | | - | then { |
---|
40 | | - | let m = (e * l) |
---|
41 | | - | if ((m > 100000000000)) |
---|
| 45 | + | else if (if ((1 >= l)) |
---|
| 46 | + | then (n > 1000) |
---|
| 47 | + | else false) |
---|
42 | 48 | | then throw("Not SWAPP over 1000 WAPP") |
---|
43 | | - | else TransferSet([ScriptTransfer(a.caller, m, g)]) |
---|
44 | | - | } |
---|
45 | | - | else throw("Not SWAPP") |
---|
| 49 | + | else throw("Not SWAPP") |
---|
46 | 50 | | } |
---|
47 | 51 | | |
---|
48 | 52 | | |
---|
49 | | - | @Verifier(n) |
---|
50 | | - | func o () = { |
---|
51 | | - | let i = n |
---|
| 53 | + | @Verifier(o) |
---|
| 54 | + | func p () = { |
---|
| 55 | + | let i = o |
---|
52 | 56 | | if ($isInstanceOf(i, "DataTransaction")) |
---|
53 | 57 | | then { |
---|
54 | | - | let p = i |
---|
55 | | - | sigVerify(p.bodyBytes, p.proofs[0], p.senderPublicKey) |
---|
| 58 | + | let q = i |
---|
| 59 | + | sigVerify(q.bodyBytes, q.proofs[0], q.senderPublicKey) |
---|
56 | 60 | | } |
---|
57 | 61 | | else if ($isInstanceOf(i, "SetScriptTransaction")) |
---|
58 | 62 | | then { |
---|
59 | | - | let q = i |
---|
60 | | - | sigVerify(q.bodyBytes, q.proofs[0], q.senderPublicKey) |
---|
| 63 | + | let r = i |
---|
| 64 | + | sigVerify(r.bodyBytes, r.proofs[0], r.senderPublicKey) |
---|
61 | 65 | | } |
---|
62 | 66 | | else if ($isInstanceOf(i, "TransferTransaction")) |
---|
63 | 67 | | then { |
---|
64 | | - | let r = i |
---|
65 | | - | sigVerify(r.bodyBytes, r.proofs[0], r.senderPublicKey) |
---|
| 68 | + | let s = i |
---|
| 69 | + | sigVerify(s.bodyBytes, s.proofs[0], s.senderPublicKey) |
---|
66 | 70 | | } |
---|
67 | 71 | | else if ($isInstanceOf(i, "MassTransferTransaction")) |
---|
68 | 72 | | then { |
---|
69 | | - | let s = i |
---|
70 | | - | sigVerify(s.bodyBytes, s.proofs[0], s.senderPublicKey) |
---|
| 73 | + | let t = i |
---|
| 74 | + | sigVerify(t.bodyBytes, t.proofs[0], t.senderPublicKey) |
---|
71 | 75 | | } |
---|
72 | 76 | | else false |
---|
73 | 77 | | } |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(a) |
---|
7 | 7 | | func swapp (b,c) = { |
---|
8 | 8 | | let d = extract(a.payment) |
---|
9 | 9 | | let e = d.amount |
---|
10 | 10 | | let f = fromBase58String(c) |
---|
11 | 11 | | let g = fromBase58String(b) |
---|
12 | 12 | | let h = { |
---|
13 | 13 | | let i = assetInfo(f) |
---|
14 | 14 | | if ($isInstanceOf(i, "Asset")) |
---|
15 | 15 | | then { |
---|
16 | 16 | | let j = i |
---|
17 | 17 | | j.quantity |
---|
18 | 18 | | } |
---|
19 | 19 | | else throw("Can't find asset") |
---|
20 | 20 | | } |
---|
21 | 21 | | let k = { |
---|
22 | 22 | | let i = assetInfo(g) |
---|
23 | 23 | | if ($isInstanceOf(i, "Asset")) |
---|
24 | 24 | | then { |
---|
25 | 25 | | let j = i |
---|
26 | 26 | | j.quantity |
---|
27 | 27 | | } |
---|
28 | 28 | | else throw("Can't find asset") |
---|
29 | 29 | | } |
---|
30 | 30 | | let l = (k / h) |
---|
31 | | - | if ((l > 1)) |
---|
32 | | - | then { |
---|
33 | | - | let m = (e * 1) |
---|
34 | | - | if ((m > 100000000000)) |
---|
| 31 | + | let m = (e * 1) |
---|
| 32 | + | let n = (e * l) |
---|
| 33 | + | if (if ((l > 1)) |
---|
| 34 | + | then (1000 >= m) |
---|
| 35 | + | else false) |
---|
| 36 | + | then TransferSet([ScriptTransfer(a.caller, m, g)]) |
---|
| 37 | + | else if (if ((1 >= l)) |
---|
| 38 | + | then (1000 >= n) |
---|
| 39 | + | else false) |
---|
| 40 | + | then TransferSet([ScriptTransfer(a.caller, n, g)]) |
---|
| 41 | + | else if (if ((l > 1)) |
---|
| 42 | + | then (m > 1000) |
---|
| 43 | + | else false) |
---|
35 | 44 | | then throw("Not SWAPP over 1000 WAPP") |
---|
36 | | - | else TransferSet([ScriptTransfer(a.caller, m, g)]) |
---|
37 | | - | } |
---|
38 | | - | else if ((1 > l)) |
---|
39 | | - | then { |
---|
40 | | - | let m = (e * l) |
---|
41 | | - | if ((m > 100000000000)) |
---|
| 45 | + | else if (if ((1 >= l)) |
---|
| 46 | + | then (n > 1000) |
---|
| 47 | + | else false) |
---|
42 | 48 | | then throw("Not SWAPP over 1000 WAPP") |
---|
43 | | - | else TransferSet([ScriptTransfer(a.caller, m, g)]) |
---|
44 | | - | } |
---|
45 | | - | else throw("Not SWAPP") |
---|
| 49 | + | else throw("Not SWAPP") |
---|
46 | 50 | | } |
---|
47 | 51 | | |
---|
48 | 52 | | |
---|
49 | | - | @Verifier(n) |
---|
50 | | - | func o () = { |
---|
51 | | - | let i = n |
---|
| 53 | + | @Verifier(o) |
---|
| 54 | + | func p () = { |
---|
| 55 | + | let i = o |
---|
52 | 56 | | if ($isInstanceOf(i, "DataTransaction")) |
---|
53 | 57 | | then { |
---|
54 | | - | let p = i |
---|
55 | | - | sigVerify(p.bodyBytes, p.proofs[0], p.senderPublicKey) |
---|
| 58 | + | let q = i |
---|
| 59 | + | sigVerify(q.bodyBytes, q.proofs[0], q.senderPublicKey) |
---|
56 | 60 | | } |
---|
57 | 61 | | else if ($isInstanceOf(i, "SetScriptTransaction")) |
---|
58 | 62 | | then { |
---|
59 | | - | let q = i |
---|
60 | | - | sigVerify(q.bodyBytes, q.proofs[0], q.senderPublicKey) |
---|
| 63 | + | let r = i |
---|
| 64 | + | sigVerify(r.bodyBytes, r.proofs[0], r.senderPublicKey) |
---|
61 | 65 | | } |
---|
62 | 66 | | else if ($isInstanceOf(i, "TransferTransaction")) |
---|
63 | 67 | | then { |
---|
64 | | - | let r = i |
---|
65 | | - | sigVerify(r.bodyBytes, r.proofs[0], r.senderPublicKey) |
---|
| 68 | + | let s = i |
---|
| 69 | + | sigVerify(s.bodyBytes, s.proofs[0], s.senderPublicKey) |
---|
66 | 70 | | } |
---|
67 | 71 | | else if ($isInstanceOf(i, "MassTransferTransaction")) |
---|
68 | 72 | | then { |
---|
69 | | - | let s = i |
---|
70 | | - | sigVerify(s.bodyBytes, s.proofs[0], s.senderPublicKey) |
---|
| 73 | + | let t = i |
---|
| 74 | + | sigVerify(t.bodyBytes, t.proofs[0], t.senderPublicKey) |
---|
71 | 75 | | } |
---|
72 | 76 | | else false |
---|
73 | 77 | | } |
---|
74 | 78 | | |
---|