tx · CqJFaBQveL8gV74dKZkUfigd1cer1JE791xV2e9WgfkR
3MpZuKDPW9Hs8HypbAd7bLxNYULnCYhoXQ4: -0.01400000 Waves
2020.04.05 19:15 [941159] smart account 3MpZuKDPW9Hs8HypbAd7bLxNYULnCYhoXQ4 > SELF 0.00000000 Waves
{
"type": 13,
"id": "CqJFaBQveL8gV74dKZkUfigd1cer1JE791xV2e9WgfkR",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1586103297538,
"version": 1,
"sender": "3MpZuKDPW9Hs8HypbAd7bLxNYULnCYhoXQ4",
"senderPublicKey": "Eke9tanjCLXE23D8JJf61cqgdG7TSAH7vUbaiAyymfjT",
"proofs": [
"kNsW8QGTexV8B2cePii9mypzFwWfmckUcH8jMdo1FixCJmuaEMGENhn1H7xPySZ8CNywnEpwgPTvHFFwYH3fXTS"
],
"script": "base64:AAIDAAAAAAAAABMIARIGCgQICAEIEgcKBQgIAQgIAAAAAAAAAAIAAAABaQEAAAANYXRvbWljRGVwb3NpdAAAAAQAAAAPYXRvbWljUmVjaXBpZW50AAAAEGF0b21pY1dpdGhEcmF3SWQAAAAUYXRvbWljV2l0aGRyYXdBbW91bnQAAAAPYXRvbWljRGVwb3NpdElkBAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50BAAAAAlwYXltZW50SWQIBQAAAANwbXQAAAAHYXNzZXRJZAQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAIJAAEsAAAAAgUAAAAPYXRvbWljUmVjaXBpZW50BQAAAA9hdG9taWNEZXBvc2l0SWQFAAAACmN1cnJlbnRLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAAJbmV3QW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hc3NldElkBQAAAANuaWwJAAACAAAAAQIAAAAPTm90IEF0b21pYyBTd2FwAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAA3R0eAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAADdHR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAADdHR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAA3R0eAAAAA9zZW5kZXJQdWJsaWNLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAANzdHgFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAA3N0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAA3N0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAANzdHgAAAAPc2VuZGVyUHVibGljS2V5BvEoBKw=",
"chainId": 84,
"height": 941159,
"spentComplexity": 0
}
View: original | compacted
Prev: 7s9rjJt3wjBhPvNiPD8nprCRbfVNQeKXgGMfoATB6Zs6
Next: FKhtkDLGboWzmekWVnnv5PiKpuTvuHtRZyQWRm5FwyS8
Diff:
Old | New | | Differences |
---|
24 | 24 | | |
---|
25 | 25 | | |
---|
26 | 26 | | @Callable(a) |
---|
27 | | - | func atomicWithdraw (b,c,d,e) = { |
---|
| 27 | + | func atomicWithdraw (b,c,d,e,m) = { |
---|
28 | 28 | | let f = toBase58String(a.caller.bytes) |
---|
29 | | - | let m = fromBase58String(c) |
---|
30 | | - | let n = { |
---|
| 29 | + | let n = fromBase58String(m) |
---|
| 30 | + | let o = { |
---|
31 | 31 | | let j = getInteger(this, ((f + e) + b)) |
---|
32 | 32 | | if ($isInstanceOf(j, "Int")) |
---|
33 | 33 | | then { |
---|
|
36 | 36 | | } |
---|
37 | 37 | | else 0 |
---|
38 | 38 | | } |
---|
39 | | - | let o = { |
---|
| 39 | + | let p = { |
---|
40 | 40 | | let j = getInteger(this, ((f + c) + b)) |
---|
41 | 41 | | if ($isInstanceOf(j, "Int")) |
---|
42 | 42 | | then { |
---|
|
45 | 45 | | } |
---|
46 | 46 | | else 0 |
---|
47 | 47 | | } |
---|
48 | | - | let p = { |
---|
| 48 | + | let q = { |
---|
49 | 49 | | let j = getInteger(this, ((b + c) + f)) |
---|
50 | 50 | | if ($isInstanceOf(j, "Int")) |
---|
51 | 51 | | then { |
---|
|
54 | 54 | | } |
---|
55 | 55 | | else 0 |
---|
56 | 56 | | } |
---|
57 | | - | let q = { |
---|
| 57 | + | let r = { |
---|
58 | 58 | | let j = getInteger(this, ((b + e) + f)) |
---|
59 | 59 | | if ($isInstanceOf(j, "Int")) |
---|
60 | 60 | | then { |
---|
|
63 | 63 | | } |
---|
64 | 64 | | else 0 |
---|
65 | 65 | | } |
---|
66 | | - | let r = { |
---|
| 66 | + | let s = { |
---|
67 | 67 | | let j = getBoolean(this, ((("F_" + f) + c) + b)) |
---|
68 | 68 | | if ($isInstanceOf(j, "Boolean")) |
---|
69 | 69 | | then { |
---|
|
72 | 72 | | } |
---|
73 | 73 | | else false |
---|
74 | 74 | | } |
---|
75 | | - | if (if (if (if ((n == q)) |
---|
76 | | - | then (p == o) |
---|
| 75 | + | if (if (if (if ((o == r)) |
---|
| 76 | + | then (q == p) |
---|
77 | 77 | | else false) |
---|
78 | | - | then (r == true) |
---|
| 78 | + | then (s == true) |
---|
79 | 79 | | else false) |
---|
80 | 80 | | then (c == "WAVES") |
---|
81 | 81 | | else false) |
---|
82 | 82 | | then ScriptResult(WriteSet([DataEntry(((("F_" + f) + c) + b), false)]), TransferSet([ScriptTransfer(a.caller, d, unit)])) |
---|
83 | | - | else if (if (if (if ((n == q)) |
---|
84 | | - | then (p == o) |
---|
| 83 | + | else if (if (if (if ((o == r)) |
---|
| 84 | + | then (q == p) |
---|
85 | 85 | | else false) |
---|
86 | | - | then (r == true) |
---|
| 86 | + | then (s == true) |
---|
87 | 87 | | else false) |
---|
88 | 88 | | then (c != "WAVES") |
---|
89 | 89 | | else false) |
---|
90 | | - | then ScriptResult(WriteSet([DataEntry(((("F_" + f) + c) + b), false)]), TransferSet([ScriptTransfer(a.caller, d, m)])) |
---|
| 90 | + | then ScriptResult(WriteSet([DataEntry(((("F_" + f) + c) + b), false)]), TransferSet([ScriptTransfer(a.caller, d, n)])) |
---|
91 | 91 | | else throw("Not Atomic Swap") |
---|
92 | 92 | | } |
---|
93 | 93 | | |
---|
94 | 94 | | |
---|
95 | | - | @Verifier(s) |
---|
96 | | - | func t () = { |
---|
97 | | - | let j = s |
---|
| 95 | + | @Verifier(t) |
---|
| 96 | + | func u () = { |
---|
| 97 | + | let j = t |
---|
98 | 98 | | if ($isInstanceOf(j, "TransferTransaction")) |
---|
99 | 99 | | then { |
---|
100 | | - | let u = j |
---|
101 | | - | sigVerify(u.bodyBytes, u.proofs[0], u.senderPublicKey) |
---|
| 100 | + | let v = j |
---|
| 101 | + | sigVerify(v.bodyBytes, v.proofs[0], v.senderPublicKey) |
---|
102 | 102 | | } |
---|
103 | 103 | | else if ($isInstanceOf(j, "SetScriptTransaction")) |
---|
104 | 104 | | then { |
---|
105 | | - | let v = j |
---|
106 | | - | sigVerify(v.bodyBytes, v.proofs[0], v.senderPublicKey) |
---|
| 105 | + | let w = j |
---|
| 106 | + | sigVerify(w.bodyBytes, w.proofs[0], w.senderPublicKey) |
---|
107 | 107 | | } |
---|
108 | 108 | | else true |
---|
109 | 109 | | } |
---|
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 atomicDeposit (b,c,d,e) = { |
---|
8 | 8 | | let f = toBase58String(a.caller.bytes) |
---|
9 | 9 | | let g = extract(a.payment) |
---|
10 | 10 | | let h = g.assetId |
---|
11 | 11 | | let i = { |
---|
12 | 12 | | let j = getInteger(this, ((b + e) + f)) |
---|
13 | 13 | | if ($isInstanceOf(j, "Int")) |
---|
14 | 14 | | then { |
---|
15 | 15 | | let k = j |
---|
16 | 16 | | k |
---|
17 | 17 | | } |
---|
18 | 18 | | else 0 |
---|
19 | 19 | | } |
---|
20 | 20 | | let l = (i + g.amount) |
---|
21 | 21 | | WriteSet([DataEntry(((f + e) + b), l), DataEntry(((f + c) + b), d), DataEntry(((("F_" + f) + c) + b), true)]) |
---|
22 | 22 | | } |
---|
23 | 23 | | |
---|
24 | 24 | | |
---|
25 | 25 | | |
---|
26 | 26 | | @Callable(a) |
---|
27 | | - | func atomicWithdraw (b,c,d,e) = { |
---|
| 27 | + | func atomicWithdraw (b,c,d,e,m) = { |
---|
28 | 28 | | let f = toBase58String(a.caller.bytes) |
---|
29 | | - | let m = fromBase58String(c) |
---|
30 | | - | let n = { |
---|
| 29 | + | let n = fromBase58String(m) |
---|
| 30 | + | let o = { |
---|
31 | 31 | | let j = getInteger(this, ((f + e) + b)) |
---|
32 | 32 | | if ($isInstanceOf(j, "Int")) |
---|
33 | 33 | | then { |
---|
34 | 34 | | let k = j |
---|
35 | 35 | | k |
---|
36 | 36 | | } |
---|
37 | 37 | | else 0 |
---|
38 | 38 | | } |
---|
39 | | - | let o = { |
---|
| 39 | + | let p = { |
---|
40 | 40 | | let j = getInteger(this, ((f + c) + b)) |
---|
41 | 41 | | if ($isInstanceOf(j, "Int")) |
---|
42 | 42 | | then { |
---|
43 | 43 | | let k = j |
---|
44 | 44 | | k |
---|
45 | 45 | | } |
---|
46 | 46 | | else 0 |
---|
47 | 47 | | } |
---|
48 | | - | let p = { |
---|
| 48 | + | let q = { |
---|
49 | 49 | | let j = getInteger(this, ((b + c) + f)) |
---|
50 | 50 | | if ($isInstanceOf(j, "Int")) |
---|
51 | 51 | | then { |
---|
52 | 52 | | let k = j |
---|
53 | 53 | | k |
---|
54 | 54 | | } |
---|
55 | 55 | | else 0 |
---|
56 | 56 | | } |
---|
57 | | - | let q = { |
---|
| 57 | + | let r = { |
---|
58 | 58 | | let j = getInteger(this, ((b + e) + f)) |
---|
59 | 59 | | if ($isInstanceOf(j, "Int")) |
---|
60 | 60 | | then { |
---|
61 | 61 | | let k = j |
---|
62 | 62 | | k |
---|
63 | 63 | | } |
---|
64 | 64 | | else 0 |
---|
65 | 65 | | } |
---|
66 | | - | let r = { |
---|
| 66 | + | let s = { |
---|
67 | 67 | | let j = getBoolean(this, ((("F_" + f) + c) + b)) |
---|
68 | 68 | | if ($isInstanceOf(j, "Boolean")) |
---|
69 | 69 | | then { |
---|
70 | 70 | | let k = j |
---|
71 | 71 | | k |
---|
72 | 72 | | } |
---|
73 | 73 | | else false |
---|
74 | 74 | | } |
---|
75 | | - | if (if (if (if ((n == q)) |
---|
76 | | - | then (p == o) |
---|
| 75 | + | if (if (if (if ((o == r)) |
---|
| 76 | + | then (q == p) |
---|
77 | 77 | | else false) |
---|
78 | | - | then (r == true) |
---|
| 78 | + | then (s == true) |
---|
79 | 79 | | else false) |
---|
80 | 80 | | then (c == "WAVES") |
---|
81 | 81 | | else false) |
---|
82 | 82 | | then ScriptResult(WriteSet([DataEntry(((("F_" + f) + c) + b), false)]), TransferSet([ScriptTransfer(a.caller, d, unit)])) |
---|
83 | | - | else if (if (if (if ((n == q)) |
---|
84 | | - | then (p == o) |
---|
| 83 | + | else if (if (if (if ((o == r)) |
---|
| 84 | + | then (q == p) |
---|
85 | 85 | | else false) |
---|
86 | | - | then (r == true) |
---|
| 86 | + | then (s == true) |
---|
87 | 87 | | else false) |
---|
88 | 88 | | then (c != "WAVES") |
---|
89 | 89 | | else false) |
---|
90 | | - | then ScriptResult(WriteSet([DataEntry(((("F_" + f) + c) + b), false)]), TransferSet([ScriptTransfer(a.caller, d, m)])) |
---|
| 90 | + | then ScriptResult(WriteSet([DataEntry(((("F_" + f) + c) + b), false)]), TransferSet([ScriptTransfer(a.caller, d, n)])) |
---|
91 | 91 | | else throw("Not Atomic Swap") |
---|
92 | 92 | | } |
---|
93 | 93 | | |
---|
94 | 94 | | |
---|
95 | | - | @Verifier(s) |
---|
96 | | - | func t () = { |
---|
97 | | - | let j = s |
---|
| 95 | + | @Verifier(t) |
---|
| 96 | + | func u () = { |
---|
| 97 | + | let j = t |
---|
98 | 98 | | if ($isInstanceOf(j, "TransferTransaction")) |
---|
99 | 99 | | then { |
---|
100 | | - | let u = j |
---|
101 | | - | sigVerify(u.bodyBytes, u.proofs[0], u.senderPublicKey) |
---|
| 100 | + | let v = j |
---|
| 101 | + | sigVerify(v.bodyBytes, v.proofs[0], v.senderPublicKey) |
---|
102 | 102 | | } |
---|
103 | 103 | | else if ($isInstanceOf(j, "SetScriptTransaction")) |
---|
104 | 104 | | then { |
---|
105 | | - | let v = j |
---|
106 | | - | sigVerify(v.bodyBytes, v.proofs[0], v.senderPublicKey) |
---|
| 105 | + | let w = j |
---|
| 106 | + | sigVerify(w.bodyBytes, w.proofs[0], w.senderPublicKey) |
---|
107 | 107 | | } |
---|
108 | 108 | | else true |
---|
109 | 109 | | } |
---|
110 | 110 | | |
---|