tx · 7M9ADWTUxzAuu5YHYnYA8XaXWEKnCHejiNCLd3ZkCbpa 3NB412VeXkiWqruYpeEEWkm364Xc9MskZ2k: -0.01400000 Waves 2020.08.18 22:45 [1138752] smart account 3NB412VeXkiWqruYpeEEWkm364Xc9MskZ2k > SELF 0.00000000 Waves
{ "type": 13, "id": "7M9ADWTUxzAuu5YHYnYA8XaXWEKnCHejiNCLd3ZkCbpa", "fee": 1400000, "feeAssetId": null, "timestamp": 1597779881146, "version": 1, "sender": "3NB412VeXkiWqruYpeEEWkm364Xc9MskZ2k", "senderPublicKey": "7FQufF9XhJBsTdvrn67eWxYT7ZxDwzjuXAprkWiHrS3Y", "proofs": [ "5KJpmyLtu3sxVBXc9xL6hVPHz6ubp4TzJAfewt1UvAZWcfzRPFiAnzWHPsmaXvb3PQnbaDqT1rGHuPUnaLK4dGKD" ], "script": "base64:AAIDAAAAAAAAABkIARIECgIICBIJCgcICAgIAQgIEgQKAggBAAAAKgAAAAAHeEJpdENPMgEAAAAgIARkpqoDew1vpqr6lyVYs5aJelMM/++6xmiHbINU3I0AAAAACHN0YXJ0UXR5AAAAAAAABKodAAAAAAxGaXJzdEZhc2VRdHkAAAAAAAAAedkAAAAADVNlY29uZEZhc2VRdHkAAAAAAAAEMEQAAAAACG5vbVByaWNlAAAAAAAAAAABAAAAAAN3dnMAAAAAAAX14QAAAAAAEHN1cHBsaWVyRGlzY291bnQAAAAAAAAAAAwAAAAABE5PTkUCAAAABG5vbmUAAAAAC093bmVyUHViS2V5AQAAACBc10kgzntLYC3wdTXyP6D5J32rgBzym30loQrY6e/2HwAAAAAGaXNzdWVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUsZ/LLWvSicGFXkptOa6Ov7Vyb4KJ2haTAAAAAARlQWRkCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUmX0sM+4Li4VQQQ26bfB7j/XU/VW4HmxXAAAAAARwQWRkCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUQ6WuNY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GNoMAQAAAAJd2l0aFdhdmVzAwkBAAAAASEAAAABCQEAAAAJaXNEZWZpbmVkAAAAAQgICAUAAAACdHgAAAAJc2VsbE9yZGVyAAAACWFzc2V0UGFpcgAAAApwcmljZUFzc2V0BgkBAAAAASEAAAABCQEAAAAJaXNEZWZpbmVkAAAAAQgICAUAAAACdHgAAAAJc2VsbE9yZGVyAAAACWFzc2V0UGFpcgAAAAthbW91bnRBc3NldAUAAAAJd2l0aFdhdmVzB9HWVAw=", "chainId": 84, "height": 1138752, "spentComplexity": 0 } View: original | compacted Prev: FrzfEmvF6NsmnQgL6XhG7ek18aansEEi78GSPrKRVWht Next: FxAYk1ZofeowrNMVp5CwYjNX16njAXdvbwihLKWta4Ds Diff:
Old | New | Differences | |
---|---|---|---|
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let xBitCO2 = base58'39yw38hm342hiK43SqELTaZRkTWJoBc22XpxmsSiBrsN' | |
5 | - | ||
6 | - | let bBitCO2 = base58'3UMwob2PDKVYmDMZZdT9ijK7EdRJZKFoBLCAXnwKtNN4' | |
7 | 5 | ||
8 | 6 | let startQty = 305693 | |
9 | 7 | ||
150 | 148 | ||
151 | 149 | ||
152 | 150 | @Callable(i) | |
153 | - | func purchaseGTS2 (item,userName,userDocument,totalAmount) = { | |
154 | - | let pmt = extract(i.payment) | |
155 | - | if (isDefined(pmt.assetId)) | |
156 | - | then throw("you can adquire Products only by Waves tokens") | |
157 | - | else { | |
158 | - | let supplier = match getString(this, getKeyItemSupplier(item)) { | |
159 | - | case a: String => | |
160 | - | a | |
161 | - | case _ => | |
162 | - | NONE | |
163 | - | } | |
164 | - | let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) { | |
165 | - | case a: Int => | |
166 | - | a | |
167 | - | case _ => | |
168 | - | startQty | |
169 | - | } | |
170 | - | let balanceSupplier = match getInteger(this, getKeyBalanceSupplier(supplier)) { | |
171 | - | case a: Int => | |
172 | - | a | |
173 | - | case _ => | |
174 | - | 0 | |
175 | - | } | |
176 | - | let userAddress = toBase58String(i.caller.bytes) | |
177 | - | let subTotal = (totalAmount - ((igv * totalAmount) / 100)) | |
178 | - | let uI = ((subTotal * uIP) / 100) | |
179 | - | let uBI = (uI / cPB) | |
180 | - | let pI = ((subTotal * pIP) / 100) | |
181 | - | let eI = ((subTotal * eIP) / 100) | |
182 | - | let eBI = ((subTotal * eIP) / (cPB * 100)) | |
183 | - | let sI = ((totalAmount - pI) - eI) | |
184 | - | let sBI = ((subTotal * sIP) / (cPB * 100)) | |
185 | - | if ((totalAmount > pmt.amount)) | |
186 | - | then throw("Payment Amount can't be less than item Purchase Order") | |
187 | - | else if ((pmt.amount > totalAmount)) | |
188 | - | then throw("Payment Amount can't be higher than item Purchase Order") | |
189 | - | else ScriptResult(WriteSet([DataEntry(getKeyUserItemGtsCounter(userAddress, item), (getValueUserItemGtsCounter(userAddress, item) + 1)), DataEntry(getKeyUserName(item), userName), DataEntry(getKeyUserDocument(item), userDocument), DataEntry("Payment_amount,_wvs", totalAmount), DataEntry("Imp, %", igv), DataEntry("STtl, wvs", subTotal), DataEntry("CP 1 B, wvs", (cPB * 1000000)), DataEntry(getKeyUI(item), uI), DataEntry("UBI", uBI), DataEntry(getKeyPI(item), pI), DataEntry("EcSys", eBI), DataEntry(("Order_Status:_" + userAddress), "confirmed"), DataEntry(getKeySI(item), sI), DataEntry("SBI: b", sBI), DataEntry(getKeyBalanceSupplier(supplier), (balanceSupplier + pmt.amount))]), TransferSet([ScriptTransfer(i.caller, uBI, bBitCO2), ScriptTransfer(pAdd, pI, unit), ScriptTransfer(issuer, sI, unit), ScriptTransfer(issuer, sBI, bBitCO2), ScriptTransfer(eAdd, eI, unit), ScriptTransfer(eAdd, eBI, bBitCO2)])) | |
190 | - | } | |
191 | - | } | |
192 | - | ||
193 | - | ||
194 | - | ||
195 | - | @Callable(i) | |
196 | 151 | func purchaseGTS (item,itemName,userName,userDocument,totalAmount,pAdd,eAdd) = { | |
197 | 152 | let pmt = extract(i.payment) | |
198 | 153 | if (isDefined(pmt.assetId)) | |
230 | 185 | then throw("Payment Amount can't be less than item Purchase Order") | |
231 | 186 | else if ((pmt.amount > totalAmount)) | |
232 | 187 | then throw("Payment Amount can't be higher than item Purchase Order") | |
233 | - | 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,_wvs", totalAmount), DataEntry("Imp, %", igv), DataEntry("STtl, wvs", subTotal), DataEntry("CP 1 B, wvs", (cPB * 1000000)), DataEntry(getKeyUI(item), uI), DataEntry("UBI", uBI), DataEntry(getKeyPI(item), pI), DataEntry("EcSys", eBI), DataEntry(getKeySI(item), sI), DataEntry("SBI: b", sBI), DataEntry(("Order_Status:_" + userAddress), "Adquisición Confirmada!"), DataEntry("QporVentasGTS", QVentasgts), DataEntry(getKeyBalanceQtySupplier(item), (SecondFaseQty - QVentasgts)), DataEntry(getKeyBalanceSupplier(supplier), (balanceSupplier + pmt.amount))]), TransferSet([ScriptTransfer(i.caller, uBI, xBitCO2), ScriptTransfer(issuer, sI, unit), ScriptTransfer(issuer, sBI, xBitCO2)])) | |
188 | + | 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,_wvs", totalAmount), DataEntry("Imp, %", igv), DataEntry("STtl, wvs", subTotal), DataEntry("CP 1 B, wvs", (cPB * 1000000)), DataEntry(getKeyUI(item), uI), DataEntry("UBI", uBI), DataEntry(getKeyPI(item), pI), DataEntry("EcSys", eBI), DataEntry(getKeySI(item), sI), DataEntry("SBI: b", sBI), DataEntry(("Order_Status:_" + userAddress), "Adquisición Confirmada!"), DataEntry("QporVentasGTS", QVentasgts), DataEntry(getKeyBalanceQtySupplier(item), (SecondFaseQty - QVentasgts)), DataEntry(getKeyBalanceSupplier(supplier), (balanceSupplier + pmt.amount))]), TransferSet([ScriptTransfer(i.caller, uBI, xBitCO2), ScriptTransfer(addressFromStringValue(pAdd), pI, unit), ScriptTransfer(issuer, sI, unit), ScriptTransfer(issuer, sBI, xBitCO2)])) | |
234 | 189 | } | |
235 | 190 | } | |
236 | 191 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let xBitCO2 = base58'39yw38hm342hiK43SqELTaZRkTWJoBc22XpxmsSiBrsN' | |
5 | - | ||
6 | - | let bBitCO2 = base58'3UMwob2PDKVYmDMZZdT9ijK7EdRJZKFoBLCAXnwKtNN4' | |
7 | 5 | ||
8 | 6 | let startQty = 305693 | |
9 | 7 | ||
10 | 8 | let FirstFaseQty = 31193 | |
11 | 9 | ||
12 | 10 | let SecondFaseQty = 274500 | |
13 | 11 | ||
14 | 12 | let nomPrice = 1 | |
15 | 13 | ||
16 | 14 | let wvs = 100000000 | |
17 | 15 | ||
18 | 16 | let supplierDiscount = 12 | |
19 | 17 | ||
20 | 18 | let NONE = "none" | |
21 | 19 | ||
22 | 20 | let OwnerPubKey = base58'7FQufF9XhJBsTdvrn67eWxYT7ZxDwzjuXAprkWiHrS3Y' | |
23 | 21 | ||
24 | 22 | let issuer = Address(base58'3N67GoXrZo4iwmEjLhS9iNUCbzpPEjoYgNW') | |
25 | 23 | ||
26 | 24 | let eAdd = Address(base58'3N3uf7RK8Aed4v5ufGB8xV2Wsz4WNoHj21c') | |
27 | 25 | ||
28 | 26 | let pAdd = Address(base58'3Mv5mXTRhpWZxZxstmnsBhckWNgErMTFEaD') | |
29 | 27 | ||
30 | 28 | let igv = 18 | |
31 | 29 | ||
32 | 30 | let cPB = 88 | |
33 | 31 | ||
34 | 32 | let uIP = 7 | |
35 | 33 | ||
36 | 34 | let pIP = 10 | |
37 | 35 | ||
38 | 36 | let sIP = 1 | |
39 | 37 | ||
40 | 38 | let eIP = 1 | |
41 | 39 | ||
42 | 40 | func getNumberByKey (key) = { | |
43 | 41 | let num = match getInteger(this, key) { | |
44 | 42 | case a: Int => | |
45 | 43 | a | |
46 | 44 | case _ => | |
47 | 45 | 0 | |
48 | 46 | } | |
49 | 47 | num | |
50 | 48 | } | |
51 | 49 | ||
52 | 50 | ||
53 | 51 | func getStrByKey (key) = { | |
54 | 52 | let str = match getString(this, key) { | |
55 | 53 | case a: String => | |
56 | 54 | a | |
57 | 55 | case _ => | |
58 | 56 | NONE | |
59 | 57 | } | |
60 | 58 | str | |
61 | 59 | } | |
62 | 60 | ||
63 | 61 | ||
64 | 62 | func getKeyItemSupplier (supplier) = (supplier + "Bit-CO2 Shop, Lima-Perú") | |
65 | 63 | ||
66 | 64 | ||
67 | 65 | func getKeyItem (supplier,item) = (("Producto-GTS: " + " ") + toBase58String(sha256(toBytes((supplier + item))))) | |
68 | 66 | ||
69 | 67 | ||
70 | 68 | func getKeyUserItemGtsCounter (user,item) = "Order_№:" | |
71 | 69 | ||
72 | 70 | ||
73 | 71 | func getValueUserItemGtsCounter (user,item) = getNumberByKey(getKeyUserItemGtsCounter(user, item)) | |
74 | 72 | ||
75 | 73 | ||
76 | 74 | func getKeyItemName (item) = "Categoría del Producto:" | |
77 | 75 | ||
78 | 76 | ||
79 | 77 | func getValueItemName (item) = getStrByKey(getKeyItemName(item)) | |
80 | 78 | ||
81 | 79 | ||
82 | 80 | func getKeyUserName (item) = "Nombre del Usuario:" | |
83 | 81 | ||
84 | 82 | ||
85 | 83 | func getValueUserName (item) = getStrByKey(getKeyUserName(item)) | |
86 | 84 | ||
87 | 85 | ||
88 | 86 | func getKeyUserDocument (item) = "№ de Documento / DNI del Usuario:" | |
89 | 87 | ||
90 | 88 | ||
91 | 89 | func getValueUserDocument (item) = getStrByKey(getKeyUserDocument(item)) | |
92 | 90 | ||
93 | 91 | ||
94 | 92 | func getKeySaldoTokenQtyStartEtapa (item) = "Tokens Ofertados en la presente etapa / Saldo:" | |
95 | 93 | ||
96 | 94 | ||
97 | 95 | func getValueSaldoTokenQtyStartEtapa (item) = getNumberByKey(getKeySaldoTokenQtyStartEtapa(item)) | |
98 | 96 | ||
99 | 97 | ||
100 | 98 | func getKeyBalanceQtySupplier (item) = "Balance/Saldo GTS, tokens:" | |
101 | 99 | ||
102 | 100 | ||
103 | 101 | func getValueBalanceQtySupplier (item) = getNumberByKey(getKeyBalanceQtySupplier(item)) | |
104 | 102 | ||
105 | 103 | ||
106 | 104 | func getKeyBalanceSupplier (supplier) = "Ingresos por VentaGTS:" | |
107 | 105 | ||
108 | 106 | ||
109 | 107 | func getValueBalanceSupplier (supplier) = getNumberByKey(getKeyBalanceSupplier(supplier)) | |
110 | 108 | ||
111 | 109 | ||
112 | 110 | func getKeyUI (item) = "UI,_wvs:" | |
113 | 111 | ||
114 | 112 | ||
115 | 113 | func getValueUI (item) = getNumberByKey(getKeyUI(item)) | |
116 | 114 | ||
117 | 115 | ||
118 | 116 | func getKeyPI (item) = "PI,_%:" | |
119 | 117 | ||
120 | 118 | ||
121 | 119 | func getValuePI (item) = getNumberByKey(getKeyPI(item)) | |
122 | 120 | ||
123 | 121 | ||
124 | 122 | func getKeySI (item) = "SI,_%:" | |
125 | 123 | ||
126 | 124 | ||
127 | 125 | func getValueSI (item) = getNumberByKey(getKeySI(item)) | |
128 | 126 | ||
129 | 127 | ||
130 | 128 | @Callable(i) | |
131 | 129 | func deposit (title,supplierData) = { | |
132 | 130 | let pmt = extract(i.payment) | |
133 | 131 | if ((pmt.assetId != xBitCO2)) | |
134 | 132 | then throw("deposito permitido solo en xBitCO2 tokens") | |
135 | 133 | else { | |
136 | 134 | let supplier = toBase58String(i.caller.bytes) | |
137 | 135 | let currentAmount = match getInteger(this, supplier) { | |
138 | 136 | case a: Int => | |
139 | 137 | a | |
140 | 138 | case _ => | |
141 | 139 | startQty | |
142 | 140 | } | |
143 | 141 | let newAmount = (currentAmount + pmt.amount) | |
144 | 142 | if ((0 >= newAmount)) | |
145 | 143 | then throw("No hay xBitCO2 en su balance") | |
146 | 144 | else WriteSet([DataEntry(supplier, newAmount)]) | |
147 | 145 | } | |
148 | 146 | } | |
149 | 147 | ||
150 | 148 | ||
151 | 149 | ||
152 | 150 | @Callable(i) | |
153 | - | func purchaseGTS2 (item,userName,userDocument,totalAmount) = { | |
154 | - | let pmt = extract(i.payment) | |
155 | - | if (isDefined(pmt.assetId)) | |
156 | - | then throw("you can adquire Products only by Waves tokens") | |
157 | - | else { | |
158 | - | let supplier = match getString(this, getKeyItemSupplier(item)) { | |
159 | - | case a: String => | |
160 | - | a | |
161 | - | case _ => | |
162 | - | NONE | |
163 | - | } | |
164 | - | let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) { | |
165 | - | case a: Int => | |
166 | - | a | |
167 | - | case _ => | |
168 | - | startQty | |
169 | - | } | |
170 | - | let balanceSupplier = match getInteger(this, getKeyBalanceSupplier(supplier)) { | |
171 | - | case a: Int => | |
172 | - | a | |
173 | - | case _ => | |
174 | - | 0 | |
175 | - | } | |
176 | - | let userAddress = toBase58String(i.caller.bytes) | |
177 | - | let subTotal = (totalAmount - ((igv * totalAmount) / 100)) | |
178 | - | let uI = ((subTotal * uIP) / 100) | |
179 | - | let uBI = (uI / cPB) | |
180 | - | let pI = ((subTotal * pIP) / 100) | |
181 | - | let eI = ((subTotal * eIP) / 100) | |
182 | - | let eBI = ((subTotal * eIP) / (cPB * 100)) | |
183 | - | let sI = ((totalAmount - pI) - eI) | |
184 | - | let sBI = ((subTotal * sIP) / (cPB * 100)) | |
185 | - | if ((totalAmount > pmt.amount)) | |
186 | - | then throw("Payment Amount can't be less than item Purchase Order") | |
187 | - | else if ((pmt.amount > totalAmount)) | |
188 | - | then throw("Payment Amount can't be higher than item Purchase Order") | |
189 | - | else ScriptResult(WriteSet([DataEntry(getKeyUserItemGtsCounter(userAddress, item), (getValueUserItemGtsCounter(userAddress, item) + 1)), DataEntry(getKeyUserName(item), userName), DataEntry(getKeyUserDocument(item), userDocument), DataEntry("Payment_amount,_wvs", totalAmount), DataEntry("Imp, %", igv), DataEntry("STtl, wvs", subTotal), DataEntry("CP 1 B, wvs", (cPB * 1000000)), DataEntry(getKeyUI(item), uI), DataEntry("UBI", uBI), DataEntry(getKeyPI(item), pI), DataEntry("EcSys", eBI), DataEntry(("Order_Status:_" + userAddress), "confirmed"), DataEntry(getKeySI(item), sI), DataEntry("SBI: b", sBI), DataEntry(getKeyBalanceSupplier(supplier), (balanceSupplier + pmt.amount))]), TransferSet([ScriptTransfer(i.caller, uBI, bBitCO2), ScriptTransfer(pAdd, pI, unit), ScriptTransfer(issuer, sI, unit), ScriptTransfer(issuer, sBI, bBitCO2), ScriptTransfer(eAdd, eI, unit), ScriptTransfer(eAdd, eBI, bBitCO2)])) | |
190 | - | } | |
191 | - | } | |
192 | - | ||
193 | - | ||
194 | - | ||
195 | - | @Callable(i) | |
196 | 151 | func purchaseGTS (item,itemName,userName,userDocument,totalAmount,pAdd,eAdd) = { | |
197 | 152 | let pmt = extract(i.payment) | |
198 | 153 | if (isDefined(pmt.assetId)) | |
199 | 154 | then throw("El Precio en waves.") | |
200 | 155 | else { | |
201 | 156 | let supplier = match getString(this, getKeyItemSupplier(item)) { | |
202 | 157 | case a: String => | |
203 | 158 | a | |
204 | 159 | case _ => | |
205 | 160 | NONE | |
206 | 161 | } | |
207 | 162 | let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) { | |
208 | 163 | case a: Int => | |
209 | 164 | a | |
210 | 165 | case _ => | |
211 | 166 | SecondFaseQty | |
212 | 167 | } | |
213 | 168 | let balanceSupplier = match getInteger(this, getKeyBalanceSupplier(supplier)) { | |
214 | 169 | case a: Int => | |
215 | 170 | a | |
216 | 171 | case _ => | |
217 | 172 | 0 | |
218 | 173 | } | |
219 | 174 | let userAddress = toBase58String(i.caller.bytes) | |
220 | 175 | let subTotal = (totalAmount - ((igv * totalAmount) / 100)) | |
221 | 176 | let uI = ((subTotal * uIP) / 100) | |
222 | 177 | let uBI = (uI / cPB) | |
223 | 178 | let pI = ((subTotal * pIP) / 100) | |
224 | 179 | let eI = ((subTotal * eIP) / 100) | |
225 | 180 | let eBI = ((subTotal * eIP) / (cPB * 100)) | |
226 | 181 | let sI = ((totalAmount - pI) - eI) | |
227 | 182 | let sBI = ((subTotal * sIP) / (cPB * 100)) | |
228 | 183 | let QVentasgts = ((subTotal * 11) / (cPB * 100)) | |
229 | 184 | if ((totalAmount > pmt.amount)) | |
230 | 185 | then throw("Payment Amount can't be less than item Purchase Order") | |
231 | 186 | else if ((pmt.amount > totalAmount)) | |
232 | 187 | then throw("Payment Amount can't be higher than item Purchase Order") | |
233 | - | 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,_wvs", totalAmount), DataEntry("Imp, %", igv), DataEntry("STtl, wvs", subTotal), DataEntry("CP 1 B, wvs", (cPB * 1000000)), DataEntry(getKeyUI(item), uI), DataEntry("UBI", uBI), DataEntry(getKeyPI(item), pI), DataEntry("EcSys", eBI), DataEntry(getKeySI(item), sI), DataEntry("SBI: b", sBI), DataEntry(("Order_Status:_" + userAddress), "Adquisición Confirmada!"), DataEntry("QporVentasGTS", QVentasgts), DataEntry(getKeyBalanceQtySupplier(item), (SecondFaseQty - QVentasgts)), DataEntry(getKeyBalanceSupplier(supplier), (balanceSupplier + pmt.amount))]), TransferSet([ScriptTransfer(i.caller, uBI, xBitCO2), ScriptTransfer(issuer, sI, unit), ScriptTransfer(issuer, sBI, xBitCO2)])) | |
188 | + | 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,_wvs", totalAmount), DataEntry("Imp, %", igv), DataEntry("STtl, wvs", subTotal), DataEntry("CP 1 B, wvs", (cPB * 1000000)), DataEntry(getKeyUI(item), uI), DataEntry("UBI", uBI), DataEntry(getKeyPI(item), pI), DataEntry("EcSys", eBI), DataEntry(getKeySI(item), sI), DataEntry("SBI: b", sBI), DataEntry(("Order_Status:_" + userAddress), "Adquisición Confirmada!"), DataEntry("QporVentasGTS", QVentasgts), DataEntry(getKeyBalanceQtySupplier(item), (SecondFaseQty - QVentasgts)), DataEntry(getKeyBalanceSupplier(supplier), (balanceSupplier + pmt.amount))]), TransferSet([ScriptTransfer(i.caller, uBI, xBitCO2), ScriptTransfer(addressFromStringValue(pAdd), pI, unit), ScriptTransfer(issuer, sI, unit), ScriptTransfer(issuer, sBI, xBitCO2)])) | |
234 | 189 | } | |
235 | 190 | } | |
236 | 191 | ||
237 | 192 | ||
238 | 193 | ||
239 | 194 | @Callable(i) | |
240 | 195 | func withdraw (item,amount) = { | |
241 | 196 | let userAddress = toBase58String(i.caller.bytes) | |
242 | 197 | let supplier = match getString(this, getKeyItemSupplier(item)) { | |
243 | 198 | case a: String => | |
244 | 199 | a | |
245 | 200 | case _ => | |
246 | 201 | NONE | |
247 | 202 | } | |
248 | 203 | let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) { | |
249 | 204 | case a: Int => | |
250 | 205 | a | |
251 | 206 | case _ => | |
252 | 207 | startQty | |
253 | 208 | } | |
254 | 209 | let newAmount = (preIcoQty - amount) | |
255 | 210 | if ((0 > amount)) | |
256 | 211 | then throw("El balance de retiro no puede ser negativo!") | |
257 | 212 | else if ((0 >= newAmount)) | |
258 | 213 | then throw("Ooppss.. Insuficiente balance!") | |
259 | 214 | else ScriptResult(WriteSet([DataEntry(item, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, xBitCO2)])) | |
260 | 215 | } | |
261 | 216 | ||
262 | 217 | ||
263 | 218 | @Verifier(tx) | |
264 | 219 | func verify () = match tx { | |
265 | 220 | case t: SetScriptTransaction => | |
266 | 221 | sigVerify(tx.bodyBytes, tx.proofs[0], OwnerPubKey) | |
267 | 222 | case d: DataTransaction|ReissueTransaction => | |
268 | 223 | true | |
269 | 224 | case tx: TransferTransaction => | |
270 | 225 | true | |
271 | 226 | case tx: ExchangeTransaction => | |
272 | 227 | let withWaves = if (!(isDefined(tx.sellOrder.assetPair.priceAsset))) | |
273 | 228 | then true | |
274 | 229 | else !(isDefined(tx.sellOrder.assetPair.amountAsset)) | |
275 | 230 | withWaves | |
276 | 231 | case _ => | |
277 | 232 | false | |
278 | 233 | } | |
279 | 234 |
github/deemru/w8io/026f985 52.58 ms ◑