tx · iWLVPQWyFaYUPegheSmYoPdXngZFBtqYCrgvB5eVfEA

3NA2sejUzEcL7Gg8WfhrcqxP22fHk2SS9pK:  -0.00600000 Waves

2022.08.26 15:27 [2201448] smart account 3NA2sejUzEcL7Gg8WfhrcqxP22fHk2SS9pK > SELF 0.00000000 Waves

{ "type": 13, "id": "iWLVPQWyFaYUPegheSmYoPdXngZFBtqYCrgvB5eVfEA", "fee": 600000, "feeAssetId": null, "timestamp": 1661516889408, "version": 2, "chainId": 84, "sender": "3NA2sejUzEcL7Gg8WfhrcqxP22fHk2SS9pK", "senderPublicKey": "HMzDczZUThMMhE2Grm1ZmpN3QNZ9N7CUCYnsqh4utSDJ", "proofs": [ "56Z9aEvqjMD8pwXvCcZJpHvM5pFXXrV3i5AiQvyVVvnyM7YPeKq7Ss76V1Y4xvQiJa8pGwZoX2kVzX3LsFJRxc9G" ], "script": "base64:BgIYCAISABIAEgMKAQESAwoBARIAEgASABIABgAEdXNkbgEg11KRGPRfT6VehNuJvBkobHB7OMalzc+gLp7N2ofv42AABHVzZGMBIPQcuTcYg4l4Uh6IaJaLWyiuNgmUbeQfgPZEel3eCXgMAAxhZG1pbl93YWxsZXQCIzNOM0RDbmdqaWRpdmtKYlRKd0ZURXZiWVJUZmZDV1ZCTENMAA5hbGZhcmtfdGVzdG5ldAAFAAp2aXJlc19kYXBwARoBVNyrTo8TS/Q9RnEWPiIXGWOKyAceKmM2sAENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAgBaQEPYnV5X3VzZG5fdGlja2V0AAMJAQIhPQIICQCRAwIIBQFpCHBheW1lbnRzAAAHYXNzZXRJZAUEdXNkbgkAAgECH1BsZWFzZSBkZXBvc2l0IFVTRC1OIHRva2VuIG9ubHkEC3VzZXJfY3JlZGl0CQENdHJ5R2V0SW50ZWdlcgEJAKwCAgkArAICAgV1c2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AUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXlDgccK", "height": 2201448, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FxBJBzLztZC78R4ph8cB9ezFA4Xic3vA5K87HjQLk3YL Next: LjxaZ7SaGTtmuQFEuucwcodxVyMRrHPNjEd8APPoCvw Diff:
OldNewDifferences
99
1010 let d = 5
1111
12-let e = base58'3MzwNdM8LQZEPXq3d4uXvxeZGpBwVQXs9RD'
12+let e = base58'3NA2sejUzEcL7Gg8WfhrcqxP22fHk2SS9pK'
1313
1414 func f (g) = {
1515 let h = getInteger(this, g)
7676
7777 @Callable(j)
7878 func sell_usdn_ticket (s) = {
79+ let t = {
80+ let h = s
81+ if ($isInstanceOf(h, "Int"))
82+ then {
83+ let u = h
84+ u
85+ }
86+ else 0
87+ }
7988 let k = f((("usdn_" + toString(j.originCaller)) + "_credit"))
80- if ((s > k))
89+ if ((t > k))
8190 then throw(("sorry you can't withdraw this amount, because u=you have only " + toString(k)))
8291 else {
83- let m = (k - s)
92+ let m = (k - t)
8493 let n = f("usdn_all_credit")
85- let o = (n - s)
94+ let o = (n - t)
8695 let p = {
8796 let h = lastBlock.height
8897 if ($isInstanceOf(h, "Int"))
92101 }
93102 else throw("Error block number")
94103 }
95- let r = invoke(Address(e), "usdN_cancelStake", [s], nil)
104+ let r = invoke(Address(e), "usdN_cancelStake", [t], nil)
96105 if ((r == r))
97106 then [IntegerEntry((("usdn_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdn_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdn_all_credit", o), IntegerEntry("usdn_all_block", p)]
98107 else throw("Strict value is not equal to itself.")
102111
103112
104113 @Callable(j)
105-func sell_usdc_ticket (s) = {
114+func sell_usdc_ticket (t) = {
106115 let k = f((("usdc_" + toString(j.originCaller)) + "_credit"))
107- if ((s > k))
116+ if ((t > k))
108117 then throw(("sorry you can't withdraw this amount, because u=you have only " + toString(k)))
109118 else {
110- let m = (k - s)
119+ let m = (k - t)
111120 let n = f("usdc_all_credit")
112- let o = (n - s)
121+ let o = (n - t)
113122 let p = {
114123 let h = lastBlock.height
115124 if ($isInstanceOf(h, "Int"))
119128 }
120129 else throw("Error block number")
121130 }
122- let r = invoke(Address(e), "usdC_cancelStake", [s], nil)
131+ let r = invoke(Address(e), "usdC_cancelStake", [t], nil)
123132 if ((r == r))
124133 then [IntegerEntry((("usdc_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdc_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdc_all_credit", o), IntegerEntry("usdc_all_block", p)]
125134 else throw("Strict value is not equal to itself.")
132141 func usdn_calc_profit_amount () = if ((toString(j.originCaller) != c))
133142 then throw("Sorry! you are not allowed to use this funaction")
134143 else {
135- let t = f("usdn_profit_last_block")
136- let u = f("usdn_profit_last_amount")
144+ let v = f("usdn_profit_last_block")
145+ let w = f("usdn_profit_last_amount")
137146 let p = {
138147 let h = lastBlock.height
139148 if ($isInstanceOf(h, "Int"))
143152 }
144153 else throw("Error block number")
145154 }
146- let v = (p - t)
147- if ((d > v))
148- then throw((("Please try again after " + toString((d - v))) + " block"))
155+ let x = (p - v)
156+ if ((d > x))
157+ then throw((("Please try again after " + toString((d - x))) + " block"))
149158 else {
150- let w = assetBalance(this, a)
151-[IntegerEntry("usdn_profit_last_block", p), IntegerEntry("usdn_profit_last_amount", w)]
159+ let y = assetBalance(this, a)
160+[IntegerEntry("usdn_profit_last_block", p), IntegerEntry("usdn_profit_last_amount", y)]
152161 }
153162 }
154163
156165
157166 @Callable(j)
158167 func usdn_send_profit_amount () = {
159- let u = f("usdn_profit_last_amount")
160- if ((0 >= u))
161- then throw(("you dont have profit amount " + toString(u)))
168+ let w = f("usdn_profit_last_amount")
169+ if ((0 >= w))
170+ then throw(("you dont have profit amount " + toString(w)))
162171 else {
163- let x = ScriptTransfer(addressFromStringValue(c), u, a)
164-[x]
172+ let z = ScriptTransfer(addressFromStringValue(c), w, a)
173+[z]
165174 }
166175 }
167176
171180 func usdc_calc_profit_amount () = if ((toString(j.originCaller) != c))
172181 then throw("Sorry! you are not allowed to use this funaction")
173182 else {
174- let y = f("usdc_profit_last_block")
175- let z = f("usdc_profit_last_amount")
183+ let A = f("usdc_profit_last_block")
184+ let B = f("usdc_profit_last_amount")
176185 let p = {
177186 let h = lastBlock.height
178187 if ($isInstanceOf(h, "Int"))
182191 }
183192 else throw("Error block number")
184193 }
185- let v = (p - y)
186- if ((d > v))
187- then throw((("Please try again after " + toString((d - v))) + " block"))
194+ let x = (p - A)
195+ if ((d > x))
196+ then throw((("Please try again after " + toString((d - x))) + " block"))
188197 else {
189- let A = assetBalance(this, b)
190-[IntegerEntry("usdc_profit_last_block", p), IntegerEntry("usdc_profit_last_amount", A)]
198+ let C = assetBalance(this, b)
199+[IntegerEntry("usdc_profit_last_block", p), IntegerEntry("usdc_profit_last_amount", C)]
191200 }
192201 }
193202
195204
196205 @Callable(j)
197206 func usdc_send_profit_amount () = {
198- let z = f("usdc_profit_last_amount")
199- if ((0 >= z))
200- then throw(("you dont have profit amount " + toString(z)))
207+ let B = f("usdc_profit_last_amount")
208+ if ((0 >= B))
209+ then throw(("you dont have profit amount " + toString(B)))
201210 else {
202- let x = ScriptTransfer(addressFromStringValue(c), z, b)
203-[x]
211+ let z = ScriptTransfer(addressFromStringValue(c), B, b)
212+[z]
204213 }
205214 }
206215
207216
208-@Verifier(B)
209-func C () = sigVerify(B.bodyBytes, B.proofs[0], B.senderPublicKey)
217+@Verifier(D)
218+func E () = sigVerify(D.bodyBytes, D.proofs[0], D.senderPublicKey)
210219
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'FVXgJ86erBw5GAMeAw1CnYXwQn48BFAEAhRyHPUjbMQB'
55
66 let b = base58'HRut8ESAGXxwvsKJky1V96qRtqyXQd4Apq4GY7TE5yGP'
77
88 let c = "3N3DCngjidivkJbTJwFTEvbYRTffCWVBLCL"
99
1010 let d = 5
1111
12-let e = base58'3MzwNdM8LQZEPXq3d4uXvxeZGpBwVQXs9RD'
12+let e = base58'3NA2sejUzEcL7Gg8WfhrcqxP22fHk2SS9pK'
1313
1414 func f (g) = {
1515 let h = getInteger(this, g)
1616 if ($isInstanceOf(h, "Int"))
1717 then {
1818 let i = h
1919 i
2020 }
2121 else 0
2222 }
2323
2424
2525 @Callable(j)
2626 func buy_usdn_ticket () = if ((j.payments[0].assetId != a))
2727 then throw("Please deposit USD-N token only")
2828 else {
2929 let k = f((("usdn_" + toString(j.originCaller)) + "_credit"))
3030 let l = j.payments[0].amount
3131 let m = (k + l)
3232 let n = f("usdn_all_credit")
3333 let o = (n + l)
3434 let p = {
3535 let h = lastBlock.height
3636 if ($isInstanceOf(h, "Int"))
3737 then {
3838 let q = h
3939 q
4040 }
4141 else throw("Error! with blochchain height")
4242 }
4343 let r = invoke(Address(e), "usdN_stake", nil, [AttachedPayment(a, l)])
4444 if ((r == r))
4545 then [IntegerEntry((("usdn_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdn_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdn_all_credit", o), IntegerEntry("usdn_all_block", p)]
4646 else throw("Strict value is not equal to itself.")
4747 }
4848
4949
5050
5151 @Callable(j)
5252 func buy_usdc_ticket () = if ((j.payments[0].assetId != b))
5353 then throw("Please deposit USD-N token only")
5454 else {
5555 let k = f((("usdc_" + toString(j.originCaller)) + "_credit"))
5656 let l = j.payments[0].amount
5757 let m = (k + l)
5858 let n = f("usdc_all_credit")
5959 let o = (n + l)
6060 let p = {
6161 let h = lastBlock.height
6262 if ($isInstanceOf(h, "Int"))
6363 then {
6464 let q = h
6565 q
6666 }
6767 else throw("Error block number")
6868 }
6969 let r = invoke(Address(e), "usdC_stake", nil, [AttachedPayment(b, l)])
7070 if ((r == r))
7171 then [IntegerEntry((("usdc_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdc_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdc_all_credit", o), IntegerEntry("usdc_all_block", p)]
7272 else throw("Strict value is not equal to itself.")
7373 }
7474
7575
7676
7777 @Callable(j)
7878 func sell_usdn_ticket (s) = {
79+ let t = {
80+ let h = s
81+ if ($isInstanceOf(h, "Int"))
82+ then {
83+ let u = h
84+ u
85+ }
86+ else 0
87+ }
7988 let k = f((("usdn_" + toString(j.originCaller)) + "_credit"))
80- if ((s > k))
89+ if ((t > k))
8190 then throw(("sorry you can't withdraw this amount, because u=you have only " + toString(k)))
8291 else {
83- let m = (k - s)
92+ let m = (k - t)
8493 let n = f("usdn_all_credit")
85- let o = (n - s)
94+ let o = (n - t)
8695 let p = {
8796 let h = lastBlock.height
8897 if ($isInstanceOf(h, "Int"))
8998 then {
9099 let q = h
91100 q
92101 }
93102 else throw("Error block number")
94103 }
95- let r = invoke(Address(e), "usdN_cancelStake", [s], nil)
104+ let r = invoke(Address(e), "usdN_cancelStake", [t], nil)
96105 if ((r == r))
97106 then [IntegerEntry((("usdn_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdn_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdn_all_credit", o), IntegerEntry("usdn_all_block", p)]
98107 else throw("Strict value is not equal to itself.")
99108 }
100109 }
101110
102111
103112
104113 @Callable(j)
105-func sell_usdc_ticket (s) = {
114+func sell_usdc_ticket (t) = {
106115 let k = f((("usdc_" + toString(j.originCaller)) + "_credit"))
107- if ((s > k))
116+ if ((t > k))
108117 then throw(("sorry you can't withdraw this amount, because u=you have only " + toString(k)))
109118 else {
110- let m = (k - s)
119+ let m = (k - t)
111120 let n = f("usdc_all_credit")
112- let o = (n - s)
121+ let o = (n - t)
113122 let p = {
114123 let h = lastBlock.height
115124 if ($isInstanceOf(h, "Int"))
116125 then {
117126 let q = h
118127 q
119128 }
120129 else throw("Error block number")
121130 }
122- let r = invoke(Address(e), "usdC_cancelStake", [s], nil)
131+ let r = invoke(Address(e), "usdC_cancelStake", [t], nil)
123132 if ((r == r))
124133 then [IntegerEntry((("usdc_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdc_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdc_all_credit", o), IntegerEntry("usdc_all_block", p)]
125134 else throw("Strict value is not equal to itself.")
126135 }
127136 }
128137
129138
130139
131140 @Callable(j)
132141 func usdn_calc_profit_amount () = if ((toString(j.originCaller) != c))
133142 then throw("Sorry! you are not allowed to use this funaction")
134143 else {
135- let t = f("usdn_profit_last_block")
136- let u = f("usdn_profit_last_amount")
144+ let v = f("usdn_profit_last_block")
145+ let w = f("usdn_profit_last_amount")
137146 let p = {
138147 let h = lastBlock.height
139148 if ($isInstanceOf(h, "Int"))
140149 then {
141150 let q = h
142151 q
143152 }
144153 else throw("Error block number")
145154 }
146- let v = (p - t)
147- if ((d > v))
148- then throw((("Please try again after " + toString((d - v))) + " block"))
155+ let x = (p - v)
156+ if ((d > x))
157+ then throw((("Please try again after " + toString((d - x))) + " block"))
149158 else {
150- let w = assetBalance(this, a)
151-[IntegerEntry("usdn_profit_last_block", p), IntegerEntry("usdn_profit_last_amount", w)]
159+ let y = assetBalance(this, a)
160+[IntegerEntry("usdn_profit_last_block", p), IntegerEntry("usdn_profit_last_amount", y)]
152161 }
153162 }
154163
155164
156165
157166 @Callable(j)
158167 func usdn_send_profit_amount () = {
159- let u = f("usdn_profit_last_amount")
160- if ((0 >= u))
161- then throw(("you dont have profit amount " + toString(u)))
168+ let w = f("usdn_profit_last_amount")
169+ if ((0 >= w))
170+ then throw(("you dont have profit amount " + toString(w)))
162171 else {
163- let x = ScriptTransfer(addressFromStringValue(c), u, a)
164-[x]
172+ let z = ScriptTransfer(addressFromStringValue(c), w, a)
173+[z]
165174 }
166175 }
167176
168177
169178
170179 @Callable(j)
171180 func usdc_calc_profit_amount () = if ((toString(j.originCaller) != c))
172181 then throw("Sorry! you are not allowed to use this funaction")
173182 else {
174- let y = f("usdc_profit_last_block")
175- let z = f("usdc_profit_last_amount")
183+ let A = f("usdc_profit_last_block")
184+ let B = f("usdc_profit_last_amount")
176185 let p = {
177186 let h = lastBlock.height
178187 if ($isInstanceOf(h, "Int"))
179188 then {
180189 let q = h
181190 q
182191 }
183192 else throw("Error block number")
184193 }
185- let v = (p - y)
186- if ((d > v))
187- then throw((("Please try again after " + toString((d - v))) + " block"))
194+ let x = (p - A)
195+ if ((d > x))
196+ then throw((("Please try again after " + toString((d - x))) + " block"))
188197 else {
189- let A = assetBalance(this, b)
190-[IntegerEntry("usdc_profit_last_block", p), IntegerEntry("usdc_profit_last_amount", A)]
198+ let C = assetBalance(this, b)
199+[IntegerEntry("usdc_profit_last_block", p), IntegerEntry("usdc_profit_last_amount", C)]
191200 }
192201 }
193202
194203
195204
196205 @Callable(j)
197206 func usdc_send_profit_amount () = {
198- let z = f("usdc_profit_last_amount")
199- if ((0 >= z))
200- then throw(("you dont have profit amount " + toString(z)))
207+ let B = f("usdc_profit_last_amount")
208+ if ((0 >= B))
209+ then throw(("you dont have profit amount " + toString(B)))
201210 else {
202- let x = ScriptTransfer(addressFromStringValue(c), z, b)
203-[x]
211+ let z = ScriptTransfer(addressFromStringValue(c), B, b)
212+[z]
204213 }
205214 }
206215
207216
208-@Verifier(B)
209-func C () = sigVerify(B.bodyBytes, B.proofs[0], B.senderPublicKey)
217+@Verifier(D)
218+func E () = sigVerify(D.bodyBytes, D.proofs[0], D.senderPublicKey)
210219

github/deemru/w8io/169f3d6 
66.82 ms