tx · DQ5F21Kg2U4uk5GSiWqHXy5C1CTKggwFPgECqTY9ZXXs 3N5NCEUJze7iYT63sSq2jLqJ4dtbu31P32L: -0.01400000 Waves 2019.09.10 15:04 [669993] smart account 3N5NCEUJze7iYT63sSq2jLqJ4dtbu31P32L > SELF 0.00000000 Waves
{ "type": 13, "id": "DQ5F21Kg2U4uk5GSiWqHXy5C1CTKggwFPgECqTY9ZXXs", "fee": 1400000, "feeAssetId": null, "timestamp": 1568117074002, "version": 1, "sender": "3N5NCEUJze7iYT63sSq2jLqJ4dtbu31P32L", "senderPublicKey": "Ho4R7JJ3qa66rLHUBWDkNTCgxvBahvmis1aHLva1jPU6", "proofs": [ "65FQFfXAprCjh39kCFerbS2CBRvJMcxbT2EbgtqFbedJqqck165MPNBmW56vwzQWNaj8EanRKfMQ2GKNQyJoMMcj" ], "script": "base64:AAIDAAAAAAAAAAAAAAAoAAAAAAlSU0FQVUJMSUMJAAJbAAAAAQIAAALnYmFzZTY0Ok1JSUNJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBZzhBTUlJQ0NnS0NBZ0VBNSs0NDY5ZVNRT3gzbGhuQ2FWWXFONU1ickd0TFZ3VERLeHZKSUJMdkVScS9zQ3RpMzVvdytsWWhPeEJ1dDJWYURJZkZmVVN3SmR4czJDR1dhRzhtbFlsZTNSRDEyNlZwc2RTVVVrVlI1YzhmWmRvV09vaEtvMUE1bmJaVFhpNFJoVW1wUXZVTTMwYXZqSjF2T0Q4bDA3WE1TUSs5OVdsQVVFVlhkbTBvUWVLSHoweGpMNVRDdFYrNkh4R2ZTWDZJZlhuaERNczBFYVNtK2x5Zzc2SHM3c0MyL2pYTGhueXlXdVc5SUVwaGdSd2daSTArN3FTdTVsNWV2TFFoenNBSDRSYklYSmtXWitKV2N6aWU1SEJYMXdyc01DZ3o1MmNBdEJoYWFCNGRWREtxbmh2R1psRDVjUk5teEQxNXFaZXlUNU5HU2NBMjJxc2YxMG5UUlJWK0g2VGpUNXpaWG95SThjV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AAId3JpdGVTZXQJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAAZ3YWxsZXQFAAAACXdpbkFtb3VudAUAAAAEdW5pdAUAAAADbmlsBQAAAAh3cml0ZVNldAkAAAIAAAABCQABLAAAAAIFAAAADUVycm9yR2FtZU92ZXIFAAAABnN0YXR1cwAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAADCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAA3R0eAUAAAAHJG1hdGNoMAYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAANzdHgFAAAAByRtYXRjaDAGBwenb62+", "chainId": 84, "height": 669993, "spentComplexity": 0 } View: original | compacted Prev: 6apooq4Be9XrT1TDr71ezrhXCQHq6JFBisubk2nQ1EKm Next: 5RPwkZcR7MhD6X3vWRLjFEqk5knk6sXoHJBvEiw8B2GM Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let RSAPUBLIC = fromBase64String("base64:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA5+4469eSQOx3lhnCaVYqN5MbrGtLVwTDKxvJIBLvERq/sCti35ow+lYhOxBut2VaDIfFfUSwJdxs2CGWaG8mlYle3RD126VpsdSUUkVR5c8fZdoWOohKo1A5nbZTXi4RhUmpQvUM30avjJ1vOD8l07XMSQ+99WlAUEVXdm0oQeKHz0xjL5TCtV+6HxGfSX6IfXnhDMs0EaSm+lyg76Hs7sC2/jXLhnyyWuW9IEphgRwgZI0+7qSu5l5evLQhzsAH4RbIXJkWZ+JWczie5HBX1wrsMCgz52cAtBhaaB4dVDKqnhvGZlD5cRNmxD15qZeyT5NGScA22qsf10nTRRV+H6TjT5zZXoyI8cWsg5EtnO4Wau8QsxckpVNgL+Dzxwm1/FiNp5Bt4LD/yBW2Yb98FB6Vf95yCy+49fPILG9xA5iMONXZRpIq5xw48fjth8TLvLXRUE9uk+wToQT/tf8ip/eJ5Ow4M5YSO0CZ1EDk86dD9W4oto4b6bHa2EZ91wRXZH7J8zCAo9yUVAJcfCdeEE7SQrjYiD/F9rFOFCvE1LZRSLLEnbvrdWDjPRYxml8YUNtEQs/C+8SJJkamzoRcVE84cxwvrAFhrSf4xXCk+LwYYFz1UguUC6x1979jxIR3J+HWhwTXwfDoDXEMrWAj0veorTYeYB1BMAWu9vRsDNMCAwEAAQ==") | |
5 | 5 | ||
6 | - | let ServerAddress = addressFromStringValue(" | |
6 | + | let ServerAddress = addressFromStringValue("3MuJmCSEUgBNy1R2gesk59xDbWcuTKwwixW") | |
7 | 7 | ||
8 | 8 | let RouletteSections = 21 | |
9 | 9 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let RSAPUBLIC = fromBase64String("base64:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA5+4469eSQOx3lhnCaVYqN5MbrGtLVwTDKxvJIBLvERq/sCti35ow+lYhOxBut2VaDIfFfUSwJdxs2CGWaG8mlYle3RD126VpsdSUUkVR5c8fZdoWOohKo1A5nbZTXi4RhUmpQvUM30avjJ1vOD8l07XMSQ+99WlAUEVXdm0oQeKHz0xjL5TCtV+6HxGfSX6IfXnhDMs0EaSm+lyg76Hs7sC2/jXLhnyyWuW9IEphgRwgZI0+7qSu5l5evLQhzsAH4RbIXJkWZ+JWczie5HBX1wrsMCgz52cAtBhaaB4dVDKqnhvGZlD5cRNmxD15qZeyT5NGScA22qsf10nTRRV+H6TjT5zZXoyI8cWsg5EtnO4Wau8QsxckpVNgL+Dzxwm1/FiNp5Bt4LD/yBW2Yb98FB6Vf95yCy+49fPILG9xA5iMONXZRpIq5xw48fjth8TLvLXRUE9uk+wToQT/tf8ip/eJ5Ow4M5YSO0CZ1EDk86dD9W4oto4b6bHa2EZ91wRXZH7J8zCAo9yUVAJcfCdeEE7SQrjYiD/F9rFOFCvE1LZRSLLEnbvrdWDjPRYxml8YUNtEQs/C+8SJJkamzoRcVE84cxwvrAFhrSf4xXCk+LwYYFz1UguUC6x1979jxIR3J+HWhwTXwfDoDXEMrWAj0veorTYeYB1BMAWu9vRsDNMCAwEAAQ==") | |
5 | 5 | ||
6 | - | let ServerAddress = addressFromStringValue(" | |
6 | + | let ServerAddress = addressFromStringValue("3MuJmCSEUgBNy1R2gesk59xDbWcuTKwwixW") | |
7 | 7 | ||
8 | 8 | let RouletteSections = 21 | |
9 | 9 | ||
10 | 10 | let DataGameNumberKey = "APP_GAME_ID" | |
11 | 11 | ||
12 | 12 | let DataUserGameKey = "USER_GAME_ID_" | |
13 | 13 | ||
14 | 14 | let DataAmountKey = "AMOUNT" | |
15 | 15 | ||
16 | 16 | let DataSectionKey = "SECTION" | |
17 | 17 | ||
18 | 18 | let DataStatusKey = "STATUS" | |
19 | 19 | ||
20 | 20 | let DataResultKey = "RESULT" | |
21 | 21 | ||
22 | 22 | let DataWinAmountKey = "WIN_AMOUNT" | |
23 | 23 | ||
24 | 24 | let DataStatusNew = "NEW" | |
25 | 25 | ||
26 | 26 | let DataStatusWin = "WIN" | |
27 | 27 | ||
28 | 28 | let DataStatusLoose = "LOOSE" | |
29 | 29 | ||
30 | 30 | let WAVELET = ((100 * 1000) * 1000) | |
31 | 31 | ||
32 | 32 | let COMMISSION = ((5 * WAVELET) / 1000) | |
33 | 33 | ||
34 | 34 | let BET1 = (1 * WAVELET) | |
35 | 35 | ||
36 | 36 | let BET2 = (2 * WAVELET) | |
37 | 37 | ||
38 | 38 | let BET4 = (4 * WAVELET) | |
39 | 39 | ||
40 | 40 | let BET8 = (8 * WAVELET) | |
41 | 41 | ||
42 | 42 | let BET14 = (14 * WAVELET) | |
43 | 43 | ||
44 | 44 | let Sections = [0, 2, 20, 2, 5, 2, 10, 2, 6, 2, 5, 2, 6, 2, 5, 2, 10, 2, 5, 2, 6] | |
45 | 45 | ||
46 | 46 | let ErrorOnlyWavesAccepted = "Only waves accepted" | |
47 | 47 | ||
48 | 48 | let ErrorMustGreaterThan0 = "Parameter size must be greater than 0" | |
49 | 49 | ||
50 | 50 | let ErrorMustLessThan100 = "Parameter size must be less than 100" | |
51 | 51 | ||
52 | 52 | let ErrorBetMustBeInWaves = "Bet amount must be in Waves" | |
53 | 53 | ||
54 | 54 | let ErrorTransactionMustBeInWaves = "Transaction's fee must be in Waves" | |
55 | 55 | ||
56 | 56 | let ErrorTransactionUsed = "Passed txId had been used before. Game aborted." | |
57 | 57 | ||
58 | 58 | let ErrorKeyNotFound = "Key not found: " | |
59 | 59 | ||
60 | 60 | let ErrorGameOver = "Game already is over " | |
61 | 61 | ||
62 | 62 | let ErrorIncorrectSectionResult = "Incorrect section result" | |
63 | 63 | ||
64 | 64 | let ErrorBetAmountNotInRange = "Bet amount is not in range" | |
65 | 65 | ||
66 | 66 | func StoreData (transactionId,key,value) = DataEntry(((transactionId + "_") + key), value) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func StoreDataInt (transactionId,key,value) = DataEntry(((transactionId + "_") + key), value) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func GetData (key) = match getString(this, key) { | |
73 | 73 | case str: String => | |
74 | 74 | str | |
75 | 75 | case _ => | |
76 | 76 | throw((ErrorKeyNotFound + key)) | |
77 | 77 | } | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func GetDataString (transactionId,key) = { | |
81 | 81 | let fullKey = ((transactionId + "_") + key) | |
82 | 82 | match getString(this, fullKey) { | |
83 | 83 | case str: String => | |
84 | 84 | str | |
85 | 85 | case _ => | |
86 | 86 | throw((ErrorKeyNotFound + fullKey)) | |
87 | 87 | } | |
88 | 88 | } | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func GetDataInt (transactionId,key) = { | |
92 | 92 | let fullKey = ((transactionId + "_") + key) | |
93 | 93 | match getInteger(this, fullKey) { | |
94 | 94 | case str: Int => | |
95 | 95 | str | |
96 | 96 | case _ => | |
97 | 97 | throw((ErrorKeyNotFound + fullKey)) | |
98 | 98 | } | |
99 | 99 | } | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func NewGameId () = { | |
103 | 103 | let gameNum = match getInteger(this, DataGameNumberKey) { | |
104 | 104 | case num: Int => | |
105 | 105 | num | |
106 | 106 | case _ => | |
107 | 107 | 0 | |
108 | 108 | } | |
109 | 109 | (gameNum + 1) | |
110 | 110 | } | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func GenerateRandInt (gameId,rsaSign) = { | |
114 | 114 | let rsaSigValid = rsaVerify(SHA256, fromBase58String(gameId), toBytes(rsaSign), RSAPUBLIC) | |
115 | 115 | if (rsaSigValid) | |
116 | 116 | then { | |
117 | 117 | let rand = (toInt(sha256(toBytes(rsaSign))) % RouletteSections) | |
118 | 118 | if ((0 > rand)) | |
119 | 119 | then (-1 * rand) | |
120 | 120 | else rand | |
121 | 121 | } | |
122 | 122 | else throw("Invalid RSA signature") | |
123 | 123 | } | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func GetStatus (result) = if (result) | |
127 | 127 | then DataStatusWin | |
128 | 128 | else DataStatusLoose | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func GetWinAmount (betAmt,section) = { | |
132 | 132 | let isCorrectResult = if (if (if (if ((section == 2)) | |
133 | 133 | then true | |
134 | 134 | else (section == 5)) | |
135 | 135 | then true | |
136 | 136 | else (section == 6)) | |
137 | 137 | then true | |
138 | 138 | else (section == 10)) | |
139 | 139 | then true | |
140 | 140 | else (section == 20) | |
141 | 141 | let betAmtValid = if (if (if (if ((betAmt == (BET1 + COMMISSION))) | |
142 | 142 | then true | |
143 | 143 | else (betAmt == (BET2 + COMMISSION))) | |
144 | 144 | then true | |
145 | 145 | else (betAmt == (BET4 + COMMISSION))) | |
146 | 146 | then true | |
147 | 147 | else (betAmt == (BET8 + COMMISSION))) | |
148 | 148 | then true | |
149 | 149 | else (betAmt == (BET14 + COMMISSION)) | |
150 | 150 | if (!(isCorrectResult)) | |
151 | 151 | then throw(ErrorIncorrectSectionResult) | |
152 | 152 | else if (betAmtValid) | |
153 | 153 | then ((betAmt - COMMISSION) * section) | |
154 | 154 | else throw(ErrorBetAmountNotInRange) | |
155 | 155 | } | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | @Callable(i) | |
159 | 159 | func bet (expectedResult) = { | |
160 | 160 | let gameNumber = NewGameId() | |
161 | 161 | let gameTransactionId = toBase58String(i.transactionId) | |
162 | 162 | let address = toBase58String(i.caller.bytes) | |
163 | 163 | let pmt = extract(i.payment) | |
164 | 164 | let txIdUsed = isDefined(getString(this, gameTransactionId)) | |
165 | 165 | let betNotInWaves = isDefined(pmt.assetId) | |
166 | 166 | let feeNotInWaves = isDefined(pmt.assetId) | |
167 | 167 | let amount = pmt.amount | |
168 | 168 | let winAmt = GetWinAmount(pmt.amount, expectedResult) | |
169 | 169 | if (betNotInWaves) | |
170 | 170 | then throw(ErrorBetMustBeInWaves) | |
171 | 171 | else if (feeNotInWaves) | |
172 | 172 | then throw(ErrorTransactionMustBeInWaves) | |
173 | 173 | else if (txIdUsed) | |
174 | 174 | then throw(ErrorTransactionUsed) | |
175 | 175 | else ScriptResult(WriteSet([DataEntry((DataUserGameKey + toString(gameNumber)), gameTransactionId), DataEntry(gameTransactionId, address), DataEntry(DataGameNumberKey, gameNumber), StoreDataInt(gameTransactionId, DataAmountKey, amount), StoreDataInt(gameTransactionId, DataSectionKey, expectedResult), StoreData(gameTransactionId, DataStatusKey, DataStatusNew), StoreDataInt(gameTransactionId, DataWinAmountKey, winAmt)]), TransferSet([ScriptTransfer(ServerAddress, COMMISSION, unit)])) | |
176 | 176 | } | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | ||
180 | 180 | @Callable(i) | |
181 | 181 | func result (gameTransactionId,rsa) = { | |
182 | 182 | let randIndex = GenerateRandInt(gameTransactionId, rsa) | |
183 | 183 | let selectedSection = GetDataInt(gameTransactionId, DataSectionKey) | |
184 | 184 | let status = GetDataString(gameTransactionId, DataStatusKey) | |
185 | 185 | if ((status == DataStatusNew)) | |
186 | 186 | then { | |
187 | 187 | let randSection = Sections[randIndex] | |
188 | 188 | let isWin = (randSection == selectedSection) | |
189 | 189 | let writeSet = WriteSet([StoreData(gameTransactionId, DataStatusKey, GetStatus(isWin)), StoreDataInt(gameTransactionId, DataResultKey, randSection)]) | |
190 | 190 | if (isWin) | |
191 | 191 | then { | |
192 | 192 | let wallet = GetData(gameTransactionId) | |
193 | 193 | let winAmount = GetDataInt(gameTransactionId, DataWinAmountKey) | |
194 | 194 | ScriptResult(writeSet, TransferSet([ScriptTransfer(addressFromStringValue(wallet), winAmount, unit)])) | |
195 | 195 | } | |
196 | 196 | else writeSet | |
197 | 197 | } | |
198 | 198 | else throw((ErrorGameOver + status)) | |
199 | 199 | } | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | @Verifier(tx) | |
203 | 203 | func verify () = if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)) | |
204 | 204 | then match tx { | |
205 | 205 | case ttx: TransferTransaction => | |
206 | 206 | true | |
207 | 207 | case stx: SetScriptTransaction => | |
208 | 208 | true | |
209 | 209 | case _ => | |
210 | 210 | false | |
211 | 211 | } | |
212 | 212 | else false | |
213 | 213 |
github/deemru/w8io/026f985 31.86 ms ◑