tx · 4cANtZe8dvFxbdq6fi256V8gGNy6KsuoqmHNNH8N8yKS 3N8UaZf3317PzyPUj3eUVEFWN4JD453q6Dv: -0.01000000 Waves 2018.12.16 02:06 [406545] smart account 3N8UaZf3317PzyPUj3eUVEFWN4JD453q6Dv > SELF 0.00000000 Waves
{ "type": 13, "id": "4cANtZe8dvFxbdq6fi256V8gGNy6KsuoqmHNNH8N8yKS", "fee": 1000000, "feeAssetId": null, "timestamp": 1544915191489, "version": 1, "sender": "3N8UaZf3317PzyPUj3eUVEFWN4JD453q6Dv", "senderPublicKey": "A8MMRwfuzNeyRXJgJpy68xHqsQJx3GHAypXQ22VVV2ya", "proofs": [ "2VDVL98yZhQqywySvkpRuv7iWgUDZFMamnWjsREfL7GsSYhuV4LVEyHRjvFEneN4ToNHm2MWGM1o4Y3mZG92gvAW" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAAB2NyZWF0b3IJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNOM0hhb3pTNFVnVWtGR2pjZEo5YldtQlBjaURYckF2N3BMBAAAAApzZWNyZXRIYXNoAQAAACCSLGDZDqjqOlyuB2xmnQw1rCWH99bpLNe8NA6Ciru/hgQAAAAEd2F2ZQAAAAAABfXhAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAMJAQAAAAEhAAAAAQkBAAAACWlzRGVmaW5lZAAAAAEJAAQcAAAAAgUAAAACbWUCAAAAB3BheW1lbnQEAAAACXBheW1lbnRUeAkAA+gAAAABCQEAAAAHZXh0cmFjdAAAAAEJAAQSAAAAAggFAAAAAXQAAAAEZGF0YQIAAAAHcGF5bWVudAQAAAAOaXNQYXltZW50VmFsaWQEAAAAByRtYXRjaDEFAAAACXBheW1lbnRUeAMJAAABAAAAAgUAAAAHJG1hdGNoMQIAAAATVHJhb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5nAAAAAQIAAAAAAwUAAAAHaXNWYWxpZAkAAAAAAAACCAUAAAAGcGF5b3V0AAAACXJlY2lwaWVudAUAAAAGd2lubmVyBwfD7uRv", "chainId": 84, "height": 406545, "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'AqbmnwZfuVRff8BtubFbsCLN9S52w9DAgi38Fqu8S9CH' | |
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 winner = if ((secret == extract(getBinary(me, "guess")))) | |
32 | + | then creator | |
33 | + | else match transactionById(extract(getBinary(me, "payment"))) { | |
34 | + | case p1: TransferTransaction => | |
35 | + | p1.sender | |
36 | + | case _ => | |
37 | + | addressFromString("") | |
38 | + | } | |
39 | + | if (isValid) | |
40 | + | then (payout.recipient == winner) | |
41 | + | else false | |
42 | + | case _ => | |
43 | + | false | |
44 | + | } |
github/deemru/w8io/026f985 39.46 ms ◑