tx · 74sxUfaGmRtAjjmjArHmpcNhEp4UEhR7jY75dVG2Z3VW

3N5ezXT9QVpBcxseKRkqbLdTRSUkbMJLzbD:  -0.01400000 Waves

2019.03.20 14:49 [544577] smart account 3N5ezXT9QVpBcxseKRkqbLdTRSUkbMJLzbD > SELF 0.00000000 Waves

{ "type": 13, "id": "74sxUfaGmRtAjjmjArHmpcNhEp4UEhR7jY75dVG2Z3VW", "fee": 1400000, "feeAssetId": null, "timestamp": 1553082538354, "version": 1, "sender": "3N5ezXT9QVpBcxseKRkqbLdTRSUkbMJLzbD", "senderPublicKey": "HMMwXJWPUWM7VKP5hJaoazWJiLMZZSta2F9AaWkUk1FX", "proofs": [ "3zNVP3FWQgKUGCS1c4zCKCV8Ah17MfFTZaWequNzWvfnk5XPWzWXaXPzvZZyWa6Q7zXL65BfgrXCiwTqCE4EZQ2Y" ], "script": "base64:AgQAAAAKZmVlQWRkcmVzcwIAAAAjM045dkQ2R2RIc3BxcHJZMmRpNk44NTRmdVQ3dWdKUGtIbzUEAAAAAm1lCAUAAAACdHgAAAAGc2VuZGVyBAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAJkdAUAAAAHJG1hdGNoMAQAAAAMc2VydmVyU2lnbmVkCQAB9AAAAAMIBQAAAAJkdAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAmR0AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQMJAQAAAAEhAAAAAQUAAAAMc2VydmVyU2lnbmVkCQAAAgAAAAECAAAAA2Q6MQQAAAAEdHlwZQkBAAAAB2V4dHJhY3QAAAABCQAEEwAAAAIIBQAAAAJkdAAAAARkYXRhAgAAAAR0eXBlBAAAAAZnYW1lSWQJAQAAAAdleHRyYWN0AAAAAQkABBMAAAACCAUAAAACZHQAAAAEZGF0YQIAAAAGZ2FtZUlkAwkA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AgAAAAV0OnI6MwYJAAACAAAAAQIAAAADdDoyAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAACc3QFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnN0AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACc3QAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5B9Rf0Iw=", "chainId": 84, "height": 544577, "spentComplexity": 0 } View: original | compacted Prev: 5TggrgtAeum7kAwsd2SVVc2H6wDGJnoVVrKrBxgezHgN Next: GVEQ4BGfHw7jeZu32EFKNfNkuSdCzF5aSbwSxb4dLBgf Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 2 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
3-let feeAddress = "3NCoLorazbf3xXw91fjj3UWmpb93Ah6NnxK"
3+let feeAddress = "3N9vD6GdHspqprY2di6N854fuT7ugJPkHo5"
44 let me = tx.sender
55 match tx {
66 case dt: DataTransaction =>
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 2 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
3-let feeAddress = "3NCoLorazbf3xXw91fjj3UWmpb93Ah6NnxK"
3+let feeAddress = "3N9vD6GdHspqprY2di6N854fuT7ugJPkHo5"
44 let me = tx.sender
55 match tx {
66 case dt: DataTransaction =>
77 let serverSigned = sigVerify(dt.bodyBytes, dt.proofs[0], tx.senderPublicKey)
88 if (!(serverSigned))
99 then throw("d:1")
1010 else {
1111 let type = extract(getString(dt.data, "type"))
1212 let gameId = extract(getString(dt.data, "gameId"))
1313 if ((type == "init"))
1414 then {
1515 let player1 = extract(getString(dt.data, (gameId + "_player1")))
1616 let player1TxId = extract(getString(dt.data, (gameId + "_tx1")))
1717 let player2 = extract(getString(dt.data, (gameId + "_player2")))
1818 let player2TxId = extract(getString(dt.data, (gameId + "_tx2")))
1919 if (!(isDefined(getInteger(dt.data, (gameId + "_winAmount")))))
2020 then throw("d:i:1")
2121 else if (!(isDefined(getInteger(dt.data, (gameId + "_fee_amount")))))
2222 then throw("d:i:2")
2323 else if (!(isDefined(getBinary(dt.data, (gameId + "_squadronHash")))))
2424 then throw("d:i:3")
2525 else if (!(isDefined(getBoolean(dt.data, ("used_tx_" + player1TxId)))))
2626 then throw("d:i:4")
2727 else if (!(isDefined(getBoolean(dt.data, ("used_tx_" + player2TxId)))))
2828 then throw("d:i:5")
2929 else if (isDefined(getBoolean(me, ("used_tx_" + player1TxId))))
3030 then throw("d:i:6")
3131 else if (isDefined(getBoolean(me, ("used_tx_" + player2TxId))))
3232 then throw("d:i:7")
3333 else true
3434 }
3535 else if ((type == "start"))
3636 then {
3737 let betAmount = extract(getInteger(dt.data, (gameId + "_amount")))
3838 let player1 = extract(getString(dt.data, (gameId + "_player1")))
3939 let player1TxId = extract(getString(dt.data, (gameId + "_tx1")))
4040 let player2 = extract(getString(dt.data, (gameId + "_player2")))
4141 let player2TxId = extract(getString(dt.data, (gameId + "_tx2")))
4242 let startId = extract(getString(dt.data, (gameId + "_start_id")))
4343 let player1Tx = transactionById(fromBase58String(player1TxId))
4444 let player2Tx = transactionById(fromBase58String(player2TxId))
4545 let tr1Ok = match player1Tx {
4646 case t: TransferTransaction =>
4747 if (if (if (if ((t.amount == betAmount))
4848 then !(isDefined(getString(me, ("used_tx_" + player1TxId))))
4949 else false)
5050 then !(isDefined(t.assetId))
5151 else false)
5252 then (extract(getString(dt.data, ("game_" + toBase58String(addressFromPublicKey(fromBase58String(player1)).bytes)))) == gameId)
5353 else false)
5454 then (t.recipient == me)
5555 else false
5656 case _ =>
5757 false
5858 }
5959 let tr2Ok = match player2Tx {
6060 case t: TransferTransaction =>
6161 if (if (if (if ((t.amount == betAmount))
6262 then !(isDefined(getString(me, ("used_tx_" + player2TxId))))
6363 else false)
6464 then !(isDefined(t.assetId))
6565 else false)
6666 then (extract(getString(dt.data, ("game_" + toBase58String(addressFromPublicKey(fromBase58String(player2)).bytes)))) == gameId)
6767 else false)
6868 then (t.recipient == me)
6969 else false
7070 case _ =>
7171 false
7272 }
7373 if (!(tr1Ok))
7474 then throw("d:s:1")
7575 else if (!(tr2Ok))
7676 then throw("d:s:2")
7777 else true
7878 }
7979 else if ((type == "finish"))
8080 then {
8181 let winner = extract(getString(dt.data, (gameId + "_winner")))
8282 let correctWinner = if ((winner == extract(getString(me, (gameId + "_player1")))))
8383 then true
8484 else (winner == extract(getString(me, (gameId + "_player2"))))
8585 let squadron1 = extract(getBinary(dt.data, (gameId + "_squadron1")))
8686 let squadron2 = extract(getBinary(dt.data, (gameId + "_squadron2")))
8787 let gameSalt = extract(getBinary(dt.data, (gameId + "_salt")))
8888 let correctSquadrons = (sha256(((squadron1 + squadron2) + gameSalt)) == extract(getBinary(me, (gameId + "_squadronHash"))))
8989 let payoutTxId = extract(getString(dt.data, (gameId + "_payout_tx_id")))
9090 let payoutKey = extract(getString(dt.data, (payoutTxId + "_payout")))
9191 let feeTxId = extract(getString(dt.data, (gameId + "_fee_tx_id")))
9292 let feeKey = extract(getString(dt.data, (feeTxId + "_fee")))
9393 if (!(correctWinner))
9494 then throw("d:f:1")
9595 else if (!(correctSquadrons))
9696 then throw("d:f:2")
9797 else if ((payoutKey != (gameId + "_winAmount")))
9898 then throw("d:f:3")
9999 else if ((feeKey != (gameId + "_fee_amount")))
100100 then throw("d:f:4")
101101 else true
102102 }
103103 else if ((type == "refund"))
104104 then {
105105 let paymentTxId = extract(getString(dt.data, (gameId + "_payment_tx_id")))
106106 if (isDefined(getBoolean(me, ("used_tx_" + paymentTxId))))
107107 then throw("d:r:1")
108108 else if (!(isDefined(getBoolean(dt.data, ("used_tx_" + paymentTxId)))))
109109 then throw("d:r:2")
110110 else if (!(isDefined(getInteger(dt.data, (paymentTxId + "_refund_amount")))))
111111 then throw("d:r:3")
112112 else if (!(isDefined(getInteger(dt.data, (paymentTxId + "_refund_recipient")))))
113113 then throw("d:r:4")
114114 else true
115115 }
116116 else throw(("d:2:" + type))
117117 }
118118 case tt: TransferTransaction =>
119119 let serverSigned = sigVerify(tt.bodyBytes, tt.proofs[0], tx.senderPublicKey)
120120 let recipientAddr = toBase58String(addressFromRecipient(tt.recipient).bytes)
121121 if (!(serverSigned))
122122 then throw("t:1")
123123 else if (isDefined(getString(me, (toBase58String(tt.id) + "_payout"))))
124124 then {
125125 let gameId = extract(getString(me, ("game_" + recipientAddr)))
126126 let winner = extract(getString(me, (gameId + "_winner")))
127127 let winnerAddr = toBase58String(addressFromPublicKey(fromBase58String(winner)).bytes)
128128 let winAmountKey = extract(getString(me, (toBase58String(tt.id) + "_payout")))
129129 let winAmount = extract(getInteger(me, winAmountKey))
130130 if ((tt.amount != winAmount))
131131 then throw("t:p:1")
132132 else if (isDefined(tt.assetId))
133133 then throw("t:p:2")
134134 else if ((winnerAddr != recipientAddr))
135135 then throw("t:p:3")
136136 else true
137137 }
138138 else if (isDefined(getString(me, (toBase58String(tt.id) + "_fee"))))
139139 then {
140140 let feeAmountKey = extract(getString(me, (toBase58String(tt.id) + "_fee")))
141141 let feeAmount = extract(getInteger(me, feeAmountKey))
142142 if ((tt.amount != feeAmount))
143143 then throw("t:f:1")
144144 else if (isDefined(tt.assetId))
145145 then throw("t:f:2")
146146 else if ((recipientAddr != feeAddress))
147147 then throw("t:f:3")
148148 else true
149149 }
150150 else if (isDefined(getInteger(me, (toBase58String(tt.id) + "_refund_amount"))))
151151 then {
152152 let refundAmount = extract(getInteger(me, (toBase58String(tt.id) + "_refund_amount")))
153153 let refundRecipient = extract(getString(me, (toBase58String(tt.id) + "_refund_recipient")))
154154 if ((tt.amount != refundAmount))
155155 then throw("t:r:1")
156156 else if (isDefined(tt.assetId))
157157 then throw("t:r:2")
158158 else if ((recipientAddr != refundRecipient))
159159 then throw("t:r:3")
160160 else true
161161 }
162162 else throw("t:2")
163163 case st: SetScriptTransaction =>
164164 sigVerify(st.bodyBytes, st.proofs[0], tx.senderPublicKey)
165165 case _ =>
166166 false
167167 }

github/deemru/w8io/169f3d6 
45.05 ms