tx · FUSE1dJUQKUEKfsRS24hbqnGPT6bKgowypGRYUVWphRy 3N3hSiGkCQk6ixvTU3uEFLeFweWHqAUg29a: -0.01000000 Waves 2019.07.29 02:16 [606568] smart account 3N3hSiGkCQk6ixvTU3uEFLeFweWHqAUg29a > SELF 0.00000000 Waves
{ "type": 13, "id": "FUSE1dJUQKUEKfsRS24hbqnGPT6bKgowypGRYUVWphRy", "fee": 1000000, "feeAssetId": null, "timestamp": 1564355768593, "version": 1, "sender": "3N3hSiGkCQk6ixvTU3uEFLeFweWHqAUg29a", "senderPublicKey": "4jNVQ7762kH43dvLDB7tMpr3zN7NqtobaLxpshG5PL3j", "proofs": [ "2JvkuimUvXZCRoSB49VzgzQjXff6MQQkp144sGpQVRfVCBs87yumLUjybnS5MdBNgNCcyTQYNYaLfazE2cshQMex" ], "script": "base64:AAIDAAAAAAAAAAAAAAASAAAAAA5vd25lclB1YmxpY0tleQEAAAAgfedb8gHq6MpA0xTx8E4brUvyXTxMUxGzgoeMhec7vFkAAAAAH2Rlc3RpbmF0aW9uV2FsbGV0QWRkcmVzc0RhdGFLZXkCAAAAGmRlc3RpbmF0aW9uX3dhbGxldF9hZGRyZXNzAAAAAAtidGNDdXJyZW5jeQIAAAADYnRjAAAAAAtldGhDdXJyZW5jeQIAAAADZXRoAAAAAA13YXZlc0N1cnJlbmN5AgAAAAV3YXZlcwAAAAALbHRjQ3VycmVuY3kCAAAAA2x0YwEAAAATZ2V0UmFjZUVuZGVkRGF0YUtleQAAAAEAAAAGcmFjZUlkCQABLAAAAAIFAAAABnJhY2VJZAIAAAAJX2lzX2VuZGVkAQAAABNnZXRDYW5jZWxCZXREYXRhS2V5AAAAAgAAAAZyYWNlSWQAAAANcGxheWVyQWRkcmVzcwkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAGcmFjZUlkAgAAAAFfBQAAAA1wbGF5ZXJBZGRyZXNzAgAAAAlfY2FuY2VsZWQBAAAADWdldEJldERhdGFLZXkAAAADAAAABnJh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AAAAAgUAAAAJcmFjZUlkU3RyBQAAAAtsdGNDdXJyZW5jeQUAAAANbHRjU3RhcnRQcmljZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAEmdldEVuZFByaWNlRGF0YUtleQAAAAIFAAAACXJhY2VJZFN0cgUAAAALbHRjQ3VycmVuY3kFAAAAC2x0Y0VuZFByaWNlBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAABdmaXJzdFBsYWNlUGxheWVyQWRkcmVzcwUAAAAVZmlyc3RQbGFjZVByaXplQW1vdW50BQAAAAR1bml0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAAYc2Vjb25kUGxhY2VQbGF5ZXJBZGRyZXNzBQAAABZzZWNvbmRQbGFjZVByaXplQW1vdW50BQAAAAR1bml0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAAXdGhpcmRQbGFjZVBsYXllckFkZHJlc3MFAAAAFXRoaXJkUGxhY2VQcml6ZUFtb3VudAUAAAAEdW5pdAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAbZ2V0RGVzdGluYXRpb25XYWxsZXRBZGRyZXNzAAAAAAUAAAAQY29tbWlzc2lvbkFtb3VudAUAAAAEdW5pdAUAAAADbmlsAAAAAKTI8Uw=", "chainId": 84, "height": 606568, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let ownerPublicKey = base58'9UUaVVahBUyLHLQo4HNuQsRMKY9QBH43Grojkbdf4wG4' | |
5 | + | ||
6 | + | let destinationWalletAddressDataKey = "destination_wallet_address" | |
7 | + | ||
8 | + | let btcCurrency = "btc" | |
9 | + | ||
10 | + | let ethCurrency = "eth" | |
11 | + | ||
12 | + | let wavesCurrency = "waves" | |
13 | + | ||
14 | + | let ltcCurrency = "ltc" | |
15 | + | ||
16 | + | func getRaceEndedDataKey (raceId) = (raceId + "_is_ended") | |
17 | + | ||
18 | + | ||
19 | + | func getCancelBetDataKey (raceId,playerAddress) = (((raceId + "_") + playerAddress) + "_canceled") | |
20 | + | ||
21 | + | ||
22 | + | func getBetDataKey (raceId,playerAddress,currency) = (((((raceId + "_player_") + playerAddress) + "_bet_") + currency) + "_amount") | |
23 | + | ||
24 | + | ||
25 | + | func getShareSumDataKey (raceId,playerAddress,currency) = (((((raceId + "_player_") + playerAddress) + "_") + currency) + "_share_sum") | |
26 | + | ||
27 | + | ||
28 | + | func getTotalBetDataKey (raceId) = (raceId + "_total_bet_amount") | |
29 | + | ||
30 | + | ||
31 | + | func getPlacePlayerAddressDataKey (raceId,placeIndex) = (((raceId + "_") + toString(placeIndex)) + "_place_player_address") | |
32 | + | ||
33 | + | ||
34 | + | func getStartPriceDataKey (raceId,currency) = (((raceId + "_") + currency) + "_start_price") | |
35 | + | ||
36 | + | ||
37 | + | func getEndPriceDataKey (raceId,currency) = (((raceId + "_") + currency) + "_end_price") | |
38 | + | ||
39 | + | ||
40 | + | func getDestinationWalletAddress () = match getString(this, destinationWalletAddressDataKey) { | |
41 | + | case v: String => | |
42 | + | if ((v == "")) | |
43 | + | then throw("Destination wallet address cannot be empty") | |
44 | + | else addressFromStringValue(v) | |
45 | + | case _ => | |
46 | + | throw("Destination wallet address undefined") | |
47 | + | } | |
48 | + | ||
49 | + | ||
50 | + | func isBetCanceled (raceId,playerAddress) = match getBoolean(this, getCancelBetDataKey(raceId, playerAddress)) { | |
51 | + | case v: Boolean => | |
52 | + | v | |
53 | + | case _ => | |
54 | + | false | |
55 | + | } | |
56 | + | ||
57 | + | ||
58 | + | func isBetSet (raceId,playerAddress) = match getInteger(this, getBetDataKey(raceId, playerAddress, wavesCurrency)) { | |
59 | + | case v: Int => | |
60 | + | true | |
61 | + | case _ => | |
62 | + | false | |
63 | + | } | |
64 | + | ||
65 | + | ||
66 | + | func isRaceEnded (raceId) = match getBoolean(this, getRaceEndedDataKey(raceId)) { | |
67 | + | case v: Boolean => | |
68 | + | v | |
69 | + | case _ => | |
70 | + | false | |
71 | + | } | |
72 | + | ||
73 | + | ||
74 | + | @Callable(i) | |
75 | + | func setDestinationWallet (address) = if ((i.callerPublicKey != ownerPublicKey)) | |
76 | + | then throw("Only owner can call this method") | |
77 | + | else if ((address == "")) | |
78 | + | then throw("Address cannot be empty") | |
79 | + | else WriteSet([DataEntry(destinationWalletAddressDataKey, address)]) | |
80 | + | ||
81 | + | ||
82 | + | ||
83 | + | @Callable(i) | |
84 | + | func bet (raceId,portfolioBtcShareSum,portfolioEthShareSum,portfolioWavesShareSum,portfolioLtcShareSum,signature) = { | |
85 | + | let raceIdStr = toString(raceId) | |
86 | + | let payment = extract(i.payment) | |
87 | + | let betAmount = payment.amount | |
88 | + | let callerAddressStr = toBase58String(i.caller.bytes) | |
89 | + | if (isRaceEnded(raceIdStr)) | |
90 | + | then throw("Race ended, bet canceled") | |
91 | + | else if (isBetSet(raceIdStr, callerAddressStr)) | |
92 | + | then throw("You already set bet") | |
93 | + | else if (isBetCanceled(raceIdStr, callerAddressStr)) | |
94 | + | then throw("Your bet has been canceled, you cannot bet in this race anymore") | |
95 | + | else { | |
96 | + | let validatingDataStr = ((((((raceIdStr + callerAddressStr) + toString(betAmount)) + toString(portfolioBtcShareSum)) + toString(portfolioEthShareSum)) + toString(portfolioWavesShareSum)) + toString(portfolioLtcShareSum)) | |
97 | + | if (!(sigVerify(toBytes(validatingDataStr), signature, ownerPublicKey))) | |
98 | + | then throw("Cannot verify signature while set bet") | |
99 | + | else { | |
100 | + | let totalBetAmount = match getInteger(this, getTotalBetDataKey(raceIdStr)) { | |
101 | + | case v: Int => | |
102 | + | v | |
103 | + | case _ => | |
104 | + | 0 | |
105 | + | } | |
106 | + | let newTotalBetAmount = (totalBetAmount + betAmount) | |
107 | + | WriteSet([DataEntry(getTotalBetDataKey(raceIdStr), newTotalBetAmount), DataEntry(getBetDataKey(raceIdStr, callerAddressStr, wavesCurrency), betAmount), DataEntry(getShareSumDataKey(raceIdStr, callerAddressStr, btcCurrency), portfolioBtcShareSum), DataEntry(getShareSumDataKey(raceIdStr, callerAddressStr, ethCurrency), portfolioEthShareSum), DataEntry(getShareSumDataKey(raceIdStr, callerAddressStr, wavesCurrency), portfolioWavesShareSum), DataEntry(getShareSumDataKey(raceIdStr, callerAddressStr, ltcCurrency), portfolioLtcShareSum)]) | |
108 | + | } | |
109 | + | } | |
110 | + | } | |
111 | + | ||
112 | + | ||
113 | + | ||
114 | + | @Callable(i) | |
115 | + | func cancelBet (raceId,signature) = { | |
116 | + | let raceIdStr = toString(raceId) | |
117 | + | let callerAddressStr = toBase58String(i.caller.bytes) | |
118 | + | if (isRaceEnded(raceIdStr)) | |
119 | + | then throw("Race ended, you cannot cancel bet") | |
120 | + | else if (isBetCanceled(raceIdStr, callerAddressStr)) | |
121 | + | then throw("Bet already canceled") | |
122 | + | else { | |
123 | + | let validatingDataStr = ((toString(raceId) + callerAddressStr) + "cancel") | |
124 | + | if (!(sigVerify(toBytes(validatingDataStr), signature, ownerPublicKey))) | |
125 | + | then throw("Cannot verify signature while cancel bet") | |
126 | + | else { | |
127 | + | let totalBetDataKey = getTotalBetDataKey(raceIdStr) | |
128 | + | let playerBetAmount = getIntegerValue(this, getBetDataKey(raceIdStr, callerAddressStr, wavesCurrency)) | |
129 | + | let currentTotalBetAmount = getIntegerValue(this, totalBetDataKey) | |
130 | + | let newTotalBetAmount = (currentTotalBetAmount - playerBetAmount) | |
131 | + | if ((0 > newTotalBetAmount)) | |
132 | + | then throw("New state of total bet will be less than zero, state error") | |
133 | + | else ScriptResult(WriteSet([DataEntry(getCancelBetDataKey(raceIdStr, callerAddressStr), true), DataEntry(totalBetDataKey, newTotalBetAmount)]), TransferSet([ScriptTransfer(addressFromStringValue(callerAddressStr), playerBetAmount, unit)])) | |
134 | + | } | |
135 | + | } | |
136 | + | } | |
137 | + | ||
138 | + | ||
139 | + | ||
140 | + | @Callable(i) | |
141 | + | func endRace (id,firstPlacePlayerAddress,secondPlacePlayerAddress,thirdPlacePlayerAddress,btcStartPrice,btcEndPrice,ethStartPrice,ethEndPrice,wavesStartPrice,wavesEndPrice,ltcStartPrice,ltcEndPrice) = { | |
142 | + | let raceIdStr = toString(id) | |
143 | + | if ((i.callerPublicKey != ownerPublicKey)) | |
144 | + | then throw("Only owner can call endRace") | |
145 | + | else if (isRaceEnded(raceIdStr)) | |
146 | + | then throw("Race already ended, you cannot end this race") | |
147 | + | else { | |
148 | + | let totalBetAmount = getIntegerValue(this, getTotalBetDataKey(raceIdStr)) | |
149 | + | let firstPlacePlayerDepositAmount = getIntegerValue(this, getBetDataKey(raceIdStr, firstPlacePlayerAddress, wavesCurrency)) | |
150 | + | let secondPlacePlayerDepositAmount = getIntegerValue(this, getBetDataKey(raceIdStr, secondPlacePlayerAddress, wavesCurrency)) | |
151 | + | let thirdPlacePlayerDepositAmount = getIntegerValue(this, getBetDataKey(raceIdStr, thirdPlacePlayerAddress, wavesCurrency)) | |
152 | + | let firstPlacePrizeAmount = (firstPlacePlayerDepositAmount * 2) | |
153 | + | let secondPlacePrizeAmount = ((secondPlacePlayerDepositAmount * 3) / 2) | |
154 | + | let thirdPlacePrizeAmount = thirdPlacePlayerDepositAmount | |
155 | + | let commissionAmount = (totalBetAmount - ((firstPlacePrizeAmount + secondPlacePrizeAmount) + thirdPlacePrizeAmount)) | |
156 | + | if ((0 >= commissionAmount)) | |
157 | + | then throw("Commission must be greater than zero, state error") | |
158 | + | else { | |
159 | + | let currentBalance = wavesBalance(this) | |
160 | + | let newAmount = (currentBalance + commissionAmount) | |
161 | + | ScriptResult(WriteSet([DataEntry(getRaceEndedDataKey(raceIdStr), true), DataEntry(getPlacePlayerAddressDataKey(raceIdStr, 1), firstPlacePlayerAddress), DataEntry(getPlacePlayerAddressDataKey(raceIdStr, 2), secondPlacePlayerAddress), DataEntry(getPlacePlayerAddressDataKey(raceIdStr, 3), thirdPlacePlayerAddress), DataEntry(getStartPriceDataKey(raceIdStr, btcCurrency), btcStartPrice), DataEntry(getEndPriceDataKey(raceIdStr, btcCurrency), btcEndPrice), DataEntry(getStartPriceDataKey(raceIdStr, ethCurrency), ethStartPrice), DataEntry(getEndPriceDataKey(raceIdStr, ethCurrency), ethEndPrice), DataEntry(getStartPriceDataKey(raceIdStr, wavesCurrency), wavesStartPrice), DataEntry(getEndPriceDataKey(raceIdStr, wavesCurrency), wavesEndPrice), DataEntry(getStartPriceDataKey(raceIdStr, ltcCurrency), ltcStartPrice), DataEntry(getEndPriceDataKey(raceIdStr, ltcCurrency), ltcEndPrice)]), TransferSet([ScriptTransfer(addressFromStringValue(firstPlacePlayerAddress), firstPlacePrizeAmount, unit), ScriptTransfer(addressFromStringValue(secondPlacePlayerAddress), secondPlacePrizeAmount, unit), ScriptTransfer(addressFromStringValue(thirdPlacePlayerAddress), thirdPlacePrizeAmount, unit), ScriptTransfer(getDestinationWalletAddress(), commissionAmount, unit)])) | |
162 | + | } | |
163 | + | } | |
164 | + | } | |
165 | + | ||
166 | + |
github/deemru/w8io/026f985 20.58 ms ◑