tx · 29Jmy7JNfZcWC67oKqX6wmsXopSUpM9pK9a1STDxk1Ku

3MtKQXaiKQxSTRPpa8GjJ5zE7mE992eBrGu:  -0.05000000 Waves

2019.11.03 06:57 [748195] smart account 3MtKQXaiKQxSTRPpa8GjJ5zE7mE992eBrGu > SELF 0.00000000 Waves

{ "type": 13, "id": "29Jmy7JNfZcWC67oKqX6wmsXopSUpM9pK9a1STDxk1Ku", "fee": 5000000, "feeAssetId": null, "timestamp": 1572753351271, "version": 1, "sender": "3MtKQXaiKQxSTRPpa8GjJ5zE7mE992eBrGu", "senderPublicKey": "2vmjFmSn7wGYrffwrNFgTN6j9CATDKwa8t8KAXWe2HVW", "proofs": [ "CrLw5dtk94AcT6ayEwsk4W7nvjL9LQZcnubCAwZStDghpSP3K7xRVQk7f6GRgxcJtk4bVAFyX1JXiXXrXP9rh9q" ], "script": "base64:AAIDAAAAAAAAABIIARIDCgEIEgQKAggCEgMKAQgAAAAkAAAAAAlSU0FQVUJMSUMJAAJbAAAAAQIAAAGPYmFzZTY0Ok1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBZzRkQVI2WGJCREFTOWhyL0VqM2RKdjZGZmM0NjZ4L21PR01XVTNsckFCczNxYThCSG11Skdua2ZicEVmMnZBd1lUT1dQdnZ6Zk0xME9CYmZsb1N5cTNjOU1LdnlUZTFsdUJMR3FXNHZaVVhJeXZTZ3oxbGl5VVZlZklReTNkeUY5amJlVFpiQzBiYmNULzdPM0RFTCswMXo2QStyRENhY1NaMGxHb2xTUTZBbmhMeHpJa1ZwT1FKYnJCbUMreCtadVpQQ01Xekp5bmQ1YWVPbjdqYWovbWtSVnl4ZTZnLzBPaFd6NE5paVpYZXVNUkIrOG1LeTBmV0QvVWxJbFpXSHNBUzJabXJrWEtxakxxMC8wd3I4SUxKa3pualNxZG5JNUliamczdVFyai80QU4raTlyMjhhUTczL1prUHRZNVNidzBBT2lBQkJ1N2dIbXE5YXlWeFpRS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mdW5kVG9rZW4JAQAAAAl0b2tlblR5cGUAAAABBQAAAAdwYXlUeXBlCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAGZ2FtZUlkBQAAAA5uZXdHYW1lRGF0YVN0cgUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAADHJlZnVuZFdhbGxldAUAAAAJcmVmdW5kQW10BQAAAAtyZWZ1bmRUb2tlbgUAAAADbmlsAAAAAM/zM24=", "chainId": 84, "height": 748195, "spentComplexity": 0 } View: original | compacted Prev: E3Pn4ZCDKSGvYjC8uJGAWYRBZw4BgwUJBu4yCvxuBCVx Next: Fg8oQ4q4sPcH5BBnaa4FaNrULnPCVT3Bw4at8oc1Gsys Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let RSAPUBLIC = fromBase64String("base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAg4dAR6XbBDAS9hr/Ej3dJv6Ffc466x/mOGMWU3lrABs3qa8BHmuJGnkfbpEf2vAwYTOWPvvzfM10OBbfloSyq3c9MKvyTe1luBLGqW4vZUXIyvSgz1liyUVefIQy3dyF9jbeTZbC0bbcT/7O3DEL+01z6A+rDCacSZ0lGolSQ6AnhLxzIkVpOQJbrBmC+x+ZuZPCMWzJynd5aeOn7jaj/mkRVyxe6g/0OhWz4NiiZXeuMRB+8mKy0fWD/UlIlZWHsAS2ZmrkXKqjLq0/0wr8ILJkznjSqdnI5Ibjg3uQrj/4AN+i9r28aQ73/ZkPtY5Sbw0AOiABBu7gHmq9ayVxZQIDAQAB")
55
66 let GAMESCOUNTERKEY = "$GAME_NUM"
77
88 let WBET = base58'A4q1mYKo11yuH9gmvDodeJoksagcyQzeFE9JtphMWddw'
99
1010 let WALLETWAVESBET = Address(base58'3MtCy2PCFPyu8A9SRNL4qUo1V17SGLHftD8')
1111
1212 let WALLETMCAFEE = Address(base58'3MtCy2PCFPyu8A9SRNL4qUo1V17SGLHftD8')
1313
1414 let FEEWAVESBET = 4
1515
1616 let FEEMCAFEE = 2
1717
1818 let WAVELET = 100000000
1919
2020 let STATESUBMITTED = "SUBMITTED"
2121
2222 let STATEACCEPTED = "ACCEPTED"
2323
2424 let STATEFINISHED = "FINISHED"
2525
2626 let STATECANCELED = "CANCELED"
2727
2828 let COINRED = "RED"
2929
3030 let COINBLUE = "BLUE"
3131
3232 let BETMINWAVES = ((1 * WAVELET) / 4)
3333
3434 let BETMINWBET = (100 * WAVELET)
3535
3636 let IdxGameState = 0
3737
3838 let IdxPlayerACoin = 1
3939
4040 let IdxPlayerAPubKey58 = 2
4141
4242 let IdxPayType = 3
4343
4444 let IdxPayAmt = 4
4545
4646 let IdxWinAmt = 5
4747
4848 let IdxPlayerBCoin = 6
4949
5050 let IdxPlayerBPubKey58 = 7
5151
5252 let IdxLuckyCoin = 8
5353
5454 func IncrementGameNum () = {
5555 let gameNum = match getInteger(this, GAMESCOUNTERKEY) {
5656 case num: Int =>
5757 num
5858 case _ =>
5959 0
6060 }
6161 (gameNum + 1)
6262 }
6363
6464
6565 func GenerateRandInt (gameId,rsaSign) = {
6666 let rsaSigValid = rsaVerify(SHA256, toBytes(gameId), rsaSign, RSAPUBLIC)
6767 if (rsaSigValid)
6868 then {
6969 let rand = (toInt(sha256(rsaSign)) % 100)
7070 if ((0 > rand))
7171 then ((-1 * rand) + 1)
7272 else (rand + 1)
7373 }
7474 else throw("Invalid RSA signature")
7575 }
7676
7777
7878 func paymentType (payment) = if ((payment.assetId == WBET))
7979 then "WBET"
8080 else "WAVES"
8181
8282
8383 func tokenType (token) = if ((token == "WBET"))
8484 then WBET
8585 else unit
8686
8787
8888 func FormatGameDataParam (p) = {
8989 let s = size(p)
9090 if ((s == 0))
9191 then throw("Parameter size must be greater then 0")
9292 else if ((s > 99))
9393 then throw("Parameter size must be less then 100")
9494 else if ((10 > s))
9595 then (("0" + toString(s)) + p)
9696 else (toString(s) + p)
9797 }
9898
9999
100100 func FormatGameDataStr (gameState,playerACoin,playerAPubKey58,payType,payAmount,winAmt,playerBCoin,playerBPubKey58,luckyCoin) = {
101101 let fullStateStr = ((((((((((FormatGameDataParam(gameState) + "_") + FormatGameDataParam(playerACoin)) + "_") + FormatGameDataParam(playerAPubKey58)) + "_") + FormatGameDataParam(payType)) + "_") + FormatGameDataParam(toString(payAmount))) + "_") + FormatGameDataParam(toString(winAmt)))
102102 if (if (if ((playerBCoin == ""))
103103 then true
104104 else (playerBPubKey58 == ""))
105105 then true
106106 else (luckyCoin == ""))
107107 then fullStateStr
108108 else ((((((fullStateStr + "_") + FormatGameDataParam(playerBCoin)) + "_") + FormatGameDataParam(playerBPubKey58)) + "_") + FormatGameDataParam(luckyCoin))
109109 }
110110
111111
112112 func RemoveUnderscoreIfPresent (remaining) = if ((size(remaining) > 0))
113113 then drop(remaining, 1)
114114 else remaining
115115
116116
117117 func ParseNextAttribute (remaining) = {
118118 let s = size(remaining)
119119 if ((s > 0))
120120 then {
121121 let nn = parseIntValue(take(remaining, 2))
122122 let v = take(drop(remaining, 2), nn)
123123 let tmpRemaining = drop(remaining, (nn + 2))
124124 let remainingState = RemoveUnderscoreIfPresent(tmpRemaining)
125125 [v, remainingState]
126126 }
127127 else throw("Empty string was passed into parseNextAttribute func")
128128 }
129129
130130
131131 func ParseGameRawDataStr (rawStateStr) = {
132132 let gameState = ParseNextAttribute(rawStateStr)
133133 let paCoin = ParseNextAttribute(gameState[1])
134134 let paPubKey58 = ParseNextAttribute(paCoin[1])
135135 let payType = ParseNextAttribute(paPubKey58[1])
136136 let payAmt = ParseNextAttribute(payType[1])
137137 let winAmt = ParseNextAttribute(payAmt[1])
138138 [gameState[0], paCoin[0], paPubKey58[0], payType[0], payAmt[0], winAmt[0]]
139139 }
140140
141141
142142 func ExtractGameDataList (gameId) = {
143143 let rawDataStr = match getString(this, gameId) {
144144 case str: String =>
145145 str
146146 case _ =>
147147 throw(("Couldn't find game by " + gameId))
148148 }
149149 ParseGameRawDataStr(rawDataStr)
150150 }
151151
152152
153153 func ValidateBetAndDefineWinAmt (amount,playerCoin,paymentType) = if (if ((playerCoin != COINRED))
154154 then (playerCoin != COINBLUE)
155155 else false)
156156 then throw("Invalid play, change your bet to RED or BLUE coin. Game aborted.")
157157 else if (if ((paymentType == "WBET"))
158158 then (BETMINWBET > amount)
159159 else false)
160160 then throw(("The minimum bet on Wbet is " + toString((BETMINWBET / WAVELET))))
161161 else if (if ((paymentType == "WAVES"))
162162 then (BETMINWAVES > amount)
163163 else false)
164164 then throw(("The minimum bet on Waves is " + toString((BETMINWAVES / WAVELET))))
165165 else fraction((amount * 2), ((100 - FEEWAVESBET) - FEEMCAFEE), 100)
166166
167167
168168 @Callable(i)
169169 func playCoinflip (paCoin) = {
170170 let gameId = toBase58String(i.transactionId)
171171 let gameIdUsed = isDefined(getString(this, gameId))
172172 let payment = extract(i.payment)
173173 let feeAssetId = isDefined(i.feeAssetId)
174174 if (if ((payment.assetId != assetInfo(base58'WAVES')))
175175 then (payment.assetId != WBET)
176176 else false)
177177 then throw("Payment should be in Wbet or Waves. Game aborted.")
178178 else if (feeAssetId)
179179 then throw("Transaction's fee must be in Waves. Game aborted.")
180180 else if (gameIdUsed)
181181 then throw("Passed gameId had been used before. Game aborted.")
182182 else {
183183 let newGameNum = IncrementGameNum()
184184 let playerAPubKey58 = toBase58String(i.callerPublicKey)
185185 let payType = paymentType(payment)
186186 let winAmt = ValidateBetAndDefineWinAmt(payment.amount, paCoin, payType)
187187 let gameDataStr = FormatGameDataStr(STATESUBMITTED, paCoin, playerAPubKey58, payType, payment.amount, winAmt, "", "", "")
188188 ScriptResult(WriteSet([DataEntry(GAMESCOUNTERKEY, newGameNum), DataEntry(gameId, gameDataStr)]), TransferSet(nil))
189189 }
190190 }
191191
192192
193193
194194 @Callable(i)
195195 func acceptCoinChallenge (gameId,rsaSig) = {
196196 let gameDataList = ExtractGameDataList(gameId)
197197 let gameState = gameDataList[IdxGameState]
198198 let paCoin = gameDataList[IdxPlayerACoin]
199199 let paPubKey58 = gameDataList[IdxPlayerAPubKey58]
200200 let payType = gameDataList[IdxPayType]
201201 let payAmt = parseIntValue(gameDataList[IdxPayAmt])
202202 let winAmt = parseIntValue(gameDataList[IdxWinAmt])
203203 let payment = extract(i.payment)
204204 let feeAssetId = isDefined(i.feeAssetId)
205205 let pbPubKey58 = toBase58String(i.callerPublicKey)
206206 let payTypeB = paymentType(payment)
207207 if (if ((payment.assetId != assetInfo(base58'WAVES')))
208208 then (payment.assetId != WBET)
209209 else false)
210210 then throw("Payment should be in Wbet or Waves. Game aborted.")
211211 else if (feeAssetId)
212212 then throw("Transaction's fee must be in Waves. Game aborted.")
213213 else if ((paPubKey58 == pbPubKey58))
214214 then throw("You can't accept a challenge created by yourself. Game aborted.")
215215 else if ((payType != payTypeB))
216216 then throw("Payment must be made in the same token as the bet, WBET/WBET or WAVES/WAVES. Game aborted.")
217217 else if ((payAmt != payment.amount))
218218 then throw("Payout must be equal to the challenger bet amount. Game aborted.")
219219 else if ((gameState != STATESUBMITTED))
220220 then throw("Invalid game state for passed gameId. Game aborted.")
221221 else {
222222 let rand = GenerateRandInt(gameId, rsaSig)
223223 let luckyCoin = if ((rand > 50))
224224 then COINRED
225225 else COINBLUE
226226 let pbCoin = if ((paCoin == COINRED))
227227 then COINBLUE
228228 else COINRED
229229 let tokenAssetId = tokenType(payType)
230230 let newGameDataStr = FormatGameDataStr(STATEFINISHED, paCoin, paPubKey58, payType, payAmt, winAmt, pbCoin, pbPubKey58, luckyCoin)
231231 let winAddr = if ((paCoin == luckyCoin))
232232 then addressFromPublicKey(fromBase58String(paPubKey58))
233233 else i.caller
234234 ScriptResult(WriteSet([DataEntry(gameId, newGameDataStr)]), TransferSet([ScriptTransfer(WALLETWAVESBET, ((winAmt * FEEWAVESBET) / 100), tokenAssetId), ScriptTransfer(WALLETMCAFEE, ((winAmt * FEEWAVESBET) / 100), tokenAssetId), ScriptTransfer(winAddr, winAmt, tokenAssetId)]))
235235 }
236236 }
237237
238238
239239
240240 @Callable(i)
241241 func cancelCoinChallenge (gameId) = {
242242 let gameDataList = ExtractGameDataList(gameId)
243243 let gameState = gameDataList[IdxGameState]
244244 let paCoin = gameDataList[IdxPlayerACoin]
245245 let paPubKey58 = gameDataList[IdxPlayerAPubKey58]
246246 let payType = gameDataList[IdxPayType]
247247 let payAmt = parseIntValue(gameDataList[IdxPayAmt])
248248 let winAmt = parseIntValue(gameDataList[IdxWinAmt])
249249 let pubKey58 = toBase58String(i.callerPublicKey)
250250 let feeAssetId = isDefined(i.feeAssetId)
251251 if (feeAssetId)
252252 then throw("Transaction's fee must be in Waves. Game aborted.")
253253 else if ((gameState != STATESUBMITTED))
254254 then throw("Invalid game state for passed gameId. Game aborted.")
255255 else if ((paPubKey58 != pubKey58))
256256 then throw("You cannot cancel a game created by another player. Game aborted.")
257257 else if ((i.caller == this))
258258 then throw("Coinflip contract cannot cancel a game. Game aborted.")
259259 else {
260260 let newGameDataStr = FormatGameDataStr(STATECANCELED, paCoin, paPubKey58, payType, payAmt, winAmt, "", "", "")
261261 let refundAmt = fraction(payAmt, ((100 - FEEWAVESBET) - FEEMCAFEE), 100)
262262 let refundWallet = addressFromPublicKey(fromBase58String(paPubKey58))
263263 let refundToken = tokenType(payType)
264264 ScriptResult(WriteSet([DataEntry(gameId, newGameDataStr)]), TransferSet([ScriptTransfer(refundWallet, refundAmt, refundToken)]))
265265 }
266266 }
267267
268268

github/deemru/w8io/026f985 
74.84 ms