tx · CLwUypmgs1t7qB6TEtGf7HrkDsNmbYhrM37ArPdc6JmU

3NA2sejUzEcL7Gg8WfhrcqxP22fHk2SS9pK:  -0.00700000 Waves

2022.08.25 08:21 [2199573] smart account 3NA2sejUzEcL7Gg8WfhrcqxP22fHk2SS9pK > SELF 0.00000000 Waves

{ "type": 13, "id": "CLwUypmgs1t7qB6TEtGf7HrkDsNmbYhrM37ArPdc6JmU", "fee": 700000, "feeAssetId": null, "timestamp": 1661404911879, "version": 2, "chainId": 84, "sender": "3NA2sejUzEcL7Gg8WfhrcqxP22fHk2SS9pK", "senderPublicKey": "HMzDczZUThMMhE2Grm1ZmpN3QNZ9N7CUCYnsqh4utSDJ", "proofs": [ "42WgneNsAPQRiC1BnC1M2CNGipEfCY8BCUbeTM84EWyjisMcscPzDJCd4DYvZnLbR8kt5EKz8GevGCg4erjEuPut" ], "script": "base64:BgIYCAISABIAEgMKAQESAwoBARIAEgASABIABgAEdXNkbgEg11KRGPRfT6VehNuJvBkobHB7OMalzc+gLp7N2ofv42AABHVzZGMBIPQcuTcYg4l4Uh6IaJaLWyiuNgmUbeQfgPZEel3eCXgMAAxhZG1pbl93YWxsZXQCIzNOM0RDbmdqaWRpdmtKYlRKd0ZURXZiWVJUZmZDV1ZCTENMAA5hbGZhcmtfdGVzdG5ldAAFAAp2aXJlc19kYXBwARoBVHjn3floRCovnhXY1SHCQGibEg7rsYrFrAENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAgBaQEPYnV5X3VzZG5fdGlja2V0AAMJAQIhPQIICQCRAwIIBQFpCHBheW1lbnRzAAAHYXNzZXRJZAUEdXNkbgkAAgECH1BsZWFzZSBkZXBvc2l0IFVTRC1OIHRva2VuIG9ubHkEC3VzZXJfY3JlZGl0CQENdHJ5R2V0SW50ZWdlcgEJAKwCAgkArAICAgV1c2RuXwkApQgBC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BDEludGVnZXJFbnRyeQICF3VzZGNfcHJvZml0X2xhc3RfYW1vdW50BQx1c2RjX2JhbGFuY2UFA25pbAFpARd1c2RjX3NlbmRfcHJvZml0X2Ftb3VudAAEF3VzZGNfcHJvZml0X2xhc3RfYW1vdW50CQENdHJ5R2V0SW50ZWdlcgECF3VzZGNfcHJvZml0X2xhc3RfYW1vdW50AwkAZwIAAAUXdXNkY19wcm9maXRfbGFzdF9hbW91bnQJAAIBCQCsAgICHHlvdSBkb250IGhhdmUgcHJvZml0IGFtb3VudCAJAKQDAQUXdXNkY19wcm9maXRfbGFzdF9hbW91bnQECHRyYW5zZmVyCQEOU2NyaXB0VHJhbnNmZXIDCQERQGV4dHJOYXRpdmUoMTA2MikBBQxhZG1pbl93YWxsZXQFF3VzZGNfcHJvZml0X2xhc3RfYW1vdW50BQR1c2RjCQDMCAIFCHRyYW5zZmVyBQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5GM16fg==", "height": 2199573, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FagAsUqFfw2FygWTrt5nQr88Rx9UmQkqf1uC4UQhJUtA Next: GzsGmeLhBaZFsc53yUGCMrTTSHoVjJYByk3e7Uo8THAo Diff:
OldNewDifferences
4242 }
4343 let r = invoke(Address(e), "usdN_stake", nil, [AttachedPayment(a, l)])
4444 if ((r == r))
45- then {
46- let s = {
47- let h = r
48- if ($isInstanceOf(h, "List[Any]"))
49- then {
50- let t = h
51- t
52- }
53- else throw("Incorrect invoke result")
54- }
55- if ((s == s))
56- 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)]
57- else throw("Strict value is not equal to itself.")
58- }
45+ 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)]
5946 else throw("Strict value is not equal to itself.")
6047 }
6148
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
1212 let e = base58'3MzwNdM8LQZEPXq3d4uXvxeZGpBwVQXs9RD'
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 = transactionHeightById(j.transactionId)
3636 if ($isInstanceOf(h, "Int"))
3737 then {
3838 let q = h
3939 q
4040 }
4141 else throw("Error block number")
4242 }
4343 let r = invoke(Address(e), "usdN_stake", nil, [AttachedPayment(a, l)])
4444 if ((r == r))
45- then {
46- let s = {
47- let h = r
48- if ($isInstanceOf(h, "List[Any]"))
49- then {
50- let t = h
51- t
52- }
53- else throw("Incorrect invoke result")
54- }
55- if ((s == s))
56- 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)]
57- else throw("Strict value is not equal to itself.")
58- }
45+ 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)]
5946 else throw("Strict value is not equal to itself.")
6047 }
6148
6249
6350
6451 @Callable(j)
6552 func buy_usdc_ticket () = if ((j.payments[0].assetId != b))
6653 then throw("Please deposit USD-N token only")
6754 else {
6855 let k = f((("usdc_" + toString(j.originCaller)) + "_credit"))
6956 let l = j.payments[0].amount
7057 let m = (k + l)
7158 let n = f("usdc_all_credit")
7259 let o = (n + l)
7360 let p = {
7461 let h = transactionHeightById(j.transactionId)
7562 if ($isInstanceOf(h, "Int"))
7663 then {
7764 let q = h
7865 q
7966 }
8067 else throw("Error block number")
8168 }
8269 let r = invoke(Address(e), "usdC_stake", nil, [AttachedPayment(b, l)])
8370 if ((r == r))
8471 then {
8572 let s = {
8673 let h = r
8774 if ($isInstanceOf(h, "List[Any]"))
8875 then {
8976 let t = h
9077 t
9178 }
9279 else throw("Incorrect invoke result")
9380 }
9481 if ((s == s))
9582 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)]
9683 else throw("Strict value is not equal to itself.")
9784 }
9885 else throw("Strict value is not equal to itself.")
9986 }
10087
10188
10289
10390 @Callable(j)
10491 func sell_usdn_ticket (u) = {
10592 let k = f((("usdn_" + toString(j.originCaller)) + "_credit"))
10693 if ((u > k))
10794 then throw(("sorry you can't withdraw this amount, because u=you have only " + toString(k)))
10895 else {
10996 let m = (k - u)
11097 let n = f("usdn_all_credit")
11198 let o = (n - u)
11299 let p = {
113100 let h = transactionHeightById(j.transactionId)
114101 if ($isInstanceOf(h, "Int"))
115102 then {
116103 let q = h
117104 q
118105 }
119106 else throw("Error block number")
120107 }
121108 let r = invoke(Address(e), "usdN_cancelStake", [u], nil)
122109 if ((r == r))
123110 then {
124111 let s = {
125112 let h = r
126113 if ($isInstanceOf(h, "List[Any]"))
127114 then {
128115 let t = h
129116 t
130117 }
131118 else throw("Incorrect invoke result")
132119 }
133120 if ((s == s))
134121 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)]
135122 else throw("Strict value is not equal to itself.")
136123 }
137124 else throw("Strict value is not equal to itself.")
138125 }
139126 }
140127
141128
142129
143130 @Callable(j)
144131 func sell_usdc_ticket (u) = {
145132 let k = f((("usdc_" + toString(j.originCaller)) + "_credit"))
146133 if ((u > k))
147134 then throw(("sorry you can't withdraw this amount, because u=you have only " + toString(k)))
148135 else {
149136 let m = (k - u)
150137 let n = f("usdc_all_credit")
151138 let o = (n - u)
152139 let p = {
153140 let h = transactionHeightById(j.transactionId)
154141 if ($isInstanceOf(h, "Int"))
155142 then {
156143 let q = h
157144 q
158145 }
159146 else throw("Error block number")
160147 }
161148 let r = invoke(Address(e), "usdC_cancelStake", [u], nil)
162149 if ((r == r))
163150 then {
164151 let s = {
165152 let h = r
166153 if ($isInstanceOf(h, "List[Any]"))
167154 then {
168155 let t = h
169156 t
170157 }
171158 else throw("Incorrect invoke result")
172159 }
173160 if ((s == s))
174161 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)]
175162 else throw("Strict value is not equal to itself.")
176163 }
177164 else throw("Strict value is not equal to itself.")
178165 }
179166 }
180167
181168
182169
183170 @Callable(j)
184171 func usdn_calc_profit_amount () = if ((toString(j.originCaller) != c))
185172 then throw("Sorry! you are not allowed to use this funaction")
186173 else {
187174 let v = f("usdn_profit_last_block")
188175 let w = f("usdn_profit_last_amount")
189176 let p = {
190177 let h = transactionHeightById(j.transactionId)
191178 if ($isInstanceOf(h, "Int"))
192179 then {
193180 let q = h
194181 q
195182 }
196183 else throw("Error block number")
197184 }
198185 let x = (p - v)
199186 if ((d > x))
200187 then throw((("Please try again after " + toString((d - x))) + " block"))
201188 else {
202189 let y = assetBalance(this, a)
203190 [IntegerEntry("usdn_profit_last_block", p), IntegerEntry("usdn_profit_last_amount", y)]
204191 }
205192 }
206193
207194
208195
209196 @Callable(j)
210197 func usdn_send_profit_amount () = {
211198 let w = f("usdn_profit_last_amount")
212199 if ((0 >= w))
213200 then throw(("you dont have profit amount " + toString(w)))
214201 else {
215202 let z = ScriptTransfer(addressFromStringValue(c), w, a)
216203 [z]
217204 }
218205 }
219206
220207
221208
222209 @Callable(j)
223210 func usdc_calc_profit_amount () = if ((toString(j.originCaller) != c))
224211 then throw("Sorry! you are not allowed to use this funaction")
225212 else {
226213 let A = f("usdc_profit_last_block")
227214 let B = f("usdc_profit_last_amount")
228215 let p = {
229216 let h = transactionHeightById(j.transactionId)
230217 if ($isInstanceOf(h, "Int"))
231218 then {
232219 let q = h
233220 q
234221 }
235222 else throw("Error block number")
236223 }
237224 let x = (p - A)
238225 if ((d > x))
239226 then throw((("Please try again after " + toString((d - x))) + " block"))
240227 else {
241228 let C = assetBalance(this, b)
242229 [IntegerEntry("usdc_profit_last_block", p), IntegerEntry("usdc_profit_last_amount", C)]
243230 }
244231 }
245232
246233
247234
248235 @Callable(j)
249236 func usdc_send_profit_amount () = {
250237 let B = f("usdc_profit_last_amount")
251238 if ((0 >= B))
252239 then throw(("you dont have profit amount " + toString(B)))
253240 else {
254241 let z = ScriptTransfer(addressFromStringValue(c), B, b)
255242 [z]
256243 }
257244 }
258245
259246
260247 @Verifier(D)
261248 func E () = sigVerify(D.bodyBytes, D.proofs[0], D.senderPublicKey)
262249

github/deemru/w8io/026f985 
30.86 ms