tx · HgFRgicAFMwVButWsPN5AbMVu3PAgeay4RYMjYbVS18D

3PMVsY1G82ye8TRcuZXsTDuuM493t4Duf5u:  -0.01400000 Waves

2019.04.11 12:23 [1477700] smart account 3PMVsY1G82ye8TRcuZXsTDuuM493t4Duf5u > SELF 0.00000000 Waves

{ "type": 13, "id": "HgFRgicAFMwVButWsPN5AbMVu3PAgeay4RYMjYbVS18D", "fee": 1400000, "feeAssetId": null, "timestamp": 1554974584971, "version": 1, "sender": "3PMVsY1G82ye8TRcuZXsTDuuM493t4Duf5u", "senderPublicKey": "HeZQiJwDiD5Sm6947ApEu4AD9Vnr9qManYWnd6whQWAS", "proofs": [ "5NjoquzGqwuWq652ebYCGLQZwLd3QymhJa1gW1UqGqyphuWEejfoFmbgUDXnDGP9oP9AJbX5m7qMWnzXHTc1HzAR" ], "script": "base64:AgQAAAAKZmVlQWRkcmVzcwIAAAAjM1BQb3RoTVRxajJWc1RWWGF2VUg0dzFIY2szN0x2N3dIS2gEAAAAAm1lCAUAAAACdHgAAAAGc2VuZGVyBAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAJkdAUAAAAHJG1hdGNoMAQAAAAMc2VydmVyU2lnbmVkCQAB9AAAAAMIBQAAAAJkdAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAmR0AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQMJAQAAAAEhAAAAAQUAAAAMc2VydmVyU2lnbmVkCQAAAgAAAAECAAAAA2Q6MQQAAAAEdHlwZQkBAAAAB2V4dHJhY3QAAAABCQAEEwAAAAIIBQAAAAJkdAAAAARkYXRhAgAAAAR0eXBlBAAAAAZnYW1lSWQJAQAAAAdleHRyYWN0AAAAAQkABBMAAAACCAUAAAACZHQAAAAEZGF0YQIAAAAGZ2FtZUlkAwkAAAAAAAACBQAAAAR0eXBlA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zZXRJZAkAAAIAAAABAgAAAAV0OnI6MgMJAQAAAAIhPQAAAAIFAAAADXJlY2lwaWVudEFkZHIFAAAAD3JlZnVuZFJlY2lwaWVudAkAAAIAAAABAgAAAAV0OnI6MwYGAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAACc3QFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnN0AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACc3QAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5B8Qpqjk=", "chainId": 87, "height": 1477700, "spentComplexity": 0 } View: original | compacted Prev: EsNL6QgZaNWX2A2S5QJUgqBdCfXhkbMCBYyXFYcUh8QZ Next: Fkfo8hTyzdSpDC9qXvQUEPkgEQdcPhSjajLjiPFarVkG Diff:
OldNewDifferences
161161 then throw("t:r:3")
162162 else true
163163 }
164- else throw("t:2")
164+ else true
165165 case st: SetScriptTransaction =>
166166 sigVerify(st.bodyBytes, st.proofs[0], tx.senderPublicKey)
167167 case _ =>
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 2 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
33 let feeAddress = "3PPothMTqj2VsTVXavUH4w1Hck37Lv7wHKh"
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 player1Tx = transactionById(fromBase58String(player1TxId))
4141 let player2 = extract(getString(dt.data, (gameId + "_player2")))
4242 let player2TxId = extract(getString(dt.data, (gameId + "_tx2")))
4343 let player2Tx = transactionById(fromBase58String(player2TxId))
4444 let tr1Ok = match player1Tx {
4545 case t: TransferTransaction =>
4646 if (if (if (if ((t.amount == betAmount))
4747 then !(isDefined(getString(me, ("used_tx_" + player1TxId))))
4848 else false)
4949 then !(isDefined(t.assetId))
5050 else false)
5151 then (extract(getString(dt.data, ("game_" + toBase58String(addressFromPublicKey(fromBase58String(player1)).bytes)))) == gameId)
5252 else false)
5353 then (t.recipient == me)
5454 else false
5555 case _ =>
5656 false
5757 }
5858 let tr2Ok = match player2Tx {
5959 case t: TransferTransaction =>
6060 if (if (if (if ((t.amount == betAmount))
6161 then !(isDefined(getString(me, ("used_tx_" + player2TxId))))
6262 else false)
6363 then !(isDefined(t.assetId))
6464 else false)
6565 then (extract(getString(dt.data, ("game_" + toBase58String(addressFromPublicKey(fromBase58String(player2)).bytes)))) == gameId)
6666 else false)
6767 then (t.recipient == me)
6868 else false
6969 case _ =>
7070 false
7171 }
7272 if (!(tr1Ok))
7373 then throw("d:s:1")
7474 else if (!(tr2Ok))
7575 then throw("d:s:2")
7676 else true
7777 }
7878 else if ((type == "finish"))
7979 then {
8080 let winner = extract(getString(dt.data, (gameId + "_winner")))
8181 let correctWinner = if ((winner == extract(getString(me, (gameId + "_player1")))))
8282 then true
8383 else (winner == extract(getString(me, (gameId + "_player2"))))
8484 let squadron1 = extract(getBinary(dt.data, (gameId + "_squadron1")))
8585 let squadron2 = extract(getBinary(dt.data, (gameId + "_squadron2")))
8686 let gameSalt = extract(getBinary(dt.data, (gameId + "_salt")))
8787 let correctSquadrons = (sha256(((squadron1 + squadron2) + gameSalt)) == extract(getBinary(me, (gameId + "_squadronHash"))))
8888 let payoutTxId = extract(getString(dt.data, (gameId + "_payout_tx_id")))
8989 let payoutKey = extract(getString(dt.data, (payoutTxId + "_payout")))
9090 let feeTxId = extract(getString(dt.data, (gameId + "_fee_tx_id")))
9191 let feeKey = extract(getString(dt.data, (feeTxId + "_fee")))
9292 if (!(correctWinner))
9393 then throw("d:f:1")
9494 else if (!(correctSquadrons))
9595 then throw("d:f:2")
9696 else if ((payoutKey != (gameId + "_winAmount")))
9797 then throw("d:f:3")
9898 else if ((feeKey != (gameId + "_fee_amount")))
9999 then throw("d:f:4")
100100 else if (isDefined(getString(me, (gameId + "_winner"))))
101101 then throw("d:f:5")
102102 else true
103103 }
104104 else if ((type == "refund"))
105105 then {
106106 let paymentTxId = extract(getString(dt.data, (gameId + "_payment_tx_id")))
107107 let refundTtxId = extract(getString(dt.data, (gameId + "_refund_ttx_id")))
108108 if (isDefined(getBoolean(me, ("used_tx_" + paymentTxId))))
109109 then throw("d:r:1")
110110 else if (!(isDefined(getBoolean(dt.data, ("used_tx_" + paymentTxId)))))
111111 then throw("d:r:2")
112112 else if (!(isDefined(getInteger(dt.data, (refundTtxId + "_refund_amount")))))
113113 then throw("d:r:3")
114114 else if (!(isDefined(getString(dt.data, (refundTtxId + "_refund_recipient")))))
115115 then throw("d:r:4")
116116 else true
117117 }
118118 else throw(("d:2:" + type))
119119 }
120120 case tt: TransferTransaction =>
121121 let serverSigned = sigVerify(tt.bodyBytes, tt.proofs[0], tx.senderPublicKey)
122122 let recipientAddr = toBase58String(addressFromRecipient(tt.recipient).bytes)
123123 if (!(serverSigned))
124124 then throw("t:1")
125125 else if (isDefined(getString(me, (toBase58String(tt.id) + "_payout"))))
126126 then {
127127 let gameId = extract(getString(me, ("game_" + recipientAddr)))
128128 let winner = extract(getString(me, (gameId + "_winner")))
129129 let winnerAddr = toBase58String(addressFromPublicKey(fromBase58String(winner)).bytes)
130130 let winAmountKey = extract(getString(me, (toBase58String(tt.id) + "_payout")))
131131 let winAmount = extract(getInteger(me, winAmountKey))
132132 if ((tt.amount != winAmount))
133133 then throw("t:p:1")
134134 else if (isDefined(tt.assetId))
135135 then throw("t:p:2")
136136 else if ((winnerAddr != recipientAddr))
137137 then throw("t:p:3")
138138 else true
139139 }
140140 else if (isDefined(getString(me, (toBase58String(tt.id) + "_fee"))))
141141 then {
142142 let feeAmountKey = extract(getString(me, (toBase58String(tt.id) + "_fee")))
143143 let feeAmount = extract(getInteger(me, feeAmountKey))
144144 if ((tt.amount != feeAmount))
145145 then throw("t:f:1")
146146 else if (isDefined(tt.assetId))
147147 then throw("t:f:2")
148148 else if ((recipientAddr != feeAddress))
149149 then throw("t:f:3")
150150 else true
151151 }
152152 else if (isDefined(getInteger(me, (toBase58String(tt.id) + "_refund_amount"))))
153153 then {
154154 let refundAmount = extract(getInteger(me, (toBase58String(tt.id) + "_refund_amount")))
155155 let refundRecipient = extract(getString(me, (toBase58String(tt.id) + "_refund_recipient")))
156156 if ((tt.amount != refundAmount))
157157 then throw("t:r:1")
158158 else if (isDefined(tt.assetId))
159159 then throw("t:r:2")
160160 else if ((recipientAddr != refundRecipient))
161161 then throw("t:r:3")
162162 else true
163163 }
164- else throw("t:2")
164+ else true
165165 case st: SetScriptTransaction =>
166166 sigVerify(st.bodyBytes, st.proofs[0], tx.senderPublicKey)
167167 case _ =>
168168 false
169169 }

github/deemru/w8io/3ef1775 
89.64 ms