tx · 2iz2AjKJXv8Vdy1kE7Q7JVqjQZXSkvwijgxVUMiNAtne

3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8:  -0.01000000 Waves

2021.10.21 10:52 [1755780] smart account 3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8 > SELF 0.00000000 Waves

{ "type": 13, "id": "2iz2AjKJXv8Vdy1kE7Q7JVqjQZXSkvwijgxVUMiNAtne", "fee": 1000000, "feeAssetId": null, "timestamp": 1634802811330, "version": 2, "chainId": 84, "sender": "3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8", "senderPublicKey": "8xCH82jKi2DM7HXXD45fmftPUDjr3TJpjanUATKMK37U", "proofs": [ "3U9uQ9sH5XQdsPwgXoqdWDxx57NLY4aUQ2L2yuECf6GdvTa6cyU1GWDEapuPrhNxKCiP5SLjfdRwXcAsqrpuCFX" ], "script": "base64:AAIDAAAAAAAAABcIARIECgIICBIHCgUICAgIARIECgIIAQAAAEQAAAAAB3lCaXRDTzIBAAAAIGmM1P/bTQF96Mt4t9+zj8FcPDlb6Qx5aA0hjmfpm0utAAAAAAhzdGFydFF0eQAAAAAAAASqHQAAAAAMRmlyc3RGYXNlUXR5AAAAAAAAAHnZAAAAAA1TZWNvbmRGYXNlUXR5AAAAAAAABDBEAAAAABBUb2tUb1ZlbmRlZG9yUXR5AAAAAAAAACcQAAAAAAN3dnMAAAAAAAX14QAAAAAABE5PTkUCAAAABG5vbmUAAAAAC093bmVyUHViS2V5AQAAACB2JYFH9ti5N+7uGrdzKwlrXhDeZ+vMkHOKuVJteEgPDwAAAAAEdEFkZAkBAAAAB0FkZHJlc3MAAAABAQAAABoBVLK1ppj4mummw+7gTK3Ad3Ub4h3efkn0JwAAAAAEYUFkZAkBAAAAB0FkZHJlc3MAAAABAQAAABoBVLGfyy1r0onBhV5KbTmujr+1cm+CidoWkwAAAAAEZUFkZAkBAAAAB0FkZHJlc3MAAAABAQAAABoBVJl9LDPuC4uFUEENum3we4/11P1VuB5sVwA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NldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAABGl0ZW0FAAAACW5ld0Ftb3VudAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGYW1vdW50BQAAAAd5Qml0Q08yBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAXQFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAtPd25lclB1YktleQMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAElJlaXNzdWVUcmFuc2FjdGlvbgYJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAGB1k3dCA=", "height": 1755780, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4dckzJLj5qpJgeXFeqteLtCHVVZ51bkjjpZecH7xx2Z8 Next: ENjAymBm3mUjMw8Fku2tdksMLXAGdRQvEJK4yTzqVrND Diff:
OldNewDifferences
276276 then throw("Payment Amount can't be less than item Purchase Order")
277277 else if ((pmt.amount > totalAmount))
278278 then throw("Payment Amount can't be higher than item Purchase Order")
279- else ScriptResult(WriteSet([DataEntry(getKeyUserItemGtsCounter(userAddress, item), (getValueUserItemGtsCounter(userAddress, item) + 1)), DataEntry(getKeyItemSupplier(supplier), supplier), DataEntry(getKeyItem(supplier, item), item), DataEntry(getKeyItemName(item), itemName), DataEntry(getKeyUserName(item), userName), DataEntry(getKeyUserDocument(item), userDocument), DataEntry("Asociado Bit", asociado), DataEntry("usdn", usdnw), DataEntry("eurou", eurou), DataEntry("Apoyo Ecológico, wvls", totalAmount), DataEntry(getKeyPI(item), pIw), DataEntry(getKeyNIw(item), eIw), DataEntry("1 Bit-CO2 Precio Nominal, euros x10e-4", bco2e), DataEntry("1 Bit-CO2 Precio con Descto, usd x10e-4", bco2menosdcto), DataEntry("Total bit-co2 a distribuir, x10e-4", subTotalb), DataEntry(getKeyUI(item), uIb), DataEntry(getKeySI(item), sIb), DataEntry(getKeyNIb(item), eIb), DataEntry(("Order_Status:_" + userAddress), "Transacción Confirmada!"), DataEntry(getKeyBalanceProyecto(proyecto), (getValueBalanceProyecto(proyecto) + pIw)), DataEntry(getKeyBalanceProyecto(proyecto), saldoProj), DataEntry(getKeyBalanceProyecto(proyecto), pIw), DataEntry(getKeyBalanceTokensTienda(tienda), amountBCO2), DataEntry(getKeyBalanceTokensTienda(tienda), (saldoTienda - subTotalb))]), TransferSet([ScriptTransfer(pAdd, pIw, unit), ScriptTransfer(i.caller, uIb, yBitCO2), ScriptTransfer(aAdd, sIb, yBitCO2), ScriptTransfer(eAdd, eIw, unit), ScriptTransfer(eAdd, eIb, yBitCO2)]))
279+ else ScriptResult(WriteSet([DataEntry(getKeyUserItemGtsCounter(userAddress, item), (getValueUserItemGtsCounter(userAddress, item) + 1)), DataEntry(getKeyItemSupplier(supplier), supplier), DataEntry(getKeyItem(supplier, item), item), DataEntry(getKeyItemName(item), itemName), DataEntry(getKeyUserName(item), userName), DataEntry(getKeyUserDocument(item), userDocument), DataEntry("Asociado Bit", asociado), DataEntry("usdn", usdnw), DataEntry("eurou", eurou), DataEntry("Apoyo Ecológico, wvls", totalAmount), DataEntry(getKeyPI(item), pIw), DataEntry(getKeyNIw(item), eIw), DataEntry("1 Bit-CO2 Precio Nominal, euros x10e-4", bco2e), DataEntry("1 Bit-CO2 Precio con Descto, usd x10e-4", bco2menosdcto), DataEntry("Total bit-co2 a distribuir, x10e-4", subTotalb), DataEntry(getKeyUI(item), uIb), DataEntry(getKeySI(item), sIb), DataEntry(getKeyNIb(item), eIb), DataEntry(("Order_Status:_" + userAddress), "Transacción Confirmada!"), DataEntry(getKeyBalanceProyecto(proyecto), (getValueBalanceProyecto(proyecto) + pIw)), DataEntry(getKeyBalanceProyecto(proyecto), saldoProj), DataEntry(getKeyBalanceProyecto(proyecto), pIw), DataEntry(getKeyBalanceTokensTienda(tienda), amountBCO2), DataEntry(getKeyBalanceTokensTienda(tienda), (amountBCO2 - subTotalb)), DataEntry(getKeyBalanceTokensTienda(tienda), ((amountBCO2 * 10000) - subTotalb))]), TransferSet([ScriptTransfer(pAdd, pIw, unit), ScriptTransfer(i.caller, uIb, yBitCO2), ScriptTransfer(aAdd, sIb, yBitCO2), ScriptTransfer(eAdd, eIw, unit), ScriptTransfer(eAdd, eIb, yBitCO2)]))
280280 }
281281 }
282282
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let yBitCO2 = base58'872MvpMoQx7SnV58HMcR9hd6vBWDtQvqmt5javCmYwpx'
55
66 let startQty = 305693
77
88 let FirstFaseQty = 31193
99
1010 let SecondFaseQty = 274500
1111
1212 let TokToVendedorQty = 10000
1313
1414 let wvs = 100000000
1515
1616 let NONE = "none"
1717
1818 let OwnerPubKey = base58'8xCH82jKi2DM7HXXD45fmftPUDjr3TJpjanUATKMK37U'
1919
2020 let tAdd = Address(base58'3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8')
2121
2222 let aAdd = Address(base58'3N67GoXrZo4iwmEjLhS9iNUCbzpPEjoYgNW')
2323
2424 let eAdd = Address(base58'3N3uf7RK8Aed4v5ufGB8xV2Wsz4WNoHj21c')
2525
2626 let pAdd = Address(base58'3Mv5mXTRhpWZxZxstmnsBhckWNgErMTFEaD')
2727
2828 let eurou = 116
2929
3030 let usdnw = 2539
3131
3232 let bco2e = 100000
3333
3434 let bitdscto = 3
3535
3636 let pIP = 10
3737
3838 let uBP = 7
3939
4040 let sBP = 2
4141
4242 let eIP = 1
4343
4444 let eBP = 2
4545
4646 let relacdcto = 11
4747
4848 func getNumberByKey (key) = {
4949 let num = match getInteger(this, key) {
5050 case a: Int =>
5151 a
5252 case _ =>
5353 0
5454 }
5555 num
5656 }
5757
5858
5959 func getStrByKey (key) = {
6060 let str = match getString(this, key) {
6161 case a: String =>
6262 a
6363 case _ =>
6464 NONE
6565 }
6666 str
6767 }
6868
6969
7070 func getKeyToken (token) = "Token"
7171
7272
7373 func getValueToken (token) = getStrByKey(getKeyToken(token))
7474
7575
7676 func getKeyTienda (tienda) = "Tienda / Shop-GTS"
7777
7878
7979 func getValueTienda (tienda) = getStrByKey(getKeyTienda(tienda))
8080
8181
8282 func getKeyTokensTienda (tienda,token) = (("Tokens BCO2: " + " ") + toBase58String(sha256(toBytes((tienda + token)))))
8383
8484
8585 func getValueTokensTienda (tienda,token) = getNumberByKey(getKeyTokensTienda(tienda, token))
8686
8787
8888 func getKeyItemSupplier (supplier) = (supplier + "Vendedor, Lima-Perú")
8989
9090
9191 func getKeyItem (supplier,item) = (("Producto-GTS: " + " ") + toBase58String(sha256(toBytes((supplier + item)))))
9292
9393
9494 func getKeyAsociado (asociado) = "Asociado Bit-CO2"
9595
9696
9797 func getValueAsociado (asociado) = getStrByKey(getKeyAsociado(asociado))
9898
9999
100100 func getKeyProject (project) = "Project"
101101
102102
103103 func getValueProject (project) = getStrByKey(getKeyProject(project))
104104
105105
106106 func getKeyNodo (nodo) = "Nodo-Activo"
107107
108108
109109 func getValueNodo (nodo) = getStrByKey(getKeyNodo(nodo))
110110
111111
112112 func getKeyUserItemGtsCounter (user,item) = "Order_№:"
113113
114114
115115 func getValueUserItemGtsCounter (user,item) = getNumberByKey(getKeyUserItemGtsCounter(user, item))
116116
117117
118118 func getKeyItemName (item) = "Categoría del Producto:"
119119
120120
121121 func getValueItemName (item) = getStrByKey(getKeyItemName(item))
122122
123123
124124 func getKeyUserName (item) = "Nombre del Usuario:"
125125
126126
127127 func getValueUserName (item) = getStrByKey(getKeyUserName(item))
128128
129129
130130 func getKeyUserDocument (item) = "№ de Documento / DNI del Usuario:"
131131
132132
133133 func getValueUserDocument (item) = getStrByKey(getKeyUserDocument(item))
134134
135135
136136 func getKeyUI (item) = "UI, x10e-04 bit:"
137137
138138
139139 func getValueUI (item) = getNumberByKey(getKeyUI(item))
140140
141141
142142 func getKeyPI (item) = "PI, wvls:"
143143
144144
145145 func getValuePI (item) = getNumberByKey(getKeyPI(item))
146146
147147
148148 func getKeySI (item) = "SI, x10e-04 bit:"
149149
150150
151151 func getValueSI (item) = getNumberByKey(getKeySI(item))
152152
153153
154154 func getKeyNIb (item) = "NIb, x10e-04 bit:"
155155
156156
157157 func getValueNIb (item) = getNumberByKey(getKeyNIb(item))
158158
159159
160160 func getKeyNIw (item) = "NIw, wvls:"
161161
162162
163163 func getValueNIw (item) = getNumberByKey(getKeyNIw(item))
164164
165165
166166 func getKeyBalanceTokens (token) = "Tokens Ofertados / Balance, ytok:"
167167
168168
169169 func getValueBalanceTokens (token) = getNumberByKey(getKeyBalanceTokens(token))
170170
171171
172172 func getKeyBalanceTokensTienda (tienda) = "Saldo del Vendedor, wvls:"
173173
174174
175175 func getValueBalanceTokensTienda (tienda) = getNumberByKey(getKeyBalanceTokensTienda(tienda))
176176
177177
178178 func getKeyBalanceProyecto (proyecto) = "Balance del Proyecto, wvs:"
179179
180180
181181 func getValueBalanceProyecto (proyecto) = getNumberByKey(getKeyBalanceProyecto(proyecto))
182182
183183
184184 func getKeyBalanceAsociado (asociado) = "Balance del Asociado:"
185185
186186
187187 func getValueBalanceAsociado (asociado) = getNumberByKey(getKeyBalanceAsociado(asociado))
188188
189189
190190 func getKeyBalanceNodo (nodo) = "Balance del Nodo:"
191191
192192
193193 func getValueBalanceNodo (nodo) = getNumberByKey(getKeyBalanceNodo(nodo))
194194
195195
196196 func getKeyBalanceQtySupplier (item) = "Saldo ytokens Supplier:"
197197
198198
199199 func getValueBalanceQtySupplier (item) = getNumberByKey(getKeyBalanceQtySupplier(item))
200200
201201
202202 @Callable(i)
203203 func deposit (title,supplierData) = {
204204 let token = extract(i.payment)
205205 if ((token.assetId != yBitCO2))
206206 then throw("deposito permitido solo en yBitCO2 tokens")
207207 else {
208208 let tienda = toBase58String(tAdd.bytes)
209209 let currentAmount = match getInteger(this, tienda) {
210210 case a: Int =>
211211 a
212212 case _ =>
213213 startQty
214214 }
215215 let newAmount = (currentAmount + token.amount)
216216 if ((0 >= newAmount))
217217 then throw("No hay yBitCO2 en su balance")
218218 else WriteSet([DataEntry(getKeyBalanceTokensTienda(tienda), newAmount)])
219219 }
220220 }
221221
222222
223223
224224 @Callable(i)
225225 func purchaseGTS (item,itemName,userName,userDocument,totalAmount) = {
226226 let pmt = extract(i.payment)
227227 if (isDefined(pmt.assetId))
228228 then throw("El Precio en waves.")
229229 else {
230230 let supplier = match getString(this, getKeyItemSupplier(item)) {
231231 case a: String =>
232232 a
233233 case _ =>
234234 NONE
235235 }
236236 let tienda = toBase58String(tAdd.bytes)
237237 let saldoTienda = match getInteger(this, getKeyBalanceTokens(tienda)) {
238238 case a: Int =>
239239 a
240240 case _ =>
241241 0
242242 }
243243 let amountBCO2 = (TokToVendedorQty - saldoTienda)
244244 let proyecto = toBase58String(pAdd.bytes)
245245 let saldoProj = match getInteger(this, getKeyBalanceProyecto(proyecto)) {
246246 case a: Int =>
247247 a
248248 case _ =>
249249 0
250250 }
251251 let asociado = toBase58String(aAdd.bytes)
252252 let saldoAsociado = match getInteger(this, getKeyBalanceAsociado(asociado)) {
253253 case a: Int =>
254254 a
255255 case _ =>
256256 FirstFaseQty
257257 }
258258 let nodo = toBase58String(eAdd.bytes)
259259 let saldoNodo = match getInteger(this, getKeyBalanceNodo(nodo)) {
260260 case a: Int =>
261261 a
262262 case _ =>
263263 0
264264 }
265265 let userAddress = toBase58String(i.caller.bytes)
266266 let subTotal = totalAmount
267267 let pIw = ((pIP * subTotal) / relacdcto)
268268 let eIw = ((eIP * subTotal) / relacdcto)
269269 let bco2menosdcto = (((100 - bitdscto) * (eurou * bco2e)) / 10000)
270270 let subTotalb = (((totalAmount * usdnw) / 100) / bco2menosdcto)
271271 let totalb = (subTotalb * 10000)
272272 let uIb = ((uBP * subTotalb) / relacdcto)
273273 let sIb = ((sBP * subTotalb) / relacdcto)
274274 let eIb = ((eBP * subTotalb) / relacdcto)
275275 if ((totalAmount > pmt.amount))
276276 then throw("Payment Amount can't be less than item Purchase Order")
277277 else if ((pmt.amount > totalAmount))
278278 then throw("Payment Amount can't be higher than item Purchase Order")
279- else ScriptResult(WriteSet([DataEntry(getKeyUserItemGtsCounter(userAddress, item), (getValueUserItemGtsCounter(userAddress, item) + 1)), DataEntry(getKeyItemSupplier(supplier), supplier), DataEntry(getKeyItem(supplier, item), item), DataEntry(getKeyItemName(item), itemName), DataEntry(getKeyUserName(item), userName), DataEntry(getKeyUserDocument(item), userDocument), DataEntry("Asociado Bit", asociado), DataEntry("usdn", usdnw), DataEntry("eurou", eurou), DataEntry("Apoyo Ecológico, wvls", totalAmount), DataEntry(getKeyPI(item), pIw), DataEntry(getKeyNIw(item), eIw), DataEntry("1 Bit-CO2 Precio Nominal, euros x10e-4", bco2e), DataEntry("1 Bit-CO2 Precio con Descto, usd x10e-4", bco2menosdcto), DataEntry("Total bit-co2 a distribuir, x10e-4", subTotalb), DataEntry(getKeyUI(item), uIb), DataEntry(getKeySI(item), sIb), DataEntry(getKeyNIb(item), eIb), DataEntry(("Order_Status:_" + userAddress), "Transacción Confirmada!"), DataEntry(getKeyBalanceProyecto(proyecto), (getValueBalanceProyecto(proyecto) + pIw)), DataEntry(getKeyBalanceProyecto(proyecto), saldoProj), DataEntry(getKeyBalanceProyecto(proyecto), pIw), DataEntry(getKeyBalanceTokensTienda(tienda), amountBCO2), DataEntry(getKeyBalanceTokensTienda(tienda), (saldoTienda - subTotalb))]), TransferSet([ScriptTransfer(pAdd, pIw, unit), ScriptTransfer(i.caller, uIb, yBitCO2), ScriptTransfer(aAdd, sIb, yBitCO2), ScriptTransfer(eAdd, eIw, unit), ScriptTransfer(eAdd, eIb, yBitCO2)]))
279+ else ScriptResult(WriteSet([DataEntry(getKeyUserItemGtsCounter(userAddress, item), (getValueUserItemGtsCounter(userAddress, item) + 1)), DataEntry(getKeyItemSupplier(supplier), supplier), DataEntry(getKeyItem(supplier, item), item), DataEntry(getKeyItemName(item), itemName), DataEntry(getKeyUserName(item), userName), DataEntry(getKeyUserDocument(item), userDocument), DataEntry("Asociado Bit", asociado), DataEntry("usdn", usdnw), DataEntry("eurou", eurou), DataEntry("Apoyo Ecológico, wvls", totalAmount), DataEntry(getKeyPI(item), pIw), DataEntry(getKeyNIw(item), eIw), DataEntry("1 Bit-CO2 Precio Nominal, euros x10e-4", bco2e), DataEntry("1 Bit-CO2 Precio con Descto, usd x10e-4", bco2menosdcto), DataEntry("Total bit-co2 a distribuir, x10e-4", subTotalb), DataEntry(getKeyUI(item), uIb), DataEntry(getKeySI(item), sIb), DataEntry(getKeyNIb(item), eIb), DataEntry(("Order_Status:_" + userAddress), "Transacción Confirmada!"), DataEntry(getKeyBalanceProyecto(proyecto), (getValueBalanceProyecto(proyecto) + pIw)), DataEntry(getKeyBalanceProyecto(proyecto), saldoProj), DataEntry(getKeyBalanceProyecto(proyecto), pIw), DataEntry(getKeyBalanceTokensTienda(tienda), amountBCO2), DataEntry(getKeyBalanceTokensTienda(tienda), (amountBCO2 - subTotalb)), DataEntry(getKeyBalanceTokensTienda(tienda), ((amountBCO2 * 10000) - subTotalb))]), TransferSet([ScriptTransfer(pAdd, pIw, unit), ScriptTransfer(i.caller, uIb, yBitCO2), ScriptTransfer(aAdd, sIb, yBitCO2), ScriptTransfer(eAdd, eIw, unit), ScriptTransfer(eAdd, eIb, yBitCO2)]))
280280 }
281281 }
282282
283283
284284
285285 @Callable(i)
286286 func withdraw (item,amount) = {
287287 let userAddress = toBase58String(i.caller.bytes)
288288 let supplier = match getString(this, getKeyItemSupplier(item)) {
289289 case a: String =>
290290 a
291291 case _ =>
292292 NONE
293293 }
294294 let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) {
295295 case a: Int =>
296296 a
297297 case _ =>
298298 startQty
299299 }
300300 let newAmount = (preIcoQty - amount)
301301 if ((0 > amount))
302302 then throw("El balance de retiro no puede ser negativo!")
303303 else if ((0 >= newAmount))
304304 then throw("Ooppss.. Insuficiente balance!")
305305 else ScriptResult(WriteSet([DataEntry(item, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, yBitCO2)]))
306306 }
307307
308308
309309 @Verifier(tx)
310310 func verify () = match tx {
311311 case t: SetScriptTransaction =>
312312 sigVerify(tx.bodyBytes, tx.proofs[0], OwnerPubKey)
313313 case d: ReissueTransaction|DataTransaction =>
314314 true
315315 case tx: TransferTransaction =>
316316 true
317317 case _ =>
318318 false
319319 }
320320

github/deemru/w8io/026f985 
60.46 ms