tx · 9PpRchgBQHbkNuvTNEE8ZTzYnFoUhR8kDC27mNun4qNV 3Mza5Ao6wJgpw1JG3jxRY1xigD44zgfhdK6: -0.04000000 Waves 2021.11.16 11:51 [1793381] smart account 3Mza5Ao6wJgpw1JG3jxRY1xigD44zgfhdK6 > SELF 0.00000000 Waves
{ "type": 13, "id": "9PpRchgBQHbkNuvTNEE8ZTzYnFoUhR8kDC27mNun4qNV", "fee": 4000000, "feeAssetId": null, "timestamp": 1637052725464, "version": 2, "chainId": 84, "sender": "3Mza5Ao6wJgpw1JG3jxRY1xigD44zgfhdK6", "senderPublicKey": "Gud7Z17wiZEMZiHRbn48k2D9H13jmLEDZZ8b7NCfjRJL", "proofs": [ "4DsWch3DQNTUuLWX3tiWxN8a587dtq821AU2aUudvdaY91CFRPMV9RXoPQGYyfUnTdx9vYq89ixykqECkJc1hjrX" ], "script": "base64:AAIFAAAAAAAAAA8IAhIAEgMKAQESBAoCAQgAAAADAAAAAAZPUkFDTEUCAAAAIzNNczN2RmtyVGFYdllOdzlWbmE4dmdUbUh6RWhXQ0JrQm1UAQAAABBnZXRPcmFjbGVBZGRyZXNzAAAAAAkBAAAAB0FkZHJlc3MAAAABCQACWQAAAAEFAAAABk9SQUNMRQEAAAATZ2V0U3RhdHVzRnJvbU9yYWNsZQAAAAEAAAAHYWRkcmVzcwkABB0AAAACCQEAAAAQZ2V0T3JhY2xlQWRkcmVzcwAAAAAJAAEsAAAAAgUAAAAHYWRkcmVzcwIAAAAHX3N0YXR1cwAAAAMAAAABaQEAAAAHZGVwb3NpdAAAAAAEAAAAA3BtdAMJAAAAAAAAAgkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAkAAAIAAAABAgAAABxBdHRhY2hlZCBwYXltZW50IGlzIHJlcXVpcmVkBAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAF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"applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8Wxg6tRb6jMU2RhmSXWkiY1dqNNETSAf5zq7pnxjjTvY Next: none Diff:
Old | New | Differences | |
---|---|---|---|
16 | 16 | else throw("Attached payment is required") | |
17 | 17 | let g = toBase58String(e.caller.bytes) | |
18 | 18 | if (isDefined(f.assetId)) | |
19 | - | then throw(" | |
19 | + | then throw("Works With Waves Only") | |
20 | 20 | else if ((c(g) != "verified")) | |
21 | 21 | then throw("No Access") | |
22 | 22 | else { | |
50 | 50 | } | |
51 | 51 | let k = (h - l) | |
52 | 52 | if ((0 >= l)) | |
53 | - | then throw("Amount | |
53 | + | then throw("Amount Must Be Greater Than 0") | |
54 | 54 | else if ((0 > k)) | |
55 | - | then throw("Not | |
55 | + | then throw("Not Enough Balance") | |
56 | 56 | else $Tuple2([IntegerEntry(g, k), ScriptTransfer(e.caller, l, unit)], unit) | |
57 | 57 | } | |
58 | 58 | ||
74 | 74 | if ((c(g) != "verified")) | |
75 | 75 | then throw("No Access") | |
76 | 76 | else if ((0 >= l)) | |
77 | - | then throw("Amount | |
77 | + | then throw("Amount Must Be Greater Than 0") | |
78 | 78 | else if ((0 > k)) | |
79 | - | then throw("Not | |
79 | + | then throw("Not Enough Balance") | |
80 | 80 | else { | |
81 | 81 | let n = toBase58String(Address(fromBase58String(m)).bytes) | |
82 | 82 | let o = { |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "3Ms3vFkrTaXvYNw9Vna8vgTmHzEhWCBkBmT" | |
5 | 5 | ||
6 | 6 | func b () = Address(fromBase58String(a)) | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | func c (d) = getString(b(), (d + "_status")) | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | @Callable(e) | |
13 | 13 | func deposit () = { | |
14 | 14 | let f = if ((size(e.payments) == 1)) | |
15 | 15 | then e.payments[0] | |
16 | 16 | else throw("Attached payment is required") | |
17 | 17 | let g = toBase58String(e.caller.bytes) | |
18 | 18 | if (isDefined(f.assetId)) | |
19 | - | then throw(" | |
19 | + | then throw("Works With Waves Only") | |
20 | 20 | else if ((c(g) != "verified")) | |
21 | 21 | then throw("No Access") | |
22 | 22 | else { | |
23 | 23 | let h = { | |
24 | 24 | let i = getInteger(this, g) | |
25 | 25 | if ($isInstanceOf(i, "Int")) | |
26 | 26 | then { | |
27 | 27 | let j = i | |
28 | 28 | j | |
29 | 29 | } | |
30 | 30 | else 0 | |
31 | 31 | } | |
32 | 32 | let k = (h + f.amount) | |
33 | 33 | $Tuple2([IntegerEntry(g, k)], unit) | |
34 | 34 | } | |
35 | 35 | } | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | ||
39 | 39 | @Callable(e) | |
40 | 40 | func withdraw (l) = { | |
41 | 41 | let g = toBase58String(e.caller.bytes) | |
42 | 42 | let h = { | |
43 | 43 | let i = getInteger(this, g) | |
44 | 44 | if ($isInstanceOf(i, "Int")) | |
45 | 45 | then { | |
46 | 46 | let j = i | |
47 | 47 | j | |
48 | 48 | } | |
49 | 49 | else 0 | |
50 | 50 | } | |
51 | 51 | let k = (h - l) | |
52 | 52 | if ((0 >= l)) | |
53 | - | then throw("Amount | |
53 | + | then throw("Amount Must Be Greater Than 0") | |
54 | 54 | else if ((0 > k)) | |
55 | - | then throw("Not | |
55 | + | then throw("Not Enough Balance") | |
56 | 56 | else $Tuple2([IntegerEntry(g, k), ScriptTransfer(e.caller, l, unit)], unit) | |
57 | 57 | } | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | ||
61 | 61 | @Callable(e) | |
62 | 62 | func transfer (l,m) = { | |
63 | 63 | let g = toBase58String(e.caller.bytes) | |
64 | 64 | let h = { | |
65 | 65 | let i = getInteger(this, g) | |
66 | 66 | if ($isInstanceOf(i, "Int")) | |
67 | 67 | then { | |
68 | 68 | let j = i | |
69 | 69 | j | |
70 | 70 | } | |
71 | 71 | else 0 | |
72 | 72 | } | |
73 | 73 | let k = (h - l) | |
74 | 74 | if ((c(g) != "verified")) | |
75 | 75 | then throw("No Access") | |
76 | 76 | else if ((0 >= l)) | |
77 | - | then throw("Amount | |
77 | + | then throw("Amount Must Be Greater Than 0") | |
78 | 78 | else if ((0 > k)) | |
79 | - | then throw("Not | |
79 | + | then throw("Not Enough Balance") | |
80 | 80 | else { | |
81 | 81 | let n = toBase58String(Address(fromBase58String(m)).bytes) | |
82 | 82 | let o = { | |
83 | 83 | let i = getInteger(this, n) | |
84 | 84 | if ($isInstanceOf(i, "Int")) | |
85 | 85 | then { | |
86 | 86 | let j = i | |
87 | 87 | j | |
88 | 88 | } | |
89 | 89 | else 0 | |
90 | 90 | } | |
91 | 91 | $Tuple2([IntegerEntry(g, k), IntegerEntry(n, (o + l))], unit) | |
92 | 92 | } | |
93 | 93 | } | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | @Verifier(p) | |
97 | 97 | func q () = { | |
98 | 98 | let r = base58'Gud7Z17wiZEMZiHRbn48k2D9H13jmLEDZZ8b7NCfjRJL' | |
99 | 99 | let s = base58'CwvKLDcXt3Wd2MEyEemVKawiD7gaCV68wh2GcnJRHFqB' | |
100 | 100 | let t = sigVerify(p.bodyBytes, p.proofs[0], r) | |
101 | 101 | let u = sigVerify(p.bodyBytes, p.proofs[0], s) | |
102 | 102 | let i = p | |
103 | 103 | if ($isInstanceOf(i, "SetScriptTransaction")) | |
104 | 104 | then { | |
105 | 105 | let v = i | |
106 | 106 | true | |
107 | 107 | } | |
108 | 108 | else if ($isInstanceOf(i, "DataTransaction")) | |
109 | 109 | then { | |
110 | 110 | let v = i | |
111 | 111 | true | |
112 | 112 | } | |
113 | 113 | else if ($isInstanceOf(i, "InvokeScriptTransaction")) | |
114 | 114 | then { | |
115 | 115 | let v = i | |
116 | 116 | true | |
117 | 117 | } | |
118 | 118 | else if ($isInstanceOf(i, "TransferTransaction")) | |
119 | 119 | then { | |
120 | 120 | let v = i | |
121 | 121 | if (t) | |
122 | 122 | then true | |
123 | 123 | else u | |
124 | 124 | } | |
125 | 125 | else false | |
126 | 126 | } | |
127 | 127 |
github/deemru/w8io/169f3d6 51.07 ms ◑