tx · EnpE8ac45xwM9iADdDzuBhnJ43evyfjgEGNhXn36d7bH

3N6yFJ5Z8NUUQvfGGMLp5efmevRRtTgQuun:  -0.01400000 Waves

2019.09.08 12:04 [666893] smart account 3N6yFJ5Z8NUUQvfGGMLp5efmevRRtTgQuun > SELF 0.00000000 Waves

{ "type": 13, "id": "EnpE8ac45xwM9iADdDzuBhnJ43evyfjgEGNhXn36d7bH", "fee": 1400000, "feeAssetId": null, "timestamp": 1567933497768, "version": 1, "sender": "3N6yFJ5Z8NUUQvfGGMLp5efmevRRtTgQuun", "senderPublicKey": "7uRSDXQUkUS7719CDA4wXghhzsWrF22gb18FGDPZyA6P", "proofs": [ "5RTS9NuQC6KuWERuopSdErJjNJXuybuCxEcEeuyEiL9rTpVPiahZVuZqHEt76L8AgkA12C7Sz8FwipBYnENsUxVy" ], "script": "base64:AAIDAAAAAAAAAAAAAAASAAAAAAlXaW5TZXJ2ZXIJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQIAAAAjM045WG55UHBXeFlvaEtIN3o1ZEV1cThycG5vYnB5elByekUAAAAAB1dBVkVMRVQJAABoAAAAAgkAAGgAAAACAAAAAAAAAABkAAAAAAAAAAPoAAAAAAAAAAPoAAAAAApDT01NSVNTSU9OCQAAaQAAAAIJAABoAAAAAgAAAAAAAAAABQUAAAAHV0FWRUxFVAAAAAAAAAAD6AAAAAAOVGlja2V0c1BlcldhdmUAAAAAAAAAAGQAAAAAC0NVUlJFTlRHQU1FAgAAAA0kQ1VSUkVOVF9HQU1FAAAAAA9HQU1FU0NPVU5URVJLRVkCAAAACSRHQU1FX05VTQAAAAAKTEFTVFRJQ0tFVAIAAAAMJExBU1RfVElDS0VUAAAAAARCQU5LAgAAAAokR0FNRV9CQU5LAQAAAA5nZXRQbGF5ZXJzTGlzdAAAAAIAAAAGZ2FtZUlkAAAADWN1cnJlbnRQbGF5ZXIEAAAAEHBsYXllcnNQcmVzZW50ZWQJAQAAAAlpc0R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AgkAASwAAAACBQAAAAZnYW1lSWQCAAAAAV8FAAAAEHBsYXllckFkZHJlc3NTdHICAAAACl9JZldpbnNHZXQFAAAADHBsYXllcldpbkFtdAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAGZ2FtZUlkAgAAAAFfBQAAABBwbGF5ZXJBZGRyZXNzU3RyAgAAAA1fdG90YWxCZXRzQW10BQAAABVuZXdUb3RhbFBsYXllckJldHNBbXQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAGZ2FtZUlkAgAAAAhfcGxheWVycwkBAAAADmdldFBsYXllcnNMaXN0AAAAAgUAAAAGZ2FtZUlkBQAAABBwbGF5ZXJBZGRyZXNzU3RyCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAApMQVNUVElDS0VUCQEAAAANZ2V0TGFzdFRpY2tldAAAAAEFAAAACnBheW1lbnRBbXQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACBQAAAAZnYW1lSWQCAAAAAV8FAAAABEJBTksFAAAADm5ld0JhbmtCYWxhbmNlBQAAAANuaWwEAAAAC3RvV2luU2VydmVyCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAACVdpblNlcnZlcgUAAAAKcGF5bWVudEFtdAUAAAAEdW5pdAUAAAADbmlsCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQUAAAAHYmV0RGF0YQkBAAAAC1RyYW5zZmVyU2V0AAAAAQUAAAALdG9XaW5TZXJ2ZXIAAAAA5BAFzA==", "chainId": 84, "height": 666893, "spentComplexity": 0 } View: original | compacted Prev: CyA88LXvvL7V7Z6igTx4qK4bBM1sq3vi2nAgmDmJ1DY9 Next: BF1z96Yeah1dGQ7ygP7YgAaMzo6iso7wnErSrEgsLByF Diff:
OldNewDifferences
2727 }
2828
2929
30-func FormatGameDataParam (p) = {
31- let s = size(p)
32- if ((s == 0))
33- then throw("Parameter size must be greater then 0")
34- else if ((s > 99))
35- then throw("Parameter size must be less then 100")
36- else if ((10 > s))
37- then (("0" + toString(s)) + p)
38- else (toString(s) + p)
39- }
40-
41-
4230 func getOrCreateLastTicket () = {
4331 let isLastTicketPresented = isDefined(getInteger(this, LASTTICKET))
4432 if (!(isLastTicketPresented))
4735 }
4836
4937
38+func getPlayerBetsCount (gameId,playerAddressStr) = {
39+ let betsCount = match getInteger(this, (((gameId + "_") + playerAddressStr) + "_betsCount")) {
40+ case num: Int =>
41+ num
42+ case _ =>
43+ 0
44+ }
45+ betsCount
46+ }
47+
48+
5049 func getTickets (gameId,playerAddressStr,paymentAmt) = {
5150 let lastTicket = getOrCreateLastTicket()
5251 let wavesPayment = (paymentAmt / WAVELET)
5352 let firstNewTicket = (lastTicket + 1)
5453 let lastNewTicket = ((firstNewTicket + (wavesPayment * TicketsPerWave)) - 1)
55- let newTickets = ((FormatGameDataParam(toString(firstNewTicket)) + "_") + FormatGameDataParam(toString(lastNewTicket)))
54+ let firstNewTicketStr = toString(firstNewTicket)
55+ let lastNewTicketStr = toString(lastNewTicket)
5656 let ticketsStr = isDefined(getString(this, (((gameId + "_") + playerAddressStr) + "_tickets")))
5757 if (ticketsStr)
5858 then {
5959 let currentTickets = getStringValue(this, (((gameId + "_") + playerAddressStr) + "_tickets"))
60- ((currentTickets + " ") + newTickets)
60+ let currentPlayerBetNum = getPlayerBetsCount(gameId, playerAddressStr)
61+ let CTL = split(currentTickets, "_")
62+ if ((currentPlayerBetNum == 1))
63+ then (((((((CTL[0] + "_") + CTL[1]) + "_") + firstNewTicketStr) + "_") + lastNewTicketStr) + "_0_0_0_0")
64+ else if ((currentPlayerBetNum == 2))
65+ then ((((((((((CTL[0] + "_") + CTL[1]) + "_") + CTL[2]) + "_") + CTL[3]) + firstNewTicketStr) + "_") + lastNewTicketStr) + "_0_0")
66+ else if ((currentPlayerBetNum == 3))
67+ then ((((((((((((CTL[0] + "_") + CTL[1]) + "_") + CTL[2]) + "_") + CTL[3]) + CTL[4]) + "_") + CTL[5]) + firstNewTicketStr) + "_") + lastNewTicketStr)
68+ else throw("Error, bid limit exceeded")
6169 }
62- else newTickets
70+ else (((firstNewTicketStr + "_") + lastNewTicketStr) + "_0_0_0_0_0_0")
6371 }
6472
6573
129137 let playerPubKey58 = toBase58String(i.callerPublicKey)
130138 let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58))
131139 let playerAddressStr = toString(playerAddress)
132- let zeroData = [DataEntry(CURRENTGAME, ""), DataEntry(GAMESCOUNTERKEY, 0), DataEntry((((gameId + "_") + playerAddressStr) + "_tickets"), ""), DataEntry((gameId + "_players"), ""), DataEntry(LASTTICKET, 0)]
140+ let zeroData = [DataEntry(CURRENTGAME, ""), DataEntry(GAMESCOUNTERKEY, 0), DataEntry((((gameId + "_") + playerAddressStr) + "_tickets"), ""), DataEntry((gameId + "_players"), ""), DataEntry(LASTTICKET, 0), DataEntry((((gameId + "_") + playerAddressStr) + "_IfWinsGet"), 0), DataEntry((((gameId + "_") + playerAddressStr) + "_totalBetsAmt"), 0), DataEntry(((gameId + "_") + BANK), 0)]
133141 WriteSet(zeroData)
134142 }
135143
155163 let newBankBalance = getBankBalance(gameId, paymentAmt)
156164 let newTotalPlayerBetsAmt = getTotalPlayerBetsAmt(gameId, playerAddressStr, paymentAmt)
157165 let playerWinAmt = ((newTotalPlayerBetsAmt * 90) / 100)
158- let betData = [DataEntry(CURRENTGAME, gameId), DataEntry(GAMESCOUNTERKEY, gameNum), DataEntry((((gameId + "_") + playerAddressStr) + "_tickets"), getTickets(gameId, playerAddressStr, paymentAmt)), DataEntry((((gameId + "_") + playerAddressStr) + "_IfWinsGet"), playerWinAmt), DataEntry((((gameId + "_") + playerAddressStr) + "_totalBetsAmt"), newTotalPlayerBetsAmt), DataEntry((gameId + "_players"), getPlayersList(gameId, playerAddressStr)), DataEntry(LASTTICKET, getLastTicket(paymentAmt)), DataEntry(((gameId + "_") + BANK), newBankBalance)]
166+ let betData = [DataEntry(CURRENTGAME, gameId), DataEntry(GAMESCOUNTERKEY, gameNum), DataEntry((((gameId + "_") + playerAddressStr) + "_tickets"), getTickets(gameId, playerAddressStr, paymentAmt)), DataEntry((((gameId + "_") + playerAddressStr) + "_betsCount"), (getPlayerBetsCount(gameId, playerAddressStr) + 1)), DataEntry((((gameId + "_") + playerAddressStr) + "_IfWinsGet"), playerWinAmt), DataEntry((((gameId + "_") + playerAddressStr) + "_totalBetsAmt"), newTotalPlayerBetsAmt), DataEntry((gameId + "_players"), getPlayersList(gameId, playerAddressStr)), DataEntry(LASTTICKET, getLastTicket(paymentAmt)), DataEntry(((gameId + "_") + BANK), newBankBalance)]
159167 let toWinServer = [ScriptTransfer(WinServer, paymentAmt, unit)]
160168 ScriptResult(WriteSet(betData), TransferSet(toWinServer))
161169 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let WinServer = addressFromStringValue("3N9XnyPpWxYohKH7z5dEuq8rpnobpyzPrzE")
55
66 let WAVELET = ((100 * 1000) * 1000)
77
88 let COMMISSION = ((5 * WAVELET) / 1000)
99
1010 let TicketsPerWave = 100
1111
1212 let CURRENTGAME = "$CURRENT_GAME"
1313
1414 let GAMESCOUNTERKEY = "$GAME_NUM"
1515
1616 let LASTTICKET = "$LAST_TICKET"
1717
1818 let BANK = "$GAME_BANK"
1919
2020 func getPlayersList (gameId,currentPlayer) = {
2121 let playersPresented = isDefined(getString(this, (gameId + "_players")))
2222 if (!(playersPresented))
2323 then currentPlayer
2424 else if (isDefined(getString(this, (((gameId + "_") + currentPlayer) + "_tickets"))))
2525 then getStringValue(this, (gameId + "_players"))
2626 else ((getStringValue(this, (gameId + "_players")) + "_") + currentPlayer)
2727 }
2828
2929
30-func FormatGameDataParam (p) = {
31- let s = size(p)
32- if ((s == 0))
33- then throw("Parameter size must be greater then 0")
34- else if ((s > 99))
35- then throw("Parameter size must be less then 100")
36- else if ((10 > s))
37- then (("0" + toString(s)) + p)
38- else (toString(s) + p)
39- }
40-
41-
4230 func getOrCreateLastTicket () = {
4331 let isLastTicketPresented = isDefined(getInteger(this, LASTTICKET))
4432 if (!(isLastTicketPresented))
4533 then 0
4634 else getIntegerValue(this, LASTTICKET)
4735 }
4836
4937
38+func getPlayerBetsCount (gameId,playerAddressStr) = {
39+ let betsCount = match getInteger(this, (((gameId + "_") + playerAddressStr) + "_betsCount")) {
40+ case num: Int =>
41+ num
42+ case _ =>
43+ 0
44+ }
45+ betsCount
46+ }
47+
48+
5049 func getTickets (gameId,playerAddressStr,paymentAmt) = {
5150 let lastTicket = getOrCreateLastTicket()
5251 let wavesPayment = (paymentAmt / WAVELET)
5352 let firstNewTicket = (lastTicket + 1)
5453 let lastNewTicket = ((firstNewTicket + (wavesPayment * TicketsPerWave)) - 1)
55- let newTickets = ((FormatGameDataParam(toString(firstNewTicket)) + "_") + FormatGameDataParam(toString(lastNewTicket)))
54+ let firstNewTicketStr = toString(firstNewTicket)
55+ let lastNewTicketStr = toString(lastNewTicket)
5656 let ticketsStr = isDefined(getString(this, (((gameId + "_") + playerAddressStr) + "_tickets")))
5757 if (ticketsStr)
5858 then {
5959 let currentTickets = getStringValue(this, (((gameId + "_") + playerAddressStr) + "_tickets"))
60- ((currentTickets + " ") + newTickets)
60+ let currentPlayerBetNum = getPlayerBetsCount(gameId, playerAddressStr)
61+ let CTL = split(currentTickets, "_")
62+ if ((currentPlayerBetNum == 1))
63+ then (((((((CTL[0] + "_") + CTL[1]) + "_") + firstNewTicketStr) + "_") + lastNewTicketStr) + "_0_0_0_0")
64+ else if ((currentPlayerBetNum == 2))
65+ then ((((((((((CTL[0] + "_") + CTL[1]) + "_") + CTL[2]) + "_") + CTL[3]) + firstNewTicketStr) + "_") + lastNewTicketStr) + "_0_0")
66+ else if ((currentPlayerBetNum == 3))
67+ then ((((((((((((CTL[0] + "_") + CTL[1]) + "_") + CTL[2]) + "_") + CTL[3]) + CTL[4]) + "_") + CTL[5]) + firstNewTicketStr) + "_") + lastNewTicketStr)
68+ else throw("Error, bid limit exceeded")
6169 }
62- else newTickets
70+ else (((firstNewTicketStr + "_") + lastNewTicketStr) + "_0_0_0_0_0_0")
6371 }
6472
6573
6674 func getLastTicket (paymentAmt) = {
6775 let lastTicket = getOrCreateLastTicket()
6876 let wavesPayment = (paymentAmt / WAVELET)
6977 (lastTicket + (wavesPayment * TicketsPerWave))
7078 }
7179
7280
7381 func IncrementGameNum (gameId,txId) = {
7482 let gameNum = match getInteger(this, GAMESCOUNTERKEY) {
7583 case num: Int =>
7684 num
7785 case _ =>
7886 0
7987 }
8088 if ((gameId == txId))
8189 then (gameNum + 1)
8290 else gameNum
8391 }
8492
8593
8694 func getOrCreateCurrentGame (txId) = {
8795 let isCurrentGamePresented = isDefined(getString(this, CURRENTGAME))
8896 if (!(isCurrentGamePresented))
8997 then txId
9098 else if ((getStringValue(this, CURRENTGAME) == ""))
9199 then txId
92100 else getStringValue(this, CURRENTGAME)
93101 }
94102
95103
96104 func getCurrentGame (txId) = {
97105 let gameId = getOrCreateCurrentGame(txId)
98106 let gameAlreadyPlayed = isDefined(getString(this, (gameId + "_result")))
99107 if (gameAlreadyPlayed)
100108 then txId
101109 else gameId
102110 }
103111
104112
105113 func getBankBalance (gameId,paymentAmt) = {
106114 let bankBalance = match getInteger(this, ((gameId + "_") + BANK)) {
107115 case num: Int =>
108116 num
109117 case _ =>
110118 0
111119 }
112120 (bankBalance + paymentAmt)
113121 }
114122
115123
116124 func getTotalPlayerBetsAmt (gameId,playerAddressStr,paymentAmt) = {
117125 let totalPlayerBets = match getInteger(this, (((gameId + "_") + playerAddressStr) + "_totalBetsAmt")) {
118126 case num: Int =>
119127 num
120128 case _ =>
121129 0
122130 }
123131 (totalPlayerBets + paymentAmt)
124132 }
125133
126134
127135 @Callable(i)
128136 func resetGameData (gameId) = {
129137 let playerPubKey58 = toBase58String(i.callerPublicKey)
130138 let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58))
131139 let playerAddressStr = toString(playerAddress)
132- let zeroData = [DataEntry(CURRENTGAME, ""), DataEntry(GAMESCOUNTERKEY, 0), DataEntry((((gameId + "_") + playerAddressStr) + "_tickets"), ""), DataEntry((gameId + "_players"), ""), DataEntry(LASTTICKET, 0)]
140+ let zeroData = [DataEntry(CURRENTGAME, ""), DataEntry(GAMESCOUNTERKEY, 0), DataEntry((((gameId + "_") + playerAddressStr) + "_tickets"), ""), DataEntry((gameId + "_players"), ""), DataEntry(LASTTICKET, 0), DataEntry((((gameId + "_") + playerAddressStr) + "_IfWinsGet"), 0), DataEntry((((gameId + "_") + playerAddressStr) + "_totalBetsAmt"), 0), DataEntry(((gameId + "_") + BANK), 0)]
133141 WriteSet(zeroData)
134142 }
135143
136144
137145
138146 @Callable(i)
139147 func bet () = {
140148 let txId = toBase58String(i.transactionId)
141149 let gameId = getCurrentGame(txId)
142150 let gameNum = IncrementGameNum(gameId, txId)
143151 let pmt = extract(i.payment)
144152 let paymentAmt = pmt.amount
145153 let betNotInWaves = isDefined(pmt.assetId)
146154 let feeNotInWaves = isDefined(pmt.assetId)
147155 let playerPubKey58 = toBase58String(i.callerPublicKey)
148156 let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58))
149157 if (betNotInWaves)
150158 then throw("Bet amount must be in Waves")
151159 else if (feeNotInWaves)
152160 then throw("Transaction's fee must be in Waves")
153161 else {
154162 let playerAddressStr = toString(playerAddress)
155163 let newBankBalance = getBankBalance(gameId, paymentAmt)
156164 let newTotalPlayerBetsAmt = getTotalPlayerBetsAmt(gameId, playerAddressStr, paymentAmt)
157165 let playerWinAmt = ((newTotalPlayerBetsAmt * 90) / 100)
158- let betData = [DataEntry(CURRENTGAME, gameId), DataEntry(GAMESCOUNTERKEY, gameNum), DataEntry((((gameId + "_") + playerAddressStr) + "_tickets"), getTickets(gameId, playerAddressStr, paymentAmt)), DataEntry((((gameId + "_") + playerAddressStr) + "_IfWinsGet"), playerWinAmt), DataEntry((((gameId + "_") + playerAddressStr) + "_totalBetsAmt"), newTotalPlayerBetsAmt), DataEntry((gameId + "_players"), getPlayersList(gameId, playerAddressStr)), DataEntry(LASTTICKET, getLastTicket(paymentAmt)), DataEntry(((gameId + "_") + BANK), newBankBalance)]
166+ let betData = [DataEntry(CURRENTGAME, gameId), DataEntry(GAMESCOUNTERKEY, gameNum), DataEntry((((gameId + "_") + playerAddressStr) + "_tickets"), getTickets(gameId, playerAddressStr, paymentAmt)), DataEntry((((gameId + "_") + playerAddressStr) + "_betsCount"), (getPlayerBetsCount(gameId, playerAddressStr) + 1)), DataEntry((((gameId + "_") + playerAddressStr) + "_IfWinsGet"), playerWinAmt), DataEntry((((gameId + "_") + playerAddressStr) + "_totalBetsAmt"), newTotalPlayerBetsAmt), DataEntry((gameId + "_players"), getPlayersList(gameId, playerAddressStr)), DataEntry(LASTTICKET, getLastTicket(paymentAmt)), DataEntry(((gameId + "_") + BANK), newBankBalance)]
159167 let toWinServer = [ScriptTransfer(WinServer, paymentAmt, unit)]
160168 ScriptResult(WriteSet(betData), TransferSet(toWinServer))
161169 }
162170 }
163171
164172

github/deemru/w8io/026f985 
34.61 ms