tx · yoFPvLMMopFFiAQ5DvX1yShyQckP82qGHgCoMfSXvC8 3MsfPLcgQY8V3SpQss9hw5ydZ3SdoooQ9xy: -0.00700000 Waves 2022.09.29 20:20 [2250690] smart account 3MsfPLcgQY8V3SpQss9hw5ydZ3SdoooQ9xy > SELF 0.00000000 Waves
{ "type": 13, "id": "yoFPvLMMopFFiAQ5DvX1yShyQckP82qGHgCoMfSXvC8", "fee": 700000, "feeAssetId": null, "timestamp": 1664471981933, "version": 2, "chainId": 84, "sender": "3MsfPLcgQY8V3SpQss9hw5ydZ3SdoooQ9xy", "senderPublicKey": "4mZ3UeajXYuJVqUiK9DfeKYAVuR279UJFfMQi4WBbBnf", "proofs": [ "3bAoWSNpioc8qyq6Vq2c2vhSC7CPBNYFRW4pUCK26wwnRYZQ7KZKEJFedEDLabYttGjFmojFijXNaXXZJDaQ7pbz" ], "script": "base64:AAIFAAAAAAAAAAwIAhIICgYICAgICAEAAAAGAAAAAAVydWxlcgIAAAAsQmd4cENtNHd4Ylc4U0tMUEtabmY0S1UyRDZaVTI5b3Y4TWdacmthU0FxcFkAAAAACGJvYm1hX2lkAgAAACw1eHlyVW9KdVhKY1l4YzhSZnJvV2o0UWVMYXc2eGhCZkFkU3JlU3RZQ1JNbgAAAAAIYnVnZ3NfaWQCAAAALEg1VVV1UEo3V0JYempnNloxYWhCVXhqN1ZXb1ZGRmZHM0JNenlBQW5SV3Q2AQAAAA5nZXRBc3NldFN0cmluZwAAAAEAAAAHYXNzZXRJZAQAAAAHJG1hdGNoMAUAAAAHYXNzZXRJZAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAKQnl0ZVZlY3RvcgQAAAABYgUAAAAHJG1hdGNoMAkAAlgAAAABBQAAAAFiAgAAAAVXQVZFUwEAAAANZ2V0QXNzZXRCeXRlcwAAAAEAAAAHYXNzZXRJZAMJAAAAAAAAAgUAAAAHYXNzZXRJZAIAAAAFV0FWRVMFAAAABHVuaXQJAAJZAAAAAQUAAAAHYXNzZX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AAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXmLSBTS", "height": 2250690, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GLyrLF6RKj1TKqJUMZAn4v3p1vV3takXxsrptFNyiTKH Next: 63fsQqUnUJ8USs1LshB7vdFco9srdbdbrqP9ssdWUNwx Diff:
Old | New | Differences | |
---|---|---|---|
52 | 52 | if ((v == v)) | |
53 | 53 | then { | |
54 | 54 | let w = if ((m == "p")) | |
55 | - | then invoke(Address( | |
56 | - | else invoke(Address( | |
55 | + | then invoke(Address(fromBase58String(n)), "swap", [s, 0], [AttachedPayment(h(k), v)]) | |
56 | + | else invoke(Address(fromBase58String(n)), "exchange", [0], [AttachedPayment(h(k), v)]) | |
57 | 57 | if ((w == w)) | |
58 | 58 | then { | |
59 | 59 | let x = i(s) |
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 | 47 | then invoke(Address(fromBase58String(l)), "swap", [k, 0], [AttachedPayment(s, t)]) | |
48 | 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 | if ((v == v)) | |
53 | 53 | then { | |
54 | 54 | let w = if ((m == "p")) | |
55 | - | then invoke(Address( | |
56 | - | else invoke(Address( | |
55 | + | then invoke(Address(fromBase58String(n)), "swap", [s, 0], [AttachedPayment(h(k), v)]) | |
56 | + | else invoke(Address(fromBase58String(n)), "exchange", [0], [AttachedPayment(h(k), v)]) | |
57 | 57 | if ((w == w)) | |
58 | 58 | then { | |
59 | 59 | let x = i(s) | |
60 | 60 | if ((x == x)) | |
61 | 61 | then if ((x > t)) | |
62 | 62 | then [ScriptTransfer(j.caller, x, s)] | |
63 | 63 | else throw(("Ooops, " + toString(x))) | |
64 | 64 | else throw("Strict value is not equal to itself.") | |
65 | 65 | } | |
66 | 66 | else throw("Strict value is not equal to itself.") | |
67 | 67 | } | |
68 | 68 | else throw("Strict value is not equal to itself.") | |
69 | 69 | } | |
70 | 70 | else throw("Strict value is not equal to itself.") | |
71 | 71 | } | |
72 | 72 | } | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | @Verifier(y) | |
76 | 76 | func z () = sigVerify(y.bodyBytes, y.proofs[0], y.senderPublicKey) | |
77 | 77 |
github/deemru/w8io/169f3d6 74.95 ms ◑