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:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func issueToken () = $Tuple2([Issue("MyToken", "This is a new token", 10000, 2, true)], unit)
88
99
1010
1111 @Callable(i)
1212 func borrow (assetAmount) = {
1313 let smartcontractId = Address(base58'3N3DnVffnUyZtz2MRbk5U7giN112WempMNd')
1414 let tokenId = Address(base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')
1515 let address = toString(i.caller)
1616 let res = invoke(smartcontractId, "borrow", [tokenId, assetAmount], [AttachedPayment(unit, 100000000)])
1717 if ((res == res))
1818 then match res {
1919 case r: Int =>
2020 $Tuple2([IntegerEntry((address + "_borrowed_"), r)], r)
2121 case _ =>
2222 throw("Incorrect invoke result")
2323 }
2424 else throw("Strict value is not equal to itself.")
2525 }
2626
2727
2828
2929 @Callable(i)
3030 func withdraw (assetIdStr,assetAmount) = {
3131 let smartcontractId = Address(base58'3N3DnVffnUyZtz2MRbk5U7giN112WempMNd')
3232 let address = toString(i.caller)
3333 let res = invoke(smartcontractId, "withdraw", [addressFromStringValue(assetIdStr), assetAmount], [AttachedPayment(unit, 100000000)])
3434 if ((res == res))
3535 then match res {
3636 case r: Int =>
3737 $Tuple2([IntegerEntry(((address + "_withdrew_") + assetIdStr), r)], r)
3838 case _ =>
3939 throw("Incorrect invoke result")
4040 }
4141 else throw("Strict value is not equal to itself.")
4242 }
4343
4444
4545 @Verifier(tx)
4646 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4747

github/deemru/w8io/169f3d6 
40.67 ms