tx · 2mRDWQdQPVpyud4Cz9G758vtY49Xdh5ZaAbGCWjGTKLk 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq: -0.01000000 Waves 2023.05.20 15:40 [2586306] smart account 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq > SELF 0.00000000 Waves
{ "type": 13, "id": "2mRDWQdQPVpyud4Cz9G758vtY49Xdh5ZaAbGCWjGTKLk", "fee": 1000000, "feeAssetId": null, "timestamp": 1684586487449, "version": 2, "chainId": 84, "sender": "3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq", "senderPublicKey": "ERewvWFUFQfR1eCnipNAv9n7SdQhof2ESP6PGVjTueLd", "proofs": [ "5CDJtBCjAXmBqX8q9GKfcasUSgPWFHJ7RNK2mWTaQFDzssAPCNZdekUPPtK4yVD94uHAGJekTqzFcqfuXzGhiXSe" ], "script": "base64:BgIPCAISABIDCgEBEgQKAggBAAMBaQEKaXNzdWVUb2tlbgAJAJQKAgkAzAgCCQDCCAUCB015VG9rZW4CE1RoaXMgaXMgYSBuZXcgdG9rZW4AkE4AAgYFA25pbAUEdW5pdAFpAQZib3Jyb3cBC2Fzc2V0QW1vdW50BA9zbWFydGNvbnRyYWN0SWQJAQdBZGRyZXNzAQEaAVSR8rKcOXOcwnFyIptAQqBsHWeVhvtFQ64EB3Rva2VuSWQJAQdBZGRyZXNzAQEgD/IcEqzkxDya7EYaqyWosOy6BytGzG2IcvC14pJJAbQEB2FkZHJlc3MJAKUIAQgFAWkGY2FsbGVyBANyZXMJAPwHBAUPc21hcnRjb250cmFjdElkAgZib3Jyb3cJAMwIAgUHdG9rZW5JZAkAzAgCBQthc3NldEFtb3VudAUDbmlsCQDMCAIJAQ9BdHRhY2hlZFBheW1lbnQCBQR1bml0AIDC1y8FA25pbAMJAAACBQNyZXMFA3JlcwQHJG1hdGNoMAUDcmVzAwkAAQIFByRtYXRjaDACA0ludAQBcgUHJG1hdGNoMAkAlAoCCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFB2FkZHJlc3MCCl9ib3Jyb3dlZF8FAXIFA25pbAUBcgkAAgECF0luY29ycmVjdCBpbnZva2UgcmVzdWx0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAWkBCHdpdGhkcmF3Agphc3NldElkU3RyC2Fzc2V0QW1vdW50BA9zbWFydGNvbnRyYWN0SWQJAQdBZGRyZXNzAQEaAVSR8rKcOXOcwnFyIptAQqBsHWeVhvtFQ64EB2FkZHJlc3MJAKUIAQgFAWkGY2FsbGVyBANyZXMJAPwHBAUPc21hcnRjb250cmFjdElkAgh3aXRoZHJhdwkAzAgCCQERQGV4dHJOYXRpdmUoMTA2MikBBQphc3NldElkU3RyCQDMCAIFC2Fzc2V0QW1vdW50BQNuaWwJAMwIAgkBD0F0dGFjaGVkUGF5bWVudAIFBHVuaXQAgMLXLwUDbmlsAwkAAAIFA3JlcwUDcmVzBAckbWF0Y2gwBQNyZXMDCQABAgUHJG1hdGNoMAIDSW50BAFyBQckbWF0Y2gwCQCUCgIJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgkArAICBQdhZGRyZXNzAgpfd2l0aGRyZXdfBQphc3NldElkU3RyBQFyBQNuaWwFAXIJAAIBAhdJbmNvcnJlY3QgaW52b2tlIHJlc3VsdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXmtKRy6", "height": 2586306, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8w2SPZsVj2dfmj2Cmr1GCBr4nnfq6AViaRTwQBiLwa1P Next: 8TxYdYM6z3DrmVya576n4i36B5C78mFKhsQ2hCQNzgMW Full:
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 issueToken () = $Tuple2([Issue("MyToken", "This is a new token", 10000, 2, true)], unit) | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | ||
11 | 11 | @Callable(i) | |
12 | 12 | func borrow (assetAmount) = { | |
13 | 13 | let smartcontractId = Address(base58'3N3DnVffnUyZtz2MRbk5U7giN112WempMNd') | |
14 | 14 | let tokenId = Address(base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT') | |
15 | 15 | let address = toString(i.caller) | |
16 | 16 | let res = invoke(smartcontractId, "borrow", [tokenId, assetAmount], [AttachedPayment(unit, 100000000)]) | |
17 | 17 | if ((res == res)) | |
18 | 18 | then match res { | |
19 | 19 | case r: Int => | |
20 | 20 | $Tuple2([IntegerEntry((address + "_borrowed_"), r)], r) | |
21 | 21 | case _ => | |
22 | 22 | throw("Incorrect invoke result") | |
23 | 23 | } | |
24 | 24 | else throw("Strict value is not equal to itself.") | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | ||
29 | 29 | @Callable(i) | |
30 | 30 | func withdraw (assetIdStr,assetAmount) = { | |
31 | 31 | let smartcontractId = Address(base58'3N3DnVffnUyZtz2MRbk5U7giN112WempMNd') | |
32 | 32 | let address = toString(i.caller) | |
33 | 33 | let res = invoke(smartcontractId, "withdraw", [addressFromStringValue(assetIdStr), assetAmount], [AttachedPayment(unit, 100000000)]) | |
34 | 34 | if ((res == res)) | |
35 | 35 | then match res { | |
36 | 36 | case r: Int => | |
37 | 37 | $Tuple2([IntegerEntry(((address + "_withdrew_") + assetIdStr), r)], r) | |
38 | 38 | case _ => | |
39 | 39 | throw("Incorrect invoke result") | |
40 | 40 | } | |
41 | 41 | else throw("Strict value is not equal to itself.") | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | @Verifier(tx) | |
46 | 46 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
47 | 47 |
github/deemru/w8io/169f3d6 40.67 ms ◑