tx · BQXKmicCeThroyxquwgUZK5gKm4mSN3s9Rdo5GypeT7K 3MytuyxG75kHY91sNzmHux9xCzUN8FHM4DG: -0.01100000 Waves 2024.09.26 08:49 [3300182] smart account 3MytuyxG75kHY91sNzmHux9xCzUN8FHM4DG > SELF 0.00000000 Waves
{ "type": 13, "id": "BQXKmicCeThroyxquwgUZK5gKm4mSN3s9Rdo5GypeT7K", "fee": 1100000, "feeAssetId": null, "timestamp": 1727329836983, "version": 2, "chainId": 84, "sender": "3MytuyxG75kHY91sNzmHux9xCzUN8FHM4DG", "senderPublicKey": "4JNWrRNexiT3ApCKPgynPrc9Z7JiEfeMgZHQHsAAdo3F", "proofs": [ "5ntGQtXGVgKAq7rEfNuwCDuoyDVVV1eZYQtEGoW1rUZxxJmyK25XuituBTYvSqjnV5PQF57WyBPh4Q8gD6S7AEqr" ], "script": "base64:AAIFAAAAAAAAACkIAhIFCgMICAESBAoCBAgSBAoCCAgSBQoDCAQIEgYKBAEICAgSAwoBCAAAABEBAAAACWdldFN0ckJ5SwAAAAEAAAADa2V5CQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQEAAAAJZ2V0SW50QnlLAAAAAQAAAANrZXkJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AAAAAAtiYWlfYXNzZXRpZAEAAAAgk+FyOHEEm2rommMfBCS3ZFOXLD68ZguDdK9ouySN4kIAAAAACmFkbWluX2FkZHIJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVRMt+97USOtxJNludqur6uEerVW/OLJLEAAAAAAD25vbl9jaXJjdWxhdGluZwkBAAAAB0FkZHJlc3MAAAABAQAAABoBVOxqMNqLPdIMxcP9+gH3uQ9Up6mTAoNHuwAAAAAOZGFwcFJ1bm5pbmdLZXkCAAAAFGNvbmZfZGFwcF9pc19ydW5uaW5nAAAAABFtYWludGVuYW5jZU1TR0tleQIAAAAUY29uZl9tYWludGVuYW5jZV9tc2cAAAAAC2RhcHBSdW5uaW5nCQEAAAALdmFsdWV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AAAAECAAAAPFNvbWV0aGluZyB3ZW50IHdyb25nIGR1cmluZyBub24gY2lyY3VsYXRpbmcgYW1vdW50IHdpdGhkcmF3LgkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAAIAAAABAgAAACJZb3UgYXJlIG5vdCBhbGxvd2VkIHRvIGNoYW5nZSB0aGlzAAAAAWkBAAAAC2RlbGV0ZUVudHJ5AAAAAQAAAAVlbnRyeQQAAAALJHQwNTg3MTU5MTAJAQAAAAxpZENhbGxlckRhdGUAAAABBQAAAAFpBAAAAAJpZAgFAAAACyR0MDU4NzE1OTEwAAAAAl8xBAAAAAZjYWxsZXIIBQAAAAskdDA1ODcxNTkxMAAAAAJfMgQAAAAEZGF0ZQgFAAAACyR0MDU4NzE1OTEwAAAAAl8zAwkAAAAAAAACBQAAAAZjYWxsZXIJAAQlAAAAAQUAAAAKYWRtaW5fYWRkcgkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAAVlbnRyeQUAAAADbmlsCQAAAgAAAAECAAAAAm5vAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXm5romQ", "height": 3300182, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FV9ZBRKM1f7t38aPwWLyUXAPKpBy6VrQGuAXMiUYbQX5 Next: 9L3rCJmYcSMDtKZTFjvnmbHPWKmDtGuxV58xcVVGW8KZ Diff:
Old | New | Differences | |
---|---|---|---|
49 | 49 | ||
50 | 50 | ||
51 | 51 | @Callable(w) | |
52 | - | func setConf (b,x,y | |
53 | - | let | |
54 | - | if (containsElement([toString(e), toString(this)], | |
55 | - | then if (( | |
52 | + | func setConf (b,x,y) = { | |
53 | + | let z = toString(w.caller) | |
54 | + | if (containsElement([toString(e), toString(this)], z)) | |
55 | + | then if ((size(x) > 0)) | |
56 | 56 | then [StringEntry(b, x)] | |
57 | 57 | else [IntegerEntry(b, y)] | |
58 | 58 | else throw("You are not allowed to change this") | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | @Callable(r) | |
64 | - | func appRunning (B | |
65 | - | let | |
66 | - | let | |
67 | - | let | |
68 | - | let | |
69 | - | if (containsElement([toString(e), toString(this)], | |
70 | - | then [BooleanEntry(g, | |
64 | + | func appRunning (A,B) = { | |
65 | + | let C = v(r) | |
66 | + | let D = C._1 | |
67 | + | let z = C._2 | |
68 | + | let E = C._3 | |
69 | + | if (containsElement([toString(e), toString(this)], z)) | |
70 | + | then [BooleanEntry(g, A), StringEntry(h, B)] | |
71 | 71 | else throw("You are not allowed to change this") | |
72 | 72 | } | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | ||
76 | 76 | @Callable(r) | |
77 | - | func deposit (G | |
78 | - | let | |
79 | - | let t = | |
80 | - | let u = | |
77 | + | func deposit (F,G) = { | |
78 | + | let H = q(r) | |
79 | + | let t = H._1 | |
80 | + | let u = H._2 | |
81 | 81 | if ((u != d)) | |
82 | 82 | then throw("Only BAI token accepted") | |
83 | 83 | else { | |
84 | - | let | |
85 | - | let | |
86 | - | let | |
87 | - | let | |
84 | + | let I = v(r) | |
85 | + | let D = I._1 | |
86 | + | let z = I._2 | |
87 | + | let E = I._3 | |
88 | 88 | if ((0 >= (t - p))) | |
89 | 89 | then throw("Cannot bridge non positive amount!") | |
90 | - | else if (!(containsElement(n, | |
90 | + | else if (!(containsElement(n, G))) | |
91 | 91 | then throw("Recipient network not supported") | |
92 | - | else [StringEntry(((((((((("DEPOSIT_" + | |
92 | + | else [StringEntry(((((((((("DEPOSIT_" + D) + "_") + z) + "_") + F) + "_") + G) + "_") + k), ((((((((z + "_") + toString((t - p))) + "_") + F) + "_") + G) + "_") + toString(height)))] | |
93 | 93 | } | |
94 | 94 | } | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | ||
98 | 98 | @Callable(r) | |
99 | - | func finalize (K,L | |
100 | - | let | |
101 | - | let | |
102 | - | let | |
103 | - | let | |
104 | - | if (containsElement([toString(e), toString(this)], | |
99 | + | func finalize (J,K,L) = { | |
100 | + | let M = v(r) | |
101 | + | let D = M._1 | |
102 | + | let z = M._2 | |
103 | + | let E = M._3 | |
104 | + | if (containsElement([toString(e), toString(this)], z)) | |
105 | 105 | then { | |
106 | - | let | |
107 | - | if (( | |
106 | + | let N = valueOrElse(a(((J + "_") + k)), "") | |
107 | + | if ((N == "")) | |
108 | 108 | then throw("Request not found") | |
109 | 109 | else { | |
110 | - | let t = valueOrElse(parseInt(split( | |
110 | + | let t = valueOrElse(parseInt(split(N, "_")[1]), 0) | |
111 | 111 | if ((0 > t)) | |
112 | 112 | then throw("Cannot transfer non positive amount") | |
113 | - | else if ( | |
114 | - | then [DeleteEntry((( | |
115 | - | else [DeleteEntry((( | |
113 | + | else if (K) | |
114 | + | then [DeleteEntry(((J + "_") + k)), StringEntry(((J + "_") + m), ((N + "_") + L)), ScriptTransfer(Address(fromBase58String(split(N, "_")[0])), t, d)] | |
115 | + | else [DeleteEntry(((J + "_") + k)), StringEntry(((J + "_") + l), N), ScriptTransfer(f, t, d)] | |
116 | 116 | } | |
117 | 117 | } | |
118 | 118 | else throw("You are not allowed to change this") | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | @Callable(r) | |
124 | - | func withdraw (t, | |
124 | + | func withdraw (t,F,O,P) = if ((valueOrElse(c(((((("WITHDRAW_" + P) + "_") + F) + "_") + O)), 0) != 0)) | |
125 | 125 | then throw("Withdraw already processed.") | |
126 | 126 | else { | |
127 | - | let | |
128 | - | let | |
129 | - | let | |
130 | - | let | |
131 | - | if (containsElement([toString(e), toString(this)], | |
127 | + | let Q = v(r) | |
128 | + | let D = Q._1 | |
129 | + | let z = Q._2 | |
130 | + | let E = Q._3 | |
131 | + | if (containsElement([toString(e), toString(this)], z)) | |
132 | 132 | then { | |
133 | - | let | |
134 | - | if (( | |
133 | + | let R = valueOrElse(assetBalance(this, d), 0) | |
134 | + | if ((R == R)) | |
135 | 135 | then { | |
136 | - | let | |
137 | - | if (( | |
136 | + | let S = invoke(f, "withdraw", [t], nil) | |
137 | + | if ((S == S)) | |
138 | 138 | then { | |
139 | - | let | |
140 | - | if (( | |
141 | - | then if ((( | |
142 | - | then [ScriptTransfer(Address(fromBase58String( | |
139 | + | let T = valueOrElse(assetBalance(this, d), 0) | |
140 | + | if ((T == T)) | |
141 | + | then if (((T - R) == t)) | |
142 | + | then [ScriptTransfer(Address(fromBase58String(F)), t, d), IntegerEntry(((((("WITHDRAW_" + P) + "_") + F) + "_") + O), t)] | |
143 | 143 | else throw("Something went wrong during non circulating amount withdraw.") | |
144 | 144 | else throw("Strict value is not equal to itself.") | |
145 | 145 | } | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | @Callable(r) | |
156 | - | func deleteEntry ( | |
157 | - | let | |
158 | - | let | |
159 | - | let | |
160 | - | let | |
161 | - | if (( | |
162 | - | then [DeleteEntry( | |
156 | + | func deleteEntry (U) = { | |
157 | + | let V = v(r) | |
158 | + | let D = V._1 | |
159 | + | let z = V._2 | |
160 | + | let E = V._3 | |
161 | + | if ((z == toString(e))) | |
162 | + | then [DeleteEntry(U)] | |
163 | 163 | else throw("no") | |
164 | 164 | } | |
165 | 165 | ||
166 | 166 | ||
167 | - | @Verifier( | |
168 | - | func | |
167 | + | @Verifier(W) | |
168 | + | func X () = sigVerify(W.bodyBytes, W.proofs[0], W.senderPublicKey) | |
169 | 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,y | |
53 | - | let | |
54 | - | if (containsElement([toString(e), toString(this)], | |
55 | - | then if (( | |
52 | + | func setConf (b,x,y) = { | |
53 | + | let z = toString(w.caller) | |
54 | + | if (containsElement([toString(e), toString(this)], z)) | |
55 | + | then if ((size(x) > 0)) | |
56 | 56 | then [StringEntry(b, x)] | |
57 | 57 | else [IntegerEntry(b, y)] | |
58 | 58 | else throw("You are not allowed to change this") | |
59 | 59 | } | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | ||
63 | 63 | @Callable(r) | |
64 | - | func appRunning (B | |
65 | - | let | |
66 | - | let | |
67 | - | let | |
68 | - | let | |
69 | - | if (containsElement([toString(e), toString(this)], | |
70 | - | then [BooleanEntry(g, | |
64 | + | func appRunning (A,B) = { | |
65 | + | let C = v(r) | |
66 | + | let D = C._1 | |
67 | + | let z = C._2 | |
68 | + | let E = C._3 | |
69 | + | if (containsElement([toString(e), toString(this)], z)) | |
70 | + | then [BooleanEntry(g, A), StringEntry(h, B)] | |
71 | 71 | else throw("You are not allowed to change this") | |
72 | 72 | } | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | ||
76 | 76 | @Callable(r) | |
77 | - | func deposit (G | |
78 | - | let | |
79 | - | let t = | |
80 | - | let u = | |
77 | + | func deposit (F,G) = { | |
78 | + | let H = q(r) | |
79 | + | let t = H._1 | |
80 | + | let u = H._2 | |
81 | 81 | if ((u != d)) | |
82 | 82 | then throw("Only BAI token accepted") | |
83 | 83 | else { | |
84 | - | let | |
85 | - | let | |
86 | - | let | |
87 | - | let | |
84 | + | let I = v(r) | |
85 | + | let D = I._1 | |
86 | + | let z = I._2 | |
87 | + | let E = I._3 | |
88 | 88 | if ((0 >= (t - p))) | |
89 | 89 | then throw("Cannot bridge non positive amount!") | |
90 | - | else if (!(containsElement(n, | |
90 | + | else if (!(containsElement(n, G))) | |
91 | 91 | then throw("Recipient network not supported") | |
92 | - | else [StringEntry(((((((((("DEPOSIT_" + | |
92 | + | else [StringEntry(((((((((("DEPOSIT_" + D) + "_") + z) + "_") + F) + "_") + G) + "_") + k), ((((((((z + "_") + toString((t - p))) + "_") + F) + "_") + G) + "_") + toString(height)))] | |
93 | 93 | } | |
94 | 94 | } | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | ||
98 | 98 | @Callable(r) | |
99 | - | func finalize (K,L | |
100 | - | let | |
101 | - | let | |
102 | - | let | |
103 | - | let | |
104 | - | if (containsElement([toString(e), toString(this)], | |
99 | + | func finalize (J,K,L) = { | |
100 | + | let M = v(r) | |
101 | + | let D = M._1 | |
102 | + | let z = M._2 | |
103 | + | let E = M._3 | |
104 | + | if (containsElement([toString(e), toString(this)], z)) | |
105 | 105 | then { | |
106 | - | let | |
107 | - | if (( | |
106 | + | let N = valueOrElse(a(((J + "_") + k)), "") | |
107 | + | if ((N == "")) | |
108 | 108 | then throw("Request not found") | |
109 | 109 | else { | |
110 | - | let t = valueOrElse(parseInt(split( | |
110 | + | let t = valueOrElse(parseInt(split(N, "_")[1]), 0) | |
111 | 111 | if ((0 > t)) | |
112 | 112 | then throw("Cannot transfer non positive amount") | |
113 | - | else if ( | |
114 | - | then [DeleteEntry((( | |
115 | - | else [DeleteEntry((( | |
113 | + | else if (K) | |
114 | + | then [DeleteEntry(((J + "_") + k)), StringEntry(((J + "_") + m), ((N + "_") + L)), ScriptTransfer(Address(fromBase58String(split(N, "_")[0])), t, d)] | |
115 | + | else [DeleteEntry(((J + "_") + k)), StringEntry(((J + "_") + l), N), ScriptTransfer(f, t, d)] | |
116 | 116 | } | |
117 | 117 | } | |
118 | 118 | else throw("You are not allowed to change this") | |
119 | 119 | } | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | ||
123 | 123 | @Callable(r) | |
124 | - | func withdraw (t, | |
124 | + | func withdraw (t,F,O,P) = if ((valueOrElse(c(((((("WITHDRAW_" + P) + "_") + F) + "_") + O)), 0) != 0)) | |
125 | 125 | then throw("Withdraw already processed.") | |
126 | 126 | else { | |
127 | - | let | |
128 | - | let | |
129 | - | let | |
130 | - | let | |
131 | - | if (containsElement([toString(e), toString(this)], | |
127 | + | let Q = v(r) | |
128 | + | let D = Q._1 | |
129 | + | let z = Q._2 | |
130 | + | let E = Q._3 | |
131 | + | if (containsElement([toString(e), toString(this)], z)) | |
132 | 132 | then { | |
133 | - | let | |
134 | - | if (( | |
133 | + | let R = valueOrElse(assetBalance(this, d), 0) | |
134 | + | if ((R == R)) | |
135 | 135 | then { | |
136 | - | let | |
137 | - | if (( | |
136 | + | let S = invoke(f, "withdraw", [t], nil) | |
137 | + | if ((S == S)) | |
138 | 138 | then { | |
139 | - | let | |
140 | - | if (( | |
141 | - | then if ((( | |
142 | - | then [ScriptTransfer(Address(fromBase58String( | |
139 | + | let T = valueOrElse(assetBalance(this, d), 0) | |
140 | + | if ((T == T)) | |
141 | + | then if (((T - R) == t)) | |
142 | + | then [ScriptTransfer(Address(fromBase58String(F)), t, d), IntegerEntry(((((("WITHDRAW_" + P) + "_") + F) + "_") + O), t)] | |
143 | 143 | else throw("Something went wrong during non circulating amount withdraw.") | |
144 | 144 | else throw("Strict value is not equal to itself.") | |
145 | 145 | } | |
146 | 146 | else throw("Strict value is not equal to itself.") | |
147 | 147 | } | |
148 | 148 | else throw("Strict value is not equal to itself.") | |
149 | 149 | } | |
150 | 150 | else throw("You are not allowed to change this") | |
151 | 151 | } | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | ||
155 | 155 | @Callable(r) | |
156 | - | func deleteEntry ( | |
157 | - | let | |
158 | - | let | |
159 | - | let | |
160 | - | let | |
161 | - | if (( | |
162 | - | then [DeleteEntry( | |
156 | + | func deleteEntry (U) = { | |
157 | + | let V = v(r) | |
158 | + | let D = V._1 | |
159 | + | let z = V._2 | |
160 | + | let E = V._3 | |
161 | + | if ((z == toString(e))) | |
162 | + | then [DeleteEntry(U)] | |
163 | 163 | else throw("no") | |
164 | 164 | } | |
165 | 165 | ||
166 | 166 | ||
167 | - | @Verifier( | |
168 | - | func | |
167 | + | @Verifier(W) | |
168 | + | func X () = sigVerify(W.bodyBytes, W.proofs[0], W.senderPublicKey) | |
169 | 169 |
github/deemru/w8io/026f985 52.69 ms ◑