tx · fwcoJQneuWQ2tAkjXEXon2TYLw3g97pEyp66tfyJrkd

3N25UaYqxNPVPBucyyzgA7g7WLtndY8UyrS:  -0.01000000 Waves

2019.07.19 17:58 [592918] smart account 3N25UaYqxNPVPBucyyzgA7g7WLtndY8UyrS > SELF 0.00000000 Waves

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

github/deemru/w8io/169f3d6 
19.00 ms