tx · 91zxAxbanrJwxEStNZJjzUbadamdbLFETDavUfWZfHFh

3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq:  -0.01000000 Waves

2023.09.18 23:41 [2761327] smart account 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq > SELF 0.00000000 Waves

{ "type": 13, "id": "91zxAxbanrJwxEStNZJjzUbadamdbLFETDavUfWZfHFh", "fee": 1000000, "feeAssetId": null, "timestamp": 1695069713949, "version": 2, "chainId": 84, "sender": "3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq", "senderPublicKey": "ERewvWFUFQfR1eCnipNAv9n7SdQhof2ESP6PGVjTueLd", "proofs": [ "3gjCx8z3HXH14YEG9k17yck9LL4RjqA4oBn9CZFYY9uQVZZES6rDjvUJQaMopWfsoTB3T2eqcYx1M22bCy2KdtVj" ], "script": "base64:BgINCAISABIAEgASAwoBAQcABnVzZG5JZAEgD/IcEqzkxDya7EYaqyWosOy6BytGzG2IcvC14pJJAbQADndhdmVzMkxUb2tlbklkASDkzSnqu8EXlTZRNkvkaX2ITlFTrbuGFIX8CY7Zd2/OsQAMcHV6emxlTGVuZFNDAiMzTjNEblZmZm5VeVp0ejJNUmJrNVU3Z2lOMTEyV2VtcE1OZAAQZmFrZVB1enpsZVN3YXBTQwIjM01zOGZxYlhNNFJobU02Q1BUcjQ0aFV3SGUyQ0NtVkNmVkEADnVzZG5BZGRyZXNzU3RyAiwyNUZFcUVqUmtxSzZ5Q2tpVDdMejZTQVl6N2dVRkN0eGZDQ2huclZGRDVBVAAPd2F2ZXMyTFRva2VuU3RyAixHUTlRTlZMR2ZZU2JOWjRkUzhOUnl2R0dFTFpMNHNXUEtpVmo4OENWMXJKTAENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAQBaQEJbWludExvbmcyAAMDCQECIT0CCQCQAwEIBQFpC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c3MJAKUIAQgFAWkGY2FsbGVyBBJyZWRlZW1lZFVTRE5BbW91bnQJAPwHBAkBEUBleHRyTmF0aXZlKDEwNjIpAQUQZmFrZVB1enpsZVN3YXBTQwIKc3dhcFRvVVNETgkAzAgCBQt3YXZlc0Ftb3VudAkAzAgCBQt1c2VyQWRkcmVzcwUDbmlsBQNuaWwDCQAAAgUScmVkZWVtZWRVU0ROQW1vdW50BRJyZWRlZW1lZFVTRE5BbW91bnQEByRtYXRjaDAFEnJlZGVlbWVkVVNETkFtb3VudAMJAAECBQckbWF0Y2gwAgNJbnQEE3JlZGVlbWVkQW1vdW50VmFsdWUFByRtYXRjaDAJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgULdXNlckFkZHJlc3MCCV9yZWRlZW1lZAUTcmVkZWVtZWRBbW91bnRWYWx1ZQUDbmlsCQACAQIXSW5jb3JyZWN0IGludm9rZSByZXN1bHQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5XZ1+Iw==", "height": 2761327, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9J5x7VnQxiNFwvaoJgQSzM3TCovqnshFeZVuGN1TJxau Next: 8KPtrNnvxYE67a2Qg6j96XsBJ6uED3Y5sJ2rjfrYRqfF Diff:
OldNewDifferences
103103 let o = i
104104 let q = [70]
105105 func r (s,t) = {
106- let u = invoke(addressFromStringValue(d), "swapToWaves", [toString(k.caller), ((l * t) / 100)], nil)
107- if ((u == u))
106+ let G = invoke(addressFromStringValue(c), "borrow", [e, ((l * s) / 100)], nil)
107+ if ((G == G))
108108 then {
109- let v = u
110- if ($isInstanceOf(v, "Int"))
109+ let u = invoke(addressFromStringValue(d), "swapToWaves", [toString(k.caller), ((l * t) / 100)], nil)
110+ if ((u == u))
111111 then {
112- let w = v
113- w
112+ let v = u
113+ if ($isInstanceOf(v, "Int"))
114+ then {
115+ let w = v
116+ let x = invoke(addressFromStringValue(c), "supply", nil, [AttachedPayment(unit, w)])
117+ if ((x == x))
118+ then w
119+ else throw("Strict value is not equal to itself.")
120+ }
121+ else throw("Incorrect invoke result")
114122 }
115- else throw("Incorrect invoke result")
123+ else throw("Strict value is not equal to itself.")
116124 }
117125 else throw("Strict value is not equal to itself.")
118126 }
187195
188196
189197 @Callable(k)
190-func redeem (G) = {
191- let H = toString(k.caller)
192- let I = invoke(addressFromStringValue(d), "swapToUSDN", [G, H], nil)
193- if ((I == I))
198+func redeem (H) = {
199+ let I = toString(k.caller)
200+ let J = invoke(addressFromStringValue(d), "swapToUSDN", [H, I], nil)
201+ if ((J == J))
194202 then {
195- let i = I
203+ let i = J
196204 if ($isInstanceOf(i, "Int"))
197205 then {
198- let J = i
199-[IntegerEntry((H + "_redeemed"), J)]
206+ let K = i
207+[IntegerEntry((I + "_redeemed"), K)]
200208 }
201209 else throw("Incorrect invoke result")
202210 }
204212 }
205213
206214
207-@Verifier(K)
208-func L () = sigVerify(K.bodyBytes, K.proofs[0], K.senderPublicKey)
215+@Verifier(L)
216+func M () = sigVerify(L.bodyBytes, L.proofs[0], L.senderPublicKey)
209217
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'
55
66 let b = base58'GQ9QNVLGfYSbNZ4dS8NRyvGGELZL4sWPKiVj88CV1rJL'
77
88 let c = "3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"
99
1010 let d = "3Ms8fqbXM4RhmM6CPTr44hUwHe2CCmVCfVA"
1111
1212 let e = "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"
1313
1414 let f = "GQ9QNVLGfYSbNZ4dS8NRyvGGELZL4sWPKiVj88CV1rJL"
1515
1616 func g (h) = {
1717 let i = getInteger(this, h)
1818 if ($isInstanceOf(i, "Int"))
1919 then {
2020 let j = i
2121 j
2222 }
2323 else 0
2424 }
2525
2626
2727 @Callable(k)
2828 func mintLong2 () = if (if ((size(k.payments) != 1))
2929 then true
3030 else (k.payments[0].amount == 0))
3131 then throw("1 payment has to be attached mint")
3232 else {
3333 let l = k.payments[0].amount
3434 let m = toString(k.caller)
3535 let n = invoke(addressFromStringValue(d), "swapToWaves", [toString(k.caller), l], nil)
3636 if ((n == n))
3737 then {
3838 let i = n
3939 if ($isInstanceOf(i, "Int"))
4040 then {
4141 let o = i
4242 let p = invoke(addressFromStringValue(c), "supply", nil, [AttachedPayment(unit, o)])
4343 if ((p == p))
4444 then {
4545 let q = [70, 49, 34, 24, 17]
4646 func r (s,t) = {
4747 let u = invoke(addressFromStringValue(d), "swapToWaves", [toString(k.caller), ((o * s) / 100)], nil)
4848 if ((u == u))
4949 then {
5050 let v = u
5151 if ($isInstanceOf(v, "Int"))
5252 then {
5353 let w = v
5454 let x = invoke(addressFromStringValue(c), "supply", nil, [AttachedPayment(unit, w)])
5555 if ((x == x))
5656 then (s + t)
5757 else throw("Strict value is not equal to itself.")
5858 }
5959 else throw("Incorrect invoke result")
6060 }
6161 else throw("Strict value is not equal to itself.")
6262 }
6363
6464 let y = {
6565 let z = q
6666 let A = size(z)
6767 let B = 0
6868 func C (D,E) = if ((E >= A))
6969 then D
7070 else r(D, z[E])
7171
7272 func F (D,E) = if ((E >= A))
7373 then D
7474 else throw("List size exceeds 5")
7575
7676 F(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5)
7777 }
7878 [ScriptTransfer(k.caller, ((o * y) / 100), b)]
7979 }
8080 else throw("Strict value is not equal to itself.")
8181 }
8282 else throw("Incorrect invoke result")
8383 }
8484 else throw("Strict value is not equal to itself.")
8585 }
8686
8787
8888
8989 @Callable(k)
9090 func mintLong2_3 () = if (if ((size(k.payments) != 1))
9191 then true
9292 else (k.payments[0].amount == 0))
9393 then throw("1 payment has to be attached mint")
9494 else {
9595 let l = k.payments[0].amount
9696 let m = toString(k.caller)
9797 let n = invoke(addressFromStringValue(d), "swapToWaves", [toString(k.caller), l], nil)
9898 if ((n == n))
9999 then {
100100 let i = n
101101 if ($isInstanceOf(i, "Int"))
102102 then {
103103 let o = i
104104 let q = [70]
105105 func r (s,t) = {
106- let u = invoke(addressFromStringValue(d), "swapToWaves", [toString(k.caller), ((l * t) / 100)], nil)
107- if ((u == u))
106+ let G = invoke(addressFromStringValue(c), "borrow", [e, ((l * s) / 100)], nil)
107+ if ((G == G))
108108 then {
109- let v = u
110- if ($isInstanceOf(v, "Int"))
109+ let u = invoke(addressFromStringValue(d), "swapToWaves", [toString(k.caller), ((l * t) / 100)], nil)
110+ if ((u == u))
111111 then {
112- let w = v
113- w
112+ let v = u
113+ if ($isInstanceOf(v, "Int"))
114+ then {
115+ let w = v
116+ let x = invoke(addressFromStringValue(c), "supply", nil, [AttachedPayment(unit, w)])
117+ if ((x == x))
118+ then w
119+ else throw("Strict value is not equal to itself.")
120+ }
121+ else throw("Incorrect invoke result")
114122 }
115- else throw("Incorrect invoke result")
123+ else throw("Strict value is not equal to itself.")
116124 }
117125 else throw("Strict value is not equal to itself.")
118126 }
119127
120128 let y = {
121129 let z = q
122130 let A = size(z)
123131 let B = 0
124132 func C (D,E) = if ((E >= A))
125133 then D
126134 else r(D, z[E])
127135
128136 func F (D,E) = if ((E >= A))
129137 then D
130138 else throw("List size exceeds 1")
131139
132140 F(C(B, 0), 1)
133141 }
134142 [IntegerEntry("firstSwappedAmountValue", o), IntegerEntry("swappedAmount", y)]
135143 }
136144 else throw("Incorrect invoke result")
137145 }
138146 else throw("Strict value is not equal to itself.")
139147 }
140148
141149
142150
143151 @Callable(k)
144152 func mintLong2_test () = if (if ((size(k.payments) != 1))
145153 then true
146154 else (k.payments[0].amount == 0))
147155 then throw("1 payment has to be attached mint")
148156 else {
149157 let l = k.payments[0].amount
150158 let m = toString(k.caller)
151159 let n = invoke(addressFromStringValue(d), "swapToWaves", [toString(k.caller), l], nil)
152160 if ((n == n))
153161 then {
154162 let i = n
155163 if ($isInstanceOf(i, "Int"))
156164 then {
157165 let o = i
158166 let p = invoke(addressFromStringValue(c), "supply", nil, [AttachedPayment(unit, o)])
159167 if ((p == p))
160168 then {
161169 let q = [70, 49, 34, 24, 17]
162170 func r (s,t) = (s + t)
163171
164172 let y = {
165173 let z = q
166174 let A = size(z)
167175 let B = 0
168176 func C (D,E) = if ((E >= A))
169177 then D
170178 else r(D, z[E])
171179
172180 func F (D,E) = if ((E >= A))
173181 then D
174182 else throw("List size exceeds 5")
175183
176184 F(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5)
177185 }
178186 [IntegerEntry("res", y), IntegerEntry("firstAmountIn", l), IntegerEntry("firstSwappedAmountValue", o), ScriptTransfer(k.caller, ((o * y) / 100), b)]
179187 }
180188 else throw("Strict value is not equal to itself.")
181189 }
182190 else throw("Incorrect invoke result")
183191 }
184192 else throw("Strict value is not equal to itself.")
185193 }
186194
187195
188196
189197 @Callable(k)
190-func redeem (G) = {
191- let H = toString(k.caller)
192- let I = invoke(addressFromStringValue(d), "swapToUSDN", [G, H], nil)
193- if ((I == I))
198+func redeem (H) = {
199+ let I = toString(k.caller)
200+ let J = invoke(addressFromStringValue(d), "swapToUSDN", [H, I], nil)
201+ if ((J == J))
194202 then {
195- let i = I
203+ let i = J
196204 if ($isInstanceOf(i, "Int"))
197205 then {
198- let J = i
199-[IntegerEntry((H + "_redeemed"), J)]
206+ let K = i
207+[IntegerEntry((I + "_redeemed"), K)]
200208 }
201209 else throw("Incorrect invoke result")
202210 }
203211 else throw("Strict value is not equal to itself.")
204212 }
205213
206214
207-@Verifier(K)
208-func L () = sigVerify(K.bodyBytes, K.proofs[0], K.senderPublicKey)
215+@Verifier(L)
216+func M () = sigVerify(L.bodyBytes, L.proofs[0], L.senderPublicKey)
209217

github/deemru/w8io/169f3d6 
48.25 ms