tx · EiuNdYiHDCqeJ2Nk1Tzg736wH54ByhDWPCzcsUnV9CLU 3N9GKCsktAL7oPFmaKsgPBoDfu3ijk23Vmm: -0.01400000 Waves 2020.04.03 16:38 [938062] smart account 3N9GKCsktAL7oPFmaKsgPBoDfu3ijk23Vmm > SELF 0.00000000 Waves
{ "type": 13, "id": "EiuNdYiHDCqeJ2Nk1Tzg736wH54ByhDWPCzcsUnV9CLU", "fee": 1400000, "feeAssetId": null, "timestamp": 1585917574611, "version": 1, "sender": "3N9GKCsktAL7oPFmaKsgPBoDfu3ijk23Vmm", "senderPublicKey": "BjzUYgMDny7cYArZdjtnVo62UoVZKiCEeCoKYFnevrWU", "proofs": [ "5jDM4b8onCJTz74cfsg5eoaQ5NP8SNaJbWVRSJnzhHXWLLHsvtM4k4G5B8QEaJeC7JASvAw7r7RC2BkM3a2LXvya" ], "script": "base64:AAIDAAAAAAAAABgIARIDCgEBEgkKBwgICAgBCAgSBAoCCAEAAAAtAAAAAAdhQml0Q08yAQAAACDH+HoAnTdQnyoybLskiHPdWM4Tg4veh8IaLSgbZ8EolgAAAAAIc3RhcnRRdHkAAAAAAAACSfAAAAAACG5vbVByaWNlAAAAAAAAAAABAAAAAAN3dnMAAAAAAAX14QAAAAAABE5PTkUCAAAABG5vbmUAAAAAC093bmVyUHViS2V5AQAAACCfmEAXldMf/BjZSW6/ZEf7k5r0z4tisH8Gw1nNGq2ESQAAAAAGaXNzdWVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFU1D3rjtmNadk6Svjh9eFrA7lQldo3DBRUAAAAAANpZ3YAAAAAAAAAABIAAAAAA2NQQgAAAAAABT7GAAAAAAADdUlQAAAAAAAAAAAFAAAAAANwSVAAAAAAAAAAAAoAAAAAA3NJUAAAAAAAAAAAAQAAAAADZUlQAAAAAAAAAAABAAAAAAJwQQkBAAAAB0FkZHJlc3MAAAABAQAAABoBVMr3Oz7nL9FV4g+t+EWzLN77jdANRWt9bwEAAAAOZ2V0TnVtYmVyQ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ieXRlcwMJAAAAAAAAAggFAAAAAnR4AAAABnNlbmRlcgUAAAAGaXNzdWVyBgkAAAIAAAABAgAAACBZb3UgY2FuJ3QgdHJhbnNmZXJyZWQgdGhpcyB0b2tlbgcYUFYz", "chainId": 84, "height": 938062, "spentComplexity": 0 } View: original | compacted Prev: 4NqqeXbRnJPW3yXmtT6tWpR5yzxKkeWQuB2Vh13E3XHM Next: AD5UWq5nKzAXeJPzYNrEthHKX1QXJqeakH2taHE5CY6h Diff:
Old | New | Differences | |
---|---|---|---|
192 | 192 | else 0 | |
193 | 193 | } | |
194 | 194 | let an = toBase58String(ad.caller.bytes) | |
195 | - | let ao = ( | |
195 | + | let ao = (al - ((h * al) / 100)) | |
196 | 196 | let ap = ((ao * j) / (i * 100)) | |
197 | 197 | let aq = ((ao * k) / 100) | |
198 | 198 | let ar = ((ao * m) / 100) | |
203 | 203 | then throw("Payment Amount can't be less than item Purchase Order") | |
204 | 204 | else if ((af.amount > al)) | |
205 | 205 | then throw("Payment Amount can't be higher than item Purchase Order") | |
206 | - | else ScriptResult(WriteSet([DataEntry(D(an, z), (F(an, z) + 1)), DataEntry(G(z), ai), DataEntry(I(z), aj), DataEntry(K(z), ak), DataEntry("Payment_amount,_wvs", al), DataEntry("Imp, %", h), DataEntry("STtl, wvs", ao), DataEntry("CP 1 | |
206 | + | else ScriptResult(WriteSet([DataEntry(D(an, z), (F(an, z) + 1)), DataEntry(G(z), ai), DataEntry(I(z), aj), DataEntry(K(z), ak), DataEntry("Payment_amount,_wvs", al), DataEntry("Imp, %", h), DataEntry("STtl, wvs", ao), DataEntry("CP 1 B, wvs", i), DataEntry(N(z), ap), DataEntry(P(z), aq), DataEntry(R(z), at), DataEntry(T(U), ar), DataEntry("EcSys", as), DataEntry(("Order_Status:_" + an), "confirmed"), DataEntry(L(w), (am + af.amount))]), TransferSet(nil)) | |
207 | 207 | } | |
208 | 208 | } | |
209 | 209 |
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 = 150000 | |
7 | 7 | ||
8 | 8 | let c = 1 | |
9 | 9 | ||
10 | 10 | let d = 100000000 | |
11 | 11 | ||
12 | 12 | let e = "none" | |
13 | 13 | ||
14 | 14 | let f = base58'BjzUYgMDny7cYArZdjtnVo62UoVZKiCEeCoKYFnevrWU' | |
15 | 15 | ||
16 | 16 | let g = Address(base58'3N9GKCsktAL7oPFmaKsgPBoDfu3ijk23Vmm') | |
17 | 17 | ||
18 | 18 | let h = 18 | |
19 | 19 | ||
20 | 20 | let i = 88000000 | |
21 | 21 | ||
22 | 22 | let j = 5 | |
23 | 23 | ||
24 | 24 | let k = 10 | |
25 | 25 | ||
26 | 26 | let l = 1 | |
27 | 27 | ||
28 | 28 | let m = 1 | |
29 | 29 | ||
30 | 30 | let n = Address(base58'3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4') | |
31 | 31 | ||
32 | 32 | func o (p) = { | |
33 | 33 | let q = { | |
34 | 34 | let r = getInteger(this, p) | |
35 | 35 | if ($isInstanceOf(r, "Int")) | |
36 | 36 | then { | |
37 | 37 | let s = r | |
38 | 38 | s | |
39 | 39 | } | |
40 | 40 | else 0 | |
41 | 41 | } | |
42 | 42 | q | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func t (p) = { | |
47 | 47 | let u = { | |
48 | 48 | let r = getString(this, p) | |
49 | 49 | if ($isInstanceOf(r, "String")) | |
50 | 50 | then { | |
51 | 51 | let s = r | |
52 | 52 | s | |
53 | 53 | } | |
54 | 54 | else e | |
55 | 55 | } | |
56 | 56 | u | |
57 | 57 | } | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func v (w,x) = ("A y G:" + toBase58String(sha256(toBytes((w + x))))) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func y (z) = (z + "_P SAC") | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func A (z) = t(y(z)) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func B (n) = (n + "_A-PreICO") | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func C (n) = t(B(n)) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func D (E,z) = "Order_№:" | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func F (E,z) = o(D(E, z)) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func G (z) = "UserName:" | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func H (z) = t(G(z)) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func I (z) = "UserPais:" | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func J (z) = t(I(z)) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func K (z) = "UD:" | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func L (w) = "Seller_Balance,_aBitCO2" | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func M (w) = o(L(w)) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func N (z) = "UI,_%:" | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func O (z) = o(N(z)) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func P (z) = "PI,_%:" | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func Q (z) = o(P(z)) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func R (z) = "SI,_%:" | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func S (z) = o(R(z)) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func T (U) = "EI,_%:" | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func V (U) = o(T(U)) | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func W (z) = "UserCountry:" | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func X (z) = "UserDiscount, %:" | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func Y (z) = o(X(z)) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func Z (z) = "Order_qty,_tokens:" | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func aa (z) = o(Z(z)) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func ab (z) = "Balance/Saldo, tokens:" | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func ac (z) = o(ab(z)) | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | @Callable(ad) | |
148 | 148 | func deposit (ae) = { | |
149 | 149 | let af = extract(ad.payment) | |
150 | 150 | if ((af.assetId != a)) | |
151 | 151 | then throw("Use cBitCO2 tokens only for the wallet deposit") | |
152 | 152 | else { | |
153 | 153 | let w = toBase58String(ad.caller.bytes) | |
154 | 154 | let ag = { | |
155 | 155 | let r = getInteger(this, w) | |
156 | 156 | if ($isInstanceOf(r, "Int")) | |
157 | 157 | then { | |
158 | 158 | let s = r | |
159 | 159 | s | |
160 | 160 | } | |
161 | 161 | else b | |
162 | 162 | } | |
163 | 163 | let ah = (ag + af.amount) | |
164 | 164 | WriteSet([DataEntry(w, ah)]) | |
165 | 165 | } | |
166 | 166 | } | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | ||
170 | 170 | @Callable(ad) | |
171 | 171 | func purchaseGTS (z,ai,aj,ak,al,n,U) = { | |
172 | 172 | let af = extract(ad.payment) | |
173 | 173 | if (isDefined(af.assetId)) | |
174 | 174 | then throw("you can adquire cBitCO2 only by Waves tokens") | |
175 | 175 | else { | |
176 | 176 | let w = { | |
177 | 177 | let r = getString(this, y(z)) | |
178 | 178 | if ($isInstanceOf(r, "String")) | |
179 | 179 | then { | |
180 | 180 | let s = r | |
181 | 181 | s | |
182 | 182 | } | |
183 | 183 | else e | |
184 | 184 | } | |
185 | 185 | let am = { | |
186 | 186 | let r = getInteger(this, L(w)) | |
187 | 187 | if ($isInstanceOf(r, "Int")) | |
188 | 188 | then { | |
189 | 189 | let s = r | |
190 | 190 | s | |
191 | 191 | } | |
192 | 192 | else 0 | |
193 | 193 | } | |
194 | 194 | let an = toBase58String(ad.caller.bytes) | |
195 | - | let ao = ( | |
195 | + | let ao = (al - ((h * al) / 100)) | |
196 | 196 | let ap = ((ao * j) / (i * 100)) | |
197 | 197 | let aq = ((ao * k) / 100) | |
198 | 198 | let ar = ((ao * m) / 100) | |
199 | 199 | let as = ((ao * m) / (i * 100)) | |
200 | 200 | let at = ((al - k) - ar) | |
201 | 201 | let au = ((ao * l) / (i * 100)) | |
202 | 202 | if ((al > af.amount)) | |
203 | 203 | then throw("Payment Amount can't be less than item Purchase Order") | |
204 | 204 | else if ((af.amount > al)) | |
205 | 205 | then throw("Payment Amount can't be higher than item Purchase Order") | |
206 | - | else ScriptResult(WriteSet([DataEntry(D(an, z), (F(an, z) + 1)), DataEntry(G(z), ai), DataEntry(I(z), aj), DataEntry(K(z), ak), DataEntry("Payment_amount,_wvs", al), DataEntry("Imp, %", h), DataEntry("STtl, wvs", ao), DataEntry("CP 1 | |
206 | + | else ScriptResult(WriteSet([DataEntry(D(an, z), (F(an, z) + 1)), DataEntry(G(z), ai), DataEntry(I(z), aj), DataEntry(K(z), ak), DataEntry("Payment_amount,_wvs", al), DataEntry("Imp, %", h), DataEntry("STtl, wvs", ao), DataEntry("CP 1 B, wvs", i), DataEntry(N(z), ap), DataEntry(P(z), aq), DataEntry(R(z), at), DataEntry(T(U), ar), DataEntry("EcSys", as), DataEntry(("Order_Status:_" + an), "confirmed"), DataEntry(L(w), (am + af.amount))]), TransferSet(nil)) | |
207 | 207 | } | |
208 | 208 | } | |
209 | 209 | ||
210 | 210 | ||
211 | 211 | ||
212 | 212 | @Callable(ad) | |
213 | 213 | func withdraw (z,ae) = { | |
214 | 214 | let an = toBase58String(ad.caller.bytes) | |
215 | 215 | let w = { | |
216 | 216 | let r = getString(this, y(z)) | |
217 | 217 | if ($isInstanceOf(r, "String")) | |
218 | 218 | then { | |
219 | 219 | let s = r | |
220 | 220 | s | |
221 | 221 | } | |
222 | 222 | else e | |
223 | 223 | } | |
224 | 224 | let av = { | |
225 | 225 | let r = getInteger(this, ab(z)) | |
226 | 226 | if ($isInstanceOf(r, "Int")) | |
227 | 227 | then { | |
228 | 228 | let s = r | |
229 | 229 | s | |
230 | 230 | } | |
231 | 231 | else b | |
232 | 232 | } | |
233 | 233 | let ah = (av - ae) | |
234 | 234 | if ((0 > ae)) | |
235 | 235 | then throw("Can't withdraw negative amount") | |
236 | 236 | else if ((0 > ah)) | |
237 | 237 | then throw("Not enought /suficiente balance") | |
238 | 238 | else ScriptResult(WriteSet([DataEntry(z, ah)]), TransferSet([ScriptTransfer(ad.caller, ae, a)])) | |
239 | 239 | } | |
240 | 240 | ||
241 | 241 | ||
242 | 242 | @Verifier(aw) | |
243 | 243 | func ax () = { | |
244 | 244 | let r = aw | |
245 | 245 | if ($isInstanceOf(r, "SetScriptTransaction")) | |
246 | 246 | then { | |
247 | 247 | let ay = r | |
248 | 248 | sigVerify(aw.bodyBytes, aw.proofs[0], f) | |
249 | 249 | } | |
250 | 250 | else if ($isInstanceOf(r, "DataTransaction")) | |
251 | 251 | then { | |
252 | 252 | let az = r | |
253 | 253 | true | |
254 | 254 | } | |
255 | 255 | else if ($isInstanceOf(r, "TransferTransaction")) | |
256 | 256 | then { | |
257 | 257 | let aw = r | |
258 | 258 | let aA = toBase58String(addressFromRecipient(aw.recipient).bytes) | |
259 | 259 | if ((aw.sender == g)) | |
260 | 260 | then true | |
261 | 261 | else throw("You can't transferred this token") | |
262 | 262 | } | |
263 | 263 | else false | |
264 | 264 | } | |
265 | 265 |
github/deemru/w8io/169f3d6 60.57 ms ◑