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