tx · EKxJ2EDq1ENFJNLCDDRWXkWUg57BvYHNejYWdpN6h3pZ
3MqxFhe869ri22Y1418TcrXUX2X9YMzG2Yb: -0.01400000 Waves
2019.06.28 05:45 [561399] smart account 3MqxFhe869ri22Y1418TcrXUX2X9YMzG2Yb > SELF 0.00000000 Waves
{
"type": 13,
"id": "EKxJ2EDq1ENFJNLCDDRWXkWUg57BvYHNejYWdpN6h3pZ",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1561689980105,
"version": 1,
"sender": "3MqxFhe869ri22Y1418TcrXUX2X9YMzG2Yb",
"senderPublicKey": "FRkBvFhV1T95mPTxp7sk2Ms2BuHViwyG7yPzxpxye1Kw",
"proofs": [
"3L8Sog73rdbxXujVvgwkVf3VZW7eKikXC1KPoUimzoYc8gYns4QcTpdcUGVUWuyQCoqWS5G8RA9kYXkfKNbVWHGU"
],
"script": "base64:AAIDAAAAAAAAAAAAAAAFAAAAAAhwcmljZWFkdgAAAAAAAJiWgAAAAAASYWxsTWVzc2FnZUJvYXJkS2V5AgAAAAthbGxfbWVzc2FnZQAAAAAQYWN0aXZlTWVzc2FnZUtleQIAAAAOYWN0aXZlX21lc3NhZ2UBAAAACXVuaXF1ZUtleQAAAAIAAAAFb3duZXIAAAAEdGV4dAQAAAAEdUtleQkAAlgAAAABCQAB9wAAAAEJAAGbAAAAAQkAASwAAAACBQAAAAVvd25lcgUAAAAEdGV4dAUAAAAEdUtleQEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAADbnVtBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABQAAAANudW0AAAABAAAAAWkBAAAABnNldEFkdgAAAAEAAAAEdGV4dAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQDCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQAAAgAAAAECAAAAHldBVkVTIHRva2VuIG9ubHkgYXQgdGhlIG1vbWVudAMJAQAAAAIhPQAAAAIIBQAAAANwbXQAAAAGYW1vdW50BQAAAAhwcmljZWFkdgkAAAIAAAABAgAAABZZb3UgbmVlZCBwYXkgMC4xIFdBVkVTBAAAAAxvd25lckFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAEdUtleQkBAAAACXVuaXF1ZUtleQAAAAIFAAAADG93bmVyQWRkcmVzcwUAAAAEdGV4dAQAAAAKYWxsTWVzc2FnZQkBAAAADmdldE51bWJlckJ5S2V5AAAAAQUAAAASYWxsTWVzc2FnZUJvYXJkS2V5BAAAAAphY3RNZXNzYWdlCQEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABBQAAABBhY3RpdmVNZXNzYWdlS2V5CQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAICAAAABm93bmVyXwUAAAAEdUtleQUAAAAMb3duZXJBZGRyZXNzCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAICAAAACG1lc3NhZ2VfBQAAAAR1S2V5BQAAAAR0ZXh0CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABJhbGxNZXNzYWdlQm9hcmRLZXkJAABkAAAAAgUAAAAKYWxsTWVzc2FnZQAAAAAAAAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAQYWN0aXZlTWVzc2FnZUtleQkAAGQAAAACBQAAAAphY3RNZXNzYWdlAAAAAAAAAAABBQAAAANuaWwAAAAAmN4UqA==",
"chainId": 84,
"height": 561399,
"spentComplexity": 0
}
View: original | compacted
Prev: 3VrtCofmHSmCCAxwkTZmDFxocb1kMAajDHxXwpXArEyG
Next: 6V5htFLFAefvn6jwNrPdn5noA7Z8GLkTFE7Lc84Gr6A7
Diff:
Old | New | | Differences |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = 10000000 |
---|
5 | 5 | | |
---|
6 | | - | func b (c,d) = { |
---|
7 | | - | let e = toBase58String(sha256(toBytes((c + d)))) |
---|
8 | | - | e |
---|
| 6 | + | let b = "all_message" |
---|
| 7 | + | |
---|
| 8 | + | let c = "active_message" |
---|
| 9 | + | |
---|
| 10 | + | func d (e,f) = { |
---|
| 11 | + | let g = toBase58String(sha256(toBytes((e + f)))) |
---|
| 12 | + | g |
---|
9 | 13 | | } |
---|
10 | 14 | | |
---|
11 | 15 | | |
---|
12 | | - | @Callable(f) |
---|
13 | | - | func setAdv (d) = { |
---|
14 | | - | let g = extract(f.payment) |
---|
15 | | - | if (isDefined(g.assetId)) |
---|
| 16 | + | func h (i) = { |
---|
| 17 | + | let j = { |
---|
| 18 | + | let k = getInteger(this, i) |
---|
| 19 | + | if ($isInstanceOf(k, "Int")) |
---|
| 20 | + | then { |
---|
| 21 | + | let l = k |
---|
| 22 | + | l |
---|
| 23 | + | } |
---|
| 24 | + | else 0 |
---|
| 25 | + | } |
---|
| 26 | + | j |
---|
| 27 | + | } |
---|
| 28 | + | |
---|
| 29 | + | |
---|
| 30 | + | @Callable(m) |
---|
| 31 | + | func setAdv (f) = { |
---|
| 32 | + | let n = extract(m.payment) |
---|
| 33 | + | if (isDefined(n.assetId)) |
---|
16 | 34 | | then throw("WAVES token only at the moment") |
---|
17 | | - | else if ((g.amount != a)) |
---|
| 35 | + | else if ((n.amount != a)) |
---|
18 | 36 | | then throw("You need pay 0.1 WAVES") |
---|
19 | 37 | | else { |
---|
20 | | - | let h = toBase58String(f.caller.bytes) |
---|
21 | | - | let e = b(h, d) |
---|
22 | | - | WriteSet([DataEntry(("owner_" + e), h), DataEntry(("message_" + e), d)]) |
---|
| 38 | + | let o = toBase58String(m.caller.bytes) |
---|
| 39 | + | let g = d(o, f) |
---|
| 40 | + | let p = h(b) |
---|
| 41 | + | let q = h(c) |
---|
| 42 | + | WriteSet([DataEntry(("owner_" + g), o), DataEntry(("message_" + g), f), DataEntry(b, (p + 1)), DataEntry(c, (q + 1))]) |
---|
23 | 43 | | } |
---|
24 | 44 | | } |
---|
25 | 45 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = 10000000 |
---|
5 | 5 | | |
---|
6 | | - | func b (c,d) = { |
---|
7 | | - | let e = toBase58String(sha256(toBytes((c + d)))) |
---|
8 | | - | e |
---|
| 6 | + | let b = "all_message" |
---|
| 7 | + | |
---|
| 8 | + | let c = "active_message" |
---|
| 9 | + | |
---|
| 10 | + | func d (e,f) = { |
---|
| 11 | + | let g = toBase58String(sha256(toBytes((e + f)))) |
---|
| 12 | + | g |
---|
9 | 13 | | } |
---|
10 | 14 | | |
---|
11 | 15 | | |
---|
12 | | - | @Callable(f) |
---|
13 | | - | func setAdv (d) = { |
---|
14 | | - | let g = extract(f.payment) |
---|
15 | | - | if (isDefined(g.assetId)) |
---|
| 16 | + | func h (i) = { |
---|
| 17 | + | let j = { |
---|
| 18 | + | let k = getInteger(this, i) |
---|
| 19 | + | if ($isInstanceOf(k, "Int")) |
---|
| 20 | + | then { |
---|
| 21 | + | let l = k |
---|
| 22 | + | l |
---|
| 23 | + | } |
---|
| 24 | + | else 0 |
---|
| 25 | + | } |
---|
| 26 | + | j |
---|
| 27 | + | } |
---|
| 28 | + | |
---|
| 29 | + | |
---|
| 30 | + | @Callable(m) |
---|
| 31 | + | func setAdv (f) = { |
---|
| 32 | + | let n = extract(m.payment) |
---|
| 33 | + | if (isDefined(n.assetId)) |
---|
16 | 34 | | then throw("WAVES token only at the moment") |
---|
17 | | - | else if ((g.amount != a)) |
---|
| 35 | + | else if ((n.amount != a)) |
---|
18 | 36 | | then throw("You need pay 0.1 WAVES") |
---|
19 | 37 | | else { |
---|
20 | | - | let h = toBase58String(f.caller.bytes) |
---|
21 | | - | let e = b(h, d) |
---|
22 | | - | WriteSet([DataEntry(("owner_" + e), h), DataEntry(("message_" + e), d)]) |
---|
| 38 | + | let o = toBase58String(m.caller.bytes) |
---|
| 39 | + | let g = d(o, f) |
---|
| 40 | + | let p = h(b) |
---|
| 41 | + | let q = h(c) |
---|
| 42 | + | WriteSet([DataEntry(("owner_" + g), o), DataEntry(("message_" + g), f), DataEntry(b, (p + 1)), DataEntry(c, (q + 1))]) |
---|
23 | 43 | | } |
---|
24 | 44 | | } |
---|
25 | 45 | | |
---|
26 | 46 | | |
---|