tx · DkrKPqYaFFC7zUqZfT5HtXrw9w38as7xXkaYS2xuepVY

3NBmj1eEDJmrQ16GJkmVU1p31MTURgoV38r:  -0.01400000 Waves

2019.08.19 15:20 [638019] smart account 3NBmj1eEDJmrQ16GJkmVU1p31MTURgoV38r > SELF 0.00000000 Waves

{ "type": 13, "id": "DkrKPqYaFFC7zUqZfT5HtXrw9w38as7xXkaYS2xuepVY", "fee": 1400000, "feeAssetId": null, "timestamp": 1566217195106, "version": 1, "sender": "3NBmj1eEDJmrQ16GJkmVU1p31MTURgoV38r", "senderPublicKey": "DKGFPozLrsiR8NM4NJzqQaBYC8NyGYjuw2hDYicQVjco", "proofs": [ "24Kg7C3H2tDDyJKuRPEKzwStqwbjz4gJ5rfrrLyw6Quwfq4PoHXqE9YWbN5zFSrdf5rqGjDBKpfTNF4WsFZSq43J" ], "script": "base64:AwQAAAAGUHViS2V5AQAAABoBVO++G2yXlry4mzH2WZWOPvZoK7DmvzowLwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAABlB1YktleTD4Qf8=", "chainId": 84, "height": 638019, "spentComplexity": 0 } View: original | compacted Prev: 619mTNxUP8EngJdzyUt4T7BfqGaZyJWYVEwDjZWrQGjP Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
2-{-# SCRIPT_TYPE ACCOUNT #-}
3-{-# CONTENT_TYPE DAPP #-}
4-let a = base58'3NBmj1eEDJmrQ16GJkmVU1p31MTURgoV38r'
5-
6-let b = base58'GhAFhXzwCYfvcXQ3GHFaQFnCzAuYCT156qFqiYyzfkzv'
7-
8-let c = unit
9-
10-@Callable(d)
11-func uniswap (e,f) = if (if ((0 > e))
12- then true
13- else (e > 100))
14- then throw("incorrect comission value")
15- else {
16- let g = getIntegerValue(this, "wavesAmount")
17- let h = getIntegerValue(this, "liquidAmount")
18- let i = {
19- let j = d.payment
20- if ($isInstanceOf(j, "AttachedPayment"))
21- then {
22- let k = j
23- k
24- }
25- else throw("Payment not attached")
26- }
27- let l = i.assetId
28- let m = i.amount
29- if ((l == unit))
30- then {
31- let n = ((fraction(h, m, (m + g)) * (100 - e)) / 100)
32- if ((f > n))
33- then throw("Price has changed dramaticaly. Receiving token amount don't satisfy specified price level")
34- else {
35- let o = b
36- ScriptResult(WriteSet([DataEntry("liquidAmount", (h - n)), DataEntry("wavesAmount", (g + m))]), TransferSet([ScriptTransfer(d.caller, n, o)]))
37- }
38- }
39- else if ((l == b))
40- then {
41- let n = ((fraction(g, m, (m + h)) * (100 - e)) / 100)
42- if ((f > n))
43- then throw("Price has changed dramaticaly. Receiving token amount don't satisfy specified price level")
44- else {
45- let o = unit
46- ScriptResult(WriteSet([DataEntry("liquidAmount", (h + m)), DataEntry("wavesAmount", (g - n))]), TransferSet([ScriptTransfer(d.caller, n, o)]))
47- }
48- }
49- else throw("Asset is not allowed")
50- }
51-
52-
53-
54-@Callable(d)
55-func withdraw () = {
56- let p = assetBalance(this, b)
57- let q = wavesBalance(this)
58- if ((d.caller.bytes == a))
59- then ScriptResult(WriteSet([DataEntry("liquidAmount", "withdrawn"), DataEntry("wavesAmount", "withdrawn")]), TransferSet([ScriptTransfer(d.caller, p, b), ScriptTransfer(d.caller, q, unit)]))
60- else throw("You are not exchanger's owner")
61- }
62-
63-
64-@Verifier(d)
65-func r () = true
66-
2+{-# CONTENT_TYPE EXPRESSION #-}
3+let PubKey = base58'3NBmj1eEDJmrQ16GJkmVU1p31MTURgoV38r'
4+sigVerify(tx.bodyBytes, tx.proofs[0], PubKey)

github/deemru/w8io/3ef1775 
40.21 ms