tx · 2af5MEJpnhCKaMgshbnsmUktnmJFHMQpWRNz5DFyzU89 3N2uqvoAaM7MzJK2dUWwQBodQ6XiJxNSduw: -0.01000000 Waves 2020.06.11 14:59 [1038712] smart account 3N2uqvoAaM7MzJK2dUWwQBodQ6XiJxNSduw > SELF 0.00000000 Waves
{ "type": 13, "id": "2af5MEJpnhCKaMgshbnsmUktnmJFHMQpWRNz5DFyzU89", "fee": 1000000, "feeAssetId": null, "timestamp": 1591876797744, "version": 1, "sender": "3N2uqvoAaM7MzJK2dUWwQBodQ6XiJxNSduw", "senderPublicKey": "5VFmkqP4Kk6F1t2i2qM9h2E3NviENn4LkwA9Gqa7QHbg", "proofs": [ "ZuF3Ybf9eP9aMfQD1VoaKkkspvHZtFx5rWAQoHU98Fdg3N8JisNRWFwzJ1kmPddcTw8Z1X5XDCbE6AGHt5deUR3" ], "script": "base64:AAIDAAAAAAAAAAkIARIDCgEIEgAAAAAgAAAAAAthZGRyZXNzQm9vawkBAAAAB0FkZHJlc3MAAAABAQAAABoBVFaB1Hk0Ezu+4mjGjtAsjfi5cnbAV28B3gAAAAATd2hpdGVsaXN0QWRkcmVzc0tleQIAAAAQd2hpdGVsaXN0QWRkcmVzcwAAAAAXZEFwcFdoaXRlbGlzdEFkZHJlc3NLZXkCAAAAFGRBcHBXaGl0ZWxpc3RBZGRyZXNzAAAAAA5jb2VmZmljaWVudEtleQIAAAALY29lZmZpY2llbnQAAAAAEGlzc3VlckFkZHJlc3NLZXkCAAAABmlzc3VlcgAAAAAUaXNzdWVyQWRkcmVzc1BhaWRLZXkCAAAAC2lzc3Vlcl9wYWlkAAAAABppc3N1ZXJBZGRyZXNzUGFpZEFtb3VudEtleQIAAAARaXNzdWVyX3BhaWRBbW91bnQAAAAAEnRyYW5zZmVyc05lZWRlZEtleQIAAAAQdHJhbnNmZXJzX25lZWRlZAAAAAAVdHJhbnNmZXJzQ29tcGxldGVkS2V5AgAAABN0cmFuc2ZlcnNfY29tcGxldGVkAAAAABBka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AAACWlzRGVmaW5lZAAAAAEJAAQaAAAAAgUAAAAJcEFkZHJlc3M4BQAAAAR0eElkAAAAAAAAAAABAAAAAAAAAAAACQAAZwAAAAIJAABkAAAAAgkAAGQAAAACCQAAZAAAAAIJAABkAAAAAgkAAGQAAAACCQAAZAAAAAIJAABkAAAAAgUAAAALcEtleTFTaWduZWQFAAAAC3BLZXkyU2lnbmVkBQAAAAtwS2V5M1NpZ25lZAUAAAALcEtleTRTaWduZWQFAAAAC3BLZXk1U2lnbmVkBQAAAAtwS2V5NlNpZ25lZAUAAAALcEtleTdTaWduZWQFAAAAC3BLZXk4U2lnbmVkAAAAAAAAAAADAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAAAnR4BQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQeZnPNP", "chainId": 84, "height": 1038712, "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 = Address(base58'3MwoVRAPfC2NKuuYJKHVAVtUFhq8MyTEfQh') | |
5 | + | ||
6 | + | let b = "whitelistAddress" | |
7 | + | ||
8 | + | let c = "dAppWhitelistAddress" | |
9 | + | ||
10 | + | let d = "coefficient" | |
11 | + | ||
12 | + | let e = "issuer" | |
13 | + | ||
14 | + | let f = "issuer_paid" | |
15 | + | ||
16 | + | let g = "issuer_paidAmount" | |
17 | + | ||
18 | + | let h = "transfers_needed" | |
19 | + | ||
20 | + | let i = "transfers_completed" | |
21 | + | ||
22 | + | let j = base58'Co11Tbj83TeZCnuXrZQwv6Bs4XG2sm1vGQiQ4FLDjJWs' | |
23 | + | ||
24 | + | let k = false | |
25 | + | ||
26 | + | let l = 100000000 | |
27 | + | ||
28 | + | let m = 1592600400 | |
29 | + | ||
30 | + | let n = 1624136400 | |
31 | + | ||
32 | + | let o = "5.0.1" | |
33 | + | ||
34 | + | let p = 1000 | |
35 | + | ||
36 | + | let q = (lastBlock.timestamp / 1000) | |
37 | + | ||
38 | + | func r () = (q >= m) | |
39 | + | ||
40 | + | ||
41 | + | func s () = (q > n) | |
42 | + | ||
43 | + | ||
44 | + | func t (u) = { | |
45 | + | let v = getString(a, u) | |
46 | + | if ($isInstanceOf(v, "String")) | |
47 | + | then { | |
48 | + | let w = v | |
49 | + | Address(fromBase58String(w)) | |
50 | + | } | |
51 | + | else throw("no key") | |
52 | + | } | |
53 | + | ||
54 | + | ||
55 | + | func x (u) = { | |
56 | + | let v = getInteger(this, u) | |
57 | + | if ($isInstanceOf(v, "Int")) | |
58 | + | then { | |
59 | + | let w = v | |
60 | + | w | |
61 | + | } | |
62 | + | else 0 | |
63 | + | } | |
64 | + | ||
65 | + | ||
66 | + | func y (u) = { | |
67 | + | let v = getBoolean(this, u) | |
68 | + | if ($isInstanceOf(v, "Boolean")) | |
69 | + | then { | |
70 | + | let w = v | |
71 | + | w | |
72 | + | } | |
73 | + | else false | |
74 | + | } | |
75 | + | ||
76 | + | ||
77 | + | func z (A,B) = if ((A == false)) | |
78 | + | then B | |
79 | + | else unit | |
80 | + | ||
81 | + | ||
82 | + | func C (A,B) = if ((A == false)) | |
83 | + | then assetBalance(this, B) | |
84 | + | else wavesBalance(this) | |
85 | + | ||
86 | + | ||
87 | + | func D (E,F) = if ((size(E) > 10)) | |
88 | + | then E | |
89 | + | else F | |
90 | + | ||
91 | + | ||
92 | + | let G = t(b) | |
93 | + | ||
94 | + | let H = t(c) | |
95 | + | ||
96 | + | let I = z(k, j) | |
97 | + | ||
98 | + | let J = y(f) | |
99 | + | ||
100 | + | let K = C(k, j) | |
101 | + | ||
102 | + | let L = x(h) | |
103 | + | ||
104 | + | let M = x(i) | |
105 | + | ||
106 | + | @Callable(N) | |
107 | + | func withdrawal (O) = { | |
108 | + | let P = { | |
109 | + | let v = getInteger(H, toString(this)) | |
110 | + | if ($isInstanceOf(v, "Int")) | |
111 | + | then { | |
112 | + | let w = v | |
113 | + | w | |
114 | + | } | |
115 | + | else 0 | |
116 | + | } | |
117 | + | let Q = D(O, toString(N.caller)) | |
118 | + | let R = extract(addressFromString(Q)) | |
119 | + | let S = (("address_" + Q) + "_tokens") | |
120 | + | let T = (("address_" + Q) + "_paid") | |
121 | + | let U = (("address_" + Q) + "_paidAmount") | |
122 | + | let V = x(S) | |
123 | + | let W = y(T) | |
124 | + | if ((P != 1)) | |
125 | + | then throw("#001 dApp is not active") | |
126 | + | else if (!(r())) | |
127 | + | then throw("#002 dApp has not started yet") | |
128 | + | else if (s()) | |
129 | + | then throw("#003 dApp already completed") | |
130 | + | else if ((V == 0)) | |
131 | + | then throw("#005 This account does not have dividends to recieve.") | |
132 | + | else if ((W == true)) | |
133 | + | then throw("#006 This account has already received dividends.") | |
134 | + | else { | |
135 | + | let X = x(d) | |
136 | + | let Y = fraction(V, X, l) | |
137 | + | ScriptResult(WriteSet([DataEntry(T, true), DataEntry(i, (M + 1)), DataEntry(U, Y)]), TransferSet([ScriptTransfer(R, Y, I)])) | |
138 | + | } | |
139 | + | } | |
140 | + | ||
141 | + | ||
142 | + | ||
143 | + | @Callable(N) | |
144 | + | func getBalance () = { | |
145 | + | let P = { | |
146 | + | let v = getInteger(H, toString(this)) | |
147 | + | if ($isInstanceOf(v, "Int")) | |
148 | + | then { | |
149 | + | let w = v | |
150 | + | w | |
151 | + | } | |
152 | + | else 0 | |
153 | + | } | |
154 | + | let Z = { | |
155 | + | let v = getString(this, e) | |
156 | + | if ($isInstanceOf(v, "String")) | |
157 | + | then { | |
158 | + | let w = v | |
159 | + | Address(fromBase58String(w)) | |
160 | + | } | |
161 | + | else throw("no issuer address key") | |
162 | + | } | |
163 | + | if ((P != 1)) | |
164 | + | then throw("#001 dApp is not active") | |
165 | + | else if (!(r())) | |
166 | + | then throw("#002 dApp has not started yet") | |
167 | + | else if (if ((L != M)) | |
168 | + | then true | |
169 | + | else (L == 0)) | |
170 | + | then throw("#010 This account waits for transfer") | |
171 | + | else if ((J == true)) | |
172 | + | then throw("#012 This account has already received balance") | |
173 | + | else ScriptResult(WriteSet([DataEntry(f, true), DataEntry(g, K)]), TransferSet([ScriptTransfer(Z, K, I)])) | |
174 | + | } | |
175 | + | ||
176 | + | ||
177 | + | @Verifier(aa) | |
178 | + | func ab () = { | |
179 | + | let v = aa | |
180 | + | if ($isInstanceOf(v, "SetScriptTransaction")) | |
181 | + | then { | |
182 | + | let aa = v | |
183 | + | let ac = toBase58String(aa.id) | |
184 | + | let ad = t("pAddress1") | |
185 | + | let ae = t("pAddress2") | |
186 | + | let af = t("pAddress3") | |
187 | + | let ag = t("pAddress4") | |
188 | + | let ah = t("pAddress5") | |
189 | + | let ai = t("pAddress6") | |
190 | + | let aj = t("pAddress7") | |
191 | + | let ak = t("pAddress8") | |
192 | + | let al = if (isDefined(getInteger(ad, ac))) | |
193 | + | then 1 | |
194 | + | else 0 | |
195 | + | let am = if (isDefined(getInteger(ae, ac))) | |
196 | + | then 1 | |
197 | + | else 0 | |
198 | + | let an = if (isDefined(getInteger(af, ac))) | |
199 | + | then 1 | |
200 | + | else 0 | |
201 | + | let ao = if (isDefined(getInteger(ag, ac))) | |
202 | + | then 1 | |
203 | + | else 0 | |
204 | + | let ap = if (isDefined(getInteger(ah, ac))) | |
205 | + | then 1 | |
206 | + | else 0 | |
207 | + | let aq = if (isDefined(getInteger(ai, ac))) | |
208 | + | then 1 | |
209 | + | else 0 | |
210 | + | let ar = if (isDefined(getInteger(aj, ac))) | |
211 | + | then 1 | |
212 | + | else 0 | |
213 | + | let as = if (isDefined(getInteger(ak, ac))) | |
214 | + | then 1 | |
215 | + | else 0 | |
216 | + | ((((((((al + am) + an) + ao) + ap) + aq) + ar) + as) >= 3) | |
217 | + | } | |
218 | + | else if ($isInstanceOf(v, "DataTransaction")) | |
219 | + | then { | |
220 | + | let aa = v | |
221 | + | sigVerify(aa.bodyBytes, aa.proofs[0], aa.senderPublicKey) | |
222 | + | } | |
223 | + | else false | |
224 | + | } | |
225 | + |
github/deemru/w8io/169f3d6 20.79 ms ◑