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:
Old | New | Differences | |
---|---|---|---|
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | - | func borrow (assetAmount) = { | |
7 | + | func borrow (assetIdStr,assetAmount) = { | |
8 | 8 | let smartcontractId = Address(base58'3N3DnVffnUyZtz2MRbk5U7giN112WempMNd') | |
9 | 9 | let tokenId = Address(base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT') | |
10 | 10 | let address = toString(i.caller) | |
11 | - | let res = invoke(smartcontractId, "borrow", [ | |
11 | + | let res = invoke(smartcontractId, "borrow", [assetIdStr, assetAmount], nil) | |
12 | 12 | if ((res == res)) | |
13 | 13 | then [IntegerEntry((address + "_borrowed_"), assetAmount)] | |
14 | 14 | else throw("Strict value is not equal to itself.") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | - | func borrow (assetAmount) = { | |
7 | + | func borrow (assetIdStr,assetAmount) = { | |
8 | 8 | let smartcontractId = Address(base58'3N3DnVffnUyZtz2MRbk5U7giN112WempMNd') | |
9 | 9 | let tokenId = Address(base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT') | |
10 | 10 | let address = toString(i.caller) | |
11 | - | let res = invoke(smartcontractId, "borrow", [ | |
11 | + | let res = invoke(smartcontractId, "borrow", [assetIdStr, assetAmount], nil) | |
12 | 12 | if ((res == res)) | |
13 | 13 | then [IntegerEntry((address + "_borrowed_"), assetAmount)] | |
14 | 14 | else throw("Strict value is not equal to itself.") | |
15 | 15 | } | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | ||
19 | 19 | @Callable(i) | |
20 | 20 | func withdraw (assetIdStr,assetAmount) = { | |
21 | 21 | let smartcontractId = Address(base58'3N3DnVffnUyZtz2MRbk5U7giN112WempMNd') | |
22 | 22 | let tokenId = Address(base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT') | |
23 | 23 | let address = toString(i.caller) | |
24 | 24 | let res = invoke(smartcontractId, "withdraw", [addressFromStringValue(assetIdStr), assetAmount], [AttachedPayment(unit, 100000000)]) | |
25 | 25 | if ((res == res)) | |
26 | 26 | then match res { | |
27 | 27 | case r: Int => | |
28 | 28 | $Tuple2([IntegerEntry(((address + "_withdrew_") + assetIdStr), r)], r) | |
29 | 29 | case _ => | |
30 | 30 | throw("Incorrect invoke result") | |
31 | 31 | } | |
32 | 32 | else throw("Strict value is not equal to itself.") | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | @Verifier(tx) | |
37 | 37 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
38 | 38 |
github/deemru/w8io/026f985 26.39 ms ◑