tx · XEgPcpR8AydEz11vQfvuVuzKgaWJRBeBUTMr1tMV6zM 3Mr8tw7M4oNh8uPKtYizoBgwXjNzUdfZc4L: -0.01000000 Waves 2018.12.16 12:50 [407217] smart account 3Mr8tw7M4oNh8uPKtYizoBgwXjNzUdfZc4L > SELF 0.00000000 Waves
{ "type": 13, "id": "XEgPcpR8AydEz11vQfvuVuzKgaWJRBeBUTMr1tMV6zM", "fee": 1000000, "feeAssetId": null, "timestamp": 1544953880385, "version": 1, "sender": "3Mr8tw7M4oNh8uPKtYizoBgwXjNzUdfZc4L", "senderPublicKey": "fimdbAqs96XHgzj3upUwseaWtXfHpP5UnRwF9PSEtqN", "proofs": [ "54oFKmE6pywivusQvuznyGmh3e87SfZ439FY5ATxy5v9JhphwbQ51ZKnUgiNLGHeHLmKJ2XvCqELKN1MdFMXGGWa" ], "script": "base64:AQQAAAAHY3JlYXRvcgkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQIAAAAjM05DdDJqcm4xMkdaaVdDVXhibkN0cFlOeFd3NFhEcDNHRXkEAAAAAm1lCAUAAAACdHgAAAAGc2VuZGVyBAAAAAR3YXZlAAAAAAAF9eEABAAAAApzZWNyZXRIYXNoAQAAACDdwL5AHinOt8oXyjWRKpOiLtIVsxgvhvN91WbMHX7PbAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAMJAQAAAAEhAAAAAQkBAAAACWlzRGVmaW5lZAAAAAEJAAQcAAAAAgUAAAACbWUCAAAAB3BheW1lbnQEAAAACXBheW1lbnRUeAkAA+gAAAABCQEAAAAHZXh0cmFjdAAAAAEJAAQSAAAAAggFAAAAAXQAAAAEZGF0YQIAAAAHcGF5bWVudAQAAAAOaXNQYXltZW50VmFsaWQEAAAAByRtYXRjaDEFAAAACXBheW1lbnRUeAMJAAABAAAAAgUAAAAHJG1hdGNoMQIAAAAT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Zyb21TdHJpbmcAAAABAgAAAAAEAAAABndpbm5lcgMJAAAAAAAAAgkBAAAAB2V4dHJhY3QAAAABCQAEHAAAAAIFAAAAAm1lAgAAAAVndWVzcwUAAAAGc2VjcmV0BQAAAAdndWVzc2VyBQAAAAdjcmVhdG9yAwMFAAAADGlzUHJvb2ZWYWxpZAkAAAAAAAACCAUAAAAGcGF5b3V0AAAACXJlY2lwaWVudAUAAAAGd2lubmVyBwkAAGcAAAACCQAAaQAAAAIFAAAABHdhdmUAAAAAAAAAAMgIBQAAAAZwYXlvdXQAAAADZmVlBwfKBw6G", "chainId": 84, "height": 407217, "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'FvdZj6eTcwsmrHvwtyKWWC1Kz2rJEEXm9yWTyWFU19jR' | |
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/169f3d6 24.38 ms ◑