tx · E3QUQ9babF8rejcj5DDXAxMHN67K5QssFH7v9sASqs6v
3N5Ju64uTPuaR4M4f9YB5LRYRNJ382MWrat: -0.00600000 Waves
2022.09.29 17:44 [2250534] smart account 3N5Ju64uTPuaR4M4f9YB5LRYRNJ382MWrat > SELF 0.00000000 Waves
{
"type": 13,
"id": "E3QUQ9babF8rejcj5DDXAxMHN67K5QssFH7v9sASqs6v",
"fee": 600000,
"feeAssetId": null,
"timestamp": 1664462683020,
"version": 2,
"chainId": 84,
"sender": "3N5Ju64uTPuaR4M4f9YB5LRYRNJ382MWrat",
"senderPublicKey": "AwWYbCDs6GDxAT6diG2mfEqD7tFz9JXu9k234FS135kR",
"proofs": [
"5hj5zHX37kJabozfQEpcHijBA8ePuXE2NveqwUd9PLQEcpdYzktSjVbkrhs6cEvFDPBbgK2S5662xHFwC1sbjWM4"
],
"script": "base64:AAIFAAAAAAAAAAgIAhIECgIIAQAAAAYAAAAABXJ1bGVyAgAAACxCZ3hwQ200d3hiVzhTS0xQS1puZjRLVTJENlpVMjlvdjhNZ1pya2FTQXFwWQAAAAAIYm9ibWFfaWQCAAAALDV4eXJVb0p1WEpjWXhjOFJmcm9XajRRZUxhdzZ4aEJmQWRTcmVTdFlDUk1uAAAAAAhidWdnc19pZAIAAAAsSDVVVXVQSjdXQlh6amc2WjFhaEJVeGo3VldvVkZGZkczQk16eUFBblJXdDYBAAAADmdldEFzc2V0U3RyaW5nAAAAAQAAAAdhc3NldElkBAAAAAckbWF0Y2gwBQAAAAdhc3NldElkAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAFiBQAAAAckbWF0Y2gwCQACWAAAAAEFAAAAAWICAAAABVdBVkVTAQAAAA1nZXRBc3NldEJ5dGVzAAAAAQAAAAdhc3NldElkAwkAAAAAAAACBQAAAAdhc3NldElkAgAAAAVXQVZFUwUAAAAEdW5pdAkAAlkAAAABBQAAAAdhc3NldElkAQAAAAlteUJhbGFuY2UAAAABAAA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MAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkt9tLp",
"height": 2250534,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 6vVHmgqPevTKeDZUg8j8CKm6MrUqptfsDDJVz2gVyM28
Next: DDpUWDq62oidgqFWr8YRJax3Y7f8Q5UmYnsTkmPWrNZ8
Diff:
Old | New | | Differences |
---|
36 | 36 | | |
---|
37 | 37 | | @Callable(j) |
---|
38 | 38 | | func swap (k,l) = { |
---|
39 | | - | let m = toString(j.caller) |
---|
40 | | - | let n = toBase58String(j.callerPublicKey) |
---|
41 | | - | let o = i(h(b)) |
---|
42 | | - | let p = i(h(c)) |
---|
43 | | - | if ((n == a)) |
---|
44 | | - | then throw(((("No-no-no bomba: " + toString(o)) + ", buggs: ") + toString(p))) |
---|
| 39 | + | let m = toBase58String(j.callerPublicKey) |
---|
| 40 | + | if ((m != a)) |
---|
| 41 | + | then throw("No-no-no") |
---|
45 | 42 | | else { |
---|
46 | | - | let q = j.payments[0] |
---|
47 | | - | let r = value(q.assetId) |
---|
48 | | - | let s = value(q.amount) |
---|
49 | | - | [IntegerEntry("op", 1)] |
---|
| 43 | + | let n = i(h(b)) |
---|
| 44 | + | let o = i(h(c)) |
---|
| 45 | + | let p = j.payments[0] |
---|
| 46 | + | let q = value(p.assetId) |
---|
| 47 | + | let r = value(p.amount) |
---|
| 48 | + | let s = (r * 2) |
---|
| 49 | + | [ScriptTransfer(j.caller, s, h(k))] |
---|
50 | 50 | | } |
---|
51 | 51 | | } |
---|
52 | 52 | | |
---|
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 swap (k,l) = { |
---|
39 | | - | let m = toString(j.caller) |
---|
40 | | - | let n = toBase58String(j.callerPublicKey) |
---|
41 | | - | let o = i(h(b)) |
---|
42 | | - | let p = i(h(c)) |
---|
43 | | - | if ((n == a)) |
---|
44 | | - | then throw(((("No-no-no bomba: " + toString(o)) + ", buggs: ") + toString(p))) |
---|
| 39 | + | let m = toBase58String(j.callerPublicKey) |
---|
| 40 | + | if ((m != a)) |
---|
| 41 | + | then throw("No-no-no") |
---|
45 | 42 | | else { |
---|
46 | | - | let q = j.payments[0] |
---|
47 | | - | let r = value(q.assetId) |
---|
48 | | - | let s = value(q.amount) |
---|
49 | | - | [IntegerEntry("op", 1)] |
---|
| 43 | + | let n = i(h(b)) |
---|
| 44 | + | let o = i(h(c)) |
---|
| 45 | + | let p = j.payments[0] |
---|
| 46 | + | let q = value(p.assetId) |
---|
| 47 | + | let r = value(p.amount) |
---|
| 48 | + | let s = (r * 2) |
---|
| 49 | + | [ScriptTransfer(j.caller, s, h(k))] |
---|
50 | 50 | | } |
---|
51 | 51 | | } |
---|
52 | 52 | | |
---|
53 | 53 | | |
---|
54 | 54 | | @Verifier(t) |
---|
55 | 55 | | func u () = sigVerify(t.bodyBytes, t.proofs[0], t.senderPublicKey) |
---|
56 | 56 | | |
---|