tx · FbDETRYBnqtwDBgMfHFTqC8X5KYN78FgkMYFfJa3QNor

3N65ziw5oaWWQHthPW5jzsh9VxjYxHwpv33:  -0.01300000 Waves

2023.03.22 22:26 [2501639] smart account 3N65ziw5oaWWQHthPW5jzsh9VxjYxHwpv33 > SELF 0.00000000 Waves

{ "type": 13, "id": "FbDETRYBnqtwDBgMfHFTqC8X5KYN78FgkMYFfJa3QNor", "fee": 1300000, "feeAssetId": null, "timestamp": 1679513199685, "version": 2, "chainId": 84, "sender": "3N65ziw5oaWWQHthPW5jzsh9VxjYxHwpv33", "senderPublicKey": "5yoY2Atq5TS6YzXkDHGig1DJdaYnWskuGToqK61rQWQd", "proofs": [ "5s7zi59Qn9MALftXSjzDTm8F4WELp27iS8jirB3mL3nzVipy6bJjdvF9XiCWCWfVgq84J1gqurncM6ewwDfFi2J8" ], "script": "base64:BgILCAISABIDCgEIEgANARNrZXlJbnZlc3RXeFh0bkRlbGF5AAITJV9faW52ZXN0V3hYdG5EZWxheQEXa2V5SW52ZXN0V3hYdG5BbW91bnRYdG4AAhclX19pbnZlc3RXeFh0bkFtb3VudFh0bgEMa2V5V3hYdG5Qb29sAAIMJV9fd3hYdG5Qb29sAQ1rZXlYdG5Bc3NldElkAAINJV9feHRuQXNzZXRJZAEKa2V5V3hYdG5McAACCiVfX3d4WHRuTHABDmtleUxwVG9BZGRyZXNzAAIOJV9fbHBUb0FkZHJlc3MBE2tleU1hbmFnZXJQdWJsaWNLZXkAAhQlc19fbWFuYWdlclB1YmxpY0tleQEaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkAAhslc19fcGVuZGluZ01hbmFnZXJQdWJsaWNLZXkBGGtleUludmVzdFd4WHRuTGFzdEhlaWdodAACGCVfX2ludmVzdFd4WHRuTGFzdEhlaWdodAEWbWFuYWdlclB1YmxpY0tleU9yVW5pdAAEByRtYXRjaDAJAKIIAQkBE2tleU1hbmFnZXJQdWJsaWNLZXkAAwkAAQIFByRtYXRjaDACBlN0cmlu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ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAED3RhcmdldFB1YmxpY0tleQQHJG1hdGNoMAkBFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEAnBrBQckbWF0Y2gwBQJwawMJAAECBQckbWF0Y2gwAgRVbml0CAUCdHgPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFD3RhcmdldFB1YmxpY0tlefMjKbM=", "height": 2501639, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4CytMZxhPesoTXAfYRzapDMBnEXLhX4agEVD5e82fYUC Next: 6wRM5vehNqyUqgQ2gVcQSKTgMW3bJymqw4xiyiuh49w2 Diff:
OldNewDifferences
7777
7878 @Callable(q)
7979 func investWxXtn () = {
80- let t = p(q)
81- if ((t == t))
80+ let t = valueOrElse(getInteger(i()), 0)
81+ let u = getIntegerValue(a())
82+ let v = [if ((height > (t + u)))
83+ then true
84+ else n("wait to invest")]
85+ if ((v == v))
8286 then {
83- let u = valueOrElse(getInteger(i()), 0)
84- let v = getIntegerValue(a())
85- let w = [if ((height > (u + v)))
86- then true
87- else n("wait to invest")]
88- if ((w == w))
87+ let w = fromBase58String(getStringValue(e()))
88+ let x = assetBalance(this, w)
89+ if ((x == x))
8990 then {
90- let x = fromBase58String(getStringValue(e()))
91- let y = assetBalance(this, x)
91+ let y = invoke(addressFromStringValue(getStringValue(c())), "putOneTkn", [0, false], [AttachedPayment(fromBase58String(getStringValue(d())), getIntegerValue(b()))])
9292 if ((y == y))
9393 then {
94- let z = invoke(addressFromStringValue(getStringValue(c())), "putOneTkn", [0, false], [AttachedPayment(fromBase58String(getStringValue(d())), getIntegerValue(b()))])
94+ let z = assetBalance(this, w)
9595 if ((z == z))
9696 then {
97- let A = assetBalance(this, x)
98- if ((A == A))
99- then {
100- let B = (A - y)
101- let C = if ((B == 0))
102- then n("lp to get is zero")
103- else unit
104- if ((C == C))
105- then [IntegerEntry(i(), height), ScriptTransfer(addressFromStringValue(getStringValue(f())), B, x)]
106- else throw("Strict value is not equal to itself.")
107- }
97+ let A = (z - x)
98+ let B = if ((A == 0))
99+ then n("lp to get is zero")
100+ else unit
101+ if ((B == B))
102+ then [IntegerEntry(i(), height), ScriptTransfer(addressFromStringValue(getStringValue(f())), A, w)]
108103 else throw("Strict value is not equal to itself.")
109104 }
110105 else throw("Strict value is not equal to itself.")
119114
120115
121116 @Callable(q)
122-func setManager (D) = {
123- let t = p(q)
124- if ((t == t))
117+func setManager (C) = {
118+ let D = p(q)
119+ if ((D == D))
125120 then {
126- let E = fromBase58String(D)
121+ let E = fromBase58String(C)
127122 if ((E == E))
128- then [StringEntry(h(), D)]
123+ then [StringEntry(h(), C)]
129124 else throw("Strict value is not equal to itself.")
130125 }
131126 else throw("Strict value is not equal to itself.")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func a () = "%__investWxXtnDelay"
55
66
77 func b () = "%__investWxXtnAmountXtn"
88
99
1010 func c () = "%__wxXtnPool"
1111
1212
1313 func d () = "%__xtnAssetId"
1414
1515
1616 func e () = "%__wxXtnLp"
1717
1818
1919 func f () = "%__lpToAddress"
2020
2121
2222 func g () = "%s__managerPublicKey"
2323
2424
2525 func h () = "%s__pendingManagerPublicKey"
2626
2727
2828 func i () = "%__investWxXtnLastHeight"
2929
3030
3131 func j () = {
3232 let k = getString(g())
3333 if ($isInstanceOf(k, "String"))
3434 then {
3535 let l = k
3636 fromBase58String(l)
3737 }
3838 else if ($isInstanceOf(k, "Unit"))
3939 then unit
4040 else throw("Match error")
4141 }
4242
4343
4444 func m () = {
4545 let k = getString(h())
4646 if ($isInstanceOf(k, "String"))
4747 then {
4848 let l = k
4949 fromBase58String(l)
5050 }
5151 else if ($isInstanceOf(k, "Unit"))
5252 then unit
5353 else throw("Match error")
5454 }
5555
5656
5757 func n (o) = throw(makeString(["investor.ride:", o], " "))
5858
5959
6060 func p (q) = {
6161 let r = n("permission denied")
6262 let k = j()
6363 if ($isInstanceOf(k, "ByteVector"))
6464 then {
6565 let s = k
6666 if ((q.callerPublicKey == s))
6767 then true
6868 else r
6969 }
7070 else if ($isInstanceOf(k, "Unit"))
7171 then if ((q.caller == this))
7272 then true
7373 else r
7474 else throw("Match error")
7575 }
7676
7777
7878 @Callable(q)
7979 func investWxXtn () = {
80- let t = p(q)
81- if ((t == t))
80+ let t = valueOrElse(getInteger(i()), 0)
81+ let u = getIntegerValue(a())
82+ let v = [if ((height > (t + u)))
83+ then true
84+ else n("wait to invest")]
85+ if ((v == v))
8286 then {
83- let u = valueOrElse(getInteger(i()), 0)
84- let v = getIntegerValue(a())
85- let w = [if ((height > (u + v)))
86- then true
87- else n("wait to invest")]
88- if ((w == w))
87+ let w = fromBase58String(getStringValue(e()))
88+ let x = assetBalance(this, w)
89+ if ((x == x))
8990 then {
90- let x = fromBase58String(getStringValue(e()))
91- let y = assetBalance(this, x)
91+ let y = invoke(addressFromStringValue(getStringValue(c())), "putOneTkn", [0, false], [AttachedPayment(fromBase58String(getStringValue(d())), getIntegerValue(b()))])
9292 if ((y == y))
9393 then {
94- let z = invoke(addressFromStringValue(getStringValue(c())), "putOneTkn", [0, false], [AttachedPayment(fromBase58String(getStringValue(d())), getIntegerValue(b()))])
94+ let z = assetBalance(this, w)
9595 if ((z == z))
9696 then {
97- let A = assetBalance(this, x)
98- if ((A == A))
99- then {
100- let B = (A - y)
101- let C = if ((B == 0))
102- then n("lp to get is zero")
103- else unit
104- if ((C == C))
105- then [IntegerEntry(i(), height), ScriptTransfer(addressFromStringValue(getStringValue(f())), B, x)]
106- else throw("Strict value is not equal to itself.")
107- }
97+ let A = (z - x)
98+ let B = if ((A == 0))
99+ then n("lp to get is zero")
100+ else unit
101+ if ((B == B))
102+ then [IntegerEntry(i(), height), ScriptTransfer(addressFromStringValue(getStringValue(f())), A, w)]
108103 else throw("Strict value is not equal to itself.")
109104 }
110105 else throw("Strict value is not equal to itself.")
111106 }
112107 else throw("Strict value is not equal to itself.")
113108 }
114109 else throw("Strict value is not equal to itself.")
115110 }
116111 else throw("Strict value is not equal to itself.")
117112 }
118113
119114
120115
121116 @Callable(q)
122-func setManager (D) = {
123- let t = p(q)
124- if ((t == t))
117+func setManager (C) = {
118+ let D = p(q)
119+ if ((D == D))
125120 then {
126- let E = fromBase58String(D)
121+ let E = fromBase58String(C)
127122 if ((E == E))
128- then [StringEntry(h(), D)]
123+ then [StringEntry(h(), C)]
129124 else throw("Strict value is not equal to itself.")
130125 }
131126 else throw("Strict value is not equal to itself.")
132127 }
133128
134129
135130
136131 @Callable(q)
137132 func confirmManager () = {
138133 let F = m()
139134 let G = if (isDefined(F))
140135 then true
141136 else throw("No pending manager")
142137 if ((G == G))
143138 then {
144139 let H = if ((q.callerPublicKey == value(F)))
145140 then true
146141 else throw("You are not pending manager")
147142 if ((H == H))
148143 then [StringEntry(g(), toBase58String(value(F))), DeleteEntry(h())]
149144 else throw("Strict value is not equal to itself.")
150145 }
151146 else throw("Strict value is not equal to itself.")
152147 }
153148
154149
155150 @Verifier(I)
156151 func J () = {
157152 let K = {
158153 let k = j()
159154 if ($isInstanceOf(k, "ByteVector"))
160155 then {
161156 let s = k
162157 s
163158 }
164159 else if ($isInstanceOf(k, "Unit"))
165160 then I.senderPublicKey
166161 else throw("Match error")
167162 }
168163 sigVerify(I.bodyBytes, I.proofs[0], K)
169164 }
170165

github/deemru/w8io/169f3d6 
37.52 ms