tx · 7HrFimZchu1FretWi8PisaGHt3VQssvPt5m3Q3TwRwyP 3MsZenewD5qTK1WUbzrWnRe7NtP4Xq59LQL: -0.01000000 Waves 2019.02.28 19:02 [515494] smart account 3MsZenewD5qTK1WUbzrWnRe7NtP4Xq59LQL > SELF 0.00000000 Waves
{ "type": 13, "id": "7HrFimZchu1FretWi8PisaGHt3VQssvPt5m3Q3TwRwyP", "fee": 1000000, "feeAssetId": null, "timestamp": 1551369717045, "version": 1, "sender": "3MsZenewD5qTK1WUbzrWnRe7NtP4Xq59LQL", "senderPublicKey": "DfYkLCbsukr8ewAAU72PDr2Rmgv2EtDeR7xhKGYvBoWb", "proofs": [ "5vCmvULW7rEijQTkXgegaUSFHeqG338XvSdaQK1NzMpdU97eK96XichzYf3VD9snZ9D7FbFrnQGHa7gTHtMguLj5" ], "script": "base64:AQQAAAAGc2VuZGVyCAUAAAACdHgAAAAGc2VuZGVyBAAAAAVhc3NldAEAAAAgS7ylEbXmJnP3FyAar4/XEq87Ap4/H5lQ6r7CY+D8+U0EAAAACmRpZmZpY3VsdHkJAQAAAAdleHRyYWN0AAAAAQkABBoAAAACBQAAAAZzZW5kZXICAAAACmRpZmZpY3VsdHkEAAAAEGxhc3RVcGRhdGVIZWlnaHQJAQAAAAdleHRyYWN0AAAAAQkABBoAAAACBQAAAAZzZW5kZXICAAAAEGxhc3RVcGRhdGVIZWlnaHQEAAAAEWxhc3RVcGRhdGVCYWxhbmNlCQEAAAAHZXh0cmFjdAAAAAEJAAQaAAAAAgUAAAAGc2VuZGVyAgAAABFsYXN0VXBkYXRlQmFsYW5jZQQAAAAOY3VycmVudEJhbGFuY2UJAAPrAAAAAgUAAAAGc2VuZGVyBQAAAAVhc3NldAQAAAAOdmFsaWRpdHlQZXJpb2QAAAAAAAAAABQEAAAADnRyYW5zZmVyQW1vdW50AAAAAAAAAAABBAAAAAptaW5pbmdSYXRlAAAAAAAAAABkBAAAAA1taW5EaWZmaWN1bHR5AAAAAAAAAAAUBAAA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84, "height": 515494, "spentComplexity": 0 } View: original | compacted Prev: none Next: 4gTdL1t5mPQQu7bqeiGDJm4e1jztPA228mBDsnZ89UpP Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 1 #-} | |
2 | + | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | + | let sender = tx.sender | |
4 | + | let asset = base58'66eR7aymnuiQf87pQJvZQb25YtfHGm4iJkhs3qsrNEgC' | |
5 | + | let difficulty = extract(getInteger(sender, "difficulty")) | |
6 | + | let lastUpdateHeight = extract(getInteger(sender, "lastUpdateHeight")) | |
7 | + | let lastUpdateBalance = extract(getInteger(sender, "lastUpdateBalance")) | |
8 | + | let currentBalance = assetBalance(sender, asset) | |
9 | + | let validityPeriod = 20 | |
10 | + | let transferAmount = 1 | |
11 | + | let miningRate = 100 | |
12 | + | let minDifficulty = 20 | |
13 | + | let maxDifficulty = 64 | |
14 | + | match tx { | |
15 | + | case tx: TransferTransaction => | |
16 | + | let byte0LeadingZeros = extract(getInteger(sender, toBase58String(take(tx.id, 1)))) | |
17 | + | let byte1LeadingZeros = extract(getInteger(sender, toBase58String(takeRightBytes(take(tx.id, 2), 1)))) | |
18 | + | let byte2LeadingZeros = extract(getInteger(sender, toBase58String(takeRightBytes(take(tx.id, 3), 1)))) | |
19 | + | let byte3LeadingZeros = extract(getInteger(sender, toBase58String(takeRightBytes(take(tx.id, 4), 1)))) | |
20 | + | let byte4LeadingZeros = extract(getInteger(sender, toBase58String(takeRightBytes(take(tx.id, 5), 1)))) | |
21 | + | let byte5LeadingZeros = extract(getInteger(sender, toBase58String(takeRightBytes(take(tx.id, 6), 1)))) | |
22 | + | let byte6LeadingZeros = extract(getInteger(sender, toBase58String(takeRightBytes(take(tx.id, 7), 1)))) | |
23 | + | let byte7LeadingZeros = extract(getInteger(sender, toBase58String(takeRightBytes(take(tx.id, 8), 1)))) | |
24 | + | let firstZeroBits = if ((byte0LeadingZeros != 8)) | |
25 | + | then byte0LeadingZeros | |
26 | + | else (8 + (if ((byte1LeadingZeros != 8)) | |
27 | + | then byte1LeadingZeros | |
28 | + | else (8 + (if ((byte2LeadingZeros != 8)) | |
29 | + | then byte2LeadingZeros | |
30 | + | else (8 + (if ((byte3LeadingZeros != 8)) | |
31 | + | then byte3LeadingZeros | |
32 | + | else (8 + (if ((byte4LeadingZeros != 8)) | |
33 | + | then byte4LeadingZeros | |
34 | + | else (8 + (if ((byte5LeadingZeros != 8)) | |
35 | + | then byte5LeadingZeros | |
36 | + | else (8 + (if ((byte6LeadingZeros != 8)) | |
37 | + | then byte6LeadingZeros | |
38 | + | else (8 + byte7LeadingZeros))))))))))))) | |
39 | + | if (if (if (if (if (if ((validityPeriod > (height - lastUpdateHeight))) | |
40 | + | then (firstZeroBits >= difficulty) | |
41 | + | else false) | |
42 | + | then (tx.amount == transferAmount) | |
43 | + | else false) | |
44 | + | then (tx.assetId == asset) | |
45 | + | else false) | |
46 | + | then (tx.fee == 500000) | |
47 | + | else false) | |
48 | + | then !(isDefined(tx.feeAssetId)) | |
49 | + | else false) | |
50 | + | then (tx.attachment == toBytes(lastUpdateHeight)) | |
51 | + | else false | |
52 | + | case tx: DataTransaction => | |
53 | + | let delta = if (((miningRate / 4) > (lastUpdateBalance - currentBalance))) | |
54 | + | then (miningRate / 4) | |
55 | + | else if (((lastUpdateBalance - currentBalance) > (miningRate * 4))) | |
56 | + | then (miningRate * 4) | |
57 | + | else (lastUpdateBalance - currentBalance) | |
58 | + | let newDifficulty0 = ((difficulty * delta) / miningRate) | |
59 | + | let newDifficulty = if ((minDifficulty > newDifficulty0)) | |
60 | + | then minDifficulty | |
61 | + | else if ((newDifficulty0 > maxDifficulty)) | |
62 | + | then maxDifficulty | |
63 | + | else newDifficulty0 | |
64 | + | if (if (if (if (if (((height - lastUpdateHeight) >= validityPeriod)) | |
65 | + | then (size(tx.data) == 3) | |
66 | + | else false) | |
67 | + | then (extract(getInteger(tx.data, "difficulty")) == newDifficulty) | |
68 | + | else false) | |
69 | + | then (extract(getInteger(tx.data, "lastUpdateHeight")) == height) | |
70 | + | else false) | |
71 | + | then (extract(getInteger(tx.data, "lastUpdateBalance")) == currentBalance) | |
72 | + | else false) | |
73 | + | then (tx.fee == 500000) | |
74 | + | else false | |
75 | + | case _ => | |
76 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
77 | + | } |
github/deemru/w8io/169f3d6 16.18 ms ◑