tx · 6Y2VaiJww4vtUzn8TbuFmJ37PUGBhjHHKkqgxXoDtNve 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq: -0.01000000 Waves 2023.05.20 22:49 [2586734] smart account 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq > SELF 0.00000000 Waves
{ "type": 13, "id": "6Y2VaiJww4vtUzn8TbuFmJ37PUGBhjHHKkqgxXoDtNve", "fee": 1000000, "feeAssetId": null, "timestamp": 1684612165240, "version": 2, "chainId": 84, "sender": "3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq", "senderPublicKey": "ERewvWFUFQfR1eCnipNAv9n7SdQhof2ESP6PGVjTueLd", "proofs": [ "4EjKw1KiEeCj2uJFMoDhsKosjTryf1RjfdEhBxm1sdyxV4zhWjtg2iHoQkgZNYr41NqBLjEhoo7GvckxYu8QrwgT" ], "script": "base64:BgINCAISAwoBARIECgIIAQACAWkBBmJvcnJvdwELYXNzZXRBbW91bnQED3NtYXJ0Y29udHJhY3RJZAkBB0FkZHJlc3MBARoBVJHyspw5c5zCcXIim0BCoGwdZ5WG+0VDrgQHdG9rZW5JZAkBB0FkZHJlc3MBASAP8hwSrOTEPJrsRhqrJaiw7LoHK0bMbYhy8LXikkkBtAQHYWRkcmVzcwkApQgBCAUBaQZjYWxsZXIEA3JlcwkA/AcEBQ9zbWFydGNvbnRyYWN0SWQCBmJvcnJvdwkAzAgCBQd0b2tlbklkCQDMCAIFC2Fzc2V0QW1vdW50BQNuaWwJAMwIAgkBD0F0dGFjaGVkUGF5bWVudAIBIA/yHBKs5MQ8muxGGqslqLDsugcrRsxtiHLwteKSSQG0AAEFA25pbAMJAAACBQNyZXMFA3JlcwQHJG1hdGNoMAUDcmVzAwkAAQIFByRtYXRjaDACA0ludAQBcgUHJG1hdGNoMAkAlAoCCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFB2FkZHJlc3MCCl9ib3Jyb3dlZF8FAXIFA25pbAUBcgkAAgECF0luY29ycmVjdCBpbnZva2UgcmVzdWx0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAWkBCHdpdGhkcmF3Agphc3NldElkU3RyC2Fzc2V0QW1vdW50BA9zbWFydGNvbnRyYWN0SWQJAQdBZGRyZXNzAQEaAVSR8rKcOXOcwnFyIptAQqBsHWeVhvtFQ64EB3Rva2VuSWQJAQdBZGRyZXNzAQEgD/IcEqzkxDya7EYaqyWosOy6BytGzG2IcvC14pJJAbQEB2FkZHJlc3MJAKUIAQgFAWkGY2FsbGVyBANyZXMJAPwHBAUPc21hcnRjb250cmFjdElkAgh3aXRoZHJhdwkAzAgCCQERQGV4dHJOYXRpdmUoMTA2MikBBQphc3NldElkU3RyCQDMCAIFC2Fzc2V0QW1vdW50BQNuaWwJAMwIAgkBD0F0dGFjaGVkUGF5bWVudAIFBHVuaXQAgMLXLwUDbmlsAwkAAAIFA3JlcwUDcmVzBAckbWF0Y2gwBQNyZXMDCQABAgUHJG1hdGNoMAIDSW50BAFyBQckbWF0Y2gwCQCUCgIJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgkArAICBQdhZGRyZXNzAgpfd2l0aGRyZXdfBQphc3NldElkU3RyBQFyBQNuaWwFAXIJAAIBAhdJbmNvcnJlY3QgaW52b2tlIHJlc3VsdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXkCjIIl", "height": 2586734, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5QFKGTXPFtaphuBmKqvzqoYJsBPLsMbRGQquaz6g4z4R Next: jVzVGdaeBsxH6mvUpx5i5hdR3MGgEABAgmsCyTw5QM8 Diff:
Old | New | Differences | |
---|---|---|---|
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", [tokenId, assetAmount], [AttachedPayment( | |
11 | + | let res = invoke(smartcontractId, "borrow", [tokenId, assetAmount], [AttachedPayment(base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT', 1)]) | |
12 | 12 | if ((res == res)) | |
13 | 13 | then match res { | |
14 | 14 | case r: Int => |
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 | 7 | func borrow (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", [tokenId, assetAmount], [AttachedPayment( | |
11 | + | let res = invoke(smartcontractId, "borrow", [tokenId, assetAmount], [AttachedPayment(base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT', 1)]) | |
12 | 12 | if ((res == res)) | |
13 | 13 | then match res { | |
14 | 14 | case r: Int => | |
15 | 15 | $Tuple2([IntegerEntry((address + "_borrowed_"), r)], r) | |
16 | 16 | case _ => | |
17 | 17 | throw("Incorrect invoke result") | |
18 | 18 | } | |
19 | 19 | else throw("Strict value is not equal to itself.") | |
20 | 20 | } | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | ||
24 | 24 | @Callable(i) | |
25 | 25 | func withdraw (assetIdStr,assetAmount) = { | |
26 | 26 | let smartcontractId = Address(base58'3N3DnVffnUyZtz2MRbk5U7giN112WempMNd') | |
27 | 27 | let tokenId = Address(base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT') | |
28 | 28 | let address = toString(i.caller) | |
29 | 29 | let res = invoke(smartcontractId, "withdraw", [addressFromStringValue(assetIdStr), assetAmount], [AttachedPayment(unit, 100000000)]) | |
30 | 30 | if ((res == res)) | |
31 | 31 | then match res { | |
32 | 32 | case r: Int => | |
33 | 33 | $Tuple2([IntegerEntry(((address + "_withdrew_") + assetIdStr), r)], r) | |
34 | 34 | case _ => | |
35 | 35 | throw("Incorrect invoke result") | |
36 | 36 | } | |
37 | 37 | else throw("Strict value is not equal to itself.") | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | @Verifier(tx) | |
42 | 42 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
43 | 43 |
github/deemru/w8io/026f985 36.67 ms ◑