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