tx · AVTTH5g64cNh2iNmkqicgDAAyHWLQd1SvYH9jCPzPMF9 3MsVUgmBTsP5N16iqnjLLnNdB5hYJ46fhGn: -0.01000000 Waves 2019.09.11 15:54 [671483] smart account 3MsVUgmBTsP5N16iqnjLLnNdB5hYJ46fhGn > SELF 0.00000000 Waves
{ "type": 13, "id": "AVTTH5g64cNh2iNmkqicgDAAyHWLQd1SvYH9jCPzPMF9", "fee": 1000000, "feeAssetId": null, "timestamp": 1568206474869, "version": 1, "sender": "3MsVUgmBTsP5N16iqnjLLnNdB5hYJ46fhGn", "senderPublicKey": "4TPZmyUTuvEvB72vzdtfYiP5oLiZQ12XqZRvR2jZ87bQ", "proofs": [ "4nPUXQyhppnbmfTN6689VEKPtP6rzpXrqdN7nfNsXakWEiFuLaLyKSH3CVbfqsSZeS9AmPa9PkYYNqMKBPs8ADyL" ], "script": "base64:AAIDAAAAAAAAAAAAAAAYAAAAABFtYW5hZ2VtZW50QWRkcmVzcwEAAAAaAVSR0Glm5RV2vSTuw/esP/dhGqUlN6o1Z3UAAAAACWNvbGRWYXVsdAkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTjNENVJTR3FoZVpqcEtiN0JXNDE3Rjk5WTVUc2Z4WlVjQwAAAAAFdG9rZW4BAAAAIHuUzbcO77uU8qJWzE7jDTdWZj0ND8wk2cHhDMBfGZPvAAAAAAl0b2tlblJhdGUAAAAAAAAAAAIAAAAAE3Rva2VuRGVjaW1hbHNPZmZzZXQJAABsAAAABgAAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAkBAAAAAlVwAAAAAAAAAAANaGFyZENhcFRva2VucwAAAAAAO5rKAAAAAAASbWluSW52ZXN0bWVudFdhdmVzAAAAAAAL68IAAAAAABJtYXhJbnZlc3RtZW50V2F2ZXMAAAAAAB3NZQAAAAAAEGFsbG93RGF0ZXNDaGFuZ2UGAAAAAAlzd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dGUDCQAAZwAAAAIJAQAAAApnZXRUaW1lTm93AAAAAAUAAAAKbmV3RW5kVGltZQkAAAIAAAABAgAAABtDYW5ub3Qgc2V0IGVuZCB0aW1lIHRvIHBhc3QJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAACXN0YXJ0VGltZQUAAAAMbmV3U3RhcnRUaW1lCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAdlbmRUaW1lBQAAAApuZXdFbmRUaW1lBQAAAANuaWwAAAABaQEAAAAQc2V0TWluSW52ZXN0bWVudAAAAAEAAAAIbmV3VmFsdWUDCQEAAAABIQAAAAEJAQAAAAtvbmx5TWFuYWdlcgAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMJAAACAAAAAQIAAAAXT25seSBmb3IgYWRtaW5pc3RyYXRpb24JAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAADW1pbkludmVzdG1lbnQFAAAACG5ld1ZhbHVlBQAAAANuaWwAAAABaQEAAAAQc2V0TWF4SW52ZXN0bWVudAAAAAEAAAAIbmV3VmFsdWUDCQEAAAABIQAAAAEJAQAAAAtvbmx5TWFuYWdlcgAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMJAAACAAAAAQIAAAAXT25seSBmb3IgYWRtaW5pc3RyYXRpb24JAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAADW1heEludmVzdG1lbnQFAAAACG5ld1ZhbHVlBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAAB9hmcjQ=", "chainId": 84, "height": 671483, "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 managementAddress = base58'3N3D5RSGqheZjpKb7BW417F99Y5TsfxZUcC' | |
5 | + | ||
6 | + | let coldVault = extract(addressFromString("3N3D5RSGqheZjpKb7BW417F99Y5TsfxZUcC")) | |
7 | + | ||
8 | + | let token = base58'9KQkUBh4KUbLQ3yhExg3ZbtC7brabRdga9qAihDCBGxW' | |
9 | + | ||
10 | + | let tokenRate = 2 | |
11 | + | ||
12 | + | let tokenDecimalsOffset = pow(10, 0, 8, 0, 0, Up()) | |
13 | + | ||
14 | + | let hardCapTokens = 1000000000 | |
15 | + | ||
16 | + | let minInvestmentWaves = 200000000 | |
17 | + | ||
18 | + | let maxInvestmentWaves = 500000000 | |
19 | + | ||
20 | + | let allowDatesChange = true | |
21 | + | ||
22 | + | let startTime = 1568206980 | |
23 | + | ||
24 | + | let endTime = 1568207400 | |
25 | + | ||
26 | + | let wavesDecimals = pow(10, 0, 8, 0, 0, Up()) | |
27 | + | ||
28 | + | func onlyManager (callerBytes) = { | |
29 | + | let caller = toBase58String(callerBytes) | |
30 | + | let managementAddressString = toBase58String(managementAddress) | |
31 | + | if ((caller != managementAddressString)) | |
32 | + | then false | |
33 | + | else true | |
34 | + | } | |
35 | + | ||
36 | + | ||
37 | + | func getTimeNow () = { | |
38 | + | let blockInfo = value(blockInfoByHeight(height)) | |
39 | + | (blockInfo.timestamp / 1000) | |
40 | + | } | |
41 | + | ||
42 | + | ||
43 | + | func getStartTime () = { | |
44 | + | let dataStartTime = getInteger(this, "startTime") | |
45 | + | match dataStartTime { | |
46 | + | case changedStartTime: Int => | |
47 | + | changedStartTime | |
48 | + | case notChanged: Unit => | |
49 | + | startTime | |
50 | + | case _ => | |
51 | + | throw() | |
52 | + | } | |
53 | + | } | |
54 | + | ||
55 | + | ||
56 | + | func getEndTime () = { | |
57 | + | let dataEndTime = getInteger(this, "endTime") | |
58 | + | match dataEndTime { | |
59 | + | case changedEndTime: Int => | |
60 | + | changedEndTime | |
61 | + | case notChanged: Unit => | |
62 | + | endTime | |
63 | + | case _ => | |
64 | + | throw() | |
65 | + | } | |
66 | + | } | |
67 | + | ||
68 | + | ||
69 | + | func hasStarted () = if ((getTimeNow() > getStartTime())) | |
70 | + | then true | |
71 | + | else false | |
72 | + | ||
73 | + | ||
74 | + | func hasEnded () = if ((getTimeNow() > getEndTime())) | |
75 | + | then true | |
76 | + | else false | |
77 | + | ||
78 | + | ||
79 | + | func hasFinished () = { | |
80 | + | let isFinalized = getBoolean(this, "finalized") | |
81 | + | match isFinalized { | |
82 | + | case dataFinalized: Boolean => | |
83 | + | dataFinalized | |
84 | + | case notFinalized: Unit => | |
85 | + | false | |
86 | + | case _ => | |
87 | + | throw() | |
88 | + | } | |
89 | + | } | |
90 | + | ||
91 | + | ||
92 | + | func getWavesRaised () = { | |
93 | + | let wavesRaised = getInteger(this, "wavesRaised") | |
94 | + | match wavesRaised { | |
95 | + | case waves: Int => | |
96 | + | waves | |
97 | + | case emptyState: Unit => | |
98 | + | 0 | |
99 | + | case _ => | |
100 | + | throw() | |
101 | + | } | |
102 | + | } | |
103 | + | ||
104 | + | ||
105 | + | func checkInvestorInPage (address,page) = { | |
106 | + | let whitelistPageKey = ("whitelistedInvestors-" + toString(page)) | |
107 | + | let whitelistPage = getString(this, whitelistPageKey) | |
108 | + | match whitelistPage { | |
109 | + | case pageString: String => | |
110 | + | let addressPosition = indexOf(pageString, address) | |
111 | + | match addressPosition { | |
112 | + | case pos: Int => | |
113 | + | true | |
114 | + | case empty: Unit => | |
115 | + | false | |
116 | + | case _ => | |
117 | + | throw() | |
118 | + | } | |
119 | + | case emptyPage: Unit => | |
120 | + | false | |
121 | + | case _ => | |
122 | + | throw() | |
123 | + | } | |
124 | + | } | |
125 | + | ||
126 | + | ||
127 | + | func checkInvestorInAllPages (address) = if (checkInvestorInPage(address, 0)) | |
128 | + | then true | |
129 | + | else if (checkInvestorInPage(address, 1)) | |
130 | + | then true | |
131 | + | else if (checkInvestorInPage(address, 2)) | |
132 | + | then true | |
133 | + | else if (checkInvestorInPage(address, 3)) | |
134 | + | then true | |
135 | + | else if (checkInvestorInPage(address, 4)) | |
136 | + | then true | |
137 | + | else if (checkInvestorInPage(address, 5)) | |
138 | + | then true | |
139 | + | else if (checkInvestorInPage(address, 6)) | |
140 | + | then true | |
141 | + | else if (checkInvestorInPage(address, 7)) | |
142 | + | then true | |
143 | + | else if (checkInvestorInPage(address, 8)) | |
144 | + | then true | |
145 | + | else if (checkInvestorInPage(address, 9)) | |
146 | + | then true | |
147 | + | else false | |
148 | + | ||
149 | + | ||
150 | + | func getMinInvestment () = { | |
151 | + | let dataMinInvestment = getInteger(this, "minInvestment") | |
152 | + | match dataMinInvestment { | |
153 | + | case changedMinInvestment: Int => | |
154 | + | changedMinInvestment | |
155 | + | case notChanged: Unit => | |
156 | + | minInvestmentWaves | |
157 | + | case _ => | |
158 | + | throw() | |
159 | + | } | |
160 | + | } | |
161 | + | ||
162 | + | ||
163 | + | func getMaxInvestment () = { | |
164 | + | let dataMaxInvestment = getInteger(this, "maxInvestment") | |
165 | + | match dataMaxInvestment { | |
166 | + | case changedMaxInvestment: Int => | |
167 | + | changedMaxInvestment | |
168 | + | case notChanged: Unit => | |
169 | + | maxInvestmentWaves | |
170 | + | case _ => | |
171 | + | throw() | |
172 | + | } | |
173 | + | } | |
174 | + | ||
175 | + | ||
176 | + | @Callable(i) | |
177 | + | func buyTokens () = { | |
178 | + | let investorAddress = toBase58String(i.caller.bytes) | |
179 | + | let sendedAmount = extract(i.payment).amount | |
180 | + | if ((0 >= sendedAmount)) | |
181 | + | then throw("Cannot accept zero value payments") | |
182 | + | else if ((getMinInvestment() > sendedAmount)) | |
183 | + | then throw("Attached payment is below minimal price") | |
184 | + | else if ((sendedAmount > getMaxInvestment())) | |
185 | + | then throw("Attached payment is above maximum price") | |
186 | + | else if (!(hasStarted())) | |
187 | + | then throw("STO time is not started yet") | |
188 | + | else if (hasFinished()) | |
189 | + | then throw("STO is finalized") | |
190 | + | else if (hasEnded()) | |
191 | + | then throw("STO time is already ended") | |
192 | + | else { | |
193 | + | let wavesRaised = getWavesRaised() | |
194 | + | let wavesOffset = (wavesDecimals / tokenDecimalsOffset) | |
195 | + | let hardCapWaves = ((hardCapTokens / tokenRate) * wavesOffset) | |
196 | + | let updatedWavesRaised = (wavesRaised + sendedAmount) | |
197 | + | if ((updatedWavesRaised > hardCapWaves)) | |
198 | + | then throw("Attached payment overflows hardcap") | |
199 | + | else { | |
200 | + | let tokenAmountRaw = (sendedAmount * tokenRate) | |
201 | + | if ((wavesOffset > tokenAmountRaw)) | |
202 | + | then throw("Attached payment is too low to buy unit of token") | |
203 | + | else { | |
204 | + | let tokenAmount = (tokenAmountRaw / wavesOffset) | |
205 | + | ScriptResult(WriteSet([DataEntry("wavesRaised", updatedWavesRaised)]), TransferSet([ScriptTransfer(coldVault, sendedAmount, unit), ScriptTransfer(i.caller, tokenAmount, token)])) | |
206 | + | } | |
207 | + | } | |
208 | + | } | |
209 | + | } | |
210 | + | ||
211 | + | ||
212 | + | ||
213 | + | @Callable(i) | |
214 | + | func finalize () = if (!(onlyManager(i.caller.bytes))) | |
215 | + | then throw("Only for administration") | |
216 | + | else if (hasFinished()) | |
217 | + | then throw("Already finalized") | |
218 | + | else if (hasEnded()) | |
219 | + | then WriteSet([DataEntry("finalized", true)]) | |
220 | + | else throw("STO not finished yet") | |
221 | + | ||
222 | + | ||
223 | + | ||
224 | + | @Callable(i) | |
225 | + | func setStartTime (newStartTime) = if (!(onlyManager(i.caller.bytes))) | |
226 | + | then throw("Only for administration") | |
227 | + | else if (!(allowDatesChange)) | |
228 | + | then throw("changing dates is not supported") | |
229 | + | else if ((getTimeNow() >= newStartTime)) | |
230 | + | then throw("Cannot set time to past") | |
231 | + | else if ((newStartTime > getEndTime())) | |
232 | + | then throw("Start date must be lower than end date") | |
233 | + | else WriteSet([DataEntry("startTime", newStartTime)]) | |
234 | + | ||
235 | + | ||
236 | + | ||
237 | + | @Callable(i) | |
238 | + | func setEndTime (newEndTime) = if (!(onlyManager(i.caller.bytes))) | |
239 | + | then throw("Only for administration") | |
240 | + | else if (!(allowDatesChange)) | |
241 | + | then throw("changing dates is not supported") | |
242 | + | else if ((getTimeNow() >= newEndTime)) | |
243 | + | then throw("Cannot set time to past") | |
244 | + | else if ((getStartTime() > newEndTime)) | |
245 | + | then throw("End date must be higher than start date") | |
246 | + | else WriteSet([DataEntry("endTime", newEndTime)]) | |
247 | + | ||
248 | + | ||
249 | + | ||
250 | + | @Callable(i) | |
251 | + | func setStartAndEndTimes (newStartTime,newEndTime) = if (!(onlyManager(i.caller.bytes))) | |
252 | + | then throw("Only for administration") | |
253 | + | else if (!(allowDatesChange)) | |
254 | + | then throw("changing dates is not supported") | |
255 | + | else if ((getTimeNow() >= newStartTime)) | |
256 | + | then throw("Cannot set start time to past") | |
257 | + | else if ((newStartTime > newEndTime)) | |
258 | + | then throw("Start date must be lower than end date") | |
259 | + | else if ((getTimeNow() >= newEndTime)) | |
260 | + | then throw("Cannot set end time to past") | |
261 | + | else WriteSet([DataEntry("startTime", newStartTime), DataEntry("endTime", newEndTime)]) | |
262 | + | ||
263 | + | ||
264 | + | ||
265 | + | @Callable(i) | |
266 | + | func setMinInvestment (newValue) = if (!(onlyManager(i.caller.bytes))) | |
267 | + | then throw("Only for administration") | |
268 | + | else WriteSet([DataEntry("minInvestment", newValue)]) | |
269 | + | ||
270 | + | ||
271 | + | ||
272 | + | @Callable(i) | |
273 | + | func setMaxInvestment (newValue) = if (!(onlyManager(i.caller.bytes))) | |
274 | + | then throw("Only for administration") | |
275 | + | else WriteSet([DataEntry("maxInvestment", newValue)]) | |
276 | + | ||
277 | + | ||
278 | + | @Verifier(tx) | |
279 | + | func verify () = false | |
280 | + |
github/deemru/w8io/026f985 18.45 ms ◑