tx · BLkAVQsubnWRZRfXW2ye8WAzFx7G25tMjhJ2mP36hT2T

3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq:  -0.01000000 Waves

2023.06.27 11:38 [2640829] smart account 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq > SELF 0.00000000 Waves

{ "type": 13, "id": "BLkAVQsubnWRZRfXW2ye8WAzFx7G25tMjhJ2mP36hT2T", "fee": 1000000, "feeAssetId": null, "timestamp": 1687855140617, "version": 2, "chainId": 84, "sender": "3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq", "senderPublicKey": "ERewvWFUFQfR1eCnipNAv9n7SdQhof2ESP6PGVjTueLd", "proofs": [ "3EvM474UWWdc7FLzi9UaH5hpXoTgXPmyGmgcB7e2KM5ozp3wTuPAtMXd3HYHzcf8aLHNfexFr3jVwvV7nZm3ZKJB" ], "script": "base64:BgIvCAISBAoCAQgSAwoBARIDCgEBEgMKAQESAwoBARIECgIIARIAEgQKAggBEgMKAQgFAANhcnIJAMwIAgABCQDMCAIAAgkAzAgCAAMJAMwIAgAECQDMCAIABQUDbmlsAARhcnIyCQDMCAIAAQkAzAgCAAIFA25pbAEDc3VtAgFhAWIJAPwHBAkBEUBleHRyTmF0aXZlKDEwNjIpAQIjM04zRG5WZmZuVXladHoyTVJiazVVN2dpTjExMldlbXBNTmQCBmJvcnJvdwkAzAgCAiwyNUZFcUVqUmtxSzZ5Q2tpVDdMejZTQVl6N2dVRkN0eGZDQ2huclZGRDVBVAkAzAgCAMCEPQUDbmlsBQNuaWwBD2dldEN1cnJlbnRQcmljZQEKYXNzZXRJZFN0cgMJAAACBQphc3NldElkU3RyAgVXQVZFUwACCQACAQIFRXJyb3IBCmdldEJhbGFuY2UCCmFzc2V0SWRTdHIHYWRkcmVzcwMJAAACBQphc3NldElkU3RyAgVXQVZFUwgJAO8HAQUHYWRkcmVzcwlhdmFpbGFibGUJAPAHAgUHYWRkcmVzcwkA2QQBBQphc3NldElkU3RyCQFpAQ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FN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgFpAQxjaGVja0JhbGFuY2UBCmFzc2V0SWRTdHIEB2FkZHJlc3MIBQFpBmNhbGxlcgMJAAACBQphc3NldElkU3RyAgVXQVZFUwkAzAgCCQEMSW50ZWdlckVudHJ5AgINV2F2ZXMgQmFsYW5jZQgJAO8HAQUHYWRkcmVzcwlhdmFpbGFibGUFA25pbAkAzAgCCQEMSW50ZWdlckVudHJ5AgINQXNzZXQgQmFsYW5jZQkA8AcCBQdhZGRyZXNzCQDZBAEFCmFzc2V0SWRTdHIFA25pbAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXnMVUXO", "height": 2640829, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4yjhaehSSSKwF8CpjdkAqrXRmRPShNM4x8JLWvx3iatG Next: 8Yczqqw7q5deLZPnJocZeBizCQitX3d5MuL1z15hBLXR Diff:
OldNewDifferences
1919
2020
2121 @Callable(i)
22-func transferToken (assetAmount,recipientAddress) = if ((i.caller != this))
22+func transferWaves (assetAmount,senderAddress) = if ((i.caller != this))
2323 then throw("only for internal smart contract invocations")
24- else [ScriptTransfer(this, assetAmount, unit), IntegerEntry((recipientAddress + "_deposited_WAVES"), assetAmount)]
24+ else [ScriptTransfer(this, assetAmount, unit), IntegerEntry((senderAddress + "_deposited_WAVES"), assetAmount)]
25+
26+
27+
28+@Callable(i)
29+func transferWavesTest (assetAmount) = [ScriptTransfer(this, assetAmount, unit), IntegerEntry((toString(i.caller) + "_deposited_WAVES"), assetAmount)]
2530
2631
2732
3237 if ((currentAmount > assetAmount))
3338 then {
3439 func repeatFunc (accum,next) = {
35- let transferResult = invoke(this, "transferToken", [assetAmount, i.caller], nil)
40+ let transferResult = invoke(this, "transferWaves", [assetAmount, i.caller], nil)
3641 if ((transferResult == transferResult))
3742 then {
3843 let supplyResult = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, assetAmount)])
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 getCurrentPrice (assetIdStr) = if ((assetIdStr == "WAVES"))
1212 then 2
1313 else throw("Error")
1414
1515
1616 func getBalance (assetIdStr,address) = if ((assetIdStr == "WAVES"))
1717 then wavesBalance(address).available
1818 else assetBalance(address, fromBase58String(assetIdStr))
1919
2020
2121 @Callable(i)
22-func transferToken (assetAmount,recipientAddress) = if ((i.caller != this))
22+func transferWaves (assetAmount,senderAddress) = if ((i.caller != this))
2323 then throw("only for internal smart contract invocations")
24- else [ScriptTransfer(this, assetAmount, unit), IntegerEntry((recipientAddress + "_deposited_WAVES"), assetAmount)]
24+ else [ScriptTransfer(this, assetAmount, unit), IntegerEntry((senderAddress + "_deposited_WAVES"), assetAmount)]
25+
26+
27+
28+@Callable(i)
29+func transferWavesTest (assetAmount) = [ScriptTransfer(this, assetAmount, unit), IntegerEntry((toString(i.caller) + "_deposited_WAVES"), assetAmount)]
2530
2631
2732
2833 @Callable(i)
2934 func long2x (assetAmount) = {
3035 let address = toString(i.caller)
3136 let currentAmount = getBalance("WAVES", i.caller)
3237 if ((currentAmount > assetAmount))
3338 then {
3439 func repeatFunc (accum,next) = {
35- let transferResult = invoke(this, "transferToken", [assetAmount, i.caller], nil)
40+ let transferResult = invoke(this, "transferWaves", [assetAmount, i.caller], nil)
3641 if ((transferResult == transferResult))
3742 then {
3843 let supplyResult = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, assetAmount)])
3944 if ((supplyResult == supplyResult))
4045 then {
4146 let borrowResult = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", ((assetAmount * getCurrentPrice("WAVES")) / 100)], nil)
4247 if ((borrowResult == borrowResult))
4348 then (accum + next)
4449 else throw("Strict value is not equal to itself.")
4550 }
4651 else throw("Strict value is not equal to itself.")
4752 }
4853 else throw("Strict value is not equal to itself.")
4954 }
5055
5156 let array = [assetAmount, assetAmount]
5257 let res = {
5358 let $l = array
5459 let $s = size($l)
5560 let $acc0 = 0
5661 func $f0_1 ($a,$i) = if (($i >= $s))
5762 then $a
5863 else repeatFunc($a, $l[$i])
5964
6065 func $f0_2 ($a,$i) = if (($i >= $s))
6166 then $a
6267 else throw("List size exceeds 2")
6368
6469 $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
6570 }
6671 [IntegerEntry(((address + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), (assetAmount * getCurrentPrice("WAVES"))), ScriptTransfer(i.caller, ((res * getCurrentPrice("WAVES")) / 100), base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'), ScriptTransfer(this, res, unit)]
6772 }
6873 else throw("Error!")
6974 }
7075
7176
7277
7378 @Callable(i)
7479 func borrow (assetAmount) = {
7580 let address = toString(i.caller)
7681 let res = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", assetAmount], nil)
7782 if ((res == res))
7883 then [ScriptTransfer(i.caller, assetAmount, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'), IntegerEntry(((address + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), assetAmount)]
7984 else throw("Strict value is not equal to itself.")
8085 }
8186
8287
8388
8489 @Callable(i)
8590 func borrow2 (assetAmount) = {
8691 let address = toString(i.caller)
8792 func repeatFunc (accum,next) = {
8893 let result = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", assetAmount], nil)
8994 if ((result == result))
9095 then (accum + next)
9196 else throw("Strict value is not equal to itself.")
9297 }
9398
9499 let array = [assetAmount, assetAmount]
95100 let res = {
96101 let $l = array
97102 let $s = size($l)
98103 let $acc0 = 0
99104 func $f0_1 ($a,$i) = if (($i >= $s))
100105 then $a
101106 else repeatFunc($a, $l[$i])
102107
103108 func $f0_2 ($a,$i) = if (($i >= $s))
104109 then $a
105110 else throw("List size exceeds 2")
106111
107112 $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
108113 }
109114 [IntegerEntry(((address + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), assetAmount), ScriptTransfer(i.caller, res, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')]
110115 }
111116
112117
113118
114119 @Callable(i)
115120 func borrow5 (assetIdStr,assetAmount) = {
116121 let address = toString(i.caller)
117122 let res = {
118123 let $l = arr
119124 let $s = size($l)
120125 let $acc0 = 0
121126 func $f0_1 ($a,$i) = if (($i >= $s))
122127 then $a
123128 else sum($a, $l[$i])
124129
125130 func $f0_2 ($a,$i) = if (($i >= $s))
126131 then $a
127132 else throw("List size exceeds 5")
128133
129134 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
130135 }
131136 if ((res == res))
132137 then [IntegerEntry(((address + "_borrowed_") + assetIdStr), assetAmount)]
133138 else throw("Strict value is not equal to itself.")
134139 }
135140
136141
137142
138143 @Callable(i)
139144 func deposit () = {
140145 let address = toString(i.caller)
141146 let res = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, 1000000)])
142147 if ((res == res))
143148 then [IntegerEntry((address + "supply_waves"), 1000000)]
144149 else throw("Strict value is not equal to itself.")
145150 }
146151
147152
148153
149154 @Callable(i)
150155 func withdraw (assetIdStr,assetAmount) = {
151156 let address = toString(i.caller)
152157 let res = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "withdraw", [assetIdStr, assetAmount], nil)
153158 if ((res == res))
154159 then [IntegerEntry(((address + "_withdrew_") + assetIdStr), assetAmount)]
155160 else throw("Strict value is not equal to itself.")
156161 }
157162
158163
159164
160165 @Callable(i)
161166 func checkBalance (assetIdStr) = {
162167 let address = i.caller
163168 if ((assetIdStr == "WAVES"))
164169 then [IntegerEntry("Waves Balance", wavesBalance(address).available)]
165170 else [IntegerEntry("Asset Balance", assetBalance(address, fromBase58String(assetIdStr)))]
166171 }
167172
168173
169174 @Verifier(tx)
170175 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
171176

github/deemru/w8io/169f3d6 
37.58 ms