tx · 3gQyqyUnEdhpyv9VE3e5Q9LNKqKugD32xKNA5Y2aPEWY 3MpVMeLPRKXUx8qvs8RB84954kHsydqxvx2: -0.01000000 Waves 2019.09.06 15:59 [664229] smart account 3MpVMeLPRKXUx8qvs8RB84954kHsydqxvx2 > SELF 0.00000000 Waves
{ "type": 13, "id": "3gQyqyUnEdhpyv9VE3e5Q9LNKqKugD32xKNA5Y2aPEWY", "fee": 1000000, "feeAssetId": null, "timestamp": 1567774819719, "version": 1, "sender": "3MpVMeLPRKXUx8qvs8RB84954kHsydqxvx2", "senderPublicKey": "7D6wMRkkX1dyWNZ2pd2Nv4xrxEJufmv7mZgT7DaCDoxs", "proofs": [ "yXAMDhr7LT8uyih8mKa9jxg44ddoKvkENT9UT8wuHcEk5bjTKYrWQDhJTr7onmAMDtYtSMnUEn2Je2qUULbhjxn" ], "script": "base64:AAIDAAAAAAAAAAAAAAAUAAAAABFtYW5hZ2VtZW50QWRkcmVzcwEAAAAaAVRWq/xGXXE+uAIeE9mbCXcl4gfVk9UGtGwAAAAACWNvbGRWYXVsdAkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTXdwTXZCQmtUQThoYTlhcm1XamtueTRTQVdBVHN0dFpDNwAAAAAFdG9rZW4BAAAAIP+mMa4d9pBYN0zdAxE0tZ37Ugc8V3jIOaYnAN7WfG2GAAAAAAl0b2tlblJhdGUAAAAAAAAAAAEAAAAAE3Rva2VuRGVjaW1hbHNPZmZzZXQJAABsAAAABgAAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAkBAAAAAlVwAAAAAAAAAAANaGFyZENhcFRva2VucwAAAAAABfXhAAAAAAAQYWxsb3dEYXRlc0NoYW5nZQcAAAAACXN0YXJ0VGltZQAAAAAAXXJb1AAAAAAHZW5kVGltZQAAAAAAXXtakAAAAAANd2F2ZXNEZWNpbWFscwkAAGwAAAAGAAAAAAAA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W1lIHRvIHBhc3QJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAACXN0YXJ0VGltZQUAAAAMbmV3U3RhcnRUaW1lCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAdlbmRUaW1lBQAAAApuZXdFbmRUaW1lBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAAB3GW2bU=", "chainId": 84, "height": 664229, "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 a = base58'3MwpMvBBkTA8ha9armWjkny4SAWATsttZC7' | |
5 | + | ||
6 | + | let b = extract(addressFromString("3MwpMvBBkTA8ha9armWjkny4SAWATsttZC7")) | |
7 | + | ||
8 | + | let c = base58'JCwwrg8AcmDk2dX58N4UhRErvRC6cnkFgvzYYhNcP1nM' | |
9 | + | ||
10 | + | let d = 1 | |
11 | + | ||
12 | + | let e = pow(10, 0, 8, 0, 0, Up()) | |
13 | + | ||
14 | + | let f = 100000000 | |
15 | + | ||
16 | + | let g = false | |
17 | + | ||
18 | + | let h = 1567775700 | |
19 | + | ||
20 | + | let i = 1568365200 | |
21 | + | ||
22 | + | let j = pow(10, 0, 8, 0, 0, Up()) | |
23 | + | ||
24 | + | func k (l) = { | |
25 | + | let m = toBase58String(l) | |
26 | + | let n = toBase58String(a) | |
27 | + | if ((m != n)) | |
28 | + | then false | |
29 | + | else true | |
30 | + | } | |
31 | + | ||
32 | + | ||
33 | + | func o () = { | |
34 | + | let p = value(blockInfoByHeight(height)) | |
35 | + | (p.timestamp / 1000) | |
36 | + | } | |
37 | + | ||
38 | + | ||
39 | + | func q () = { | |
40 | + | let r = getInteger(this, "startTime") | |
41 | + | let s = r | |
42 | + | if ($isInstanceOf(s, "Int")) | |
43 | + | then { | |
44 | + | let t = s | |
45 | + | t | |
46 | + | } | |
47 | + | else if ($isInstanceOf(s, "Unit")) | |
48 | + | then { | |
49 | + | let u = s | |
50 | + | h | |
51 | + | } | |
52 | + | else throw() | |
53 | + | } | |
54 | + | ||
55 | + | ||
56 | + | func v () = { | |
57 | + | let w = getInteger(this, "endTime") | |
58 | + | let s = w | |
59 | + | if ($isInstanceOf(s, "Int")) | |
60 | + | then { | |
61 | + | let x = s | |
62 | + | x | |
63 | + | } | |
64 | + | else if ($isInstanceOf(s, "Unit")) | |
65 | + | then { | |
66 | + | let u = s | |
67 | + | i | |
68 | + | } | |
69 | + | else throw() | |
70 | + | } | |
71 | + | ||
72 | + | ||
73 | + | func y () = if ((o() > q())) | |
74 | + | then true | |
75 | + | else false | |
76 | + | ||
77 | + | ||
78 | + | func z () = if ((o() > v())) | |
79 | + | then true | |
80 | + | else false | |
81 | + | ||
82 | + | ||
83 | + | func A () = { | |
84 | + | let B = getBoolean(this, "finalized") | |
85 | + | let s = B | |
86 | + | if ($isInstanceOf(s, "Boolean")) | |
87 | + | then { | |
88 | + | let C = s | |
89 | + | C | |
90 | + | } | |
91 | + | else if ($isInstanceOf(s, "Unit")) | |
92 | + | then { | |
93 | + | let D = s | |
94 | + | false | |
95 | + | } | |
96 | + | else throw() | |
97 | + | } | |
98 | + | ||
99 | + | ||
100 | + | func E () = { | |
101 | + | let F = getInteger(this, "wavesRaised") | |
102 | + | let s = F | |
103 | + | if ($isInstanceOf(s, "Int")) | |
104 | + | then { | |
105 | + | let G = s | |
106 | + | G | |
107 | + | } | |
108 | + | else if ($isInstanceOf(s, "Unit")) | |
109 | + | then { | |
110 | + | let H = s | |
111 | + | 0 | |
112 | + | } | |
113 | + | else throw() | |
114 | + | } | |
115 | + | ||
116 | + | ||
117 | + | func I (J,K) = { | |
118 | + | let L = ("whitelistedInvestors-" + toString(K)) | |
119 | + | let M = getString(this, L) | |
120 | + | let s = M | |
121 | + | if ($isInstanceOf(s, "String")) | |
122 | + | then { | |
123 | + | let N = s | |
124 | + | let O = indexOf(N, J) | |
125 | + | let P = O | |
126 | + | if ($isInstanceOf(P, "Int")) | |
127 | + | then { | |
128 | + | let Q = P | |
129 | + | true | |
130 | + | } | |
131 | + | else if ($isInstanceOf(P, "Unit")) | |
132 | + | then { | |
133 | + | let R = P | |
134 | + | false | |
135 | + | } | |
136 | + | else throw() | |
137 | + | } | |
138 | + | else if ($isInstanceOf(s, "Unit")) | |
139 | + | then { | |
140 | + | let S = s | |
141 | + | false | |
142 | + | } | |
143 | + | else throw() | |
144 | + | } | |
145 | + | ||
146 | + | ||
147 | + | func T (J) = if (I(J, 0)) | |
148 | + | then true | |
149 | + | else if (I(J, 1)) | |
150 | + | then true | |
151 | + | else if (I(J, 2)) | |
152 | + | then true | |
153 | + | else if (I(J, 3)) | |
154 | + | then true | |
155 | + | else if (I(J, 4)) | |
156 | + | then true | |
157 | + | else if (I(J, 5)) | |
158 | + | then true | |
159 | + | else if (I(J, 6)) | |
160 | + | then true | |
161 | + | else if (I(J, 7)) | |
162 | + | then true | |
163 | + | else if (I(J, 8)) | |
164 | + | then true | |
165 | + | else if (I(J, 9)) | |
166 | + | then true | |
167 | + | else false | |
168 | + | ||
169 | + | ||
170 | + | @Callable(U) | |
171 | + | func buyTokens () = { | |
172 | + | let V = toBase58String(U.caller.bytes) | |
173 | + | let W = extract(U.payment).amount | |
174 | + | if ((0 >= W)) | |
175 | + | then throw("Cannot accept zero value payments") | |
176 | + | else if (!(y())) | |
177 | + | then throw("STO time is not started yet") | |
178 | + | else if (A()) | |
179 | + | then throw("STO is finalized") | |
180 | + | else if (z()) | |
181 | + | then throw("STO time is already ended") | |
182 | + | else { | |
183 | + | let F = E() | |
184 | + | let X = (j / e) | |
185 | + | let Y = ((f / d) * X) | |
186 | + | let Z = (F + W) | |
187 | + | if ((Z > Y)) | |
188 | + | then throw("Attached payment overflows hardcap") | |
189 | + | else { | |
190 | + | let aa = (W * d) | |
191 | + | if ((X > aa)) | |
192 | + | then throw("Attached payment is too low to buy unit of token") | |
193 | + | else { | |
194 | + | let ab = (aa / X) | |
195 | + | ScriptResult(WriteSet([DataEntry("wavesRaised", Z)]), TransferSet([ScriptTransfer(b, W, unit), ScriptTransfer(U.caller, ab, c)])) | |
196 | + | } | |
197 | + | } | |
198 | + | } | |
199 | + | } | |
200 | + | ||
201 | + | ||
202 | + | ||
203 | + | @Callable(U) | |
204 | + | func finalize () = if (!(k(U.caller.bytes))) | |
205 | + | then throw("Only for administration") | |
206 | + | else if (A()) | |
207 | + | then throw("Already finalized") | |
208 | + | else if (z()) | |
209 | + | then WriteSet([DataEntry("finalized", true)]) | |
210 | + | else throw("STO not finished yet") | |
211 | + | ||
212 | + | ||
213 | + | ||
214 | + | @Callable(U) | |
215 | + | func setStartTime (ac) = if (!(k(U.caller.bytes))) | |
216 | + | then throw("Only for administration") | |
217 | + | else if (!(g)) | |
218 | + | then throw("changing dates is not supported") | |
219 | + | else if ((o() >= ac)) | |
220 | + | then throw("Cannot set time to past") | |
221 | + | else if ((ac > v())) | |
222 | + | then throw("Start date must be lower than end date") | |
223 | + | else WriteSet([DataEntry("startTime", ac)]) | |
224 | + | ||
225 | + | ||
226 | + | ||
227 | + | @Callable(U) | |
228 | + | func setEndTime (ad) = if (!(k(U.caller.bytes))) | |
229 | + | then throw("Only for administration") | |
230 | + | else if (!(g)) | |
231 | + | then throw("changing dates is not supported") | |
232 | + | else if ((o() >= ad)) | |
233 | + | then throw("Cannot set time to past") | |
234 | + | else if ((q() > ad)) | |
235 | + | then throw("End date must be higher than start date") | |
236 | + | else WriteSet([DataEntry("endTime", ad)]) | |
237 | + | ||
238 | + | ||
239 | + | ||
240 | + | @Callable(U) | |
241 | + | func setStartAndEndTimes (ac,ad) = if (!(k(U.caller.bytes))) | |
242 | + | then throw("Only for administration") | |
243 | + | else if (!(g)) | |
244 | + | then throw("changing dates is not supported") | |
245 | + | else if ((o() >= ac)) | |
246 | + | then throw("Cannot set start time to past") | |
247 | + | else if ((ac > ad)) | |
248 | + | then throw("Start date must be lower than end date") | |
249 | + | else if ((o() >= ad)) | |
250 | + | then throw("Cannot set end time to past") | |
251 | + | else WriteSet([DataEntry("startTime", ac), DataEntry("endTime", ad)]) | |
252 | + | ||
253 | + | ||
254 | + | @Verifier(ae) | |
255 | + | func af () = false | |
256 | + |
github/deemru/w8io/026f985 20.69 ms ◑