tx · 3EcZWqu7iEEaVHzGkjCMY3qi2ELwrrB6uWEDGJn4cfRP 3Mz8m8aoVjCnGfFAH9XfmfEDBWAztdj1EPN: -0.01000000 Waves 2019.08.25 17:38 [646815] smart account 3Mz8m8aoVjCnGfFAH9XfmfEDBWAztdj1EPN > SELF 0.00000000 Waves
{ "type": 13, "id": "3EcZWqu7iEEaVHzGkjCMY3qi2ELwrrB6uWEDGJn4cfRP", "fee": 1000000, "feeAssetId": null, "timestamp": 1566743944123, "version": 1, "sender": "3Mz8m8aoVjCnGfFAH9XfmfEDBWAztdj1EPN", "senderPublicKey": "5ewTnHF3P3EniKRfG794eQGDVT2W2wGGp8niEarY5CXf", "proofs": [ "XnC3wzrrwgAkU8Ez6DjuPGXBWAgHNSGVvWpwDueNrrJbE88GvmBWhyj142UqFmfNt45YJfvM5cAQuVsXjqevMEi" ], "script": "base64:AAIDAAAAAAAAAAAAAAAZAAAAAA1pc3N1ZXJBc3NldElkAQAAACBd5eiT2k1LP7XQ7Uoiq/xuSPUf81biIT/wRO9e3oszUQAAAAARaW52ZXN0bWVudEFzc2V0SWQBAAAAIMyghA9N/H6PKJXRf4vv09OPc6rJgvZXIaRGMYd/LPwxAAAAABhpbnZlc3RtZW50QXNzZXRJZElzV2F2ZXMHAAAAAA5vd25lclB1YmxpY0tleQEAAAAg6K6VNrwaGuYv0IKpACINnMj6p+jSSRH7nmHK5qjb4hgAAAAADG93bmVyQWRkcmVzcwkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQUAAAAOb3duZXJQdWJsaWNLZXkAAAAAEm93bmVyQWRkcmVzc1N0cmluZwIAAAAjM05CaUpUZDhYYTVZOThCOFViWGJqQlk5d2hYN3RVRjQydmYAAAAAEWFjY291bnRUaGF0QWxsb3dzCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUsuKbPrsJRAk2hWi4lia9MhdtRoVBFCA1AAAAABVhY2NvdW50VGhhdEFsbG93REFwcHMJAQAAAAdBZGRyZXNzA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JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAANY3VycmVudEFtb3VudAUAAAARaW52ZXN0bWVudEFzc2V0SWQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5B398R0M=", "chainId": 84, "height": 646815, "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'7KYFPk6p3UbejRLzpufF4trTGshxX5VnjECCWEs4hfoW' | |
5 | + | ||
6 | + | let b = base58'Emn8cyGDFgnLCKLTXqVWhKJARhtR2muBUuZaSmqNzDfn' | |
7 | + | ||
8 | + | let c = false | |
9 | + | ||
10 | + | let d = base58'GfHzJ8vGpUfuy7Fec1hG4E6cZtiKLfoPqERtC6tKCazK' | |
11 | + | ||
12 | + | let e = addressFromPublicKey(d) | |
13 | + | ||
14 | + | let f = "3NBiJTd8Xa5Y98B8UbXbjBY9whX7tUF42vf" | |
15 | + | ||
16 | + | let g = Address(base58'3N6DwWxT82nGJUwBwd7L514r2u71gr7WhwJ') | |
17 | + | ||
18 | + | let h = Address(base58'3N1SPvLZgv6FMfe5WNUtnPzt3okYxcJhYnR') | |
19 | + | ||
20 | + | let i = 1000000 | |
21 | + | ||
22 | + | let j = 3000000 | |
23 | + | ||
24 | + | let k = 0 | |
25 | + | ||
26 | + | let l = 646813 | |
27 | + | ||
28 | + | let m = 648870 | |
29 | + | ||
30 | + | let n = 648870 | |
31 | + | ||
32 | + | let o = 100000000 | |
33 | + | ||
34 | + | let p = 100000000 | |
35 | + | ||
36 | + | let q = 300000000 | |
37 | + | ||
38 | + | let r = 300000000 | |
39 | + | ||
40 | + | let s = "sumAmount " | |
41 | + | ||
42 | + | let t = "paidAmount " | |
43 | + | ||
44 | + | let u = "sumAssets " | |
45 | + | ||
46 | + | let v = "allow " | |
47 | + | ||
48 | + | let w = "assets" | |
49 | + | ||
50 | + | let x = "amount" | |
51 | + | ||
52 | + | let y = "issuer" | |
53 | + | ||
54 | + | @Callable(z) | |
55 | + | func deposit () = { | |
56 | + | let A = if ((m > height)) | |
57 | + | then o | |
58 | + | else p | |
59 | + | let B = { | |
60 | + | let C = getInteger(this, x) | |
61 | + | if ($isInstanceOf(C, "Int")) | |
62 | + | then { | |
63 | + | let D = C | |
64 | + | D | |
65 | + | } | |
66 | + | else 0 | |
67 | + | } | |
68 | + | if ((l > height)) | |
69 | + | then throw(((("The Tokensale works between " + toString(l)) + " and ") + toString(n))) | |
70 | + | else if (if ((height > n)) | |
71 | + | then true | |
72 | + | else (B >= r)) | |
73 | + | then throw("The required amount has already been accumulated. If you are an investor, you can withdraw your funds.") | |
74 | + | else { | |
75 | + | let E = { | |
76 | + | let C = z.payment | |
77 | + | if ($isInstanceOf(C, "AttachedPayment")) | |
78 | + | then { | |
79 | + | let F = C | |
80 | + | let G = { | |
81 | + | let H = F.assetId | |
82 | + | if ($isInstanceOf(H, "ByteVector")) | |
83 | + | then { | |
84 | + | let I = H | |
85 | + | if (!(c)) | |
86 | + | then (I == b) | |
87 | + | else false | |
88 | + | } | |
89 | + | else (c == true) | |
90 | + | } | |
91 | + | if (G) | |
92 | + | then F.amount | |
93 | + | else throw("Invalid asset ID of investment") | |
94 | + | } | |
95 | + | else throw("Payment must be attached") | |
96 | + | } | |
97 | + | let J = toBase58String(z.caller.bytes) | |
98 | + | let K = { | |
99 | + | let C = getInteger(g, J) | |
100 | + | if ($isInstanceOf(C, "Int")) | |
101 | + | then { | |
102 | + | let D = C | |
103 | + | D | |
104 | + | } | |
105 | + | else -255 | |
106 | + | } | |
107 | + | if ((-1 > K)) | |
108 | + | then throw("Your account has no right to send funds.") | |
109 | + | else { | |
110 | + | let L = { | |
111 | + | let C = getInteger(this, w) | |
112 | + | if ($isInstanceOf(C, "Int")) | |
113 | + | then { | |
114 | + | let D = C | |
115 | + | D | |
116 | + | } | |
117 | + | else j | |
118 | + | } | |
119 | + | if ((0 > (L - ((E * i) / A)))) | |
120 | + | then throw((("Payment is too big. Maximum possible payment is " + toString(((L * A) / i))) + " wavelet")) | |
121 | + | else { | |
122 | + | let M = { | |
123 | + | let C = getInteger(this, (s + J)) | |
124 | + | if ($isInstanceOf(C, "Int")) | |
125 | + | then { | |
126 | + | let D = C | |
127 | + | D | |
128 | + | } | |
129 | + | else 0 | |
130 | + | } | |
131 | + | let N = (M + E) | |
132 | + | let O = { | |
133 | + | let C = getInteger(this, (u + J)) | |
134 | + | if ($isInstanceOf(C, "Int")) | |
135 | + | then { | |
136 | + | let D = C | |
137 | + | D | |
138 | + | } | |
139 | + | else 0 | |
140 | + | } | |
141 | + | let P = (O + ((E * i) / A)) | |
142 | + | let Q = (L - ((E * i) / A)) | |
143 | + | let R = (B + E) | |
144 | + | WriteSet([DataEntry((s + J), N), DataEntry((u + J), P), DataEntry(w, Q), DataEntry(x, R)]) | |
145 | + | } | |
146 | + | } | |
147 | + | } | |
148 | + | } | |
149 | + | ||
150 | + | ||
151 | + | ||
152 | + | @Callable(z) | |
153 | + | func withdrawal () = { | |
154 | + | let S = { | |
155 | + | let C = getInteger(h, toString(this)) | |
156 | + | if ($isInstanceOf(C, "Int")) | |
157 | + | then { | |
158 | + | let D = C | |
159 | + | D | |
160 | + | } | |
161 | + | else 0 | |
162 | + | } | |
163 | + | if ((S == 0)) | |
164 | + | then throw("Withdrawals are not available until the issuer passes verification") | |
165 | + | else { | |
166 | + | let J = toBase58String(z.caller.bytes) | |
167 | + | let O = { | |
168 | + | let C = getInteger(this, (u + J)) | |
169 | + | if ($isInstanceOf(C, "Int")) | |
170 | + | then { | |
171 | + | let D = C | |
172 | + | D | |
173 | + | } | |
174 | + | else 0 | |
175 | + | } | |
176 | + | let M = { | |
177 | + | let C = getInteger(this, (s + J)) | |
178 | + | if ($isInstanceOf(C, "Int")) | |
179 | + | then { | |
180 | + | let D = C | |
181 | + | D | |
182 | + | } | |
183 | + | else 0 | |
184 | + | } | |
185 | + | let B = { | |
186 | + | let C = getInteger(this, x) | |
187 | + | if ($isInstanceOf(C, "Int")) | |
188 | + | then { | |
189 | + | let D = C | |
190 | + | D | |
191 | + | } | |
192 | + | else 0 | |
193 | + | } | |
194 | + | let L = { | |
195 | + | let C = getInteger(this, w) | |
196 | + | if ($isInstanceOf(C, "Int")) | |
197 | + | then { | |
198 | + | let D = C | |
199 | + | D | |
200 | + | } | |
201 | + | else 0 | |
202 | + | } | |
203 | + | if (!(if ((height > n)) | |
204 | + | then true | |
205 | + | else (B >= r))) | |
206 | + | then throw(("The Tokensale end on block " + toString(n))) | |
207 | + | else if (if (if ((J == f)) | |
208 | + | then (B >= q) | |
209 | + | else false) | |
210 | + | then (S == 1) | |
211 | + | else false) | |
212 | + | then { | |
213 | + | let T = { | |
214 | + | let C = getInteger(this, y) | |
215 | + | if ($isInstanceOf(C, "Int")) | |
216 | + | then { | |
217 | + | let D = C | |
218 | + | D | |
219 | + | } | |
220 | + | else 0 | |
221 | + | } | |
222 | + | if ((T == 0)) | |
223 | + | then ScriptResult(WriteSet([DataEntry(y, (L + k))]), TransferSet([ScriptTransfer(e, (L + k), a), ScriptTransfer(e, B, b)])) | |
224 | + | else throw("The issuer has already taken its share!") | |
225 | + | } | |
226 | + | else if ((M == 0)) | |
227 | + | then throw("Don't have money") | |
228 | + | else if (if ((B >= q)) | |
229 | + | then (S == 1) | |
230 | + | else false) | |
231 | + | then ScriptResult(WriteSet([DataEntry((s + J), 0), DataEntry((u + J), 0)]), TransferSet([ScriptTransfer(z.caller, O, a)])) | |
232 | + | else ScriptResult(WriteSet([DataEntry((s + J), 0), DataEntry((u + J), 0)]), TransferSet([ScriptTransfer(z.caller, M, b)])) | |
233 | + | } | |
234 | + | } | |
235 | + | ||
236 | + | ||
237 | + | @Verifier(U) | |
238 | + | func V () = { | |
239 | + | let C = U | |
240 | + | if ($isInstanceOf(C, "SetScriptTransaction")) | |
241 | + | then { | |
242 | + | let U = C | |
243 | + | sigVerify(U.bodyBytes, U.proofs[0], U.senderPublicKey) | |
244 | + | } | |
245 | + | else false | |
246 | + | } | |
247 | + |
github/deemru/w8io/026f985 19.75 ms ◑