tx · 4WGgDTjECeE7vwrQbZNbixhUejjFnNKwnuMU5p7K6Yei 3N3ebQQB2ibXfMZA2zCKyWAUJ7rRBcdJX27: -0.01000000 Waves 2019.07.29 13:38 [607255] smart account 3N3ebQQB2ibXfMZA2zCKyWAUJ7rRBcdJX27 > SELF 0.00000000 Waves
{ "type": 13, "id": "4WGgDTjECeE7vwrQbZNbixhUejjFnNKwnuMU5p7K6Yei", "fee": 1000000, "feeAssetId": null, "timestamp": 1564396713242, "version": 1, "sender": "3N3ebQQB2ibXfMZA2zCKyWAUJ7rRBcdJX27", "senderPublicKey": "6jzwHLfgFCnKSv9AweXtBxr1LFey9YPeEwoYb5CZ6UGs", "proofs": [ "4FhbnXH6TrKyJNJPoqqaBRVGZaEAt1WVsDyzy9hByGfvJDoFuAEkH2bRVK48RyaDfPZg1FdmHjPq34CWR6TgXd4k" ], "script": "base64:AAIDAAAAAAAAAAAAAAAzAAAAAAV3YXZlcwAAAAAABfXhAAAAAAAObGlnYUNvbW1pc3Npb24AAAAAAAAAAAQAAAAACnRvdGFsVGVhbXMAAAAAAAAAAAIAAAAADWxpZ2FQdWJsaWNLZXkBAAAAIDz1Wd7VAqxkhwXXdekZDWeZHlcDxk6CXoR+2JlrB7MjAAAAAA5ldmVudFB1YmxpY0tleQEAAAAgVU5WQVOSpz5hqxG0TOuBQFsZvvkqoxav9ypygau+UgwAAAAAD29yYWNsZVB1YmxpY0tleQEAAAAgMeiBtT6xxYP4MzVMOYpg7I8lJBR0mlbwkeXzfQNoPiEAAAAAEmxlYXNlTm9kZVB1YmxpY0tleQEAAAAgMeiBtT6xxYP4MzVMOYpg7I8lJBR0mlbwkeXzfQNoPiEAAAAAEGV2ZW50RW5kc0F0QmxvY2sAAAAAAAAJRBkAAAAAGXdpbm5lckRlY2xhcmF0aW9uSW50ZXJ2YWwAAAAAAAAAAAUAAAAADnBheW91dEludGVydmFsAAAAAAAAAAAUAQAAAAhnZXRJbnRPcgAAAAIAAAADa2V5AAAAB2RlZm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AAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAFvAAAABnByb29mcwAAAAAAAAAAAAUAAAAOZXZlbnRQdWJsaWNLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAEExlYXNlVHJhbnNhY3Rpb24EAAAAAWwFAAAAByRtYXRjaDADAwkAAAAAAAACCQEAAAAFc3RhZ2UAAAAABQAAAAZTVEFHRTEJAAAAAAAAAggFAAAAAWwAAAAJcmVjaXBpZW50CQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABBQAAABJsZWFzZU5vZGVQdWJsaWNLZXkHCQAAZgAAAAIIBQAAAAFsAAAABmFtb3VudAkAAGgAAAACAAAAAAAAAABkBQAAAAV3YXZlcwcDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFkxlYXNlQ2FuY2VsVHJhbnNhY3Rpb24EAAAAAmNsBQAAAAckbWF0Y2gwCQEAAAACIT0AAAACCQEAAAAFc3RhZ2UAAAAABQAAAAZTVEFHRTEDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAAmNsBQAAAAckbWF0Y2gwBgfQRf8e", "chainId": 84, "height": 607255, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let waves = 100000000 | |
5 | + | ||
6 | + | let ligaCommission = 4 | |
7 | + | ||
8 | + | let totalTeams = 2 | |
9 | + | ||
10 | + | let ligaPublicKey = base58'56xTC8QUv2imTCZqZSvWNbjiKbPLMqbfrUk9nNPd1ra6' | |
11 | + | ||
12 | + | let eventPublicKey = base58'6jzwHLfgFCnKSv9AweXtBxr1LFey9YPeEwoYb5CZ6UGs' | |
13 | + | ||
14 | + | let oraclePublicKey = base58'4MpcDraDARQ9f2dXeuuaxDsmtVnAwTqWzt61T3ipyRkt' | |
15 | + | ||
16 | + | let leaseNodePublicKey = base58'4MpcDraDARQ9f2dXeuuaxDsmtVnAwTqWzt61T3ipyRkt' | |
17 | + | ||
18 | + | let eventEndsAtBlock = 607257 | |
19 | + | ||
20 | + | let winnerDeclarationInterval = 5 | |
21 | + | ||
22 | + | let payoutInterval = 20 | |
23 | + | ||
24 | + | func getIntOr (key,default) = if (isDefined(getInteger(this, key))) | |
25 | + | then getIntegerValue(this, key) | |
26 | + | else default | |
27 | + | ||
28 | + | ||
29 | + | func getInt (key) = getIntegerValue(this, key) | |
30 | + | ||
31 | + | ||
32 | + | func setInt (key,value) = DataEntry(key, value) | |
33 | + | ||
34 | + | ||
35 | + | func setBytes (key,value) = DataEntry(key, value) | |
36 | + | ||
37 | + | ||
38 | + | func getBytes (key) = getBinaryValue(this, key) | |
39 | + | ||
40 | + | ||
41 | + | func isKeyDefined (key) = if (if (if (isDefined(getBinary(this, key))) | |
42 | + | then true | |
43 | + | else isDefined(getString(this, key))) | |
44 | + | then true | |
45 | + | else isDefined(getBoolean(this, key))) | |
46 | + | then true | |
47 | + | else isDefined(getInteger(this, key)) | |
48 | + | ||
49 | + | ||
50 | + | func toSoldKey (assetId) = (toBase58String(assetId) + "_SOLD") | |
51 | + | ||
52 | + | ||
53 | + | func getSoldAmount (assetId) = getIntOr(toSoldKey(assetId), (extract(assetInfo(assetId)).quantity - assetBalance(this, assetId))) | |
54 | + | ||
55 | + | ||
56 | + | func setSoldAmount (assetId) = setInt(toSoldKey(assetId), getSoldAmount(assetId)) | |
57 | + | ||
58 | + | ||
59 | + | func toBasePriceKey (assetId) = (toBase58String(assetId) + "_BASE_PRICE") | |
60 | + | ||
61 | + | ||
62 | + | func getBasePrice (teamId) = getInt(toBasePriceKey(teamId)) | |
63 | + | ||
64 | + | ||
65 | + | func toOffKey (assetId) = (toBase58String(assetId) + "_OFF") | |
66 | + | ||
67 | + | ||
68 | + | func off (teamId) = setInt(toOffKey(teamId), 1) | |
69 | + | ||
70 | + | ||
71 | + | func isOff (teamId) = getIntOr(toOffKey(teamId), 0) | |
72 | + | ||
73 | + | ||
74 | + | let BALANCESNAPSHOT = "BALANCE_SNAPSHOT" | |
75 | + | ||
76 | + | func getBalanceSnapshot () = getIntOr(BALANCESNAPSHOT, wavesBalance(this)) | |
77 | + | ||
78 | + | ||
79 | + | func setBalanceSnapshot () = setInt(BALANCESNAPSHOT, getBalanceSnapshot()) | |
80 | + | ||
81 | + | ||
82 | + | let PRIZEPOOL = "PRIZE_POOL" | |
83 | + | ||
84 | + | func getPrizePool () = getIntOr(PRIZEPOOL, ((getBalanceSnapshot() * (100 - ligaCommission)) / 100)) | |
85 | + | ||
86 | + | ||
87 | + | func setPrizePool () = setInt(PRIZEPOOL, getPrizePool()) | |
88 | + | ||
89 | + | ||
90 | + | let WINNER = "WINNER" | |
91 | + | ||
92 | + | func getWinner () = getBytes(WINNER) | |
93 | + | ||
94 | + | ||
95 | + | func setWinner (winner) = setBytes(WINNER, winner) | |
96 | + | ||
97 | + | ||
98 | + | let TEAMSLEFT = "TEAMS_LEFT" | |
99 | + | ||
100 | + | func getTeamsLeft () = getIntOr(TEAMSLEFT, totalTeams) | |
101 | + | ||
102 | + | ||
103 | + | func decTeamsLeft () = setInt(TEAMSLEFT, (getTeamsLeft() - 1)) | |
104 | + | ||
105 | + | ||
106 | + | let TEAMCOUNTER = "TEAM_COUNTER" | |
107 | + | ||
108 | + | func getTeamCounter () = getIntOr(TEAMCOUNTER, 0) | |
109 | + | ||
110 | + | ||
111 | + | func incTeamCounter () = setInt(TEAMCOUNTER, (getTeamCounter() + 1)) | |
112 | + | ||
113 | + | ||
114 | + | let BASEPRIZEPOOL = "BASE_PRIZE_POOL" | |
115 | + | ||
116 | + | func getBasePrizePool () = getIntOr(BASEPRIZEPOOL, 0) | |
117 | + | ||
118 | + | ||
119 | + | func addBasePrizePool (value) = setInt(BASEPRIZEPOOL, (getBasePrizePool() + value)) | |
120 | + | ||
121 | + | ||
122 | + | let STAGE1 = 1 | |
123 | + | ||
124 | + | let STAGE2 = 2 | |
125 | + | ||
126 | + | let STAGE31 = 31 | |
127 | + | ||
128 | + | let STAGE32 = 32 | |
129 | + | ||
130 | + | let STAGE33 = 33 | |
131 | + | ||
132 | + | let STAGE4 = 4 | |
133 | + | ||
134 | + | let STAGE = "STAGE" | |
135 | + | ||
136 | + | func stage () = getIntOr(STAGE, STAGE1) | |
137 | + | ||
138 | + | ||
139 | + | func goTo (stage) = setInt(STAGE, stage) | |
140 | + | ||
141 | + | ||
142 | + | @Callable(i) | |
143 | + | func stage2 () = if ((stage() != STAGE1)) | |
144 | + | then throw("Invalid current stage.") | |
145 | + | else if ((eventEndsAtBlock >= height)) | |
146 | + | then throw("Event is not yet finished.") | |
147 | + | else WriteSet([goTo(STAGE2), setBalanceSnapshot()]) | |
148 | + | ||
149 | + | ||
150 | + | ||
151 | + | @Callable(i) | |
152 | + | func stage31 (winner) = if ((stage() != STAGE2)) | |
153 | + | then throw("Invalid current stage.") | |
154 | + | else if ((i.callerPublicKey != oraclePublicKey)) | |
155 | + | then throw("Only oracle could declare the winner.") | |
156 | + | else if (!(isKeyDefined(toBasePriceKey(winner)))) | |
157 | + | then throw("Team is not found.") | |
158 | + | else if (isDefined(toOffKey(winner))) | |
159 | + | then throw("Team that is off cannot be the winner.") | |
160 | + | else WriteSet([goTo(STAGE31), setPrizePool(), setWinner(winner), setSoldAmount(winner)]) | |
161 | + | ||
162 | + | ||
163 | + | ||
164 | + | @Callable(i) | |
165 | + | func stage32 (teamId) = if (if ((stage() != STAGE2)) | |
166 | + | then true | |
167 | + | else (stage() != STAGE32)) | |
168 | + | then throw("Invalid current stage.") | |
169 | + | else if (((eventEndsAtBlock + winnerDeclarationInterval) >= height)) | |
170 | + | then throw("Oracle is still have time to declare a winner.") | |
171 | + | else if (!(isKeyDefined(toBasePriceKey(teamId)))) | |
172 | + | then throw("Team is not found.") | |
173 | + | else if (isDefined(toOffKey(teamId))) | |
174 | + | then throw("Team that is off cannot participate in rollback.") | |
175 | + | else if (isKeyDefined(toSoldKey(teamId))) | |
176 | + | then throw("Team sold amount already set.") | |
177 | + | else WriteSet([goTo(STAGE32), setSoldAmount(teamId), addBasePrizePool((getSoldAmount(teamId) * getBasePrice(teamId))), incTeamCounter()]) | |
178 | + | ||
179 | + | ||
180 | + | ||
181 | + | @Callable(i) | |
182 | + | func stage33 () = if ((stage() != STAGE32)) | |
183 | + | then throw("Invalid current stage.") | |
184 | + | else if ((getTeamCounter() != getTeamsLeft())) | |
185 | + | then throw("There are still teams without sold amount set.") | |
186 | + | else WriteSet([goTo(STAGE33)]) | |
187 | + | ||
188 | + | ||
189 | + | ||
190 | + | @Callable(i) | |
191 | + | func stage4 (recipient) = if ((stage() != STAGE31)) | |
192 | + | then throw("Invalid current stage.") | |
193 | + | else if ((((eventEndsAtBlock + winnerDeclarationInterval) + payoutInterval) >= height)) | |
194 | + | then throw("Payout is not yet finished.") | |
195 | + | else if ((i.callerPublicKey != ligaPublicKey)) | |
196 | + | then throw("Only Liga could set the final stage and hold commission.") | |
197 | + | else ScriptResult(WriteSet([goTo(STAGE4)]), TransferSet([ScriptTransfer(addressFromPublicKey(recipient), wavesBalance(this), unit)])) | |
198 | + | ||
199 | + | ||
200 | + | ||
201 | + | @Callable(i) | |
202 | + | func teamOff (teamId) = if ((stage() != STAGE1)) | |
203 | + | then throw("Invalid current stage.") | |
204 | + | else if ((i.callerPublicKey != oraclePublicKey)) | |
205 | + | then throw("Only oracle could drop teams out off the game.") | |
206 | + | else if (!(isKeyDefined(toBasePriceKey(teamId)))) | |
207 | + | then throw("Team is not found.") | |
208 | + | else if (isKeyDefined(toOffKey(teamId))) | |
209 | + | then throw("Team is already off") | |
210 | + | else if ((getTeamsLeft() == 1)) | |
211 | + | then throw("There is only 1 team left.") | |
212 | + | else WriteSet([off(teamId), decTeamsLeft()]) | |
213 | + | ||
214 | + | ||
215 | + | ||
216 | + | @Callable(i) | |
217 | + | func rollback () = if ((stage() != STAGE33)) | |
218 | + | then throw("Invalid current stage.") | |
219 | + | else { | |
220 | + | let payment = extract(i.payment) | |
221 | + | let teamId = extract(payment.assetId) | |
222 | + | if (!(isKeyDefined(toBasePriceKey(teamId)))) | |
223 | + | then throw("Team is not found.") | |
224 | + | else if (isKeyDefined(toOffKey(teamId))) | |
225 | + | then throw("You cannot receive rollback for an off team") | |
226 | + | else { | |
227 | + | let soldAmount = getSoldAmount(teamId) | |
228 | + | let rollback = (((getBalanceSnapshot() * getBasePrizePool()) * payment.amount) / ((getBasePrice(teamId) * soldAmount) * soldAmount)) | |
229 | + | TransferSet([ScriptTransfer(i.caller, rollback, unit)]) | |
230 | + | } | |
231 | + | } | |
232 | + | ||
233 | + | ||
234 | + | ||
235 | + | @Callable(i) | |
236 | + | func payout () = if ((stage() != STAGE31)) | |
237 | + | then throw("Invalid current stage.") | |
238 | + | else { | |
239 | + | let payment = extract(i.payment) | |
240 | + | if ((payment.assetId != getWinner())) | |
241 | + | then throw("You are allowed to get payout for the winner tokens only.") | |
242 | + | else { | |
243 | + | let payout = ((getPrizePool() * payment.amount) / getSoldAmount(getWinner())) | |
244 | + | TransferSet([ScriptTransfer(i.caller, payout, unit)]) | |
245 | + | } | |
246 | + | } | |
247 | + | ||
248 | + | ||
249 | + | @Verifier(x) | |
250 | + | func verifier () = match x { | |
251 | + | case o: Order => | |
252 | + | sigVerify(o.bodyBytes, o.proofs[0], eventPublicKey) | |
253 | + | case l: LeaseTransaction => | |
254 | + | if (if ((stage() == STAGE1)) | |
255 | + | then (l.recipient == addressFromPublicKey(leaseNodePublicKey)) | |
256 | + | else false) | |
257 | + | then (l.amount > (100 * waves)) | |
258 | + | else false | |
259 | + | case cl: LeaseCancelTransaction => | |
260 | + | (stage() != STAGE1) | |
261 | + | case cl: TransferTransaction => | |
262 | + | true | |
263 | + | case _ => | |
264 | + | false | |
265 | + | } | |
266 | + |
github/deemru/w8io/169f3d6 22.82 ms ◑