tx · GvFKTgr7tbthZvJvzZQLBhavntZdnMrNq3SNe78xg5HX 3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8: -0.01400000 Waves 2020.08.26 12:08 [1149478] smart account 3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8 > SELF 0.00000000 Waves
{ "type": 13, "id": "GvFKTgr7tbthZvJvzZQLBhavntZdnMrNq3SNe78xg5HX", "fee": 1400000, "feeAssetId": null, "timestamp": 1598432949844, "version": 1, "sender": "3N6D1fPBTu4QuZenU7hKNuxEKsxd13USum8", "senderPublicKey": "8xCH82jKi2DM7HXXD45fmftPUDjr3TJpjanUATKMK37U", "proofs": [ "5zvGh81SVFqn6UuZ9MayT5mUgxpkf3oLwVRQwcw1pe1prmLEhEnS3pE7vh788uo8Sj8b4E8HJnQBMWhHTPR6peU7" ], "script": "base64:AAIDAAAAAAAAACAIARIECgIICBIHCgUICAgIARIHCgUICAgIARIECgIIAQAAADAAAAAAB3lCaXRDTzIBAAAAIGmM1P/bTQF96Mt4t9+zj8FcPDlb6Qx5aA0hjmfpm0utAAAAAARndHMxAQAAACDDxYMO3SsdGFMCSZ4E3p59+bOpZEBHwTUZ+0J8yxIGZwAAAAAIc3RhcnRRdHkAAAAAALY1DNAAAAAADEZpcnN0RmFzZVF0eQAAAAAAEpeskAAAAAANU2Vjb25kRmFzZVF0eQAAAAAAo51gQAAAAAAIbm9tUHJpY2UAAAAAAAAAAAEAAAAAA3d2cwAAAAAABfXhAAAAAAAQc3VwcGxpZXJEaXNjb3VudAAAAAAAAAAADAAAAAAETk9ORQIAAAAEbm9uZQAAAAALT3duZXJQdWJLZXkBAAAAIHYlgUf22Lk37u4at3MrCWteEN5n68yQc4q5Um14SA8PAAAAAAZpc3N1ZXIJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVSxn8sta9KJwYVeSm05ro6/tXJvgonaFpMAAAAABGVBZGQJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVSZfSwz7guLhVBBDbpt8HuP9dT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AAATRXhjaGFuZ2VUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAEAAAACXdpdGhXYXZlcwMJAQAAAAEhAAAAAQkBAAAACWlzRGVmaW5lZAAAAAEICAgFAAAAAnR4AAAACXNlbGxPcmRlcgAAAAlhc3NldFBhaXIAAAAKcHJpY2VBc3NldAYJAQAAAAEhAAAAAQkBAAAACWlzRGVmaW5lZAAAAAEICAgFAAAAAnR4AAAACXNlbGxPcmRlcgAAAAlhc3NldFBhaXIAAAALYW1vdW50QXNzZXQFAAAACXdpdGhXYXZlcwdT//5V", "chainId": 84, "height": 1149478, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5z8dnmDqfeoFhw3SFeqR4FW3QVYoCWMK8gHgCXEQNNBy Next: 8Rp416FtWTQkonwvrGnZKTh84auqaNS3NQzLQg9QYHvh Diff:
Old | New | Differences | |
---|---|---|---|
213 | 213 | then throw("Payment Amount can't be less than item Purchase Order") | |
214 | 214 | else if ((pmt.amount > totalAmount)) | |
215 | 215 | 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 | |
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)])) | |
217 | 217 | } | |
218 | 218 | } | |
219 | 219 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let yBitCO2 = base58'872MvpMoQx7SnV58HMcR9hd6vBWDtQvqmt5javCmYwpx' | |
5 | 5 | ||
6 | 6 | let gts1 = base58'EBDBY14t3xuduZ2GCNqEUpoLoy9eAAYfyQZA5ryVJxzS' | |
7 | 7 | ||
8 | 8 | let startQty = 3056930000 | |
9 | 9 | ||
10 | 10 | let FirstFaseQty = 311930000 | |
11 | 11 | ||
12 | 12 | let SecondFaseQty = 2745000000 | |
13 | 13 | ||
14 | 14 | let nomPrice = 1 | |
15 | 15 | ||
16 | 16 | let wvs = 100000000 | |
17 | 17 | ||
18 | 18 | let supplierDiscount = 12 | |
19 | 19 | ||
20 | 20 | let NONE = "none" | |
21 | 21 | ||
22 | 22 | let OwnerPubKey = base58'8xCH82jKi2DM7HXXD45fmftPUDjr3TJpjanUATKMK37U' | |
23 | 23 | ||
24 | 24 | let issuer = Address(base58'3N67GoXrZo4iwmEjLhS9iNUCbzpPEjoYgNW') | |
25 | 25 | ||
26 | 26 | let eAdd = Address(base58'3N3uf7RK8Aed4v5ufGB8xV2Wsz4WNoHj21c') | |
27 | 27 | ||
28 | 28 | let pAdd = Address(base58'3Mv5mXTRhpWZxZxstmnsBhckWNgErMTFEaD') | |
29 | 29 | ||
30 | 30 | let igv = 18 | |
31 | 31 | ||
32 | 32 | let ybitco2 = 10000 | |
33 | 33 | ||
34 | 34 | let gts = (10 * ybitco2) | |
35 | 35 | ||
36 | 36 | let uIP = 7 | |
37 | 37 | ||
38 | 38 | let pIP = 10 | |
39 | 39 | ||
40 | 40 | let eIP = 1 | |
41 | 41 | ||
42 | 42 | let sBP = 2 | |
43 | 43 | ||
44 | 44 | let eBP = 2 | |
45 | 45 | ||
46 | 46 | func getNumberByKey (key) = { | |
47 | 47 | let num = match getInteger(this, key) { | |
48 | 48 | case a: Int => | |
49 | 49 | a | |
50 | 50 | case _ => | |
51 | 51 | 0 | |
52 | 52 | } | |
53 | 53 | num | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func getStrByKey (key) = { | |
58 | 58 | let str = match getString(this, key) { | |
59 | 59 | case a: String => | |
60 | 60 | a | |
61 | 61 | case _ => | |
62 | 62 | NONE | |
63 | 63 | } | |
64 | 64 | str | |
65 | 65 | } | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func getKeyItemSupplier (supplier) = (supplier + "Bit-CO2 Shop, Lima-Perú") | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func getKeyItem (supplier,item) = (("Producto-GTS: " + " ") + toBase58String(sha256(toBytes((supplier + item))))) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func getKeyProject (item) = "Project" | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func getKeyEcosystNode (item) = "Nodo del Ecosistema" | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func getKeyTokenGTS1 (item) = "GTStable" | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func getKeyUserItemGtsCounter (user,item) = "Order_№:" | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func getValueUserItemGtsCounter (user,item) = getNumberByKey(getKeyUserItemGtsCounter(user, item)) | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func getKeyItemName (item) = "Categoría del Producto:" | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func getValueItemName (item) = getStrByKey(getKeyItemName(item)) | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func getKeyUserName (item) = "Nombre del Usuario:" | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func getValueUserName (item) = getStrByKey(getKeyUserName(item)) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func getKeyUserDocument (item) = "№ de Documento / DNI del Usuario:" | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func getValueUserDocument (item) = getStrByKey(getKeyUserDocument(item)) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func getKeySaldoTokenQtyStartEtapa (item) = "Tokens Ofertados en la presente etapa / Saldo, ytok:" | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func getValueSaldoTokenQtyStartEtapa (item) = getNumberByKey(getKeySaldoTokenQtyStartEtapa(item)) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func getKeyBalanceQtySupplier (item) = "Balance/Saldo GTS, ytokens:" | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func getValueBalanceQtySupplier (item) = getNumberByKey(getKeyBalanceQtySupplier(item)) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func getKeyBalanceSupplier (supplier) = "Monto Bruto por VentaGTS, wvls:" | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func getValueBalanceSupplier (supplier) = getNumberByKey(getKeyBalanceSupplier(supplier)) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func getKeyUI (item) = "UI,_wvls:" | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func getValueUI (item) = getNumberByKey(getKeyUI(item)) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func getKeyPI (item) = "PI,_wvls:" | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func getValuePI (item) = getNumberByKey(getKeyPI(item)) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func getKeySI (item) = "SI,_wvls:" | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func getValueSI (item) = getNumberByKey(getKeySI(item)) | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | @Callable(i) | |
144 | 144 | func deposit (title,supplierData) = { | |
145 | 145 | let pmt = extract(i.payment) | |
146 | 146 | if ((pmt.assetId != yBitCO2)) | |
147 | 147 | then throw("deposito permitido solo en yBitCO2 tokens") | |
148 | 148 | else { | |
149 | 149 | let supplier = toBase58String(i.caller.bytes) | |
150 | 150 | let currentAmount = match getInteger(this, supplier) { | |
151 | 151 | case a: Int => | |
152 | 152 | a | |
153 | 153 | case _ => | |
154 | 154 | startQty | |
155 | 155 | } | |
156 | 156 | let newAmount = (currentAmount + pmt.amount) | |
157 | 157 | if ((0 >= newAmount)) | |
158 | 158 | then throw("No hay yBitCO2 en su balance") | |
159 | 159 | else WriteSet([DataEntry(supplier, newAmount)]) | |
160 | 160 | } | |
161 | 161 | } | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | ||
165 | 165 | @Callable(i) | |
166 | 166 | func purchaseGTS (item,itemName,userName,userDocument,totalAmount) = { | |
167 | 167 | let pmt = extract(i.payment) | |
168 | 168 | if ((pmt.assetId != yBitCO2)) | |
169 | 169 | then throw("Use yBitCO2 tokens para adquirir ProductosGTS") | |
170 | 170 | else { | |
171 | 171 | let supplier = match getString(this, getKeyItemSupplier(item)) { | |
172 | 172 | case a: String => | |
173 | 173 | a | |
174 | 174 | case _ => | |
175 | 175 | NONE | |
176 | 176 | } | |
177 | 177 | let projAdd = match getString(this, getKeyProject(item)) { | |
178 | 178 | case a: String => | |
179 | 179 | NONE | |
180 | 180 | case _ => | |
181 | 181 | pAdd | |
182 | 182 | } | |
183 | 183 | let nodoAdd = match getString(this, getKeyEcosystNode(item)) { | |
184 | 184 | case a: String => | |
185 | 185 | NONE | |
186 | 186 | case _ => | |
187 | 187 | eAdd | |
188 | 188 | } | |
189 | 189 | let preTokenQty = match getInteger(this, getKeyBalanceQtySupplier(item)) { | |
190 | 190 | case a: Int => | |
191 | 191 | a | |
192 | 192 | case _ => | |
193 | 193 | SecondFaseQty | |
194 | 194 | } | |
195 | 195 | let balanceSupplier = match getInteger(this, getKeyBalanceSupplier(supplier)) { | |
196 | 196 | case a: Int => | |
197 | 197 | a | |
198 | 198 | case _ => | |
199 | 199 | 0 | |
200 | 200 | } | |
201 | 201 | let userAddress = toBase58String(i.caller.bytes) | |
202 | 202 | let subTotal = (totalAmount - ((igv * totalAmount) / 100)) | |
203 | 203 | let cPB = ((88 * gts) / 100) | |
204 | 204 | let uI = ((subTotal * uIP) / 100) | |
205 | 205 | let uBI = ((uI / cPB) * 1) | |
206 | 206 | let pI = ((subTotal * pIP) / 100) | |
207 | 207 | let eI = ((subTotal * eIP) / 100) | |
208 | 208 | let eBI = (((subTotal * eBP) / (100 * cPB)) * 1) | |
209 | 209 | let sI = ((totalAmount - pI) - eI) | |
210 | 210 | let sBI = (((subTotal * sBP) / (100 * cPB)) * 1) | |
211 | 211 | let QVentasgts = (((subTotal * 11) / (cPB * 100)) * 1) | |
212 | 212 | if ((totalAmount > pmt.amount)) | |
213 | 213 | then throw("Payment Amount can't be less than item Purchase Order") | |
214 | 214 | else if ((pmt.amount > totalAmount)) | |
215 | 215 | 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 | |
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)])) | |
217 | 217 | } | |
218 | 218 | } | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | ||
222 | 222 | @Callable(i) | |
223 | 223 | func purchaseGTS2 (item,itemName,userName,userDocument,totalAmount) = { | |
224 | 224 | let pmt = extract(i.payment) | |
225 | 225 | if (isDefined(pmt.assetId)) | |
226 | 226 | then throw("El Precio en waves.") | |
227 | 227 | else { | |
228 | 228 | let supplier = match getString(this, getKeyItemSupplier(item)) { | |
229 | 229 | case a: String => | |
230 | 230 | a | |
231 | 231 | case _ => | |
232 | 232 | NONE | |
233 | 233 | } | |
234 | 234 | let projAdd = match getString(this, getKeyProject(item)) { | |
235 | 235 | case a: String => | |
236 | 236 | NONE | |
237 | 237 | case _ => | |
238 | 238 | pAdd | |
239 | 239 | } | |
240 | 240 | let nodoAdd = match getString(this, getKeyEcosystNode(item)) { | |
241 | 241 | case a: String => | |
242 | 242 | NONE | |
243 | 243 | case _ => | |
244 | 244 | eAdd | |
245 | 245 | } | |
246 | 246 | let preTokenQty = match getInteger(this, getKeyBalanceQtySupplier(item)) { | |
247 | 247 | case a: Int => | |
248 | 248 | a | |
249 | 249 | case _ => | |
250 | 250 | SecondFaseQty | |
251 | 251 | } | |
252 | 252 | let balanceSupplier = match getInteger(this, getKeyBalanceSupplier(supplier)) { | |
253 | 253 | case a: Int => | |
254 | 254 | a | |
255 | 255 | case _ => | |
256 | 256 | 0 | |
257 | 257 | } | |
258 | 258 | let userAddress = toBase58String(i.caller.bytes) | |
259 | 259 | let subTotal = (totalAmount - ((igv * totalAmount) / 100)) | |
260 | 260 | let cPB = ((88 * ybitco2) / 100) | |
261 | 261 | let uI = ((subTotal * uIP) / 100) | |
262 | 262 | let uBI = ((uI / cPB) * 1) | |
263 | 263 | let pI = ((subTotal * pIP) / 100) | |
264 | 264 | let eI = ((subTotal * eIP) / 100) | |
265 | 265 | let eBI = (((subTotal * eBP) / (100 * cPB)) * 1) | |
266 | 266 | let sI = ((totalAmount - pI) - eI) | |
267 | 267 | let sBI = (((subTotal * sBP) / (100 * cPB)) * 1) | |
268 | 268 | let QVentasgts = (((subTotal * 11) / (cPB * 100)) * 1) | |
269 | 269 | if ((totalAmount > pmt.amount)) | |
270 | 270 | then throw("Payment Amount can't be less than item Purchase Order") | |
271 | 271 | else if ((pmt.amount > totalAmount)) | |
272 | 272 | then throw("Payment Amount can't be higher than item Purchase Order") | |
273 | 273 | 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)])) | |
274 | 274 | } | |
275 | 275 | } | |
276 | 276 | ||
277 | 277 | ||
278 | 278 | ||
279 | 279 | @Callable(i) | |
280 | 280 | func withdraw (item,amount) = { | |
281 | 281 | let userAddress = toBase58String(i.caller.bytes) | |
282 | 282 | let supplier = match getString(this, getKeyItemSupplier(item)) { | |
283 | 283 | case a: String => | |
284 | 284 | a | |
285 | 285 | case _ => | |
286 | 286 | NONE | |
287 | 287 | } | |
288 | 288 | let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) { | |
289 | 289 | case a: Int => | |
290 | 290 | a | |
291 | 291 | case _ => | |
292 | 292 | startQty | |
293 | 293 | } | |
294 | 294 | let newAmount = (preIcoQty - amount) | |
295 | 295 | if ((0 > amount)) | |
296 | 296 | then throw("El balance de retiro no puede ser negativo!") | |
297 | 297 | else if ((0 >= newAmount)) | |
298 | 298 | then throw("Ooppss.. Insuficiente balance!") | |
299 | 299 | else ScriptResult(WriteSet([DataEntry(item, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, yBitCO2)])) | |
300 | 300 | } | |
301 | 301 | ||
302 | 302 | ||
303 | 303 | @Verifier(tx) | |
304 | 304 | func verify () = match tx { | |
305 | 305 | case t: SetScriptTransaction => | |
306 | 306 | sigVerify(tx.bodyBytes, tx.proofs[0], OwnerPubKey) | |
307 | 307 | case d: DataTransaction|ReissueTransaction => | |
308 | 308 | true | |
309 | 309 | case tx: TransferTransaction => | |
310 | 310 | true | |
311 | 311 | case tx: ExchangeTransaction => | |
312 | 312 | let withWaves = if (!(isDefined(tx.sellOrder.assetPair.priceAsset))) | |
313 | 313 | then true | |
314 | 314 | else !(isDefined(tx.sellOrder.assetPair.amountAsset)) | |
315 | 315 | withWaves | |
316 | 316 | case _ => | |
317 | 317 | false | |
318 | 318 | } | |
319 | 319 |
github/deemru/w8io/169f3d6 121.28 ms ◑