tx · 5j2Ft6iXyMmmLwatgHPgQCRVd7vA4TcUfBXdjwS6noFX

3Mrcd5V4by5mqq1rcZjBdMCYxwo37TpAtxP:  -0.01400000 Waves

2019.09.22 01:58 [686712] smart account 3Mrcd5V4by5mqq1rcZjBdMCYxwo37TpAtxP > SELF 0.00000000 Waves

{ "type": 13, "id": "5j2Ft6iXyMmmLwatgHPgQCRVd7vA4TcUfBXdjwS6noFX", "fee": 1400000, "feeAssetId": null, "timestamp": 1569106688373, "version": 1, "sender": "3Mrcd5V4by5mqq1rcZjBdMCYxwo37TpAtxP", "senderPublicKey": "AQfAEineEN1RXA9QHVe6dr6rrRzjqGJfvmJjeCnQ4bJu", "proofs": [ "njaWryK2v16ApzhRo1yRVEgJ1AEpnD74VZkhyoBSSd3YhHf8U9tpJAwAF5Pk9av3WsXwkKP5yCu3KDG17Hh2bPN" ], "script": null, "chainId": 84, "height": 686712, "spentComplexity": 0 } View: original | compacted Prev: B5HtFZB2RN5TMT6JcKtDm1wmMJKXWygBSk4n3yLFEuEt Next: 7vgyYYVhtNumdiTP1VDLGF9sZ7fWxZaGo8Misr4pheiq Full:
OldNewDifferences
1-{-# STDLIB_VERSION 3 #-}
2-{-# SCRIPT_TYPE ACCOUNT #-}
3-{-# CONTENT_TYPE DAPP #-}
4-let managementAddress = base58'3Mrcd5V4by5mqq1rcZjBdMCYxwo37TpAtxP'
5-
6-let coldVault = extract(addressFromString("3MsR4PdRDNeh4JzepHX1Xw5YeQp1iPoueo7"))
7-
8-let token = base58'FGZTpAqL2wwfXwFRX32tAeD88Uaw8LSt3DPS312XodHZ'
9-
10-let tokenRate = 1000
11-
12-let tokenDecimalsOffset = pow(10, 0, 8, 0, 0, Up())
13-
14-let softCapWaves = 1000000
15-
16-let hardCapTokens = 10000
17-
18-let minInvestmentWaves = 1
19-
20-let maxInvestmentWaves = 100
21-
22-let allowDatesChange = true
23-
24-let startTime = 1563271860
25-
26-let endTime = 1609395060
27-
28-let wavesDecimals = pow(10, 0, 8, 0, 0, Up())
29-
30-func onlyManager (callerBytes) = {
31- let caller = toBase58String(callerBytes)
32- let managementAddressString = toBase58String(managementAddress)
33- if ((caller != managementAddressString))
34- then false
35- else true
36- }
37-
38-
39-func getTimeNow () = {
40- let blockInfo = value(blockInfoByHeight(height))
41- (blockInfo.timestamp / 1000)
42- }
43-
44-
45-func getStartTime () = {
46- let dataStartTime = getInteger(this, "startTime")
47- match dataStartTime {
48- case changedStartTime: Int =>
49- changedStartTime
50- case notChanged: Unit =>
51- startTime
52- case _ =>
53- throw()
54- }
55- }
56-
57-
58-func getEndTime () = {
59- let dataEndTime = getInteger(this, "endTime")
60- match dataEndTime {
61- case changedEndTime: Int =>
62- changedEndTime
63- case notChanged: Unit =>
64- endTime
65- case _ =>
66- throw()
67- }
68- }
69-
70-
71-func hasStarted () = if ((getTimeNow() > getStartTime()))
72- then true
73- else false
74-
75-
76-func hasEnded () = if ((getTimeNow() > getEndTime()))
77- then true
78- else false
79-
80-
81-func hasFinished () = {
82- let isFinalized = getBoolean(this, "finalized")
83- match isFinalized {
84- case dataFinalized: Boolean =>
85- dataFinalized
86- case notFinalized: Unit =>
87- false
88- case _ =>
89- throw()
90- }
91- }
92-
93-
94-func getWavesRaised () = {
95- let wavesRaised = getInteger(this, "wavesRaised")
96- match wavesRaised {
97- case waves: Int =>
98- waves
99- case emptyState: Unit =>
100- 0
101- case _ =>
102- throw()
103- }
104- }
105-
106-
107-func checkInvestorInPage (address,page) = {
108- let whitelistPageKey = ("whitelistedInvestors-" + toString(page))
109- let whitelistPage = getString(this, whitelistPageKey)
110- match whitelistPage {
111- case pageString: String =>
112- let addressPosition = indexOf(pageString, address)
113- match addressPosition {
114- case pos: Int =>
115- true
116- case empty: Unit =>
117- false
118- case _ =>
119- throw()
120- }
121- case emptyPage: Unit =>
122- false
123- case _ =>
124- throw()
125- }
126- }
127-
128-
129-func checkInvestorInAllPages (address) = if (checkInvestorInPage(address, 0))
130- then true
131- else if (checkInvestorInPage(address, 1))
132- then true
133- else if (checkInvestorInPage(address, 2))
134- then true
135- else if (checkInvestorInPage(address, 3))
136- then true
137- else if (checkInvestorInPage(address, 4))
138- then true
139- else if (checkInvestorInPage(address, 5))
140- then true
141- else if (checkInvestorInPage(address, 6))
142- then true
143- else if (checkInvestorInPage(address, 7))
144- then true
145- else if (checkInvestorInPage(address, 8))
146- then true
147- else if (checkInvestorInPage(address, 9))
148- then true
149- else false
150-
151-
152-func getMinInvestment () = {
153- let dataMinInvestment = getInteger(this, "minInvestment")
154- match dataMinInvestment {
155- case changedMinInvestment: Int =>
156- changedMinInvestment
157- case notChanged: Unit =>
158- minInvestmentWaves
159- case _ =>
160- throw()
161- }
162- }
163-
164-
165-func getMaxInvestment () = {
166- let dataMaxInvestment = getInteger(this, "maxInvestment")
167- match dataMaxInvestment {
168- case changedMaxInvestment: Int =>
169- changedMaxInvestment
170- case notChanged: Unit =>
171- maxInvestmentWaves
172- case _ =>
173- throw()
174- }
175- }
176-
177-
178-
1+# no script

github/deemru/w8io/169f3d6 
39.57 ms