tx · 8x2cAsfpeFwTfhyzoAhgDieQAqNMJMRDZTZWgBhQDEKL 3N8x5gskz2zByy7F3pujiodg6HAgdHNU3MQ: -0.00900000 Waves 2022.09.15 18:27 [2230409] smart account 3N8x5gskz2zByy7F3pujiodg6HAgdHNU3MQ > SELF 0.00000000 Waves
{ "type": 13, "id": "8x2cAsfpeFwTfhyzoAhgDieQAqNMJMRDZTZWgBhQDEKL", "fee": 900000, "feeAssetId": null, "timestamp": 1663255635004, "version": 2, "chainId": 84, "sender": "3N8x5gskz2zByy7F3pujiodg6HAgdHNU3MQ", "senderPublicKey": "DG81iJnTHiW65E3LH7birSpxT7WWregC8134iCotF6ur", "proofs": [ "5PbLy1UbVtG1qvdJGFvevXvPFihknmjZzmpCqAb8P9QhYnDSA8z4MsM2P9pcPKFwsnhE7EEZKtDUFrAhWdPGTXTm" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEEAAAAAgAAAAAEVVNETgEAAAAgD/IcEqzkxDya7EYaqyWosOy6BytGzG2IcvC14pJJAbQAAAAACmZlZUFkZHJlc3MJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVRN4ZyNCrFnIo+y6NX20ZPI4iW2M835D+AAAAABAAAAAWkBAAAACHVzZG5fMTAwAAAAAQAAAARyZWd1BAAAAAVhZG1pbgIAAAAjM013MXQ1VE1aSnhMdkdqQUZhM1JFckVxUHlvWFBMNE44QTMDCQEAAAACIT0AAAACCQAEJQAAAAEIBQAAAAFpAAAABmNhbGxlcgUAAAAFYWRtaW4JAAACAAAAAQIAAAARb25seSBhZG1pbiBjYW4gZG8EAAAAEXVzZG5BbW91bnRPblN0YXJ0CQAD8AAAAAIFAAAABHRoaXMFAAAABFVTRE4DCQAAAAAAAAIFAAAAEXVzZG5BbW91bnRPblN0YXJ0BQAAABF1c2RuQW1vdW50T25TdGFydAQAAAADaW52CQAD/AAAAAQJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAECAAAAIzNNd0dYdXdBeFk1cW1w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ACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQjAQ24=", "height": 2230409, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: E4HikDtd81EmwiryQRwa1TUXw1tcku7zNHWDetjqrvyT Next: 7nTSF23nj4rJwJ6SjLN6oUz34rNwhKVQB9qYuYSitR8K Diff:
Old | New | Differences | |
---|---|---|---|
22 | 22 | then { | |
23 | 23 | let withAmount = (usdnAmountAfterWithdraw - usdnAmountOnStart) | |
24 | 24 | let feeAmount = fraction(withAmount, 5, 100) | |
25 | - | [IntegerEntry("fees", (valueOrElse(getInteger("fees"), 0) + feeAmount)), IntegerEntry("withdrawals", (valueOrElse(getInteger("withdrawals"), 0) + 1)) | |
25 | + | [IntegerEntry("fees", (valueOrElse(getInteger("fees"), 0) + feeAmount)), ScriptTransfer(feeAddress, feeAmount, USDN), IntegerEntry("withdrawals", (valueOrElse(getInteger("withdrawals"), 0) + 1))] | |
26 | 26 | } | |
27 | 27 | else throw("Strict value is not equal to itself.") | |
28 | 28 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let USDN = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT' | |
5 | 5 | ||
6 | 6 | let feeAddress = Address(base58'3Mw1t5TMZJxLvGjAFa3RErEqPyoXPL4N8A3') | |
7 | 7 | ||
8 | 8 | @Callable(i) | |
9 | 9 | func usdn_100 (regu) = { | |
10 | 10 | let admin = "3Mw1t5TMZJxLvGjAFa3RErEqPyoXPL4N8A3" | |
11 | 11 | if ((toString(i.caller) != admin)) | |
12 | 12 | then throw("only admin can do") | |
13 | 13 | else { | |
14 | 14 | let usdnAmountOnStart = assetBalance(this, USDN) | |
15 | 15 | if ((usdnAmountOnStart == usdnAmountOnStart)) | |
16 | 16 | then { | |
17 | 17 | let inv = invoke(addressFromStringValue("3MwGXuwAxY5qmp1LG4ibCBeHz862Y2gETC8"), "wVI", [false, true], nil) | |
18 | 18 | if ((inv == inv)) | |
19 | 19 | then { | |
20 | 20 | let usdnAmountAfterWithdraw = assetBalance(this, USDN) | |
21 | 21 | if ((usdnAmountAfterWithdraw == usdnAmountAfterWithdraw)) | |
22 | 22 | then { | |
23 | 23 | let withAmount = (usdnAmountAfterWithdraw - usdnAmountOnStart) | |
24 | 24 | let feeAmount = fraction(withAmount, 5, 100) | |
25 | - | [IntegerEntry("fees", (valueOrElse(getInteger("fees"), 0) + feeAmount)), IntegerEntry("withdrawals", (valueOrElse(getInteger("withdrawals"), 0) + 1)) | |
25 | + | [IntegerEntry("fees", (valueOrElse(getInteger("fees"), 0) + feeAmount)), ScriptTransfer(feeAddress, feeAmount, USDN), IntegerEntry("withdrawals", (valueOrElse(getInteger("withdrawals"), 0) + 1))] | |
26 | 26 | } | |
27 | 27 | else throw("Strict value is not equal to itself.") | |
28 | 28 | } | |
29 | 29 | else throw("Strict value is not equal to itself.") | |
30 | 30 | } | |
31 | 31 | else throw("Strict value is not equal to itself.") | |
32 | 32 | } | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | @Verifier(tx) | |
37 | 37 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
38 | 38 |
github/deemru/w8io/03bedc9 32.46 ms ◑![]()