tx · Cr7yLzm3tEzAx4caFBJx55hwYrjVitkWKY8rq99sYrZJ

3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq:  -0.01000000 Waves

2023.05.31 00:03 [2601227] smart account 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq > SELF 0.00000000 Waves

{ "type": 13, "id": "Cr7yLzm3tEzAx4caFBJx55hwYrjVitkWKY8rq99sYrZJ", "fee": 1000000, "feeAssetId": null, "timestamp": 1685480656321, "version": 2, "chainId": 84, "sender": "3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq", "senderPublicKey": "ERewvWFUFQfR1eCnipNAv9n7SdQhof2ESP6PGVjTueLd", "proofs": [ "yFLPUcMEKPDww1Q16Jdr2zog2YwmmppoSHKRqVgr3A4AXD2MgHKLbDYkCTfSkdAyFapUJskvbeHkdAJvLheWt6U" ], "script": "base64:BgIOCAISBAoCCAESBAoCCAEAAgFpAQZib3Jyb3cCCmFzc2V0SWRTdHILYXNzZXRBbW91bnQED3NtYXJ0Y29udHJhY3RJZAkBB0FkZHJlc3MBARoBVJHyspw5c5zCcXIim0BCoGwdZ5WG+0VDrgQHdG9rZW5JZAkBB0FkZHJlc3MBASAP8hwSrOTEPJrsRhqrJaiw7LoHK0bMbYhy8LXikkkBtAQHYWRkcmVzcwkApQgBCAUBaQZjYWxsZXIEA3JlcwkA/AcEBQ9zbWFydGNvbnRyYWN0SWQCBmJvcnJvdwkAzAgCBQphc3NldElkU3RyCQDMCAIFC2Fzc2V0QW1vdW50BQNuaWwFA25pbAMJAAACBQNyZXMFA3JlcwkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQdhZGRyZXNzAgpfYm9ycm93ZWRfBQthc3NldEFtb3VudAUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAWkBCHdpdGhkcmF3Agphc3NldElkU3RyC2Fzc2V0QW1vdW50BA9zbWFydGNvbnRyYWN0SWQJAQdBZGRyZXNzAQEaAVSR8rKcOXOcwnFyIptAQqBsHWeVhvtFQ64EB3Rva2VuSWQJAQdBZGRyZXNzAQEgD/IcEqzkxDya7EYaqyWosOy6BytGzG2IcvC14pJJAbQEB2FkZHJlc3MJAKUIAQgFAWkGY2FsbGVyBANyZXMJAPwHBAUPc21hcnRjb250cmFjdElkAgh3aXRoZHJhdwkAzAgCCQERQGV4dHJOYXRpdmUoMTA2MikBBQphc3NldElkU3RyCQDMCAIFC2Fzc2V0QW1vdW50BQNuaWwJAMwIAgkBD0F0dGFjaGVkUGF5bWVudAIFBHVuaXQAgMLXLwUDbmlsAwkAAAIFA3JlcwUDcmVzBAckbWF0Y2gwBQNyZXMDCQABAgUHJG1hdGNoMAIDSW50BAFyBQckbWF0Y2gwCQCUCgIJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgkArAICBQdhZGRyZXNzAgpfd2l0aGRyZXdfBQphc3NldElkU3RyBQFyBQNuaWwFAXIJAAIBAhdJbmNvcnJlY3QgaW52b2tlIHJlc3VsdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXmXIUsY", "height": 2601227, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 35rQT4j96b6vC7YJ71G2oE1pHSMyR3ZejXir84hjMwZx Next: 82P5iugjLpnuTam35HqPPU5YudvLgc129SMN66fgeHYB Diff:
OldNewDifferences
44
55
66 @Callable(i)
7-func borrow (assetAmount) = {
7+func borrow (assetIdStr,assetAmount) = {
88 let smartcontractId = Address(base58'3N3DnVffnUyZtz2MRbk5U7giN112WempMNd')
99 let tokenId = Address(base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')
1010 let address = toString(i.caller)
11- let res = invoke(smartcontractId, "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", assetAmount], nil)
11+ let res = invoke(smartcontractId, "borrow", [assetIdStr, assetAmount], nil)
1212 if ((res == res))
1313 then [IntegerEntry((address + "_borrowed_"), assetAmount)]
1414 else throw("Strict value is not equal to itself.")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
7-func borrow (assetAmount) = {
7+func borrow (assetIdStr,assetAmount) = {
88 let smartcontractId = Address(base58'3N3DnVffnUyZtz2MRbk5U7giN112WempMNd')
99 let tokenId = Address(base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')
1010 let address = toString(i.caller)
11- let res = invoke(smartcontractId, "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", assetAmount], nil)
11+ let res = invoke(smartcontractId, "borrow", [assetIdStr, assetAmount], nil)
1212 if ((res == res))
1313 then [IntegerEntry((address + "_borrowed_"), assetAmount)]
1414 else throw("Strict value is not equal to itself.")
1515 }
1616
1717
1818
1919 @Callable(i)
2020 func withdraw (assetIdStr,assetAmount) = {
2121 let smartcontractId = Address(base58'3N3DnVffnUyZtz2MRbk5U7giN112WempMNd')
2222 let tokenId = Address(base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')
2323 let address = toString(i.caller)
2424 let res = invoke(smartcontractId, "withdraw", [addressFromStringValue(assetIdStr), assetAmount], [AttachedPayment(unit, 100000000)])
2525 if ((res == res))
2626 then match res {
2727 case r: Int =>
2828 $Tuple2([IntegerEntry(((address + "_withdrew_") + assetIdStr), r)], r)
2929 case _ =>
3030 throw("Incorrect invoke result")
3131 }
3232 else throw("Strict value is not equal to itself.")
3333 }
3434
3535
3636 @Verifier(tx)
3737 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
3838

github/deemru/w8io/026f985 
26.39 ms