tx · 4EpBivtxnDB9mi44ojHrDjavnF3kDMerPdg3dn4oEe4X 3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4: -0.01400000 Waves 2020.03.30 22:24 [932584] smart account 3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4 > SELF 0.00000000 Waves
{ "type": 13, "id": "4EpBivtxnDB9mi44ojHrDjavnF3kDMerPdg3dn4oEe4X", "fee": 1400000, "feeAssetId": null, "timestamp": 1585592703425, "version": 1, "sender": "3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4", "senderPublicKey": "4AHsCbS9QYVdKNvxrPWwsMwwy3KqXaCMXeAscExJZk9L", "proofs": [ "KY7EAMTxyRUHrxzrT7UXTBEM71H6T9a6eEBpXpXZZv2fCadQ3AwWAi5SyAUzrCcn8reynR3ggtCyTdLfoX2njZC" ], "script": "base64:AAIDAAAAAAAAACAIARIDCgEBEggKBggICAEBCBIHCgUICAgBARIECgIIAQAAAB8AAAAAB2FCaXRDTzIBAAAAIMf4egCdN1CfKjJsuySIc91YzhODi96HwhotKBtnwSiWAAAAAAhzdGFydFF0eQAAAAAAAAUUAAAAAAAIbm9tUHJpY2UAAAAAAAAAAAEAAAAAEHN1cHBsaWVyRGlzY291bnQAAAAAAAAAAAwAAAAADk93bmVyRWNvUHViS2V5AQAAACAu9FujQAkaDvA3MFtEeOs3vmzRi69LYN3AJDT/FjZAHwAAAAADd3ZzAAAAAAAF9eEAAAAAAAROT05FAgAAAARub25lAAAAAAZpc3N1ZXIJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVTK9zs+5y/RVeIPrfhFsyze+43QDUVrfW8BAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAA251bQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAUAAAADbnVtAQAAAA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AAAACdHgAAAAJc2VsbE9yZGVyAAAABnNlbmRlcgUAAAAGaXNzdWVyCQAAZwAAAAIIBQAAAAJ0eAAAAAZhbW91bnQFAAAACW1pbkFtb3VudAcJAABnAAAAAgUAAAAJbWF4QW1vdW50CAUAAAACdHgAAAAGYW1vdW50BwYJAAACAAAAAQIAAABTRXJyb3I6IE1pbmltdW0gYW1vdW50OiAxIGFCaXRDTzI7IE1heGltdW0gYW1vdW50IG9mZmVyZWQ6IDQgYUJpdENPMiBieSBVc2VyIEFjY291bnQHAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdJbnZva2VTY3JpcHRUcmFuc2FjdGlvbgQAAAABYwUAAAAHJG1hdGNoMAYHANYIsg==", "chainId": 84, "height": 932584, "spentComplexity": 0 } View: original | compacted Prev: DdKAraWPoc7HzhFWgSMJyWdiCCABWZw9tWRGLhVXP4f1 Next: 4pTDfY2jzXY2yKp7BKqJ2DK7tu5BY3ytm8HkW2M5PUPg Diff:
Old | New | Differences | |
---|---|---|---|
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | - | func p (q,r) = (" | |
48 | + | func p (q,r) = ("Bit-CO2_token: " + toBase58String(sha256(toBytes((q + r))))) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func s (t) = (t + "_to_Amazonian_Conservation") | |
54 | 54 | func u (t) = n(s(t)) | |
55 | 55 | ||
56 | 56 | ||
57 | - | func v (t) = " | |
57 | + | func v (t) = "description: " | |
58 | 58 | ||
59 | 59 | ||
60 | - | func w (t) = | |
60 | + | func w (t) = "Offered_SupplierDiscount,_max_%" | |
61 | 61 | ||
62 | 62 | ||
63 | - | func x (t) = (t | |
63 | + | func x (t) = i(w(t)) | |
64 | 64 | ||
65 | 65 | ||
66 | - | func y ( | |
66 | + | func y (t) = "Offered_Qty, balance:" | |
67 | 67 | ||
68 | 68 | ||
69 | - | func | |
69 | + | func z (t) = i(y(t)) | |
70 | 70 | ||
71 | 71 | ||
72 | - | func | |
72 | + | func A (q) = "Seller_Balance:_waves" | |
73 | 73 | ||
74 | 74 | ||
75 | - | func | |
75 | + | func B (q) = i(A(q)) | |
76 | 76 | ||
77 | 77 | ||
78 | - | func | |
78 | + | func C (D,t) = "Order_№:" | |
79 | 79 | ||
80 | 80 | ||
81 | - | func E ( | |
81 | + | func E (D,t) = i(C(D, t)) | |
82 | 82 | ||
83 | 83 | ||
84 | - | func F ( | |
84 | + | func F (t) = "UserName:" | |
85 | 85 | ||
86 | 86 | ||
87 | - | func G (t) = | |
87 | + | func G (t) = n(F(t)) | |
88 | 88 | ||
89 | 89 | ||
90 | - | func H (t) = | |
90 | + | func H (t) = "UserCountry:" | |
91 | 91 | ||
92 | 92 | ||
93 | - | func I (t) = "_%" | |
93 | + | func I (t) = "UserDiscount,_%:" | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func J (t) = i(I(t)) | |
97 | 97 | ||
98 | 98 | ||
99 | - | func K (t) = "_ | |
99 | + | func K (t) = "Order_qty,_tokens:" | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func L (t) = i(K(t)) | |
103 | 103 | ||
104 | 104 | ||
105 | - | @Callable(M) | |
106 | - | func deposit (N) = { | |
107 | - | let O = extract(M.payment) | |
108 | - | if ((O.assetId != a)) | |
105 | + | func M (t) = "_waves" | |
106 | + | ||
107 | + | ||
108 | + | func N (t) = i(M(t)) | |
109 | + | ||
110 | + | ||
111 | + | @Callable(O) | |
112 | + | func deposit (P) = { | |
113 | + | let Q = extract(O.payment) | |
114 | + | if ((Q.assetId != a)) | |
109 | 115 | then throw("Use cBitCO2 tokens only for the wallet deposit") | |
110 | 116 | else { | |
111 | - | let q = toBase58String( | |
112 | - | let | |
117 | + | let q = toBase58String(O.caller.bytes) | |
118 | + | let R = { | |
113 | 119 | let l = getInteger(this, q) | |
114 | 120 | if ($isInstanceOf(l, "Int")) | |
115 | 121 | then { | |
118 | 124 | } | |
119 | 125 | else b | |
120 | 126 | } | |
121 | - | let | |
122 | - | WriteSet([DataEntry(q, | |
127 | + | let S = (R + Q.amount) | |
128 | + | WriteSet([DataEntry(q, S)]) | |
123 | 129 | } | |
124 | 130 | } | |
125 | 131 | ||
126 | 132 | ||
127 | 133 | ||
128 | - | @Callable( | |
129 | - | func AddSupplierToken (r, | |
130 | - | let q = toBase58String( | |
134 | + | @Callable(O) | |
135 | + | func AddSupplierToken (r,T,U,V,d,W) = { | |
136 | + | let q = toBase58String(O.caller.bytes) | |
131 | 137 | let t = p(q, r) | |
132 | - | if ((0 >= | |
138 | + | if ((0 >= V)) | |
133 | 139 | then throw("Sorry, insufficient token offer") | |
134 | - | else WriteSet([DataEntry((" | |
140 | + | else WriteSet([DataEntry(("Supplier:_" + s(t)), q), DataEntry(("Title:_" + q), r), DataEntry(("ProjectName:_" + q), T), DataEntry(("Country:_" + q), U), DataEntry(y(t), V), DataEntry(("NomTokenPrice:_" + M(t)), (c * f)), DataEntry(("Max_Descuento_ofrecido:" + w(t)), d), DataEntry(("Development:_" + v(t)), W)]) | |
135 | 141 | } | |
136 | 142 | ||
137 | 143 | ||
138 | 144 | ||
139 | - | @Callable( | |
140 | - | func purchase (t, | |
141 | - | let | |
142 | - | if (isDefined( | |
145 | + | @Callable(O) | |
146 | + | func purchase (t,X,Y,Z,aa) = { | |
147 | + | let Q = extract(O.payment) | |
148 | + | if (isDefined(Q.assetId)) | |
143 | 149 | then throw("you can adquire cBitCO2 only by Waves tokens") | |
144 | 150 | else { | |
145 | 151 | let q = { | |
151 | 157 | } | |
152 | 158 | else g | |
153 | 159 | } | |
154 | - | let | |
155 | - | let l = getInteger(this, | |
160 | + | let V = { | |
161 | + | let l = getInteger(this, y(t)) | |
156 | 162 | if ($isInstanceOf(l, "Int")) | |
157 | 163 | then { | |
158 | 164 | let m = l | |
160 | 166 | } | |
161 | 167 | else b | |
162 | 168 | } | |
163 | - | let | |
164 | - | let l = getInteger(this, | |
169 | + | let ab = { | |
170 | + | let l = getInteger(this, A(q)) | |
165 | 171 | if ($isInstanceOf(l, "Int")) | |
166 | 172 | then { | |
167 | 173 | let m = l | |
169 | 175 | } | |
170 | 176 | else 0 | |
171 | 177 | } | |
172 | - | let | |
173 | - | let | |
174 | - | let | |
175 | - | if (( | |
178 | + | let ac = toBase58String(O.caller.bytes) | |
179 | + | let ad = ((((100 - Z) * c) * f) / 100) | |
180 | + | let ae = (aa * ad) | |
181 | + | if ((ae > Q.amount)) | |
176 | 182 | then throw("Payment Amount cannot be less than item Purchase Order") | |
177 | - | else if (( | |
183 | + | else if ((Q.amount > ae)) | |
178 | 184 | then throw("Payment Amount can't be higher than item Purchase Order") | |
179 | - | else ScriptResult(WriteSet([DataEntry( | |
185 | + | else ScriptResult(WriteSet([DataEntry(C(ac, t), (E(ac, t) + 1)), DataEntry(y(t), (V - aa)), DataEntry(F(t), X), DataEntry(H(t), Y), DataEntry(I(t), Z), DataEntry(K(t), aa), DataEntry(("UserPrice_1_token,_waves:_" + ac), ad), DataEntry(("Payment_amount,_waves:_" + ac), ae), DataEntry(("Order_Status:_" + ac), "confirmed"), DataEntry(A(q), (ab + Q.amount))]), TransferSet([ScriptTransfer(addressFromStringValue(ac), aa, a)])) | |
180 | 186 | } | |
181 | 187 | } | |
182 | 188 | ||
183 | 189 | ||
184 | 190 | ||
185 | - | @Callable( | |
186 | - | func withdraw (r, | |
187 | - | let q = toBase58String( | |
191 | + | @Callable(O) | |
192 | + | func withdraw (r,P) = { | |
193 | + | let q = toBase58String(O.caller.bytes) | |
188 | 194 | let t = p(q, r) | |
189 | - | let | |
190 | - | let l = getInteger(this, | |
195 | + | let V = { | |
196 | + | let l = getInteger(this, y(t)) | |
191 | 197 | if ($isInstanceOf(l, "Int")) | |
192 | 198 | then { | |
193 | 199 | let m = l | |
195 | 201 | } | |
196 | 202 | else b | |
197 | 203 | } | |
198 | - | let | |
199 | - | if ((0 > | |
204 | + | let S = (V - P) | |
205 | + | if ((0 > P)) | |
200 | 206 | then throw("Can't withdraw negative amount") | |
201 | - | else if ((0 > | |
207 | + | else if ((0 > S)) | |
202 | 208 | then throw("Not enought /suficiente balance") | |
203 | - | else ScriptResult(WriteSet([DataEntry(t, | |
209 | + | else ScriptResult(WriteSet([DataEntry(t, S)]), TransferSet([ScriptTransfer(O.caller, P, a)])) | |
204 | 210 | } | |
205 | 211 | ||
206 | 212 | ||
207 | - | @Verifier( | |
208 | - | func | |
209 | - | let l = | |
213 | + | @Verifier(af) | |
214 | + | func ag () = { | |
215 | + | let l = af | |
210 | 216 | if ($isInstanceOf(l, "SetScriptTransaction")) | |
211 | 217 | then { | |
212 | - | let | |
213 | - | sigVerify( | |
218 | + | let ah = l | |
219 | + | sigVerify(af.bodyBytes, af.proofs[0], e) | |
214 | 220 | } | |
215 | 221 | else if ($isInstanceOf(l, "DataTransaction")) | |
216 | 222 | then { | |
217 | - | let | |
223 | + | let ai = l | |
218 | 224 | true | |
219 | 225 | } | |
220 | 226 | else if ($isInstanceOf(l, "TransferTransaction")) | |
221 | 227 | then { | |
222 | - | let | |
223 | - | let | |
224 | - | if (( | |
228 | + | let af = l | |
229 | + | let aj = toBase58String(addressFromRecipient(af.recipient).bytes) | |
230 | + | if ((af.sender == h)) | |
225 | 231 | then true | |
226 | 232 | else throw("You can't transferred this token") | |
227 | 233 | } | |
228 | 234 | else if ($isInstanceOf(l, "ExchangeTransaction")) | |
229 | 235 | then { | |
230 | - | let | |
231 | - | let | |
236 | + | let af = l | |
237 | + | let ak = if (!(isDefined(af.sellOrder.assetPair.priceAsset))) | |
232 | 238 | then true | |
233 | - | else !(isDefined( | |
234 | - | | |
239 | + | else !(isDefined(af.sellOrder.assetPair.amountAsset)) | |
240 | + | ak | |
235 | 241 | } | |
236 | 242 | else if ($isInstanceOf(l, "ExchangeTransaction")) | |
237 | 243 | then { | |
238 | - | let | |
239 | - | let | |
240 | - | let | |
241 | - | let | |
242 | - | let | |
243 | - | let | |
244 | - | let | |
245 | - | let | |
246 | - | let | |
247 | - | let | |
248 | - | let | |
249 | - | if (if ( | |
250 | - | then if (isDefined(( | |
244 | + | let af = l | |
245 | + | let al = af.proofs[1] | |
246 | + | let am = addressFromPublicKey(al) | |
247 | + | let an = 1400000 | |
248 | + | let ao = ((wavesBalance(am) - an) >= af.buyOrder.price) | |
249 | + | let ap = sigVerify(af.sellOrder.bodyBytes, af.sellOrder.proofs[0], af.sellOrder.senderPublicKey) | |
250 | + | let aq = sigVerify(af.buyOrder.bodyBytes, af.buyOrder.proofs[0], af.buyOrder.senderPublicKey) | |
251 | + | let ar = toBase58String(af.sellOrder.sender.bytes) | |
252 | + | let as = 1 | |
253 | + | let at = 4 | |
254 | + | let au = (at * c) | |
255 | + | if (if (aq) | |
256 | + | then if (isDefined((au >= af.buyOrder.price))) | |
251 | 257 | then true | |
252 | 258 | else throw("El monto a pagar no puede ser menor que el precio de venta") | |
253 | 259 | else false) | |
254 | 260 | then true | |
255 | - | else if ( | |
256 | - | then if (if (if (( | |
257 | - | then ( | |
261 | + | else if (ap) | |
262 | + | then if (if (if ((af.sellOrder.sender == h)) | |
263 | + | then (af.amount >= as) | |
258 | 264 | else false) | |
259 | - | then ( | |
265 | + | then (at >= af.amount) | |
260 | 266 | else false) | |
261 | 267 | then true | |
262 | 268 | else throw("Error: Minimum amount: 1 aBitCO2; Maximum amount offered: 4 aBitCO2 by User Account") | |
264 | 270 | } | |
265 | 271 | else if ($isInstanceOf(l, "InvokeScriptTransaction")) | |
266 | 272 | then { | |
267 | - | let | |
273 | + | let av = l | |
268 | 274 | true | |
269 | 275 | } | |
270 | 276 | else false |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'ETbtNp6MBuSM9EfjmLDwctrYEBBiq8CZ7ti7zbwTktry' | |
5 | 5 | ||
6 | 6 | let b = 332800 | |
7 | 7 | ||
8 | 8 | let c = 1 | |
9 | 9 | ||
10 | 10 | let d = 12 | |
11 | 11 | ||
12 | 12 | let e = base58'4AHsCbS9QYVdKNvxrPWwsMwwy3KqXaCMXeAscExJZk9L' | |
13 | 13 | ||
14 | 14 | let f = 100000000 | |
15 | 15 | ||
16 | 16 | let g = "none" | |
17 | 17 | ||
18 | 18 | let h = Address(base58'3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4') | |
19 | 19 | ||
20 | 20 | func i (j) = { | |
21 | 21 | let k = { | |
22 | 22 | let l = getInteger(this, j) | |
23 | 23 | if ($isInstanceOf(l, "Int")) | |
24 | 24 | then { | |
25 | 25 | let m = l | |
26 | 26 | m | |
27 | 27 | } | |
28 | 28 | else 0 | |
29 | 29 | } | |
30 | 30 | k | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func n (j) = { | |
35 | 35 | let o = { | |
36 | 36 | let l = getString(this, j) | |
37 | 37 | if ($isInstanceOf(l, "String")) | |
38 | 38 | then { | |
39 | 39 | let m = l | |
40 | 40 | m | |
41 | 41 | } | |
42 | 42 | else g | |
43 | 43 | } | |
44 | 44 | o | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | - | func p (q,r) = (" | |
48 | + | func p (q,r) = ("Bit-CO2_token: " + toBase58String(sha256(toBytes((q + r))))) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func s (t) = (t + "_to_Amazonian_Conservation") | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func u (t) = n(s(t)) | |
55 | 55 | ||
56 | 56 | ||
57 | - | func v (t) = " | |
57 | + | func v (t) = "description: " | |
58 | 58 | ||
59 | 59 | ||
60 | - | func w (t) = | |
60 | + | func w (t) = "Offered_SupplierDiscount,_max_%" | |
61 | 61 | ||
62 | 62 | ||
63 | - | func x (t) = (t | |
63 | + | func x (t) = i(w(t)) | |
64 | 64 | ||
65 | 65 | ||
66 | - | func y ( | |
66 | + | func y (t) = "Offered_Qty, balance:" | |
67 | 67 | ||
68 | 68 | ||
69 | - | func | |
69 | + | func z (t) = i(y(t)) | |
70 | 70 | ||
71 | 71 | ||
72 | - | func | |
72 | + | func A (q) = "Seller_Balance:_waves" | |
73 | 73 | ||
74 | 74 | ||
75 | - | func | |
75 | + | func B (q) = i(A(q)) | |
76 | 76 | ||
77 | 77 | ||
78 | - | func | |
78 | + | func C (D,t) = "Order_№:" | |
79 | 79 | ||
80 | 80 | ||
81 | - | func E ( | |
81 | + | func E (D,t) = i(C(D, t)) | |
82 | 82 | ||
83 | 83 | ||
84 | - | func F ( | |
84 | + | func F (t) = "UserName:" | |
85 | 85 | ||
86 | 86 | ||
87 | - | func G (t) = | |
87 | + | func G (t) = n(F(t)) | |
88 | 88 | ||
89 | 89 | ||
90 | - | func H (t) = | |
90 | + | func H (t) = "UserCountry:" | |
91 | 91 | ||
92 | 92 | ||
93 | - | func I (t) = "_%" | |
93 | + | func I (t) = "UserDiscount,_%:" | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func J (t) = i(I(t)) | |
97 | 97 | ||
98 | 98 | ||
99 | - | func K (t) = "_ | |
99 | + | func K (t) = "Order_qty,_tokens:" | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func L (t) = i(K(t)) | |
103 | 103 | ||
104 | 104 | ||
105 | - | @Callable(M) | |
106 | - | func deposit (N) = { | |
107 | - | let O = extract(M.payment) | |
108 | - | if ((O.assetId != a)) | |
105 | + | func M (t) = "_waves" | |
106 | + | ||
107 | + | ||
108 | + | func N (t) = i(M(t)) | |
109 | + | ||
110 | + | ||
111 | + | @Callable(O) | |
112 | + | func deposit (P) = { | |
113 | + | let Q = extract(O.payment) | |
114 | + | if ((Q.assetId != a)) | |
109 | 115 | then throw("Use cBitCO2 tokens only for the wallet deposit") | |
110 | 116 | else { | |
111 | - | let q = toBase58String( | |
112 | - | let | |
117 | + | let q = toBase58String(O.caller.bytes) | |
118 | + | let R = { | |
113 | 119 | let l = getInteger(this, q) | |
114 | 120 | if ($isInstanceOf(l, "Int")) | |
115 | 121 | then { | |
116 | 122 | let m = l | |
117 | 123 | m | |
118 | 124 | } | |
119 | 125 | else b | |
120 | 126 | } | |
121 | - | let | |
122 | - | WriteSet([DataEntry(q, | |
127 | + | let S = (R + Q.amount) | |
128 | + | WriteSet([DataEntry(q, S)]) | |
123 | 129 | } | |
124 | 130 | } | |
125 | 131 | ||
126 | 132 | ||
127 | 133 | ||
128 | - | @Callable( | |
129 | - | func AddSupplierToken (r, | |
130 | - | let q = toBase58String( | |
134 | + | @Callable(O) | |
135 | + | func AddSupplierToken (r,T,U,V,d,W) = { | |
136 | + | let q = toBase58String(O.caller.bytes) | |
131 | 137 | let t = p(q, r) | |
132 | - | if ((0 >= | |
138 | + | if ((0 >= V)) | |
133 | 139 | then throw("Sorry, insufficient token offer") | |
134 | - | else WriteSet([DataEntry((" | |
140 | + | else WriteSet([DataEntry(("Supplier:_" + s(t)), q), DataEntry(("Title:_" + q), r), DataEntry(("ProjectName:_" + q), T), DataEntry(("Country:_" + q), U), DataEntry(y(t), V), DataEntry(("NomTokenPrice:_" + M(t)), (c * f)), DataEntry(("Max_Descuento_ofrecido:" + w(t)), d), DataEntry(("Development:_" + v(t)), W)]) | |
135 | 141 | } | |
136 | 142 | ||
137 | 143 | ||
138 | 144 | ||
139 | - | @Callable( | |
140 | - | func purchase (t, | |
141 | - | let | |
142 | - | if (isDefined( | |
145 | + | @Callable(O) | |
146 | + | func purchase (t,X,Y,Z,aa) = { | |
147 | + | let Q = extract(O.payment) | |
148 | + | if (isDefined(Q.assetId)) | |
143 | 149 | then throw("you can adquire cBitCO2 only by Waves tokens") | |
144 | 150 | else { | |
145 | 151 | let q = { | |
146 | 152 | let l = getString(this, s(t)) | |
147 | 153 | if ($isInstanceOf(l, "String")) | |
148 | 154 | then { | |
149 | 155 | let m = l | |
150 | 156 | m | |
151 | 157 | } | |
152 | 158 | else g | |
153 | 159 | } | |
154 | - | let | |
155 | - | let l = getInteger(this, | |
160 | + | let V = { | |
161 | + | let l = getInteger(this, y(t)) | |
156 | 162 | if ($isInstanceOf(l, "Int")) | |
157 | 163 | then { | |
158 | 164 | let m = l | |
159 | 165 | m | |
160 | 166 | } | |
161 | 167 | else b | |
162 | 168 | } | |
163 | - | let | |
164 | - | let l = getInteger(this, | |
169 | + | let ab = { | |
170 | + | let l = getInteger(this, A(q)) | |
165 | 171 | if ($isInstanceOf(l, "Int")) | |
166 | 172 | then { | |
167 | 173 | let m = l | |
168 | 174 | m | |
169 | 175 | } | |
170 | 176 | else 0 | |
171 | 177 | } | |
172 | - | let | |
173 | - | let | |
174 | - | let | |
175 | - | if (( | |
178 | + | let ac = toBase58String(O.caller.bytes) | |
179 | + | let ad = ((((100 - Z) * c) * f) / 100) | |
180 | + | let ae = (aa * ad) | |
181 | + | if ((ae > Q.amount)) | |
176 | 182 | then throw("Payment Amount cannot be less than item Purchase Order") | |
177 | - | else if (( | |
183 | + | else if ((Q.amount > ae)) | |
178 | 184 | then throw("Payment Amount can't be higher than item Purchase Order") | |
179 | - | else ScriptResult(WriteSet([DataEntry( | |
185 | + | else ScriptResult(WriteSet([DataEntry(C(ac, t), (E(ac, t) + 1)), DataEntry(y(t), (V - aa)), DataEntry(F(t), X), DataEntry(H(t), Y), DataEntry(I(t), Z), DataEntry(K(t), aa), DataEntry(("UserPrice_1_token,_waves:_" + ac), ad), DataEntry(("Payment_amount,_waves:_" + ac), ae), DataEntry(("Order_Status:_" + ac), "confirmed"), DataEntry(A(q), (ab + Q.amount))]), TransferSet([ScriptTransfer(addressFromStringValue(ac), aa, a)])) | |
180 | 186 | } | |
181 | 187 | } | |
182 | 188 | ||
183 | 189 | ||
184 | 190 | ||
185 | - | @Callable( | |
186 | - | func withdraw (r, | |
187 | - | let q = toBase58String( | |
191 | + | @Callable(O) | |
192 | + | func withdraw (r,P) = { | |
193 | + | let q = toBase58String(O.caller.bytes) | |
188 | 194 | let t = p(q, r) | |
189 | - | let | |
190 | - | let l = getInteger(this, | |
195 | + | let V = { | |
196 | + | let l = getInteger(this, y(t)) | |
191 | 197 | if ($isInstanceOf(l, "Int")) | |
192 | 198 | then { | |
193 | 199 | let m = l | |
194 | 200 | m | |
195 | 201 | } | |
196 | 202 | else b | |
197 | 203 | } | |
198 | - | let | |
199 | - | if ((0 > | |
204 | + | let S = (V - P) | |
205 | + | if ((0 > P)) | |
200 | 206 | then throw("Can't withdraw negative amount") | |
201 | - | else if ((0 > | |
207 | + | else if ((0 > S)) | |
202 | 208 | then throw("Not enought /suficiente balance") | |
203 | - | else ScriptResult(WriteSet([DataEntry(t, | |
209 | + | else ScriptResult(WriteSet([DataEntry(t, S)]), TransferSet([ScriptTransfer(O.caller, P, a)])) | |
204 | 210 | } | |
205 | 211 | ||
206 | 212 | ||
207 | - | @Verifier( | |
208 | - | func | |
209 | - | let l = | |
213 | + | @Verifier(af) | |
214 | + | func ag () = { | |
215 | + | let l = af | |
210 | 216 | if ($isInstanceOf(l, "SetScriptTransaction")) | |
211 | 217 | then { | |
212 | - | let | |
213 | - | sigVerify( | |
218 | + | let ah = l | |
219 | + | sigVerify(af.bodyBytes, af.proofs[0], e) | |
214 | 220 | } | |
215 | 221 | else if ($isInstanceOf(l, "DataTransaction")) | |
216 | 222 | then { | |
217 | - | let | |
223 | + | let ai = l | |
218 | 224 | true | |
219 | 225 | } | |
220 | 226 | else if ($isInstanceOf(l, "TransferTransaction")) | |
221 | 227 | then { | |
222 | - | let | |
223 | - | let | |
224 | - | if (( | |
228 | + | let af = l | |
229 | + | let aj = toBase58String(addressFromRecipient(af.recipient).bytes) | |
230 | + | if ((af.sender == h)) | |
225 | 231 | then true | |
226 | 232 | else throw("You can't transferred this token") | |
227 | 233 | } | |
228 | 234 | else if ($isInstanceOf(l, "ExchangeTransaction")) | |
229 | 235 | then { | |
230 | - | let | |
231 | - | let | |
236 | + | let af = l | |
237 | + | let ak = if (!(isDefined(af.sellOrder.assetPair.priceAsset))) | |
232 | 238 | then true | |
233 | - | else !(isDefined( | |
234 | - | | |
239 | + | else !(isDefined(af.sellOrder.assetPair.amountAsset)) | |
240 | + | ak | |
235 | 241 | } | |
236 | 242 | else if ($isInstanceOf(l, "ExchangeTransaction")) | |
237 | 243 | then { | |
238 | - | let | |
239 | - | let | |
240 | - | let | |
241 | - | let | |
242 | - | let | |
243 | - | let | |
244 | - | let | |
245 | - | let | |
246 | - | let | |
247 | - | let | |
248 | - | let | |
249 | - | if (if ( | |
250 | - | then if (isDefined(( | |
244 | + | let af = l | |
245 | + | let al = af.proofs[1] | |
246 | + | let am = addressFromPublicKey(al) | |
247 | + | let an = 1400000 | |
248 | + | let ao = ((wavesBalance(am) - an) >= af.buyOrder.price) | |
249 | + | let ap = sigVerify(af.sellOrder.bodyBytes, af.sellOrder.proofs[0], af.sellOrder.senderPublicKey) | |
250 | + | let aq = sigVerify(af.buyOrder.bodyBytes, af.buyOrder.proofs[0], af.buyOrder.senderPublicKey) | |
251 | + | let ar = toBase58String(af.sellOrder.sender.bytes) | |
252 | + | let as = 1 | |
253 | + | let at = 4 | |
254 | + | let au = (at * c) | |
255 | + | if (if (aq) | |
256 | + | then if (isDefined((au >= af.buyOrder.price))) | |
251 | 257 | then true | |
252 | 258 | else throw("El monto a pagar no puede ser menor que el precio de venta") | |
253 | 259 | else false) | |
254 | 260 | then true | |
255 | - | else if ( | |
256 | - | then if (if (if (( | |
257 | - | then ( | |
261 | + | else if (ap) | |
262 | + | then if (if (if ((af.sellOrder.sender == h)) | |
263 | + | then (af.amount >= as) | |
258 | 264 | else false) | |
259 | - | then ( | |
265 | + | then (at >= af.amount) | |
260 | 266 | else false) | |
261 | 267 | then true | |
262 | 268 | else throw("Error: Minimum amount: 1 aBitCO2; Maximum amount offered: 4 aBitCO2 by User Account") | |
263 | 269 | else false | |
264 | 270 | } | |
265 | 271 | else if ($isInstanceOf(l, "InvokeScriptTransaction")) | |
266 | 272 | then { | |
267 | - | let | |
273 | + | let av = l | |
268 | 274 | true | |
269 | 275 | } | |
270 | 276 | else false | |
271 | 277 | } | |
272 | 278 |
github/deemru/w8io/169f3d6 100.08 ms ◑