tx · 6jC6PRhKzTfdz4HnJZwQRHAj9Q8tm1YUUpUvGBx77iPW 3MvGbCQfRKnagRd5JmZTvgupznuJD7MyKfo: -0.01400000 Waves 2022.05.15 18:31 [2052973] smart account 3MvGbCQfRKnagRd5JmZTvgupznuJD7MyKfo > SELF 0.00000000 Waves
{ "type": 13, "id": "6jC6PRhKzTfdz4HnJZwQRHAj9Q8tm1YUUpUvGBx77iPW", "fee": 1400000, "feeAssetId": null, "timestamp": 1652628702862, "version": 2, "chainId": 84, "sender": "3MvGbCQfRKnagRd5JmZTvgupznuJD7MyKfo", "senderPublicKey": "8Gc2RCQPWrzPyyDuKYbKYRCrEHXZSYqCAdiiRQAooSZ6", "proofs": [ "5ogLjTxFxmnuHHXfqhZucNi87YxWYrkqMA34WC4qiRVX6Zd5HcQE8vbuwVTvLW7qpw7c5PMXYKuF6j14P1443Ch6" ], "script": "base64:AAIFAAAAAAAAACkIAhIDCgEIEgkKBwgICAgBAQESCQoHCAgICAEBARIECgIICBIECgIICAAAAAgAAAAACW9yYWNsZUtleQIAAAAJb3JhY2xlS2V5AQAAAAZnZXRTdHIAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgIAAAAAAQAAAAZnZXRJbnQAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAAAAAAGb3JhY2xlCQEAAAAGZ2V0U3RyAAAAAQUAAAAJb3JhY2xlS2V5AAAAAAlvcmFjbGVGZWUJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQUAAAAGb3JhY2xlAAAAAApzY29uZXhEYXBwCQAEJgAAAAEJAQAAABN2YWx1Z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zczFUZWFtUmV3YXJkBQAAABJhZGRyZXNzMlRlYW1SZXdhcmQFAAAAEmFkZHJlc3MzVGVhbVJld2FyZAQAAAAUc2NyaXB0VHJhbnNmZXJTZWxsZXIDCQAAAAAAAAIFAAAABnNlbGxlcgIAAAAABQAAAANuaWwJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQUAAAAGc2VsbGVyBQAAAAxzZWxsZXJSZXdhcmQICQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAAAAB2Fzc2V0SWQFAAAAA25pbAkABE4AAAACCQAETgAAAAIJAAROAAAAAgkABE4AAAACCQAETgAAAAIJAAROAAAAAgUAAAAac2NyaXB0VHJhbnNmZXJBZGRyZXNzVGVhbTEFAAAAGnNjcmlwdFRyYW5zZmVyQWRkcmVzc1RlYW0yBQAAABpzY3JpcHRUcmFuc2ZlckFkZHJlc3NUZWFtMwUAAAAWc2NyaXB0VHJhbnNmZXJBZGRyZXNzMQUAAAAWc2NyaXB0VHJhbnNmZXJBZGRyZXNzMgUAAAAWc2NyaXB0VHJhbnNmZXJBZGRyZXNzMwUAAAAUc2NyaXB0VHJhbnNmZXJTZWxsZXIAAAAA5zd+YQ==", "height": 2052973, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: NtQDmivhWU6gPqe75XuFuufdipDzoXeuwHfGVDaXEH5 Next: BLWsZWtpea4nCN2ce8NVcXRB9qDwCEPQ6ygxZLzCVCQD Diff:
Old | New | Differences | |
---|---|---|---|
111 | 111 | ||
112 | 112 | ||
113 | 113 | @Callable(l) | |
114 | - | func payFeeResell (u,v) = { | |
115 | - | let w = 3 | |
116 | - | let x = value(l.payments[0].amount) | |
117 | - | let y = value(l.payments[0].assetId) | |
118 | - | let z = f((u + "_creator_share1")) | |
119 | - | let A = f((u + "_creator_share2")) | |
120 | - | let B = f((u + "_creator_share3")) | |
121 | - | let C = b((u + "_creator_address1")) | |
122 | - | let D = b((u + "_creator_address2")) | |
123 | - | let E = b((u + "_creator_address3")) | |
124 | - | let F = if ((C == "")) | |
125 | - | then 0 | |
126 | - | else fraction(x, z, 100) | |
127 | - | let G = if ((D == "")) | |
128 | - | then 0 | |
129 | - | else fraction(x, A, 100) | |
130 | - | let H = if ((E == "")) | |
131 | - | then 0 | |
132 | - | else fraction(x, B, 100) | |
133 | - | let I = fraction(x, w, 100) | |
134 | - | let J = ((((x - F) - G) - H) - I) | |
135 | - | let K = [ScriptTransfer(addressFromStringValue(j), I, l.payments[0].assetId)] | |
136 | - | let L = if ((C == "")) | |
137 | - | then nil | |
138 | - | else [ScriptTransfer(addressFromStringValue(C), F, l.payments[0].assetId)] | |
139 | - | let M = if ((D == "")) | |
140 | - | then nil | |
141 | - | else [ScriptTransfer(addressFromStringValue(D), G, l.payments[0].assetId)] | |
142 | - | let N = if ((E == "")) | |
143 | - | then nil | |
144 | - | else [ScriptTransfer(addressFromStringValue(E), H, l.payments[0].assetId)] | |
145 | - | let O = if ((v == "")) | |
146 | - | then nil | |
147 | - | else [ScriptTransfer(addressFromStringValue(v), J, l.payments[0].assetId)] | |
148 | - | ((((L ++ M) ++ N) ++ K) ++ O) | |
149 | - | } | |
114 | + | func payFeeResell (u,v) = if (!(containsElement(k, l.caller))) | |
115 | + | then throw("Not allowed") | |
116 | + | else { | |
117 | + | let w = 3 | |
118 | + | let x = value(l.payments[0].amount) | |
119 | + | let y = value(l.payments[0].assetId) | |
120 | + | let z = f((u + "_creator_share1")) | |
121 | + | let A = f((u + "_creator_share2")) | |
122 | + | let B = f((u + "_creator_share3")) | |
123 | + | let C = b((u + "_creator_address1")) | |
124 | + | let D = b((u + "_creator_address2")) | |
125 | + | let E = b((u + "_creator_address3")) | |
126 | + | let F = if ((C == "")) | |
127 | + | then 0 | |
128 | + | else fraction(x, z, 100) | |
129 | + | let G = if ((D == "")) | |
130 | + | then 0 | |
131 | + | else fraction(x, A, 100) | |
132 | + | let H = if ((E == "")) | |
133 | + | then 0 | |
134 | + | else fraction(x, B, 100) | |
135 | + | let I = fraction(x, w, 100) | |
136 | + | let J = ((((x - F) - G) - H) - I) | |
137 | + | let K = [ScriptTransfer(addressFromStringValue(j), I, l.payments[0].assetId)] | |
138 | + | let L = if ((C == "")) | |
139 | + | then nil | |
140 | + | else [ScriptTransfer(addressFromStringValue(C), F, l.payments[0].assetId)] | |
141 | + | let M = if ((D == "")) | |
142 | + | then nil | |
143 | + | else [ScriptTransfer(addressFromStringValue(D), G, l.payments[0].assetId)] | |
144 | + | let N = if ((E == "")) | |
145 | + | then nil | |
146 | + | else [ScriptTransfer(addressFromStringValue(E), H, l.payments[0].assetId)] | |
147 | + | let O = if ((v == "")) | |
148 | + | then nil | |
149 | + | else [ScriptTransfer(addressFromStringValue(v), J, l.payments[0].assetId)] | |
150 | + | ((((L ++ M) ++ N) ++ K) ++ O) | |
151 | + | } | |
150 | 152 | ||
151 | 153 | ||
152 | 154 | ||
153 | 155 | @Callable(l) | |
154 | - | func payFee (u,v) = { | |
155 | - | let x = value(l.payments[0].amount) | |
156 | - | let y = value(l.payments[0].assetId) | |
157 | - | let P = f((u + "_team_share1")) | |
158 | - | let Q = f((u + "_team_share2")) | |
159 | - | let R = f((u + "_team_share3")) | |
160 | - | let S = b((u + "_team_address1")) | |
161 | - | let T = b((u + "_team_address2")) | |
162 | - | let U = b((u + "_team_address3")) | |
163 | - | let z = f((u + "_creator_address1")) | |
164 | - | let A = f((u + "_creator_address2")) | |
165 | - | let B = f((u + "_creator_address3")) | |
166 | - | let C = b((u + "_creator_address1")) | |
167 | - | let D = b((u + "_creator_address2")) | |
168 | - | let E = b((u + "_creator_address3")) | |
169 | - | let V = if ((S == "")) | |
170 | - | then 0 | |
171 | - | else fraction(x, P, 100) | |
172 | - | let W = if ((T == "")) | |
173 | - | then 0 | |
174 | - | else fraction(x, Q, 100) | |
175 | - | let X = if ((U == "")) | |
176 | - | then 0 | |
177 | - | else fraction(x, R, 100) | |
178 | - | let F = if ((C == "")) | |
179 | - | then 0 | |
180 | - | else fraction(x, z, 100) | |
181 | - | let G = if ((D == "")) | |
182 | - | then 0 | |
183 | - | else fraction(x, A, 100) | |
184 | - | let H = if ((E == "")) | |
185 | - | then 0 | |
186 | - | else fraction(x, B, 100) | |
187 | - | let Y = if ((S == "")) | |
188 | - | then nil | |
189 | - | else [ScriptTransfer(addressFromStringValue(S), V, l.payments[0].assetId)] | |
190 | - | let Z = if ((T == "")) | |
191 | - | then nil | |
192 | - | else [ScriptTransfer(addressFromStringValue(T), W, l.payments[0].assetId)] | |
193 | - | let aa = if ((U == "")) | |
194 | - | then nil | |
195 | - | else [ScriptTransfer(addressFromStringValue(U), X, l.payments[0].assetId)] | |
196 | - | let L = if ((C == "")) | |
197 | - | then nil | |
198 | - | else [ScriptTransfer(addressFromStringValue(C), F, l.payments[0].assetId)] | |
199 | - | let M = if ((D == "")) | |
200 | - | then nil | |
201 | - | else [ScriptTransfer(addressFromStringValue(D), G, l.payments[0].assetId)] | |
202 | - | let N = if ((E == "")) | |
203 | - | then nil | |
204 | - | else [ScriptTransfer(addressFromStringValue(E), H, l.payments[0].assetId)] | |
205 | - | let J = ((((((x - F) - G) - H) - V) - W) - X) | |
206 | - | let O = if ((v == "")) | |
207 | - | then nil | |
208 | - | else [ScriptTransfer(addressFromStringValue(v), J, l.payments[0].assetId)] | |
209 | - | ((((((Y ++ Z) ++ aa) ++ L) ++ M) ++ N) ++ O) | |
210 | - | } | |
156 | + | func payFee (u,v) = if (!(containsElement(k, l.caller))) | |
157 | + | then throw("Not allowed") | |
158 | + | else { | |
159 | + | let x = value(l.payments[0].amount) | |
160 | + | let y = value(l.payments[0].assetId) | |
161 | + | let P = f((u + "_team_share1")) | |
162 | + | let Q = f((u + "_team_share2")) | |
163 | + | let R = f((u + "_team_share3")) | |
164 | + | let S = b((u + "_team_address1")) | |
165 | + | let T = b((u + "_team_address2")) | |
166 | + | let U = b((u + "_team_address3")) | |
167 | + | let z = f((u + "_creator_address1")) | |
168 | + | let A = f((u + "_creator_address2")) | |
169 | + | let B = f((u + "_creator_address3")) | |
170 | + | let C = b((u + "_creator_address1")) | |
171 | + | let D = b((u + "_creator_address2")) | |
172 | + | let E = b((u + "_creator_address3")) | |
173 | + | let V = if ((S == "")) | |
174 | + | then 0 | |
175 | + | else fraction(x, P, 100) | |
176 | + | let W = if ((T == "")) | |
177 | + | then 0 | |
178 | + | else fraction(x, Q, 100) | |
179 | + | let X = if ((U == "")) | |
180 | + | then 0 | |
181 | + | else fraction(x, R, 100) | |
182 | + | let F = if ((C == "")) | |
183 | + | then 0 | |
184 | + | else fraction(x, z, 100) | |
185 | + | let G = if ((D == "")) | |
186 | + | then 0 | |
187 | + | else fraction(x, A, 100) | |
188 | + | let H = if ((E == "")) | |
189 | + | then 0 | |
190 | + | else fraction(x, B, 100) | |
191 | + | let Y = if ((S == "")) | |
192 | + | then nil | |
193 | + | else [ScriptTransfer(addressFromStringValue(S), V, l.payments[0].assetId)] | |
194 | + | let Z = if ((T == "")) | |
195 | + | then nil | |
196 | + | else [ScriptTransfer(addressFromStringValue(T), W, l.payments[0].assetId)] | |
197 | + | let aa = if ((U == "")) | |
198 | + | then nil | |
199 | + | else [ScriptTransfer(addressFromStringValue(U), X, l.payments[0].assetId)] | |
200 | + | let L = if ((C == "")) | |
201 | + | then nil | |
202 | + | else [ScriptTransfer(addressFromStringValue(C), F, l.payments[0].assetId)] | |
203 | + | let M = if ((D == "")) | |
204 | + | then nil | |
205 | + | else [ScriptTransfer(addressFromStringValue(D), G, l.payments[0].assetId)] | |
206 | + | let N = if ((E == "")) | |
207 | + | then nil | |
208 | + | else [ScriptTransfer(addressFromStringValue(E), H, l.payments[0].assetId)] | |
209 | + | let J = ((((((x - F) - G) - H) - V) - W) - X) | |
210 | + | let O = if ((v == "")) | |
211 | + | then nil | |
212 | + | else [ScriptTransfer(addressFromStringValue(v), J, l.payments[0].assetId)] | |
213 | + | ((((((Y ++ Z) ++ aa) ++ L) ++ M) ++ N) ++ O) | |
214 | + | } | |
211 | 215 | ||
212 | 216 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "oracleKey" | |
5 | 5 | ||
6 | 6 | func b (c) = { | |
7 | 7 | let d = getString(this, c) | |
8 | 8 | if ($isInstanceOf(d, "String")) | |
9 | 9 | then { | |
10 | 10 | let e = d | |
11 | 11 | e | |
12 | 12 | } | |
13 | 13 | else "" | |
14 | 14 | } | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func f (c) = { | |
18 | 18 | let d = getInteger(this, c) | |
19 | 19 | if ($isInstanceOf(d, "Int")) | |
20 | 20 | then { | |
21 | 21 | let e = d | |
22 | 22 | e | |
23 | 23 | } | |
24 | 24 | else 0 | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | let g = b(a) | |
29 | 29 | ||
30 | 30 | let h = value(addressFromString(g)) | |
31 | 31 | ||
32 | 32 | let i = addressFromString(valueOrErrorMessage(getString(h, "sconexDapp"), "sconexDapp not found")) | |
33 | 33 | ||
34 | 34 | let j = valueOrErrorMessage(getString(h, "feeReceiver"), "feeReceiver not found") | |
35 | 35 | ||
36 | 36 | let k = [i] | |
37 | 37 | ||
38 | 38 | @Callable(l) | |
39 | 39 | func initDapp (m) = if ((l.caller != this)) | |
40 | 40 | then throw("You cannot do this action") | |
41 | 41 | else if ((g != "")) | |
42 | 42 | then throw("oracle already set, you can't override!") | |
43 | 43 | else [StringEntry(a, m)] | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | ||
47 | 47 | @Callable(l) | |
48 | 48 | func teamSplitFee (n,o,p,q,r,s,t) = if (!(containsElement(k, l.caller))) | |
49 | 49 | then throw("Not allowed") | |
50 | 50 | else if ((0 > r)) | |
51 | 51 | then throw("Share 1 can't be negative") | |
52 | 52 | else if (if (if ((r != 0)) | |
53 | 53 | then true | |
54 | 54 | else (o != "")) | |
55 | 55 | then !(isDefined(addressFromString(o))) | |
56 | 56 | else false) | |
57 | 57 | then throw("Address 1 is invalid") | |
58 | 58 | else if ((0 > s)) | |
59 | 59 | then throw("Share 2 can't be negative") | |
60 | 60 | else if (if (if ((s != 0)) | |
61 | 61 | then true | |
62 | 62 | else (p != "")) | |
63 | 63 | then !(isDefined(addressFromString(p))) | |
64 | 64 | else false) | |
65 | 65 | then throw("Address 2 is invalid") | |
66 | 66 | else if ((0 > t)) | |
67 | 67 | then throw("Share 3 can't be negative") | |
68 | 68 | else if (if (if ((t != 0)) | |
69 | 69 | then true | |
70 | 70 | else (q != "")) | |
71 | 71 | then !(isDefined(addressFromString(q))) | |
72 | 72 | else false) | |
73 | 73 | then throw("Address 3 is invalid") | |
74 | 74 | else if ((((r + s) + t) != 15)) | |
75 | 75 | then throw("Sum of shares should be equal to 15") | |
76 | 76 | else [StringEntry((n + "_team_address1"), o), StringEntry((n + "_team_address2"), p), StringEntry((n + "_team_address3"), q), IntegerEntry((n + "_team_share1"), r), IntegerEntry((n + "_team_share2"), s), IntegerEntry((n + "_team_share3"), t)] | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | ||
80 | 80 | @Callable(l) | |
81 | 81 | func creatorSplitFee (n,o,p,q,r,s,t) = if (!(containsElement(k, l.caller))) | |
82 | 82 | then throw("Not allowed") | |
83 | 83 | else if ((0 > r)) | |
84 | 84 | then throw("Share 1 can't be negative") | |
85 | 85 | else if (if (if ((r != 0)) | |
86 | 86 | then true | |
87 | 87 | else (o != "")) | |
88 | 88 | then !(isDefined(addressFromString(o))) | |
89 | 89 | else false) | |
90 | 90 | then throw("Address 1 is invalid") | |
91 | 91 | else if ((0 > s)) | |
92 | 92 | then throw("Share 2 can't be negative") | |
93 | 93 | else if (if (if ((s != 0)) | |
94 | 94 | then true | |
95 | 95 | else (p != "")) | |
96 | 96 | then !(isDefined(addressFromString(p))) | |
97 | 97 | else false) | |
98 | 98 | then throw("Address 2 is invalid") | |
99 | 99 | else if ((0 > t)) | |
100 | 100 | then throw("Share 3 can't be negative") | |
101 | 101 | else if (if (if ((t != 0)) | |
102 | 102 | then true | |
103 | 103 | else (q != "")) | |
104 | 104 | then !(isDefined(addressFromString(q))) | |
105 | 105 | else false) | |
106 | 106 | then throw("Address 3 is invalid") | |
107 | 107 | else if ((((r + s) + t) > 85)) | |
108 | 108 | then throw("Sum of shares should be smaller or equal then 85") | |
109 | 109 | else [StringEntry((n + "_creator_address1"), o), StringEntry((n + "_creator_address2"), p), StringEntry((n + "_creator_address3"), q), IntegerEntry((n + "_creator_share1"), r), IntegerEntry((n + "_creator_share2"), s), IntegerEntry((n + "_creator_share3"), t)] | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | ||
113 | 113 | @Callable(l) | |
114 | - | func payFeeResell (u,v) = { | |
115 | - | let w = 3 | |
116 | - | let x = value(l.payments[0].amount) | |
117 | - | let y = value(l.payments[0].assetId) | |
118 | - | let z = f((u + "_creator_share1")) | |
119 | - | let A = f((u + "_creator_share2")) | |
120 | - | let B = f((u + "_creator_share3")) | |
121 | - | let C = b((u + "_creator_address1")) | |
122 | - | let D = b((u + "_creator_address2")) | |
123 | - | let E = b((u + "_creator_address3")) | |
124 | - | let F = if ((C == "")) | |
125 | - | then 0 | |
126 | - | else fraction(x, z, 100) | |
127 | - | let G = if ((D == "")) | |
128 | - | then 0 | |
129 | - | else fraction(x, A, 100) | |
130 | - | let H = if ((E == "")) | |
131 | - | then 0 | |
132 | - | else fraction(x, B, 100) | |
133 | - | let I = fraction(x, w, 100) | |
134 | - | let J = ((((x - F) - G) - H) - I) | |
135 | - | let K = [ScriptTransfer(addressFromStringValue(j), I, l.payments[0].assetId)] | |
136 | - | let L = if ((C == "")) | |
137 | - | then nil | |
138 | - | else [ScriptTransfer(addressFromStringValue(C), F, l.payments[0].assetId)] | |
139 | - | let M = if ((D == "")) | |
140 | - | then nil | |
141 | - | else [ScriptTransfer(addressFromStringValue(D), G, l.payments[0].assetId)] | |
142 | - | let N = if ((E == "")) | |
143 | - | then nil | |
144 | - | else [ScriptTransfer(addressFromStringValue(E), H, l.payments[0].assetId)] | |
145 | - | let O = if ((v == "")) | |
146 | - | then nil | |
147 | - | else [ScriptTransfer(addressFromStringValue(v), J, l.payments[0].assetId)] | |
148 | - | ((((L ++ M) ++ N) ++ K) ++ O) | |
149 | - | } | |
114 | + | func payFeeResell (u,v) = if (!(containsElement(k, l.caller))) | |
115 | + | then throw("Not allowed") | |
116 | + | else { | |
117 | + | let w = 3 | |
118 | + | let x = value(l.payments[0].amount) | |
119 | + | let y = value(l.payments[0].assetId) | |
120 | + | let z = f((u + "_creator_share1")) | |
121 | + | let A = f((u + "_creator_share2")) | |
122 | + | let B = f((u + "_creator_share3")) | |
123 | + | let C = b((u + "_creator_address1")) | |
124 | + | let D = b((u + "_creator_address2")) | |
125 | + | let E = b((u + "_creator_address3")) | |
126 | + | let F = if ((C == "")) | |
127 | + | then 0 | |
128 | + | else fraction(x, z, 100) | |
129 | + | let G = if ((D == "")) | |
130 | + | then 0 | |
131 | + | else fraction(x, A, 100) | |
132 | + | let H = if ((E == "")) | |
133 | + | then 0 | |
134 | + | else fraction(x, B, 100) | |
135 | + | let I = fraction(x, w, 100) | |
136 | + | let J = ((((x - F) - G) - H) - I) | |
137 | + | let K = [ScriptTransfer(addressFromStringValue(j), I, l.payments[0].assetId)] | |
138 | + | let L = if ((C == "")) | |
139 | + | then nil | |
140 | + | else [ScriptTransfer(addressFromStringValue(C), F, l.payments[0].assetId)] | |
141 | + | let M = if ((D == "")) | |
142 | + | then nil | |
143 | + | else [ScriptTransfer(addressFromStringValue(D), G, l.payments[0].assetId)] | |
144 | + | let N = if ((E == "")) | |
145 | + | then nil | |
146 | + | else [ScriptTransfer(addressFromStringValue(E), H, l.payments[0].assetId)] | |
147 | + | let O = if ((v == "")) | |
148 | + | then nil | |
149 | + | else [ScriptTransfer(addressFromStringValue(v), J, l.payments[0].assetId)] | |
150 | + | ((((L ++ M) ++ N) ++ K) ++ O) | |
151 | + | } | |
150 | 152 | ||
151 | 153 | ||
152 | 154 | ||
153 | 155 | @Callable(l) | |
154 | - | func payFee (u,v) = { | |
155 | - | let x = value(l.payments[0].amount) | |
156 | - | let y = value(l.payments[0].assetId) | |
157 | - | let P = f((u + "_team_share1")) | |
158 | - | let Q = f((u + "_team_share2")) | |
159 | - | let R = f((u + "_team_share3")) | |
160 | - | let S = b((u + "_team_address1")) | |
161 | - | let T = b((u + "_team_address2")) | |
162 | - | let U = b((u + "_team_address3")) | |
163 | - | let z = f((u + "_creator_address1")) | |
164 | - | let A = f((u + "_creator_address2")) | |
165 | - | let B = f((u + "_creator_address3")) | |
166 | - | let C = b((u + "_creator_address1")) | |
167 | - | let D = b((u + "_creator_address2")) | |
168 | - | let E = b((u + "_creator_address3")) | |
169 | - | let V = if ((S == "")) | |
170 | - | then 0 | |
171 | - | else fraction(x, P, 100) | |
172 | - | let W = if ((T == "")) | |
173 | - | then 0 | |
174 | - | else fraction(x, Q, 100) | |
175 | - | let X = if ((U == "")) | |
176 | - | then 0 | |
177 | - | else fraction(x, R, 100) | |
178 | - | let F = if ((C == "")) | |
179 | - | then 0 | |
180 | - | else fraction(x, z, 100) | |
181 | - | let G = if ((D == "")) | |
182 | - | then 0 | |
183 | - | else fraction(x, A, 100) | |
184 | - | let H = if ((E == "")) | |
185 | - | then 0 | |
186 | - | else fraction(x, B, 100) | |
187 | - | let Y = if ((S == "")) | |
188 | - | then nil | |
189 | - | else [ScriptTransfer(addressFromStringValue(S), V, l.payments[0].assetId)] | |
190 | - | let Z = if ((T == "")) | |
191 | - | then nil | |
192 | - | else [ScriptTransfer(addressFromStringValue(T), W, l.payments[0].assetId)] | |
193 | - | let aa = if ((U == "")) | |
194 | - | then nil | |
195 | - | else [ScriptTransfer(addressFromStringValue(U), X, l.payments[0].assetId)] | |
196 | - | let L = if ((C == "")) | |
197 | - | then nil | |
198 | - | else [ScriptTransfer(addressFromStringValue(C), F, l.payments[0].assetId)] | |
199 | - | let M = if ((D == "")) | |
200 | - | then nil | |
201 | - | else [ScriptTransfer(addressFromStringValue(D), G, l.payments[0].assetId)] | |
202 | - | let N = if ((E == "")) | |
203 | - | then nil | |
204 | - | else [ScriptTransfer(addressFromStringValue(E), H, l.payments[0].assetId)] | |
205 | - | let J = ((((((x - F) - G) - H) - V) - W) - X) | |
206 | - | let O = if ((v == "")) | |
207 | - | then nil | |
208 | - | else [ScriptTransfer(addressFromStringValue(v), J, l.payments[0].assetId)] | |
209 | - | ((((((Y ++ Z) ++ aa) ++ L) ++ M) ++ N) ++ O) | |
210 | - | } | |
156 | + | func payFee (u,v) = if (!(containsElement(k, l.caller))) | |
157 | + | then throw("Not allowed") | |
158 | + | else { | |
159 | + | let x = value(l.payments[0].amount) | |
160 | + | let y = value(l.payments[0].assetId) | |
161 | + | let P = f((u + "_team_share1")) | |
162 | + | let Q = f((u + "_team_share2")) | |
163 | + | let R = f((u + "_team_share3")) | |
164 | + | let S = b((u + "_team_address1")) | |
165 | + | let T = b((u + "_team_address2")) | |
166 | + | let U = b((u + "_team_address3")) | |
167 | + | let z = f((u + "_creator_address1")) | |
168 | + | let A = f((u + "_creator_address2")) | |
169 | + | let B = f((u + "_creator_address3")) | |
170 | + | let C = b((u + "_creator_address1")) | |
171 | + | let D = b((u + "_creator_address2")) | |
172 | + | let E = b((u + "_creator_address3")) | |
173 | + | let V = if ((S == "")) | |
174 | + | then 0 | |
175 | + | else fraction(x, P, 100) | |
176 | + | let W = if ((T == "")) | |
177 | + | then 0 | |
178 | + | else fraction(x, Q, 100) | |
179 | + | let X = if ((U == "")) | |
180 | + | then 0 | |
181 | + | else fraction(x, R, 100) | |
182 | + | let F = if ((C == "")) | |
183 | + | then 0 | |
184 | + | else fraction(x, z, 100) | |
185 | + | let G = if ((D == "")) | |
186 | + | then 0 | |
187 | + | else fraction(x, A, 100) | |
188 | + | let H = if ((E == "")) | |
189 | + | then 0 | |
190 | + | else fraction(x, B, 100) | |
191 | + | let Y = if ((S == "")) | |
192 | + | then nil | |
193 | + | else [ScriptTransfer(addressFromStringValue(S), V, l.payments[0].assetId)] | |
194 | + | let Z = if ((T == "")) | |
195 | + | then nil | |
196 | + | else [ScriptTransfer(addressFromStringValue(T), W, l.payments[0].assetId)] | |
197 | + | let aa = if ((U == "")) | |
198 | + | then nil | |
199 | + | else [ScriptTransfer(addressFromStringValue(U), X, l.payments[0].assetId)] | |
200 | + | let L = if ((C == "")) | |
201 | + | then nil | |
202 | + | else [ScriptTransfer(addressFromStringValue(C), F, l.payments[0].assetId)] | |
203 | + | let M = if ((D == "")) | |
204 | + | then nil | |
205 | + | else [ScriptTransfer(addressFromStringValue(D), G, l.payments[0].assetId)] | |
206 | + | let N = if ((E == "")) | |
207 | + | then nil | |
208 | + | else [ScriptTransfer(addressFromStringValue(E), H, l.payments[0].assetId)] | |
209 | + | let J = ((((((x - F) - G) - H) - V) - W) - X) | |
210 | + | let O = if ((v == "")) | |
211 | + | then nil | |
212 | + | else [ScriptTransfer(addressFromStringValue(v), J, l.payments[0].assetId)] | |
213 | + | ((((((Y ++ Z) ++ aa) ++ L) ++ M) ++ N) ++ O) | |
214 | + | } | |
211 | 215 | ||
212 | 216 |
github/deemru/w8io/026f985 37.10 ms ◑