tx · mAptgyzAfN8Z9oQRqpJTK8ExFKvXW9GzG8usmdagT1n 3N7Wiiso7vo69pqWfLtpzT3tbzMUGahqpgo: -0.01400000 Waves 2019.08.20 12:48 [639285] smart account 3N7Wiiso7vo69pqWfLtpzT3tbzMUGahqpgo > SELF 0.00000000 Waves
{ "type": 13, "id": "mAptgyzAfN8Z9oQRqpJTK8ExFKvXW9GzG8usmdagT1n", "fee": 1400000, "feeAssetId": null, "timestamp": 1566294492052, "version": 1, "sender": "3N7Wiiso7vo69pqWfLtpzT3tbzMUGahqpgo", "senderPublicKey": "5GQSFwNMkJFTT3FeLT3KENqoSr42yiJP3Av5qAYq1F7f", "proofs": [ "2RsNZ7BCcsyVxwAdUP5bCJFona1Fh4fpYiif8DPKmHxXRQDG5MbakJro2M1AnhsUXNK8PMNpcj9KgGvn5M8TV1HA" ], "script": "base64:AAIDAAAAAAAAAAAAAAAQAAAAAAdSVU5OSU5HAgAAAAdSVU5OSU5HAAAAAAZDTE9TRUQCAAAABkNMT1NFRAAAAAAIQ0FOQ0VMRUQCAAAACENBTkNFTEVEAAAAAAlEQVBQT1dORVICAAAAIzNON1dpaXNvN3ZvNjlwcVdmTHRwelQzdGJ6TVVHYWhxcGdvAAAAAAxPUkFDTEVXQUxMRVQCAAAAIzNOQWNvZVdkVVRXbjhjc1hKUEc0N3YxRmp0amNmcXhiNXR1AAAAAA1XTFRCVVJOV0FMTEVUAgAAACMzTXBDYkREamtTcmZTMVhrUHBtNzFpWmo1RFExUnBCUlJodAAAAAAOV0FWRVNLSVRXQUxMRVQCAAAAIzNNcVBwYldQUnNaRm9UOVg3NHFXb2NVNEJweXBHRVBoaUNuAAAAAAVXQVZFUwIAAAAFV0FWRVMAAAAABE5PTkUCAAAABE5PTkUAAAAAA0ZFRQAAAAAAAA27oAAAAAADV0xUAQAAACBdzVgyIDG1TTrr2IC+hZgKEiTPyt49R9i8wN0ZNQ6rqgEAAAALZ2V0TnVtQnlLZXkAAAABAAAAA2tleQQAAAADb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chainId": 84, "height": 639285, "spentComplexity": 0 } View: original | compacted Prev: 2DWcmwM6WGVFHZd4Z5gVSEoZuZyg9JWCUynbMoXW8wMv Next: E4BJZkamUbFKBquCZ65xeoTShLjgxhTWBrA8EicRCEbN Diff:
Old | New | Differences | |
---|---|---|---|
109 | 109 | let contestCurrNumber = getNumByKey("contest_currentnumber") | |
110 | 110 | let contestStartHeight = getNumByKey((("contest_" + toString(contestCurrNumber)) + "_startheight")) | |
111 | 111 | let contestFinishHeight = getNumByKey((("contest_" + toString(contestCurrNumber)) + "_finishheight")) | |
112 | - | let contestBetCounter = getNumByKey((("contest_" + toString(contestCurrNumber)) + "_betcounter")) | |
113 | 112 | let contestCurrStatus = getStrByKey((("contest_" + toString(contestCurrNumber)) + "_status")) | |
114 | 113 | let contestCurrBetCost = getNumByKey((("contest_" + toString(contestCurrNumber)) + "_betcost")) | |
115 | - | let thisBetId = (contestBetCounter + 1) | |
116 | 114 | let contestStatus = getStrByKey((("contest_" + toString(contestCurrNumber)) + "_status")) | |
117 | - | let existingBetBetId = getNumByKey(((("bet_" + toString(contestCurrNumber)) + "_") + toString(currencyValue))) | |
118 | - | let existingBetAccount = getBetAccount(existingBetBetId) | |
115 | + | let existingBetAccount = getStrByKey(((("bet_" + toString(contestCurrNumber)) + "_") + toString(currencyValue))) | |
119 | 116 | if ((height > (contestFinishHeight - (2 * 1440)))) | |
120 | 117 | then throw("You cannot bet anymore at this height.") | |
121 | 118 | else if ((contestCurrStatus != RUNNING)) | |
127 | 124 | else if (if ((existingBetAccount != NONE)) | |
128 | 125 | then (existingBetAccount != account) | |
129 | 126 | else false) | |
130 | - | then throw | |
131 | - | else WriteSet([ | |
127 | + | then throw(((("Another user: " + existingBetAccount) + " did bet already on rate: ") + toString(currencyValue))) | |
128 | + | else WriteSet([DataEntry(((("bet_" + toString(contestCurrNumber)) + "_") + toString(currencyValue)), account)]) | |
132 | 129 | } | |
133 | 130 | ||
134 | 131 | ||
137 | 134 | func closecontest () = { | |
138 | 135 | let currencyRate = getExtWAVESUSDCurrencyRate() | |
139 | 136 | let contestCurrNumber = getNumByKey("contest_currentnumber") | |
140 | - | let winningBetBetId = getNumByKey(((("bet_" + toString(contestCurrNumber)) + "_") + toString(currencyRate))) | |
141 | - | let winningBetAccount = getBetAccount(winningBetBetId) | |
137 | + | let winningBetAccount = getStrByKey(((("bet_" + toString(contestCurrNumber)) + "_") + toString(currencyRate))) | |
142 | 138 | let contestFinishHeight = getNumByKey((("contest_" + toString(contestCurrNumber)) + "_finishheight")) | |
143 | 139 | let account = toBase58String(i.caller.bytes) | |
144 | 140 | let balance = wavesBalance(this) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let RUNNING = "RUNNING" | |
5 | 5 | ||
6 | 6 | let CLOSED = "CLOSED" | |
7 | 7 | ||
8 | 8 | let CANCELED = "CANCELED" | |
9 | 9 | ||
10 | 10 | let DAPPOWNER = "3N7Wiiso7vo69pqWfLtpzT3tbzMUGahqpgo" | |
11 | 11 | ||
12 | 12 | let ORACLEWALLET = "3NAcoeWdUTWn8csXJPG47v1Fjtjcfqxb5tu" | |
13 | 13 | ||
14 | 14 | let WLTBURNWALLET = "3MpCbDDjkSrfS1XkPpm71iZj5DQ1RpBRRht" | |
15 | 15 | ||
16 | 16 | let WAVESKITWALLET = "3MqPpbWPRsZFoT9X74qWocU4BpypGEPhiCn" | |
17 | 17 | ||
18 | 18 | let WAVES = "WAVES" | |
19 | 19 | ||
20 | 20 | let NONE = "NONE" | |
21 | 21 | ||
22 | 22 | let FEE = 900000 | |
23 | 23 | ||
24 | 24 | let WLT = base58'7KAXNTswj6947a6cVpGhVrh1utWpLcjwf8AFpWCtuMT7' | |
25 | 25 | ||
26 | 26 | func getNumByKey (key) = { | |
27 | 27 | let num = match getInteger(this, key) { | |
28 | 28 | case a: Int => | |
29 | 29 | a | |
30 | 30 | case _ => | |
31 | 31 | 0 | |
32 | 32 | } | |
33 | 33 | num | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func getStrByKey (key) = { | |
38 | 38 | let str = match getString(this, key) { | |
39 | 39 | case a: String => | |
40 | 40 | a | |
41 | 41 | case _ => | |
42 | 42 | NONE | |
43 | 43 | } | |
44 | 44 | str | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func getContestStatus () = { | |
49 | 49 | let contestCurrNumber = getNumByKey("contest_currentnumber") | |
50 | 50 | getStrByKey((("contest_" + toString(contestCurrNumber)) + "_status")) | |
51 | 51 | } | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func getBetAccount (betId) = { | |
55 | 55 | let contestCurrNumber = getNumByKey("contest_currentnumber") | |
56 | 56 | getStrByKey((((("bet_" + toString(contestCurrNumber)) + "_") + toString(betId)) + "_owner")) | |
57 | 57 | } | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func getExtWAVESUSDCurrencyRate () = { | |
61 | 61 | let oracleAddress = extract(addressFromString(ORACLEWALLET)) | |
62 | 62 | let WAVESUSDCurrencyRate = match getInteger(oracleAddress, "waves_usd_2") { | |
63 | 63 | case a: Int => | |
64 | 64 | a | |
65 | 65 | case _ => | |
66 | 66 | 0 | |
67 | 67 | } | |
68 | 68 | WAVESUSDCurrencyRate | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | @Callable(i) | |
73 | 73 | func setContestStatus (contestNumber,contestStatus) = { | |
74 | 74 | let account = toBase58String(i.caller.bytes) | |
75 | 75 | if ((account != DAPPOWNER)) | |
76 | 76 | then throw("Only dAPP Owner can set Contest Status.") | |
77 | 77 | else if (if ((contestStatus != CANCELED)) | |
78 | 78 | then (contestStatus != CLOSED) | |
79 | 79 | else false) | |
80 | 80 | then throw(("Invalid status: " + contestStatus)) | |
81 | 81 | else WriteSet([DataEntry((("contest_" + toString(contestNumber)) + "_status"), contestStatus)]) | |
82 | 82 | } | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | ||
86 | 86 | @Callable(i) | |
87 | 87 | func setContestConfiguration () = { | |
88 | 88 | let account = toBase58String(i.caller.bytes) | |
89 | 89 | let contestCurrNumber = getNumByKey("contest_currentnumber") | |
90 | 90 | let contestCurrStatus = getStrByKey((("contest_" + toString(contestCurrNumber)) + "_status")) | |
91 | 91 | let contestNewNumber = (contestCurrNumber + 1) | |
92 | 92 | let contestBetCost = (((wavesBalance(this) / 25) / 5000000) * 100000) | |
93 | 93 | if ((account != DAPPOWNER)) | |
94 | 94 | then throw(((("Only dAPP Owner can Configure Contest. Caller account: " + account) + " dapp owner: ") + DAPPOWNER)) | |
95 | 95 | else if ((contestCurrStatus == RUNNING)) | |
96 | 96 | then throw(("You cannot configure a new Contest while old Contest status is: " + contestCurrStatus)) | |
97 | 97 | else { | |
98 | 98 | let contestFinishHeight = (height + (6 * 1440)) | |
99 | 99 | WriteSet([DataEntry("contest_currentnumber", contestNewNumber), DataEntry((("contest_" + toString(contestNewNumber)) + "_finishheight"), contestFinishHeight), DataEntry((("contest_" + toString(contestNewNumber)) + "_status"), RUNNING), DataEntry((("contest_" + toString(contestNewNumber)) + "_betcounter"), 0), DataEntry((("contest_" + toString(contestNewNumber)) + "_betcost"), contestBetCost)]) | |
100 | 100 | } | |
101 | 101 | } | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | ||
105 | 105 | @Callable(i) | |
106 | 106 | func bet (currencyValue) = { | |
107 | 107 | let account = toBase58String(i.caller.bytes) | |
108 | 108 | let pmt = extract(i.payment) | |
109 | 109 | let contestCurrNumber = getNumByKey("contest_currentnumber") | |
110 | 110 | let contestStartHeight = getNumByKey((("contest_" + toString(contestCurrNumber)) + "_startheight")) | |
111 | 111 | let contestFinishHeight = getNumByKey((("contest_" + toString(contestCurrNumber)) + "_finishheight")) | |
112 | - | let contestBetCounter = getNumByKey((("contest_" + toString(contestCurrNumber)) + "_betcounter")) | |
113 | 112 | let contestCurrStatus = getStrByKey((("contest_" + toString(contestCurrNumber)) + "_status")) | |
114 | 113 | let contestCurrBetCost = getNumByKey((("contest_" + toString(contestCurrNumber)) + "_betcost")) | |
115 | - | let thisBetId = (contestBetCounter + 1) | |
116 | 114 | let contestStatus = getStrByKey((("contest_" + toString(contestCurrNumber)) + "_status")) | |
117 | - | let existingBetBetId = getNumByKey(((("bet_" + toString(contestCurrNumber)) + "_") + toString(currencyValue))) | |
118 | - | let existingBetAccount = getBetAccount(existingBetBetId) | |
115 | + | let existingBetAccount = getStrByKey(((("bet_" + toString(contestCurrNumber)) + "_") + toString(currencyValue))) | |
119 | 116 | if ((height > (contestFinishHeight - (2 * 1440)))) | |
120 | 117 | then throw("You cannot bet anymore at this height.") | |
121 | 118 | else if ((contestCurrStatus != RUNNING)) | |
122 | 119 | then throw(("Invalid status: you cannot bet now, contest status is: " + contestCurrStatus)) | |
123 | 120 | else if (if ((pmt.assetId != WLT)) | |
124 | 121 | then true | |
125 | 122 | else (pmt.amount != contestCurrBetCost)) | |
126 | 123 | then throw(((("You must pay at least: " + toString(contestCurrBetCost)) + " WLT to bet. You paid: ") + toString(pmt.amount))) | |
127 | 124 | else if (if ((existingBetAccount != NONE)) | |
128 | 125 | then (existingBetAccount != account) | |
129 | 126 | else false) | |
130 | - | then throw | |
131 | - | else WriteSet([ | |
127 | + | then throw(((("Another user: " + existingBetAccount) + " did bet already on rate: ") + toString(currencyValue))) | |
128 | + | else WriteSet([DataEntry(((("bet_" + toString(contestCurrNumber)) + "_") + toString(currencyValue)), account)]) | |
132 | 129 | } | |
133 | 130 | ||
134 | 131 | ||
135 | 132 | ||
136 | 133 | @Callable(i) | |
137 | 134 | func closecontest () = { | |
138 | 135 | let currencyRate = getExtWAVESUSDCurrencyRate() | |
139 | 136 | let contestCurrNumber = getNumByKey("contest_currentnumber") | |
140 | - | let winningBetBetId = getNumByKey(((("bet_" + toString(contestCurrNumber)) + "_") + toString(currencyRate))) | |
141 | - | let winningBetAccount = getBetAccount(winningBetBetId) | |
137 | + | let winningBetAccount = getStrByKey(((("bet_" + toString(contestCurrNumber)) + "_") + toString(currencyRate))) | |
142 | 138 | let contestFinishHeight = getNumByKey((("contest_" + toString(contestCurrNumber)) + "_finishheight")) | |
143 | 139 | let account = toBase58String(i.caller.bytes) | |
144 | 140 | let balance = wavesBalance(this) | |
145 | 141 | let contestCurrStatus = getStrByKey((("contest_" + toString(contestCurrNumber)) + "_status")) | |
146 | 142 | let writeStatistics = WriteSet([DataEntry((("contest_" + toString(contestCurrNumber)) + "_status"), CLOSED), DataEntry((("contest_" + toString(contestCurrNumber)) + "_winner"), winningBetAccount), DataEntry((("contest_" + toString(contestCurrNumber)) + "_currencyrate"), currencyRate), DataEntry((("contest_" + toString(contestCurrNumber)) + "_height"), height)]) | |
147 | 143 | if (if ((contestFinishHeight > height)) | |
148 | 144 | then (account != DAPPOWNER) | |
149 | 145 | else false) | |
150 | 146 | then throw(((("account: " + account) + ": Cannot close the contest before height:") + toString(contestFinishHeight))) | |
151 | 147 | else if ((contestCurrStatus != RUNNING)) | |
152 | 148 | then throw(("Cannot close a contest in status: " + contestCurrStatus)) | |
153 | 149 | else if ((winningBetAccount != NONE)) | |
154 | 150 | then { | |
155 | 151 | let WLTShareRevenue = ((assetBalance(this, WLT) * 5) / 100) | |
156 | 152 | let WLTShareBurn = ((assetBalance(this, WLT) * 90) / 100) | |
157 | 153 | let winTransfer = TransferSet([ScriptTransfer(extract(addressFromString(winningBetAccount)), (((wavesBalance(this) * 99) / 100) - FEE), unit), ScriptTransfer(extract(addressFromString(ORACLEWALLET)), WLTShareRevenue, WLT), ScriptTransfer(extract(addressFromString(WAVESKITWALLET)), WLTShareRevenue, WLT), ScriptTransfer(extract(addressFromString(WLTBURNWALLET)), WLTShareBurn, WLT)]) | |
158 | 154 | ScriptResult(WriteSet([DataEntry((("contest_" + toString(contestCurrNumber)) + "_status"), CLOSED), DataEntry((("contest_" + toString(contestCurrNumber)) + "_winner"), winningBetAccount), DataEntry((("contest_" + toString(contestCurrNumber)) + "_currencyrate"), currencyRate), DataEntry((("contest_" + toString(contestCurrNumber)) + "_height"), height)]), winTransfer) | |
159 | 155 | } | |
160 | 156 | else WriteSet([DataEntry((("contest_" + toString(contestCurrNumber)) + "_status"), CLOSED), DataEntry((("contest_" + toString(contestCurrNumber)) + "_winner"), winningBetAccount), DataEntry((("contest_" + toString(contestCurrNumber)) + "_currencyrate"), currencyRate), DataEntry((("contest_" + toString(contestCurrNumber)) + "_height"), height)]) | |
161 | 157 | } | |
162 | 158 | ||
163 | 159 | ||
164 | 160 | @Verifier(tx) | |
165 | 161 | func verify () = match tx { | |
166 | 162 | case _: SetScriptTransaction|DataTransaction => | |
167 | 163 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
168 | 164 | case _: InvokeScriptTransaction => | |
169 | 165 | true | |
170 | 166 | case _ => | |
171 | 167 | true | |
172 | 168 | } | |
173 | 169 |
github/deemru/w8io/026f985 41.62 ms ◑