tx · FV9ZBRKM1f7t38aPwWLyUXAPKpBy6VrQGuAXMiUYbQX5 3MytuyxG75kHY91sNzmHux9xCzUN8FHM4DG: -0.01100000 Waves 2024.09.26 08:46 [3300179] smart account 3MytuyxG75kHY91sNzmHux9xCzUN8FHM4DG > SELF 0.00000000 Waves
{ "type": 13, "id": "FV9ZBRKM1f7t38aPwWLyUXAPKpBy6VrQGuAXMiUYbQX5", "fee": 1100000, "feeAssetId": null, "timestamp": 1727329608807, "version": 2, "chainId": 84, "sender": "3MytuyxG75kHY91sNzmHux9xCzUN8FHM4DG", "senderPublicKey": "4JNWrRNexiT3ApCKPgynPrc9Z7JiEfeMgZHQHsAAdo3F", "proofs": [ "48tTKymLc57HGFXQ5LovmqwJhyj6fJo5PFq6Ua8h4W7Wrau3yseRsDUpY4HeNjyi6bWBHZbNX5Xqr3rJjody8vxE" ], "script": "base64:AAIFAAAAAAAAACoIAhIGCgQICAEIEgQKAgQIEgQKAggIEgUKAwgECBIGCgQBCAgIEgMKAQgAAAARAQAAAAlnZXRTdHJCeUsAAAABAAAAA2tleQkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkBAAAACWdldEludEJ5SwAAAAEAAAADa2V5CQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQAAAAALYmFpX2Fzc2V0aWQBAAAAIJPhcjhxBJtq6JpjHwQkt2RTlyw+vGYLg3SvaLskjeJCAAAAAAphZG1pbl9hZGRyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUTLfve1EjrcSTZbnarq+rhHq1VvziySxAAAAAAA9ub25fY2lyY3VsYXRpbmcJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVTsajDaiz3SDMXD/foB97kPVKepkwKDR7sAAAAADmRhcHBSdW5uaW5nS2V5AgAAABRjb25mX2RhcHBfaXNfcnVubmluZwAAAAARbWFpbnRlbmFuY2VNU0dLZXkCAAAAFGNvbmZfbWFpbnRlbmFuY2VfbXNnAAAAAAtkYXBwUnVubmluZwkBAAAAC3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AAAAECAAAAPFNvbWV0aGluZyB3ZW50IHdyb25nIGR1cmluZyBub24gY2lyY3VsYXRpbmcgYW1vdW50IHdpdGhkcmF3LgkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAAIAAAABAgAAACJZb3UgYXJlIG5vdCBhbGxvd2VkIHRvIGNoYW5nZSB0aGlzAAAAAWkBAAAAC2RlbGV0ZUVudHJ5AAAAAQAAAAVlbnRyeQQAAAALJHQwNTg4MjU5MjEJAQAAAAxpZENhbGxlckRhdGUAAAABBQAAAAFpBAAAAAJpZAgFAAAACyR0MDU4ODI1OTIxAAAAAl8xBAAAAAZjYWxsZXIIBQAAAAskdDA1ODgyNTkyMQAAAAJfMgQAAAAEZGF0ZQgFAAAACyR0MDU4ODI1OTIxAAAAAl8zAwkAAAAAAAACBQAAAAZjYWxsZXIJAAQlAAAAAQUAAAAKYWRtaW5fYWRkcgkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAAVlbnRyeQUAAAADbmlsCQAAAgAAAAECAAAAAm5vAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlrtbYt", "height": 3300179, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AHx1LcCw3ijTb2EjK9A8JNDJYLmwF2HfG6iE2eu98f8N Next: BQXKmicCeThroyxquwgUZK5gKm4mSN3s9Rdo5GypeT7K Diff:
Old | New | Differences | |
---|---|---|---|
49 | 49 | ||
50 | 50 | ||
51 | 51 | @Callable(w) | |
52 | - | func setConf (b,x) = { | |
53 | - | let y = toString(w.caller) | |
54 | - | if (containsElement([toString(e), toString(this)], y)) | |
55 | - | then [StringEntry(b, x)] | |
52 | + | func setConf (b,x,y,z) = { | |
53 | + | let A = toString(w.caller) | |
54 | + | if (containsElement([toString(e), toString(this)], A)) | |
55 | + | then if ((z == "string")) | |
56 | + | then [StringEntry(b, x)] | |
57 | + | else [IntegerEntry(b, y)] | |
56 | 58 | else throw("You are not allowed to change this") | |
57 | 59 | } | |
58 | 60 | ||
59 | 61 | ||
60 | 62 | ||
61 | 63 | @Callable(r) | |
62 | - | func appRunning ( | |
63 | - | let | |
64 | - | let | |
65 | - | let | |
66 | - | let | |
67 | - | if (containsElement([toString(e), toString(this)], | |
68 | - | then [BooleanEntry(g, | |
64 | + | func appRunning (B,C) = { | |
65 | + | let D = v(r) | |
66 | + | let E = D._1 | |
67 | + | let A = D._2 | |
68 | + | let F = D._3 | |
69 | + | if (containsElement([toString(e), toString(this)], A)) | |
70 | + | then [BooleanEntry(g, B), StringEntry(h, C)] | |
69 | 71 | else throw("You are not allowed to change this") | |
70 | 72 | } | |
71 | 73 | ||
72 | 74 | ||
73 | 75 | ||
74 | 76 | @Callable(r) | |
75 | - | func deposit ( | |
76 | - | let | |
77 | - | let t = | |
78 | - | let u = | |
77 | + | func deposit (G,H) = { | |
78 | + | let I = q(r) | |
79 | + | let t = I._1 | |
80 | + | let u = I._2 | |
79 | 81 | if ((u != d)) | |
80 | 82 | then throw("Only BAI token accepted") | |
81 | 83 | else { | |
82 | - | let | |
83 | - | let | |
84 | - | let | |
85 | - | let | |
84 | + | let J = v(r) | |
85 | + | let E = J._1 | |
86 | + | let A = J._2 | |
87 | + | let F = J._3 | |
86 | 88 | if ((0 >= (t - p))) | |
87 | 89 | then throw("Cannot bridge non positive amount!") | |
88 | - | else if (!(containsElement(n, | |
90 | + | else if (!(containsElement(n, H))) | |
89 | 91 | then throw("Recipient network not supported") | |
90 | - | else [StringEntry(((((((((("DEPOSIT_" + | |
92 | + | else [StringEntry(((((((((("DEPOSIT_" + E) + "_") + A) + "_") + G) + "_") + H) + "_") + k), ((((((((A + "_") + toString((t - p))) + "_") + G) + "_") + H) + "_") + toString(height)))] | |
91 | 93 | } | |
92 | 94 | } | |
93 | 95 | ||
94 | 96 | ||
95 | 97 | ||
96 | 98 | @Callable(r) | |
97 | - | func finalize ( | |
98 | - | let | |
99 | - | let | |
100 | - | let | |
101 | - | let | |
102 | - | if (containsElement([toString(e), toString(this)], | |
99 | + | func finalize (K,L,M) = { | |
100 | + | let N = v(r) | |
101 | + | let E = N._1 | |
102 | + | let A = N._2 | |
103 | + | let F = N._3 | |
104 | + | if (containsElement([toString(e), toString(this)], A)) | |
103 | 105 | then { | |
104 | - | let | |
105 | - | if (( | |
106 | + | let O = valueOrElse(a(((K + "_") + k)), "") | |
107 | + | if ((O == "")) | |
106 | 108 | then throw("Request not found") | |
107 | 109 | else { | |
108 | - | let t = valueOrElse(parseInt(split( | |
110 | + | let t = valueOrElse(parseInt(split(O, "_")[1]), 0) | |
109 | 111 | if ((0 > t)) | |
110 | 112 | then throw("Cannot transfer non positive amount") | |
111 | - | else if ( | |
112 | - | then [DeleteEntry((( | |
113 | - | else [DeleteEntry((( | |
113 | + | else if (L) | |
114 | + | then [DeleteEntry(((K + "_") + k)), StringEntry(((K + "_") + m), ((O + "_") + M)), ScriptTransfer(Address(fromBase58String(split(O, "_")[0])), t, d)] | |
115 | + | else [DeleteEntry(((K + "_") + k)), StringEntry(((K + "_") + l), O), ScriptTransfer(f, t, d)] | |
114 | 116 | } | |
115 | 117 | } | |
116 | 118 | else throw("You are not allowed to change this") | |
119 | 121 | ||
120 | 122 | ||
121 | 123 | @Callable(r) | |
122 | - | func withdraw (t, | |
124 | + | func withdraw (t,G,P,Q) = if ((valueOrElse(c(((((("WITHDRAW_" + Q) + "_") + G) + "_") + P)), 0) != 0)) | |
123 | 125 | then throw("Withdraw already processed.") | |
124 | 126 | else { | |
125 | - | let | |
126 | - | let | |
127 | - | let | |
128 | - | let | |
129 | - | if (containsElement([toString(e), toString(this)], | |
127 | + | let R = v(r) | |
128 | + | let E = R._1 | |
129 | + | let A = R._2 | |
130 | + | let F = R._3 | |
131 | + | if (containsElement([toString(e), toString(this)], A)) | |
130 | 132 | then { | |
131 | - | let | |
132 | - | if (( | |
133 | + | let S = valueOrElse(assetBalance(this, d), 0) | |
134 | + | if ((S == S)) | |
133 | 135 | then { | |
134 | - | let | |
135 | - | if (( | |
136 | + | let T = invoke(f, "withdraw", [t], nil) | |
137 | + | if ((T == T)) | |
136 | 138 | then { | |
137 | - | let | |
138 | - | if (( | |
139 | - | then if ((( | |
140 | - | then [ScriptTransfer(Address(fromBase58String( | |
139 | + | let U = valueOrElse(assetBalance(this, d), 0) | |
140 | + | if ((U == U)) | |
141 | + | then if (((U - S) == t)) | |
142 | + | then [ScriptTransfer(Address(fromBase58String(G)), t, d), IntegerEntry(((((("WITHDRAW_" + Q) + "_") + G) + "_") + P), t)] | |
141 | 143 | else throw("Something went wrong during non circulating amount withdraw.") | |
142 | 144 | else throw("Strict value is not equal to itself.") | |
143 | 145 | } | |
151 | 153 | ||
152 | 154 | ||
153 | 155 | @Callable(r) | |
154 | - | func deleteEntry ( | |
155 | - | let | |
156 | - | let | |
157 | - | let | |
158 | - | let | |
159 | - | if (( | |
160 | - | then [DeleteEntry( | |
156 | + | func deleteEntry (V) = { | |
157 | + | let W = v(r) | |
158 | + | let E = W._1 | |
159 | + | let A = W._2 | |
160 | + | let F = W._3 | |
161 | + | if ((A == toString(e))) | |
162 | + | then [DeleteEntry(V)] | |
161 | 163 | else throw("no") | |
162 | 164 | } | |
163 | 165 | ||
164 | 166 | ||
165 | - | @Verifier( | |
166 | - | func | |
167 | + | @Verifier(X) | |
168 | + | func Y () = sigVerify(X.bodyBytes, X.proofs[0], X.senderPublicKey) | |
167 | 169 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = getString(this, b) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func c (b) = getInteger(this, b) | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | let d = base58'AxGKQRxKo4F2EbhrRq6N2tdLsxtMnpzQsS4QemV6V1W1' | |
11 | 11 | ||
12 | 12 | let e = Address(base58'3MvujUZTtoANRzrKYKzx99Vtb9TUh6VPCDm') | |
13 | 13 | ||
14 | 14 | let f = Address(base58'3NBU8TThHH5YUSk26iGEGU1jHM7vSR3ZTPx') | |
15 | 15 | ||
16 | 16 | let g = "conf_dapp_is_running" | |
17 | 17 | ||
18 | 18 | let h = "conf_maintenance_msg" | |
19 | 19 | ||
20 | 20 | let i = valueOrElse(getBoolean(this, g), true) | |
21 | 21 | ||
22 | 22 | let j = valueOrElse(getString(this, h), "") | |
23 | 23 | ||
24 | 24 | let k = "PENDING" | |
25 | 25 | ||
26 | 26 | let l = "PROCESSED" | |
27 | 27 | ||
28 | 28 | let m = "REJECTED" | |
29 | 29 | ||
30 | 30 | let n = split(valueOrElse(a("supported_recipients_network"), "bnb_base"), "_") | |
31 | 31 | ||
32 | 32 | let o = valueOrElse(c("confirmations_required"), 5) | |
33 | 33 | ||
34 | 34 | let p = valueOrElse(c("service_fee"), 25000000) | |
35 | 35 | ||
36 | 36 | func q (r) = if ((size(r.payments) == 0)) | |
37 | 37 | then throw("No payment attached") | |
38 | 38 | else { | |
39 | 39 | let s = value(r.payments[0]) | |
40 | 40 | let t = value(s.amount) | |
41 | 41 | let u = value(s.assetId) | |
42 | 42 | $Tuple2(t, u) | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func v (r) = if (!(i)) | |
47 | 47 | then throw(j) | |
48 | 48 | else $Tuple3(toBase58String(r.transactionId), toBase58String(r.caller.bytes), lastBlock.timestamp) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | @Callable(w) | |
52 | - | func setConf (b,x) = { | |
53 | - | let y = toString(w.caller) | |
54 | - | if (containsElement([toString(e), toString(this)], y)) | |
55 | - | then [StringEntry(b, x)] | |
52 | + | func setConf (b,x,y,z) = { | |
53 | + | let A = toString(w.caller) | |
54 | + | if (containsElement([toString(e), toString(this)], A)) | |
55 | + | then if ((z == "string")) | |
56 | + | then [StringEntry(b, x)] | |
57 | + | else [IntegerEntry(b, y)] | |
56 | 58 | else throw("You are not allowed to change this") | |
57 | 59 | } | |
58 | 60 | ||
59 | 61 | ||
60 | 62 | ||
61 | 63 | @Callable(r) | |
62 | - | func appRunning ( | |
63 | - | let | |
64 | - | let | |
65 | - | let | |
66 | - | let | |
67 | - | if (containsElement([toString(e), toString(this)], | |
68 | - | then [BooleanEntry(g, | |
64 | + | func appRunning (B,C) = { | |
65 | + | let D = v(r) | |
66 | + | let E = D._1 | |
67 | + | let A = D._2 | |
68 | + | let F = D._3 | |
69 | + | if (containsElement([toString(e), toString(this)], A)) | |
70 | + | then [BooleanEntry(g, B), StringEntry(h, C)] | |
69 | 71 | else throw("You are not allowed to change this") | |
70 | 72 | } | |
71 | 73 | ||
72 | 74 | ||
73 | 75 | ||
74 | 76 | @Callable(r) | |
75 | - | func deposit ( | |
76 | - | let | |
77 | - | let t = | |
78 | - | let u = | |
77 | + | func deposit (G,H) = { | |
78 | + | let I = q(r) | |
79 | + | let t = I._1 | |
80 | + | let u = I._2 | |
79 | 81 | if ((u != d)) | |
80 | 82 | then throw("Only BAI token accepted") | |
81 | 83 | else { | |
82 | - | let | |
83 | - | let | |
84 | - | let | |
85 | - | let | |
84 | + | let J = v(r) | |
85 | + | let E = J._1 | |
86 | + | let A = J._2 | |
87 | + | let F = J._3 | |
86 | 88 | if ((0 >= (t - p))) | |
87 | 89 | then throw("Cannot bridge non positive amount!") | |
88 | - | else if (!(containsElement(n, | |
90 | + | else if (!(containsElement(n, H))) | |
89 | 91 | then throw("Recipient network not supported") | |
90 | - | else [StringEntry(((((((((("DEPOSIT_" + | |
92 | + | else [StringEntry(((((((((("DEPOSIT_" + E) + "_") + A) + "_") + G) + "_") + H) + "_") + k), ((((((((A + "_") + toString((t - p))) + "_") + G) + "_") + H) + "_") + toString(height)))] | |
91 | 93 | } | |
92 | 94 | } | |
93 | 95 | ||
94 | 96 | ||
95 | 97 | ||
96 | 98 | @Callable(r) | |
97 | - | func finalize ( | |
98 | - | let | |
99 | - | let | |
100 | - | let | |
101 | - | let | |
102 | - | if (containsElement([toString(e), toString(this)], | |
99 | + | func finalize (K,L,M) = { | |
100 | + | let N = v(r) | |
101 | + | let E = N._1 | |
102 | + | let A = N._2 | |
103 | + | let F = N._3 | |
104 | + | if (containsElement([toString(e), toString(this)], A)) | |
103 | 105 | then { | |
104 | - | let | |
105 | - | if (( | |
106 | + | let O = valueOrElse(a(((K + "_") + k)), "") | |
107 | + | if ((O == "")) | |
106 | 108 | then throw("Request not found") | |
107 | 109 | else { | |
108 | - | let t = valueOrElse(parseInt(split( | |
110 | + | let t = valueOrElse(parseInt(split(O, "_")[1]), 0) | |
109 | 111 | if ((0 > t)) | |
110 | 112 | then throw("Cannot transfer non positive amount") | |
111 | - | else if ( | |
112 | - | then [DeleteEntry((( | |
113 | - | else [DeleteEntry((( | |
113 | + | else if (L) | |
114 | + | then [DeleteEntry(((K + "_") + k)), StringEntry(((K + "_") + m), ((O + "_") + M)), ScriptTransfer(Address(fromBase58String(split(O, "_")[0])), t, d)] | |
115 | + | else [DeleteEntry(((K + "_") + k)), StringEntry(((K + "_") + l), O), ScriptTransfer(f, t, d)] | |
114 | 116 | } | |
115 | 117 | } | |
116 | 118 | else throw("You are not allowed to change this") | |
117 | 119 | } | |
118 | 120 | ||
119 | 121 | ||
120 | 122 | ||
121 | 123 | @Callable(r) | |
122 | - | func withdraw (t, | |
124 | + | func withdraw (t,G,P,Q) = if ((valueOrElse(c(((((("WITHDRAW_" + Q) + "_") + G) + "_") + P)), 0) != 0)) | |
123 | 125 | then throw("Withdraw already processed.") | |
124 | 126 | else { | |
125 | - | let | |
126 | - | let | |
127 | - | let | |
128 | - | let | |
129 | - | if (containsElement([toString(e), toString(this)], | |
127 | + | let R = v(r) | |
128 | + | let E = R._1 | |
129 | + | let A = R._2 | |
130 | + | let F = R._3 | |
131 | + | if (containsElement([toString(e), toString(this)], A)) | |
130 | 132 | then { | |
131 | - | let | |
132 | - | if (( | |
133 | + | let S = valueOrElse(assetBalance(this, d), 0) | |
134 | + | if ((S == S)) | |
133 | 135 | then { | |
134 | - | let | |
135 | - | if (( | |
136 | + | let T = invoke(f, "withdraw", [t], nil) | |
137 | + | if ((T == T)) | |
136 | 138 | then { | |
137 | - | let | |
138 | - | if (( | |
139 | - | then if ((( | |
140 | - | then [ScriptTransfer(Address(fromBase58String( | |
139 | + | let U = valueOrElse(assetBalance(this, d), 0) | |
140 | + | if ((U == U)) | |
141 | + | then if (((U - S) == t)) | |
142 | + | then [ScriptTransfer(Address(fromBase58String(G)), t, d), IntegerEntry(((((("WITHDRAW_" + Q) + "_") + G) + "_") + P), t)] | |
141 | 143 | else throw("Something went wrong during non circulating amount withdraw.") | |
142 | 144 | else throw("Strict value is not equal to itself.") | |
143 | 145 | } | |
144 | 146 | else throw("Strict value is not equal to itself.") | |
145 | 147 | } | |
146 | 148 | else throw("Strict value is not equal to itself.") | |
147 | 149 | } | |
148 | 150 | else throw("You are not allowed to change this") | |
149 | 151 | } | |
150 | 152 | ||
151 | 153 | ||
152 | 154 | ||
153 | 155 | @Callable(r) | |
154 | - | func deleteEntry ( | |
155 | - | let | |
156 | - | let | |
157 | - | let | |
158 | - | let | |
159 | - | if (( | |
160 | - | then [DeleteEntry( | |
156 | + | func deleteEntry (V) = { | |
157 | + | let W = v(r) | |
158 | + | let E = W._1 | |
159 | + | let A = W._2 | |
160 | + | let F = W._3 | |
161 | + | if ((A == toString(e))) | |
162 | + | then [DeleteEntry(V)] | |
161 | 163 | else throw("no") | |
162 | 164 | } | |
163 | 165 | ||
164 | 166 | ||
165 | - | @Verifier( | |
166 | - | func | |
167 | + | @Verifier(X) | |
168 | + | func Y () = sigVerify(X.bodyBytes, X.proofs[0], X.senderPublicKey) | |
167 | 169 |
github/deemru/w8io/169f3d6 57.34 ms ◑