tx · BC8monaYtxij8jUZtvQkjqDSddmn8XpvsJHSbXwjf3GD 3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id: -0.01400000 Waves 2021.04.23 01:31 [1494250] smart account 3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id > SELF 0.00000000 Waves
{ "type": 13, "id": "BC8monaYtxij8jUZtvQkjqDSddmn8XpvsJHSbXwjf3GD", "fee": 1400000, "feeAssetId": null, "timestamp": 1619130775327, "version": 2, "chainId": 84, "sender": "3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id", "senderPublicKey": "8agr5kfwDL7NLuMetvciXCcd9TcDKZhRwYZPPTAShaCC", "proofs": [ "5ymaEMqQfgfwU1EJuAiK5GK6zvncq7JcyfxvhzvvxiPfkgwF2fkttgM3aLYDebGbEE43AaWV6eVx4CysrC3ovzUw" ], "script": "base64:AAIEAAAAAAAAAAcIAhIDCgEIAAAABAAAAAAEVVNETgEAAAAgtiYpwwT1zlORpA5LdSQvZIxRsfrfr1QpvUjSHSqyqtEAAAAAB1VTRHRlc3QBAAAAIOSwcsQaO/7w9gk22WMNYWxRgCp4LSxG18pSVz66uVShAAAAAAdhc3NldElkBQAAAAdVU0R0ZXN0AQAAAAxnZXRBc3NldEluZm8AAAABAAAAB2Fzc2V0SWQEAAAAByRtYXRjaDAFAAAAB2Fzc2V0SWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAmlkBQAAAAckbWF0Y2gwBAAAAAhzdHJpbmdJZAkAAlgAAAABBQAAAAJpZAQAAAAEaW5mbwkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAD7AAAAAEFAAAAAmlkCQABLAAAAAIJAAEsAAAAAgIAAAAGQXNzZXQgBQAAAAhzdHJpbmdJZAIAAAAOIGRvZXNuJ3QgZXhpc3QJAAUVAAAAAwUAAAAIc3RyaW5nSWQIBQAAAARpbmZvAAAABG5hbWUIBQAAAARpbmZvAAAACGRlY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QAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgAAAAAAAAAAAQUAAAAHYXNzZXRJZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAABByZWNpcGllbnRBZGRyZXNzBQAAABBhbW91bnRXaXRob3V0RmVlBQAAAAdhc3NldElkBQAAAANuaWwAAAAA6qB40A==", "height": 1494250, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HXP6zH2EzVFi2JPYT9cgow6Nyym4RL3n2jSFBL3TCt2Z Next: 2GWm7BkWcubddzHbk3gwuizvVQbvLwFcY6TPVg9fBbGN Diff:
Old | New | Differences | |
---|---|---|---|
40 | 40 | else { | |
41 | 41 | let t = 30000 | |
42 | 42 | let u = 1000000 | |
43 | - | let v = fraction(n, | |
43 | + | let v = fraction(n, 3, 100) | |
44 | 44 | let w = (n - v) | |
45 | 45 | [ScriptTransfer(j.caller, 1, c), ScriptTransfer(l, w, c)] | |
46 | 46 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
5 | 5 | ||
6 | 6 | let b = base58'GPi1Q6QVgUmuomtThbim81hBYBEUWyf5BVmE4Tnd3sNg' | |
7 | 7 | ||
8 | 8 | let c = b | |
9 | 9 | ||
10 | 10 | func d (c) = { | |
11 | 11 | let e = c | |
12 | 12 | if ($isInstanceOf(e, "ByteVector")) | |
13 | 13 | then { | |
14 | 14 | let f = e | |
15 | 15 | let g = toBase58String(f) | |
16 | 16 | let h = valueOrErrorMessage(assetInfo(f), (("Asset " + g) + " doesn't exist")) | |
17 | 17 | $Tuple3(g, h.name, h.decimals) | |
18 | 18 | } | |
19 | 19 | else if ($isInstanceOf(e, "Unit")) | |
20 | 20 | then { | |
21 | 21 | let i = e | |
22 | 22 | $Tuple3("WAVES", "WAVES", 8) | |
23 | 23 | } | |
24 | 24 | else throw("Match error") | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | @Callable(j) | |
29 | 29 | func call (k) = { | |
30 | 30 | let l = addressFromStringValue(k) | |
31 | 31 | let m = $Tuple2(j.payments[0].amount, j.payments[0].assetId) | |
32 | 32 | let n = m._1 | |
33 | 33 | let o = m._2 | |
34 | 34 | let p = d(o) | |
35 | 35 | let q = p._1 | |
36 | 36 | let r = p._2 | |
37 | 37 | let s = p._3 | |
38 | 38 | if ((o != c)) | |
39 | 39 | then throw("Assets must be USDN only") | |
40 | 40 | else { | |
41 | 41 | let t = 30000 | |
42 | 42 | let u = 1000000 | |
43 | - | let v = fraction(n, | |
43 | + | let v = fraction(n, 3, 100) | |
44 | 44 | let w = (n - v) | |
45 | 45 | [ScriptTransfer(j.caller, 1, c), ScriptTransfer(l, w, c)] | |
46 | 46 | } | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 |
github/deemru/w8io/169f3d6 58.93 ms ◑