tx · 22f13Y8yki3QuFz8sik34a4zoPUwtpaN2Ug3kCjWKroy
3MuvmdQpHrmMrszZmrdarf8d95XHbWMcPkM: -0.05000000 Waves
2022.10.31 15:06 [2296559] smart account 3MuvmdQpHrmMrszZmrdarf8d95XHbWMcPkM > SELF 0.00000000 Waves
{
"type": 13,
"id": "22f13Y8yki3QuFz8sik34a4zoPUwtpaN2Ug3kCjWKroy",
"fee": 5000000,
"feeAssetId": null,
"timestamp": 1667218000926,
"version": 2,
"chainId": 84,
"sender": "3MuvmdQpHrmMrszZmrdarf8d95XHbWMcPkM",
"senderPublicKey": "7UnFgjKRHSBUfvTnV31mCr4bNSKGpDZqDJCc98qzC2Ut",
"proofs": [
"4XzDDrm2PKEvnq1JMjmc3MZ1RBSA73oSCuLgYaMpc9Gyaefrk5eDu3zYLPw695NMB8Ht4kUEEa3ZyndijQB1ak96"
],
"script": "base64:AAIFAAAAAAAAABAIAhIFCgMIAQESBQoDCAEBAAAAAwAAAAAETE9ORwAAAAAAAAAAAQAAAAAFU0hPUlQAAAAAAAAAAAIAAAAAB2Fzc2V0SWQBAAAAIPd26vf3g8pl224T7gI7z1gplanB0Y3yS9ps2B1igMjeAAAAAgAAAAFpAQAAABFzd2l0Y2hMb25nVG9TaG9ydAAAAAMAAAAGbWFya2V0AAAABmFtb3VudAAAAAhsZXZlcmFnZQMJAQAAAAIhPQAAAAIIBQAAAAFpAAAABmNhbGxlcgUAAAAEdGhpcwkAAAIAAAABAgAAACh5b3UgYXJlIG5vdCBhbGxvd2VkIHRvIGNoYW5nZSBwb3NpdGlvbnMhBAAAAAhjb250cmFjdAkBAAAAB0FkZHJlc3MAAAABCQACWQAAAAEFAAAABm1hcmtldAQAAAANY2xvc2VQb3NpdGlvbgkAA/wAAAAEBQAAAAhjb250cmFjdAIAAAANY2xvc2VQb3NpdGlvbgUAAAADbmlsBQAAAANuaWwDCQAAAAAAAAIFAAAADWNsb3NlUG9zaXRpb24FAAAADWNsb3NlUG9zaXRpb24EAA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A1zaG9ydFBvc2l0aW9uCQAD/AAAAAQFAAAACGNvbnRyYWN0AgAAABBpbmNyZWFzZVBvc2l0aW9uCQAETAAAAAIFAAAABExPTkcJAARMAAAAAgUAAAAIbGV2ZXJhZ2UJAARMAAAAAgAAAAAAAAAAAQkABEwAAAACAgAAAAAFAAAAA25pbAkABEwAAAACCQEAAAAPQXR0YWNoZWRQYXltZW50AAAAAgUAAAAHYXNzZXRJZAkAAGgAAAACBQAAAAZhbW91bnQAAAAAAAAPQkAFAAAAA25pbAMJAAAAAAAAAgUAAAANc2hvcnRQb3NpdGlvbgUAAAANc2hvcnRQb3NpdGlvbgQAAAAGcmV0dXJuCQAD8AAAAAIFAAAABHRoaXMFAAAAB2Fzc2V0SWQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAZyZXR1cm4FAAAAB2Fzc2V0SWQFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlNJhfx",
"height": 2296559,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 2xnhuzFekctCcLinYjoLg4uEVBpoZjVotgnk2Egytzvu
Next: DBy9stz42rs9A7ynwxNpbWv5DWbzLasy2HkLKGrpXgic
Diff:
Old | New | | Differences |
---|
8 | 8 | | let c = base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ' |
---|
9 | 9 | | |
---|
10 | 10 | | @Callable(d) |
---|
11 | | - | func switchLongToShort (e,f) = if ((d.caller != this)) |
---|
| 11 | + | func switchLongToShort (e,f,g) = if ((d.caller != this)) |
---|
12 | 12 | | then throw("you are not allowed to change positions!") |
---|
13 | 13 | | else { |
---|
14 | | - | let g = Address(fromBase58String(e)) |
---|
15 | | - | let h = invoke(g, "closePosition", nil, nil) |
---|
16 | | - | if ((h == h)) |
---|
| 14 | + | let h = Address(fromBase58String(e)) |
---|
| 15 | + | let i = invoke(h, "closePosition", nil, nil) |
---|
| 16 | + | if ((i == i)) |
---|
17 | 17 | | then { |
---|
18 | | - | let i = invoke(g, "increasePosition", [b, f, 1, ""], [d.payments[0]]) |
---|
19 | | - | if ((i == i)) |
---|
| 18 | + | let j = invoke(h, "increasePosition", [b, g, 1, ""], [AttachedPayment(c, (f * 1000000))]) |
---|
| 19 | + | if ((j == j)) |
---|
20 | 20 | | then { |
---|
21 | | - | let j = assetBalance(this, c) |
---|
22 | | - | [ScriptTransfer(d.caller, j, c)] |
---|
| 21 | + | let k = assetBalance(this, c) |
---|
| 22 | + | [ScriptTransfer(d.caller, k, c)] |
---|
23 | 23 | | } |
---|
24 | 24 | | else throw("Strict value is not equal to itself.") |
---|
25 | 25 | | } |
---|
|
29 | 29 | | |
---|
30 | 30 | | |
---|
31 | 31 | | @Callable(d) |
---|
32 | | - | func switchShortToLong (e,f) = if ((d.caller != this)) |
---|
| 32 | + | func switchShortToLong (e,f,g) = if ((d.caller != this)) |
---|
33 | 33 | | then throw("you are not allowed to switch positions") |
---|
34 | 34 | | else { |
---|
35 | | - | let g = Address(fromBase58String(e)) |
---|
36 | | - | let h = invoke(g, "closePosition", nil, nil) |
---|
37 | | - | if ((h == h)) |
---|
| 35 | + | let h = Address(fromBase58String(e)) |
---|
| 36 | + | let i = invoke(h, "closePosition", nil, nil) |
---|
| 37 | + | if ((i == i)) |
---|
38 | 38 | | then { |
---|
39 | | - | let i = invoke(g, "increasePosition", [a, f, 1, ""], [d.payments[0]]) |
---|
40 | | - | if ((i == i)) |
---|
| 39 | + | let j = invoke(h, "increasePosition", [a, g, 1, ""], [AttachedPayment(c, (f * 1000000))]) |
---|
| 40 | + | if ((j == j)) |
---|
41 | 41 | | then { |
---|
42 | | - | let j = assetBalance(this, c) |
---|
43 | | - | [ScriptTransfer(d.caller, j, c)] |
---|
| 42 | + | let k = assetBalance(this, c) |
---|
| 43 | + | [ScriptTransfer(d.caller, k, c)] |
---|
44 | 44 | | } |
---|
45 | 45 | | else throw("Strict value is not equal to itself.") |
---|
46 | 46 | | } |
---|
|
48 | 48 | | } |
---|
49 | 49 | | |
---|
50 | 50 | | |
---|
51 | | - | @Verifier(k) |
---|
52 | | - | func l () = sigVerify(k.bodyBytes, k.proofs[0], k.senderPublicKey) |
---|
| 51 | + | @Verifier(l) |
---|
| 52 | + | func m () = sigVerify(l.bodyBytes, l.proofs[0], l.senderPublicKey) |
---|
53 | 53 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = 1 |
---|
5 | 5 | | |
---|
6 | 6 | | let b = 2 |
---|
7 | 7 | | |
---|
8 | 8 | | let c = base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ' |
---|
9 | 9 | | |
---|
10 | 10 | | @Callable(d) |
---|
11 | | - | func switchLongToShort (e,f) = if ((d.caller != this)) |
---|
| 11 | + | func switchLongToShort (e,f,g) = if ((d.caller != this)) |
---|
12 | 12 | | then throw("you are not allowed to change positions!") |
---|
13 | 13 | | else { |
---|
14 | | - | let g = Address(fromBase58String(e)) |
---|
15 | | - | let h = invoke(g, "closePosition", nil, nil) |
---|
16 | | - | if ((h == h)) |
---|
| 14 | + | let h = Address(fromBase58String(e)) |
---|
| 15 | + | let i = invoke(h, "closePosition", nil, nil) |
---|
| 16 | + | if ((i == i)) |
---|
17 | 17 | | then { |
---|
18 | | - | let i = invoke(g, "increasePosition", [b, f, 1, ""], [d.payments[0]]) |
---|
19 | | - | if ((i == i)) |
---|
| 18 | + | let j = invoke(h, "increasePosition", [b, g, 1, ""], [AttachedPayment(c, (f * 1000000))]) |
---|
| 19 | + | if ((j == j)) |
---|
20 | 20 | | then { |
---|
21 | | - | let j = assetBalance(this, c) |
---|
22 | | - | [ScriptTransfer(d.caller, j, c)] |
---|
| 21 | + | let k = assetBalance(this, c) |
---|
| 22 | + | [ScriptTransfer(d.caller, k, c)] |
---|
23 | 23 | | } |
---|
24 | 24 | | else throw("Strict value is not equal to itself.") |
---|
25 | 25 | | } |
---|
26 | 26 | | else throw("Strict value is not equal to itself.") |
---|
27 | 27 | | } |
---|
28 | 28 | | |
---|
29 | 29 | | |
---|
30 | 30 | | |
---|
31 | 31 | | @Callable(d) |
---|
32 | | - | func switchShortToLong (e,f) = if ((d.caller != this)) |
---|
| 32 | + | func switchShortToLong (e,f,g) = if ((d.caller != this)) |
---|
33 | 33 | | then throw("you are not allowed to switch positions") |
---|
34 | 34 | | else { |
---|
35 | | - | let g = Address(fromBase58String(e)) |
---|
36 | | - | let h = invoke(g, "closePosition", nil, nil) |
---|
37 | | - | if ((h == h)) |
---|
| 35 | + | let h = Address(fromBase58String(e)) |
---|
| 36 | + | let i = invoke(h, "closePosition", nil, nil) |
---|
| 37 | + | if ((i == i)) |
---|
38 | 38 | | then { |
---|
39 | | - | let i = invoke(g, "increasePosition", [a, f, 1, ""], [d.payments[0]]) |
---|
40 | | - | if ((i == i)) |
---|
| 39 | + | let j = invoke(h, "increasePosition", [a, g, 1, ""], [AttachedPayment(c, (f * 1000000))]) |
---|
| 40 | + | if ((j == j)) |
---|
41 | 41 | | then { |
---|
42 | | - | let j = assetBalance(this, c) |
---|
43 | | - | [ScriptTransfer(d.caller, j, c)] |
---|
| 42 | + | let k = assetBalance(this, c) |
---|
| 43 | + | [ScriptTransfer(d.caller, k, c)] |
---|
44 | 44 | | } |
---|
45 | 45 | | else throw("Strict value is not equal to itself.") |
---|
46 | 46 | | } |
---|
47 | 47 | | else throw("Strict value is not equal to itself.") |
---|
48 | 48 | | } |
---|
49 | 49 | | |
---|
50 | 50 | | |
---|
51 | | - | @Verifier(k) |
---|
52 | | - | func l () = sigVerify(k.bodyBytes, k.proofs[0], k.senderPublicKey) |
---|
| 51 | + | @Verifier(l) |
---|
| 52 | + | func m () = sigVerify(l.bodyBytes, l.proofs[0], l.senderPublicKey) |
---|
53 | 53 | | |
---|