tx · FiuE8vuQG88rJKD28mPPhkbjtk2aZ2a2yPLz36wNemKu 3N7Wiiso7vo69pqWfLtpzT3tbzMUGahqpgo: -0.01400000 Waves 2019.08.19 16:21 [638084] smart account 3N7Wiiso7vo69pqWfLtpzT3tbzMUGahqpgo > SELF 0.00000000 Waves
{ "type": 13, "id": "FiuE8vuQG88rJKD28mPPhkbjtk2aZ2a2yPLz36wNemKu", "fee": 1400000, "feeAssetId": null, "timestamp": 1566220871634, "version": 1, "sender": "3N7Wiiso7vo69pqWfLtpzT3tbzMUGahqpgo", "senderPublicKey": "5GQSFwNMkJFTT3FeLT3KENqoSr42yiJP3Av5qAYq1F7f", "proofs": [ "4SLpJzcHMocMcneoYGxce1ne5tBNNeX6pFWiyQjz64PLS4pGicqovk5uVeEXG79H32SaNNqWgrJumfQBKZ2QHkBn" ], "script": "base64:AAIDAAAAAAAAAAAAAAAPAAAAAAdSVU5OSU5HAgAAAAdSVU5OSU5HAAAAAAZDTE9TRUQCAAAABkNMT1NFRAAAAAAJREFQUE9XTkVSAgAAACMzTjdXaWlzbzd2bzY5cHFXZkx0cHpUM3Riek1VR2FocXBnbwAAAAAMT1JBQ0xFV0FMTEVUAgAAACMzTkFjb2VXZFVUV244Y3NYSlBHNDd2MUZqdGpjZnF4YjV0dQAAAAANV0xUQlVSTldBTExFVAIAAAAjM01wQ2JERGprU3JmUzFYa1BwbTcxaVpqNURRMVJwQlJSaHQAAAAADldBVkVTS0lUV0FMTEVUAgAAACMzTXFQcGJXUFJzWkZvVDlYNzRxV29jVTRCcHlwR0VQaGlDbgAAAAAFV0FWRVMCAAAABVdBVkVTAAAAAAROT05FAgAAAAROT05FAAAAAANGRUUAAAAAAAANu6AAAAAAA1dMVAEAAAAgXc1YMiAxtU0669iAvoWYChIkz8rePUfYvMDdGTUOq6oBAAAAC2dldE51bUJ5S2V5AAAAAQAAAANrZXkEAAAAA251bQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQA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5AAAAAgkAASwAAAACCQABLAAAAAICAAAACGNvbnRlc3RfCQABpAAAAAEFAAAAEWNvbnRlc3RDdXJyTnVtYmVyAgAAAAdfaGVpZ2h0BQAAAAZoZWlnaHQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBgabjPit", "chainId": 84, "height": 638084, "spentComplexity": 0 } View: original | compacted Prev: SajmKTGnsFPfVJtPMkrQtMFRQgUGTwFp4H8VW3wXoX7 Next: 3vg2DMZDQ2qio3TDfMBZzpRrjubkMLsLvNUFZaqqjPap Diff:
Old | New | Differences | |
---|---|---|---|
87 | 87 | let contestCurrNumber = getNumByKey("contest_currentnumber") | |
88 | 88 | let contestCurrStatus = getStrByKey((("contest_" + toString(contestCurrNumber)) + "_status")) | |
89 | 89 | let contestNewNumber = (contestCurrNumber + 1) | |
90 | + | let contestBetCost = (((wavesBalance(this) * 99) / 100) / 25) | |
90 | 91 | if ((account != DAPPOWNER)) | |
91 | 92 | then throw(((("Only dAPP Owner can Configure Contest. Caller account: " + account) + " dapp owner: ") + DAPPOWNER)) | |
92 | 93 | else if ((contestCurrStatus == RUNNING)) | |
93 | 94 | then throw(("You cannot configure a new Contest while old Contest status is: " + contestCurrStatus)) | |
94 | 95 | else { | |
95 | 96 | let contestFinishHeight = (height + (7 * 1440)) | |
96 | - | WriteSet([DataEntry("contest_currentnumber", contestNewNumber), DataEntry((("contest_" + toString(contestNewNumber)) + "_finishheight"), contestFinishHeight), DataEntry((("contest_" + toString(contestNewNumber)) + "_status"), RUNNING), DataEntry((("contest_" + toString(contestNewNumber)) + "_ | |
97 | + | 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"), 0)]) | |
97 | 98 | } | |
98 | 99 | } | |
99 | 100 | ||
106 | 107 | let contestCurrNumber = getNumByKey("contest_currentnumber") | |
107 | 108 | let contestStartHeight = getNumByKey((("contest_" + toString(contestCurrNumber)) + "_startheight")) | |
108 | 109 | let contestFinishHeight = getNumByKey((("contest_" + toString(contestCurrNumber)) + "_finishheight")) | |
109 | - | let | |
110 | + | let contestBetCounter = getNumByKey((("contest_" + toString(contestCurrNumber)) + "_betcounter")) | |
110 | 111 | let contestCurrStatus = getStrByKey((("contest_" + toString(contestCurrNumber)) + "_status")) | |
111 | - | let | |
112 | + | let thisBetId = (contestBetCounter + 1) | |
112 | 113 | let contestStatus = getStrByKey((("contest_" + toString(contestCurrNumber)) + "_status")) | |
113 | - | let | |
114 | - | let existingBetAccount = getBetAccount( | |
114 | + | let existingBetBetId = getNumByKey(((("bet_" + toString(contestCurrNumber)) + "_") + toString(currencyValue))) | |
115 | + | let existingBetAccount = getBetAccount(existingBetBetId) | |
115 | 116 | if ((height > (contestFinishHeight - (2 * 1440)))) | |
116 | 117 | then throw("You cannot bet anymore at this height.") | |
117 | 118 | else if ((contestCurrStatus != RUNNING)) | |
123 | 124 | else if (if ((existingBetAccount != NONE)) | |
124 | 125 | then (existingBetAccount != account) | |
125 | 126 | else false) | |
126 | - | then throw(((((("Another user: " + existingBetAccount) + " did bet already on rate: ") + toString(currencyValue)) + " betID:") + toString( | |
127 | - | else WriteSet([DataEntry((((("bet_" + toString(contestCurrNumber)) + "_") + toString( | |
127 | + | then throw(((((("Another user: " + existingBetAccount) + " did bet already on rate: ") + toString(currencyValue)) + " betID:") + toString(existingBetBetId))) | |
128 | + | else WriteSet([DataEntry((((("bet_" + toString(contestCurrNumber)) + "_") + toString(thisBetId)) + "_owner"), account), DataEntry(((("bet_" + toString(contestCurrNumber)) + "_") + toString(currencyValue)), thisBetId), DataEntry((("contest_" + toString(contestCurrNumber)) + "_betcounter"), thisBetId)]) | |
128 | 129 | } | |
129 | 130 | ||
130 | 131 | ||
133 | 134 | func closecontest () = { | |
134 | 135 | let currencyRate = getExtWAVESUSDCurrencyRate() | |
135 | 136 | let contestCurrNumber = getNumByKey("contest_currentnumber") | |
136 | - | let | |
137 | - | let winningBetAccount = getBetAccount( | |
137 | + | let winningBetBetId = getNumByKey(((("bet_" + toString(contestCurrNumber)) + "_") + toString(currencyRate))) | |
138 | + | let winningBetAccount = getBetAccount(winningBetBetId) | |
138 | 139 | let contestFinishHeight = getNumByKey((("contest_" + toString(contestCurrNumber)) + "_finishheight")) | |
139 | 140 | let account = toBase58String(i.caller.bytes) | |
140 | 141 | 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 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 () = { | |
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 | + | let contestBetCost = (((wavesBalance(this) * 99) / 100) / 25) | |
90 | 91 | if ((account != DAPPOWNER)) | |
91 | 92 | then throw(((("Only dAPP Owner can Configure Contest. Caller account: " + account) + " dapp owner: ") + DAPPOWNER)) | |
92 | 93 | else if ((contestCurrStatus == RUNNING)) | |
93 | 94 | then throw(("You cannot configure a new Contest while old Contest status is: " + contestCurrStatus)) | |
94 | 95 | else { | |
95 | 96 | let contestFinishHeight = (height + (7 * 1440)) | |
96 | - | WriteSet([DataEntry("contest_currentnumber", contestNewNumber), DataEntry((("contest_" + toString(contestNewNumber)) + "_finishheight"), contestFinishHeight), DataEntry((("contest_" + toString(contestNewNumber)) + "_status"), RUNNING), DataEntry((("contest_" + toString(contestNewNumber)) + "_ | |
97 | + | 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"), 0)]) | |
97 | 98 | } | |
98 | 99 | } | |
99 | 100 | ||
100 | 101 | ||
101 | 102 | ||
102 | 103 | @Callable(i) | |
103 | 104 | func bet (currencyValue) = { | |
104 | 105 | let account = toBase58String(i.caller.bytes) | |
105 | 106 | let pmt = extract(i.payment) | |
106 | 107 | let contestCurrNumber = getNumByKey("contest_currentnumber") | |
107 | 108 | let contestStartHeight = getNumByKey((("contest_" + toString(contestCurrNumber)) + "_startheight")) | |
108 | 109 | let contestFinishHeight = getNumByKey((("contest_" + toString(contestCurrNumber)) + "_finishheight")) | |
109 | - | let | |
110 | + | let contestBetCounter = getNumByKey((("contest_" + toString(contestCurrNumber)) + "_betcounter")) | |
110 | 111 | let contestCurrStatus = getStrByKey((("contest_" + toString(contestCurrNumber)) + "_status")) | |
111 | - | let | |
112 | + | let thisBetId = (contestBetCounter + 1) | |
112 | 113 | let contestStatus = getStrByKey((("contest_" + toString(contestCurrNumber)) + "_status")) | |
113 | - | let | |
114 | - | let existingBetAccount = getBetAccount( | |
114 | + | let existingBetBetId = getNumByKey(((("bet_" + toString(contestCurrNumber)) + "_") + toString(currencyValue))) | |
115 | + | let existingBetAccount = getBetAccount(existingBetBetId) | |
115 | 116 | if ((height > (contestFinishHeight - (2 * 1440)))) | |
116 | 117 | then throw("You cannot bet anymore at this height.") | |
117 | 118 | else if ((contestCurrStatus != RUNNING)) | |
118 | 119 | then throw(("Invalid status: you cannot bet now, contest status is: " + contestCurrStatus)) | |
119 | 120 | else if (if ((pmt.assetId != WLT)) | |
120 | 121 | then true | |
121 | 122 | else (pmt.amount != 500000)) | |
122 | 123 | then throw(("You must pay 5 WLT to bet. You paid: " + toString(pmt.amount))) | |
123 | 124 | else if (if ((existingBetAccount != NONE)) | |
124 | 125 | then (existingBetAccount != account) | |
125 | 126 | else false) | |
126 | - | then throw(((((("Another user: " + existingBetAccount) + " did bet already on rate: ") + toString(currencyValue)) + " betID:") + toString( | |
127 | - | else WriteSet([DataEntry((((("bet_" + toString(contestCurrNumber)) + "_") + toString( | |
127 | + | then throw(((((("Another user: " + existingBetAccount) + " did bet already on rate: ") + toString(currencyValue)) + " betID:") + toString(existingBetBetId))) | |
128 | + | else WriteSet([DataEntry((((("bet_" + toString(contestCurrNumber)) + "_") + toString(thisBetId)) + "_owner"), account), DataEntry(((("bet_" + toString(contestCurrNumber)) + "_") + toString(currencyValue)), thisBetId), DataEntry((("contest_" + toString(contestCurrNumber)) + "_betcounter"), thisBetId)]) | |
128 | 129 | } | |
129 | 130 | ||
130 | 131 | ||
131 | 132 | ||
132 | 133 | @Callable(i) | |
133 | 134 | func closecontest () = { | |
134 | 135 | let currencyRate = getExtWAVESUSDCurrencyRate() | |
135 | 136 | let contestCurrNumber = getNumByKey("contest_currentnumber") | |
136 | - | let | |
137 | - | let winningBetAccount = getBetAccount( | |
137 | + | let winningBetBetId = getNumByKey(((("bet_" + toString(contestCurrNumber)) + "_") + toString(currencyRate))) | |
138 | + | let winningBetAccount = getBetAccount(winningBetBetId) | |
138 | 139 | let contestFinishHeight = getNumByKey((("contest_" + toString(contestCurrNumber)) + "_finishheight")) | |
139 | 140 | let account = toBase58String(i.caller.bytes) | |
140 | 141 | let balance = wavesBalance(this) | |
141 | 142 | let contestCurrStatus = getStrByKey((("contest_" + toString(contestCurrNumber)) + "_status")) | |
142 | 143 | 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)]) | |
143 | 144 | if (if ((contestFinishHeight > height)) | |
144 | 145 | then (account != DAPPOWNER) | |
145 | 146 | else false) | |
146 | 147 | then throw(((("account: " + account) + ": Cannot close the contest before height:") + toString(contestFinishHeight))) | |
147 | 148 | else if ((contestCurrStatus != RUNNING)) | |
148 | 149 | then throw(("Cannot close a contest in status: " + contestCurrStatus)) | |
149 | 150 | else if ((winningBetAccount != NONE)) | |
150 | 151 | then { | |
151 | 152 | let WLTShareRevenue = ((assetBalance(this, WLT) * 5) / 100) | |
152 | 153 | let WLTShareBurn = ((assetBalance(this, WLT) * 90) / 100) | |
153 | 154 | 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)]) | |
154 | 155 | 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) | |
155 | 156 | } | |
156 | 157 | 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)]) | |
157 | 158 | } | |
158 | 159 | ||
159 | 160 | ||
160 | 161 | @Verifier(tx) | |
161 | 162 | func verify () = match tx { | |
162 | 163 | case _: SetScriptTransaction|DataTransaction => | |
163 | 164 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
164 | 165 | case _: InvokeScriptTransaction => | |
165 | 166 | true | |
166 | 167 | case _ => | |
167 | 168 | true | |
168 | 169 | } | |
169 | 170 |
github/deemru/w8io/026f985 40.19 ms ◑