tx · FNJfL1FDX6tudsHs33ZiXXSUqXkzAppFJd1WzcRAAehT

3N1hUxU5uVePa5VEmty9UWoTdzjfMUNekSp:  -0.01400000 Waves

2020.04.06 17:17 [942494] smart account 3N1hUxU5uVePa5VEmty9UWoTdzjfMUNekSp > SELF 0.00000000 Waves

{ "type": 13, "id": "FNJfL1FDX6tudsHs33ZiXXSUqXkzAppFJd1WzcRAAehT", "fee": 1400000, "feeAssetId": null, "timestamp": 1586182575538, "version": 1, "sender": "3N1hUxU5uVePa5VEmty9UWoTdzjfMUNekSp", "senderPublicKey": "C9N8puBe7PNPmySZRMUWyTK96uEaNp6AB2w758sEo4PQ", "proofs": [ "2pAD4dFdsb45E9JyFsFJKyxXaKBxX8RUmpZPdWF94xaWr95FvmpXRPtLTLZVMPG34zEQziCmc2A1HwJe6NgdFYhK" ], "script": "base64:AAIDAAAAAAAAABwIARIGCgQICAEIEgcKBQgIAQgIEgcKBQgIAQgIAAAAAAAAAAMAAAABaQEAAAANYXRvbWljRGVwb3NpdAAAAAQAAAAPYXRvbWljUmVjaXBpZW50AAAAEGF0b21pY1dpdGhEcmF3SWQAAAAUYXRvbWljV2l0aGRyYXdBbW91bnQAAAAPYXRvbWljRGVwb3NpdElkBAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50BAAAAAlwYXltZW50SWQIBQAAAANwbXQAAAAHYXNzZXRJZAQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAIJAAEsAAAAAgUAAAAKY3VycmVudEtleQUAAAAPYXRvbWljRGVwb3NpdElkBQAAAA9hdG9taWNSZWNpcGllbnQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAAJbmV3Q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AEdW5pdAUAAAADbmlsCQAAAgAAAAECAAAADkZhaWxlZCB0byBzd2FwAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAA3R0eAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAADdHR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAADdHR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAA3R0eAAAAA9zZW5kZXJQdWJsaWNLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAANzdHgFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAA3N0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAA3N0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAANzdHgAAAAPc2VuZGVyUHVibGljS2V5BoNiNmw=", "chainId": 84, "height": 942494, "spentComplexity": 0 } View: original | compacted Prev: 9chL8PzxEbHtRLArGQhne38Gcxmh2PJgMfCTiDUBariE Next: none Diff:
OldNewDifferences
2424
2525
2626 @Callable(a)
27-func atomicWithdraw (b,c,d,e,m) = {
27+func cancelWithdraw (b,c,d,e,m) = {
2828 let f = toBase58String(a.caller.bytes)
2929 let n = fromBase58String(m)
3030 let o = {
3737 else 0
3838 }
3939 let p = {
40+ let j = getBoolean(this, ((("d_" + b) + c) + f))
41+ if ($isInstanceOf(j, "Boolean"))
42+ then {
43+ let k = j
44+ k
45+ }
46+ else false
47+ }
48+ if (if ((p == false))
49+ then (m == "WAVES")
50+ else false)
51+ then ScriptResult(WriteSet([DataEntry(((f + e) + b), 0), DataEntry(((f + c) + b), 0), DataEntry(((("d_" + f) + e) + b), false)]), TransferSet([ScriptTransfer(a.caller, o, unit)]))
52+ else if (if ((p == false))
53+ then (m != "WAVES")
54+ else false)
55+ then ScriptResult(WriteSet([DataEntry(((f + e) + b), 0), DataEntry(((f + c) + b), 0), DataEntry(((("d_" + f) + e) + b), false)]), TransferSet([ScriptTransfer(a.caller, o, n)]))
56+ else throw("Failed to withdraw")
57+ }
58+
59+
60+
61+@Callable(a)
62+func atomicWithdraw (b,c,d,e,q) = {
63+ let f = toBase58String(a.caller.bytes)
64+ let n = fromBase58String(q)
65+ let o = {
66+ let j = getInteger(this, ((f + e) + b))
67+ if ($isInstanceOf(j, "Int"))
68+ then {
69+ let k = j
70+ k
71+ }
72+ else 0
73+ }
74+ let r = {
4075 let j = getInteger(this, ((f + c) + b))
4176 if ($isInstanceOf(j, "Int"))
4277 then {
4580 }
4681 else 0
4782 }
48- let q = {
83+ let s = {
4984 let j = getInteger(this, ((b + c) + f))
5085 if ($isInstanceOf(j, "Int"))
5186 then {
5489 }
5590 else 0
5691 }
57- let r = {
92+ let t = {
5893 let j = getInteger(this, ((b + e) + f))
5994 if ($isInstanceOf(j, "Int"))
6095 then {
6398 }
6499 else 0
65100 }
66- let s = {
101+ let u = {
67102 let j = getBoolean(this, ((("d_" + f) + e) + b))
68103 if ($isInstanceOf(j, "Boolean"))
69104 then {
72107 }
73108 else false
74109 }
75- let t = {
110+ let p = {
76111 let j = getBoolean(this, ((("d_" + b) + c) + f))
77112 if ($isInstanceOf(j, "Boolean"))
78113 then {
81116 }
82117 else false
83118 }
84- if (if (if (if ((o == r))
85- then (q == p)
119+ if (if (if (if ((o == t))
120+ then (s == r)
86121 else false)
87- then (t == true)
122+ then (p == true)
88123 else false)
89124 then (c == "WAVES")
90125 else false)
91126 then ScriptResult(WriteSet([DataEntry(((b + c) + f), 0), DataEntry(((f + c) + b), 0), DataEntry(((("d_" + b) + c) + f), false)]), TransferSet([ScriptTransfer(a.caller, d, unit)]))
92- else if (if (if (if ((o == r))
93- then (q == p)
127+ else if (if (if (if ((o == t))
128+ then (s == r)
94129 else false)
95- then (t == true)
130+ then (p == true)
96131 else false)
97132 then (c != "WAVES")
98133 else false)
99134 then ScriptResult(WriteSet([DataEntry(((b + c) + f), 0), DataEntry(((f + c) + b), 0), DataEntry(((("d_" + b) + c) + f), false)]), TransferSet([ScriptTransfer(a.caller, d, unit)]))
100- else throw("Not Atomic Swap")
135+ else throw("Failed to swap")
101136 }
102137
103138
104-@Verifier(u)
105-func v () = {
106- let j = u
139+@Verifier(v)
140+func w () = {
141+ let j = v
107142 if ($isInstanceOf(j, "TransferTransaction"))
108143 then {
109- let w = j
110- sigVerify(w.bodyBytes, w.proofs[0], w.senderPublicKey)
144+ let x = j
145+ sigVerify(x.bodyBytes, x.proofs[0], x.senderPublicKey)
111146 }
112147 else if ($isInstanceOf(j, "SetScriptTransaction"))
113148 then {
114- let x = j
115- sigVerify(x.bodyBytes, x.proofs[0], x.senderPublicKey)
149+ let y = j
150+ sigVerify(y.bodyBytes, y.proofs[0], y.senderPublicKey)
116151 }
117152 else true
118153 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(a)
77 func atomicDeposit (b,c,d,e) = {
88 let f = toBase58String(a.caller.bytes)
99 let g = extract(a.payment)
1010 let h = g.assetId
1111 let i = {
1212 let j = getInteger(this, ((f + e) + b))
1313 if ($isInstanceOf(j, "Int"))
1414 then {
1515 let k = j
1616 k
1717 }
1818 else 0
1919 }
2020 let l = (i + g.amount)
2121 WriteSet([DataEntry(((f + e) + b), l), DataEntry(((f + c) + b), d), DataEntry(((("d_" + f) + e) + b), true)])
2222 }
2323
2424
2525
2626 @Callable(a)
27-func atomicWithdraw (b,c,d,e,m) = {
27+func cancelWithdraw (b,c,d,e,m) = {
2828 let f = toBase58String(a.caller.bytes)
2929 let n = fromBase58String(m)
3030 let o = {
3131 let j = getInteger(this, ((f + e) + b))
3232 if ($isInstanceOf(j, "Int"))
3333 then {
3434 let k = j
3535 k
3636 }
3737 else 0
3838 }
3939 let p = {
40+ let j = getBoolean(this, ((("d_" + b) + c) + f))
41+ if ($isInstanceOf(j, "Boolean"))
42+ then {
43+ let k = j
44+ k
45+ }
46+ else false
47+ }
48+ if (if ((p == false))
49+ then (m == "WAVES")
50+ else false)
51+ then ScriptResult(WriteSet([DataEntry(((f + e) + b), 0), DataEntry(((f + c) + b), 0), DataEntry(((("d_" + f) + e) + b), false)]), TransferSet([ScriptTransfer(a.caller, o, unit)]))
52+ else if (if ((p == false))
53+ then (m != "WAVES")
54+ else false)
55+ then ScriptResult(WriteSet([DataEntry(((f + e) + b), 0), DataEntry(((f + c) + b), 0), DataEntry(((("d_" + f) + e) + b), false)]), TransferSet([ScriptTransfer(a.caller, o, n)]))
56+ else throw("Failed to withdraw")
57+ }
58+
59+
60+
61+@Callable(a)
62+func atomicWithdraw (b,c,d,e,q) = {
63+ let f = toBase58String(a.caller.bytes)
64+ let n = fromBase58String(q)
65+ let o = {
66+ let j = getInteger(this, ((f + e) + b))
67+ if ($isInstanceOf(j, "Int"))
68+ then {
69+ let k = j
70+ k
71+ }
72+ else 0
73+ }
74+ let r = {
4075 let j = getInteger(this, ((f + c) + b))
4176 if ($isInstanceOf(j, "Int"))
4277 then {
4378 let k = j
4479 k
4580 }
4681 else 0
4782 }
48- let q = {
83+ let s = {
4984 let j = getInteger(this, ((b + c) + f))
5085 if ($isInstanceOf(j, "Int"))
5186 then {
5287 let k = j
5388 k
5489 }
5590 else 0
5691 }
57- let r = {
92+ let t = {
5893 let j = getInteger(this, ((b + e) + f))
5994 if ($isInstanceOf(j, "Int"))
6095 then {
6196 let k = j
6297 k
6398 }
6499 else 0
65100 }
66- let s = {
101+ let u = {
67102 let j = getBoolean(this, ((("d_" + f) + e) + b))
68103 if ($isInstanceOf(j, "Boolean"))
69104 then {
70105 let k = j
71106 k
72107 }
73108 else false
74109 }
75- let t = {
110+ let p = {
76111 let j = getBoolean(this, ((("d_" + b) + c) + f))
77112 if ($isInstanceOf(j, "Boolean"))
78113 then {
79114 let k = j
80115 k
81116 }
82117 else false
83118 }
84- if (if (if (if ((o == r))
85- then (q == p)
119+ if (if (if (if ((o == t))
120+ then (s == r)
86121 else false)
87- then (t == true)
122+ then (p == true)
88123 else false)
89124 then (c == "WAVES")
90125 else false)
91126 then ScriptResult(WriteSet([DataEntry(((b + c) + f), 0), DataEntry(((f + c) + b), 0), DataEntry(((("d_" + b) + c) + f), false)]), TransferSet([ScriptTransfer(a.caller, d, unit)]))
92- else if (if (if (if ((o == r))
93- then (q == p)
127+ else if (if (if (if ((o == t))
128+ then (s == r)
94129 else false)
95- then (t == true)
130+ then (p == true)
96131 else false)
97132 then (c != "WAVES")
98133 else false)
99134 then ScriptResult(WriteSet([DataEntry(((b + c) + f), 0), DataEntry(((f + c) + b), 0), DataEntry(((("d_" + b) + c) + f), false)]), TransferSet([ScriptTransfer(a.caller, d, unit)]))
100- else throw("Not Atomic Swap")
135+ else throw("Failed to swap")
101136 }
102137
103138
104-@Verifier(u)
105-func v () = {
106- let j = u
139+@Verifier(v)
140+func w () = {
141+ let j = v
107142 if ($isInstanceOf(j, "TransferTransaction"))
108143 then {
109- let w = j
110- sigVerify(w.bodyBytes, w.proofs[0], w.senderPublicKey)
144+ let x = j
145+ sigVerify(x.bodyBytes, x.proofs[0], x.senderPublicKey)
111146 }
112147 else if ($isInstanceOf(j, "SetScriptTransaction"))
113148 then {
114- let x = j
115- sigVerify(x.bodyBytes, x.proofs[0], x.senderPublicKey)
149+ let y = j
150+ sigVerify(y.bodyBytes, y.proofs[0], y.senderPublicKey)
116151 }
117152 else true
118153 }
119154

github/deemru/w8io/026f985 
55.93 ms