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:AAIDAAAAAAAAAAAAAAASAAAAAAlXaW5TZXJ2ZXIJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQIAAAAjM045WG55UHBXeFlvaEtIN3o1ZEV1cThycG5vYnB5elByekUAAAAAB1dBVkVMRVQJAABoAAAAAgkAAGgAAAACAAAAAAAAAABkAAAAAAAAAAPoAAAAAAAAAAPoAAAAAApDT01NSVNTSU9OCQAAaQAAAAIJAABoAAAAAgAAAAAAAAAABQUAAAAHV0FWRUxFVAAAAAAAAAAD6AAAAAAOVGlja2V0c1BlcldhdmUAAAAAAAAAAGQAAAAAC0NVUlJFTlRHQU1FAgAAAA0kQ1VSUkVOVF9HQU1FAAAAAA9HQU1FU0NPVU5URVJLRVkCAAAACSRHQU1FX05VTQAAAAAKTEFTVFRJQ0tFVAIAAAAMJExBU1RfVElDS0VUAAAAAARCQU5LAgAAAAokR0FNRV9CQU5LAQAAAA5nZXRQbGF5ZXJzTGlzdAAAAAIAAAAGZ2FtZUlkAAAADWN1cnJlbnRQbGF5ZXIEAAAAEHBsYXllcnNQcmVzZW50ZWQJAQAAAAlpc0Rl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gkAASwAAAACBQAAAAZnYW1lSWQCAAAAAV8FAAAAEHBsYXllckFkZHJlc3NTdHICAAAACl9JZldpbnNHZXQFAAAADHBsYXllcldpbkFtdAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAGZ2FtZUlkAgAAAAFfBQAAABBwbGF5ZXJBZGRyZXNzU3RyAgAAAA1fdG90YWxCZXRzQW10BQAAABVuZXdUb3RhbFBsYXllckJldHNBbXQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAGZ2FtZUlkAgAAAAhfcGxheWVycwkBAAAADmdldFBsYXllcnNMaXN0AAAAAgUAAAAGZ2FtZUlkBQAAABBwbGF5ZXJBZGRyZXNzU3RyCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAApMQVNUVElDS0VUCQEAAAANZ2V0TGFzdFRpY2tldAAAAAEFAAAACnBheW1lbnRBbXQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACBQAAAAZnYW1lSWQCAAAAAV8FAAAABEJBTksFAAAADm5ld0JhbmtCYWxhbmNlBQAAAANuaWwEAAAAC3RvV2luU2VydmVyCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAACVdpblNlcnZlcgUAAAAKcGF5bWVudEFtdAUAAAAEdW5pdAUAAAADbmlsCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQUAAAAHYmV0RGF0YQkBAAAAC1RyYW5zZmVyU2V0AAAAAQUAAAALdG9XaW5TZXJ2ZXIAAAAA5BAFzA==", "chainId": 84, "height": 666893, "spentComplexity": 0 } View: original | compacted Prev: CyA88LXvvL7V7Z6igTx4qK4bBM1sq3vi2nAgmDmJ1DY9 Next: BF1z96Yeah1dGQ7ygP7YgAaMzo6iso7wnErSrEgsLByF Diff:
Old | New | Differences | |
---|---|---|---|
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
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 | - | ||
42 | 30 | func getOrCreateLastTicket () = { | |
43 | 31 | let isLastTicketPresented = isDefined(getInteger(this, LASTTICKET)) | |
44 | 32 | if (!(isLastTicketPresented)) | |
47 | 35 | } | |
48 | 36 | ||
49 | 37 | ||
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 | + | ||
50 | 49 | func getTickets (gameId,playerAddressStr,paymentAmt) = { | |
51 | 50 | let lastTicket = getOrCreateLastTicket() | |
52 | 51 | let wavesPayment = (paymentAmt / WAVELET) | |
53 | 52 | let firstNewTicket = (lastTicket + 1) | |
54 | 53 | 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) | |
56 | 56 | let ticketsStr = isDefined(getString(this, (((gameId + "_") + playerAddressStr) + "_tickets"))) | |
57 | 57 | if (ticketsStr) | |
58 | 58 | then { | |
59 | 59 | 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") | |
61 | 69 | } | |
62 | - | else | |
70 | + | else (((firstNewTicketStr + "_") + lastNewTicketStr) + "_0_0_0_0_0_0") | |
63 | 71 | } | |
64 | 72 | ||
65 | 73 | ||
129 | 137 | let playerPubKey58 = toBase58String(i.callerPublicKey) | |
130 | 138 | let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58)) | |
131 | 139 | 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)] | |
133 | 141 | WriteSet(zeroData) | |
134 | 142 | } | |
135 | 143 | ||
155 | 163 | let newBankBalance = getBankBalance(gameId, paymentAmt) | |
156 | 164 | let newTotalPlayerBetsAmt = getTotalPlayerBetsAmt(gameId, playerAddressStr, paymentAmt) | |
157 | 165 | 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)] | |
159 | 167 | let toWinServer = [ScriptTransfer(WinServer, paymentAmt, unit)] | |
160 | 168 | ScriptResult(WriteSet(betData), TransferSet(toWinServer)) | |
161 | 169 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let WinServer = addressFromStringValue("3N9XnyPpWxYohKH7z5dEuq8rpnobpyzPrzE") | |
5 | 5 | ||
6 | 6 | let WAVELET = ((100 * 1000) * 1000) | |
7 | 7 | ||
8 | 8 | let COMMISSION = ((5 * WAVELET) / 1000) | |
9 | 9 | ||
10 | 10 | let TicketsPerWave = 100 | |
11 | 11 | ||
12 | 12 | let CURRENTGAME = "$CURRENT_GAME" | |
13 | 13 | ||
14 | 14 | let GAMESCOUNTERKEY = "$GAME_NUM" | |
15 | 15 | ||
16 | 16 | let LASTTICKET = "$LAST_TICKET" | |
17 | 17 | ||
18 | 18 | let BANK = "$GAME_BANK" | |
19 | 19 | ||
20 | 20 | func getPlayersList (gameId,currentPlayer) = { | |
21 | 21 | let playersPresented = isDefined(getString(this, (gameId + "_players"))) | |
22 | 22 | if (!(playersPresented)) | |
23 | 23 | then currentPlayer | |
24 | 24 | else if (isDefined(getString(this, (((gameId + "_") + currentPlayer) + "_tickets")))) | |
25 | 25 | then getStringValue(this, (gameId + "_players")) | |
26 | 26 | else ((getStringValue(this, (gameId + "_players")) + "_") + currentPlayer) | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
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 | - | ||
42 | 30 | func getOrCreateLastTicket () = { | |
43 | 31 | let isLastTicketPresented = isDefined(getInteger(this, LASTTICKET)) | |
44 | 32 | if (!(isLastTicketPresented)) | |
45 | 33 | then 0 | |
46 | 34 | else getIntegerValue(this, LASTTICKET) | |
47 | 35 | } | |
48 | 36 | ||
49 | 37 | ||
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 | + | ||
50 | 49 | func getTickets (gameId,playerAddressStr,paymentAmt) = { | |
51 | 50 | let lastTicket = getOrCreateLastTicket() | |
52 | 51 | let wavesPayment = (paymentAmt / WAVELET) | |
53 | 52 | let firstNewTicket = (lastTicket + 1) | |
54 | 53 | 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) | |
56 | 56 | let ticketsStr = isDefined(getString(this, (((gameId + "_") + playerAddressStr) + "_tickets"))) | |
57 | 57 | if (ticketsStr) | |
58 | 58 | then { | |
59 | 59 | 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") | |
61 | 69 | } | |
62 | - | else | |
70 | + | else (((firstNewTicketStr + "_") + lastNewTicketStr) + "_0_0_0_0_0_0") | |
63 | 71 | } | |
64 | 72 | ||
65 | 73 | ||
66 | 74 | func getLastTicket (paymentAmt) = { | |
67 | 75 | let lastTicket = getOrCreateLastTicket() | |
68 | 76 | let wavesPayment = (paymentAmt / WAVELET) | |
69 | 77 | (lastTicket + (wavesPayment * TicketsPerWave)) | |
70 | 78 | } | |
71 | 79 | ||
72 | 80 | ||
73 | 81 | func IncrementGameNum (gameId,txId) = { | |
74 | 82 | let gameNum = match getInteger(this, GAMESCOUNTERKEY) { | |
75 | 83 | case num: Int => | |
76 | 84 | num | |
77 | 85 | case _ => | |
78 | 86 | 0 | |
79 | 87 | } | |
80 | 88 | if ((gameId == txId)) | |
81 | 89 | then (gameNum + 1) | |
82 | 90 | else gameNum | |
83 | 91 | } | |
84 | 92 | ||
85 | 93 | ||
86 | 94 | func getOrCreateCurrentGame (txId) = { | |
87 | 95 | let isCurrentGamePresented = isDefined(getString(this, CURRENTGAME)) | |
88 | 96 | if (!(isCurrentGamePresented)) | |
89 | 97 | then txId | |
90 | 98 | else if ((getStringValue(this, CURRENTGAME) == "")) | |
91 | 99 | then txId | |
92 | 100 | else getStringValue(this, CURRENTGAME) | |
93 | 101 | } | |
94 | 102 | ||
95 | 103 | ||
96 | 104 | func getCurrentGame (txId) = { | |
97 | 105 | let gameId = getOrCreateCurrentGame(txId) | |
98 | 106 | let gameAlreadyPlayed = isDefined(getString(this, (gameId + "_result"))) | |
99 | 107 | if (gameAlreadyPlayed) | |
100 | 108 | then txId | |
101 | 109 | else gameId | |
102 | 110 | } | |
103 | 111 | ||
104 | 112 | ||
105 | 113 | func getBankBalance (gameId,paymentAmt) = { | |
106 | 114 | let bankBalance = match getInteger(this, ((gameId + "_") + BANK)) { | |
107 | 115 | case num: Int => | |
108 | 116 | num | |
109 | 117 | case _ => | |
110 | 118 | 0 | |
111 | 119 | } | |
112 | 120 | (bankBalance + paymentAmt) | |
113 | 121 | } | |
114 | 122 | ||
115 | 123 | ||
116 | 124 | func getTotalPlayerBetsAmt (gameId,playerAddressStr,paymentAmt) = { | |
117 | 125 | let totalPlayerBets = match getInteger(this, (((gameId + "_") + playerAddressStr) + "_totalBetsAmt")) { | |
118 | 126 | case num: Int => | |
119 | 127 | num | |
120 | 128 | case _ => | |
121 | 129 | 0 | |
122 | 130 | } | |
123 | 131 | (totalPlayerBets + paymentAmt) | |
124 | 132 | } | |
125 | 133 | ||
126 | 134 | ||
127 | 135 | @Callable(i) | |
128 | 136 | func resetGameData (gameId) = { | |
129 | 137 | let playerPubKey58 = toBase58String(i.callerPublicKey) | |
130 | 138 | let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58)) | |
131 | 139 | 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)] | |
133 | 141 | WriteSet(zeroData) | |
134 | 142 | } | |
135 | 143 | ||
136 | 144 | ||
137 | 145 | ||
138 | 146 | @Callable(i) | |
139 | 147 | func bet () = { | |
140 | 148 | let txId = toBase58String(i.transactionId) | |
141 | 149 | let gameId = getCurrentGame(txId) | |
142 | 150 | let gameNum = IncrementGameNum(gameId, txId) | |
143 | 151 | let pmt = extract(i.payment) | |
144 | 152 | let paymentAmt = pmt.amount | |
145 | 153 | let betNotInWaves = isDefined(pmt.assetId) | |
146 | 154 | let feeNotInWaves = isDefined(pmt.assetId) | |
147 | 155 | let playerPubKey58 = toBase58String(i.callerPublicKey) | |
148 | 156 | let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58)) | |
149 | 157 | if (betNotInWaves) | |
150 | 158 | then throw("Bet amount must be in Waves") | |
151 | 159 | else if (feeNotInWaves) | |
152 | 160 | then throw("Transaction's fee must be in Waves") | |
153 | 161 | else { | |
154 | 162 | let playerAddressStr = toString(playerAddress) | |
155 | 163 | let newBankBalance = getBankBalance(gameId, paymentAmt) | |
156 | 164 | let newTotalPlayerBetsAmt = getTotalPlayerBetsAmt(gameId, playerAddressStr, paymentAmt) | |
157 | 165 | 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)] | |
159 | 167 | let toWinServer = [ScriptTransfer(WinServer, paymentAmt, unit)] | |
160 | 168 | ScriptResult(WriteSet(betData), TransferSet(toWinServer)) | |
161 | 169 | } | |
162 | 170 | } | |
163 | 171 | ||
164 | 172 |
github/deemru/w8io/026f985 34.61 ms ◑