tx · 6QAaMxdDLH6mgLnB7Pi6sFp152ZqfpuezG1qMBbu5pEJ

3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8:  -0.01400000 Waves

2020.08.26 12:50 [1149520] smart account 3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8 > SELF 0.00000000 Waves

{ "type": 13, "id": "6QAaMxdDLH6mgLnB7Pi6sFp152ZqfpuezG1qMBbu5pEJ", "fee": 1400000, "feeAssetId": null, "timestamp": 1598435460737, "version": 1, "sender": "3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8", "senderPublicKey": "8xCH82jKi2DM7HXXD45fmftPUDjr3TJpjanUATKMK37U", "proofs": [ "486kSanSGjSbBygqP1uWoMY7182mbw1RX41mPDQEzuTJWfF3yE4arCXDw4N12LXRvvEnBimidCVWwQvNKg1VVbpu" ], "script": "base64:AAIDAAAAAAAAACwIARIECgIICBIECgIICBIHCgUICAgIARIHCgUICAgIARIECgIIARIECgIIAQAAADEAAAAAB3lCaXRDTzIBAAAAIGmM1P/bTQF96Mt4t9+zj8FcPDlb6Qx5aA0hjmfpm0utAAAAAARndHMxAQAAACDDxYMO3SsdGFMCSZ4E3p59+bOpZEBHwTUZ+0J8yxIGZwAAAAAIc3RhcnRRdHkAAAAAALY1DNAAAAAADEZpcnN0RmFzZVF0eQAAAAAAEpeskAAAAAANU2Vjb25kRmFzZVF0eQAAAAAAo51gQAAAAAALc3RhcnRRdHlHVFMAAAAAAAHSc1QAAAAAD0ZpcnN0RmFzZVF0eUdUUwAAAAAAAC+YxAAAAAAQU2Vjb25kRmFzZVF0eUdUUwAAAAAAAaLakAAAAAAIbm9tUHJpY2UAAAAAAAAAAAEAAAAAA3d2cwAAAAAABfXhAAAAAAAQc3VwcGxpZXJEaXNjb3VudAAAAAAAAAAADAAAAAAETk9ORQIAAAAEbm9uZQAAAAALT3duZXJQdWJLZXkBAAAAIHYlgUf22Lk37u4at3MrCWteEN5n68yQc4q5Um14SA8PAAAAAAZpc3N1ZXIJ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nl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAALT3duZXJQdWJLZXkDAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAElJlaXNzdWVUcmFuc2FjdGlvbgQAAAABZAUAAAAHJG1hdGNoMAYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAAnR4BQAAAAckbWF0Y2gwBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATRXhjaGFuZ2VUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAEAAAACXdpdGhXYXZlcwMJAQAAAAEhAAAAAQkBAAAACWlzRGVmaW5lZAAAAAEICAgFAAAAAnR4AAAACXNlbGxPcmRlcgAAAAlhc3NldFBhaXIAAAAKcHJpY2VBc3NldAYJAQAAAAEhAAAAAQkBAAAACWlzRGVmaW5lZAAAAAEICAgFAAAAAnR4AAAACXNlbGxPcmRlcgAAAAlhc3NldFBhaXIAAAALYW1vdW50QXNzZXQFAAAACXdpdGhXYXZlcwf1qT/U", "chainId": 84, "height": 1149520, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8Rp416FtWTQkonwvrGnZKTh84auqaNS3NQzLQg9QYHvh Next: BezRfJK5jpJ4XrLKdFmbq6a1vXkP2PbdiGieWid1SvD2 Diff:
OldNewDifferences
55
66 let gts1 = base58'EBDBY14t3xuduZ2GCNqEUpoLoy9eAAYfyQZA5ryVJxzS'
77
8-let startQty = 30569300
8+let startQty = 3056930000
99
10-let FirstFaseQty = 3119300
10+let FirstFaseQty = 311930000
1111
12-let SecondFaseQty = 27450000
12+let SecondFaseQty = 2745000000
13+
14+let startQtyGTS = 30569300
15+
16+let FirstFaseQtyGTS = 3119300
17+
18+let SecondFaseQtyGTS = 27450000
1319
1420 let nomPrice = 1
1521
104110 func getValueUserDocument (item) = getStrByKey(getKeyUserDocument(item))
105111
106112
107-func getKeySaldoTokenQtyStartEtapa (item) = "Tokens Ofertados en la presente etapa / Saldo, ytok:"
108-
109-
110-func getValueSaldoTokenQtyStartEtapa (item) = getNumberByKey(getKeySaldoTokenQtyStartEtapa(item))
111-
112-
113-func getKeyBalanceQtySupplier (item) = "Balance/Saldo GTS, ytokens:"
113+func getKeyBalanceQtySupplier (item) = "Balance/Saldo GTS, gts-tokens:"
114114
115115
116116 func getValueBalanceQtySupplier (item) = getNumberByKey(getKeyBalanceQtySupplier(item))
138138
139139
140140 func getValueSI (item) = getNumberByKey(getKeySI(item))
141+
142+
143+@Callable(i)
144+func depositGTS (title,supplierData) = {
145+ let pmt = extract(i.payment)
146+ if ((pmt.assetId != gts1))
147+ then throw("deposito permitido solo en gts1 tokens")
148+ else {
149+ let supplier = toBase58String(i.caller.bytes)
150+ let currentAmount = match getInteger(this, supplier) {
151+ case a: Int =>
152+ a
153+ case _ =>
154+ startQtyGTS
155+ }
156+ let newAmount = (currentAmount + pmt.amount)
157+ if ((0 >= newAmount))
158+ then throw("No hay gts1 en su balance")
159+ else WriteSet([DataEntry(supplier, newAmount)])
160+ }
161+ }
162+
141163
142164
143165 @Callable(i)
190212 case a: Int =>
191213 a
192214 case _ =>
193- SecondFaseQty
215+ SecondFaseQtyGTS
194216 }
195217 let balanceSupplier = match getInteger(this, getKeyBalanceSupplier(supplier)) {
196218 case a: Int =>
200222 }
201223 let userAddress = toBase58String(i.caller.bytes)
202224 let subTotal = (totalAmount - ((igv * totalAmount) / 100))
203- let cPB = ((88 * gts) / 100)
225+ let cPG = ((88 * gts) / 100)
204226 let uI = ((subTotal * uIP) / 100)
205- let uBI = ((uI / cPB) * 1)
227+ let uBI = ((uI / cPG) * 1)
206228 let pI = ((subTotal * pIP) / 100)
207229 let eI = ((subTotal * eIP) / 100)
208- let eBI = (((subTotal * eBP) / (100 * cPB)) * 1)
230+ let eBI = (((subTotal * eBP) / (100 * cPG)) * 1)
209231 let sI = ((totalAmount - pI) - eI)
210- let sBI = (((subTotal * sBP) / (100 * cPB)) * 1)
211- let QVentasgts = (((subTotal * 11) / (cPB * 100)) * 1)
232+ let sBI = (((subTotal * sBP) / (100 * cPG)) * 1)
233+ let QVentasgts = (((subTotal * 11) / (cPG * 100)) * 1)
212234 if ((totalAmount > pmt.amount))
213235 then throw("Payment Amount can't be less than item Purchase Order")
214236 else if ((pmt.amount > totalAmount))
215237 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 * 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)]))
238+ 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", (cPG * 100)), 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)), 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)]))
217239 }
218240 }
219241
277299
278300
279301 @Callable(i)
302+func withdrawGTS (item,amount) = {
303+ let userAddress = toBase58String(i.caller.bytes)
304+ let supplier = match getString(this, getKeyItemSupplier(item)) {
305+ case a: String =>
306+ a
307+ case _ =>
308+ NONE
309+ }
310+ let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) {
311+ case a: Int =>
312+ a
313+ case _ =>
314+ startQtyGTS
315+ }
316+ let newAmount = (preIcoQty - amount)
317+ if ((0 > amount))
318+ then throw("El balance de retiro no puede ser negativo!")
319+ else if ((0 >= newAmount))
320+ then throw("Ooppss.. Insuficiente balance!")
321+ else ScriptResult(WriteSet([DataEntry(item, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, gts1)]))
322+ }
323+
324+
325+
326+@Callable(i)
280327 func withdraw (item,amount) = {
281328 let userAddress = toBase58String(i.caller.bytes)
282329 let supplier = match getString(this, getKeyItemSupplier(item)) {
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 = 30569300
8+let startQty = 3056930000
99
10-let FirstFaseQty = 3119300
10+let FirstFaseQty = 311930000
1111
12-let SecondFaseQty = 27450000
12+let SecondFaseQty = 2745000000
13+
14+let startQtyGTS = 30569300
15+
16+let FirstFaseQtyGTS = 3119300
17+
18+let SecondFaseQtyGTS = 27450000
1319
1420 let nomPrice = 1
1521
1622 let wvs = 100000000
1723
1824 let supplierDiscount = 12
1925
2026 let NONE = "none"
2127
2228 let OwnerPubKey = base58'8xCH82jKi2DM7HXXD45fmftPUDjr3TJpjanUATKMK37U'
2329
2430 let issuer = Address(base58'3N67GoXrZo4iwmEjLhS9iNUCbzpPEjoYgNW')
2531
2632 let eAdd = Address(base58'3N3uf7RK8Aed4v5ufGB8xV2Wsz4WNoHj21c')
2733
2834 let pAdd = Address(base58'3Mv5mXTRhpWZxZxstmnsBhckWNgErMTFEaD')
2935
3036 let igv = 18
3137
3238 let ybitco2 = 10000
3339
3440 let gts = 100000
3541
3642 let uIP = 7
3743
3844 let pIP = 10
3945
4046 let eIP = 1
4147
4248 let sBP = 2
4349
4450 let eBP = 2
4551
4652 func getNumberByKey (key) = {
4753 let num = match getInteger(this, key) {
4854 case a: Int =>
4955 a
5056 case _ =>
5157 0
5258 }
5359 num
5460 }
5561
5662
5763 func getStrByKey (key) = {
5864 let str = match getString(this, key) {
5965 case a: String =>
6066 a
6167 case _ =>
6268 NONE
6369 }
6470 str
6571 }
6672
6773
6874 func getKeyItemSupplier (supplier) = (supplier + "Bit-CO2 Shop, Lima-Perú")
6975
7076
7177 func getKeyItem (supplier,item) = (("Producto-GTS: " + " ") + toBase58String(sha256(toBytes((supplier + item)))))
7278
7379
7480 func getKeyProject (item) = "Project"
7581
7682
7783 func getKeyEcosystNode (item) = "Nodo del Ecosistema"
7884
7985
8086 func getKeyTokenGTS1 (item) = "GTStable"
8187
8288
8389 func getKeyUserItemGtsCounter (user,item) = "Order_№:"
8490
8591
8692 func getValueUserItemGtsCounter (user,item) = getNumberByKey(getKeyUserItemGtsCounter(user, item))
8793
8894
8995 func getKeyItemName (item) = "Categoría del Producto:"
9096
9197
9298 func getValueItemName (item) = getStrByKey(getKeyItemName(item))
9399
94100
95101 func getKeyUserName (item) = "Nombre del Usuario:"
96102
97103
98104 func getValueUserName (item) = getStrByKey(getKeyUserName(item))
99105
100106
101107 func getKeyUserDocument (item) = "№ de Documento / DNI del Usuario:"
102108
103109
104110 func getValueUserDocument (item) = getStrByKey(getKeyUserDocument(item))
105111
106112
107-func getKeySaldoTokenQtyStartEtapa (item) = "Tokens Ofertados en la presente etapa / Saldo, ytok:"
108-
109-
110-func getValueSaldoTokenQtyStartEtapa (item) = getNumberByKey(getKeySaldoTokenQtyStartEtapa(item))
111-
112-
113-func getKeyBalanceQtySupplier (item) = "Balance/Saldo GTS, ytokens:"
113+func getKeyBalanceQtySupplier (item) = "Balance/Saldo GTS, gts-tokens:"
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))
141+
142+
143+@Callable(i)
144+func depositGTS (title,supplierData) = {
145+ let pmt = extract(i.payment)
146+ if ((pmt.assetId != gts1))
147+ then throw("deposito permitido solo en gts1 tokens")
148+ else {
149+ let supplier = toBase58String(i.caller.bytes)
150+ let currentAmount = match getInteger(this, supplier) {
151+ case a: Int =>
152+ a
153+ case _ =>
154+ startQtyGTS
155+ }
156+ let newAmount = (currentAmount + pmt.amount)
157+ if ((0 >= newAmount))
158+ then throw("No hay gts1 en su balance")
159+ else WriteSet([DataEntry(supplier, newAmount)])
160+ }
161+ }
162+
141163
142164
143165 @Callable(i)
144166 func deposit (title,supplierData) = {
145167 let pmt = extract(i.payment)
146168 if ((pmt.assetId != yBitCO2))
147169 then throw("deposito permitido solo en yBitCO2 tokens")
148170 else {
149171 let supplier = toBase58String(i.caller.bytes)
150172 let currentAmount = match getInteger(this, supplier) {
151173 case a: Int =>
152174 a
153175 case _ =>
154176 startQty
155177 }
156178 let newAmount = (currentAmount + pmt.amount)
157179 if ((0 >= newAmount))
158180 then throw("No hay yBitCO2 en su balance")
159181 else WriteSet([DataEntry(supplier, newAmount)])
160182 }
161183 }
162184
163185
164186
165187 @Callable(i)
166188 func purchaseGTS (item,itemName,userName,userDocument,totalAmount) = {
167189 let pmt = extract(i.payment)
168190 if ((pmt.assetId != yBitCO2))
169191 then throw("Use yBitCO2 tokens para adquirir ProductosGTS")
170192 else {
171193 let supplier = match getString(this, getKeyItemSupplier(item)) {
172194 case a: String =>
173195 a
174196 case _ =>
175197 NONE
176198 }
177199 let projAdd = match getString(this, getKeyProject(item)) {
178200 case a: String =>
179201 NONE
180202 case _ =>
181203 pAdd
182204 }
183205 let nodoAdd = match getString(this, getKeyEcosystNode(item)) {
184206 case a: String =>
185207 NONE
186208 case _ =>
187209 eAdd
188210 }
189211 let preTokenQty = match getInteger(this, getKeyBalanceQtySupplier(item)) {
190212 case a: Int =>
191213 a
192214 case _ =>
193- SecondFaseQty
215+ SecondFaseQtyGTS
194216 }
195217 let balanceSupplier = match getInteger(this, getKeyBalanceSupplier(supplier)) {
196218 case a: Int =>
197219 a
198220 case _ =>
199221 0
200222 }
201223 let userAddress = toBase58String(i.caller.bytes)
202224 let subTotal = (totalAmount - ((igv * totalAmount) / 100))
203- let cPB = ((88 * gts) / 100)
225+ let cPG = ((88 * gts) / 100)
204226 let uI = ((subTotal * uIP) / 100)
205- let uBI = ((uI / cPB) * 1)
227+ let uBI = ((uI / cPG) * 1)
206228 let pI = ((subTotal * pIP) / 100)
207229 let eI = ((subTotal * eIP) / 100)
208- let eBI = (((subTotal * eBP) / (100 * cPB)) * 1)
230+ let eBI = (((subTotal * eBP) / (100 * cPG)) * 1)
209231 let sI = ((totalAmount - pI) - eI)
210- let sBI = (((subTotal * sBP) / (100 * cPB)) * 1)
211- let QVentasgts = (((subTotal * 11) / (cPB * 100)) * 1)
232+ let sBI = (((subTotal * sBP) / (100 * cPG)) * 1)
233+ let QVentasgts = (((subTotal * 11) / (cPG * 100)) * 1)
212234 if ((totalAmount > pmt.amount))
213235 then throw("Payment Amount can't be less than item Purchase Order")
214236 else if ((pmt.amount > totalAmount))
215237 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 * 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)]))
238+ 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", (cPG * 100)), 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)), 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)]))
217239 }
218240 }
219241
220242
221243
222244 @Callable(i)
223245 func purchaseGTS2 (item,itemName,userName,userDocument,totalAmount) = {
224246 let pmt = extract(i.payment)
225247 if (isDefined(pmt.assetId))
226248 then throw("El Precio en waves.")
227249 else {
228250 let supplier = match getString(this, getKeyItemSupplier(item)) {
229251 case a: String =>
230252 a
231253 case _ =>
232254 NONE
233255 }
234256 let projAdd = match getString(this, getKeyProject(item)) {
235257 case a: String =>
236258 NONE
237259 case _ =>
238260 pAdd
239261 }
240262 let nodoAdd = match getString(this, getKeyEcosystNode(item)) {
241263 case a: String =>
242264 NONE
243265 case _ =>
244266 eAdd
245267 }
246268 let preTokenQty = match getInteger(this, getKeyBalanceQtySupplier(item)) {
247269 case a: Int =>
248270 a
249271 case _ =>
250272 SecondFaseQty
251273 }
252274 let balanceSupplier = match getInteger(this, getKeyBalanceSupplier(supplier)) {
253275 case a: Int =>
254276 a
255277 case _ =>
256278 0
257279 }
258280 let userAddress = toBase58String(i.caller.bytes)
259281 let subTotal = (totalAmount - ((igv * totalAmount) / 100))
260282 let cPB = ((88 * ybitco2) / 100)
261283 let uI = ((subTotal * uIP) / 100)
262284 let uBI = ((uI / cPB) * 1)
263285 let pI = ((subTotal * pIP) / 100)
264286 let eI = ((subTotal * eIP) / 100)
265287 let eBI = (((subTotal * eBP) / (100 * cPB)) * 1)
266288 let sI = ((totalAmount - pI) - eI)
267289 let sBI = (((subTotal * sBP) / (100 * cPB)) * 1)
268290 let QVentasgts = (((subTotal * 11) / (cPB * 100)) * 1)
269291 if ((totalAmount > pmt.amount))
270292 then throw("Payment Amount can't be less than item Purchase Order")
271293 else if ((pmt.amount > totalAmount))
272294 then throw("Payment Amount can't be higher than item Purchase Order")
273295 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)]))
274296 }
275297 }
276298
277299
278300
279301 @Callable(i)
302+func withdrawGTS (item,amount) = {
303+ let userAddress = toBase58String(i.caller.bytes)
304+ let supplier = match getString(this, getKeyItemSupplier(item)) {
305+ case a: String =>
306+ a
307+ case _ =>
308+ NONE
309+ }
310+ let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) {
311+ case a: Int =>
312+ a
313+ case _ =>
314+ startQtyGTS
315+ }
316+ let newAmount = (preIcoQty - amount)
317+ if ((0 > amount))
318+ then throw("El balance de retiro no puede ser negativo!")
319+ else if ((0 >= newAmount))
320+ then throw("Ooppss.. Insuficiente balance!")
321+ else ScriptResult(WriteSet([DataEntry(item, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, gts1)]))
322+ }
323+
324+
325+
326+@Callable(i)
280327 func withdraw (item,amount) = {
281328 let userAddress = toBase58String(i.caller.bytes)
282329 let supplier = match getString(this, getKeyItemSupplier(item)) {
283330 case a: String =>
284331 a
285332 case _ =>
286333 NONE
287334 }
288335 let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) {
289336 case a: Int =>
290337 a
291338 case _ =>
292339 startQty
293340 }
294341 let newAmount = (preIcoQty - amount)
295342 if ((0 > amount))
296343 then throw("El balance de retiro no puede ser negativo!")
297344 else if ((0 >= newAmount))
298345 then throw("Ooppss.. Insuficiente balance!")
299346 else ScriptResult(WriteSet([DataEntry(item, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, yBitCO2)]))
300347 }
301348
302349
303350 @Verifier(tx)
304351 func verify () = match tx {
305352 case t: SetScriptTransaction =>
306353 sigVerify(tx.bodyBytes, tx.proofs[0], OwnerPubKey)
307354 case d: DataTransaction|ReissueTransaction =>
308355 true
309356 case tx: TransferTransaction =>
310357 true
311358 case tx: ExchangeTransaction =>
312359 let withWaves = if (!(isDefined(tx.sellOrder.assetPair.priceAsset)))
313360 then true
314361 else !(isDefined(tx.sellOrder.assetPair.amountAsset))
315362 withWaves
316363 case _ =>
317364 false
318365 }
319366

github/deemru/w8io/169f3d6 
92.29 ms