tx · ceK4SEa6ABcUedxNKJsTDHWuhboD313v3YK5wxmMfMr

3N9DpWDvNPnq3wuuyh2cGk9hcKfoke9CCfL:  -0.01000000 Waves

2021.10.28 14:07 [1766065] smart account 3N9DpWDvNPnq3wuuyh2cGk9hcKfoke9CCfL > SELF 0.00000000 Waves

{ "type": 13, "id": "ceK4SEa6ABcUedxNKJsTDHWuhboD313v3YK5wxmMfMr", "fee": 1000000, "feeAssetId": null, "timestamp": 1635419270092, "version": 2, "chainId": 84, "sender": "3N9DpWDvNPnq3wuuyh2cGk9hcKfoke9CCfL", "senderPublicKey": "A695BnQcmLqEPwcN5kdhv4bHipgdE4FnM5CBEMtA95Mo", "proofs": [ "FnWRrJPcFNr4VE6zJdh1khZ2xrrH2H14HN4DRKgN93u7cBSjUqiCu8zc3kqzSsiVPMigNtp4YdkQcPmQvD6WSDp" ], "script": "base64:AAIDAAAAAAAAABEIARIECgIICBIHCgUICAgBAQAAADQAAAAAB3hCaXRDTzIBAAAAICAEZKaqA3sNb6aq+pclWLOWiXpTDP/vusZoh2yDVNyNAAAAAAhzdGFydFF0eQAAAAAAAASqHQAAAAAMRmlyc3RGYXNlUXR5AAAAAAAAAHnZAAAAAA1TZWNvbmRGYXNlUXR5AAAAAAAABDBEAAAAAAhub21QcmljZQAAAAAAAAAAAQAAAAADd3ZzAAAAAAAF9eEAAAAAABBzdXBwbGllckRpc2NvdW50AAAAAAAAAAAMAAAAAAROT05FAgAAAARub25lAAAAAAtPd25lclB1YktleQEAAAAghwo2r32S4n1Z60PhHNuoYGhC3c/vioX75j3CW29sfHYAAAAABmlzc3VlcgkBAAAAB0FkZHJlc3MAAAABAQAAABoBVEtIFY+5IU8slvHa3AYnimNvIdHW5z2X2gAAAAAEZUFkZAkBAAAAB0FkZHJlc3MAAAABAQAAABoBVEwWqDv2xgQzga5tOuDFjQrGc4MHZcTC8gAAAAAEcEFkZAkBAAAAB0FkZHJlc3MAAAABAQAAABoBVNPFIUJMxXdBxNnhCNkHVKgX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QAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAALT3duZXJQdWJLZXkDAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABJSZWlzc3VlVHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAABZAUAAAAHJG1hdGNoMAYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAAnR4BQAAAAckbWF0Y2gwBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATRXhjaGFuZ2VUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAEAAAACXdpdGhXYXZlcwMJAQAAAAEhAAAAAQkBAAAACWlzRGVmaW5lZAAAAAEICAgFAAAAAnR4AAAACXNlbGxPcmRlcgAAAAlhc3NldFBhaXIAAAAKcHJpY2VBc3NldAYJAQAAAAEhAAAAAQkBAAAACWlzRGVmaW5lZAAAAAEICAgFAAAAAnR4AAAACXNlbGxPcmRlcgAAAAlhc3NldFBhaXIAAAALYW1vdW50QXNzZXQFAAAACXdpdGhXYXZlcwevVb2+", "height": 1766065, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EY2WkrsHVZeAzkZV1xjJ2exFQffCunHSYJgygcHUSVXV Next: 2L9Yvfhyuxss3yEEn4CMEC1nKzbMhWkPNWBwUW1gMFRb Diff:
OldNewDifferences
9898 func getValueProjectDev (supplier) = getStrByKey(getKeyProjectDev(supplier))
9999
100100
101-func getKeyProjectEtapa (projectAddress) = "AchuarKapawi, I Etapa: PreICO"
102-
103-
104-func getValueProjectEtapa (projectAddress) = getStrByKey(getKeyProjectEtapa(projectAddress))
105-
106-
107-func getKeyFirstFaseQty (item) = "Total tokens emitidos en I Fase Pre-ICO"
101+func getKeyFirstFaseQty (item) = "Tokens ofertados al 6% en la I Fase Pre-ICO:"
108102
109103
110104 func getValueFirstFaseQty (item) = getStrByKey(getKeyFirstFaseQty(item))
111105
112106
113-func getKeyNomTokenPrice (item) = "10.00 Euros"
107+func getKeyNomTokenPrice (item) = "Precio Nominal, 1 token Bit-CO2:"
114108
115109
116-func getKeyItemPriceSupplier (item) = "_waves"
110+func getKeyDescuento6TokPrice (item) = "Precio de 1 token Bit-CO2 con el 6% de descuento"
117111
118112
119-func getValueItemPriceSupplier (item) = getNumberByKey(getKeyItemPriceSupplier(item))
113+func getValueDescuento6TokPrice (item) = getNumberByKey(getKeyDescuento6TokPrice(item))
120114
121115
122-func getKeyMaxDescuento (item) = "Máximo Descuento Ofrecido en I Etapa, %:"
116+func getKeySaldoTokenQtyStartEtapa (item) = "Saldo de tokens al 6% en oferta, actual:"
123117
124118
125-func getValueMaxDescuento (item) = getNumberByKey(getKeyMaxDescuento(item))
126-
127-
128-func getKeyMinTokenPrice (item) = "8.80 Euros por 1 token Bit-CO2"
119+func getValueSaldoTokenQtyStartEtapa (item) = getNumberByKey(getKeySaldoTokenQtyStartEtapa(item))
129120
130121
131122 func getKeyUserItemCounter (user,item) = "Order_№:"
134125 func getValueUserItemCounter (user,item) = getNumberByKey(getKeyUserItemCounter(user, item))
135126
136127
137-func getKeyUserName (item) = "Nombre del Usuario:"
138-
139-
140-func getValueUserName (item) = getStrByKey(getKeyUserName(item))
141-
142-
143128 func getKeyUserDocument (item) = "№ de Documento Nacional de Identidad / DNI del Usuario:"
144129
145130
146131 func getValueUserDocument (item) = getStrByKey(getKeyUserDocument(item))
147132
148133
149-func getKeyUserCountry (item) = "País del Usuario:"
134+func getKeyUserCountry (item) = "País de Residencia del Usuario:"
150135
151136
152137 func getValueUserCountry (item) = getStrByKey(getKeyUserCountry(item))
153138
154139
155-func getKeyItemDiscountUser (item) = "Descuento elejido por el Usuario, %:"
140+func getKeyDiscount6User (item) = "Descuento para el Usuario, 6%:"
156141
157142
158-func getValueItemDiscountUser (item) = getNumberByKey(getKeyItemDiscountUser(item))
159-
160-
161-func getKeyItemDiscountSupplier (item) = "SupplierDiscount, max_%:"
162-
163-
164-func getValueItemDiscountSupplier (item) = getNumberByKey(getKeyItemDiscountSupplier(item))
143+func getValueDiscount6User (item) = getNumberByKey(getKeyDiscount6User(item))
165144
166145
167146 func getKeyItemUserOrderQty (item) = "Orden de Compra, cantidad solicitada:"
168147
169148
170149 func getValueItemUserOrderQty (item) = getNumberByKey(getKeyItemUserOrderQty(item))
171-
172-
173-func getKeySaldoTokenQtyStartEtapa (item) = "Tokens Ofertados en la presente etapa / Saldo:"
174-
175-
176-func getValueSaldoTokenQtyStartEtapa (item) = getNumberByKey(getKeySaldoTokenQtyStartEtapa(item))
177-
178-
179-func getKeyBalanceQtySupplier (item) = "Balance/Saldo, tokens:"
180-
181-
182-func getValueBalanceQtySupplier (item) = getNumberByKey(getKeyBalanceQtySupplier(item))
183150
184151
185152 func getKeyBalanceSupplier (supplier) = "Ingresos por Venta Directa / BlockChain:"
211178
212179
213180 @Callable(i)
214-func purchase (item,userName,userCountry,userDiscount,orderQty) = {
181+func purchase (item,userDocument,userCountry,userDiscount,orderQty) = {
215182 let pmt = extract(i.payment)
216183 if (isDefined(pmt.assetId))
217184 then throw("En la presente Plastaforma Ud. puede adquirir sus tokens xBitCO2 usando WavesKeeper y su token de pago Waves.")
222189 case _ =>
223190 NONE
224191 }
225- let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) {
192+ let preIcoQty = match getInteger(this, getKeySaldoTokenQtyStartEtapa(item)) {
226193 case a: Int =>
227194 a
228195 case _ =>
241208 then throw("Payment Amount can't be less than item Purchase Order")
242209 else if ((pmt.amount > totalAmount))
243210 then throw("Payment Amount can't be higher than item Purchase Order")
244- else ScriptResult(WriteSet([DataEntry(getKeyProjectCategory(item), "Conservación Forestal Amazónica"), DataEntry(getKeyProjectName(item), "Reserva Amazónica Achuar-Kapawi"), DataEntry(getKeyProjectCountry(item), "Ecuador"), DataEntry(getKeyProjectCode(item), "01-EC_ACH-KAPAWI_01PREICO"), DataEntry(getKeyProjectPropietary(item), "Comunidad Achuar Kapawi"), DataEntry(getKeyProjectDev(supplier), "Fundación Alianza Ecológica 'NASE'"), DataEntry("Fases del Proyecto, Pre-ICO:", " I y II Fase"), DataEntry(getKeyFirstFaseQty(item), FirstFaseQty), DataEntry("Cantidad Total de Tokens Bit-CO2 a Emitir en I y II Fase Pre-ICO:", startQty), DataEntry("Precio Nominal, 1 token Bit-CO2:", " 10.00 Euros"), DataEntry(getKeyMaxDescuento(item), "6%"), DataEntry(getKeyUserItemCounter(userAddress, item), (getValueUserItemCounter(userAddress, item) + 1)), DataEntry(getKeyUserName(item), userName), DataEntry(getKeyUserCountry(item), userCountry), DataEntry(getKeyItemDiscountUser(item), userDiscount), DataEntry(getKeyItemUserOrderQty(item), orderQty), DataEntry("tokenPrice/Supplier, wvs", (nomPrice * wvs)), DataEntry("tokenPrice/User, wvs", currentTokenPrice), DataEntry("investedAmount/User, wvs", totalAmount), DataEntry("purchaseOrder/Status:", "¡Adquisición Confirmada!"), DataEntry(getKeyBalanceQtySupplier(item), ((preIcoQty - SecondFaseQty) - orderQty)), DataEntry(getKeySaldoTokenQtyStartEtapa(item), (preIcoQty - orderQty)), DataEntry(getKeyBalanceSupplier(supplier), (balanceSupplier + pmt.amount)), DataEntry("Dirección del Proyecto en Waves-BlockChain:", " 3N9DpWDvNPnq3wuuyh2cGk9hcKfoke9CCfL ")]), TransferSet([ScriptTransfer(addressFromStringValue(userAddress), orderQty, xBitCO2)]))
211+ else ScriptResult(WriteSet([DataEntry(getKeyProjectCategory(item), "Conservación Forestal Amazónica"), DataEntry(getKeyProjectName(item), "Reserva Amazónica Achuar-Kapawi"), DataEntry(getKeyProjectCountry(item), "Ecuador"), DataEntry(getKeyProjectCode(item), "01-EC_ACH-KAPAWI_01PREICO"), DataEntry(getKeyProjectPropietary(item), "Comunidad Achuar Kapawi"), DataEntry(getKeyProjectDev(supplier), "Fundación Alianza Ecológica 'NASE'"), DataEntry("Cantidad de Tokens Bit-CO2 a Emitir, I y II Fase Pre-ICO", startQty), DataEntry(getKeyFirstFaseQty(item), FirstFaseQty), DataEntry(getKeyNomTokenPrice(item), "10.00 Euros"), DataEntry(getKeyDescuento6TokPrice(item), currentTokenPrice), DataEntry(getKeyUserItemCounter(userAddress, item), (getValueUserItemCounter(userAddress, item) + 1)), DataEntry(getKeyUserDocument(item), userDocument), DataEntry(getKeyUserCountry(item), userCountry), DataEntry(getKeyDiscount6User(item), userDiscount), DataEntry(getKeyItemUserOrderQty(item), orderQty), DataEntry("purchaseOrder/Status:", "¡Adquisición Confirmada!"), DataEntry(getKeySaldoTokenQtyStartEtapa(item), ((getValueSaldoTokenQtyStartEtapa(item) + preIcoQty) - orderQty)), DataEntry(getKeyBalanceSupplier(supplier), (getValueBalanceSupplier(supplier) + pmt.amount)), DataEntry("Dirección del Proyecto en Waves-BlockChain:", "3N9DpWDvNPnq3wuuyh2cGk9hcKfoke9CCfL")]), TransferSet([ScriptTransfer(addressFromStringValue(userAddress), orderQty, xBitCO2)]))
245212 }
246- }
247-
248-
249-
250-@Callable(i)
251-func withdraw (item,amount) = {
252- let userAddress = toBase58String(i.caller.bytes)
253- let supplier = match getString(this, getKeyItemSupplier(item)) {
254- case a: String =>
255- a
256- case _ =>
257- NONE
258- }
259- let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) {
260- case a: Int =>
261- a
262- case _ =>
263- startQty
264- }
265- let newAmount = (preIcoQty - amount)
266- if ((0 > amount))
267- then throw("El balance de retiro no puede ser negativo!")
268- else if ((0 >= newAmount))
269- then throw("Ooppss.. Insuficiente balance!")
270- else ScriptResult(WriteSet([DataEntry(item, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, xBitCO2)]))
271213 }
272214
273215
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let xBitCO2 = base58'39yw38hm342hiK43SqELTaZRkTWJoBc22XpxmsSiBrsN'
55
66 let startQty = 305693
77
88 let FirstFaseQty = 31193
99
1010 let SecondFaseQty = 274500
1111
1212 let nomPrice = 1
1313
1414 let wvs = 100000000
1515
1616 let supplierDiscount = 12
1717
1818 let NONE = "none"
1919
2020 let OwnerPubKey = base58'A695BnQcmLqEPwcN5kdhv4bHipgdE4FnM5CBEMtA95Mo'
2121
2222 let issuer = Address(base58'3Mvn8oonnpiasA3bkq36N9qeqqXWfFW437o')
2323
2424 let eAdd = Address(base58'3MvrQGkHQtyLTC2QXgPnQ6oCEWhHyUJpU4q')
2525
2626 let pAdd = Address(base58'3N9DpWDvNPnq3wuuyh2cGk9hcKfoke9CCfL')
2727
2828 let igv = 18
2929
3030 let cPB = 88
3131
3232 let uIP = 5
3333
3434 let pIP = 10
3535
3636 let sIP = 1
3737
3838 let eIP = 1
3939
4040 func getNumberByKey (key) = {
4141 let num = match getInteger(this, key) {
4242 case a: Int =>
4343 a
4444 case _ =>
4545 0
4646 }
4747 num
4848 }
4949
5050
5151 func getStrByKey (key) = {
5252 let str = match getString(this, key) {
5353 case a: String =>
5454 a
5555 case _ =>
5656 NONE
5757 }
5858 str
5959 }
6060
6161
6262 func getKeyProjectCategory (item) = "Categoría:"
6363
6464
6565 func getValueProjectCategory (item) = getStrByKey(getKeyProjectCategory(item))
6666
6767
6868 func getKeyItemSupplier (supplier) = (supplier + "Comunidad Achuar Kapawi del Ecuador")
6969
7070
7171 func getKeyProjectName (item) = "Nombre del Proyecto:"
7272
7373
7474 func getValueProjectName (item) = getStrByKey(getKeyProjectName(item))
7575
7676
7777 func getKeyProjectCountry (item) = "País | Ubicación:"
7878
7979
8080 func getValueProjectCountry (item) = getStrByKey(getKeyProjectCountry(item))
8181
8282
8383 func getKeyProjectCode (item) = "Código:"
8484
8585
8686 func getValueProjectCode (item) = getStrByKey(getKeyProjectCode(item))
8787
8888
8989 func getKeyProjectPropietary (item) = "Propietario | Beneficiario del Proyecto:"
9090
9191
9292 func getValueProjectPropietary (item) = getStrByKey(getKeyProjectPropietary(item))
9393
9494
9595 func getKeyProjectDev (supplier) = "Desarrollador | Responsable Legal:"
9696
9797
9898 func getValueProjectDev (supplier) = getStrByKey(getKeyProjectDev(supplier))
9999
100100
101-func getKeyProjectEtapa (projectAddress) = "AchuarKapawi, I Etapa: PreICO"
102-
103-
104-func getValueProjectEtapa (projectAddress) = getStrByKey(getKeyProjectEtapa(projectAddress))
105-
106-
107-func getKeyFirstFaseQty (item) = "Total tokens emitidos en I Fase Pre-ICO"
101+func getKeyFirstFaseQty (item) = "Tokens ofertados al 6% en la I Fase Pre-ICO:"
108102
109103
110104 func getValueFirstFaseQty (item) = getStrByKey(getKeyFirstFaseQty(item))
111105
112106
113-func getKeyNomTokenPrice (item) = "10.00 Euros"
107+func getKeyNomTokenPrice (item) = "Precio Nominal, 1 token Bit-CO2:"
114108
115109
116-func getKeyItemPriceSupplier (item) = "_waves"
110+func getKeyDescuento6TokPrice (item) = "Precio de 1 token Bit-CO2 con el 6% de descuento"
117111
118112
119-func getValueItemPriceSupplier (item) = getNumberByKey(getKeyItemPriceSupplier(item))
113+func getValueDescuento6TokPrice (item) = getNumberByKey(getKeyDescuento6TokPrice(item))
120114
121115
122-func getKeyMaxDescuento (item) = "Máximo Descuento Ofrecido en I Etapa, %:"
116+func getKeySaldoTokenQtyStartEtapa (item) = "Saldo de tokens al 6% en oferta, actual:"
123117
124118
125-func getValueMaxDescuento (item) = getNumberByKey(getKeyMaxDescuento(item))
126-
127-
128-func getKeyMinTokenPrice (item) = "8.80 Euros por 1 token Bit-CO2"
119+func getValueSaldoTokenQtyStartEtapa (item) = getNumberByKey(getKeySaldoTokenQtyStartEtapa(item))
129120
130121
131122 func getKeyUserItemCounter (user,item) = "Order_№:"
132123
133124
134125 func getValueUserItemCounter (user,item) = getNumberByKey(getKeyUserItemCounter(user, item))
135126
136127
137-func getKeyUserName (item) = "Nombre del Usuario:"
138-
139-
140-func getValueUserName (item) = getStrByKey(getKeyUserName(item))
141-
142-
143128 func getKeyUserDocument (item) = "№ de Documento Nacional de Identidad / DNI del Usuario:"
144129
145130
146131 func getValueUserDocument (item) = getStrByKey(getKeyUserDocument(item))
147132
148133
149-func getKeyUserCountry (item) = "País del Usuario:"
134+func getKeyUserCountry (item) = "País de Residencia del Usuario:"
150135
151136
152137 func getValueUserCountry (item) = getStrByKey(getKeyUserCountry(item))
153138
154139
155-func getKeyItemDiscountUser (item) = "Descuento elejido por el Usuario, %:"
140+func getKeyDiscount6User (item) = "Descuento para el Usuario, 6%:"
156141
157142
158-func getValueItemDiscountUser (item) = getNumberByKey(getKeyItemDiscountUser(item))
159-
160-
161-func getKeyItemDiscountSupplier (item) = "SupplierDiscount, max_%:"
162-
163-
164-func getValueItemDiscountSupplier (item) = getNumberByKey(getKeyItemDiscountSupplier(item))
143+func getValueDiscount6User (item) = getNumberByKey(getKeyDiscount6User(item))
165144
166145
167146 func getKeyItemUserOrderQty (item) = "Orden de Compra, cantidad solicitada:"
168147
169148
170149 func getValueItemUserOrderQty (item) = getNumberByKey(getKeyItemUserOrderQty(item))
171-
172-
173-func getKeySaldoTokenQtyStartEtapa (item) = "Tokens Ofertados en la presente etapa / Saldo:"
174-
175-
176-func getValueSaldoTokenQtyStartEtapa (item) = getNumberByKey(getKeySaldoTokenQtyStartEtapa(item))
177-
178-
179-func getKeyBalanceQtySupplier (item) = "Balance/Saldo, tokens:"
180-
181-
182-func getValueBalanceQtySupplier (item) = getNumberByKey(getKeyBalanceQtySupplier(item))
183150
184151
185152 func getKeyBalanceSupplier (supplier) = "Ingresos por Venta Directa / BlockChain:"
186153
187154
188155 func getValueBalanceSupplier (supplier) = getNumberByKey(getKeyBalanceSupplier(supplier))
189156
190157
191158 @Callable(i)
192159 func deposit (title,supplierData) = {
193160 let pmt = extract(i.payment)
194161 if ((pmt.assetId != xBitCO2))
195162 then throw("deposito permitido solo en xBitCO2 tokens")
196163 else {
197164 let supplier = toBase58String(i.caller.bytes)
198165 let currentAmount = match getInteger(this, supplier) {
199166 case a: Int =>
200167 a
201168 case _ =>
202169 startQty
203170 }
204171 let newAmount = (currentAmount + pmt.amount)
205172 if ((0 >= newAmount))
206173 then throw("No hay xBitCO2 en su balance")
207174 else WriteSet([DataEntry(supplier, newAmount)])
208175 }
209176 }
210177
211178
212179
213180 @Callable(i)
214-func purchase (item,userName,userCountry,userDiscount,orderQty) = {
181+func purchase (item,userDocument,userCountry,userDiscount,orderQty) = {
215182 let pmt = extract(i.payment)
216183 if (isDefined(pmt.assetId))
217184 then throw("En la presente Plastaforma Ud. puede adquirir sus tokens xBitCO2 usando WavesKeeper y su token de pago Waves.")
218185 else {
219186 let supplier = match getString(this, getKeyItemSupplier(item)) {
220187 case a: String =>
221188 a
222189 case _ =>
223190 NONE
224191 }
225- let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) {
192+ let preIcoQty = match getInteger(this, getKeySaldoTokenQtyStartEtapa(item)) {
226193 case a: Int =>
227194 a
228195 case _ =>
229196 startQty
230197 }
231198 let balanceSupplier = match getInteger(this, getKeyBalanceSupplier(supplier)) {
232199 case a: Int =>
233200 a
234201 case _ =>
235202 0
236203 }
237204 let userAddress = toBase58String(i.caller.bytes)
238205 let currentTokenPrice = ((((100 - userDiscount) * nomPrice) * wvs) / 100)
239206 let totalAmount = (orderQty * currentTokenPrice)
240207 if ((totalAmount > pmt.amount))
241208 then throw("Payment Amount can't be less than item Purchase Order")
242209 else if ((pmt.amount > totalAmount))
243210 then throw("Payment Amount can't be higher than item Purchase Order")
244- else ScriptResult(WriteSet([DataEntry(getKeyProjectCategory(item), "Conservación Forestal Amazónica"), DataEntry(getKeyProjectName(item), "Reserva Amazónica Achuar-Kapawi"), DataEntry(getKeyProjectCountry(item), "Ecuador"), DataEntry(getKeyProjectCode(item), "01-EC_ACH-KAPAWI_01PREICO"), DataEntry(getKeyProjectPropietary(item), "Comunidad Achuar Kapawi"), DataEntry(getKeyProjectDev(supplier), "Fundación Alianza Ecológica 'NASE'"), DataEntry("Fases del Proyecto, Pre-ICO:", " I y II Fase"), DataEntry(getKeyFirstFaseQty(item), FirstFaseQty), DataEntry("Cantidad Total de Tokens Bit-CO2 a Emitir en I y II Fase Pre-ICO:", startQty), DataEntry("Precio Nominal, 1 token Bit-CO2:", " 10.00 Euros"), DataEntry(getKeyMaxDescuento(item), "6%"), DataEntry(getKeyUserItemCounter(userAddress, item), (getValueUserItemCounter(userAddress, item) + 1)), DataEntry(getKeyUserName(item), userName), DataEntry(getKeyUserCountry(item), userCountry), DataEntry(getKeyItemDiscountUser(item), userDiscount), DataEntry(getKeyItemUserOrderQty(item), orderQty), DataEntry("tokenPrice/Supplier, wvs", (nomPrice * wvs)), DataEntry("tokenPrice/User, wvs", currentTokenPrice), DataEntry("investedAmount/User, wvs", totalAmount), DataEntry("purchaseOrder/Status:", "¡Adquisición Confirmada!"), DataEntry(getKeyBalanceQtySupplier(item), ((preIcoQty - SecondFaseQty) - orderQty)), DataEntry(getKeySaldoTokenQtyStartEtapa(item), (preIcoQty - orderQty)), DataEntry(getKeyBalanceSupplier(supplier), (balanceSupplier + pmt.amount)), DataEntry("Dirección del Proyecto en Waves-BlockChain:", " 3N9DpWDvNPnq3wuuyh2cGk9hcKfoke9CCfL ")]), TransferSet([ScriptTransfer(addressFromStringValue(userAddress), orderQty, xBitCO2)]))
211+ else ScriptResult(WriteSet([DataEntry(getKeyProjectCategory(item), "Conservación Forestal Amazónica"), DataEntry(getKeyProjectName(item), "Reserva Amazónica Achuar-Kapawi"), DataEntry(getKeyProjectCountry(item), "Ecuador"), DataEntry(getKeyProjectCode(item), "01-EC_ACH-KAPAWI_01PREICO"), DataEntry(getKeyProjectPropietary(item), "Comunidad Achuar Kapawi"), DataEntry(getKeyProjectDev(supplier), "Fundación Alianza Ecológica 'NASE'"), DataEntry("Cantidad de Tokens Bit-CO2 a Emitir, I y II Fase Pre-ICO", startQty), DataEntry(getKeyFirstFaseQty(item), FirstFaseQty), DataEntry(getKeyNomTokenPrice(item), "10.00 Euros"), DataEntry(getKeyDescuento6TokPrice(item), currentTokenPrice), DataEntry(getKeyUserItemCounter(userAddress, item), (getValueUserItemCounter(userAddress, item) + 1)), DataEntry(getKeyUserDocument(item), userDocument), DataEntry(getKeyUserCountry(item), userCountry), DataEntry(getKeyDiscount6User(item), userDiscount), DataEntry(getKeyItemUserOrderQty(item), orderQty), DataEntry("purchaseOrder/Status:", "¡Adquisición Confirmada!"), DataEntry(getKeySaldoTokenQtyStartEtapa(item), ((getValueSaldoTokenQtyStartEtapa(item) + preIcoQty) - orderQty)), DataEntry(getKeyBalanceSupplier(supplier), (getValueBalanceSupplier(supplier) + pmt.amount)), DataEntry("Dirección del Proyecto en Waves-BlockChain:", "3N9DpWDvNPnq3wuuyh2cGk9hcKfoke9CCfL")]), TransferSet([ScriptTransfer(addressFromStringValue(userAddress), orderQty, xBitCO2)]))
245212 }
246- }
247-
248-
249-
250-@Callable(i)
251-func withdraw (item,amount) = {
252- let userAddress = toBase58String(i.caller.bytes)
253- let supplier = match getString(this, getKeyItemSupplier(item)) {
254- case a: String =>
255- a
256- case _ =>
257- NONE
258- }
259- let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) {
260- case a: Int =>
261- a
262- case _ =>
263- startQty
264- }
265- let newAmount = (preIcoQty - amount)
266- if ((0 > amount))
267- then throw("El balance de retiro no puede ser negativo!")
268- else if ((0 >= newAmount))
269- then throw("Ooppss.. Insuficiente balance!")
270- else ScriptResult(WriteSet([DataEntry(item, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, xBitCO2)]))
271213 }
272214
273215
274216 @Verifier(tx)
275217 func verify () = match tx {
276218 case t: SetScriptTransaction =>
277219 sigVerify(tx.bodyBytes, tx.proofs[0], OwnerPubKey)
278220 case d: ReissueTransaction|DataTransaction =>
279221 true
280222 case tx: TransferTransaction =>
281223 true
282224 case tx: ExchangeTransaction =>
283225 let withWaves = if (!(isDefined(tx.sellOrder.assetPair.priceAsset)))
284226 then true
285227 else !(isDefined(tx.sellOrder.assetPair.amountAsset))
286228 withWaves
287229 case _ =>
288230 false
289231 }
290232

github/deemru/w8io/169f3d6 
67.39 ms