tx · 966iURjdFwRzoAnk3AdtLMob75U4ZycvuGRFvKLtMrtH
3MsfPLcgQY8V3SpQss9hw5ydZ3SdoooQ9xy: -0.00700000 Waves
2022.09.29 20:13 [2250684] smart account 3MsfPLcgQY8V3SpQss9hw5ydZ3SdoooQ9xy > SELF 0.00000000 Waves
{
"type": 13,
"id": "966iURjdFwRzoAnk3AdtLMob75U4ZycvuGRFvKLtMrtH",
"fee": 700000,
"feeAssetId": null,
"timestamp": 1664471730472,
"version": 2,
"chainId": 84,
"sender": "3MsfPLcgQY8V3SpQss9hw5ydZ3SdoooQ9xy",
"senderPublicKey": "4mZ3UeajXYuJVqUiK9DfeKYAVuR279UJFfMQi4WBbBnf",
"proofs": [
"4PWkt5AerpVp1iGvDpB8kbHQ5Mj37dqB9bZKZBqvSAJNhiWa1dL97rhxTVygbehVw945kTWyB1EGuGbtPgWgf3xD"
],
"script": "base64:AAIFAAAAAAAAAAwIAhIICgYICAgICAEAAAAGAAAAAAVydWxlcgIAAAAsQmd4cENtNHd4Ylc4U0tMUEtabmY0S1UyRDZaVTI5b3Y4TWdacmthU0FxcFkAAAAACGJvYm1hX2lkAgAAACw1eHlyVW9KdVhKY1l4YzhSZnJvV2o0UWVMYXc2eGhCZkFkU3JlU3RZQ1JNbgAAAAAIYnVnZ3NfaWQCAAAALEg1VVV1UEo3V0JYempnNloxYWhCVXhqN1ZXb1ZGRmZHM0JNenlBQW5SV3Q2AQAAAA5nZXRBc3NldFN0cmluZwAAAAEAAAAHYXNzZXRJZAQAAAAHJG1hdGNoMAUAAAAHYXNzZXRJZAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAKQnl0ZVZlY3RvcgQAAAABYgUAAAAHJG1hdGNoMAkAAlgAAAABBQAAAAFiAgAAAAVXQVZFUwEAAAANZ2V0QXNzZXRCeXRlcwAAAAEAAAAHYXNzZXRJZAMJAAAAAAAAAgUAAAAHYXNzZXRJZAIAAAAFV0FWRVMFAAAABHVuaXQJAAJZAAAAAQUAAA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AACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5MJxuUA==",
"height": 2250684,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 3jgTk36wFLEBiG1DHJRWJYWpLhrbu7ibGzbeV6ZNYrmE
Next: GLyrLF6RKj1TKqJUMZAn4v3p1vV3takXxsrptFNyiTKH
Diff:
Old | New | | Differences |
---|
44 | 44 | | let s = value(r.assetId) |
---|
45 | 45 | | let t = value(r.amount) |
---|
46 | 46 | | let u = if ((m == "p")) |
---|
47 | | - | then invoke(Address(toBytes(l)), "swap", [k, 0], [AttachedPayment(s, t)]) |
---|
48 | | - | else invoke(Address(toBytes(l)), "exchange", [0], [AttachedPayment(s, t)]) |
---|
| 47 | + | then invoke(Address(fromBase58String(l)), "swap", [k, 0], [AttachedPayment(s, t)]) |
---|
| 48 | + | else invoke(Address(fromBase58String(l)), "exchange", [0], [AttachedPayment(s, t)]) |
---|
49 | 49 | | if ((u == u)) |
---|
50 | 50 | | then { |
---|
51 | 51 | | let v = i(h(k)) |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = "BgxpCm4wxbW8SKLPKZnf4KU2D6ZU29ov8MgZrkaSAqpY" |
---|
5 | 5 | | |
---|
6 | 6 | | let b = "5xyrUoJuXJcYxc8RfroWj4QeLaw6xhBfAdSreStYCRMn" |
---|
7 | 7 | | |
---|
8 | 8 | | let c = "H5UUuPJ7WBXzjg6Z1ahBUxj7VWoVFFfG3BMzyAAnRWt6" |
---|
9 | 9 | | |
---|
10 | 10 | | func d (e) = { |
---|
11 | 11 | | let f = e |
---|
12 | 12 | | if ($isInstanceOf(f, "ByteVector")) |
---|
13 | 13 | | then { |
---|
14 | 14 | | let g = f |
---|
15 | 15 | | toBase58String(g) |
---|
16 | 16 | | } |
---|
17 | 17 | | else "WAVES" |
---|
18 | 18 | | } |
---|
19 | 19 | | |
---|
20 | 20 | | |
---|
21 | 21 | | func h (e) = if ((e == "WAVES")) |
---|
22 | 22 | | then unit |
---|
23 | 23 | | else fromBase58String(e) |
---|
24 | 24 | | |
---|
25 | 25 | | |
---|
26 | 26 | | func i (e) = { |
---|
27 | 27 | | let f = e |
---|
28 | 28 | | if ($isInstanceOf(f, "ByteVector")) |
---|
29 | 29 | | then { |
---|
30 | 30 | | let g = f |
---|
31 | 31 | | assetBalance(this, g) |
---|
32 | 32 | | } |
---|
33 | 33 | | else wavesBalance(this).available |
---|
34 | 34 | | } |
---|
35 | 35 | | |
---|
36 | 36 | | |
---|
37 | 37 | | @Callable(j) |
---|
38 | 38 | | func trade (k,l,m,n,o,p) = { |
---|
39 | 39 | | let q = toBase58String(j.callerPublicKey) |
---|
40 | 40 | | if ((q != a)) |
---|
41 | 41 | | then throw("No-no-no") |
---|
42 | 42 | | else { |
---|
43 | 43 | | let r = j.payments[0] |
---|
44 | 44 | | let s = value(r.assetId) |
---|
45 | 45 | | let t = value(r.amount) |
---|
46 | 46 | | let u = if ((m == "p")) |
---|
47 | | - | then invoke(Address(toBytes(l)), "swap", [k, 0], [AttachedPayment(s, t)]) |
---|
48 | | - | else invoke(Address(toBytes(l)), "exchange", [0], [AttachedPayment(s, t)]) |
---|
| 47 | + | then invoke(Address(fromBase58String(l)), "swap", [k, 0], [AttachedPayment(s, t)]) |
---|
| 48 | + | else invoke(Address(fromBase58String(l)), "exchange", [0], [AttachedPayment(s, t)]) |
---|
49 | 49 | | if ((u == u)) |
---|
50 | 50 | | then { |
---|
51 | 51 | | let v = i(h(k)) |
---|
52 | 52 | | let w = if ((m == "p")) |
---|
53 | 53 | | then invoke(Address(toBytes(n)), "swap", [s, 0], [AttachedPayment(h(k), v)]) |
---|
54 | 54 | | else invoke(Address(toBytes(n)), "exchange", [0], [AttachedPayment(h(k), v)]) |
---|
55 | 55 | | if ((w == w)) |
---|
56 | 56 | | then { |
---|
57 | 57 | | let x = i(s) |
---|
58 | 58 | | if ((x > t)) |
---|
59 | 59 | | then [ScriptTransfer(j.caller, x, s)] |
---|
60 | 60 | | else throw(("Ooops, " + toString(x))) |
---|
61 | 61 | | } |
---|
62 | 62 | | else throw("Strict value is not equal to itself.") |
---|
63 | 63 | | } |
---|
64 | 64 | | else throw("Strict value is not equal to itself.") |
---|
65 | 65 | | } |
---|
66 | 66 | | } |
---|
67 | 67 | | |
---|
68 | 68 | | |
---|
69 | 69 | | @Verifier(y) |
---|
70 | 70 | | func z () = sigVerify(y.bodyBytes, y.proofs[0], y.senderPublicKey) |
---|
71 | 71 | | |
---|