tx · 5xZxCaFtXQbtTv8XGgcysaQfzGjQ5BiNP5DK97dG2vDS

3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq:  -0.01000000 Waves

2023.06.23 01:39 [2634456] smart account 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq > SELF 0.00000000 Waves

{ "type": 13, "id": "5xZxCaFtXQbtTv8XGgcysaQfzGjQ5BiNP5DK97dG2vDS", "fee": 1000000, "feeAssetId": null, "timestamp": 1687473544113, "version": 2, "chainId": 84, "sender": "3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq", "senderPublicKey": "ERewvWFUFQfR1eCnipNAv9n7SdQhof2ESP6PGVjTueLd", "proofs": [ "4ZEk4yKtYaDZL4Ex5BHhCeoWB6jhoUJYPAAmrKPNRymMEbCZN9VSkD7v9YYpD2urmkeZ6mo6MvJ1c9rPPc8tUiQ1" ], "script": "base64:BgIaCAISAwoBARIDCgEBEgQKAggBEgASBAoCCAEDAANhcnIJAMwIAgABCQDMCAIAAgkAzAgCAAMJAMwIAgAECQDMCAIABQUDbmlsAARhcnIyCQDMCAIAAQkAzAgCAAIFA25pbAEDc3VtAgFhAWIJAPwHBAkBEUBleHRyTmF0aXZlKDEwNjIpAQIjM04zRG5WZmZuVXladHoyTVJiazVVN2dpTjExMldlbXBNTmQCBmJvcnJvdwkAzAgCAiwyNUZFcUVqUmtxSzZ5Q2tpVDdMejZTQVl6N2dVRkN0eGZDQ2huclZGRDVBVAkAzAgCAMCEPQUDbmlsBQNuaWwFAWkBBmJvcnJvdwELYXNzZXRBbW91bnQEB2FkZHJlc3MJAKUIAQgFAWkGY2FsbGVyBANyZXMJAPwHBAkBEUBleHRyTmF0aXZlKDEwNjIpAQIjM04zRG5WZmZuVXladHoyTVJiazVVN2dpTjExMldlbXBNTmQCBmJvcnJvdwkAzAgCAiwyNUZFcUVqUmtxSzZ5Q2tpVDdMejZTQVl6N2dVRkN0eGZDQ2huclZGRDVBVAkAzAgCBQthc3NldEFtb3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cwUDcmVzCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFB2FkZHJlc3MCDHN1cHBseV93YXZlcwDAhD0FA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgFpAQh3aXRoZHJhdwIKYXNzZXRJZFN0cgthc3NldEFtb3VudAQHYWRkcmVzcwkApQgBCAUBaQZjYWxsZXIEA3JlcwkA/AcECQERQGV4dHJOYXRpdmUoMTA2MikBAiMzTjNEblZmZm5VeVp0ejJNUmJrNVU3Z2lOMTEyV2VtcE1OZAIId2l0aGRyYXcJAMwIAgUKYXNzZXRJZFN0cgkAzAgCBQthc3NldEFtb3VudAUDbmlsBQNuaWwDCQAAAgUDcmVzBQNyZXMJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgkArAICBQdhZGRyZXNzAgpfd2l0aGRyZXdfBQphc3NldElkU3RyBQthc3NldEFtb3VudAUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleZSWgZk=", "height": 2634456, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5oyBF9QvfL9Qmmas5YCoo2gNEEzYEazRzZGVXkwunZeS Next: GfStx347QWVzUGEth9J3quABHUeR3uG3KaGg1nTFbvAg Diff:
OldNewDifferences
2020
2121
2222 @Callable(i)
23-func borrow2 (assetIdStr,assetAmount) = {
23+func borrow2 (assetAmount) = {
2424 let address = toString(i.caller)
25- func repeatFunc (a,b) = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", [assetIdStr, assetAmount], nil)
25+ func repeatFunc (a,b) = {
26+ let re = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", assetAmount], nil)
27+ if ((re == re))
28+ then [ScriptTransfer(i.caller, assetAmount, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')]
29+ else throw("Strict value is not equal to itself.")
30+ }
2631
2732 let res = {
2833 let $l = arr2
3944 $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
4045 }
4146 if ((res == res))
42- then [IntegerEntry(((address + "_borrowed_") + assetIdStr), assetAmount)]
47+ then [IntegerEntry(((address + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), assetAmount)]
4348 else throw("Strict value is not equal to itself.")
4449 }
4550
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 @Callable(i)
1212 func borrow (assetAmount) = {
1313 let address = toString(i.caller)
1414 let res = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", assetAmount], nil)
1515 if ((res == res))
1616 then [ScriptTransfer(i.caller, assetAmount, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'), IntegerEntry(((address + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), assetAmount)]
1717 else throw("Strict value is not equal to itself.")
1818 }
1919
2020
2121
2222 @Callable(i)
23-func borrow2 (assetIdStr,assetAmount) = {
23+func borrow2 (assetAmount) = {
2424 let address = toString(i.caller)
25- func repeatFunc (a,b) = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", [assetIdStr, assetAmount], nil)
25+ func repeatFunc (a,b) = {
26+ let re = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", assetAmount], nil)
27+ if ((re == re))
28+ then [ScriptTransfer(i.caller, assetAmount, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')]
29+ else throw("Strict value is not equal to itself.")
30+ }
2631
2732 let res = {
2833 let $l = arr2
2934 let $s = size($l)
3035 let $acc0 = 0
3136 func $f0_1 ($a,$i) = if (($i >= $s))
3237 then $a
3338 else repeatFunc($a, $l[$i])
3439
3540 func $f0_2 ($a,$i) = if (($i >= $s))
3641 then $a
3742 else throw("List size exceeds 2")
3843
3944 $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
4045 }
4146 if ((res == res))
42- then [IntegerEntry(((address + "_borrowed_") + assetIdStr), assetAmount)]
47+ then [IntegerEntry(((address + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), assetAmount)]
4348 else throw("Strict value is not equal to itself.")
4449 }
4550
4651
4752
4853 @Callable(i)
4954 func borrow5 (assetIdStr,assetAmount) = {
5055 let address = toString(i.caller)
5156 let res = {
5257 let $l = arr
5358 let $s = size($l)
5459 let $acc0 = 0
5560 func $f0_1 ($a,$i) = if (($i >= $s))
5661 then $a
5762 else sum($a, $l[$i])
5863
5964 func $f0_2 ($a,$i) = if (($i >= $s))
6065 then $a
6166 else throw("List size exceeds 5")
6267
6368 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
6469 }
6570 if ((res == res))
6671 then [IntegerEntry(((address + "_borrowed_") + assetIdStr), assetAmount)]
6772 else throw("Strict value is not equal to itself.")
6873 }
6974
7075
7176
7277 @Callable(i)
7378 func deposit () = {
7479 let address = toString(i.caller)
7580 let res = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, 1000000)])
7681 if ((res == res))
7782 then [IntegerEntry((address + "supply_waves"), 1000000)]
7883 else throw("Strict value is not equal to itself.")
7984 }
8085
8186
8287
8388 @Callable(i)
8489 func withdraw (assetIdStr,assetAmount) = {
8590 let address = toString(i.caller)
8691 let res = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "withdraw", [assetIdStr, assetAmount], nil)
8792 if ((res == res))
8893 then [IntegerEntry(((address + "_withdrew_") + assetIdStr), assetAmount)]
8994 else throw("Strict value is not equal to itself.")
9095 }
9196
9297
9398 @Verifier(tx)
9499 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
95100

github/deemru/w8io/026f985 
28.36 ms