tx · 5cJnTKBDzs5fhCL2eGwJmkX13PP7armMZbX8sEDaafL3

3MxsZUkxjngrsHn7WNd2xEbwWkUfKdmzP6u:  -0.01400000 Waves

2019.10.26 17:00 [737191] smart account 3MxsZUkxjngrsHn7WNd2xEbwWkUfKdmzP6u > SELF 0.00000000 Waves

{ "type": 13, "id": "5cJnTKBDzs5fhCL2eGwJmkX13PP7armMZbX8sEDaafL3", "fee": 1400000, "feeAssetId": null, "timestamp": 1572098438486, "version": 1, "sender": "3MxsZUkxjngrsHn7WNd2xEbwWkUfKdmzP6u", "senderPublicKey": "BFgvNhTxuzThVrRXLX7LfTfCHVeCPDsF6JEpadKJPvox", "proofs": [ "3JTUXzhHLYKMM84TjF75aVHwekg8qMm7E9t4YK2TUtP6kpk9QCV8ke9Z9btFkj25aL8NDJDh39YWDmjpGuKM9tag" ], "script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAAFAAAAAAJUlNBUFVCTElDCQACWwAAAAECAAABj2Jhc2U2NDpNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQW1PbFJCVFlFTzNIN1k5ckJtb0ZRRm40MzkyUHgwUXcxM0RzZEVobnpNSDJjajZZNXltUHVDT0xNTmU1cXJVelFsOG9STHpJQnpGVk1abHdVWWwyYm9zck9JeFFiWUY3V1ZRV3ZvVnhFVDFZSWdEbTNOenpPTEE1dUg3Q0tPMHNuc2htTUZDRE9aRWV3NDFHaktoM1BneCtuYkFndVA5WlFQZnFTYWZFbUMzQ04vNHlEc0pyS3JpUm5pWkpvOWpTLzRMTHNSS3dCN0hBWkh6b0Y5TEw3dFNaSDNodGFOR3RiZFRreFoxVHpTVDNNYjJWUFN6c1p2UURvY1hVVk9tSk91MG8yOWFPWStHa0cvRzRSQ0swRkJXUUhFVXZDNTFUUkRTNWs4amFkME8xTW9ialFjNmIxOGQrZnVvVkZkTmZad0dIK3VGdWR0UEczVUpUZjJta3paUUlEQVFBQgAAAAAPR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dfsSjXURhLJ5Q6JXYpfJCyGHv Next: ENfjAzGmH4i6dPzUVAStdu8gS6SvyAqVE6nvxsTWJryG Diff:
OldNewDifferences
4040 }
4141
4242
43-func ValidateBetAndDefineWinAmt (amount) = if (if ((BETMIN > amount))
43+func ValidateBetAndDefineWinAmt (playerCoin,amount) = if (if ((playerCoin == "RED"))
4444 then true
45- else (amount > BETMAX))
46- then throw(((("Bet amount is not in range: minBet=" + toString((BETMIN / 100000000))) + " maxBet=") + toString((BETMAX / 100000000))))
47- else ((((amount * 2) / 100000) * (100 - (FEEWAVESBET + FEEMCAFEE))) / 100)
45+ else (playerCoin == "BLUE"))
46+ then throw("Invalid play, change your play to RED or BLUE.")
47+ else if (if ((BETMIN > amount))
48+ then true
49+ else (amount > BETMAX))
50+ then throw(((("Bet amount is not in range: minBet=" + toString((BETMIN / 100000000))) + " maxBet=") + toString((BETMAX / 100000000))))
51+ else ((((amount * 2) / 100000) * (100 - (FEEWAVESBET + FEEMCAFEE))) / 100)
4852
4953
5054 func ExtractReservedAmt () = match getInteger(this, RESERVATIONKEY) {
9094 let payment = extract(i.payment)
9195 let feeAssetId = isDefined(i.feeAssetId)
9296 let gameIdUsed = isDefined(getString(this, gameId))
93- let winAmt = ValidateBetAndDefineWinAmt(payment.amount)
97+ let winAmt = ValidateBetAndDefineWinAmt(paCoin, payment.amount)
9498 if (if ((payment.assetId != assetInfo(base58'WAVES')))
9599 then (payment.assetId != WBET)
96100 else false)
99103 then throw("Transaction's fee must be in Waves. Game aborted.")
100104 else if (gameIdUsed)
101105 then throw("Passed gameId had been used before. Game aborted.")
102- else if (gameIdUsed)
103- then throw("Passed gameId had been used before. Game aborted.")
104- else {
105- let newGameNum = IncrementGameNum()
106- let playerAPubKey58 = toBase58String(i.callerPublicKey)
107- let gameDataStr = FormatGameDataStr(STATESUBMITTED, paCoin, playerAPubKey58, "", "", winAmt, "")
108- ScriptResult(WriteSet([DataEntry(RESERVATIONKEY, ValidateAndIncreaseReservedAmt(winAmt)), DataEntry(GAMESCOUNTERKEY, newGameNum), DataEntry(gameId, gameDataStr)]), TransferSet([ScriptTransfer(WALLETWAVESBET, ((payment.amount * FEEWAVESBET) / 100), WBET), ScriptTransfer(this, 500000, unit)]))
109- }
106+ else {
107+ let newGameNum = IncrementGameNum()
108+ let playerAPubKey58 = toBase58String(i.callerPublicKey)
109+ let gameDataStr = FormatGameDataStr(STATESUBMITTED, paCoin, playerAPubKey58, "", "", winAmt, "")
110+ ScriptResult(WriteSet([DataEntry(RESERVATIONKEY, ValidateAndIncreaseReservedAmt(winAmt)), DataEntry(GAMESCOUNTERKEY, newGameNum), DataEntry(gameId, gameDataStr)]), TransferSet([ScriptTransfer(WALLETWAVESBET, ((payment.amount * FEEWAVESBET) / 100), WBET), ScriptTransfer(this, 500000, unit)]))
111+ }
110112 }
111113
112114
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let RSAPUBLIC = fromBase64String("base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmOlRBTYEO3H7Y9rBmoFQFn4392Px0Qw13DsdEhnzMH2cj6Y5ymPuCOLMNe5qrUzQl8oRLzIBzFVMZlwUYl2bosrOIxQbYF7WVQWvoVxET1YIgDm3NzzOLA5uH7CKO0snshmMFCDOZEew41GjKh3Pgx+nbAguP9ZQPfqSafEmC3CN/4yDsJrKriRniZJo9jS/4LLsRKwB7HAZHzoF9LL7tSZH3htaNGtbdTkxZ1TzST3Mb2VPSzsZvQDocXUVOmJOu0o29aOY+GkG/G4RCK0FBWQHEUvC51TRDS5k8jad0O1MobjQc6b18d+fuoVFdNfZwGH+uFudtPG3UJTf2mkzZQIDAQAB")
55
66 let GAMESCOUNTERKEY = "$GAME_NUM"
77
88 let RESERVATIONKEY = "$RESERVED_AMOUNT"
99
1010 let WBET = base58'23vgV9p9pD83A7CFbsDEc4zjanep7UeFo4ZRS6oGorhv'
1111
1212 let WALLETWAVESBET = Address(base58'3N2tusqAtDctK8iSTXS6F9rimmftmSuwLUX')
1313
1414 let WALLETMCAFFE = Address(base58'')
1515
1616 let STATESUBMITTED = "SUBMITTED"
1717
1818 let STATEFINISHED = "FINISHED"
1919
2020 let STATECANCELED = "CANCELED"
2121
2222 let WAVELET = ((100 * 1000) * 1000)
2323
2424 let FEEWAVESBET = 4
2525
2626 let FEEMCAFEE = 2
2727
2828 let BETMIN = (1 * WAVELET)
2929
3030 let BETMAX = ((1000 * 100) * WAVELET)
3131
3232 func IncrementGameNum () = {
3333 let gameNum = match getInteger(this, GAMESCOUNTERKEY) {
3434 case num: Int =>
3535 num
3636 case _ =>
3737 0
3838 }
3939 (gameNum + 1)
4040 }
4141
4242
43-func ValidateBetAndDefineWinAmt (amount) = if (if ((BETMIN > amount))
43+func ValidateBetAndDefineWinAmt (playerCoin,amount) = if (if ((playerCoin == "RED"))
4444 then true
45- else (amount > BETMAX))
46- then throw(((("Bet amount is not in range: minBet=" + toString((BETMIN / 100000000))) + " maxBet=") + toString((BETMAX / 100000000))))
47- else ((((amount * 2) / 100000) * (100 - (FEEWAVESBET + FEEMCAFEE))) / 100)
45+ else (playerCoin == "BLUE"))
46+ then throw("Invalid play, change your play to RED or BLUE.")
47+ else if (if ((BETMIN > amount))
48+ then true
49+ else (amount > BETMAX))
50+ then throw(((("Bet amount is not in range: minBet=" + toString((BETMIN / 100000000))) + " maxBet=") + toString((BETMAX / 100000000))))
51+ else ((((amount * 2) / 100000) * (100 - (FEEWAVESBET + FEEMCAFEE))) / 100)
4852
4953
5054 func ExtractReservedAmt () = match getInteger(this, RESERVATIONKEY) {
5155 case a: Int =>
5256 a
5357 case _ =>
5458 0
5559 }
5660
5761
5862 func ValidateAndIncreaseReservedAmt (winAmt) = {
5963 let newReservedAmount = (ExtractReservedAmt() + winAmt)
6064 let balance = assetBalance(this, WBET)
6165 if ((newReservedAmount > balance))
6266 then throw("Insufficient funds on Waves Rider account. Transaction was rejected for your safety.")
6367 else newReservedAmount
6468 }
6569
6670
6771 func FormatGameDataParam (p) = {
6872 let s = size(p)
6973 if ((s == 0))
7074 then throw("Parameter size must be greater then 0")
7175 else if ((s > 99))
7276 then throw("Parameter size must be less then 100")
7377 else if ((10 > s))
7478 then (("0" + toString(s)) + p)
7579 else (toString(s) + p)
7680 }
7781
7882
7983 func FormatGameDataStr (gameState,playerACoin,playerAPubKey58,playerBCoin,playerBPubKey58,winAmt,randOrEmpty) = {
8084 let fullStateStr = ((((((((((FormatGameDataParam(gameState) + "_") + FormatGameDataParam(playerACoin)) + "_") + FormatGameDataParam(playerAPubKey58)) + "_") + FormatGameDataParam(playerBCoin)) + "_") + FormatGameDataParam(playerBPubKey58)) + "_") + FormatGameDataParam(toString(winAmt)))
8185 if ((randOrEmpty == ""))
8286 then fullStateStr
8387 else ((fullStateStr + "_") + FormatGameDataParam(randOrEmpty))
8488 }
8589
8690
8791 @Callable(i)
8892 func playDice (paCoin) = {
8993 let gameId = toBase58String(i.transactionId)
9094 let payment = extract(i.payment)
9195 let feeAssetId = isDefined(i.feeAssetId)
9296 let gameIdUsed = isDefined(getString(this, gameId))
93- let winAmt = ValidateBetAndDefineWinAmt(payment.amount)
97+ let winAmt = ValidateBetAndDefineWinAmt(paCoin, payment.amount)
9498 if (if ((payment.assetId != assetInfo(base58'WAVES')))
9599 then (payment.assetId != WBET)
96100 else false)
97101 then throw("Payment should be in Wavesbet or Waves")
98102 else if (feeAssetId)
99103 then throw("Transaction's fee must be in Waves. Game aborted.")
100104 else if (gameIdUsed)
101105 then throw("Passed gameId had been used before. Game aborted.")
102- else if (gameIdUsed)
103- then throw("Passed gameId had been used before. Game aborted.")
104- else {
105- let newGameNum = IncrementGameNum()
106- let playerAPubKey58 = toBase58String(i.callerPublicKey)
107- let gameDataStr = FormatGameDataStr(STATESUBMITTED, paCoin, playerAPubKey58, "", "", winAmt, "")
108- ScriptResult(WriteSet([DataEntry(RESERVATIONKEY, ValidateAndIncreaseReservedAmt(winAmt)), DataEntry(GAMESCOUNTERKEY, newGameNum), DataEntry(gameId, gameDataStr)]), TransferSet([ScriptTransfer(WALLETWAVESBET, ((payment.amount * FEEWAVESBET) / 100), WBET), ScriptTransfer(this, 500000, unit)]))
109- }
106+ else {
107+ let newGameNum = IncrementGameNum()
108+ let playerAPubKey58 = toBase58String(i.callerPublicKey)
109+ let gameDataStr = FormatGameDataStr(STATESUBMITTED, paCoin, playerAPubKey58, "", "", winAmt, "")
110+ ScriptResult(WriteSet([DataEntry(RESERVATIONKEY, ValidateAndIncreaseReservedAmt(winAmt)), DataEntry(GAMESCOUNTERKEY, newGameNum), DataEntry(gameId, gameDataStr)]), TransferSet([ScriptTransfer(WALLETWAVESBET, ((payment.amount * FEEWAVESBET) / 100), WBET), ScriptTransfer(this, 500000, unit)]))
111+ }
110112 }
111113
112114

github/deemru/w8io/169f3d6 
100.85 ms