tx · 4v5R61o2izGir1uXeaddTd6HaxQTYE4M8ZcCoyHXFXmP 3MsUgHuJ6XNCrY87kaVsLZFN2nU8qaQaUa1: -0.01000000 Waves 2020.06.07 12:43 [1032696] smart account 3MsUgHuJ6XNCrY87kaVsLZFN2nU8qaQaUa1 > SELF 0.00000000 Waves
{ "type": 13, "id": "4v5R61o2izGir1uXeaddTd6HaxQTYE4M8ZcCoyHXFXmP", "fee": 1000000, "feeAssetId": null, "timestamp": 1591523031943, "version": 1, "sender": "3MsUgHuJ6XNCrY87kaVsLZFN2nU8qaQaUa1", "senderPublicKey": "EqRw1sSyq14rLdSkfSb9o69rNE7bP6m4BHURrnQXaDiZ", "proofs": [ "B1EzncMZYhTGYvVYYYbi9wFqAzJagLN3GYRfFjyXxQT9EwJU16tYfQ3HTfbRsgZoKfztZvue1uwBhHNTVYE6MMz" ], "script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAAFgAAAAALYWRkcmVzc0Jvb2sJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVRWgdR5NBM7vuJoxo7QLI34uXJ2wFdvAd4AAAAAE3doaXRlbGlzdEFkZHJlc3NLZXkCAAAAEHdoaXRlbGlzdEFkZHJlc3MAAAAAF2RBcHBXaGl0ZWxpc3RBZGRyZXNzS2V5AgAAABRkQXBwV2hpdGVsaXN0QWRkcmVzcwAAAAAOY29lZmZpY2llbnRLZXkCAAAAC2NvZWZmaWNpZW50AAAAABBkaXZpZGVuZHNBc3NldElkAQAAAAQTq9kzAAAAABVkaXZpZGVuZHNBc3NldElzV2F2ZXMGAAAAABtzZWN1cml0eUFzc2V0RGVjaW1hbHNPZmZzZXQAAAAAAAAAAAgAAAAACXN0YXJ0VGltZQAAAAAAXuaP0AAAAAAHZW5kVGltZQAAAAAAYMfDUAAAAAADdmVyAgAAAAU1LjAuMQAAAAAKdmFsaWRTdGF0ZQAAAAAAAAAD6AAAAAAOZ2V0Q3VycmVudFRpbWUJAABpAAAAAggFAAAACWxhc3RCbG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C3BLZXk2U2lnbmVkBQAAAAtwS2V5N1NpZ25lZAUAAAALcEtleThTaWduZWQAAAAAAAAAAAMHyBhtbA==", "chainId": 84, "height": 1032696, "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 = base58'WAVES' | |
13 | + | ||
14 | + | let f = true | |
15 | + | ||
16 | + | let g = 8 | |
17 | + | ||
18 | + | let h = 1592168400 | |
19 | + | ||
20 | + | let i = 1623704400 | |
21 | + | ||
22 | + | let j = "5.0.1" | |
23 | + | ||
24 | + | let k = 1000 | |
25 | + | ||
26 | + | let l = (lastBlock.timestamp / 1000) | |
27 | + | ||
28 | + | func m () = (l >= h) | |
29 | + | ||
30 | + | ||
31 | + | func n () = (l > i) | |
32 | + | ||
33 | + | ||
34 | + | func o (p) = { | |
35 | + | let q = getString(a, p) | |
36 | + | if ($isInstanceOf(q, "String")) | |
37 | + | then { | |
38 | + | let r = q | |
39 | + | Address(fromBase58String(r)) | |
40 | + | } | |
41 | + | else throw("no key") | |
42 | + | } | |
43 | + | ||
44 | + | ||
45 | + | func s (p) = { | |
46 | + | let q = getInteger(this, p) | |
47 | + | if ($isInstanceOf(q, "Int")) | |
48 | + | then { | |
49 | + | let r = q | |
50 | + | r | |
51 | + | } | |
52 | + | else 0 | |
53 | + | } | |
54 | + | ||
55 | + | ||
56 | + | func t (p) = { | |
57 | + | let q = getBoolean(this, p) | |
58 | + | if ($isInstanceOf(q, "Boolean")) | |
59 | + | then { | |
60 | + | let r = q | |
61 | + | r | |
62 | + | } | |
63 | + | else false | |
64 | + | } | |
65 | + | ||
66 | + | ||
67 | + | func u (v,w) = if ((v == false)) | |
68 | + | then w | |
69 | + | else unit | |
70 | + | ||
71 | + | ||
72 | + | func x (y,z) = if ((size(y) > 10)) | |
73 | + | then y | |
74 | + | else z | |
75 | + | ||
76 | + | ||
77 | + | let A = o(b) | |
78 | + | ||
79 | + | let B = o(c) | |
80 | + | ||
81 | + | let C = u(f, e) | |
82 | + | ||
83 | + | @Callable(D) | |
84 | + | func withdrawal (E) = { | |
85 | + | let F = { | |
86 | + | let q = getInteger(B, toString(this)) | |
87 | + | if ($isInstanceOf(q, "Int")) | |
88 | + | then { | |
89 | + | let r = q | |
90 | + | r | |
91 | + | } | |
92 | + | else 0 | |
93 | + | } | |
94 | + | let G = x(E, toString(D.caller)) | |
95 | + | let H = extract(addressFromString(G)) | |
96 | + | let I = (("address_" + G) + "_tokens") | |
97 | + | let J = (("address_" + G) + "_paid") | |
98 | + | let K = (("address_" + G) + "_paidAmount") | |
99 | + | let L = s(I) | |
100 | + | let M = t(J) | |
101 | + | if ((F != 1)) | |
102 | + | then throw("#001 dApp is not active") | |
103 | + | else if (!(m())) | |
104 | + | then throw("#002 dApp has not started yet") | |
105 | + | else if (n()) | |
106 | + | then throw("#003 dApp already completed") | |
107 | + | else if ((L == 0)) | |
108 | + | then throw("#005 This account does not have dividends to recieve.") | |
109 | + | else if ((M == true)) | |
110 | + | then throw("#006 This account has already received dividends.") | |
111 | + | else { | |
112 | + | let N = s(d) | |
113 | + | let O = fraction(L, N, g) | |
114 | + | ScriptResult(WriteSet([DataEntry(J, true), DataEntry(K, O)]), TransferSet([ScriptTransfer(H, O, C)])) | |
115 | + | } | |
116 | + | } | |
117 | + | ||
118 | + | ||
119 | + | @Verifier(P) | |
120 | + | func Q () = { | |
121 | + | let q = P | |
122 | + | if ($isInstanceOf(q, "SetScriptTransaction")) | |
123 | + | then { | |
124 | + | let P = q | |
125 | + | let R = toBase58String(P.id) | |
126 | + | let S = o("pAddress1") | |
127 | + | let T = o("pAddress2") | |
128 | + | let U = o("pAddress3") | |
129 | + | let V = o("pAddress4") | |
130 | + | let W = o("pAddress5") | |
131 | + | let X = o("pAddress6") | |
132 | + | let Y = o("pAddress7") | |
133 | + | let Z = o("pAddress8") | |
134 | + | let aa = if (isDefined(getInteger(S, R))) | |
135 | + | then 1 | |
136 | + | else 0 | |
137 | + | let ab = if (isDefined(getInteger(T, R))) | |
138 | + | then 1 | |
139 | + | else 0 | |
140 | + | let ac = if (isDefined(getInteger(U, R))) | |
141 | + | then 1 | |
142 | + | else 0 | |
143 | + | let ad = if (isDefined(getInteger(V, R))) | |
144 | + | then 1 | |
145 | + | else 0 | |
146 | + | let ae = if (isDefined(getInteger(W, R))) | |
147 | + | then 1 | |
148 | + | else 0 | |
149 | + | let af = if (isDefined(getInteger(X, R))) | |
150 | + | then 1 | |
151 | + | else 0 | |
152 | + | let ag = if (isDefined(getInteger(Y, R))) | |
153 | + | then 1 | |
154 | + | else 0 | |
155 | + | let ah = if (isDefined(getInteger(Z, R))) | |
156 | + | then 1 | |
157 | + | else 0 | |
158 | + | ((((((((aa + ab) + ac) + ad) + ae) + af) + ag) + ah) >= 3) | |
159 | + | } | |
160 | + | else false | |
161 | + | } | |
162 | + |
github/deemru/w8io/169f3d6 36.09 ms ◑