tx · 8w2SPZsVj2dfmj2Cmr1GCBr4nnfq6AViaRTwQBiLwa1P

3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq:  -0.01000000 Waves

2023.05.20 15:24 [2586290] smart account 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq > SELF 0.00000000 Waves

{ "type": 13, "id": "8w2SPZsVj2dfmj2Cmr1GCBr4nnfq6AViaRTwQBiLwa1P", "fee": 1000000, "feeAssetId": null, "timestamp": 1684585512296, "version": 2, "chainId": 84, "sender": "3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq", "senderPublicKey": "ERewvWFUFQfR1eCnipNAv9n7SdQhof2ESP6PGVjTueLd", "proofs": [ "4xzyfextycfwyns9yd5mgh1BQSHn43Fdo5b25Q3JdHoTA3TeNMaGhYPB37aQbVuY9v5JQM38X4jXzH4vWzUVeVQt" ], "script": "base64:BgIPCAISABIDCgEBEgQKAggBAAMBaQEKaXNzdWVUb2tlbgAJAJQKAgkAzAgCCQDCCAUCB015VG9rZW4CE1RoaXMgaXMgYSBuZXcgdG9rZW4AkE4AAgYFA25pbAUEdW5pdAFpAQZib3Jyb3cBC2Fzc2V0QW1vdW50BA9zbWFydGNvbnRyYWN0SWQJAQdBZGRyZXNzAQEaAVSR8rKcOXOcwnFyIptAQqBsHWeVhvtFQ64EB3Rva2VuSWQJAQdBZGRyZXNzAQEgD/IcEqzkxDya7EYaqyWosOy6BytGzG2IcvC14pJJAbQEB2FkZHJlc3MJAKUIAQgFAWkGY2FsbGVyBANyZXMJAPwHBAUPc21hcnRjb250cmFjdElkAgZib3Jyb3cJAMwIAgUHdG9rZW5JZAkAzAgCBQthc3NldEFtb3VudAUDbmlsCQDMCAIJAQ9BdHRhY2hlZFBheW1lbnQCBQR1bml0AIDC1y8FA25pbAMJAAACBQNyZXMFA3JlcwQHJG1hdGNoMAUDcmVzAwkAAQIFByRtYXRjaDACA0ludAQBcgUHJG1hdGNoMAkAlAoCCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFB2FkZHJlc3MCCl9ib3Jyb3dlZF8FAXIFA25pbAUBcgkAAgECF0luY29ycmVjdCBpbnZva2UgcmVzdWx0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAWkBCHdpdGhkcmF3Agphc3NldElkU3RyC2Fzc2V0QW1vdW50BA9zbWFydGNvbnRyYWN0SWQJAQdBZGRyZXNzAQEaAVSR8rKcOXOcwnFyIptAQqBsHWeVhvtFQ64EB2FkZHJlc3MJAKUIAQgFAWkGY2FsbGVyBANyZXMJAPwHBAUPc21hcnRjb250cmFjdElkAgh3aXRoZHJhdwkAzAgCCQERQGV4dHJOYXRpdmUoMTA2MikBBQphc3NldElkU3RyCQDMCAIFC2Fzc2V0QW1vdW50BQNuaWwJAMwIAgkBD0F0dGFjaGVkUGF5bWVudAIFBHVuaXQAgMLXLwUDbmlsAwkAAAIFA3JlcwUDcmVzBAckbWF0Y2gwBQNyZXMDCQABAgUHJG1hdGNoMAIDSW50BAFyBQckbWF0Y2gwCQCUCgIJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgkArAICBQdhZGRyZXNzAgpfd2l0aGRyZXdfBQphc3NldElkU3RyBQFyBQNuaWwFAXIJAAIBAhdJbmNvcnJlY3QgaW52b2tlIHJlc3VsdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXmtKRy6", "height": 2586290, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 69ptNrRoYeiytDE1HPoRuqTewPq4zHnUaN77bNvWLRdJ Next: 2mRDWQdQPVpyud4Cz9G758vtY49Xdh5ZaAbGCWjGTKLk Diff:
OldNewDifferences
99
1010
1111 @Callable(i)
12-func borrow (assetIdStr,assetAmount) = {
12+func borrow (assetAmount) = {
1313 let smartcontractId = Address(base58'3N3DnVffnUyZtz2MRbk5U7giN112WempMNd')
14+ let tokenId = Address(base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')
1415 let address = toString(i.caller)
15- let res = invoke(smartcontractId, "borrow", [addressFromStringValue(assetIdStr), assetAmount], [AttachedPayment(unit, 100000000)])
16+ let res = invoke(smartcontractId, "borrow", [tokenId, assetAmount], [AttachedPayment(unit, 100000000)])
1617 if ((res == res))
1718 then match res {
1819 case r: Int =>
19- $Tuple2([IntegerEntry(((address + "_borrowed_") + assetIdStr), r)], r)
20+ $Tuple2([IntegerEntry((address + "_borrowed_"), r)], r)
2021 case _ =>
2122 throw("Incorrect invoke result")
2223 }
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)
12-func borrow (assetIdStr,assetAmount) = {
12+func borrow (assetAmount) = {
1313 let smartcontractId = Address(base58'3N3DnVffnUyZtz2MRbk5U7giN112WempMNd')
14+ let tokenId = Address(base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')
1415 let address = toString(i.caller)
15- let res = invoke(smartcontractId, "borrow", [addressFromStringValue(assetIdStr), assetAmount], [AttachedPayment(unit, 100000000)])
16+ let res = invoke(smartcontractId, "borrow", [tokenId, assetAmount], [AttachedPayment(unit, 100000000)])
1617 if ((res == res))
1718 then match res {
1819 case r: Int =>
19- $Tuple2([IntegerEntry(((address + "_borrowed_") + assetIdStr), r)], r)
20+ $Tuple2([IntegerEntry((address + "_borrowed_"), r)], r)
2021 case _ =>
2122 throw("Incorrect invoke result")
2223 }
2324 else throw("Strict value is not equal to itself.")
2425 }
2526
2627
2728
2829 @Callable(i)
2930 func withdraw (assetIdStr,assetAmount) = {
3031 let smartcontractId = Address(base58'3N3DnVffnUyZtz2MRbk5U7giN112WempMNd')
3132 let address = toString(i.caller)
3233 let res = invoke(smartcontractId, "withdraw", [addressFromStringValue(assetIdStr), assetAmount], [AttachedPayment(unit, 100000000)])
3334 if ((res == res))
3435 then match res {
3536 case r: Int =>
3637 $Tuple2([IntegerEntry(((address + "_withdrew_") + assetIdStr), r)], r)
3738 case _ =>
3839 throw("Incorrect invoke result")
3940 }
4041 else throw("Strict value is not equal to itself.")
4142 }
4243
4344
4445 @Verifier(tx)
4546 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4647

github/deemru/w8io/169f3d6 
32.52 ms