tx · DURn9sV47qsxFEYToQ83YEbPCQBr5W2bzF3QYKwUYSLn

3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq:  -0.01000000 Waves

2023.07.23 01:53 [2677685] smart account 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq > SELF 0.00000000 Waves

{ "type": 13, "id": "DURn9sV47qsxFEYToQ83YEbPCQBr5W2bzF3QYKwUYSLn", "fee": 1000000, "feeAssetId": null, "timestamp": 1690066416014, "version": 2, "chainId": 84, "sender": "3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq", "senderPublicKey": "ERewvWFUFQfR1eCnipNAv9n7SdQhof2ESP6PGVjTueLd", "proofs": [ "4Xso6CghfojqdBeWi2aDi1Ua9BNMjqD9Tw92DBQRR2MKLwkuKoLJCb6br8poi3PsQVcKorAiezWraeejM1LtKKPh" ], "script": "base64:BgIwCAISBAoCAQgSABIAEgASAwoBARIDCgEBEgMKAQESBAoCCAESABIECgIIARIDCgEIBgADYXJyCQDMCAIAAQkAzAgCAAIJAMwIAgADCQDMCAIABAkAzAgCAAUFA25pbAAEYXJyMgkAzAgCAAEJAMwIAgACBQNuaWwBA3N1bQIBYQFiCQD8BwQJARFAZXh0ck5hdGl2ZSgxMDYyKQECIzNOM0RuVmZmblV5WnR6Mk1SYms1VTdnaU4xMTJXZW1wTU5kAgZib3Jyb3cJAMwIAgIsMjVGRXFFalJrcUs2eUNraVQ3THo2U0FZejdnVUZDdHhmQ0NobnJWRkQ1QVQJAMwIAgDAhD0FA25pbAUDbmlsAQpnZXRCYWxhbmNlAgphc3NldElkU3RyB2FkZHJlc3MDCQAAAgUKYXNzZXRJZFN0cgIFV0FWRVMICQDvBwEFB2FkZHJlc3MJYXZhaWxhYmxlCQDwBwIFB2FkZHJlc3MJANkEAQUKYXNzZXRJZFN0cgEPZ2V0Q3VycmVudFByaWNlAQphc3NldElkU3RyAwkAAAIFCmFzc2V0SWRTdHICBVdBVkVTAAIJAAIBAgVFcnJvcgEZd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gUKYXNzZXRJZFN0cgkAzAgCBQthc3NldEFtb3VudAUDbmlsBQNuaWwDCQAAAgUDcmVzBQNyZXMJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgkArAICBQdhZGRyZXNzAgpfd2l0aGRyZXdfBQphc3NldElkU3RyBQthc3NldEFtb3VudAUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAWkBDGNoZWNrQmFsYW5jZQEKYXNzZXRJZFN0cgQHYWRkcmVzcwgFAWkGY2FsbGVyAwkAAAIFCmFzc2V0SWRTdHICBVdBVkVTCQDMCAIJAQxJbnRlZ2VyRW50cnkCAg1XYXZlcyBCYWxhbmNlCAkA7wcBBQdhZGRyZXNzCWF2YWlsYWJsZQUDbmlsCQDMCAIJAQxJbnRlZ2VyRW50cnkCAg1Bc3NldCBCYWxhbmNlCQDwBwIFB2FkZHJlc3MJANkEAQUKYXNzZXRJZFN0cgUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleS1NI8M=", "height": 2677685, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HtPmNnLpdeD5zt9bdAvAtTXqDp1sxNSguxp2hAmH6g1u Next: HtDBzMYxdiwYJcRwU5yyencsjz37PGkukaWddjgAZKjM Diff:
OldNewDifferences
2929
3030
3131 @Callable(i)
32-func issue3xLong () = $Tuple2([Issue("WAVES3L", "WAVES_USDN_LONG3X Token", 680000000000, 8, true)], unit)
32+func issue3xLong () = $Tuple2([Issue("WAVES3L", "WAVES_USDN_LONG3X Token", 10000000000, 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", 680000000000, 8, true)], unit)
32+func issue3xLong () = $Tuple2([Issue("WAVES3L", "WAVES_USDN_LONG3X Token", 10000000000, 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/169f3d6 
36.33 ms