tx · GvFKTgr7tbthZvJvzZQLBhavntZdnMrNq3SNe78xg5HX

3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8:  -0.01400000 Waves

2020.08.26 12:08 [1149478] smart account 3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8 > SELF 0.00000000 Waves

{ "type": 13, "id": "GvFKTgr7tbthZvJvzZQLBhavntZdnMrNq3SNe78xg5HX", "fee": 1400000, "feeAssetId": null, "timestamp": 1598432949844, "version": 1, "sender": "3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8", "senderPublicKey": "8xCH82jKi2DM7HXXD45fmftPUDjr3TJpjanUATKMK37U", "proofs": [ "5zvGh81SVFqn6UuZ9MayT5mUgxpkf3oLwVRQwcw1pe1prmLEhEnS3pE7vh788uo8Sj8b4E8HJnQBMWhHTPR6peU7" ], "script": "base64:AAIDAAAAAAAAACAIARIECgIICBIHCgUICAgIARIHCgUICAgIARIECgIIAQAAADAAAAAAB3lCaXRDTzIBAAAAIGmM1P/bTQF96Mt4t9+zj8FcPDlb6Qx5aA0hjmfpm0utAAAAAARndHMxAQAAACDDxYMO3SsdGFMCSZ4E3p59+bOpZEBHwTUZ+0J8yxIGZwAAAAAIc3RhcnRRdHkAAAAAALY1DNAAAAAADEZpcnN0RmFzZVF0eQAAAAAAEpeskAAAAAANU2Vjb25kRmFzZVF0eQAAAAAAo51gQAAAAAAIbm9tUHJpY2UAAAAAAAAAAAEAAAAAA3d2cwAAAAAABfXhAAAAAAAQc3VwcGxpZXJEaXNjb3VudAAAAAAAAAAADAAAAAAETk9ORQIAAAAEbm9uZQAAAAALT3duZXJQdWJLZXkBAAAAIHYlgUf22Lk37u4at3MrCWteEN5n68yQc4q5Um14SA8PAAAAAAZpc3N1ZXIJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVSxn8sta9KJwYVeSm05ro6/tXJvgonaFpMAAAAABGVBZGQJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVSZfSwz7guLhVBBDbpt8HuP9d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AAAATRXhjaGFuZ2VUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAEAAAACXdpdGhXYXZlcwMJAQAAAAEhAAAAAQkBAAAACWlzRGVmaW5lZAAAAAEICAgFAAAAAnR4AAAACXNlbGxPcmRlcgAAAAlhc3NldFBhaXIAAAAKcHJpY2VBc3NldAYJAQAAAAEhAAAAAQkBAAAACWlzRGVmaW5lZAAAAAEICAgFAAAAAnR4AAAACXNlbGxPcmRlcgAAAAlhc3NldFBhaXIAAAALYW1vdW50QXNzZXQFAAAACXdpdGhXYXZlcwdT//5V", "chainId": 84, "height": 1149478, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5z8dnmDqfeoFhw3SFeqR4FW3QVYoCWMK8gHgCXEQNNBy Next: 8Rp416FtWTQkonwvrGnZKTh84auqaNS3NQzLQg9QYHvh Diff:
OldNewDifferences
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")
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 * 10000)), DataEntry(getKeySI(item), sI), DataEntry("SBI, 10e-4 gts1", (sBI * 10000)), 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)]))
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)]))
217217 }
218218 }
219219
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
88 let startQty = 3056930000
99
1010 let FirstFaseQty = 311930000
1111
1212 let SecondFaseQty = 2745000000
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
3434 let gts = (10 * ybitco2)
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")
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 * 10000)), DataEntry(getKeySI(item), sI), DataEntry("SBI, 10e-4 gts1", (sBI * 10000)), 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)]))
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)]))
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 
121.28 ms