tx · CDpe9iYA1RieGbCTrzT3Nwa9XzhDMvdyJqRDb7sLnwF5

3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8:  -0.01400000 Waves

2020.08.25 12:42 [1148386] smart account 3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8 > SELF 0.00000000 Waves

{ "type": 13, "id": "CDpe9iYA1RieGbCTrzT3Nwa9XzhDMvdyJqRDb7sLnwF5", "fee": 1400000, "feeAssetId": null, "timestamp": 1598348532245, "version": 1, "sender": "3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8", "senderPublicKey": "8xCH82jKi2DM7HXXD45fmftPUDjr3TJpjanUATKMK37U", "proofs": [ "3zzbbUWUZrr16HnvCQCBj84SWsN7jRScBmE7757ZW6Qv4rPZqGv3WryvqqD9JLKFAFYLpGZR4hpUvCMaiSwopS2D" ], "script": "base64:AAIDAAAAAAAAACAIARIECgIICBIHCgUICAgIARIHCgUICAgIARIECgIIAQAAADAAAAAAB3lCaXRDTzIBAAAAIGmM1P/bTQF96Mt4t9+zj8FcPDlb6Qx5aA0hjmfpm0utAAAAAARndHMxAQAAACDDxYMO3SsdGFMCSZ4E3p59+bOpZEBHwTUZ+0J8yxIGZwAAAAAIc3RhcnRRdHkAAAAAALY1DNAAAAAADEZpcnN0RmFzZVF0eQAAAAAAEpeskAAAAAANU2Vjb25kRmFzZVF0eQAAAAAAo51gQAAAAAAIbm9tUHJpY2UAAAAAAAAAAAEAAAAAA3d2cwAAAAAABfXhAAAAAAAQc3VwcGxpZXJEaXNjb3VudAAAAAAAAAAADAAAAAAETk9ORQIAAAAEbm9uZQAAAAALT3duZXJQdWJLZXkBAAAAIHYlgUf22Lk37u4at3MrCWteEN5n68yQc4q5Um14SA8PAAAAAAZpc3N1ZXIJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVSxn8sta9KJwYVeSm05ro6/tXJvgonaFpMAAAAABGVBZGQJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVSZfSwz7guLhVBBDbp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EAAAAC3dpdGh5Qml0Q08yAwkBAAAAASEAAAABCQEAAAAJaXNEZWZpbmVkAAAAAQgICAUAAAACdHgAAAAJc2VsbE9yZGVyAAAACWFzc2V0UGFpcgAAAApwcmljZUFzc2V0BgkBAAAAASEAAAABCQEAAAAJaXNEZWZpbmVkAAAAAQgICAUAAAACdHgAAAAJc2VsbE9yZGVyAAAACWFzc2V0UGFpcgAAAAthbW91bnRBc3NldAUAAAALd2l0aHlCaXRDTzIHlLR0mg==", "chainId": 84, "height": 1148386, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6yftKeS81cqcBmKHUBzWksVh34QB1A4Kn7GotbEsHEaq Next: 89arqJb1Xqinv8EHiBEkfZZdFY7TtTPmV7TBDhmzb4YV Diff:
OldNewDifferences
7575
7676
7777 func getKeyEcosystNode (item) = "Nodo del Ecosistema"
78+
79+
80+func getKeyTokenGTS1 (item) = "GTStable"
7881
7982
8083 func getKeyUserItemGtsCounter (user,item) = "Order_№:"
306309 case tx: TransferTransaction =>
307310 true
308311 case tx: ExchangeTransaction =>
309- let withWaves = if (!(isDefined(tx.sellOrder.assetPair.priceAsset)))
312+ let withyBitCO2 = if (!(isDefined(tx.sellOrder.assetPair.priceAsset)))
310313 then true
311314 else !(isDefined(tx.sellOrder.assetPair.amountAsset))
312- withWaves
315+ withyBitCO2
313316 case _ =>
314317 false
315318 }
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 EuroW = 32000000
3333
3434 let ybitco2 = ((1 * EuroW) / 10000)
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"
78+
79+
80+func getKeyTokenGTS1 (item) = "GTStable"
7881
7982
8083 func getKeyUserItemGtsCounter (user,item) = "Order_№:"
8184
8285
8386 func getValueUserItemGtsCounter (user,item) = getNumberByKey(getKeyUserItemGtsCounter(user, item))
8487
8588
8689 func getKeyItemName (item) = "Categoría del Producto:"
8790
8891
8992 func getValueItemName (item) = getStrByKey(getKeyItemName(item))
9093
9194
9295 func getKeyUserName (item) = "Nombre del Usuario:"
9396
9497
9598 func getValueUserName (item) = getStrByKey(getKeyUserName(item))
9699
97100
98101 func getKeyUserDocument (item) = "№ de Documento / DNI del Usuario:"
99102
100103
101104 func getValueUserDocument (item) = getStrByKey(getKeyUserDocument(item))
102105
103106
104107 func getKeySaldoTokenQtyStartEtapa (item) = "Tokens Ofertados en la presente etapa / Saldo, ytok:"
105108
106109
107110 func getValueSaldoTokenQtyStartEtapa (item) = getNumberByKey(getKeySaldoTokenQtyStartEtapa(item))
108111
109112
110113 func getKeyBalanceQtySupplier (item) = "Balance/Saldo GTS, ytokens:"
111114
112115
113116 func getValueBalanceQtySupplier (item) = getNumberByKey(getKeyBalanceQtySupplier(item))
114117
115118
116119 func getKeyBalanceSupplier (supplier) = "Monto Bruto por VentaGTS, wvls:"
117120
118121
119122 func getValueBalanceSupplier (supplier) = getNumberByKey(getKeyBalanceSupplier(supplier))
120123
121124
122125 func getKeyUI (item) = "UI,_wvls:"
123126
124127
125128 func getValueUI (item) = getNumberByKey(getKeyUI(item))
126129
127130
128131 func getKeyPI (item) = "PI,_wvls:"
129132
130133
131134 func getValuePI (item) = getNumberByKey(getKeyPI(item))
132135
133136
134137 func getKeySI (item) = "SI,_wvls:"
135138
136139
137140 func getValueSI (item) = getNumberByKey(getKeySI(item))
138141
139142
140143 @Callable(i)
141144 func deposit (title,supplierData) = {
142145 let pmt = extract(i.payment)
143146 if ((pmt.assetId != yBitCO2))
144147 then throw("deposito permitido solo en yBitCO2 tokens")
145148 else {
146149 let supplier = toBase58String(i.caller.bytes)
147150 let currentAmount = match getInteger(this, supplier) {
148151 case a: Int =>
149152 a
150153 case _ =>
151154 startQty
152155 }
153156 let newAmount = (currentAmount + pmt.amount)
154157 if ((0 >= newAmount))
155158 then throw("No hay yBitCO2 en su balance")
156159 else WriteSet([DataEntry(supplier, newAmount)])
157160 }
158161 }
159162
160163
161164
162165 @Callable(i)
163166 func purchaseGTS (item,itemName,userName,userDocument,totalAmount) = {
164167 let pmt = extract(i.payment)
165168 if ((pmt.assetId != yBitCO2))
166169 then throw("Use yBitCO2 tokens para adquirir ProductosGTS")
167170 else {
168171 let supplier = match getString(this, getKeyItemSupplier(item)) {
169172 case a: String =>
170173 a
171174 case _ =>
172175 NONE
173176 }
174177 let projAdd = match getString(this, getKeyProject(item)) {
175178 case a: String =>
176179 NONE
177180 case _ =>
178181 pAdd
179182 }
180183 let nodoAdd = match getString(this, getKeyEcosystNode(item)) {
181184 case a: String =>
182185 NONE
183186 case _ =>
184187 eAdd
185188 }
186189 let preTokenQty = match getInteger(this, getKeyBalanceQtySupplier(item)) {
187190 case a: Int =>
188191 a
189192 case _ =>
190193 SecondFaseQty
191194 }
192195 let balanceSupplier = match getInteger(this, getKeyBalanceSupplier(supplier)) {
193196 case a: Int =>
194197 a
195198 case _ =>
196199 0
197200 }
198201 let userAddress = toBase58String(i.caller.bytes)
199202 let subTotal = (totalAmount - ((igv * totalAmount) / 100))
200203 let cPB = ((88 * ybitco2) / 100)
201204 let uI = ((subTotal * uIP) / 100)
202205 let uBI = ((uI / cPB) * 1)
203206 let pI = ((subTotal * pIP) / 100)
204207 let eI = ((subTotal * eIP) / 100)
205208 let eBI = (((subTotal * eBP) / (100 * cPB)) * 1)
206209 let sI = ((totalAmount - pI) - eI)
207210 let sBI = (((subTotal * sBP) / (100 * cPB)) * 1)
208211 let QVentasgts = (((subTotal * 11) / (cPB * 100)) * 1)
209212 if ((totalAmount > pmt.amount))
210213 then throw("Payment Amount can't be less than item Purchase Order")
211214 else if ((pmt.amount > totalAmount))
212215 then throw("Payment Amount can't be higher than item Purchase Order")
213216 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 * 10000)), DataEntry(getKeyUI(item), uI), DataEntry("UBI, 10e-4 gts1", uBI), DataEntry(getKeyPI(item), pI), DataEntry("EcSys, yBitCO2cents", eI), DataEntry("EcSys, 10e-4 gts1", eBI), DataEntry(getKeySI(item), sI), DataEntry("SBI, 10e-4 gts1", sBI), DataEntry(("Order_Status:_" + userAddress), "Adquisición Confirmada!"), DataEntry("QporVentasGTS, 10e-4 gts1", QVentasgts), DataEntry(getKeyBalanceQtySupplier(item), (preTokenQty - (QVentasgts / 1))), 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)]))
214217 }
215218 }
216219
217220
218221
219222 @Callable(i)
220223 func purchaseGTS2 (item,itemName,userName,userDocument,totalAmount) = {
221224 let pmt = extract(i.payment)
222225 if (isDefined(pmt.assetId))
223226 then throw("El Precio en waves.")
224227 else {
225228 let supplier = match getString(this, getKeyItemSupplier(item)) {
226229 case a: String =>
227230 a
228231 case _ =>
229232 NONE
230233 }
231234 let projAdd = match getString(this, getKeyProject(item)) {
232235 case a: String =>
233236 NONE
234237 case _ =>
235238 pAdd
236239 }
237240 let nodoAdd = match getString(this, getKeyEcosystNode(item)) {
238241 case a: String =>
239242 NONE
240243 case _ =>
241244 eAdd
242245 }
243246 let preTokenQty = match getInteger(this, getKeyBalanceQtySupplier(item)) {
244247 case a: Int =>
245248 a
246249 case _ =>
247250 SecondFaseQty
248251 }
249252 let balanceSupplier = match getInteger(this, getKeyBalanceSupplier(supplier)) {
250253 case a: Int =>
251254 a
252255 case _ =>
253256 0
254257 }
255258 let userAddress = toBase58String(i.caller.bytes)
256259 let subTotal = (totalAmount - ((igv * totalAmount) / 100))
257260 let cPB = ((88 * ybitco2) / 100)
258261 let uI = ((subTotal * uIP) / 100)
259262 let uBI = ((uI / cPB) * 1)
260263 let pI = ((subTotal * pIP) / 100)
261264 let eI = ((subTotal * eIP) / 100)
262265 let eBI = (((subTotal * eBP) / (100 * cPB)) * 1)
263266 let sI = ((totalAmount - pI) - eI)
264267 let sBI = (((subTotal * sBP) / (100 * cPB)) * 1)
265268 let QVentasgts = (((subTotal * 11) / (cPB * 100)) * 1)
266269 if ((totalAmount > pmt.amount))
267270 then throw("Payment Amount can't be less than item Purchase Order")
268271 else if ((pmt.amount > totalAmount))
269272 then throw("Payment Amount can't be higher than item Purchase Order")
270273 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)]))
271274 }
272275 }
273276
274277
275278
276279 @Callable(i)
277280 func withdraw (item,amount) = {
278281 let userAddress = toBase58String(i.caller.bytes)
279282 let supplier = match getString(this, getKeyItemSupplier(item)) {
280283 case a: String =>
281284 a
282285 case _ =>
283286 NONE
284287 }
285288 let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) {
286289 case a: Int =>
287290 a
288291 case _ =>
289292 startQty
290293 }
291294 let newAmount = (preIcoQty - amount)
292295 if ((0 > amount))
293296 then throw("El balance de retiro no puede ser negativo!")
294297 else if ((0 >= newAmount))
295298 then throw("Ooppss.. Insuficiente balance!")
296299 else ScriptResult(WriteSet([DataEntry(item, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, yBitCO2)]))
297300 }
298301
299302
300303 @Verifier(tx)
301304 func verify () = match tx {
302305 case t: SetScriptTransaction =>
303306 sigVerify(tx.bodyBytes, tx.proofs[0], OwnerPubKey)
304307 case d: DataTransaction|ReissueTransaction =>
305308 true
306309 case tx: TransferTransaction =>
307310 true
308311 case tx: ExchangeTransaction =>
309- let withWaves = if (!(isDefined(tx.sellOrder.assetPair.priceAsset)))
312+ let withyBitCO2 = if (!(isDefined(tx.sellOrder.assetPair.priceAsset)))
310313 then true
311314 else !(isDefined(tx.sellOrder.assetPair.amountAsset))
312- withWaves
315+ withyBitCO2
313316 case _ =>
314317 false
315318 }
316319

github/deemru/w8io/169f3d6 
65.94 ms