tx · 6DjdRzKT3J9zzwgU9hnQ7MgKTVUbUnzUiKUTEQqeBaLT

3Myt92JAGj5wUjb7hTStuhuENUzJrNU944o:  -0.05000000 Waves

2023.07.12 15:24 [2662676] smart account 3Myt92JAGj5wUjb7hTStuhuENUzJrNU944o > SELF 0.00000000 Waves

{ "type": 13, "id": "6DjdRzKT3J9zzwgU9hnQ7MgKTVUbUnzUiKUTEQqeBaLT", "fee": 5000000, "feeAssetId": null, "timestamp": 1689164703031, "version": 2, "chainId": 84, "sender": "3Myt92JAGj5wUjb7hTStuhuENUzJrNU944o", "senderPublicKey": "BHixQkDWX7RRP7YVsZDgeKjhLBtqar6uUSQCRnyLZ6z1", "proofs": [ "2Cr26Lo6cbHDaWK9G51m6b1Tbm5RVzZqeTQKFncV2Vn2y3XoYiZiXyJiHcdrhwdU6mDejFskFErL2ybe7RDt1DMc" ], "script": "base64:BgKvBAgCEgQKAggIEgAiA1NFUCIEam9pbiICYXIiDmtleUluaXRpYWxpemVkIhVrZXlDb29yZGluYXRvckFkZHJlc3MiEmtleVZlcmlmaWVyQWRkcmVzcyIMa2V5RWFzdEFzc2V0IglrZXlTaWduZWQiCF9hZGRyZXNzIgVfdHhJZCIRa2V5UHJvdG9jb2xBY3RpdmUiDWlzSW5pdGlhbGl6ZWQiEm11c3ROb3RJbml0aWFsaXplZCIIbXVzdFNlbGYiAWkiC2Nvb3JkaW5hdG9yIgh2ZXJpZmllciIHJG1hdGNoMCIBcyIPZ2V0RWFzdEFzc2V0U3RyIgxnZXRFYXN0QXNzZXQiCGlzQWN0aXZlIgptdXN0QWN0aXZlIhJtdXN0SGF2ZU9uZVBheW1lbnQiFGdldEFzc2V0SWRGcm9tU3RyaW5nIgdhc3NldElkIgdpc0Fzc2V0IgFwIg1jaGVja2luZ0Fzc2V0IgJidiIEbmFtZSIHJG1hdGNoMSIFYXNzZXQiA2VyciIMcGF5bWVudEFzc2V0IgxjaGVja0FkZHJlc3MiB2FkZHJlc3MiD2tleU9sZEVhc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AAQIFAXICBFVuaXQJAAIBAg9JbnZhbGlkIGFkZHJlc3MJAAIBAgtNYXRjaCBlcnJvcgEBTAAJAQFiAQkAzAgCAgIlcwkAzAgCAgxvbGRFYXN0QXNzZXQFA25pbAEBTQAJANkEAQkBEUBleHRyTmF0aXZlKDEwNTgpAQkBAUwAAgFvAQppbml0aWFsaXplAgFOAU8EAVAJAMwIAgkBAW4BBQFvCQDMCAIJAQFtAAkAzAgCCQEBSgEFAU4FA25pbAMJAAACBQFQBQFQCQDMCAIJAQtTdHJpbmdFbnRyeQIJAQFlAAUBTgkAzAgCCQELU3RyaW5nRW50cnkCCQEBTAAFAU8JAMwIAgkBDEJvb2xlYW5FbnRyeQIJAQFkAAYFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgFvAQhleGNoYW5nZQAEAVEJAQF1AAQBUgkBAU0ABAFTCQCRAwIIBQFvCHBheW1lbnRzAAAEAVAJAMwIAgkBAXcACQDMCAIJAQF4AQUBbwkAzAgCCQEBQQIFAVMFAVIFA25pbAMJAAACBQFQBQFQBAFUCQBpAggFAVMGYW1vdW50AGQJAMwIAgkBBEJ1cm4CBQFSCAUBUwZhbW91bnQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwgFAW8GY2FsbGVyBQFUBQFRBQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAVUBAVYABAFyCQEBcQADCQABAgUBcgIGU3RyaW5nBAFLBQFyCQELdmFsdWVPckVsc2UCCQCbCAIJARFAZXh0ck5hdGl2ZSgxMDYyKQEFAUsJAQFoAgkApQgBBQR0aGlzCQDYBAEIBQFVAmlkBwkA9AMDCAUBVQlib2R5Qnl0ZXMJAJEDAggFAVUGcHJvb2ZzAAAIBQFVD3NlbmRlclB1YmxpY0tleWta1f8=", "height": 2662676, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = "__"
5+
6+func b (c) = makeString(c, a)
7+
8+
9+func d () = b(["%s", "initialized"])
10+
11+
12+func e () = b(["%s", "coordinatorAddress"])
13+
14+
15+func f () = b(["%s", "verifierAddress"])
16+
17+
18+func g () = b(["%s", "eastAsset"])
19+
20+
21+func h (i,j) = b(["%s%s%s", "signed", i, j])
22+
23+
24+func k () = b(["%s", "protocolActive"])
25+
26+
27+func l () = valueOrElse(getBoolean(this, d()), false)
28+
29+
30+func m () = if (l())
31+ then throw("Already initialized")
32+ else unit
33+
34+
35+func n (o) = if ((o.caller != this))
36+ then throw("Only self invocation allowed.")
37+ else unit
38+
39+
40+func p () = addressFromStringValue(valueOrErrorMessage(getString(e()), "Coordinator is not set"))
41+
42+
43+func q () = {
44+ let r = getString(e())
45+ if ($isInstanceOf(r, "String"))
46+ then {
47+ let s = r
48+ getString(addressFromStringValue(s), f())
49+ }
50+ else if ($isInstanceOf(r, "Unit"))
51+ then unit
52+ else throw("Match error")
53+ }
54+
55+
56+func t () = valueOrErrorMessage(getString(p(), g()), "East asset is not set")
57+
58+
59+func u () = fromBase58String(t())
60+
61+
62+func v () = valueOrElse(getBoolean(p(), k()), false)
63+
64+
65+func w () = if (if (!(v()))
66+ then true
67+ else !(l()))
68+ then throw("Protocol is disabled. Please contact support.")
69+ else unit
70+
71+
72+func x (o) = if ((size(o.payments) != 1))
73+ then throw("Must have one payment.")
74+ else unit
75+
76+
77+func y (z) = if ((z == "WAVES"))
78+ then unit
79+ else fromBase58String(z)
80+
81+
82+func A (B,C) = {
83+ let z = {
84+ let r = C
85+ if ($isInstanceOf(r, "ByteVector"))
86+ then {
87+ let D = r
88+ D
89+ }
90+ else if ($isInstanceOf(r, "String"))
91+ then {
92+ let s = r
93+ y(s)
94+ }
95+ else if ($isInstanceOf(r, "Unit"))
96+ then unit
97+ else throw("Match error")
98+ }
99+ let r = z
100+ if ($isInstanceOf(r, "ByteVector"))
101+ then {
102+ let D = r
103+ let E = {
104+ let F = assetInfo(D)
105+ if ($isInstanceOf(F, "Asset"))
106+ then {
107+ let G = F
108+ G.name
109+ }
110+ else if ($isInstanceOf(F, "Unit"))
111+ then throw(("Can't find asset " + toBase58String(D)))
112+ else throw("Match error")
113+ }
114+ let H = throw(("Attached payment asset is not " + E))
115+ let F = B.assetId
116+ if ($isInstanceOf(F, "ByteVector"))
117+ then {
118+ let I = F
119+ if ((I != z))
120+ then H
121+ else unit
122+ }
123+ else if ($isInstanceOf(F, "Unit"))
124+ then H
125+ else throw("Match error")
126+ }
127+ else if ($isInstanceOf(r, "Unit"))
128+ then if ((B.assetId != unit))
129+ then throw("Attached payment asset is not WAVES")
130+ else unit
131+ else throw("Match error")
132+ }
133+
134+
135+func J (i) = {
136+ let r = addressFromString(i)
137+ if ($isInstanceOf(r, "Address"))
138+ then {
139+ let K = r
140+ true
141+ }
142+ else if ($isInstanceOf(r, "Unit"))
143+ then throw("Invalid address")
144+ else throw("Match error")
145+ }
146+
147+
148+func L () = b(["%s", "oldEastAsset"])
149+
150+
151+func M () = fromBase58String(getStringValue(L()))
152+
153+
154+@Callable(o)
155+func initialize (N,O) = {
156+ let P = [n(o), m(), J(N)]
157+ if ((P == P))
158+ then [StringEntry(e(), N), StringEntry(L(), O), BooleanEntry(d(), true)]
159+ else throw("Strict value is not equal to itself.")
160+ }
161+
162+
163+
164+@Callable(o)
165+func exchange () = {
166+ let Q = u()
167+ let R = M()
168+ let S = o.payments[0]
169+ let P = [w(), x(o), A(S, R)]
170+ if ((P == P))
171+ then {
172+ let T = (S.amount / 100)
173+[Burn(R, S.amount), ScriptTransfer(o.caller, T, Q)]
174+ }
175+ else throw("Strict value is not equal to itself.")
176+ }
177+
178+
179+@Verifier(U)
180+func V () = {
181+ let r = q()
182+ if ($isInstanceOf(r, "String"))
183+ then {
184+ let K = r
185+ valueOrElse(getBoolean(addressFromStringValue(K), h(toString(this), toBase58String(U.id))), false)
186+ }
187+ else sigVerify(U.bodyBytes, U.proofs[0], U.senderPublicKey)
188+ }
189+

github/deemru/w8io/169f3d6 
20.44 ms