tx · CTPkZe5SAsMq2zNW1JW2DCmqX1eV1PPDSNxfTLcWZYeq 3N3t8aV5pqDvvwPeYdaqGgseZBFAnsmuXJ9: -0.01000000 Waves 2018.12.16 02:09 [406550] smart account 3N3t8aV5pqDvvwPeYdaqGgseZBFAnsmuXJ9 > SELF 0.00000000 Waves
{ "type": 13, "id": "CTPkZe5SAsMq2zNW1JW2DCmqX1eV1PPDSNxfTLcWZYeq", "fee": 1000000, "feeAssetId": null, "timestamp": 1544915377067, "version": 1, "sender": "3N3t8aV5pqDvvwPeYdaqGgseZBFAnsmuXJ9", "senderPublicKey": "AA9MdVwfQYye9xy7jKS2ZRochY7yRTY18BPevEkgAu3W", "proofs": [ "3Woj8KHWYibdsxRPwZUNiSsayfXvocgKozsRAcKDHhLNWGu2zxSzwhcyoiZfgoVimZgFcmj15sQQkSV5ydf5RRuZ" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAAB2NyZWF0b3IJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNOM0hhb3pTNFVnVWtGR2pjZEo5YldtQlBjaURYckF2N3BMBAAAAApzZWNyZXRIYXNoAQAAACCJOgUgDZh6He/NJrt9J8R5CEuj3jFA4xsbts+CK7FfZAQAAAAEd2F2ZQAAAAAABfXhAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAMJAQAAAAEhAAAAAQkBAAAACWlzRGVmaW5lZAAAAAEJAAQcAAAAAgUAAAACbWUCAAAAB3BheW1lbnQEAAAACXBheW1lbnRUeAkAA+gAAAABCQEAAAAHZXh0cmFjdAAAAAEJAAQSAAAAAggFAAAAAXQAAAAEZGF0YQIAAAAHcGF5bWVudAQAAAAOaXNQYXltZW50VmFsaWQEAAAAByRtYXRjaDEFAAAACXBheW1lbnRUeAMJAAABAAAAAgUAAAAHJG1hdGN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cAAAAAgUAAAACbWUCAAAABWd1ZXNzBQAAAAdndWVzc2VyBQAAAAdjcmVhdG9yAwUAAAAHaXNWYWxpZAkAAAAAAAACCAUAAAAGcGF5b3V0AAAACXJlY2lwaWVudAUAAAAGd2lubmVyBwdMso5Q", "chainId": 84, "height": 406550, "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 me = tx.sender | |
4 | + | let creator = addressFromString("3N3HaozS4UgUkFGjcdJ9bWmBPciDXrAv7pL") | |
5 | + | let secretHash = base58'AEgAjTWR5nFA2ELtWc2geVtBRpZTwW3cfwTgChcmQTv3' | |
6 | + | let wave = 100000000 | |
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 p: TransferTransaction => | |
14 | + | if (if ((p.amount == (1 * wave))) | |
15 | + | then (p.recipient == me) | |
16 | + | else false) | |
17 | + | then sigVerify(p.bodyBytes, p.proofs[0], p.senderPublicKey) | |
18 | + | else false | |
19 | + | case _ => | |
20 | + | false | |
21 | + | } | |
22 | + | let guess = extract(getBinary(t.data, "guess")) | |
23 | + | if (isPaymentValid) | |
24 | + | then (size(guess) == 1) | |
25 | + | else false | |
26 | + | } | |
27 | + | else false | |
28 | + | case payout: TransferTransaction => | |
29 | + | let secret = take(payout.proofs[0], 1) | |
30 | + | let isValid = (sha256(payout.proofs[0]) == secretHash) | |
31 | + | let guesser = match transactionById(extract(getBinary(me, "payment"))) { | |
32 | + | case p1: TransferTransaction => | |
33 | + | p1.sender | |
34 | + | case _ => | |
35 | + | addressFromString("") | |
36 | + | } | |
37 | + | let winner = if ((secret == extract(getBinary(me, "guess")))) | |
38 | + | then guesser | |
39 | + | else creator | |
40 | + | if (isValid) | |
41 | + | then (payout.recipient == winner) | |
42 | + | else false | |
43 | + | case _ => | |
44 | + | false | |
45 | + | } |
github/deemru/w8io/169f3d6 19.35 ms ◑