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/tXJvgonaFpMAAAAABGVBZGQJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVSZfSwz7guLhVBBDbpt8H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wBAAAAAl3aXRoV2F2ZXMDCQEAAAABIQAAAAEJAQAAAAlpc0RlZmluZWQAAAABCAgIBQAAAAJ0eAAAAAlzZWxsT3JkZXIAAAAJYXNzZXRQYWlyAAAACnByaWNlQXNzZXQGCQEAAAABIQAAAAEJAQAAAAlpc0RlZmluZWQAAAABCAgIBQAAAAJ0eAAAAAlzZWxsT3JkZXIAAAAJYXNzZXRQYWlyAAAAC2Ftb3VudEFzc2V0BQAAAAl3aXRoV2F2ZXMHqZnPXw==", "chainId": 84, "height": 1149495, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GvFKTgr7tbthZvJvzZQLBhavntZdnMrNq3SNe78xg5HX Next: 6QAaMxdDLH6mgLnB7Pi6sFp152ZqfpuezG1qMBbu5pEJ Diff:
OldNewDifferences
55
66 let gts1 = base58'EBDBY14t3xuduZ2GCNqEUpoLoy9eAAYfyQZA5ryVJxzS'
77
8-let startQty = 3056930000
8+let startQty = 30569300
99
10-let FirstFaseQty = 311930000
10+let FirstFaseQty = 3119300
1111
12-let SecondFaseQty = 2745000000
12+let SecondFaseQty = 27450000
1313
1414 let nomPrice = 1
1515
3131
3232 let ybitco2 = 10000
3333
34-let gts = (10 * ybitco2)
34+let gts = 100000
3535
3636 let uIP = 7
3737
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let yBitCO2 = base58'872MvpMoQx7SnV58HMcR9hd6vBWDtQvqmt5javCmYwpx'
55
66 let gts1 = base58'EBDBY14t3xuduZ2GCNqEUpoLoy9eAAYfyQZA5ryVJxzS'
77
8-let startQty = 3056930000
8+let startQty = 30569300
99
10-let FirstFaseQty = 311930000
10+let FirstFaseQty = 3119300
1111
12-let SecondFaseQty = 2745000000
12+let SecondFaseQty = 27450000
1313
1414 let nomPrice = 1
1515
1616 let wvs = 100000000
1717
1818 let supplierDiscount = 12
1919
2020 let NONE = "none"
2121
2222 let OwnerPubKey = base58'8xCH82jKi2DM7HXXD45fmftPUDjr3TJpjanUATKMK37U'
2323
2424 let issuer = Address(base58'3N67GoXrZo4iwmEjLhS9iNUCbzpPEjoYgNW')
2525
2626 let eAdd = Address(base58'3N3uf7RK8Aed4v5ufGB8xV2Wsz4WNoHj21c')
2727
2828 let pAdd = Address(base58'3Mv5mXTRhpWZxZxstmnsBhckWNgErMTFEaD')
2929
3030 let igv = 18
3131
3232 let ybitco2 = 10000
3333
34-let gts = (10 * ybitco2)
34+let gts = 100000
3535
3636 let uIP = 7
3737
3838 let pIP = 10
3939
4040 let eIP = 1
4141
4242 let sBP = 2
4343
4444 let eBP = 2
4545
4646 func getNumberByKey (key) = {
4747 let num = match getInteger(this, key) {
4848 case a: Int =>
4949 a
5050 case _ =>
5151 0
5252 }
5353 num
5454 }
5555
5656
5757 func getStrByKey (key) = {
5858 let str = match getString(this, key) {
5959 case a: String =>
6060 a
6161 case _ =>
6262 NONE
6363 }
6464 str
6565 }
6666
6767
6868 func getKeyItemSupplier (supplier) = (supplier + "Bit-CO2 Shop, Lima-Perú")
6969
7070
7171 func getKeyItem (supplier,item) = (("Producto-GTS: " + " ") + toBase58String(sha256(toBytes((supplier + item)))))
7272
7373
7474 func getKeyProject (item) = "Project"
7575
7676
7777 func getKeyEcosystNode (item) = "Nodo del Ecosistema"
7878
7979
8080 func getKeyTokenGTS1 (item) = "GTStable"
8181
8282
8383 func getKeyUserItemGtsCounter (user,item) = "Order_№:"
8484
8585
8686 func getValueUserItemGtsCounter (user,item) = getNumberByKey(getKeyUserItemGtsCounter(user, item))
8787
8888
8989 func getKeyItemName (item) = "Categoría del Producto:"
9090
9191
9292 func getValueItemName (item) = getStrByKey(getKeyItemName(item))
9393
9494
9595 func getKeyUserName (item) = "Nombre del Usuario:"
9696
9797
9898 func getValueUserName (item) = getStrByKey(getKeyUserName(item))
9999
100100
101101 func getKeyUserDocument (item) = "№ de Documento / DNI del Usuario:"
102102
103103
104104 func getValueUserDocument (item) = getStrByKey(getKeyUserDocument(item))
105105
106106
107107 func getKeySaldoTokenQtyStartEtapa (item) = "Tokens Ofertados en la presente etapa / Saldo, ytok:"
108108
109109
110110 func getValueSaldoTokenQtyStartEtapa (item) = getNumberByKey(getKeySaldoTokenQtyStartEtapa(item))
111111
112112
113113 func getKeyBalanceQtySupplier (item) = "Balance/Saldo GTS, ytokens:"
114114
115115
116116 func getValueBalanceQtySupplier (item) = getNumberByKey(getKeyBalanceQtySupplier(item))
117117
118118
119119 func getKeyBalanceSupplier (supplier) = "Monto Bruto por VentaGTS, wvls:"
120120
121121
122122 func getValueBalanceSupplier (supplier) = getNumberByKey(getKeyBalanceSupplier(supplier))
123123
124124
125125 func getKeyUI (item) = "UI,_wvls:"
126126
127127
128128 func getValueUI (item) = getNumberByKey(getKeyUI(item))
129129
130130
131131 func getKeyPI (item) = "PI,_wvls:"
132132
133133
134134 func getValuePI (item) = getNumberByKey(getKeyPI(item))
135135
136136
137137 func getKeySI (item) = "SI,_wvls:"
138138
139139
140140 func getValueSI (item) = getNumberByKey(getKeySI(item))
141141
142142
143143 @Callable(i)
144144 func deposit (title,supplierData) = {
145145 let pmt = extract(i.payment)
146146 if ((pmt.assetId != yBitCO2))
147147 then throw("deposito permitido solo en yBitCO2 tokens")
148148 else {
149149 let supplier = toBase58String(i.caller.bytes)
150150 let currentAmount = match getInteger(this, supplier) {
151151 case a: Int =>
152152 a
153153 case _ =>
154154 startQty
155155 }
156156 let newAmount = (currentAmount + pmt.amount)
157157 if ((0 >= newAmount))
158158 then throw("No hay yBitCO2 en su balance")
159159 else WriteSet([DataEntry(supplier, newAmount)])
160160 }
161161 }
162162
163163
164164
165165 @Callable(i)
166166 func purchaseGTS (item,itemName,userName,userDocument,totalAmount) = {
167167 let pmt = extract(i.payment)
168168 if ((pmt.assetId != yBitCO2))
169169 then throw("Use yBitCO2 tokens para adquirir ProductosGTS")
170170 else {
171171 let supplier = match getString(this, getKeyItemSupplier(item)) {
172172 case a: String =>
173173 a
174174 case _ =>
175175 NONE
176176 }
177177 let projAdd = match getString(this, getKeyProject(item)) {
178178 case a: String =>
179179 NONE
180180 case _ =>
181181 pAdd
182182 }
183183 let nodoAdd = match getString(this, getKeyEcosystNode(item)) {
184184 case a: String =>
185185 NONE
186186 case _ =>
187187 eAdd
188188 }
189189 let preTokenQty = match getInteger(this, getKeyBalanceQtySupplier(item)) {
190190 case a: Int =>
191191 a
192192 case _ =>
193193 SecondFaseQty
194194 }
195195 let balanceSupplier = match getInteger(this, getKeyBalanceSupplier(supplier)) {
196196 case a: Int =>
197197 a
198198 case _ =>
199199 0
200200 }
201201 let userAddress = toBase58String(i.caller.bytes)
202202 let subTotal = (totalAmount - ((igv * totalAmount) / 100))
203203 let cPB = ((88 * gts) / 100)
204204 let uI = ((subTotal * uIP) / 100)
205205 let uBI = ((uI / cPB) * 1)
206206 let pI = ((subTotal * pIP) / 100)
207207 let eI = ((subTotal * eIP) / 100)
208208 let eBI = (((subTotal * eBP) / (100 * cPB)) * 1)
209209 let sI = ((totalAmount - pI) - eI)
210210 let sBI = (((subTotal * sBP) / (100 * cPB)) * 1)
211211 let QVentasgts = (((subTotal * 11) / (cPB * 100)) * 1)
212212 if ((totalAmount > pmt.amount))
213213 then throw("Payment Amount can't be less than item Purchase Order")
214214 else if ((pmt.amount > totalAmount))
215215 then throw("Payment Amount can't be higher than item Purchase Order")
216216 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)]))
217217 }
218218 }
219219
220220
221221
222222 @Callable(i)
223223 func purchaseGTS2 (item,itemName,userName,userDocument,totalAmount) = {
224224 let pmt = extract(i.payment)
225225 if (isDefined(pmt.assetId))
226226 then throw("El Precio en waves.")
227227 else {
228228 let supplier = match getString(this, getKeyItemSupplier(item)) {
229229 case a: String =>
230230 a
231231 case _ =>
232232 NONE
233233 }
234234 let projAdd = match getString(this, getKeyProject(item)) {
235235 case a: String =>
236236 NONE
237237 case _ =>
238238 pAdd
239239 }
240240 let nodoAdd = match getString(this, getKeyEcosystNode(item)) {
241241 case a: String =>
242242 NONE
243243 case _ =>
244244 eAdd
245245 }
246246 let preTokenQty = match getInteger(this, getKeyBalanceQtySupplier(item)) {
247247 case a: Int =>
248248 a
249249 case _ =>
250250 SecondFaseQty
251251 }
252252 let balanceSupplier = match getInteger(this, getKeyBalanceSupplier(supplier)) {
253253 case a: Int =>
254254 a
255255 case _ =>
256256 0
257257 }
258258 let userAddress = toBase58String(i.caller.bytes)
259259 let subTotal = (totalAmount - ((igv * totalAmount) / 100))
260260 let cPB = ((88 * ybitco2) / 100)
261261 let uI = ((subTotal * uIP) / 100)
262262 let uBI = ((uI / cPB) * 1)
263263 let pI = ((subTotal * pIP) / 100)
264264 let eI = ((subTotal * eIP) / 100)
265265 let eBI = (((subTotal * eBP) / (100 * cPB)) * 1)
266266 let sI = ((totalAmount - pI) - eI)
267267 let sBI = (((subTotal * sBP) / (100 * cPB)) * 1)
268268 let QVentasgts = (((subTotal * 11) / (cPB * 100)) * 1)
269269 if ((totalAmount > pmt.amount))
270270 then throw("Payment Amount can't be less than item Purchase Order")
271271 else if ((pmt.amount > totalAmount))
272272 then throw("Payment Amount can't be higher than item Purchase Order")
273273 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)]))
274274 }
275275 }
276276
277277
278278
279279 @Callable(i)
280280 func withdraw (item,amount) = {
281281 let userAddress = toBase58String(i.caller.bytes)
282282 let supplier = match getString(this, getKeyItemSupplier(item)) {
283283 case a: String =>
284284 a
285285 case _ =>
286286 NONE
287287 }
288288 let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) {
289289 case a: Int =>
290290 a
291291 case _ =>
292292 startQty
293293 }
294294 let newAmount = (preIcoQty - amount)
295295 if ((0 > amount))
296296 then throw("El balance de retiro no puede ser negativo!")
297297 else if ((0 >= newAmount))
298298 then throw("Ooppss.. Insuficiente balance!")
299299 else ScriptResult(WriteSet([DataEntry(item, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, yBitCO2)]))
300300 }
301301
302302
303303 @Verifier(tx)
304304 func verify () = match tx {
305305 case t: SetScriptTransaction =>
306306 sigVerify(tx.bodyBytes, tx.proofs[0], OwnerPubKey)
307307 case d: DataTransaction|ReissueTransaction =>
308308 true
309309 case tx: TransferTransaction =>
310310 true
311311 case tx: ExchangeTransaction =>
312312 let withWaves = if (!(isDefined(tx.sellOrder.assetPair.priceAsset)))
313313 then true
314314 else !(isDefined(tx.sellOrder.assetPair.amountAsset))
315315 withWaves
316316 case _ =>
317317 false
318318 }
319319

github/deemru/w8io/169f3d6 
70.55 ms