tx · 69ptNrRoYeiytDE1HPoRuqTewPq4zHnUaN77bNvWLRdJ 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq: -0.01000000 Waves 2023.05.16 19:39 [2580761] smart account 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq > SELF 0.00000000 Waves
{ "type": 13, "id": "69ptNrRoYeiytDE1HPoRuqTewPq4zHnUaN77bNvWLRdJ", "fee": 1000000, "feeAssetId": null, "timestamp": 1684255164444, "version": 2, "chainId": 84, "sender": "3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq", "senderPublicKey": "ERewvWFUFQfR1eCnipNAv9n7SdQhof2ESP6PGVjTueLd", "proofs": [ "64KLr2S67QHZVi6ypk43o5nmXu3W2ZmAPqtCopimBE4oepCkjunNuSrucmJL9J2xio74zg7VdPFH8SpuJdf7MaPZ" ], "script": "base64:BgIQCAISABIECgIIARIECgIIAQADAWkBCmlzc3VlVG9rZW4ACQCUCgIJAMwIAgkAwggFAgdNeVRva2VuAhNUaGlzIGlzIGEgbmV3IHRva2VuAJBOAAIGBQNuaWwFBHVuaXQBaQEGYm9ycm93Agphc3NldElkU3RyC2Fzc2V0QW1vdW50BA9zbWFydGNvbnRyYWN0SWQJAQdBZGRyZXNzAQEaAVSR8rKcOXOcwnFyIptAQqBsHWeVhvtFQ64EB2FkZHJlc3MJAKUIAQgFAWkGY2FsbGVyBANyZXMJAPwHBAUPc21hcnRjb250cmFjdElkAgZib3Jyb3cJAMwIAgkBEUBleHRyTmF0aXZlKDEwNjIpAQUKYXNzZXRJZFN0cgkAzAgCBQthc3NldEFtb3VudAUDbmlsCQDMCAIJAQ9BdHRhY2hlZFBheW1lbnQCBQR1bml0AIDC1y8FA25pbAMJAAACBQNyZXMFA3JlcwQHJG1hdGNoMAUDcmVzAwkAAQIFByRtYXRjaDACA0ludAQBcgUHJG1hdGNoMAkAlAoCCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIJAKwCAgUHYWRkcmVzcwIKX2JvcnJvd2VkXwUKYXNzZXRJZFN0cgUBcgUDbmlsBQFyCQACAQIXSW5jb3JyZWN0IGludm9rZSByZXN1bHQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BaQEId2l0aGRyYXcCCmFzc2V0SWRTdHILYXNzZXRBbW91bnQED3NtYXJ0Y29udHJhY3RJZAkBB0FkZHJlc3MBARoBVJHyspw5c5zCcXIim0BCoGwdZ5WG+0VDrgQHYWRkcmVzcwkApQgBCAUBaQZjYWxsZXIEA3JlcwkA/AcEBQ9zbWFydGNvbnRyYWN0SWQCCHdpdGhkcmF3CQDMCAIJARFAZXh0ck5hdGl2ZSgxMDYyKQEFCmFzc2V0SWRTdHIJAMwIAgULYXNzZXRBbW91bnQFA25pbAkAzAgCCQEPQXR0YWNoZWRQYXltZW50AgUEdW5pdACAwtcvBQNuaWwDCQAAAgUDcmVzBQNyZXMEByRtYXRjaDAFA3JlcwMJAAECBQckbWF0Y2gwAgNJbnQEAXIFByRtYXRjaDAJAJQKAgkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICCQCsAgIFB2FkZHJlc3MCCl93aXRoZHJld18FCmFzc2V0SWRTdHIFAXIFA25pbAUBcgkAAgECF0luY29ycmVjdCBpbnZva2UgcmVzdWx0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleT++VeM=", "height": 2580761, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FT4LiTD4Ffht95SRbNJNQXCBByNYi2ptLtv6X4aHAT3m Next: 8w2SPZsVj2dfmj2Cmr1GCBr4nnfq6AViaRTwQBiLwa1P 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 (assetIdStr,assetAmount) = { | |
13 | 13 | let smartcontractId = Address(base58'3N3DnVffnUyZtz2MRbk5U7giN112WempMNd') | |
14 | 14 | let address = toString(i.caller) | |
15 | 15 | let res = invoke(smartcontractId, "borrow", [addressFromStringValue(assetIdStr), assetAmount], [AttachedPayment(unit, 100000000)]) | |
16 | 16 | if ((res == res)) | |
17 | 17 | then match res { | |
18 | 18 | case r: Int => | |
19 | 19 | $Tuple2([IntegerEntry(((address + "_borrowed_") + assetIdStr), r)], r) | |
20 | 20 | case _ => | |
21 | 21 | throw("Incorrect invoke result") | |
22 | 22 | } | |
23 | 23 | else throw("Strict value is not equal to itself.") | |
24 | 24 | } | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | ||
28 | 28 | @Callable(i) | |
29 | 29 | func withdraw (assetIdStr,assetAmount) = { | |
30 | 30 | let smartcontractId = Address(base58'3N3DnVffnUyZtz2MRbk5U7giN112WempMNd') | |
31 | 31 | let address = toString(i.caller) | |
32 | 32 | let res = invoke(smartcontractId, "withdraw", [addressFromStringValue(assetIdStr), assetAmount], [AttachedPayment(unit, 100000000)]) | |
33 | 33 | if ((res == res)) | |
34 | 34 | then match res { | |
35 | 35 | case r: Int => | |
36 | 36 | $Tuple2([IntegerEntry(((address + "_withdrew_") + assetIdStr), r)], r) | |
37 | 37 | case _ => | |
38 | 38 | throw("Incorrect invoke result") | |
39 | 39 | } | |
40 | 40 | else throw("Strict value is not equal to itself.") | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | @Verifier(tx) | |
45 | 45 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
46 | 46 |
github/deemru/w8io/169f3d6 43.18 ms ◑