tx · 8Rp416FtWTQkonwvrGnZKTh84auqaNS3NQzLQg9QYHvh 3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8: -0.01400000 Waves 2020.08.26 12:26 [1149495] smart account 3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8 > SELF 0.00000000 Waves
{ "type": 13, "id": "8Rp416FtWTQkonwvrGnZKTh84auqaNS3NQzLQg9QYHvh", "fee": 1400000, "feeAssetId": null, "timestamp": 1598433941084, "version": 1, "sender": "3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8", "senderPublicKey": "8xCH82jKi2DM7HXXD45fmftPUDjr3TJpjanUATKMK37U", "proofs": [ "4WSgazW6Ke1YTgM6WEEzuqQFLYsnv882fJ2nu4LFQyeESeGVwxgBZaYKx7rynD2ewWG6NpqxQbU5T1pQw6dtmmaD" ], "script": "base64:AAIDAAAAAAAAACAIARIECgIICBIHCgUICAgIARIHCgUICAgIARIECgIIAQAAADAAAAAAB3lCaXRDTzIBAAAAIGmM1P/bTQF96Mt4t9+zj8FcPDlb6Qx5aA0hjmfpm0utAAAAAARndHMxAQAAACDDxYMO3SsdGFMCSZ4E3p59+bOpZEBHwTUZ+0J8yxIGZwAAAAAIc3RhcnRRdHkAAAAAAAHSc1QAAAAADEZpcnN0RmFzZVF0eQAAAAAAAC+YxAAAAAANU2Vjb25kRmFzZVF0eQAAAAAAAaLakAAAAAAIbm9tUHJpY2UAAAAAAAAAAAEAAAAAA3d2cwAAAAAABfXhAAAAAAAQc3VwcGxpZXJEaXNjb3VudAAAAAAAAAAADAAAAAAETk9ORQIAAAAEbm9uZQAAAAALT3duZXJQdWJLZXkBAAAAIHYlgUf22Lk37u4at3MrCWteEN5n68yQc4q5Um14SA8PAAAAAAZpc3N1ZXIJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVSxn8sta9KJwYVeSm05ro6/tXJvgonaFpMAAAAABGVBZGQJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVSZfSwz7guLhVBBDbpt8Hu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BAAAAAl3aXRoV2F2ZXMDCQEAAAABIQAAAAEJAQAAAAlpc0RlZmluZWQAAAABCAgIBQAAAAJ0eAAAAAlzZWxsT3JkZXIAAAAJYXNzZXRQYWlyAAAACnByaWNlQXNzZXQGCQEAAAABIQAAAAEJAQAAAAlpc0RlZmluZWQAAAABCAgIBQAAAAJ0eAAAAAlzZWxsT3JkZXIAAAAJYXNzZXRQYWlyAAAAC2Ftb3VudEFzc2V0BQAAAAl3aXRoV2F2ZXMHqZnPXw==", "chainId": 84, "height": 1149495, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GvFKTgr7tbthZvJvzZQLBhavntZdnMrNq3SNe78xg5HX Next: 6QAaMxdDLH6mgLnB7Pi6sFp152ZqfpuezG1qMBbu5pEJ Diff:
Old | New | Differences | |
---|---|---|---|
5 | 5 | ||
6 | 6 | let gts1 = base58'EBDBY14t3xuduZ2GCNqEUpoLoy9eAAYfyQZA5ryVJxzS' | |
7 | 7 | ||
8 | - | let startQty = | |
8 | + | let startQty = 30569300 | |
9 | 9 | ||
10 | - | let FirstFaseQty = | |
10 | + | let FirstFaseQty = 3119300 | |
11 | 11 | ||
12 | - | let SecondFaseQty = | |
12 | + | let SecondFaseQty = 27450000 | |
13 | 13 | ||
14 | 14 | let nomPrice = 1 | |
15 | 15 | ||
31 | 31 | ||
32 | 32 | let ybitco2 = 10000 | |
33 | 33 | ||
34 | - | let gts = | |
34 | + | let gts = 100000 | |
35 | 35 | ||
36 | 36 | let uIP = 7 | |
37 | 37 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let yBitCO2 = base58'872MvpMoQx7SnV58HMcR9hd6vBWDtQvqmt5javCmYwpx' | |
5 | 5 | ||
6 | 6 | let gts1 = base58'EBDBY14t3xuduZ2GCNqEUpoLoy9eAAYfyQZA5ryVJxzS' | |
7 | 7 | ||
8 | - | let startQty = | |
8 | + | let startQty = 30569300 | |
9 | 9 | ||
10 | - | let FirstFaseQty = | |
10 | + | let FirstFaseQty = 3119300 | |
11 | 11 | ||
12 | - | let SecondFaseQty = | |
12 | + | let SecondFaseQty = 27450000 | |
13 | 13 | ||
14 | 14 | let nomPrice = 1 | |
15 | 15 | ||
16 | 16 | let wvs = 100000000 | |
17 | 17 | ||
18 | 18 | let supplierDiscount = 12 | |
19 | 19 | ||
20 | 20 | let NONE = "none" | |
21 | 21 | ||
22 | 22 | let OwnerPubKey = base58'8xCH82jKi2DM7HXXD45fmftPUDjr3TJpjanUATKMK37U' | |
23 | 23 | ||
24 | 24 | let issuer = Address(base58'3N67GoXrZo4iwmEjLhS9iNUCbzpPEjoYgNW') | |
25 | 25 | ||
26 | 26 | let eAdd = Address(base58'3N3uf7RK8Aed4v5ufGB8xV2Wsz4WNoHj21c') | |
27 | 27 | ||
28 | 28 | let pAdd = Address(base58'3Mv5mXTRhpWZxZxstmnsBhckWNgErMTFEaD') | |
29 | 29 | ||
30 | 30 | let igv = 18 | |
31 | 31 | ||
32 | 32 | let ybitco2 = 10000 | |
33 | 33 | ||
34 | - | let gts = | |
34 | + | let gts = 100000 | |
35 | 35 | ||
36 | 36 | let uIP = 7 | |
37 | 37 | ||
38 | 38 | let pIP = 10 | |
39 | 39 | ||
40 | 40 | let eIP = 1 | |
41 | 41 | ||
42 | 42 | let sBP = 2 | |
43 | 43 | ||
44 | 44 | let eBP = 2 | |
45 | 45 | ||
46 | 46 | func getNumberByKey (key) = { | |
47 | 47 | let num = match getInteger(this, key) { | |
48 | 48 | case a: Int => | |
49 | 49 | a | |
50 | 50 | case _ => | |
51 | 51 | 0 | |
52 | 52 | } | |
53 | 53 | num | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func getStrByKey (key) = { | |
58 | 58 | let str = match getString(this, key) { | |
59 | 59 | case a: String => | |
60 | 60 | a | |
61 | 61 | case _ => | |
62 | 62 | NONE | |
63 | 63 | } | |
64 | 64 | str | |
65 | 65 | } | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func getKeyItemSupplier (supplier) = (supplier + "Bit-CO2 Shop, Lima-Perú") | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func getKeyItem (supplier,item) = (("Producto-GTS: " + " ") + toBase58String(sha256(toBytes((supplier + item))))) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func getKeyProject (item) = "Project" | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func getKeyEcosystNode (item) = "Nodo del Ecosistema" | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func getKeyTokenGTS1 (item) = "GTStable" | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func getKeyUserItemGtsCounter (user,item) = "Order_№:" | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func getValueUserItemGtsCounter (user,item) = getNumberByKey(getKeyUserItemGtsCounter(user, item)) | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func getKeyItemName (item) = "Categoría del Producto:" | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func getValueItemName (item) = getStrByKey(getKeyItemName(item)) | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func getKeyUserName (item) = "Nombre del Usuario:" | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func getValueUserName (item) = getStrByKey(getKeyUserName(item)) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func getKeyUserDocument (item) = "№ de Documento / DNI del Usuario:" | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func getValueUserDocument (item) = getStrByKey(getKeyUserDocument(item)) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func getKeySaldoTokenQtyStartEtapa (item) = "Tokens Ofertados en la presente etapa / Saldo, ytok:" | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func getValueSaldoTokenQtyStartEtapa (item) = getNumberByKey(getKeySaldoTokenQtyStartEtapa(item)) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func getKeyBalanceQtySupplier (item) = "Balance/Saldo GTS, ytokens:" | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func getValueBalanceQtySupplier (item) = getNumberByKey(getKeyBalanceQtySupplier(item)) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func getKeyBalanceSupplier (supplier) = "Monto Bruto por VentaGTS, wvls:" | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func getValueBalanceSupplier (supplier) = getNumberByKey(getKeyBalanceSupplier(supplier)) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func getKeyUI (item) = "UI,_wvls:" | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func getValueUI (item) = getNumberByKey(getKeyUI(item)) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func getKeyPI (item) = "PI,_wvls:" | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func getValuePI (item) = getNumberByKey(getKeyPI(item)) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func getKeySI (item) = "SI,_wvls:" | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func getValueSI (item) = getNumberByKey(getKeySI(item)) | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | @Callable(i) | |
144 | 144 | func deposit (title,supplierData) = { | |
145 | 145 | let pmt = extract(i.payment) | |
146 | 146 | if ((pmt.assetId != yBitCO2)) | |
147 | 147 | then throw("deposito permitido solo en yBitCO2 tokens") | |
148 | 148 | else { | |
149 | 149 | let supplier = toBase58String(i.caller.bytes) | |
150 | 150 | let currentAmount = match getInteger(this, supplier) { | |
151 | 151 | case a: Int => | |
152 | 152 | a | |
153 | 153 | case _ => | |
154 | 154 | startQty | |
155 | 155 | } | |
156 | 156 | let newAmount = (currentAmount + pmt.amount) | |
157 | 157 | if ((0 >= newAmount)) | |
158 | 158 | then throw("No hay yBitCO2 en su balance") | |
159 | 159 | else WriteSet([DataEntry(supplier, newAmount)]) | |
160 | 160 | } | |
161 | 161 | } | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | ||
165 | 165 | @Callable(i) | |
166 | 166 | func purchaseGTS (item,itemName,userName,userDocument,totalAmount) = { | |
167 | 167 | let pmt = extract(i.payment) | |
168 | 168 | if ((pmt.assetId != yBitCO2)) | |
169 | 169 | then throw("Use yBitCO2 tokens para adquirir ProductosGTS") | |
170 | 170 | else { | |
171 | 171 | let supplier = match getString(this, getKeyItemSupplier(item)) { | |
172 | 172 | case a: String => | |
173 | 173 | a | |
174 | 174 | case _ => | |
175 | 175 | NONE | |
176 | 176 | } | |
177 | 177 | let projAdd = match getString(this, getKeyProject(item)) { | |
178 | 178 | case a: String => | |
179 | 179 | NONE | |
180 | 180 | case _ => | |
181 | 181 | pAdd | |
182 | 182 | } | |
183 | 183 | let nodoAdd = match getString(this, getKeyEcosystNode(item)) { | |
184 | 184 | case a: String => | |
185 | 185 | NONE | |
186 | 186 | case _ => | |
187 | 187 | eAdd | |
188 | 188 | } | |
189 | 189 | let preTokenQty = match getInteger(this, getKeyBalanceQtySupplier(item)) { | |
190 | 190 | case a: Int => | |
191 | 191 | a | |
192 | 192 | case _ => | |
193 | 193 | SecondFaseQty | |
194 | 194 | } | |
195 | 195 | let balanceSupplier = match getInteger(this, getKeyBalanceSupplier(supplier)) { | |
196 | 196 | case a: Int => | |
197 | 197 | a | |
198 | 198 | case _ => | |
199 | 199 | 0 | |
200 | 200 | } | |
201 | 201 | let userAddress = toBase58String(i.caller.bytes) | |
202 | 202 | let subTotal = (totalAmount - ((igv * totalAmount) / 100)) | |
203 | 203 | let cPB = ((88 * gts) / 100) | |
204 | 204 | let uI = ((subTotal * uIP) / 100) | |
205 | 205 | let uBI = ((uI / cPB) * 1) | |
206 | 206 | let pI = ((subTotal * pIP) / 100) | |
207 | 207 | let eI = ((subTotal * eIP) / 100) | |
208 | 208 | let eBI = (((subTotal * eBP) / (100 * cPB)) * 1) | |
209 | 209 | let sI = ((totalAmount - pI) - eI) | |
210 | 210 | let sBI = (((subTotal * sBP) / (100 * cPB)) * 1) | |
211 | 211 | let QVentasgts = (((subTotal * 11) / (cPB * 100)) * 1) | |
212 | 212 | if ((totalAmount > pmt.amount)) | |
213 | 213 | then throw("Payment Amount can't be less than item Purchase Order") | |
214 | 214 | else if ((pmt.amount > totalAmount)) | |
215 | 215 | then throw("Payment Amount can't be higher than item Purchase Order") | |
216 | 216 | else ScriptResult(WriteSet([DataEntry(getKeyUserItemGtsCounter(userAddress, item), (getValueUserItemGtsCounter(userAddress, item) + 1)), DataEntry(getKeyItem(supplier, item), item), DataEntry(getKeyItemName(item), itemName), DataEntry(getKeyUserName(item), userName), DataEntry(getKeyUserDocument(item), userDocument), DataEntry("Payment_amount,_yBitCO2cents", totalAmount), DataEntry("Imp, %", igv), DataEntry("STtl, yBitCO2cents", subTotal), DataEntry("CP 1 B, yBitCO2cents", cPB), DataEntry(getKeyUI(item), uI), DataEntry("UBI, 10e-4 gts1", (uBI / 10000)), DataEntry(getKeyPI(item), pI), DataEntry("EcSys, yBitCO2cents", eI), DataEntry("EcSys, 10e-4 gts1", (eBI * 1000000)), DataEntry(getKeySI(item), sI), DataEntry("SBI, 10e-4 gts1", (sBI * 1000000)), DataEntry(("Order_Status:_" + userAddress), "Adquisición Confirmada!"), DataEntry("QporVentasGTS, 10e-4 gts1", (QVentasgts * 10000)), DataEntry(getKeyBalanceQtySupplier(item), (preTokenQty - (QVentasgts * 10000))), DataEntry(getKeyBalanceSupplier(supplier), (balanceSupplier + pmt.amount))]), TransferSet([ScriptTransfer(i.caller, uBI, gts1), ScriptTransfer(pAdd, pI, yBitCO2), ScriptTransfer(eAdd, eI, yBitCO2), ScriptTransfer(eAdd, eBI, gts1), ScriptTransfer(issuer, sI, yBitCO2), ScriptTransfer(issuer, sBI, gts1)])) | |
217 | 217 | } | |
218 | 218 | } | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | ||
222 | 222 | @Callable(i) | |
223 | 223 | func purchaseGTS2 (item,itemName,userName,userDocument,totalAmount) = { | |
224 | 224 | let pmt = extract(i.payment) | |
225 | 225 | if (isDefined(pmt.assetId)) | |
226 | 226 | then throw("El Precio en waves.") | |
227 | 227 | else { | |
228 | 228 | let supplier = match getString(this, getKeyItemSupplier(item)) { | |
229 | 229 | case a: String => | |
230 | 230 | a | |
231 | 231 | case _ => | |
232 | 232 | NONE | |
233 | 233 | } | |
234 | 234 | let projAdd = match getString(this, getKeyProject(item)) { | |
235 | 235 | case a: String => | |
236 | 236 | NONE | |
237 | 237 | case _ => | |
238 | 238 | pAdd | |
239 | 239 | } | |
240 | 240 | let nodoAdd = match getString(this, getKeyEcosystNode(item)) { | |
241 | 241 | case a: String => | |
242 | 242 | NONE | |
243 | 243 | case _ => | |
244 | 244 | eAdd | |
245 | 245 | } | |
246 | 246 | let preTokenQty = match getInteger(this, getKeyBalanceQtySupplier(item)) { | |
247 | 247 | case a: Int => | |
248 | 248 | a | |
249 | 249 | case _ => | |
250 | 250 | SecondFaseQty | |
251 | 251 | } | |
252 | 252 | let balanceSupplier = match getInteger(this, getKeyBalanceSupplier(supplier)) { | |
253 | 253 | case a: Int => | |
254 | 254 | a | |
255 | 255 | case _ => | |
256 | 256 | 0 | |
257 | 257 | } | |
258 | 258 | let userAddress = toBase58String(i.caller.bytes) | |
259 | 259 | let subTotal = (totalAmount - ((igv * totalAmount) / 100)) | |
260 | 260 | let cPB = ((88 * ybitco2) / 100) | |
261 | 261 | let uI = ((subTotal * uIP) / 100) | |
262 | 262 | let uBI = ((uI / cPB) * 1) | |
263 | 263 | let pI = ((subTotal * pIP) / 100) | |
264 | 264 | let eI = ((subTotal * eIP) / 100) | |
265 | 265 | let eBI = (((subTotal * eBP) / (100 * cPB)) * 1) | |
266 | 266 | let sI = ((totalAmount - pI) - eI) | |
267 | 267 | let sBI = (((subTotal * sBP) / (100 * cPB)) * 1) | |
268 | 268 | let QVentasgts = (((subTotal * 11) / (cPB * 100)) * 1) | |
269 | 269 | if ((totalAmount > pmt.amount)) | |
270 | 270 | then throw("Payment Amount can't be less than item Purchase Order") | |
271 | 271 | else if ((pmt.amount > totalAmount)) | |
272 | 272 | then throw("Payment Amount can't be higher than item Purchase Order") | |
273 | 273 | else ScriptResult(WriteSet([DataEntry(getKeyUserItemGtsCounter(userAddress, item), (getValueUserItemGtsCounter(userAddress, item) + 1)), DataEntry(getKeyItem(supplier, item), item), DataEntry(getKeyItemName(item), itemName), DataEntry(getKeyUserName(item), userName), DataEntry(getKeyUserDocument(item), userDocument), DataEntry("Payment_amount,_wvls", totalAmount), DataEntry("Imp, %", igv), DataEntry("STtl, wvls", subTotal), DataEntry("CP 1 B, wvls", (cPB * 10000)), DataEntry(getKeyUI(item), uI), DataEntry("UBI, 10e-4 ybitco2", uBI), DataEntry(getKeyPI(item), pI), DataEntry("EcSys, wvls", eI), DataEntry("EcSys, 10e-4 ybitco2", eBI), DataEntry(getKeySI(item), sI), DataEntry("SBI, 10e-4 ybitco2", sBI), DataEntry(("Order_Status:_" + userAddress), "Adquisición Confirmada!"), DataEntry("QporVentasGTS, 10e-4 ybitco2", QVentasgts), DataEntry(getKeyBalanceQtySupplier(item), (preTokenQty - (QVentasgts / 1))), DataEntry(getKeyBalanceSupplier(supplier), (balanceSupplier + pmt.amount))]), TransferSet([ScriptTransfer(i.caller, uBI, yBitCO2), ScriptTransfer(pAdd, pI, unit), ScriptTransfer(eAdd, eI, unit), ScriptTransfer(eAdd, eBI, yBitCO2), ScriptTransfer(issuer, sI, unit), ScriptTransfer(issuer, sBI, yBitCO2)])) | |
274 | 274 | } | |
275 | 275 | } | |
276 | 276 | ||
277 | 277 | ||
278 | 278 | ||
279 | 279 | @Callable(i) | |
280 | 280 | func withdraw (item,amount) = { | |
281 | 281 | let userAddress = toBase58String(i.caller.bytes) | |
282 | 282 | let supplier = match getString(this, getKeyItemSupplier(item)) { | |
283 | 283 | case a: String => | |
284 | 284 | a | |
285 | 285 | case _ => | |
286 | 286 | NONE | |
287 | 287 | } | |
288 | 288 | let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) { | |
289 | 289 | case a: Int => | |
290 | 290 | a | |
291 | 291 | case _ => | |
292 | 292 | startQty | |
293 | 293 | } | |
294 | 294 | let newAmount = (preIcoQty - amount) | |
295 | 295 | if ((0 > amount)) | |
296 | 296 | then throw("El balance de retiro no puede ser negativo!") | |
297 | 297 | else if ((0 >= newAmount)) | |
298 | 298 | then throw("Ooppss.. Insuficiente balance!") | |
299 | 299 | else ScriptResult(WriteSet([DataEntry(item, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, yBitCO2)])) | |
300 | 300 | } | |
301 | 301 | ||
302 | 302 | ||
303 | 303 | @Verifier(tx) | |
304 | 304 | func verify () = match tx { | |
305 | 305 | case t: SetScriptTransaction => | |
306 | 306 | sigVerify(tx.bodyBytes, tx.proofs[0], OwnerPubKey) | |
307 | 307 | case d: DataTransaction|ReissueTransaction => | |
308 | 308 | true | |
309 | 309 | case tx: TransferTransaction => | |
310 | 310 | true | |
311 | 311 | case tx: ExchangeTransaction => | |
312 | 312 | let withWaves = if (!(isDefined(tx.sellOrder.assetPair.priceAsset))) | |
313 | 313 | then true | |
314 | 314 | else !(isDefined(tx.sellOrder.assetPair.amountAsset)) | |
315 | 315 | withWaves | |
316 | 316 | case _ => | |
317 | 317 | false | |
318 | 318 | } | |
319 | 319 |
github/deemru/w8io/169f3d6 70.55 ms ◑