tx · 9hWQQt6c6bgk4zvAPFWHv44zH7kRnbVFF7nJjJzS7dXo

3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id:  -0.01400000 Waves

2021.05.07 12:46 [1515099] smart account 3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id > SELF 0.00000000 Waves

{ "type": 13, "id": "9hWQQt6c6bgk4zvAPFWHv44zH7kRnbVFF7nJjJzS7dXo", "fee": 1400000, "feeAssetId": null, "timestamp": 1620380815346, "version": 2, "chainId": 84, "sender": "3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id", "senderPublicKey": "8agr5kfwDL7NLuMetvciXCcd9TcDKZhRwYZPPTAShaCC", "proofs": [ "4E7y9NziMypAyED7fdvBczxCiWRouypyFnpDSHxmyrYXspAF18BV9rwHUPMMSMRBjgyqVakCowgmmFxzGwXPdNdd" ], "script": "base64:AAIEAAAAAAAAABQIAhIECgIBARIDCgEIEgASAwoBCAAAAAkAAAAAD2tleUV4Y2hhbmdlUmF0ZQIAAAANZXhjaGFuZ2VfcmF0ZQAAAAAda2V5RXhjaGFuZ2VSYXRlU2NhbGVEZWxpbWl0ZXICAAAAHWV4Y2hhbmdlX3JhdGVfc2NhbGVfZGVsaW1pdGVyAAAAAA1rZXlDb21taXNzaW9uAgAAAApjb21taXNzaW9uAAAAABtrZXlDb21taXNzaW9uU2NhbGVEZWxpbWl0ZXICAAAAGmNvbW1pc3Npb25fc2NhbGVfZGVsaW1pdGVyAAAAAARVU0ROAQAAACDksHLEGjv+8PYJNtljDWFsUYAqeC0sRtfKUlc+urlUoQAAAAAGVVdPUkxEAQAAACAtGFOlUDuo5uQJ1exIGoVYlbyPhEbn5MXvOd7nG64s6QAAAAAHYXNzZXRJZAUAAAAEVVNETgAAAAAKY29tbWlzc2lvbgAAAAAAAAB1MAAAAAAYY29tbWlzc2lvblNjYWxlRGVsaW1pdGVyAAAAAAAAD0JAAAAABAAAAAFpAQAAAAlzZXRQYXJhbXMAAAACAAAADGV4Y2hh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NzZXRJZAkAAAIAAAABAgAAABdBc3NldCBtdXN0IGJlIFVTRE4gb25seQQAAAAQYW1vdW50Q29tbWlzc2lvbgkAAGsAAAADBQAAAAlwbXRBbW91bnQFAAAACmNvbW1pc3Npb24FAAAAGGNvbW1pc3Npb25TY2FsZURlbGltaXRlcgQAAAAXYW1vdW50V2l0aG91dENvbW1pc3Npb24JAABlAAAAAgUAAAAJcG10QW1vdW50BQAAABBhbW91bnRDb21taXNzaW9uBAAAAA5hbW91bnRDYXNoYmFjawkAAGsAAAADBQAAAAlwbXRBbW91bnQAAAAAAAAAAAoAAAAAAAAAAGQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAQcmVjaXBpZW50QWRkcmVzcwUAAAAXYW1vdW50V2l0aG91dENvbW1pc3Npb24FAAAAB2Fzc2V0SWQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAQcmVjaXBpZW50QWRkcmVzcwUAAAAOYW1vdW50Q2FzaGJhY2sFAAAABlVXT1JMRAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAADmFtb3VudENhc2hiYWNrBQAAAAZVV09STEQFAAAAA25pbAAAAAAEGQcc", "height": 1515099, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2ouMD1yZhQjWwXZm3KenK3Sn167FXGr1VVqNTgbqWaK1 Next: 3Hs7x5F2M8zdZBjzkrgqp6PWHreM19p8QY9cwKsxk3ku Diff:
OldNewDifferences
2727
2828
2929 @Callable(j)
30-func buyUWORLD () = {
31- let m = $Tuple2(j.payments[0].amount, j.payments[0].assetId)
32- let n = m._1
33- let o = m._2
34- if ((o != g))
30+func buyUWORLD (m) = {
31+ let n = $Tuple2(j.payments[0].amount, j.payments[0].assetId)
32+ let o = n._1
33+ let p = n._2
34+ if ((p != g))
3535 then throw("Asset must be USDN only")
3636 else {
3737 let k = getIntegerValue(this, a)
3838 let l = getIntegerValue(this, b)
39- let p = fraction(n, k, l)
40- let q = fraction(p, h, i)
41- let r = (p - q)
42-[ScriptTransfer(j.caller, r, f)]
39+ let q = fraction(o, k, l)
40+ let r = fraction(q, h, i)
41+ let s = (q - r)
42+[ScriptTransfer(j.caller, s, f)]
4343 }
4444 }
4545
4747
4848 @Callable(j)
4949 func sellUWORLD () = {
50- let s = $Tuple2(j.payments[0].amount, j.payments[0].assetId)
51- let n = s._1
52- let o = s._2
53- if ((o != f))
50+ let t = $Tuple2(j.payments[0].amount, j.payments[0].assetId)
51+ let o = t._1
52+ let p = t._2
53+ if ((p != f))
5454 then throw("Asset must be UWORLD only")
5555 else {
5656 let k = getIntegerValue(this, a)
5757 let l = getIntegerValue(this, b)
58- let p = fraction(n, l, k)
59- let q = fraction(p, h, i)
60- let r = (p - q)
61-[ScriptTransfer(j.caller, r, e)]
58+ let q = fraction(o, l, k)
59+ let r = fraction(q, h, i)
60+ let s = (q - r)
61+[ScriptTransfer(j.caller, s, e)]
6262 }
6363 }
6464
6565
6666
6767 @Callable(j)
68-func makePayment (t) = {
69- let u = addressFromStringValue(t)
68+func makePayment (m) = {
69+ let u = addressFromStringValue(m)
7070 let v = $Tuple2(j.payments[0].amount, j.payments[0].assetId)
71- let n = v._1
72- let o = v._2
73- if ((o != g))
71+ let o = v._1
72+ let p = v._2
73+ if ((p != g))
7474 then throw("Asset must be USDN only")
7575 else {
76- let q = fraction(n, h, i)
77- let r = (n - q)
78- let w = fraction(n, 10, 100)
79-[ScriptTransfer(u, r, g), ScriptTransfer(u, w, f), ScriptTransfer(j.caller, w, f)]
76+ let r = fraction(o, h, i)
77+ let s = (o - r)
78+ let w = fraction(o, 10, 100)
79+[ScriptTransfer(u, s, g), ScriptTransfer(u, w, f), ScriptTransfer(j.caller, w, f)]
8080 }
8181 }
8282
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "exchange_rate"
55
66 let b = "exchange_rate_scale_delimiter"
77
88 let c = "commission"
99
1010 let d = "commission_scale_delimiter"
1111
1212 let e = base58'GPi1Q6QVgUmuomtThbim81hBYBEUWyf5BVmE4Tnd3sNg'
1313
1414 let f = base58'432rwiV6mi3SJGLkhGPeyHVNUj8rEgHpXwyc1yXj4M6Y'
1515
1616 let g = e
1717
1818 let h = 30000
1919
2020 let i = 1000000
2121
2222 @Callable(j)
2323 func setParams (k,l) = if ((j.caller != this))
2424 then throw("Only the DApp itself can call this function")
2525 else [IntegerEntry(a, k), IntegerEntry(b, l), IntegerEntry(c, h), IntegerEntry(d, i)]
2626
2727
2828
2929 @Callable(j)
30-func buyUWORLD () = {
31- let m = $Tuple2(j.payments[0].amount, j.payments[0].assetId)
32- let n = m._1
33- let o = m._2
34- if ((o != g))
30+func buyUWORLD (m) = {
31+ let n = $Tuple2(j.payments[0].amount, j.payments[0].assetId)
32+ let o = n._1
33+ let p = n._2
34+ if ((p != g))
3535 then throw("Asset must be USDN only")
3636 else {
3737 let k = getIntegerValue(this, a)
3838 let l = getIntegerValue(this, b)
39- let p = fraction(n, k, l)
40- let q = fraction(p, h, i)
41- let r = (p - q)
42-[ScriptTransfer(j.caller, r, f)]
39+ let q = fraction(o, k, l)
40+ let r = fraction(q, h, i)
41+ let s = (q - r)
42+[ScriptTransfer(j.caller, s, f)]
4343 }
4444 }
4545
4646
4747
4848 @Callable(j)
4949 func sellUWORLD () = {
50- let s = $Tuple2(j.payments[0].amount, j.payments[0].assetId)
51- let n = s._1
52- let o = s._2
53- if ((o != f))
50+ let t = $Tuple2(j.payments[0].amount, j.payments[0].assetId)
51+ let o = t._1
52+ let p = t._2
53+ if ((p != f))
5454 then throw("Asset must be UWORLD only")
5555 else {
5656 let k = getIntegerValue(this, a)
5757 let l = getIntegerValue(this, b)
58- let p = fraction(n, l, k)
59- let q = fraction(p, h, i)
60- let r = (p - q)
61-[ScriptTransfer(j.caller, r, e)]
58+ let q = fraction(o, l, k)
59+ let r = fraction(q, h, i)
60+ let s = (q - r)
61+[ScriptTransfer(j.caller, s, e)]
6262 }
6363 }
6464
6565
6666
6767 @Callable(j)
68-func makePayment (t) = {
69- let u = addressFromStringValue(t)
68+func makePayment (m) = {
69+ let u = addressFromStringValue(m)
7070 let v = $Tuple2(j.payments[0].amount, j.payments[0].assetId)
71- let n = v._1
72- let o = v._2
73- if ((o != g))
71+ let o = v._1
72+ let p = v._2
73+ if ((p != g))
7474 then throw("Asset must be USDN only")
7575 else {
76- let q = fraction(n, h, i)
77- let r = (n - q)
78- let w = fraction(n, 10, 100)
79-[ScriptTransfer(u, r, g), ScriptTransfer(u, w, f), ScriptTransfer(j.caller, w, f)]
76+ let r = fraction(o, h, i)
77+ let s = (o - r)
78+ let w = fraction(o, 10, 100)
79+[ScriptTransfer(u, s, g), ScriptTransfer(u, w, f), ScriptTransfer(j.caller, w, f)]
8080 }
8181 }
8282
8383

github/deemru/w8io/026f985 
36.57 ms