tx · FxBJBzLztZC78R4ph8cB9ezFA4Xic3vA5K87HjQLk3YL

3NA2sejUzEcL7Gg8WfhrcqxP22fHk2SS9pK:  -0.00600000 Waves

2022.08.26 15:08 [2201428] smart account 3NA2sejUzEcL7Gg8WfhrcqxP22fHk2SS9pK > SELF 0.00000000 Waves

{ "type": 13, "id": "FxBJBzLztZC78R4ph8cB9ezFA4Xic3vA5K87HjQLk3YL", "fee": 600000, "feeAssetId": null, "timestamp": 1661515738389, "version": 2, "chainId": 84, "sender": "3NA2sejUzEcL7Gg8WfhrcqxP22fHk2SS9pK", "senderPublicKey": "HMzDczZUThMMhE2Grm1ZmpN3QNZ9N7CUCYnsqh4utSDJ", "proofs": [ "5xKagVyd9mMV356XpMknujMnYfyJdcFbEJSSW4j2884caFyq3DTu6Kcq2wH6iWKapXEHNKWYjhYM5KNaLzSvHiYB" ], "script": "base64:BgIYCAISABIAEgMKAQESAwoBARIAEgASABIABgAEdXNkbgEg11KRGPRfT6VehNuJvBkobHB7OMalzc+gLp7N2ofv42AABHVzZGMBIPQcuTcYg4l4Uh6IaJaLWyiuNgmUbeQfgPZEel3eCXgMAAxhZG1pbl93YWxsZXQCIzNOM0RDbmdqaWRpdmtKYlRKd0ZURXZiWVJUZmZDV1ZCTENMAA5hbGZhcmtfdGVzdG5ldAAFAAp2aXJlc19kYXBwARoBVHjn3floRCovnhXY1SHCQGibEg7rsYrFrAENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAgBaQEPYnV5X3VzZG5fdGlja2V0AAMJAQIhPQIICQCRAwIIBQFpCHBheW1lbnRzAAAHYXNzZXRJZAUEdXNkbgkAAgECH1BsZWFzZSBkZXBvc2l0IFVTRC1OIHRva2VuIG9ubHkEC3VzZXJfY3JlZGl0CQENdHJ5R2V0SW50ZWdlcgEJAKwCAgkArAICAgV1c2RuXwkApQgBCA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mMeBuBuUCy2ciiVWdKCpovLY4qFi3SgA2tPED8HY Next: iWLVPQWyFaYUPegheSmYoPdXngZFBtqYCrgvB5eVfEA 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 = 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) = {
7979 let k = f((("usdn_" + toString(j.originCaller)) + "_credit"))
8080 if ((s > k))
8181 then throw(("sorry you can't withdraw this amount, because u=you have only " + toString(k)))
8282 else {
8383 let m = (k - s)
8484 let n = f("usdn_all_credit")
8585 let o = (n - s)
8686 let p = {
8787 let h = lastBlock.height
8888 if ($isInstanceOf(h, "Int"))
8989 then {
9090 let q = h
9191 q
9292 }
9393 else throw("Error block number")
9494 }
9595 let r = invoke(Address(e), "usdN_cancelStake", [s], nil)
9696 if ((r == r))
9797 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)]
9898 else throw("Strict value is not equal to itself.")
9999 }
100100 }
101101
102102
103103
104104 @Callable(j)
105105 func sell_usdc_ticket (s) = {
106106 let k = f((("usdc_" + toString(j.originCaller)) + "_credit"))
107107 if ((s > k))
108108 then throw(("sorry you can't withdraw this amount, because u=you have only " + toString(k)))
109109 else {
110110 let m = (k - s)
111111 let n = f("usdc_all_credit")
112112 let o = (n - s)
113113 let p = {
114114 let h = lastBlock.height
115115 if ($isInstanceOf(h, "Int"))
116116 then {
117117 let q = h
118118 q
119119 }
120120 else throw("Error block number")
121121 }
122122 let r = invoke(Address(e), "usdC_cancelStake", [s], nil)
123123 if ((r == r))
124124 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)]
125125 else throw("Strict value is not equal to itself.")
126126 }
127127 }
128128
129129
130130
131131 @Callable(j)
132132 func usdn_calc_profit_amount () = if ((toString(j.originCaller) != c))
133133 then throw("Sorry! you are not allowed to use this funaction")
134134 else {
135135 let t = f("usdn_profit_last_block")
136136 let u = f("usdn_profit_last_amount")
137137 let p = {
138138 let h = lastBlock.height
139139 if ($isInstanceOf(h, "Int"))
140140 then {
141141 let q = h
142142 q
143143 }
144144 else throw("Error block number")
145145 }
146146 let v = (p - t)
147147 if ((d > v))
148148 then throw((("Please try again after " + toString((d - v))) + " block"))
149149 else {
150150 let w = assetBalance(this, a)
151151 [IntegerEntry("usdn_profit_last_block", p), IntegerEntry("usdn_profit_last_amount", w)]
152152 }
153153 }
154154
155155
156156
157157 @Callable(j)
158158 func usdn_send_profit_amount () = {
159159 let u = f("usdn_profit_last_amount")
160160 if ((0 >= u))
161161 then throw(("you dont have profit amount " + toString(u)))
162162 else {
163163 let x = ScriptTransfer(addressFromStringValue(c), u, a)
164164 [x]
165165 }
166166 }
167167
168168
169169
170170 @Callable(j)
171171 func usdc_calc_profit_amount () = if ((toString(j.originCaller) != c))
172172 then throw("Sorry! you are not allowed to use this funaction")
173173 else {
174174 let y = f("usdc_profit_last_block")
175175 let z = f("usdc_profit_last_amount")
176176 let p = {
177177 let h = lastBlock.height
178178 if ($isInstanceOf(h, "Int"))
179179 then {
180180 let q = h
181181 q
182182 }
183183 else throw("Error block number")
184184 }
185185 let v = (p - y)
186186 if ((d > v))
187187 then throw((("Please try again after " + toString((d - v))) + " block"))
188188 else {
189189 let A = assetBalance(this, b)
190190 [IntegerEntry("usdc_profit_last_block", p), IntegerEntry("usdc_profit_last_amount", A)]
191191 }
192192 }
193193
194194
195195
196196 @Callable(j)
197197 func usdc_send_profit_amount () = {
198198 let z = f("usdc_profit_last_amount")
199199 if ((0 >= z))
200200 then throw(("you dont have profit amount " + toString(z)))
201201 else {
202202 let x = ScriptTransfer(addressFromStringValue(c), z, b)
203203 [x]
204204 }
205205 }
206206
207207
208208 @Verifier(B)
209209 func C () = sigVerify(B.bodyBytes, B.proofs[0], B.senderPublicKey)
210210

github/deemru/w8io/026f985 
55.07 ms