tx · 9L5a8Ky22vQ4ZF9fjUYkFJvHqpYCndqELLccmPi4YQFm 3N1pxXq7yj4m5oHSustCbK6aJ3hWVzyS46z: -0.01000000 Waves 2018.12.16 12:44 [407211] smart account 3N1pxXq7yj4m5oHSustCbK6aJ3hWVzyS46z > SELF 0.00000000 Waves
{ "type": 13, "id": "9L5a8Ky22vQ4ZF9fjUYkFJvHqpYCndqELLccmPi4YQFm", "fee": 1000000, "feeAssetId": null, "timestamp": 1544953513276, "version": 1, "sender": "3N1pxXq7yj4m5oHSustCbK6aJ3hWVzyS46z", "senderPublicKey": "ETe7SmVkpWs5WfzDG96mry7iZseh2s7ns21TG3rSwEMv", "proofs": [ "5rxyaNaTHmAXzSXhzFEHB7exv9sGaomdpyGi8T9jvFbiG6QWMYEuahbrjfPagB8uA8meGRRTs5mvf3DsahGNU39A" ], "script": "base64:AQQAAAAHY3JlYXRvcgkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQIAAAAjM05DdDJqcm4xMkdaaVdDVXhibkN0cFlOeFd3NFhEcDNHRXkEAAAAAm1lCAUAAAACdHgAAAAGc2VuZGVyBAAAAAR3YXZlAAAAAAAF9eEABAAAAApzZWNyZXRIYXNoAQAAACDI3K2ZF5fcMkBEEEW6U61gGY0YzH1Z+84QoiOauuhEhAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAMJAQAAAAEhAAAAAQkBAAAACWlzRGVmaW5lZAAAAAEJAAQcAAAAAgUAAAACbWUCAAAAB3BheW1lbnQEAAAACXBheW1lbnRUeAkAA+gAAAABCQEAAAAHZXh0cmFjdAAAAAEJAAQSAAAAAggFAAAAAXQAAAAEZGF0YQIAAAAHcGF5bWVudAQAAAAOaXNQYXltZW50VmFsaWQEAAAAByRtYXRjaDEFAAAACXBheW1lbnRUeAMJAAABAAAAAgUAAAAHJG1hdGNoMQIAAA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0Zyb21TdHJpbmcAAAABAgAAAAAEAAAABndpbm5lcgMJAAAAAAAAAgkBAAAAB2V4dHJhY3QAAAABCQAEHAAAAAIFAAAAAm1lAgAAAAVndWVzcwUAAAAGc2VjcmV0BQAAAAdndWVzc2VyBQAAAAdjcmVhdG9yAwMFAAAADGlzUHJvb2ZWYWxpZAkAAAAAAAACCAUAAAAGcGF5b3V0AAAACXJlY2lwaWVudAUAAAAGd2lubmVyBwkAAGcAAAACCQAAaQAAAAIFAAAABHdhdmUAAAAAAAAAAMgIBQAAAAZwYXlvdXQAAAADZmVlBwfgePZ5", "chainId": 84, "height": 407211, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 1 #-} | |
2 | + | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | + | let creator = addressFromString("3NCt2jrn12GZiWCUxbnCtpYNxWw4XDp3GEy") | |
4 | + | let me = tx.sender | |
5 | + | let wave = 100000000 | |
6 | + | let secretHash = base58'EX5i63vQjFgxHdqyXKsiXnNRrAnznW6dGnzpdwPqp5Fq' | |
7 | + | match tx { | |
8 | + | case t: DataTransaction => | |
9 | + | if (!(isDefined(getBinary(me, "payment")))) | |
10 | + | then { | |
11 | + | let paymentTx = transactionById(extract(getBinary(t.data, "payment"))) | |
12 | + | let isPaymentValid = match paymentTx { | |
13 | + | case payment: TransferTransaction => | |
14 | + | if (if ((payment.amount == (1 * wave))) | |
15 | + | then (payment.recipient == me) | |
16 | + | else false) | |
17 | + | then sigVerify(payment.bodyBytes, payment.proofs[0], payment.senderPublicKey) | |
18 | + | else false | |
19 | + | case _ => | |
20 | + | false | |
21 | + | } | |
22 | + | let guess = extract(getBinary(t.data, "guess")) | |
23 | + | if (if (isPaymentValid) | |
24 | + | then (size(guess) == 1) | |
25 | + | else false) | |
26 | + | then (size(t.data) == 2) | |
27 | + | else false | |
28 | + | } | |
29 | + | else false | |
30 | + | case payout: TransferTransaction => | |
31 | + | let secret = take(payout.proofs[0], 1) | |
32 | + | let isProofValid = (sha256(payout.proofs[0]) == secretHash) | |
33 | + | let guesser = match transactionById(extract(getBinary(me, "payment"))) { | |
34 | + | case p: TransferTransaction => | |
35 | + | p.sender | |
36 | + | case _ => | |
37 | + | addressFromString("") | |
38 | + | } | |
39 | + | let winner = if ((extract(getBinary(me, "guess")) == secret)) | |
40 | + | then guesser | |
41 | + | else creator | |
42 | + | if (if (isProofValid) | |
43 | + | then (payout.recipient == winner) | |
44 | + | else false) | |
45 | + | then ((wave / 200) >= payout.fee) | |
46 | + | else false | |
47 | + | case _ => | |
48 | + | false | |
49 | + | } |
github/deemru/w8io/026f985 16.15 ms ◑