tx · 2TEGQk9ww5JK8DPiT5R4fUUEFNfu1NxfjhzWQsHW5HZ5 3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8: -0.01000000 Waves 2021.10.20 12:47 [1754440] smart account 3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8 > SELF 0.00000000 Waves
{ "type": 13, "id": "2TEGQk9ww5JK8DPiT5R4fUUEFNfu1NxfjhzWQsHW5HZ5", "fee": 1000000, "feeAssetId": null, "timestamp": 1634723236981, "version": 2, "chainId": 84, "sender": "3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8", "senderPublicKey": "8xCH82jKi2DM7HXXD45fmftPUDjr3TJpjanUATKMK37U", "proofs": [ "4hePoqNCRAKQ5kgvXfQBavQvvthkNPLeqjowAdBpZvn9Q3eVJCTKkVdVJkE5oBoZ9DB6kQHPFgtDS5XwZw2d55Jd" ], "script": "base64:AAIDAAAAAAAAABcIARIECgIICBIHCgUICAgIARIECgIIAQAAAD0AAAAAB3lCaXRDTzIBAAAAIGmM1P/bTQF96Mt4t9+zj8FcPDlb6Qx5aA0hjmfpm0utAAAAAAhzdGFydFF0eQAAAAAAAASqHQAAAAAMRmlyc3RGYXNlUXR5AAAAAAAAAHnZAAAAAA1TZWNvbmRGYXNlUXR5AAAAAAAABDBEAAAAAAN3dnMAAAAAAAX14QAAAAAABE5PTkUCAAAABG5vbmUAAAAABEJDTzIJAQAAAAdBZGRyZXNzAAAAAQEAAAAgaYzU/9tNAX3oy3i337OPwVw8OVvpDHloDSGOZ+mbS60AAAAAC093bmVyUHViS2V5AQAAACB2JYFH9ti5N+7uGrdzKwlrXhDeZ+vMkHOKuVJteEgPDwAAAAAGaXNzdWVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUsZ/LLWvSicGFXkptOa6Ov7Vyb4KJ2haTAAAAAARlQWRkCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUmX0sM+4Li4VQQQ26bfB7j/XU/VW4HmxXAAAAAARwQWRkCQEAAAA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leQMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAElJlaXNzdWVUcmFuc2FjdGlvbgYJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAGB8zc0+4=", "height": 1754440, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8iLpZYaGtn5A77QSpZCX1UMJxWSYGUV2XBo8qiUsTB91 Next: 9riBWej53S3SQmUymc8zTUS1QjATVxBK7JvdMLNrTyXY Diff:
Old | New | Differences | |
---|---|---|---|
227 | 227 | 10 | |
228 | 228 | } | |
229 | 229 | let token = toBase58String(BCO2.bytes) | |
230 | - | let preTokenQty = match getInteger(this, token) { | |
230 | + | let preTokenQty = match getInteger(this, getKeyBalanceQtyToken(token)) { | |
231 | 231 | case a: Int => | |
232 | 232 | a | |
233 | 233 | case _ => |
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 startQty = 305693 | |
7 | 7 | ||
8 | 8 | let FirstFaseQty = 31193 | |
9 | 9 | ||
10 | 10 | let SecondFaseQty = 274500 | |
11 | 11 | ||
12 | 12 | let wvs = 100000000 | |
13 | 13 | ||
14 | 14 | let NONE = "none" | |
15 | 15 | ||
16 | 16 | let BCO2 = Address(base58'872MvpMoQx7SnV58HMcR9hd6vBWDtQvqmt5javCmYwpx') | |
17 | 17 | ||
18 | 18 | let OwnerPubKey = base58'8xCH82jKi2DM7HXXD45fmftPUDjr3TJpjanUATKMK37U' | |
19 | 19 | ||
20 | 20 | let issuer = Address(base58'3N67GoXrZo4iwmEjLhS9iNUCbzpPEjoYgNW') | |
21 | 21 | ||
22 | 22 | let eAdd = Address(base58'3N3uf7RK8Aed4v5ufGB8xV2Wsz4WNoHj21c') | |
23 | 23 | ||
24 | 24 | let pAdd = Address(base58'3Mv5mXTRhpWZxZxstmnsBhckWNgErMTFEaD') | |
25 | 25 | ||
26 | 26 | let eurou = 116 | |
27 | 27 | ||
28 | 28 | let usdnw = 2539 | |
29 | 29 | ||
30 | 30 | let bco2e = 100000 | |
31 | 31 | ||
32 | 32 | let bitdscto = 3 | |
33 | 33 | ||
34 | 34 | let pIP = 10 | |
35 | 35 | ||
36 | 36 | let uBP = 7 | |
37 | 37 | ||
38 | 38 | let sBP = 2 | |
39 | 39 | ||
40 | 40 | let eIP = 1 | |
41 | 41 | ||
42 | 42 | let eBP = 2 | |
43 | 43 | ||
44 | 44 | let relacdcto = 11 | |
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 + "Vendedor, 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 getKeyIssuer (item) = "Issuer/Tienda" | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func getValueIssuer (item) = getStrByKey(getKeyIssuer(item)) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func getKeyProject (item) = "Project" | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func getValueProject (item) = getStrByKey(getKeyProject(item)) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func getKeyNodo (item) = "Nodo" | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func getValueNodo (item) = getStrByKey(getKeyNodo(item)) | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func getKeyUserItemGtsCounter (user,item) = "Order_№:" | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func getValueUserItemGtsCounter (user,item) = getNumberByKey(getKeyUserItemGtsCounter(user, item)) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func getKeyItemName (item) = "Categoría del Producto:" | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func getValueItemName (item) = getStrByKey(getKeyItemName(item)) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func getKeyUserName (item) = "Nombre del Usuario:" | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func getValueUserName (item) = getStrByKey(getKeyUserName(item)) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func getKeyUserDocument (item) = "№ de Documento / DNI del Usuario:" | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func getValueUserDocument (item) = getStrByKey(getKeyUserDocument(item)) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func getKeyUI (item) = "UI, x10e-04 bit:" | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func getValueUI (item) = getNumberByKey(getKeyUI(item)) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func getKeyPI (item) = "PI, wvls:" | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func getValuePI (item) = getNumberByKey(getKeyPI(item)) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func getKeySI (item) = "SI, x10e-04 bit:" | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func getValueSI (item) = getNumberByKey(getKeySI(item)) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func getKeyNIb (item) = "NIb, x10e-04 bit:" | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func getValueNIb (item) = getNumberByKey(getKeyNIb(item)) | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func getKeyNIw (item) = "NIw, wvls:" | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func getValueNIw (item) = getNumberByKey(getKeyNIw(item)) | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | func getKeySaldoTokenQtyStartEtapa (item) = "Tokens Ofertados en la presente etapa / Saldo, ytok:" | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func getValueSaldoTokenQtyStartEtapa (item) = getNumberByKey(getKeySaldoTokenQtyStartEtapa(item)) | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func getKeyBalanceQtyToken (token) = "Saldo ytokens pretokens, x10e-04:" | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func getValueBalanceQtyToken (token) = getNumberByKey(getKeyBalanceQtyToken(token)) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func getKeyBalanceQtySupplier (item) = "Saldo ytokens Supplier:" | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func getValueBalanceQtySupplier (item) = getNumberByKey(getKeyBalanceQtySupplier(item)) | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | func getKeyBalanceSupplier (supplier) = "Saldo del Vendedor, wvls:" | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | func getValueBalanceSupplier (supplier) = getNumberByKey(getKeyBalanceSupplier(supplier)) | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | func getKeyBalanceIssuer (supplier) = "Saldo del Issuer:" | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | func getValueBalanceIssuer (supplier) = getNumberByKey(getKeyBalanceIssuer(supplier)) | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | func getKeySaldoProj (proyect) = "Saldo del Proyecto, wvs:" | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | func getValueSaldoProj (proyect) = getNumberByKey(getKeySaldoProj(proyect)) | |
180 | 180 | ||
181 | 181 | ||
182 | 182 | @Callable(i) | |
183 | 183 | func deposit (title,supplierData) = { | |
184 | 184 | let pmt = extract(i.payment) | |
185 | 185 | if ((pmt.assetId != yBitCO2)) | |
186 | 186 | then throw("deposito permitido solo en yBitCO2 tokens") | |
187 | 187 | else { | |
188 | 188 | let supplier = toBase58String(i.caller.bytes) | |
189 | 189 | let currentAmount = match getInteger(this, supplier) { | |
190 | 190 | case a: Int => | |
191 | 191 | a | |
192 | 192 | case _ => | |
193 | 193 | startQty | |
194 | 194 | } | |
195 | 195 | let newAmount = (currentAmount + pmt.amount) | |
196 | 196 | if ((0 >= newAmount)) | |
197 | 197 | then throw("No hay yBitCO2 en su balance") | |
198 | 198 | else WriteSet([DataEntry(supplier, newAmount)]) | |
199 | 199 | } | |
200 | 200 | } | |
201 | 201 | ||
202 | 202 | ||
203 | 203 | ||
204 | 204 | @Callable(i) | |
205 | 205 | func purchaseGTS (item,itemName,userName,userDocument,totalAmount) = { | |
206 | 206 | let pmt = extract(i.payment) | |
207 | 207 | if (isDefined(pmt.assetId)) | |
208 | 208 | then throw("El Precio en waves.") | |
209 | 209 | else { | |
210 | 210 | let supplier = match getString(this, getKeyItemSupplier(item)) { | |
211 | 211 | case a: String => | |
212 | 212 | a | |
213 | 213 | case _ => | |
214 | 214 | NONE | |
215 | 215 | } | |
216 | 216 | let issuerAdd = match getString(this, getKeyIssuer(item)) { | |
217 | 217 | case a: String => | |
218 | 218 | a | |
219 | 219 | case _ => | |
220 | 220 | issuer | |
221 | 221 | } | |
222 | 222 | let proyect = toBase58String(pAdd.bytes) | |
223 | 223 | let projAdd = match getInteger(this, proyect) { | |
224 | 224 | case a: Int => | |
225 | 225 | a | |
226 | 226 | case _ => | |
227 | 227 | 10 | |
228 | 228 | } | |
229 | 229 | let token = toBase58String(BCO2.bytes) | |
230 | - | let preTokenQty = match getInteger(this, token) { | |
230 | + | let preTokenQty = match getInteger(this, getKeyBalanceQtyToken(token)) { | |
231 | 231 | case a: Int => | |
232 | 232 | a | |
233 | 233 | case _ => | |
234 | 234 | FirstFaseQty | |
235 | 235 | } | |
236 | 236 | let balanceSupplier = match getInteger(this, getKeyBalanceSupplier(supplier)) { | |
237 | 237 | case a: Int => | |
238 | 238 | a | |
239 | 239 | case _ => | |
240 | 240 | 0 | |
241 | 241 | } | |
242 | 242 | let balanceIssuer = match getInteger(this, getKeyBalanceIssuer(supplier)) { | |
243 | 243 | case a: Int => | |
244 | 244 | a | |
245 | 245 | case _ => | |
246 | 246 | FirstFaseQty | |
247 | 247 | } | |
248 | 248 | let userAddress = toBase58String(i.caller.bytes) | |
249 | 249 | let subTotal = totalAmount | |
250 | 250 | let pIw = ((pIP * subTotal) / relacdcto) | |
251 | 251 | let eIw = ((eIP * subTotal) / relacdcto) | |
252 | 252 | let SeIw = eIw | |
253 | 253 | let SpIw = (projAdd + pIw) | |
254 | 254 | let SpreTokenQty = (10000 * preTokenQty) | |
255 | 255 | let bco2menosdcto = (((100 - bitdscto) * (eurou * bco2e)) / 10000) | |
256 | 256 | let subTotalb = (((totalAmount * usdnw) / 100) / bco2menosdcto) | |
257 | 257 | let totalb = (subTotalb * 10000) | |
258 | 258 | let uIb = ((uBP * subTotalb) / relacdcto) | |
259 | 259 | let sIb = ((sBP * subTotalb) / relacdcto) | |
260 | 260 | let eIb = ((eBP * subTotalb) / relacdcto) | |
261 | 261 | let BalanceTienda = (balanceSupplier + (pmt.amount / wvs)) | |
262 | 262 | let BalanceIssuer = (balanceIssuer - (pmt.amount / wvs)) | |
263 | 263 | if ((totalAmount > pmt.amount)) | |
264 | 264 | then throw("Payment Amount can't be less than item Purchase Order") | |
265 | 265 | else if ((pmt.amount > totalAmount)) | |
266 | 266 | then throw("Payment Amount can't be higher than item Purchase Order") | |
267 | 267 | else ScriptResult(WriteSet([DataEntry(getKeyUserItemGtsCounter(userAddress, item), (getValueUserItemGtsCounter(userAddress, item) + 1)), DataEntry(getKeyItemSupplier(supplier), supplier), DataEntry(getKeyItem(supplier, item), item), DataEntry(getKeyItemName(item), itemName), DataEntry(getKeyUserName(item), userName), DataEntry(getKeyUserDocument(item), userDocument), DataEntry(getKeyIssuer(item), getStrByKey(getKeyIssuer(item))), DataEntry(getKeyProject(item), getStrByKey(getKeyProject(item))), DataEntry(getKeyNodo(item), getStrByKey(getKeyNodo(item))), DataEntry("Tienda", supplier), DataEntry("usdn", usdnw), DataEntry("eurou", eurou), DataEntry("Apoyo Ecológico, wvls", totalAmount), DataEntry(getKeyPI(item), pIw), DataEntry(getKeyNIw(item), eIw), DataEntry("1 Bit-CO2 Precio Nominal, euros x10e-4", bco2e), DataEntry("1 Bit-CO2 Precio con Descto, usd x10e-4", bco2menosdcto), DataEntry("Total bit-co2 a distribuir, x10e-4", subTotalb), DataEntry(getKeyUI(item), uIb), DataEntry(getKeySI(item), sIb), DataEntry(getKeyNIb(item), eIb), DataEntry(("Order_Status:_" + userAddress), "Transacción Confirmada!"), DataEntry("PreTokenQty", SpreTokenQty), DataEntry(getKeyBalanceQtyToken(token), (SpreTokenQty - subTotalb)), DataEntry("SeIw", SeIw), DataEntry("SpIw", SpIw), DataEntry("projAdd", projAdd), DataEntry(getKeySaldoProj(proyect), getValueSaldoProj(proyect)), DataEntry(getKeySaldoProj(proyect), (getValueSaldoProj(proyect) + SpIw)), DataEntry("balanceSupplier", balanceSupplier), DataEntry("balanceTienda", BalanceTienda), DataEntry("balanceIssuer", BalanceIssuer), DataEntry("startQty", startQty), DataEntry("FirstFaseQty", FirstFaseQty), DataEntry("SecondFaseQty", SecondFaseQty), DataEntry(getKeyBalanceSupplier(supplier), (balanceSupplier + pmt.amount))]), TransferSet([ScriptTransfer(pAdd, pIw, unit), ScriptTransfer(i.caller, uIb, yBitCO2), ScriptTransfer(issuer, sIb, yBitCO2), ScriptTransfer(eAdd, eIw, unit), ScriptTransfer(eAdd, eIb, yBitCO2)])) | |
268 | 268 | } | |
269 | 269 | } | |
270 | 270 | ||
271 | 271 | ||
272 | 272 | ||
273 | 273 | @Callable(i) | |
274 | 274 | func withdraw (item,amount) = { | |
275 | 275 | let userAddress = toBase58String(i.caller.bytes) | |
276 | 276 | let supplier = match getString(this, getKeyItemSupplier(item)) { | |
277 | 277 | case a: String => | |
278 | 278 | a | |
279 | 279 | case _ => | |
280 | 280 | NONE | |
281 | 281 | } | |
282 | 282 | let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) { | |
283 | 283 | case a: Int => | |
284 | 284 | a | |
285 | 285 | case _ => | |
286 | 286 | startQty | |
287 | 287 | } | |
288 | 288 | let newAmount = (preIcoQty - amount) | |
289 | 289 | if ((0 > amount)) | |
290 | 290 | then throw("El balance de retiro no puede ser negativo!") | |
291 | 291 | else if ((0 >= newAmount)) | |
292 | 292 | then throw("Ooppss.. Insuficiente balance!") | |
293 | 293 | else ScriptResult(WriteSet([DataEntry(item, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, yBitCO2)])) | |
294 | 294 | } | |
295 | 295 | ||
296 | 296 | ||
297 | 297 | @Verifier(tx) | |
298 | 298 | func verify () = match tx { | |
299 | 299 | case t: SetScriptTransaction => | |
300 | 300 | sigVerify(tx.bodyBytes, tx.proofs[0], OwnerPubKey) | |
301 | 301 | case d: ReissueTransaction|DataTransaction => | |
302 | 302 | true | |
303 | 303 | case tx: TransferTransaction => | |
304 | 304 | true | |
305 | 305 | case _ => | |
306 | 306 | false | |
307 | 307 | } | |
308 | 308 |
github/deemru/w8io/026f985 52.01 ms ◑