tx · 8iLpZYaGtn5A77QSpZCX1UMJxWSYGUV2XBo8qiUsTB91

3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8:  -0.01000000 Waves

2021.10.20 12:39 [1754433] smart account 3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8 > SELF 0.00000000 Waves

{ "type": 13, "id": "8iLpZYaGtn5A77QSpZCX1UMJxWSYGUV2XBo8qiUsTB91", "fee": 1000000, "feeAssetId": null, "timestamp": 1634722774127, "version": 2, "chainId": 84, "sender": "3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8", "senderPublicKey": "8xCH82jKi2DM7HXXD45fmftPUDjr3TJpjanUATKMK37U", "proofs": [ "5k5cdbQyKeBsM2bYzefRiKN4gUK7wScLJKonehnWa1gKDyeGBhq5NGD5Xw64qLAmt8SPRn8RWE3TGM9woFAuTEFJ" ], "script": "base64:AAIDAAAAAAAAABcIARIECgIICBIHCgUICAgIARIECgIIAQAAAD0AAAAAB3lCaXRDTzIBAAAAIGmM1P/bTQF96Mt4t9+zj8FcPDlb6Qx5aA0hjmfpm0utAAAAAAhzdGFydFF0eQAAAAAAAASqHQAAAAAMRmlyc3RGYXNlUXR5AAAAAAAAAHnZAAAAAA1TZWNvbmRGYXNlUXR5AAAAAAAABDBEAAAAAAN3dnMAAAAAAAX14QAAAAAABE5PTkUCAAAABG5vbmUAAAAABEJDTzIJAQAAAAdBZGRyZXNzAAAAAQEAAAAgaYzU/9tNAX3oy3i337OPwVw8OVvpDHloDSGOZ+mbS60AAAAAC093bmVyUHViS2V5AQAAACB2JYFH9ti5N+7uGrdzKwlrXhDeZ+vMkHOKuVJteEgPDwAAAAAGaXNzdWVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUsZ/LLWvSicGFXkptOa6Ov7Vyb4KJ2haTAAAAAARlQWRkCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUmX0sM+4Li4VQQQ26bfB7j/XU/VW4HmxXAAAAAARwQWRkCQEAAAAHQWRkcmV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ACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDAGAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAJ0eAUAAAAHJG1hdGNoMAYHxLBLIg==", "height": 1754433, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DbSemnAbCBesXZ2B1xvp1KAERDuJVUDoDqUHeEAA8WNx Next: 2TEGQk9ww5JK8DPiT5R4fUUEFNfu1NxfjhzWQsHW5HZ5 Diff:
OldNewDifferences
149149 func getValueSaldoTokenQtyStartEtapa (item) = getNumberByKey(getKeySaldoTokenQtyStartEtapa(item))
150150
151151
152-func getKeyBalanceQtyToken (token) = "Saldo ytokens pretokens:"
152+func getKeyBalanceQtyToken (token) = "Saldo ytokens pretokens, x10e-04:"
153153
154154
155155 func getValueBalanceQtyToken (token) = getNumberByKey(getKeyBalanceQtyToken(token))
264264 then throw("Payment Amount can't be less than item Purchase Order")
265265 else if ((pmt.amount > totalAmount))
266266 then throw("Payment Amount can't be higher than item Purchase Order")
267- 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(getKeyIssuer(item), getStrByKey(getKeyIssuer(item))), DataEntry(getKeyProject(item), getStrByKey(getKeyProject(item))), DataEntry(getKeyNodo(item), getStrByKey(getKeyNodo(item))), DataEntry("Tienda", supplier), 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("PreTokenQty", preTokenQty), DataEntry(getKeyBalanceQtyToken(token), (10000 * preTokenQty)), DataEntry(getKeyBalanceQtyToken(token), SpreTokenQty), DataEntry(getKeyBalanceQtyToken(token), (SpreTokenQty - subTotalb)), DataEntry("SeIw", SeIw), DataEntry("SpIw", SpIw), DataEntry("projAdd", projAdd), DataEntry(getKeySaldoProj(proyect), getValueSaldoProj(proyect)), DataEntry(getKeySaldoProj(proyect), (getValueSaldoProj(proyect) + SpIw)), DataEntry("balanceSupplier", balanceSupplier), DataEntry("balanceTienda", BalanceTienda), DataEntry("balanceIssuer", BalanceIssuer), DataEntry("startQty", startQty), DataEntry("FirstFaseQty", FirstFaseQty), DataEntry("SecondFaseQty", SecondFaseQty), DataEntry(getKeyBalanceSupplier(supplier), (balanceSupplier + pmt.amount))]), TransferSet([ScriptTransfer(pAdd, pIw, unit), ScriptTransfer(i.caller, uIb, yBitCO2), ScriptTransfer(issuer, sIb, yBitCO2), ScriptTransfer(eAdd, eIw, unit), ScriptTransfer(eAdd, eIb, yBitCO2)]))
267+ 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(getKeyIssuer(item), getStrByKey(getKeyIssuer(item))), DataEntry(getKeyProject(item), getStrByKey(getKeyProject(item))), DataEntry(getKeyNodo(item), getStrByKey(getKeyNodo(item))), DataEntry("Tienda", supplier), 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("PreTokenQty", SpreTokenQty), DataEntry(getKeyBalanceQtyToken(token), (SpreTokenQty - subTotalb)), DataEntry("SeIw", SeIw), DataEntry("SpIw", SpIw), DataEntry("projAdd", projAdd), DataEntry(getKeySaldoProj(proyect), getValueSaldoProj(proyect)), DataEntry(getKeySaldoProj(proyect), (getValueSaldoProj(proyect) + SpIw)), DataEntry("balanceSupplier", balanceSupplier), DataEntry("balanceTienda", BalanceTienda), DataEntry("balanceIssuer", BalanceIssuer), DataEntry("startQty", startQty), DataEntry("FirstFaseQty", FirstFaseQty), DataEntry("SecondFaseQty", SecondFaseQty), DataEntry(getKeyBalanceSupplier(supplier), (balanceSupplier + pmt.amount))]), TransferSet([ScriptTransfer(pAdd, pIw, unit), ScriptTransfer(i.caller, uIb, yBitCO2), ScriptTransfer(issuer, sIb, yBitCO2), ScriptTransfer(eAdd, eIw, unit), ScriptTransfer(eAdd, eIb, yBitCO2)]))
268268 }
269269 }
270270
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 wvs = 100000000
1313
1414 let NONE = "none"
1515
1616 let BCO2 = Address(base58'872MvpMoQx7SnV58HMcR9hd6vBWDtQvqmt5javCmYwpx')
1717
1818 let OwnerPubKey = base58'8xCH82jKi2DM7HXXD45fmftPUDjr3TJpjanUATKMK37U'
1919
2020 let issuer = Address(base58'3N67GoXrZo4iwmEjLhS9iNUCbzpPEjoYgNW')
2121
2222 let eAdd = Address(base58'3N3uf7RK8Aed4v5ufGB8xV2Wsz4WNoHj21c')
2323
2424 let pAdd = Address(base58'3Mv5mXTRhpWZxZxstmnsBhckWNgErMTFEaD')
2525
2626 let eurou = 116
2727
2828 let usdnw = 2539
2929
3030 let bco2e = 100000
3131
3232 let bitdscto = 3
3333
3434 let pIP = 10
3535
3636 let uBP = 7
3737
3838 let sBP = 2
3939
4040 let eIP = 1
4141
4242 let eBP = 2
4343
4444 let relacdcto = 11
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 + "Vendedor, Lima-Perú")
6969
7070
7171 func getKeyItem (supplier,item) = (("Producto-GTS: " + " ") + toBase58String(sha256(toBytes((supplier + item)))))
7272
7373
7474 func getKeyIssuer (item) = "Issuer/Tienda"
7575
7676
7777 func getValueIssuer (item) = getStrByKey(getKeyIssuer(item))
7878
7979
8080 func getKeyProject (item) = "Project"
8181
8282
8383 func getValueProject (item) = getStrByKey(getKeyProject(item))
8484
8585
8686 func getKeyNodo (item) = "Nodo"
8787
8888
8989 func getValueNodo (item) = getStrByKey(getKeyNodo(item))
9090
9191
9292 func getKeyUserItemGtsCounter (user,item) = "Order_№:"
9393
9494
9595 func getValueUserItemGtsCounter (user,item) = getNumberByKey(getKeyUserItemGtsCounter(user, item))
9696
9797
9898 func getKeyItemName (item) = "Categoría del Producto:"
9999
100100
101101 func getValueItemName (item) = getStrByKey(getKeyItemName(item))
102102
103103
104104 func getKeyUserName (item) = "Nombre del Usuario:"
105105
106106
107107 func getValueUserName (item) = getStrByKey(getKeyUserName(item))
108108
109109
110110 func getKeyUserDocument (item) = "№ de Documento / DNI del Usuario:"
111111
112112
113113 func getValueUserDocument (item) = getStrByKey(getKeyUserDocument(item))
114114
115115
116116 func getKeyUI (item) = "UI, x10e-04 bit:"
117117
118118
119119 func getValueUI (item) = getNumberByKey(getKeyUI(item))
120120
121121
122122 func getKeyPI (item) = "PI, wvls:"
123123
124124
125125 func getValuePI (item) = getNumberByKey(getKeyPI(item))
126126
127127
128128 func getKeySI (item) = "SI, x10e-04 bit:"
129129
130130
131131 func getValueSI (item) = getNumberByKey(getKeySI(item))
132132
133133
134134 func getKeyNIb (item) = "NIb, x10e-04 bit:"
135135
136136
137137 func getValueNIb (item) = getNumberByKey(getKeyNIb(item))
138138
139139
140140 func getKeyNIw (item) = "NIw, wvls:"
141141
142142
143143 func getValueNIw (item) = getNumberByKey(getKeyNIw(item))
144144
145145
146146 func getKeySaldoTokenQtyStartEtapa (item) = "Tokens Ofertados en la presente etapa / Saldo, ytok:"
147147
148148
149149 func getValueSaldoTokenQtyStartEtapa (item) = getNumberByKey(getKeySaldoTokenQtyStartEtapa(item))
150150
151151
152-func getKeyBalanceQtyToken (token) = "Saldo ytokens pretokens:"
152+func getKeyBalanceQtyToken (token) = "Saldo ytokens pretokens, x10e-04:"
153153
154154
155155 func getValueBalanceQtyToken (token) = getNumberByKey(getKeyBalanceQtyToken(token))
156156
157157
158158 func getKeyBalanceQtySupplier (item) = "Saldo ytokens Supplier:"
159159
160160
161161 func getValueBalanceQtySupplier (item) = getNumberByKey(getKeyBalanceQtySupplier(item))
162162
163163
164164 func getKeyBalanceSupplier (supplier) = "Saldo del Vendedor, wvls:"
165165
166166
167167 func getValueBalanceSupplier (supplier) = getNumberByKey(getKeyBalanceSupplier(supplier))
168168
169169
170170 func getKeyBalanceIssuer (supplier) = "Saldo del Issuer:"
171171
172172
173173 func getValueBalanceIssuer (supplier) = getNumberByKey(getKeyBalanceIssuer(supplier))
174174
175175
176176 func getKeySaldoProj (proyect) = "Saldo del Proyecto, wvs:"
177177
178178
179179 func getValueSaldoProj (proyect) = getNumberByKey(getKeySaldoProj(proyect))
180180
181181
182182 @Callable(i)
183183 func deposit (title,supplierData) = {
184184 let pmt = extract(i.payment)
185185 if ((pmt.assetId != yBitCO2))
186186 then throw("deposito permitido solo en yBitCO2 tokens")
187187 else {
188188 let supplier = toBase58String(i.caller.bytes)
189189 let currentAmount = match getInteger(this, supplier) {
190190 case a: Int =>
191191 a
192192 case _ =>
193193 startQty
194194 }
195195 let newAmount = (currentAmount + pmt.amount)
196196 if ((0 >= newAmount))
197197 then throw("No hay yBitCO2 en su balance")
198198 else WriteSet([DataEntry(supplier, newAmount)])
199199 }
200200 }
201201
202202
203203
204204 @Callable(i)
205205 func purchaseGTS (item,itemName,userName,userDocument,totalAmount) = {
206206 let pmt = extract(i.payment)
207207 if (isDefined(pmt.assetId))
208208 then throw("El Precio en waves.")
209209 else {
210210 let supplier = match getString(this, getKeyItemSupplier(item)) {
211211 case a: String =>
212212 a
213213 case _ =>
214214 NONE
215215 }
216216 let issuerAdd = match getString(this, getKeyIssuer(item)) {
217217 case a: String =>
218218 a
219219 case _ =>
220220 issuer
221221 }
222222 let proyect = toBase58String(pAdd.bytes)
223223 let projAdd = match getInteger(this, proyect) {
224224 case a: Int =>
225225 a
226226 case _ =>
227227 10
228228 }
229229 let token = toBase58String(BCO2.bytes)
230230 let preTokenQty = match getInteger(this, token) {
231231 case a: Int =>
232232 a
233233 case _ =>
234234 FirstFaseQty
235235 }
236236 let balanceSupplier = match getInteger(this, getKeyBalanceSupplier(supplier)) {
237237 case a: Int =>
238238 a
239239 case _ =>
240240 0
241241 }
242242 let balanceIssuer = match getInteger(this, getKeyBalanceIssuer(supplier)) {
243243 case a: Int =>
244244 a
245245 case _ =>
246246 FirstFaseQty
247247 }
248248 let userAddress = toBase58String(i.caller.bytes)
249249 let subTotal = totalAmount
250250 let pIw = ((pIP * subTotal) / relacdcto)
251251 let eIw = ((eIP * subTotal) / relacdcto)
252252 let SeIw = eIw
253253 let SpIw = (projAdd + pIw)
254254 let SpreTokenQty = (10000 * preTokenQty)
255255 let bco2menosdcto = (((100 - bitdscto) * (eurou * bco2e)) / 10000)
256256 let subTotalb = (((totalAmount * usdnw) / 100) / bco2menosdcto)
257257 let totalb = (subTotalb * 10000)
258258 let uIb = ((uBP * subTotalb) / relacdcto)
259259 let sIb = ((sBP * subTotalb) / relacdcto)
260260 let eIb = ((eBP * subTotalb) / relacdcto)
261261 let BalanceTienda = (balanceSupplier + (pmt.amount / wvs))
262262 let BalanceIssuer = (balanceIssuer - (pmt.amount / wvs))
263263 if ((totalAmount > pmt.amount))
264264 then throw("Payment Amount can't be less than item Purchase Order")
265265 else if ((pmt.amount > totalAmount))
266266 then throw("Payment Amount can't be higher than item Purchase Order")
267- 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(getKeyIssuer(item), getStrByKey(getKeyIssuer(item))), DataEntry(getKeyProject(item), getStrByKey(getKeyProject(item))), DataEntry(getKeyNodo(item), getStrByKey(getKeyNodo(item))), DataEntry("Tienda", supplier), 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("PreTokenQty", preTokenQty), DataEntry(getKeyBalanceQtyToken(token), (10000 * preTokenQty)), DataEntry(getKeyBalanceQtyToken(token), SpreTokenQty), DataEntry(getKeyBalanceQtyToken(token), (SpreTokenQty - subTotalb)), DataEntry("SeIw", SeIw), DataEntry("SpIw", SpIw), DataEntry("projAdd", projAdd), DataEntry(getKeySaldoProj(proyect), getValueSaldoProj(proyect)), DataEntry(getKeySaldoProj(proyect), (getValueSaldoProj(proyect) + SpIw)), DataEntry("balanceSupplier", balanceSupplier), DataEntry("balanceTienda", BalanceTienda), DataEntry("balanceIssuer", BalanceIssuer), DataEntry("startQty", startQty), DataEntry("FirstFaseQty", FirstFaseQty), DataEntry("SecondFaseQty", SecondFaseQty), DataEntry(getKeyBalanceSupplier(supplier), (balanceSupplier + pmt.amount))]), TransferSet([ScriptTransfer(pAdd, pIw, unit), ScriptTransfer(i.caller, uIb, yBitCO2), ScriptTransfer(issuer, sIb, yBitCO2), ScriptTransfer(eAdd, eIw, unit), ScriptTransfer(eAdd, eIb, yBitCO2)]))
267+ 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(getKeyIssuer(item), getStrByKey(getKeyIssuer(item))), DataEntry(getKeyProject(item), getStrByKey(getKeyProject(item))), DataEntry(getKeyNodo(item), getStrByKey(getKeyNodo(item))), DataEntry("Tienda", supplier), 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("PreTokenQty", SpreTokenQty), DataEntry(getKeyBalanceQtyToken(token), (SpreTokenQty - subTotalb)), DataEntry("SeIw", SeIw), DataEntry("SpIw", SpIw), DataEntry("projAdd", projAdd), DataEntry(getKeySaldoProj(proyect), getValueSaldoProj(proyect)), DataEntry(getKeySaldoProj(proyect), (getValueSaldoProj(proyect) + SpIw)), DataEntry("balanceSupplier", balanceSupplier), DataEntry("balanceTienda", BalanceTienda), DataEntry("balanceIssuer", BalanceIssuer), DataEntry("startQty", startQty), DataEntry("FirstFaseQty", FirstFaseQty), DataEntry("SecondFaseQty", SecondFaseQty), DataEntry(getKeyBalanceSupplier(supplier), (balanceSupplier + pmt.amount))]), TransferSet([ScriptTransfer(pAdd, pIw, unit), ScriptTransfer(i.caller, uIb, yBitCO2), ScriptTransfer(issuer, sIb, yBitCO2), ScriptTransfer(eAdd, eIw, unit), ScriptTransfer(eAdd, eIb, yBitCO2)]))
268268 }
269269 }
270270
271271
272272
273273 @Callable(i)
274274 func withdraw (item,amount) = {
275275 let userAddress = toBase58String(i.caller.bytes)
276276 let supplier = match getString(this, getKeyItemSupplier(item)) {
277277 case a: String =>
278278 a
279279 case _ =>
280280 NONE
281281 }
282282 let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) {
283283 case a: Int =>
284284 a
285285 case _ =>
286286 startQty
287287 }
288288 let newAmount = (preIcoQty - amount)
289289 if ((0 > amount))
290290 then throw("El balance de retiro no puede ser negativo!")
291291 else if ((0 >= newAmount))
292292 then throw("Ooppss.. Insuficiente balance!")
293293 else ScriptResult(WriteSet([DataEntry(item, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, yBitCO2)]))
294294 }
295295
296296
297297 @Verifier(tx)
298298 func verify () = match tx {
299299 case t: SetScriptTransaction =>
300300 sigVerify(tx.bodyBytes, tx.proofs[0], OwnerPubKey)
301301 case d: ReissueTransaction|DataTransaction =>
302302 true
303303 case tx: TransferTransaction =>
304304 true
305305 case _ =>
306306 false
307307 }
308308

github/deemru/w8io/026f985 
53.97 ms