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