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