tx · 4TFnEEEZGNH6qxfgtBZdDpPoVyLn97ExuhC6vKkCskJT

3Mz7zzdQoHabgytXU3UuTAzADXPBBLgFqu8:  -0.01400000 Waves

2019.12.11 01:50 [803315] smart account 3Mz7zzdQoHabgytXU3UuTAzADXPBBLgFqu8 > SELF 0.00000000 Waves

{ "type": 13, "id": "4TFnEEEZGNH6qxfgtBZdDpPoVyLn97ExuhC6vKkCskJT", "fee": 1400000, "feeAssetId": null, "timestamp": 1576018189636, "version": 1, "sender": "3Mz7zzdQoHabgytXU3UuTAzADXPBBLgFqu8", "senderPublicKey": "6uncmj7GmSzxFAGGX8NcToqPxTxWUHW7Aj1WSbMH2qXw", "proofs": [ "5WZoGHAb7F6XDjNYLferozUMQ8cNU4LqxP5NKfpw6WoczEDuuaanZ2Ym8hu9CxFSqAns6ibunHAo6PsKmfRwkKFz" ], "script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAADwAAAAAJUlNBUFVCTElDCQACWwAAAAECAAABj2Jhc2U2NDpNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQWc0ZEFSNlhiQkRBUzloci9FajNkSnY2RmZjNDY2eC9tT0dNV1UzbHJBQnMzcWE4QkhtdUpHbmtmYnBFZjJ2QXdZVE9XUHZ2emZNMTBPQmJmbG9TeXEzYzlNS3Z5VGUxbHVCTEdxVzR2WlVYSXl2U2d6MWxpeVVWZWZJUXkzZHlGOWpiZVRaYkMwYmJjVC83TzNERUwrMDF6NkErckRDYWNTWjBsR29sU1E2QW5oTHh6SWtWcE9RSmJyQm1DK3grWnVaUENNV3pKeW5kNWFlT243amFqL21rUlZ5eGU2Zy8wT2hXejROaWlaWGV1TVJCKzhtS3kwZldEL1VsSWxaV0hzQVMyWm1ya1hLcWpMcTAvMHdyOElMSmt6bmpTcWRuSTVJYmpnM3VRcmovNEFOK2k5cjI4YVE3My9aa1B0WTVTYncwQU9pQUJCdTdnSG1xOWF5VnhaUUlEQVFB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AA9jYWxsZXJQdWJsaWNLZXkEAAAAC2dhbWVEYXRhU3RyCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAADlNUQVRFU1VCTUlUVEVEAgAAAAFfBQAAAA5wbGF5ZXJQdWJLZXk1OAIAAAABXwUAAAAEYmV0cwkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAD0dBTUVTQ09VTlRFUktFWQUAAAAKbmV3R2FtZU51bQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAGZ2FtZUlkBQAAAAtnYW1lRGF0YVN0cgUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABBQAAAANuaWwAAAAA2x1kTA==", "chainId": 84, "height": 803315, "spentComplexity": 0 } View: original | compacted Prev: BkeAYrsim4zz7fwZHGJwqC5ED9nwaNkMjSeum7bKY8E8 Next: 6JkRa4ErCMiCbFSgakUMvXJRJLUCJ6wmnU1kTCD5AfL4 Diff:
OldNewDifferences
7070 else if (gameIdUsed)
7171 then throw("Passed gameId had been used before. Game aborted.")
7272 else if ((a != payment.amount))
73- then throw("Payment value is different from bet value.")
73+ then throw(("Payment value is different from bet value. " + toString(a)))
7474 else {
7575 let newGameNum = IncrementGameNum()
7676 let playerPubKey58 = toBase58String(i.callerPublicKey)
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 WAVELET = 100000000
1515
1616 let FEEWAVESBET = 4
1717
1818 let FEEMCAFEE = 2
1919
2020 let STATESUBMITTED = "SUBMITTED"
2121
2222 let STATEWON = "WON"
2323
2424 let STATELOST = "LOST"
2525
2626 let BETMIN = (1 * WAVELET)
2727
2828 let BETMAX = (20000000 * WAVELET)
2929
3030 func getAmt (bets) = {
3131 let b01 = take(drop(bets, 4), 10)
3232 let b02 = take(drop(bets, 19), 10)
3333 let b03 = take(drop(bets, 34), 10)
3434 let b04 = take(drop(bets, 49), 10)
3535 let b05 = take(drop(bets, 64), 10)
3636 let b06 = take(drop(bets, 79), 10)
3737 let b07 = take(drop(bets, 94), 10)
3838 let b08 = take(drop(bets, 109), 10)
3939 let b09 = take(drop(bets, 124), 10)
4040 let b10 = take(drop(bets, 139), 10)
4141 (((((((((parseIntValue(b01) + parseIntValue(b02)) + parseIntValue(b03)) + parseIntValue(b04)) + parseIntValue(b05)) + parseIntValue(b06)) + parseIntValue(b07)) + parseIntValue(b08)) + parseIntValue(b09)) + parseIntValue(b10))
4242 }
4343
4444
4545 func IncrementGameNum () = {
4646 let gameNum = match getInteger(this, GAMESCOUNTERKEY) {
4747 case num: Int =>
4848 num
4949 case _ =>
5050 0
5151 }
5252 (gameNum + 1)
5353 }
5454
5555
5656 @Callable(i)
5757 func playRoulette (bets) = {
5858 let gameId = toBase58String(i.transactionId)
5959 let gameIdUsed = isDefined(getString(this, gameId))
6060 let payment = extract(i.payment)
6161 let feeAssetId = isDefined(i.feeAssetId)
6262 let playerBalance = wavesBalance(i.caller)
6363 let a = getAmt(bets)
6464 if ((payment.assetId != WBET))
6565 then throw("Payment should be in Wavesbet")
6666 else if ((1000000 > playerBalance))
6767 then throw("There are not enough waves, it takes 0.01 Waves to bet. Game aborted.")
6868 else if (feeAssetId)
6969 then throw("Transaction's fee must be in Waves. Game aborted.")
7070 else if (gameIdUsed)
7171 then throw("Passed gameId had been used before. Game aborted.")
7272 else if ((a != payment.amount))
73- then throw("Payment value is different from bet value.")
73+ then throw(("Payment value is different from bet value. " + toString(a)))
7474 else {
7575 let newGameNum = IncrementGameNum()
7676 let playerPubKey58 = toBase58String(i.callerPublicKey)
7777 let gameDataStr = ((((STATESUBMITTED + "_") + playerPubKey58) + "_") + bets)
7878 ScriptResult(WriteSet([DataEntry(GAMESCOUNTERKEY, newGameNum), DataEntry(gameId, gameDataStr)]), TransferSet(nil))
7979 }
8080 }
8181
8282

github/deemru/w8io/169f3d6 
41.35 ms