tx · Fm35RrkjvLNf4dZYggTUdmDGAtDW7KV7VRWJWcH1tMFc

3MwLcJy3MSb2kq6dUaUR5uBgm8zCKZMjz2S:  -0.01400000 Waves

2021.03.26 22:57 [1455161] smart account 3MwLcJy3MSb2kq6dUaUR5uBgm8zCKZMjz2S > SELF 0.00000000 Waves

{ "type": 13, "id": "Fm35RrkjvLNf4dZYggTUdmDGAtDW7KV7VRWJWcH1tMFc", "fee": 1400000, "feeAssetId": null, "timestamp": 1616788689978, "version": 2, "chainId": 84, "sender": "3MwLcJy3MSb2kq6dUaUR5uBgm8zCKZMjz2S", "senderPublicKey": "CgByewRUvLk7UtWSfRMLSYw4Ap2wT5dcdVYKideqDp9M", "proofs": [ "2yG9Dp4iArhRHv6uzAJzzXmPU8TmQRQmiVsAZmDKSRKF4qQbVqrdbBgqz8JVNViLpAt2sgjvEJw9zLFJrUTtRfKh" ], "script": "base64:AAIEAAAAAAAAAAYIAhIAEgAAAAAPAAAAAA50b3RhbEZlZUV0aEtleQIAAAANdG90YWxfZmVlX2V0aAAAAAAOdG90YWxGZWVVc2RLZXkCAAAADXRvdGFsX2ZlZV91c2QAAAAAEnRvdGFsRmVlRHl6cmFwdEtleQIAAAARdG90YWxfZmVlX2R5enJhcHQAAAAADnByaWNlT2ZEeXpyYXB0AgAAAANkeXoAAAAACnByaWNlT2ZFdGgCAAAAA2V0aAAAAAANb3JhY2xlQWRkcmVzcwkBAAAAB0FkZHJlc3MAAAABAQAAABoBVL4/7s2JD7wFpgWNJdKO/aqFvcIdJFtzlgAAAAAOZHl6cmFwdEFzc2V0SWQBAAAAIJ8Z6XPZJu9QR4hmGj9/o7LyMJ48jRPQD0CePJOEpwQjAAAAAApldGhBc3NldElkAQAAACAiJlO6kpv9VYDdwqxzfY0rRQ9rtHAOIBs/eo3GguMLoQAAAAALdXNkbkFzc2V0SWQBAAAAIHxpwWtkcIB0JFIbiNXtI38nVRmozWmXoaigru9h4HfCAQAAAAxnZXRGZWVBbW91bnQAAAABAA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kBAAAAEXN3YXBVc2RuVG9EeXpyYXB0AAAAAAQAAAADcG10CQEAAAAFdmFsdWUAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAAdhc3NldElkCAUAAAADcG10AAAAB2Fzc2V0SWQEAAAAC3RvdGFsQW1vdW50CAUAAAADcG10AAAABmFtb3VudAMJAQAAAAIhPQAAAAIFAAAAB2Fzc2V0SWQFAAAAC3VzZG5Bc3NldElkCQAAAgAAAAECAAAAKU9ubHkgdXNkbiB0b2tlbnMgYXJlIGFsbG93ZWQgZm9yIHN3YXBwaW5nBAAAAANmZWUJAQAAAAxnZXRGZWVBbW91bnQAAAABBQAAAAt0b3RhbEFtb3VudAQAAAAGYW1vdW50CQAAZQAAAAIFAAAAC3RvdGFsQW1vdW50BQAAAANmZWUEAAAADWR5enJhcHRBbW91bnQJAQAAAA11c2RuVG9EeXpyYXB0AAAAAQUAAAAGYW1vdW50BAAAAAhzYXZlZEZlZQkBAAAADmdldFRvdGFsRmVlVXNkAAAAAAQAAAAIdG90YWxGZWUJAABkAAAAAgUAAAAIc2F2ZWRGZWUFAAAAA2ZlZQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAAOdG90YWxGZWVVc2RLZXkFAAAACHRvdGFsRmVlCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAANZHl6cmFwdEFtb3VudAUAAAAOZHl6cmFwdEFzc2V0SWQFAAAAA25pbAAAAAB73AIX", "height": 1455161, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 53sAX32qwPVN2HodRM1PU8mprkhTKunBVwxU6tULu1eh Next: 3sPLws5tXwicZQGq4hv1AaDf27Z369MFXcftqpGZsoHa Diff:
OldNewDifferences
7070 let k = (x - l)
7171 let y = s(k)
7272 let z = q()
73- throw(((((((((("total: " + toString(x)) + "; fee: ") + toString(l)) + "; amount: ") + toString(k)) + "; dyzrapt: ") + toString(y)) + "; totalFee: ") + toString(z)))
73+ let A = (z + l)
74+[IntegerEntry(b, A), ScriptTransfer(u.caller, y, g)]
7475 }
7576 }
7677
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "total_fee_eth"
55
66 let b = "total_fee_usd"
77
88 let c = "total_fee_dyzrapt"
99
1010 let d = "dyz"
1111
1212 let e = "eth"
1313
1414 let f = Address(base58'3N7G2kVtBTh94aEnDHQ9dpi4EdsDxAiDXjB')
1515
1616 let g = base58'Bi4jxKEFjjYG2emeyxZfpkVMS88N7uAogHNsi1urkoJA'
1717
1818 let h = base58'3JJkzB4pFXcqdJvC9TcV8ys1FLgesr5SxbhmykkpceQp'
1919
2020 let i = base58'9Nf5wpj6jds3VRZKDryp6Dtf3R9d8MdbjNhencLogCr5'
2121
2222 func j (k) = {
2323 let l = fraction(k, 3, 100)
2424 l
2525 }
2626
2727
2828 func m (n) = {
2929 let o = valueOrElse(getInteger(this, n), 0)
3030 o
3131 }
3232
3333
3434 func p () = m(a)
3535
3636
3737 func q () = m(b)
3838
3939
4040 func r () = m(c)
4141
4242
4343 func s (k) = {
4444 let t = valueOrErrorMessage(getInteger(f, "dyz"), "Unable to load price")
4545 fraction(k, 10000, t)
4646 }
4747
4848
4949 @Callable(u)
5050 func test () = {
5151 let v = value(u.payments[0])
5252 let w = v.assetId
5353 let k = v.amount
5454 if ((w == g))
5555 then throw(("its a dyzrapt. Amount=" + toString(k)))
5656 else throw("its not a dyzrapt")
5757 }
5858
5959
6060
6161 @Callable(u)
6262 func swapUsdnToDyzrapt () = {
6363 let v = value(u.payments[0])
6464 let w = v.assetId
6565 let x = v.amount
6666 if ((w != i))
6767 then throw("Only usdn tokens are allowed for swapping")
6868 else {
6969 let l = j(x)
7070 let k = (x - l)
7171 let y = s(k)
7272 let z = q()
73- throw(((((((((("total: " + toString(x)) + "; fee: ") + toString(l)) + "; amount: ") + toString(k)) + "; dyzrapt: ") + toString(y)) + "; totalFee: ") + toString(z)))
73+ let A = (z + l)
74+[IntegerEntry(b, A), ScriptTransfer(u.caller, y, g)]
7475 }
7576 }
7677
7778

github/deemru/w8io/169f3d6 
31.12 ms