tx · FffYnfVTWAzb8gZHbnixPeFTe2q1F6uWQd1occkg2xww 3MqqcLhm76wiWz5KLfLDST8MXPufuunLUMN: -0.01000000 Waves 2024.09.17 12:16 [3287477] smart account 3MqqcLhm76wiWz5KLfLDST8MXPufuunLUMN > SELF 0.00000000 Waves
{ "type": 13, "id": "FffYnfVTWAzb8gZHbnixPeFTe2q1F6uWQd1occkg2xww", "fee": 1000000, "feeAssetId": null, "timestamp": 1726564592499, "version": 2, "chainId": 84, "sender": "3MqqcLhm76wiWz5KLfLDST8MXPufuunLUMN", "senderPublicKey": "7Ho7tSsDi1wFzsLjrEXbGRtsfps2kpEqLkQiDtJ1KbUf", "proofs": [ "3rxS2PkN44BVE4TH3GA1PTpnVN3JMBFYMFUNN6iLF4xqrYodjmoHXpjKsnjEGAWvCVMFXpsMWUYNrcQ8mVau4bwq" ], "script": "base64:AAIFAAAAAAAAAB8IAhIECgIICBIECgIECBIECgIICBIECgIICBIDCgEIAAAAEAEAAAAJZ2V0U3RyQnlLAAAAAQAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AgAAAAABAAAACWdldEludEJ5SwAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQAAAAAAAAAAAAAAAAALYmFpX2Fzc2V0aWQBAAAAIJPhcjhxBJtq6JpjHwQkt2RTlyw+vGYLg3SvaLskjeJCAAAAAAphZG1pbl9hZGRyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUTLfve1EjrcSTZbnarq+rhHq1VvziySxAAAAAAA9ub25fY2lyY3VsYXRpbmcJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVTsajDaiz3SDMXD/foB97kPVKepkwKDR7sAAAAADmRhcHBSdW5uaW5nS2V5AgAAABRjb25mX2RhcHBfaXNfcnVubmluZwAAAAARbWFpbnRlbmFuY2VNU0dLZXkCAAAAFGNv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BQAAAANuaWwJAAACAAAAAQIAAAAiWW91IGFyZSBub3QgYWxsb3dlZCB0byBjaGFuZ2UgdGhpcwAAAAFpAQAAAAtkZWxldGVFbnRyeQAAAAEAAAAFZW50cnkEAAAACyR0MDQxOTU0MjM0CQEAAAAMaWRDYWxsZXJEYXRlAAAAAQUAAAABaQQAAAACaWQIBQAAAAskdDA0MTk1NDIzNAAAAAJfMQQAAAAGY2FsbGVyCAUAAAALJHQwNDE5NTQyMzQAAAACXzIEAAAABGRhdGUIBQAAAAskdDA0MTk1NDIzNAAAAAJfMwMJAAAAAAAAAgUAAAAGY2FsbGVyCQAEJQAAAAEFAAAACmFkbWluX2FkZHIJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAAFZW50cnkFAAAAA25pbAkAAAIAAAABAgAAAAJubwAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V58phtbA==", "height": 3287477, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HR3VJzg7N3QWFDbpsPgTB9Ee6AM5z28TBrBMjgaA7kW7 Next: 3TbY3KHJS3QwCCKPhUUgYJpH8UiTAYTh5UqCRmC9RttE Diff:
Old | New | Differences | |
---|---|---|---|
75 | 75 | let s = F._1 | |
76 | 76 | let t = F._2 | |
77 | 77 | if (true) | |
78 | - | then throw( | |
78 | + | then throw(m[0]) | |
79 | 79 | else if ((t != d)) | |
80 | 80 | then throw("Only BAI token accepted") | |
81 | 81 | else { |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = valueOrElse(getString(this, b), "") | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func c (b) = valueOrElse(getInteger(this, b), 0) | |
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 = split(valueOrElse(a("supported_recipients_network"), "bnb_base"), "_") | |
29 | 29 | ||
30 | 30 | let n = valueOrElse(c("confirmations_required"), 5) | |
31 | 31 | ||
32 | 32 | let o = valueOrElse(c("service_fee"), 25000000) | |
33 | 33 | ||
34 | 34 | func p (q) = if ((size(q.payments) == 0)) | |
35 | 35 | then throw("No payment attached") | |
36 | 36 | else { | |
37 | 37 | let r = value(q.payments[0]) | |
38 | 38 | let s = value(r.amount) | |
39 | 39 | let t = value(r.assetId) | |
40 | 40 | $Tuple2(s, t) | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func u (q) = if (!(i)) | |
45 | 45 | then throw(j) | |
46 | 46 | else $Tuple3(toBase58String(q.transactionId), toBase58String(q.caller.bytes), lastBlock.timestamp) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | @Callable(v) | |
50 | 50 | func setConf (b,w) = { | |
51 | 51 | let x = toString(v.caller) | |
52 | 52 | if (containsElement([toString(e), toString(this)], x)) | |
53 | 53 | then [StringEntry(b, w)] | |
54 | 54 | else throw("You are not allowed to change this") | |
55 | 55 | } | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | ||
59 | 59 | @Callable(q) | |
60 | 60 | func appRunning (y,z) = { | |
61 | 61 | let A = u(q) | |
62 | 62 | let B = A._1 | |
63 | 63 | let x = A._2 | |
64 | 64 | let C = A._3 | |
65 | 65 | if (containsElement([toString(e), toString(this)], x)) | |
66 | 66 | then [BooleanEntry(g, y), StringEntry(h, z)] | |
67 | 67 | else throw("You are not allowed to change this") | |
68 | 68 | } | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | ||
72 | 72 | @Callable(q) | |
73 | 73 | func deposit (D,E) = { | |
74 | 74 | let F = p(q) | |
75 | 75 | let s = F._1 | |
76 | 76 | let t = F._2 | |
77 | 77 | if (true) | |
78 | - | then throw( | |
78 | + | then throw(m[0]) | |
79 | 79 | else if ((t != d)) | |
80 | 80 | then throw("Only BAI token accepted") | |
81 | 81 | else { | |
82 | 82 | let G = u(q) | |
83 | 83 | let B = G._1 | |
84 | 84 | let x = G._2 | |
85 | 85 | let C = G._3 | |
86 | 86 | if ((0 >= (s - o))) | |
87 | 87 | then throw("Cannot bridge non positive amount!") | |
88 | 88 | else if (!(containsElement(m, E))) | |
89 | 89 | then throw("Recipient network not supported") | |
90 | 90 | else [StringEntry(((((((((B + "_") + x) + "_") + D) + "_") + E) + "_") + k), ((((((((x + "_") + toString((s - o))) + "_") + D) + "_") + E) + "_") + toString(height)))] | |
91 | 91 | } | |
92 | 92 | } | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | ||
96 | 96 | @Callable(q) | |
97 | 97 | func finalize (H,I) = { | |
98 | 98 | let J = u(q) | |
99 | 99 | let B = J._1 | |
100 | 100 | let x = J._2 | |
101 | 101 | let C = J._3 | |
102 | 102 | if (containsElement([toString(e), toString(this)], x)) | |
103 | 103 | then { | |
104 | 104 | let K = a(((H + "_") + k)) | |
105 | 105 | if ((K == "")) | |
106 | 106 | then throw("Request not found") | |
107 | 107 | else { | |
108 | 108 | let s = valueOrElse(parseInt(split(K, "_")[1]), 0) | |
109 | 109 | if ((0 > s)) | |
110 | 110 | then throw("Cannot transfer non positive amount") | |
111 | 111 | else { | |
112 | 112 | let L = valueOrElse(parseInt(split(K, "_")[4]), 0) | |
113 | 113 | if ((n > (height - L))) | |
114 | 114 | then throw("Required confirmation not reached.") | |
115 | 115 | else [DeleteEntry(((H + "_") + k)), StringEntry(((H + "_") + l), ((K + "_") + I)), ScriptTransfer(f, s, d)] | |
116 | 116 | } | |
117 | 117 | } | |
118 | 118 | } | |
119 | 119 | else throw("You are not allowed to change this") | |
120 | 120 | } | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | ||
124 | 124 | @Callable(q) | |
125 | 125 | func deleteEntry (M) = { | |
126 | 126 | let N = u(q) | |
127 | 127 | let B = N._1 | |
128 | 128 | let x = N._2 | |
129 | 129 | let C = N._3 | |
130 | 130 | if ((x == toString(e))) | |
131 | 131 | then [DeleteEntry(M)] | |
132 | 132 | else throw("no") | |
133 | 133 | } | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | @Verifier(O) | |
137 | 137 | func P () = sigVerify(O.bodyBytes, O.proofs[0], O.senderPublicKey) | |
138 | 138 |
github/deemru/w8io/169f3d6 25.80 ms ◑