tx · D3mu1cFZYp9rcYgHowCRhx8Pqtg1ZojdYZGVbhb7DPio 3Mttoccgkeiiy6UDNxZgRryjbHDhtNSG8hk: -0.01000000 Waves 2019.07.28 13:20 [605778] smart account 3Mttoccgkeiiy6UDNxZgRryjbHDhtNSG8hk > SELF 0.00000000 Waves
{ "type": 13, "id": "D3mu1cFZYp9rcYgHowCRhx8Pqtg1ZojdYZGVbhb7DPio", "fee": 1000000, "feeAssetId": null, "timestamp": 1564309218272, "version": 1, "sender": "3Mttoccgkeiiy6UDNxZgRryjbHDhtNSG8hk", "senderPublicKey": "85Agsd1kzDDGoNw1gnh5KHdzJBTckBemuSqfn9v9YyB1", "proofs": [ "UorzUz1ExYFaEoJwHNAM5PBpzXqoBTnaRJ4MjPj7aEv49kEjmFudi5S6pUPjeeG2ZzVRo6caxTnhNS9qBaTdfFh" ], "script": "base64:AAIDAAAAAAAAAAAAAAAPAAAAAA5vd25lclB1YmxpY0tleQEAAAAgfedb8gHq6MpA0xTx8E4brUvyXTxMUxGzgoeMhec7vFkAAAAAH2Rlc3RpbmF0aW9uV2FsbGV0QWRkcmVzc0RhdGFLZXkCAAAAGmRlc3RpbmF0aW9uX3dhbGxldF9hZGRyZXNzAAAAAAtidGNDdXJyZW5jeQIAAAADYnRjAAAAAAtldGhDdXJyZW5jeQIAAAADZXRoAAAAAA13YXZlc0N1cnJlbmN5AgAAAAV3YXZlcwAAAAALbHRjQ3VycmVuY3kCAAAAA2x0YwEAAAAbZ2V0RGVzdGluYXRpb25XYWxsZXRBZGRyZXNzAAAAAAQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAB9kZXN0aW5hdGlvbldhbGxldEFkZHJlc3NEYXRhS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAXYFAAAAByRtYXRjaDADCQAAAAAAAAIFAAAAAXYCAAAAAAkAAAIAAAABAgAAACpEZXN0aW5hdGlvbiB3YWxsZXQgYWRkcmVzcyB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OZH0=", "chainId": 84, "height": 605778, "spentComplexity": 0 } View: original | compacted Prev: 5Hsf62Z3FG9ypQuB5ZE5zzMC3XeYPNhcED5vAubW6TsQ Next: 3Y4U9nWW6S7BrM9Wg2LUXWyWFWAYfC1ixiyWmEHGYNu3 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 getDestinationWalletAddress () = match getString(this, destinationWalletAddressDataKey) { | |
17 | + | case v: String => | |
18 | + | if ((v == "")) | |
19 | + | then throw("Destination wallet address cannot be empty") | |
20 | + | else addressFromStringValue(v) | |
21 | + | case _ => | |
22 | + | throw("Destination wallet address undefined") | |
23 | + | } | |
24 | + | ||
25 | + | ||
26 | + | func getCancelBetDataKey (raceId,playerAddress) = (((raceId + "_") + playerAddress) + "_canceled") | |
27 | + | ||
28 | + | ||
29 | + | func getBetDataKey (raceId,playerAddress,currency) = (((((raceId + "_player_") + playerAddress) + "_bet_") + currency) + "_amount") | |
30 | + | ||
31 | + | ||
32 | + | func getShareSumDataKey (raceId,playerAddress,currency) = (((((raceId + "_player_") + playerAddress) + "_") + currency) + "_share_sum") | |
33 | + | ||
34 | + | ||
35 | + | func getTotalBetDataKey (raceId) = (raceId + "_total_bet_amount") | |
36 | + | ||
37 | + | ||
38 | + | func getPlacePlayerAddressDataKey (raceId,placeIndex) = (((raceId + "_") + toString(placeIndex)) + "_place_player_address") | |
39 | + | ||
40 | + | ||
41 | + | func getStartPriceDataKey (raceId,currency) = (((raceId + "_") + currency) + "_start_price") | |
42 | + | ||
43 | + | ||
44 | + | func getEndPriceDataKey (raceId,currency) = (((raceId + "_") + currency) + "_end_price") | |
45 | + | ||
46 | + | ||
47 | + | func isBetCanceled (raceId,playerAddress) = match getBoolean(this, getCancelBetDataKey(raceId, playerAddress)) { | |
48 | + | case v: Boolean => | |
49 | + | v | |
50 | + | case _ => | |
51 | + | throw("Not boolean value detected, value must be boolean") | |
52 | + | } | |
53 | + | ||
54 | + | ||
55 | + | @Callable(i) | |
56 | + | func setDestinationWallet (address) = if ((i.callerPublicKey != ownerPublicKey)) | |
57 | + | then throw("Only owner can call this method") | |
58 | + | else if ((address == "")) | |
59 | + | then throw("Address cannot be empty") | |
60 | + | else WriteSet([DataEntry(destinationWalletAddressDataKey, address)]) | |
61 | + | ||
62 | + | ||
63 | + | ||
64 | + | @Callable(i) | |
65 | + | func bet (raceId,portfolioBtcShareSum,portfolioEthShareSum,portfolioWavesShareSum,portfolioLtcShareSum,signature) = { | |
66 | + | let raceIdStr = toString(raceId) | |
67 | + | let payment = extract(i.payment) | |
68 | + | let betAmount = payment.amount | |
69 | + | let callerAddressStr = toBase58String(i.caller.bytes) | |
70 | + | if (isBetCanceled(raceIdStr, callerAddressStr)) | |
71 | + | then throw("Your bet has been canceled, you cannot bet in this race anymore") | |
72 | + | else { | |
73 | + | let validatingDataStr = ((((((raceIdStr + callerAddressStr) + toString(betAmount)) + toString(portfolioBtcShareSum)) + toString(portfolioEthShareSum)) + toString(portfolioWavesShareSum)) + toString(portfolioLtcShareSum)) | |
74 | + | if (!(sigVerify(toBytes(validatingDataStr), signature, ownerPublicKey))) | |
75 | + | then throw("Cannot verify signature") | |
76 | + | else { | |
77 | + | let totalBetAmount = match getInteger(this, getTotalBetDataKey(raceIdStr)) { | |
78 | + | case v: Int => | |
79 | + | v | |
80 | + | case _ => | |
81 | + | 0 | |
82 | + | } | |
83 | + | let newTotalBetAmount = (totalBetAmount + betAmount) | |
84 | + | 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)]) | |
85 | + | } | |
86 | + | } | |
87 | + | } | |
88 | + | ||
89 | + | ||
90 | + | ||
91 | + | @Callable(i) | |
92 | + | func cancelBet (raceId,signature) = { | |
93 | + | let raceIdStr = toString(raceId) | |
94 | + | let callerAddressStr = toBase58String(i.caller.bytes) | |
95 | + | if (isBetCanceled(raceIdStr, callerAddressStr)) | |
96 | + | then throw("Bet already canceled") | |
97 | + | else { | |
98 | + | let validatingDataStr = ((toString(raceId) + callerAddressStr) + "cancel") | |
99 | + | if (!(sigVerify(toBytes(validatingDataStr), signature, ownerPublicKey))) | |
100 | + | then throw("Cannot verify signature") | |
101 | + | else { | |
102 | + | let totalBetDataKey = getTotalBetDataKey(raceIdStr) | |
103 | + | let playerBetAmount = getIntegerValue(this, getBetDataKey(raceIdStr, callerAddressStr, wavesCurrency)) | |
104 | + | let currentTotalBetAmount = getIntegerValue(this, totalBetDataKey) | |
105 | + | let newTotalBetAmount = (currentTotalBetAmount - playerBetAmount) | |
106 | + | if ((0 > newTotalBetAmount)) | |
107 | + | then throw("New state of total bet will be less than zero, state error") | |
108 | + | else ScriptResult(WriteSet([DataEntry(getCancelBetDataKey(raceIdStr, callerAddressStr), true), DataEntry(totalBetDataKey, newTotalBetAmount)]), TransferSet([ScriptTransfer(addressFromStringValue(callerAddressStr), playerBetAmount, unit)])) | |
109 | + | } | |
110 | + | } | |
111 | + | } | |
112 | + | ||
113 | + | ||
114 | + | ||
115 | + | @Callable(i) | |
116 | + | func endRace (id,firstPlacePlayerAddress,secondPlacePlayerAddress,thirdPlacePlayerAddress,btcStartPrice,btcEndPrice,ethStartPrice,ethEndPrice,wavesStartPrice,wavesEndPrice,ltcStartPrice,ltcEndPrice) = if ((i.callerPublicKey != ownerPublicKey)) | |
117 | + | then throw("Only owner can call endRace") | |
118 | + | else { | |
119 | + | let raceIdStr = toString(id) | |
120 | + | let totalBetAmount = getIntegerValue(this, getTotalBetDataKey(raceIdStr)) | |
121 | + | let firstPlacePlayerDepositAmount = getIntegerValue(this, getBetDataKey(raceIdStr, firstPlacePlayerAddress, wavesCurrency)) | |
122 | + | let secondPlacePlayerDepositAmount = getIntegerValue(this, getBetDataKey(raceIdStr, secondPlacePlayerAddress, wavesCurrency)) | |
123 | + | let thirdPlacePlayerDepositAmount = getIntegerValue(this, getBetDataKey(raceIdStr, thirdPlacePlayerAddress, wavesCurrency)) | |
124 | + | let firstPlacePrizeAmount = (firstPlacePlayerDepositAmount * 2) | |
125 | + | let secondPlacePrizeAmount = ((secondPlacePlayerDepositAmount * 3) / 2) | |
126 | + | let thirdPlacePrizeAmount = thirdPlacePlayerDepositAmount | |
127 | + | let commissionAmount = (totalBetAmount - ((firstPlacePrizeAmount + secondPlacePrizeAmount) + thirdPlacePrizeAmount)) | |
128 | + | if ((0 >= commissionAmount)) | |
129 | + | then throw("Commission must be greater than zero, state error") | |
130 | + | else { | |
131 | + | let currentAmount = wavesBalance(this) | |
132 | + | let newAmount = (currentAmount - commissionAmount) | |
133 | + | if ((0 > newAmount)) | |
134 | + | then throw("Not enough funds in core account") | |
135 | + | else ScriptResult(WriteSet([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)])) | |
136 | + | } | |
137 | + | } | |
138 | + | ||
139 | + |
github/deemru/w8io/026f985 77.69 ms ◑