tx · 53cL4pKtkqFyYGiTQK9XZQmGo1AqMdZJdd2kyfji9HV2

3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq:  -0.01000000 Waves

2023.07.23 01:38 [2677670] smart account 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq > SELF 0.00000000 Waves

{ "type": 13, "id": "53cL4pKtkqFyYGiTQK9XZQmGo1AqMdZJdd2kyfji9HV2", "fee": 1000000, "feeAssetId": null, "timestamp": 1690065622259, "version": 2, "chainId": 84, "sender": "3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq", "senderPublicKey": "ERewvWFUFQfR1eCnipNAv9n7SdQhof2ESP6PGVjTueLd", "proofs": [ "57UxKajr35eUfRvdZvi2Ti8h1hjUMBh5WLbmuppssjrHjxrqmEPMmujgN2CxBC5s2n6ETFmCkyP9veaWQ7NkM7pZ" ], "script": "base64:BgIwCAISBAoCAQgSABIAEgASAwoBARIDCgEBEgMKAQESBAoCCAESABIECgIIARIDCgEIBgADYXJyCQDMCAIAAQkAzAgCAAIJAMwIAgADCQDMCAIABAkAzAgCAAUFA25pbAAEYXJyMgkAzAgCAAEJAMwIAgACBQNuaWwBA3N1bQIBYQFiCQD8BwQJARFAZXh0ck5hdGl2ZSgxMDYyKQECIzNOM0RuVmZmblV5WnR6Mk1SYms1VTdnaU4xMTJXZW1wTU5kAgZib3Jyb3cJAMwIAgIsMjVGRXFFalJrcUs2eUNraVQ3THo2U0FZejdnVUZDdHhmQ0NobnJWRkQ1QVQJAMwIAgDAhD0FA25pbAUDbmlsAQpnZXRCYWxhbmNlAgphc3NldElkU3RyB2FkZHJlc3MDCQAAAgUKYXNzZXRJZFN0cgIFV0FWRVMICQDvBwEFB2FkZHJlc3MJYXZhaWxhYmxlCQDwBwIFB2FkZHJlc3MJANkEAQUKYXNzZXRJZFN0cgEPZ2V0Q3VycmVudFByaWNlAQphc3NldElkU3RyAwkAAAIFCmFzc2V0SWRTdHICBVdBVkVTAAIJAAIBAgVFcnJ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W1wTU5kAgh3aXRoZHJhdwkAzAgCBQphc3NldElkU3RyCQDMCAIFC2Fzc2V0QW1vdW50BQNuaWwFA25pbAMJAAACBQNyZXMFA3JlcwkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICCQCsAgIFB2FkZHJlc3MCCl93aXRoZHJld18FCmFzc2V0SWRTdHIFC2Fzc2V0QW1vdW50BQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BaQEMY2hlY2tCYWxhbmNlAQphc3NldElkU3RyBAdhZGRyZXNzCAUBaQZjYWxsZXIDCQAAAgUKYXNzZXRJZFN0cgIFV0FWRVMJAMwIAgkBDEludGVnZXJFbnRyeQICDVdhdmVzIEJhbGFuY2UICQDvBwEFB2FkZHJlc3MJYXZhaWxhYmxlBQNuaWwJAMwIAgkBDEludGVnZXJFbnRyeQICDUFzc2V0IEJhbGFuY2UJAPAHAgUHYWRkcmVzcwkA2QQBBQphc3NldElkU3RyBQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5UWfKlg==", "height": 2677670, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6CqhigeMh2Q6o3TVvdUPscBzA7WQWHJaspy2j9nq7wMr Next: Ek1EsNBSA4uajrc2CEbfy547voZmvqDfaAPHomMc3kfN Diff:
OldNewDifferences
2929
3030
3131 @Callable(i)
32-func issue3xLong () = $Tuple2([Issue("WAVES3L", "WAVES_USDN_LONG3X Token", 100000, 2, true)], unit)
32+func issue3xLong () = $Tuple2([Issue("WAVES3L", "WAVES_USDN_LONG3X Token", 8, 6, true)], unit)
3333
3434
3535
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let arr = [1, 2, 3, 4, 5]
55
66 let arr2 = [1, 2]
77
88 func sum (a,b) = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", 1000000], nil)
99
1010
1111 func getBalance (assetIdStr,address) = if ((assetIdStr == "WAVES"))
1212 then wavesBalance(address).available
1313 else assetBalance(address, fromBase58String(assetIdStr))
1414
1515
1616 func getCurrentPrice (assetIdStr) = if ((assetIdStr == "WAVES"))
1717 then 2
1818 else throw("Error")
1919
2020
2121 func transferWavesTestInternal (assetIdStr,assetAmount,address) = [IntegerEntry(((address + "_deposited_") + assetIdStr), assetAmount)]
2222
2323
2424 @Callable(i)
2525 func transferWaves (assetAmount,senderAddress) = if ((i.caller != this))
2626 then throw("only for internal smart contract invocations")
2727 else [ScriptTransfer(this, assetAmount, unit), IntegerEntry((senderAddress + "_deposited_WAVES"), assetAmount)]
2828
2929
3030
3131 @Callable(i)
32-func issue3xLong () = $Tuple2([Issue("WAVES3L", "WAVES_USDN_LONG3X Token", 100000, 2, true)], unit)
32+func issue3xLong () = $Tuple2([Issue("WAVES3L", "WAVES_USDN_LONG3X Token", 8, 6, true)], unit)
3333
3434
3535
3636 @Callable(i)
3737 func transferWavesTest () = if (if ((size(i.payments) != 1))
3838 then true
3939 else (i.payments[0].amount == 0))
4040 then throw("1 payment has to be attached")
4141 else {
4242 let assetIdStr = "WAVES"
4343 let assetAmount = i.payments[0].amount
4444 transferWavesTestInternal(assetIdStr, assetAmount, toString(i.caller))
4545 }
4646
4747
4848
4949 @Callable(i)
5050 func long2x_v2 () = if (if ((size(i.payments) != 1))
5151 then true
5252 else (i.payments[0].amount == 0))
5353 then throw("1 payment has to be attached")
5454 else {
5555 let address = toString(i.caller)
5656 let assetIdStr = "WAVES"
5757 let wavesAmount = i.payments[0].amount
5858 let currentWavesAmount = getBalance(assetIdStr, i.caller)
5959 if ((currentWavesAmount > wavesAmount))
6060 then {
6161 let depositResult = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, wavesAmount)])
6262 if ((depositResult == depositResult))
6363 then {
6464 func repeatFunc (accum,next) = {
6565 let borrowResult = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", ((wavesAmount * getCurrentPrice("WAVES")) / 100)], nil)
6666 if ((borrowResult == borrowResult))
6767 then (accum + next)
6868 else throw("Strict value is not equal to itself.")
6969 }
7070
7171 let array = [wavesAmount, wavesAmount]
7272 let res = {
7373 let $l = array
7474 let $s = size($l)
7575 let $acc0 = 0
7676 func $f0_1 ($a,$i) = if (($i >= $s))
7777 then $a
7878 else repeatFunc($a, $l[$i])
7979
8080 func $f0_2 ($a,$i) = if (($i >= $s))
8181 then $a
8282 else throw("List size exceeds 2")
8383
8484 $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
8585 }
8686 [IntegerEntry((address + "_deposited_WAVES"), wavesAmount), IntegerEntry(((address + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), (wavesAmount * getCurrentPrice("WAVES"))), ScriptTransfer(i.caller, ((res * getCurrentPrice("WAVES")) / 100), base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')]
8787 }
8888 else throw("Strict value is not equal to itself.")
8989 }
9090 else throw("Not enough WAVES to deposit!")
9191 }
9292
9393
9494
9595 @Callable(i)
9696 func long2x (assetAmount) = {
9797 let address = toString(i.caller)
9898 let currentAmount = getBalance("WAVES", i.caller)
9999 if ((currentAmount > assetAmount))
100100 then {
101101 func repeatFunc (accum,next) = {
102102 let transferResult = invoke(this, "transferWaves", [assetAmount, i.caller], nil)
103103 if ((transferResult == transferResult))
104104 then {
105105 let supplyResult = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, assetAmount)])
106106 if ((supplyResult == supplyResult))
107107 then {
108108 let borrowResult = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", ((assetAmount * getCurrentPrice("WAVES")) / 100)], nil)
109109 if ((borrowResult == borrowResult))
110110 then (accum + next)
111111 else throw("Strict value is not equal to itself.")
112112 }
113113 else throw("Strict value is not equal to itself.")
114114 }
115115 else throw("Strict value is not equal to itself.")
116116 }
117117
118118 let array = [assetAmount, assetAmount]
119119 let res = {
120120 let $l = array
121121 let $s = size($l)
122122 let $acc0 = 0
123123 func $f0_1 ($a,$i) = if (($i >= $s))
124124 then $a
125125 else repeatFunc($a, $l[$i])
126126
127127 func $f0_2 ($a,$i) = if (($i >= $s))
128128 then $a
129129 else throw("List size exceeds 2")
130130
131131 $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
132132 }
133133 [IntegerEntry(((address + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), (assetAmount * getCurrentPrice("WAVES"))), ScriptTransfer(i.caller, ((res * getCurrentPrice("WAVES")) / 100), base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'), ScriptTransfer(this, res, unit)]
134134 }
135135 else throw("Error!")
136136 }
137137
138138
139139
140140 @Callable(i)
141141 func borrow (assetAmount) = {
142142 let address = toString(i.caller)
143143 let res = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", assetAmount], nil)
144144 if ((res == res))
145145 then [ScriptTransfer(i.caller, assetAmount, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'), IntegerEntry(((address + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), assetAmount)]
146146 else throw("Strict value is not equal to itself.")
147147 }
148148
149149
150150
151151 @Callable(i)
152152 func borrow2 (assetAmount) = {
153153 let address = toString(i.caller)
154154 func repeatFunc (accum,next) = {
155155 let result = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", assetAmount], nil)
156156 if ((result == result))
157157 then (accum + next)
158158 else throw("Strict value is not equal to itself.")
159159 }
160160
161161 let array = [assetAmount, assetAmount]
162162 let res = {
163163 let $l = array
164164 let $s = size($l)
165165 let $acc0 = 0
166166 func $f0_1 ($a,$i) = if (($i >= $s))
167167 then $a
168168 else repeatFunc($a, $l[$i])
169169
170170 func $f0_2 ($a,$i) = if (($i >= $s))
171171 then $a
172172 else throw("List size exceeds 2")
173173
174174 $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
175175 }
176176 [IntegerEntry(((address + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), assetAmount), ScriptTransfer(i.caller, res, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')]
177177 }
178178
179179
180180
181181 @Callable(i)
182182 func borrow5 (assetIdStr,assetAmount) = {
183183 let address = toString(i.caller)
184184 let res = {
185185 let $l = arr
186186 let $s = size($l)
187187 let $acc0 = 0
188188 func $f0_1 ($a,$i) = if (($i >= $s))
189189 then $a
190190 else sum($a, $l[$i])
191191
192192 func $f0_2 ($a,$i) = if (($i >= $s))
193193 then $a
194194 else throw("List size exceeds 5")
195195
196196 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
197197 }
198198 if ((res == res))
199199 then [IntegerEntry(((address + "_borrowed_") + assetIdStr), assetAmount)]
200200 else throw("Strict value is not equal to itself.")
201201 }
202202
203203
204204
205205 @Callable(i)
206206 func deposit () = {
207207 let address = toString(i.caller)
208208 let res = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, 1000000)])
209209 if ((res == res))
210210 then [IntegerEntry((address + "supply_waves"), 1000000)]
211211 else throw("Strict value is not equal to itself.")
212212 }
213213
214214
215215
216216 @Callable(i)
217217 func withdraw (assetIdStr,assetAmount) = {
218218 let address = toString(i.caller)
219219 let res = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "withdraw", [assetIdStr, assetAmount], nil)
220220 if ((res == res))
221221 then [IntegerEntry(((address + "_withdrew_") + assetIdStr), assetAmount)]
222222 else throw("Strict value is not equal to itself.")
223223 }
224224
225225
226226
227227 @Callable(i)
228228 func checkBalance (assetIdStr) = {
229229 let address = i.caller
230230 if ((assetIdStr == "WAVES"))
231231 then [IntegerEntry("Waves Balance", wavesBalance(address).available)]
232232 else [IntegerEntry("Asset Balance", assetBalance(address, fromBase58String(assetIdStr)))]
233233 }
234234
235235
236236 @Verifier(tx)
237237 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
238238

github/deemru/w8io/026f985 
41.30 ms