tx · FuPQ8EZg7tWWTsf74qZpp7R4LtVLgV3BG9ot5YozBnHc 3MpEpWApjdLGv9RDUespVx5Szbyqmh9FAas: -0.01000000 Waves 2018.12.16 06:40 [406834] smart account 3MpEpWApjdLGv9RDUespVx5Szbyqmh9FAas > SELF 0.00000000 Waves
{ "type": 13, "id": "FuPQ8EZg7tWWTsf74qZpp7R4LtVLgV3BG9ot5YozBnHc", "fee": 1000000, "feeAssetId": null, "timestamp": 1544931620227, "version": 1, "sender": "3MpEpWApjdLGv9RDUespVx5Szbyqmh9FAas", "senderPublicKey": "BJHDonQuoahSKxPPdP8VR7Jhu8zGRg5WCX9h4rvDyMhY", "proofs": [ "36vfu12koaxBQrwp4J6SGE1V6QsEVCkjtyFSkmFZqEaAecwZvbCPpFLqwkaRU38YyfR9Zj25sd97JjF9YVBGnEzS" ], "script": "base64:AQQAAAAGZGVhbGVyAQAAACChV9lll0yX37LnFfG5nKLgoJzO3H3c7hgFwVkPkfIsPAQAAAANZGVhbGVyQWRkcmVzcwkBAAAAB0FkZHJlc3MAAAABAQAAABoBVArti30L0VpSFpJb66OeTJWsPP5FKiJ28AQAAAAGcGxheWVyAQAAACATtbonqJAWoXj6HlareP7rG4Wl0avouRL7X7HQSCzbbgQAAAANcGxheWVyQWRkcmVzcwkBAAAAB0FkZHJlc3MAAAABAQAAABoBVJdTkFiYzgVv+5NuYGhSIzdcdY3CmbLBsAQAAAAPbXVsdGlTaWdBZGRyZXNzCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUA4snvHUe/j1daWmp0S1vLDEeDp2kMnigBAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAJ0eAUAAAAHJG1hdGNoMAQAAAAMZGVhbGVyU2lnbmVkAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAA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bu5PMSyZYXHVyEF6gt1LkWr4YuG Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 1 #-} | |
2 | + | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | + | let dealer = base58'BrpLMJrt3XATLKfqc24Vf95caJgpz781uz58riLeJAQj' | |
4 | + | let dealerAddress = Address(base58'3Mpus6kEbPkpqCEECQ5odQQWRPJG92iJcxw') | |
5 | + | let player = base58'2KwU4vzdgPmKyf7q354H9kSyX9NZjNiq4qbnH2wi2VDF' | |
6 | + | let playerAddress = Address(base58'3N3iDv1FaryCG6DqBBS3RF6TWMR6qm5n1e7') | |
7 | + | let multiSigAddress = Address(base58'3MpEpWApjdLGv9RDUespVx5Szbyqmh9FAas') | |
8 | + | match tx { | |
9 | + | case tx: DataTransaction => | |
10 | + | let dealerSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], dealer)) | |
11 | + | then 1 | |
12 | + | else 0 | |
13 | + | let playerSigned = if (sigVerify(tx.bodyBytes, tx.proofs[1], player)) | |
14 | + | then 1 | |
15 | + | else 0 | |
16 | + | let newBlock = extract(getInteger(tx.data, "block")) | |
17 | + | let block = extract(getInteger(multiSigAddress, "block")) | |
18 | + | if ((block > 0)) | |
19 | + | then { | |
20 | + | let method = extract(getString(tx.data, "method")) | |
21 | + | if ((method == "game")) | |
22 | + | then { | |
23 | + | let lastBlock = extract(getInteger(multiSigAddress, "lastBlock")) | |
24 | + | let newLastBlock = extract(getInteger(tx.data, "lastBlock")) | |
25 | + | if ((newLastBlock > lastBlock)) | |
26 | + | then ((dealerSigned + playerSigned) == 2) | |
27 | + | else false | |
28 | + | } | |
29 | + | else if ((method == "getSaltDealer")) | |
30 | + | then (playerSigned == 1) | |
31 | + | else if ((method == "getSaltPlayer")) | |
32 | + | then (dealerSigned == 1) | |
33 | + | else if ((method == "setSaltPlayer")) | |
34 | + | then { | |
35 | + | let hashLastGame = extract(getString(multiSigAddress, "hashLastGame")) | |
36 | + | let hashLastBlock = extract(getString(multiSigAddress, "hashLastBlock")) | |
37 | + | let saltPlayer = extract(getString(tx.data, "saltPlayer")) | |
38 | + | if ((sha256(toBytes((saltPlayer + hashLastBlock))) == toBytes(hashLastBlock))) | |
39 | + | then (playerSigned == 1) | |
40 | + | else false | |
41 | + | } | |
42 | + | else if ((method == "setSaltDealer")) | |
43 | + | then { | |
44 | + | let hashLastGame = extract(getString(multiSigAddress, "hashLastGame")) | |
45 | + | let hashLastBlock = extract(getString(multiSigAddress, "hashLastBlock")) | |
46 | + | let saltDealer = extract(getString(tx.data, "saltDealer")) | |
47 | + | if ((sha256(toBytes((saltDealer + hashLastGame))) == toBytes(hashLastBlock))) | |
48 | + | then (dealerSigned == 1) | |
49 | + | else false | |
50 | + | } | |
51 | + | else false | |
52 | + | } | |
53 | + | else (newBlock > 0) | |
54 | + | case tt: TransferTransaction => | |
55 | + | let amountDealer = extract(getInteger(multiSigAddress, "dealerBalance")) | |
56 | + | let amountPlayer = extract(getInteger(multiSigAddress, "playerBalance")) | |
57 | + | let failurePayOut = extract(getBoolean(multiSigAddress, "failurePayOut")) | |
58 | + | if ((tt.recipient == multiSigAddress)) | |
59 | + | then if (if ((dealerAddress == tt.sender)) | |
60 | + | then (amountDealer == 0) | |
61 | + | else false) | |
62 | + | then (tt.amount != 0) | |
63 | + | else if ((amountPlayer == 0)) | |
64 | + | then (tt.amount != 0) | |
65 | + | else false | |
66 | + | else if ((failurePayOut == true)) | |
67 | + | then true | |
68 | + | else false | |
69 | + | case mtx: MassTransferTransaction => | |
70 | + | if ((mtx.sender == multiSigAddress)) | |
71 | + | then { | |
72 | + | let amountDealer = extract(getInteger(multiSigAddress, "dealerBalance")) | |
73 | + | let amountPlayer = extract(getInteger(multiSigAddress, "playerBalance")) | |
74 | + | let block = extract(getInteger(multiSigAddress, "block")) | |
75 | + | if ((height > block)) | |
76 | + | then true | |
77 | + | else { | |
78 | + | let failurePayOut = extract(getBoolean(multiSigAddress, "failurePayOut")) | |
79 | + | let lastBlock = extract(getInteger(multiSigAddress, "lastBlock")) | |
80 | + | if (((lastBlock + 100) > height)) | |
81 | + | then if ((failurePayOut == false)) | |
82 | + | then { | |
83 | + | let dealerSigned = if (sigVerify(mtx.bodyBytes, mtx.proofs[0], dealer)) | |
84 | + | then 1 | |
85 | + | else 0 | |
86 | + | let playerSigned = if (sigVerify(mtx.bodyBytes, mtx.proofs[1], player)) | |
87 | + | then 1 | |
88 | + | else 0 | |
89 | + | ((dealerSigned + playerSigned) == 2) | |
90 | + | } | |
91 | + | else false | |
92 | + | else false | |
93 | + | } | |
94 | + | } | |
95 | + | else false | |
96 | + | case ta: SetScriptTransaction => | |
97 | + | true | |
98 | + | case _ => | |
99 | + | false | |
100 | + | } |
github/deemru/w8io/026f985 16.58 ms ◑