tx · 7WuRXBvzJwPisSr7kXETGkqtbnPX2LbPLEFiUGWQR1of 3N5mwuqT6dXpbqwT5VKDXzGJJ6c14rKqxS7: -0.01400000 Waves 2019.09.05 21:47 [663113] smart account 3N5mwuqT6dXpbqwT5VKDXzGJJ6c14rKqxS7 > SELF 0.00000000 Waves
{ "type": 13, "id": "7WuRXBvzJwPisSr7kXETGkqtbnPX2LbPLEFiUGWQR1of", "fee": 1400000, "feeAssetId": null, "timestamp": 1567709237036, "version": 1, "sender": "3N5mwuqT6dXpbqwT5VKDXzGJJ6c14rKqxS7", "senderPublicKey": "Gxi9GKByT2CYHqPr6ZTohMDmHRGAgE8uBM6R4QXfvtxK", "proofs": [ "5S6TTk3XZ3RVGfJ8ehtPUeBbneoU9wHRaeFh2ampqztg6MWCMsRzTV2M6tpH4xnGhMxwprvD4FNqtgzziubZSH5" ], "script": "base64:AAIDAAAAAAAAAAAAAAAPAAAAAAdSVU5OSU5HAgAAAAdSVU5OSU5HAAAAAAZDTE9TRUQCAAAABkNMT1NFRAAAAAAIQ0FOQ0VMRUQCAAAACENBTkNFTEVEAAAAAAlEQVBQT1dORVICAAAAIzNQNE5aUjZja0U4YUxDN0JvZ3I1TlhCelNpNnAxM0RRZzY3AAAAAAxPUkFDTEVXQUxMRVQCAAAAIzNQUFRyVG8zQXpSNTZON0FyemJVM0JwcTl6WU1nY2YzOU1rAAAAAA1XTFRCVVJOV0FMTEVUAgAAACMzUE12d1pmVGNWSGVmaGlLUGJ0YlY5SFBBYVVGNUtFUmpnaQAAAAAOV0FWRVNLSVRXQUxMRVQCAAAAIzNQREVFTVJVM3RCSmZmYWc3c1JQbmp3RVE4R1pHaWtVV0JpAAAAABFEQVBQQVVUSE9STldBTExFVAIAAAAjM1AySHZVRWZQUE1wOVl4eFBmZHVEVEx2bTlDa0F6TG5URW8AAAAABVdBVkVTAgAAAAVXQVZFUwAAAAAETk9ORQIAAAAETk9ORQAAAAADRkVFAAAAAAAADbugAAAAAANXTFQBAAAAI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UAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdJbnZva2VTY3JpcHRUcmFuc2FjdGlvbgYGW0jMVw==", "chainId": 84, "height": 663113, "spentComplexity": 0 } View: original | compacted Prev: 3XoVZ8MtkJErTNwkhHJuv77QgWTAsYo2sDNqZ8N5r75E Next: 4ZW4decPtHH24tmgt9KJDR8fdVnRYLZ77HdTbfhU6gnh Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | ||
8 | 8 | let c = "CANCELED" | |
9 | 9 | ||
10 | - | let d = " | |
10 | + | let d = "3P4NZR6ckE8aLC7Bogr5NXBzSi6p13DQg67" | |
11 | 11 | ||
12 | - | let e = " | |
12 | + | let e = "3PPTrTo3AzR56N7ArzbU3Bpq9zYMgcf39Mk" | |
13 | 13 | ||
14 | - | let f = " | |
14 | + | let f = "3PMvwZfTcVHefhiKPbtbV9HPAaUF5KERjgi" | |
15 | 15 | ||
16 | - | let g = " | |
16 | + | let g = "3PDEEMRU3tBJffag7sRPnjwEQ8GZGikUWBi" | |
17 | 17 | ||
18 | - | let h = " | |
18 | + | let h = "3P2HvUEfPPMp9YxxPfduDTLvm9CkAzLnTEo" | |
19 | 19 | ||
20 | 20 | let i = "WAVES" | |
21 | 21 | ||
23 | 23 | ||
24 | 24 | let k = 900000 | |
25 | 25 | ||
26 | - | let l = base58' | |
26 | + | let l = base58'CM8J4Z9HW3MdKgTxrpf3WYauXfjdu1zZKg19AGTicEYe' | |
27 | 27 | ||
28 | 28 | func m (n) = { | |
29 | 29 | let o = { | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func t () = { | |
57 | - | let u = m("contest_currentnumber") | |
58 | - | r((("contest_" + toString(u)) + "_status")) | |
59 | - | } | |
60 | - | ||
61 | - | ||
62 | - | func v (w) = { | |
63 | - | let u = m("contest_currentnumber") | |
64 | - | r((((("bet_" + toString(u)) + "_") + toString(w)) + "_owner")) | |
65 | - | } | |
66 | - | ||
67 | - | ||
68 | - | func x () = { | |
69 | - | let y = extract(addressFromString(e)) | |
70 | - | let z = { | |
71 | - | let p = getInteger(y, "waves_usd_2") | |
57 | + | let u = extract(addressFromString(e)) | |
58 | + | let v = { | |
59 | + | let p = getInteger(u, "waves_usd_2") | |
72 | 60 | if ($isInstanceOf(p, "Int")) | |
73 | 61 | then { | |
74 | 62 | let q = p | |
76 | 64 | } | |
77 | 65 | else 0 | |
78 | 66 | } | |
79 | - | | |
67 | + | v | |
80 | 68 | } | |
81 | 69 | ||
82 | 70 | ||
83 | - | @Callable( | |
84 | - | func setContestStatus ( | |
85 | - | let | |
86 | - | if (( | |
71 | + | @Callable(w) | |
72 | + | func setContestStatus (x,y) = { | |
73 | + | let z = toBase58String(w.caller.bytes) | |
74 | + | if ((z != d)) | |
87 | 75 | then throw("Only dAPP Owner can set Contest Status.") | |
88 | - | else if (if (( | |
89 | - | then ( | |
76 | + | else if (if ((y != c)) | |
77 | + | then (y != b) | |
90 | 78 | else false) | |
91 | - | then throw(("Invalid status: " + | |
92 | - | else WriteSet([DataEntry((("contest_" + toString( | |
79 | + | then throw(("Invalid status: " + y)) | |
80 | + | else WriteSet([DataEntry((("contest_" + toString(x)) + "_status"), y)]) | |
93 | 81 | } | |
94 | 82 | ||
95 | 83 | ||
96 | 84 | ||
97 | - | @Callable( | |
85 | + | @Callable(w) | |
98 | 86 | func setContestConfiguration () = { | |
99 | - | let | |
100 | - | let | |
101 | - | let | |
102 | - | let | |
103 | - | let | |
104 | - | let | |
105 | - | if (( | |
106 | - | then throw(((("Only dAPP Owner can Configure Contest. Caller account: " + | |
107 | - | else if (( | |
108 | - | then throw(("You cannot configure a new Contest while old Contest status is: " + | |
109 | - | else if ((100000000 > | |
87 | + | let z = toBase58String(w.caller.bytes) | |
88 | + | let A = m("contest_currentnumber") | |
89 | + | let B = r((("contest_" + toString(A)) + "_status")) | |
90 | + | let C = (A + 1) | |
91 | + | let D = wavesBalance(this) | |
92 | + | let E = (((D / 25) / 5000000) * 100000) | |
93 | + | if ((z != d)) | |
94 | + | then throw(((("Only dAPP Owner can Configure Contest. Caller account: " + z) + " dapp owner: ") + d)) | |
95 | + | else if ((B == a)) | |
96 | + | then throw(("You cannot configure a new Contest while old Contest status is: " + B)) | |
97 | + | else if ((100000000 > D)) | |
110 | 98 | then throw("Balance too low, cannot start a contest.") | |
111 | 99 | else { | |
112 | - | let | |
113 | - | WriteSet([DataEntry("contest_currentnumber", F), DataEntry((("contest_" + toString( | |
100 | + | let F = (height + (6 * 1440)) | |
101 | + | WriteSet([DataEntry("contest_currentnumber", C), DataEntry((("contest_" + toString(C)) + "_finishheight"), F), DataEntry((("contest_" + toString(C)) + "_status"), a), DataEntry((("contest_" + toString(C)) + "_betcounter"), 0), DataEntry((("contest_" + toString(C)) + "_betcost"), E)]) | |
114 | 102 | } | |
115 | 103 | } | |
116 | 104 | ||
117 | 105 | ||
118 | 106 | ||
119 | - | @Callable(A) | |
120 | - | func bet (J) = { | |
121 | - | let D = toBase58String(A.caller.bytes) | |
122 | - | let K = extract(A.payment) | |
123 | - | let u = m("contest_currentnumber") | |
124 | - | let L = m((("contest_" + toString(u)) + "_startheight")) | |
125 | - | let I = m((("contest_" + toString(u)) + "_finishheight")) | |
126 | - | let E = r((("contest_" + toString(u)) + "_status")) | |
127 | - | let M = m((("contest_" + toString(u)) + "_betcost")) | |
128 | - | let C = r((("contest_" + toString(u)) + "_status")) | |
129 | - | let N = r(((("bet_" + toString(u)) + "_") + toString(J))) | |
130 | - | if ((height > (I - (2 * 1440)))) | |
107 | + | @Callable(w) | |
108 | + | func bet (G) = { | |
109 | + | let z = toBase58String(w.caller.bytes) | |
110 | + | let H = extract(w.payment) | |
111 | + | let A = m("contest_currentnumber") | |
112 | + | let I = m((("contest_" + toString(A)) + "_startheight")) | |
113 | + | let F = m((("contest_" + toString(A)) + "_finishheight")) | |
114 | + | let B = r((("contest_" + toString(A)) + "_status")) | |
115 | + | let J = m((("contest_" + toString(A)) + "_betcost")) | |
116 | + | let y = r((("contest_" + toString(A)) + "_status")) | |
117 | + | let K = m((((("contest_" + toString(A)) + "_") + z) + "_bets")) | |
118 | + | let L = r(((("bet_" + toString(A)) + "_") + toString(G))) | |
119 | + | if ((height > (F - (2 * 1440)))) | |
131 | 120 | then throw("You cannot bet anymore at this height.") | |
132 | - | else if (( | |
133 | - | then throw(("Invalid status: you cannot bet now, contest status is: " + | |
134 | - | else if (if (( | |
121 | + | else if ((B != a)) | |
122 | + | then throw(("Invalid status: you cannot bet now, contest status is: " + B)) | |
123 | + | else if (if ((H.assetId != l)) | |
135 | 124 | then true | |
136 | - | else ( | |
137 | - | then throw(((("You must pay at least: " + toString( | |
138 | - | else if (if (( | |
139 | - | then ( | |
125 | + | else (H.amount != J)) | |
126 | + | then throw(((("You must pay at least: " + toString(J)) + " WLT to bet. You paid: ") + toString(H.amount))) | |
127 | + | else if (if ((L != j)) | |
128 | + | then (L != z) | |
140 | 129 | else false) | |
141 | - | then throw((("Another user: " + N) + " did bet already on this rate.")) | |
142 | - | else WriteSet([DataEntry(((("bet_" + toString(u)) + "_") + toString(J)), D)]) | |
130 | + | then throw((("Another user: " + L) + " did bet already on this rate.")) | |
131 | + | else if ((K > 5)) | |
132 | + | then throw("You can bet at most on 5 rates.") | |
133 | + | else WriteSet([DataEntry(((("bet_" + toString(A)) + "_") + toString(G)), z), DataEntry((((("contest_" + toString(A)) + "_") + z) + "_bets"), (K + 1))]) | |
143 | 134 | } | |
144 | 135 | ||
145 | 136 | ||
146 | 137 | ||
147 | - | @Callable( | |
138 | + | @Callable(w) | |
148 | 139 | func closecontest () = { | |
149 | - | let | |
150 | - | let | |
151 | - | let | |
152 | - | let | |
153 | - | let | |
154 | - | let | |
155 | - | let | |
156 | - | let | |
157 | - | if (( | |
140 | + | let M = t() | |
141 | + | let A = m("contest_currentnumber") | |
142 | + | let N = r(((("bet_" + toString(A)) + "_") + toString(M))) | |
143 | + | let F = m((("contest_" + toString(A)) + "_finishheight")) | |
144 | + | let z = toBase58String(w.caller.bytes) | |
145 | + | let D = wavesBalance(this) | |
146 | + | let B = r((("contest_" + toString(A)) + "_status")) | |
147 | + | let O = ((assetBalance(this, l) * 85) / 100) | |
148 | + | if ((z != d)) | |
158 | 149 | then throw("Only dAPP Owner can Close Contest.") | |
159 | - | else if (if ((I > height)) | |
160 | - | then (D != d) | |
161 | - | else false) | |
162 | - | then throw(((("account: " + D) + ": Cannot close the contest before height:") + toString(I))) | |
163 | - | else if ((E != a)) | |
164 | - | then throw(("Cannot close a contest in status: " + E)) | |
165 | - | else if ((P != j)) | |
150 | + | else if ((F > height)) | |
151 | + | then throw(((("account: " + z) + ": Cannot close the contest before height:") + toString(F))) | |
152 | + | else if ((B != a)) | |
153 | + | then throw(("Cannot close a contest in status: " + B)) | |
154 | + | else if ((N != j)) | |
166 | 155 | then { | |
167 | - | let | |
168 | - | let | |
169 | - | let | |
170 | - | ScriptResult(WriteSet([DataEntry((("contest_" + toString( | |
156 | + | let P = ((assetBalance(this, l) * 5) / 100) | |
157 | + | let Q = ((wavesBalance(this) * 99) / 100) | |
158 | + | let R = TransferSet([ScriptTransfer(extract(addressFromString(N)), Q, unit), ScriptTransfer(extract(addressFromString(e)), P, l), ScriptTransfer(extract(addressFromString(g)), P, l), ScriptTransfer(extract(addressFromString(h)), P, l), ScriptTransfer(extract(addressFromString(f)), O, l)]) | |
159 | + | ScriptResult(WriteSet([DataEntry((("contest_" + toString(A)) + "_status"), b), DataEntry((("contest_" + toString(A)) + "_winner"), N), DataEntry((("contest_" + toString(A)) + "_currencyrate"), M), DataEntry((("contest_" + toString(A)) + "_prize"), Q), DataEntry((("contest_" + toString(A)) + "_wltburned"), O)]), R) | |
171 | 160 | } | |
172 | - | else WriteSet([DataEntry((("contest_" + toString( | |
161 | + | else WriteSet([DataEntry((("contest_" + toString(A)) + "_status"), b), DataEntry((("contest_" + toString(A)) + "_winner"), N), DataEntry((("contest_" + toString(A)) + "_currencyrate"), M), DataEntry((("contest_" + toString(A)) + "_prize"), 0), DataEntry((("contest_" + toString(A)) + "_wltburned"), O)]) | |
173 | 162 | } | |
174 | 163 | ||
175 | 164 | ||
176 | - | @Verifier( | |
177 | - | func | |
178 | - | let p = | |
165 | + | @Verifier(S) | |
166 | + | func T () = { | |
167 | + | let p = S | |
179 | 168 | if (if ($isInstanceOf(p, "SetScriptTransaction")) | |
180 | 169 | then true | |
181 | 170 | else $isInstanceOf(p, "DataTransaction")) | |
182 | - | then sigVerify( | |
171 | + | then sigVerify(S.bodyBytes, S.proofs[0], S.senderPublicKey) | |
183 | 172 | else if ($isInstanceOf(p, "InvokeScriptTransaction")) | |
184 | 173 | then true | |
185 | 174 | else true |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "RUNNING" | |
5 | 5 | ||
6 | 6 | let b = "CLOSED" | |
7 | 7 | ||
8 | 8 | let c = "CANCELED" | |
9 | 9 | ||
10 | - | let d = " | |
10 | + | let d = "3P4NZR6ckE8aLC7Bogr5NXBzSi6p13DQg67" | |
11 | 11 | ||
12 | - | let e = " | |
12 | + | let e = "3PPTrTo3AzR56N7ArzbU3Bpq9zYMgcf39Mk" | |
13 | 13 | ||
14 | - | let f = " | |
14 | + | let f = "3PMvwZfTcVHefhiKPbtbV9HPAaUF5KERjgi" | |
15 | 15 | ||
16 | - | let g = " | |
16 | + | let g = "3PDEEMRU3tBJffag7sRPnjwEQ8GZGikUWBi" | |
17 | 17 | ||
18 | - | let h = " | |
18 | + | let h = "3P2HvUEfPPMp9YxxPfduDTLvm9CkAzLnTEo" | |
19 | 19 | ||
20 | 20 | let i = "WAVES" | |
21 | 21 | ||
22 | 22 | let j = "NONE" | |
23 | 23 | ||
24 | 24 | let k = 900000 | |
25 | 25 | ||
26 | - | let l = base58' | |
26 | + | let l = base58'CM8J4Z9HW3MdKgTxrpf3WYauXfjdu1zZKg19AGTicEYe' | |
27 | 27 | ||
28 | 28 | func m (n) = { | |
29 | 29 | let o = { | |
30 | 30 | let p = getInteger(this, n) | |
31 | 31 | if ($isInstanceOf(p, "Int")) | |
32 | 32 | then { | |
33 | 33 | let q = p | |
34 | 34 | q | |
35 | 35 | } | |
36 | 36 | else 0 | |
37 | 37 | } | |
38 | 38 | o | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func r (n) = { | |
43 | 43 | let s = { | |
44 | 44 | let p = getString(this, n) | |
45 | 45 | if ($isInstanceOf(p, "String")) | |
46 | 46 | then { | |
47 | 47 | let q = p | |
48 | 48 | q | |
49 | 49 | } | |
50 | 50 | else j | |
51 | 51 | } | |
52 | 52 | s | |
53 | 53 | } | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func t () = { | |
57 | - | let u = m("contest_currentnumber") | |
58 | - | r((("contest_" + toString(u)) + "_status")) | |
59 | - | } | |
60 | - | ||
61 | - | ||
62 | - | func v (w) = { | |
63 | - | let u = m("contest_currentnumber") | |
64 | - | r((((("bet_" + toString(u)) + "_") + toString(w)) + "_owner")) | |
65 | - | } | |
66 | - | ||
67 | - | ||
68 | - | func x () = { | |
69 | - | let y = extract(addressFromString(e)) | |
70 | - | let z = { | |
71 | - | let p = getInteger(y, "waves_usd_2") | |
57 | + | let u = extract(addressFromString(e)) | |
58 | + | let v = { | |
59 | + | let p = getInteger(u, "waves_usd_2") | |
72 | 60 | if ($isInstanceOf(p, "Int")) | |
73 | 61 | then { | |
74 | 62 | let q = p | |
75 | 63 | q | |
76 | 64 | } | |
77 | 65 | else 0 | |
78 | 66 | } | |
79 | - | | |
67 | + | v | |
80 | 68 | } | |
81 | 69 | ||
82 | 70 | ||
83 | - | @Callable( | |
84 | - | func setContestStatus ( | |
85 | - | let | |
86 | - | if (( | |
71 | + | @Callable(w) | |
72 | + | func setContestStatus (x,y) = { | |
73 | + | let z = toBase58String(w.caller.bytes) | |
74 | + | if ((z != d)) | |
87 | 75 | then throw("Only dAPP Owner can set Contest Status.") | |
88 | - | else if (if (( | |
89 | - | then ( | |
76 | + | else if (if ((y != c)) | |
77 | + | then (y != b) | |
90 | 78 | else false) | |
91 | - | then throw(("Invalid status: " + | |
92 | - | else WriteSet([DataEntry((("contest_" + toString( | |
79 | + | then throw(("Invalid status: " + y)) | |
80 | + | else WriteSet([DataEntry((("contest_" + toString(x)) + "_status"), y)]) | |
93 | 81 | } | |
94 | 82 | ||
95 | 83 | ||
96 | 84 | ||
97 | - | @Callable( | |
85 | + | @Callable(w) | |
98 | 86 | func setContestConfiguration () = { | |
99 | - | let | |
100 | - | let | |
101 | - | let | |
102 | - | let | |
103 | - | let | |
104 | - | let | |
105 | - | if (( | |
106 | - | then throw(((("Only dAPP Owner can Configure Contest. Caller account: " + | |
107 | - | else if (( | |
108 | - | then throw(("You cannot configure a new Contest while old Contest status is: " + | |
109 | - | else if ((100000000 > | |
87 | + | let z = toBase58String(w.caller.bytes) | |
88 | + | let A = m("contest_currentnumber") | |
89 | + | let B = r((("contest_" + toString(A)) + "_status")) | |
90 | + | let C = (A + 1) | |
91 | + | let D = wavesBalance(this) | |
92 | + | let E = (((D / 25) / 5000000) * 100000) | |
93 | + | if ((z != d)) | |
94 | + | then throw(((("Only dAPP Owner can Configure Contest. Caller account: " + z) + " dapp owner: ") + d)) | |
95 | + | else if ((B == a)) | |
96 | + | then throw(("You cannot configure a new Contest while old Contest status is: " + B)) | |
97 | + | else if ((100000000 > D)) | |
110 | 98 | then throw("Balance too low, cannot start a contest.") | |
111 | 99 | else { | |
112 | - | let | |
113 | - | WriteSet([DataEntry("contest_currentnumber", F), DataEntry((("contest_" + toString( | |
100 | + | let F = (height + (6 * 1440)) | |
101 | + | WriteSet([DataEntry("contest_currentnumber", C), DataEntry((("contest_" + toString(C)) + "_finishheight"), F), DataEntry((("contest_" + toString(C)) + "_status"), a), DataEntry((("contest_" + toString(C)) + "_betcounter"), 0), DataEntry((("contest_" + toString(C)) + "_betcost"), E)]) | |
114 | 102 | } | |
115 | 103 | } | |
116 | 104 | ||
117 | 105 | ||
118 | 106 | ||
119 | - | @Callable(A) | |
120 | - | func bet (J) = { | |
121 | - | let D = toBase58String(A.caller.bytes) | |
122 | - | let K = extract(A.payment) | |
123 | - | let u = m("contest_currentnumber") | |
124 | - | let L = m((("contest_" + toString(u)) + "_startheight")) | |
125 | - | let I = m((("contest_" + toString(u)) + "_finishheight")) | |
126 | - | let E = r((("contest_" + toString(u)) + "_status")) | |
127 | - | let M = m((("contest_" + toString(u)) + "_betcost")) | |
128 | - | let C = r((("contest_" + toString(u)) + "_status")) | |
129 | - | let N = r(((("bet_" + toString(u)) + "_") + toString(J))) | |
130 | - | if ((height > (I - (2 * 1440)))) | |
107 | + | @Callable(w) | |
108 | + | func bet (G) = { | |
109 | + | let z = toBase58String(w.caller.bytes) | |
110 | + | let H = extract(w.payment) | |
111 | + | let A = m("contest_currentnumber") | |
112 | + | let I = m((("contest_" + toString(A)) + "_startheight")) | |
113 | + | let F = m((("contest_" + toString(A)) + "_finishheight")) | |
114 | + | let B = r((("contest_" + toString(A)) + "_status")) | |
115 | + | let J = m((("contest_" + toString(A)) + "_betcost")) | |
116 | + | let y = r((("contest_" + toString(A)) + "_status")) | |
117 | + | let K = m((((("contest_" + toString(A)) + "_") + z) + "_bets")) | |
118 | + | let L = r(((("bet_" + toString(A)) + "_") + toString(G))) | |
119 | + | if ((height > (F - (2 * 1440)))) | |
131 | 120 | then throw("You cannot bet anymore at this height.") | |
132 | - | else if (( | |
133 | - | then throw(("Invalid status: you cannot bet now, contest status is: " + | |
134 | - | else if (if (( | |
121 | + | else if ((B != a)) | |
122 | + | then throw(("Invalid status: you cannot bet now, contest status is: " + B)) | |
123 | + | else if (if ((H.assetId != l)) | |
135 | 124 | then true | |
136 | - | else ( | |
137 | - | then throw(((("You must pay at least: " + toString( | |
138 | - | else if (if (( | |
139 | - | then ( | |
125 | + | else (H.amount != J)) | |
126 | + | then throw(((("You must pay at least: " + toString(J)) + " WLT to bet. You paid: ") + toString(H.amount))) | |
127 | + | else if (if ((L != j)) | |
128 | + | then (L != z) | |
140 | 129 | else false) | |
141 | - | then throw((("Another user: " + N) + " did bet already on this rate.")) | |
142 | - | else WriteSet([DataEntry(((("bet_" + toString(u)) + "_") + toString(J)), D)]) | |
130 | + | then throw((("Another user: " + L) + " did bet already on this rate.")) | |
131 | + | else if ((K > 5)) | |
132 | + | then throw("You can bet at most on 5 rates.") | |
133 | + | else WriteSet([DataEntry(((("bet_" + toString(A)) + "_") + toString(G)), z), DataEntry((((("contest_" + toString(A)) + "_") + z) + "_bets"), (K + 1))]) | |
143 | 134 | } | |
144 | 135 | ||
145 | 136 | ||
146 | 137 | ||
147 | - | @Callable( | |
138 | + | @Callable(w) | |
148 | 139 | func closecontest () = { | |
149 | - | let | |
150 | - | let | |
151 | - | let | |
152 | - | let | |
153 | - | let | |
154 | - | let | |
155 | - | let | |
156 | - | let | |
157 | - | if (( | |
140 | + | let M = t() | |
141 | + | let A = m("contest_currentnumber") | |
142 | + | let N = r(((("bet_" + toString(A)) + "_") + toString(M))) | |
143 | + | let F = m((("contest_" + toString(A)) + "_finishheight")) | |
144 | + | let z = toBase58String(w.caller.bytes) | |
145 | + | let D = wavesBalance(this) | |
146 | + | let B = r((("contest_" + toString(A)) + "_status")) | |
147 | + | let O = ((assetBalance(this, l) * 85) / 100) | |
148 | + | if ((z != d)) | |
158 | 149 | then throw("Only dAPP Owner can Close Contest.") | |
159 | - | else if (if ((I > height)) | |
160 | - | then (D != d) | |
161 | - | else false) | |
162 | - | then throw(((("account: " + D) + ": Cannot close the contest before height:") + toString(I))) | |
163 | - | else if ((E != a)) | |
164 | - | then throw(("Cannot close a contest in status: " + E)) | |
165 | - | else if ((P != j)) | |
150 | + | else if ((F > height)) | |
151 | + | then throw(((("account: " + z) + ": Cannot close the contest before height:") + toString(F))) | |
152 | + | else if ((B != a)) | |
153 | + | then throw(("Cannot close a contest in status: " + B)) | |
154 | + | else if ((N != j)) | |
166 | 155 | then { | |
167 | - | let | |
168 | - | let | |
169 | - | let | |
170 | - | ScriptResult(WriteSet([DataEntry((("contest_" + toString( | |
156 | + | let P = ((assetBalance(this, l) * 5) / 100) | |
157 | + | let Q = ((wavesBalance(this) * 99) / 100) | |
158 | + | let R = TransferSet([ScriptTransfer(extract(addressFromString(N)), Q, unit), ScriptTransfer(extract(addressFromString(e)), P, l), ScriptTransfer(extract(addressFromString(g)), P, l), ScriptTransfer(extract(addressFromString(h)), P, l), ScriptTransfer(extract(addressFromString(f)), O, l)]) | |
159 | + | ScriptResult(WriteSet([DataEntry((("contest_" + toString(A)) + "_status"), b), DataEntry((("contest_" + toString(A)) + "_winner"), N), DataEntry((("contest_" + toString(A)) + "_currencyrate"), M), DataEntry((("contest_" + toString(A)) + "_prize"), Q), DataEntry((("contest_" + toString(A)) + "_wltburned"), O)]), R) | |
171 | 160 | } | |
172 | - | else WriteSet([DataEntry((("contest_" + toString( | |
161 | + | else WriteSet([DataEntry((("contest_" + toString(A)) + "_status"), b), DataEntry((("contest_" + toString(A)) + "_winner"), N), DataEntry((("contest_" + toString(A)) + "_currencyrate"), M), DataEntry((("contest_" + toString(A)) + "_prize"), 0), DataEntry((("contest_" + toString(A)) + "_wltburned"), O)]) | |
173 | 162 | } | |
174 | 163 | ||
175 | 164 | ||
176 | - | @Verifier( | |
177 | - | func | |
178 | - | let p = | |
165 | + | @Verifier(S) | |
166 | + | func T () = { | |
167 | + | let p = S | |
179 | 168 | if (if ($isInstanceOf(p, "SetScriptTransaction")) | |
180 | 169 | then true | |
181 | 170 | else $isInstanceOf(p, "DataTransaction")) | |
182 | - | then sigVerify( | |
171 | + | then sigVerify(S.bodyBytes, S.proofs[0], S.senderPublicKey) | |
183 | 172 | else if ($isInstanceOf(p, "InvokeScriptTransaction")) | |
184 | 173 | then true | |
185 | 174 | else true | |
186 | 175 | } | |
187 | 176 |
github/deemru/w8io/169f3d6 85.06 ms ◑