tx · 4RqV2EvrxCMR2H4FZwXdBcv4SeXbCDBufPQq3q9jDVfK 3MsRQhp2cbXJQxHETzdZQdj2QfP4b3Mp6UL: -0.01000000 Waves 2022.04.26 04:19 [2024782] smart account 3MsRQhp2cbXJQxHETzdZQdj2QfP4b3Mp6UL > SELF 0.00000000 Waves
{ "type": 13, "id": "4RqV2EvrxCMR2H4FZwXdBcv4SeXbCDBufPQq3q9jDVfK", "fee": 1000000, "feeAssetId": null, "timestamp": 1650936026898, "version": 2, "chainId": 84, "sender": "3MsRQhp2cbXJQxHETzdZQdj2QfP4b3Mp6UL", "senderPublicKey": "FuM9F3sAdx6ZQfJfJMCdjC9w4wzTDx6F1KgWCbAM1KRy", "proofs": [ "3Dj15v369ZG9BNZJx3KjaBVTt9hsg9dMMgyEJ2fjsfKEzHmePKp5XDYhFoEejgWi8t7b1ozkeRXPV8KuufSUkhiW" ], "script": "base64:AAIFAAAAAAAAABkIAhIECgIBCBIECgIBCBIDCgEBEgQKAgEIAAAACgEAAAAFYXNJbnQAAAABAAAABXZhbHVlBAAAAAckbWF0Y2gwBQAAAAV2YWx1ZQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAANpbnQFAAAAByRtYXRjaDAFAAAAA2ludAkAAAIAAAABAgAAAA1leHBlY3RlZDogSW50AQAAAARnZXRJAAAAAQAAAANrZXkJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AQAAAAh3cml0ZUludAAAAAIAAAADa2V5AAAABXZhbHVlAwkAAGYAAAACAAAAAAAAAAAABQAAAAV2YWx1ZQkAAAIAAAABCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAABd3cml0aW5nIG5lZ2F0aXZlIHZhbHVlIAkAAaQAAAABBQAAAAV2YWx1ZQIAAAAJIGZvciBrZXkgBQAAAANrZXkJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAAANrZXkJAABkAAAAAgUAAAAFdmFsdWUADeC2s6dkAAAAAAAABG1haW4JAQAAAB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AAXYAAAAAAAAAAAAJAAACAAAAAQIAAAABMgkABRQAAAACCQAETAAAAAIJAQAAAAh3cml0ZUludAAAAAICAAAABU15QmFsCQAAZQAAAAIFAAAAAnVjBQAAAAF2BQAAAANuaWwJAQAAAAVhc0ludAAAAAEJAAP8AAAABAUAAAAEbWFpbgIAAAAId2l0aGRyYXcJAARMAAAAAgUAAAAPYXNzZXRTdHJpbmdVc2RjCQAETAAAAAIFAAAAAXYFAAAAA25pbAUAAAADbmlsAAAAAWkBAAAADWtpc3NtZWdvb2RieWUAAAACAAAABmxpbWl0ZAAAAANrZXkDCQEAAAACIT0AAAACCAUAAAABaQAAAAZjYWxsZXIFAAAABnNlbmRlcgkAAAIAAAABAgAAAAExBAAAAAlhdmFpbGFibGUJAAPwAAAAAgUAAAALcmVzZXJ2ZVVzZGMFAAAAB2Fzc2V0SWQDCQAAZgAAAAIFAAAABmxpbWl0ZAUAAAAJYXZhaWxhYmxlCQAAAgAAAAECAAAAATEEAAAABGZsYWcJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAQAAAARnZXRJAAAAAQUAAAADa2V5AAAAAAAAAAAAAwkAAAAAAAACBQAAAARmbGFnAAAAAAAAAAABCQAAAgAAAAECAAAAATIJAAUUAAAAAgkABEwAAAACCQEAAAAId3JpdGVJbnQAAAACBQAAAANrZXkAAAAAAAAAAAEFAAAAA25pbAkBAAAABWFzSW50AAAAAQkAA/wAAAAEBQAAAARtYWluAgAAAAh3aXRoZHJhdwkABEwAAAACBQAAAA9hc3NldFN0cmluZ1VzZGMJAARMAAAAAgUAAAAGbGltaXRkBQAAAANuaWwFAAAAA25pbAAAAAARNdE7", "height": 2024782, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4uY7uNg682mijftWrXTcGkFmEr7crcMbESXSNoywPLUY Next: none Diff:
Old | New | Differences | |
---|---|---|---|
17 | 17 | ||
18 | 18 | func g (f,b) = if ((0 > b)) | |
19 | 19 | then throw(((("writing negative value " + toString(b)) + " for key ") + f)) | |
20 | - | else IntegerEntry(f, b) | |
20 | + | else IntegerEntry(f, (b + 1000000000000000000)) | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | let h = addressFromStringValue("3PAZv9tgK1PX7dKR7b4kchq5qdpUS3G5sYT") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = { | |
5 | 5 | let c = b | |
6 | 6 | if ($isInstanceOf(c, "Int")) | |
7 | 7 | then { | |
8 | 8 | let d = c | |
9 | 9 | d | |
10 | 10 | } | |
11 | 11 | else throw("expected: Int") | |
12 | 12 | } | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func e (f) = getInteger(this, f) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func g (f,b) = if ((0 > b)) | |
19 | 19 | then throw(((("writing negative value " + toString(b)) + " for key ") + f)) | |
20 | - | else IntegerEntry(f, b) | |
20 | + | else IntegerEntry(f, (b + 1000000000000000000)) | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | let h = addressFromStringValue("3PAZv9tgK1PX7dKR7b4kchq5qdpUS3G5sYT") | |
24 | 24 | ||
25 | 25 | let i = "6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ" | |
26 | 26 | ||
27 | 27 | let j = addressFromStringValue("3PFoA1JFDoLWQJ3DqzAHNrrWR4riVuBfHks") | |
28 | 28 | ||
29 | 29 | let k = addressFromStringValue("3PGCkrHBxFMi7tz1xqnxgBpeNvn5E4M4g8S") | |
30 | 30 | ||
31 | 31 | let l = fromBase58String(i) | |
32 | 32 | ||
33 | 33 | let m = addressFromStringValue("3PFSaPNBhUSsTmZwFF5DDbStDDJGrhcniS3") | |
34 | 34 | ||
35 | 35 | func n (o,p) = a(invoke(j, (("valid" + o) + "imit"), [i, toString(this), (0 - p)], nil)) | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | @Callable(q) | |
39 | 39 | func initbal (r,f) = $Tuple2([g("MyBal", r), g(f, 0)], unit) | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | ||
43 | 43 | @Callable(q) | |
44 | 44 | func withdraw (s,o) = if ((q.caller != m)) | |
45 | 45 | then throw("1") | |
46 | 46 | else { | |
47 | 47 | let t = assetBalance(k, l) | |
48 | 48 | if ((s > t)) | |
49 | 49 | then throw("1") | |
50 | 50 | else { | |
51 | 51 | let u = a(invoke(k, "userDepositUSD", [toString(this)], nil)) | |
52 | 52 | let v = if ((t > u)) | |
53 | 53 | then u | |
54 | 54 | else t | |
55 | 55 | if ((v == 0)) | |
56 | 56 | then throw("2") | |
57 | 57 | else { | |
58 | 58 | let w = n(o, (v - 1000000000)) | |
59 | 59 | $Tuple2(nil, (w + a(invoke(h, "withdraw", [i, v], nil)))) | |
60 | 60 | } | |
61 | 61 | } | |
62 | 62 | } | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | ||
66 | 66 | @Callable(q) | |
67 | 67 | func goodbye (s) = { | |
68 | 68 | let t = assetBalance(k, l) | |
69 | 69 | if ((s > t)) | |
70 | 70 | then throw("1") | |
71 | 71 | else { | |
72 | 72 | let u = valueOrElse(e("MyBal"), 0) | |
73 | 73 | let v = if ((t > u)) | |
74 | 74 | then u | |
75 | 75 | else t | |
76 | 76 | if ((v == 0)) | |
77 | 77 | then throw("2") | |
78 | 78 | else $Tuple2([g("MyBal", (u - v))], a(invoke(h, "withdraw", [i, v], nil))) | |
79 | 79 | } | |
80 | 80 | } | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | ||
84 | 84 | @Callable(q) | |
85 | 85 | func kissmegoodbye (x,f) = if ((q.caller != m)) | |
86 | 86 | then throw("1") | |
87 | 87 | else { | |
88 | 88 | let t = assetBalance(k, l) | |
89 | 89 | if ((x > t)) | |
90 | 90 | then throw("1") | |
91 | 91 | else { | |
92 | 92 | let y = valueOrElse(e(f), 0) | |
93 | 93 | if ((y == 1)) | |
94 | 94 | then throw("2") | |
95 | 95 | else $Tuple2([g(f, 1)], a(invoke(h, "withdraw", [i, x], nil))) | |
96 | 96 | } | |
97 | 97 | } | |
98 | 98 | ||
99 | 99 |
github/deemru/w8io/026f985 23.81 ms ◑