tx · BvHGxmEntyJqk2S3kAZZ6GnJDLaXoBe7QYQKhY6PMCkq 3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4: -0.01400000 Waves 2020.03.18 10:00 [914401] smart account 3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4 > SELF 0.00000000 Waves
{ "type": 13, "id": "BvHGxmEntyJqk2S3kAZZ6GnJDLaXoBe7QYQKhY6PMCkq", "fee": 1400000, "feeAssetId": null, "timestamp": 1584514606360, "version": 1, "sender": "3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4", "senderPublicKey": "4AHsCbS9QYVdKNvxrPWwsMwwy3KqXaCMXeAscExJZk9L", "proofs": [ "2CWA2qQqtwmBKpxNMaDGVGMzW5Wt9xLRxuphokSgeij5bMaKr2M8B6DsLheT2tbZ7DAjfq2qrM41SJYCrwvktj4e" ], "script": "base64:AAIDAAAAAAAAAB4IARIDCgEBEgYKBAgBAQgSBwoFCAgIAQESBAoCCAEAAAAdAAAAAAdhQml0Q08yAQAAACDH+HoAnTdQnyoybLskiHPdWM4Tg4veh8IaLSgbZ8EolgAAAAAIc3RhcnRRdHkAAAAAAAAFFAAAAAAACG5vbVByaWNlAAAAAAAAAAABAAAAABBzdXBwbGllckRpc2NvdW50AAAAAAAAAAAMAAAAAA5Pd25lckVjb1B1YktleQEAAAAgLvRbo0AJGg7wNzBbRHjrN75s0YuvS2DdwCQ0/xY2QB8AAAAAA3d2cwAAAAAABfXhAAAAAAAETk9ORQIAAAAEbm9uZQAAAAAGaXNzdWVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUyvc7Pucv0VXiD634RbMs3vuN0A1Fa31vAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAANudW0EAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAA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1eU9yZGVyAAAABnByb29mcwAAAAAAAAAAAAgIBQAAAAJ0eAAAAAhidXlPcmRlcgAAAA9zZW5kZXJQdWJsaWNLZXkEAAAAD3NlbGxPcmRlclNlbmRlcgkAAlgAAAABCAgIBQAAAAJ0eAAAAAlzZWxsT3JkZXIAAAAGc2VuZGVyAAAABWJ5dGVzBAAAAAltaW5BbW91bnQAAAAAAAAAAAEEAAAACW1heEFtb3VudAAAAAAAAAAABAQAAAAIbWF4UHJpY2UJAABoAAAAAgUAAAAJbWF4QW1vdW50BQAAAAhub21QcmljZQMDBQAAAANidXkDCQEAAAAJaXNEZWZpbmVkAAAAAQkAAGcAAAACBQAAAAhtYXhQcmljZQgIBQAAAAJ0eAAAAAhidXlPcmRlcgAAAAVwcmljZQYJAAACAAAAAQIAAAA6RWwgbW9udG8gYSBwYWdhciBubyBwdWVkZSBzZXIgbWVub3IgcXVlIGVsIHByZWNpbyBkZSB2ZW50YQcGAwUAAAAEc2VsbAMDAwkAAAAAAAACCAgFAAAAAnR4AAAACXNlbGxPcmRlcgAAAAZzZW5kZXIFAAAABmlzc3VlcgkAAGcAAAACCAUAAAACdHgAAAAGYW1vdW50BQAAAAltaW5BbW91bnQHCQAAZwAAAAIFAAAACW1heEFtb3VudAgFAAAAAnR4AAAABmFtb3VudAcGCQAAAgAAAAECAAAAU0Vycm9yOiBNaW5pbXVtIGFtb3VudDogMSBhQml0Q08yOyBNYXhpbXVtIGFtb3VudCBvZmZlcmVkOiA0IGFCaXRDTzIgYnkgVXNlciBBY2NvdW50BwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAXSW52b2tlU2NyaXB0VHJhbnNhY3Rpb24EAAAAAWMFAAAAByRtYXRjaDAGBxzYnqU=", "chainId": 84, "height": 914401, "spentComplexity": 0 } View: original | compacted Prev: 5kknR3Zvzxg6eoRVQQRxs6S1hcrXqRPLXzfeRhCyGVGH Next: CYwqft8NFsQKx2duRrPUMvWdsFpFwCSjpUs5myuPamb3 Diff:
Old | New | Differences | |
---|---|---|---|
5 | 5 | ||
6 | 6 | let startQty = 332800 | |
7 | 7 | ||
8 | - | let nomPrice = | |
8 | + | let nomPrice = 1 | |
9 | 9 | ||
10 | 10 | let supplierDiscount = 12 | |
11 | 11 | ||
122 | 122 | let item = getKeyItem(supplier, title) | |
123 | 123 | if ((0 >= preIcoQty)) | |
124 | 124 | then throw("Sorry, insufficient token offer") | |
125 | - | else WriteSet([DataEntry(("Ofertante:_" + getKeyItemSupplier(item)), supplier), DataEntry(getKeyBalanceQtySupplier(item), preIcoQty), DataEntry(("Precio_Nominal:" + getKeyItemPriceSupplier(item)), nomPrice), DataEntry(("Max_Descuento_ofrecido:" + getKeyItemDiscountSupplier(item)), supplierDiscount), DataEntry(getKeyItemData(item), supplierData)]) | |
125 | + | else WriteSet([DataEntry(("Ofertante:_" + getKeyItemSupplier(item)), supplier), DataEntry(getKeyBalanceQtySupplier(item), preIcoQty), DataEntry(("Precio_Nominal:" + getKeyItemPriceSupplier(item)), (nomPrice * wvs)), DataEntry(("Max_Descuento_ofrecido:" + getKeyItemDiscountSupplier(item)), supplierDiscount), DataEntry(getKeyItemData(item), supplierData)]) | |
126 | 126 | } | |
127 | 127 | ||
128 | 128 | ||
152 | 152 | 0 | |
153 | 153 | } | |
154 | 154 | let userAddress = toBase58String(i.caller.bytes) | |
155 | - | let buyerTokenPrice = (( | |
155 | + | let buyerTokenPrice = ((((100 - userDiscount) * nomPrice) * wvs) / 100) | |
156 | 156 | let totalAmount = (orderQty * buyerTokenPrice) | |
157 | 157 | if ((totalAmount > pmt.amount)) | |
158 | 158 | then throw("Payment Amount cannot be less than item Purchase Order") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let aBitCO2 = base58'ETbtNp6MBuSM9EfjmLDwctrYEBBiq8CZ7ti7zbwTktry' | |
5 | 5 | ||
6 | 6 | let startQty = 332800 | |
7 | 7 | ||
8 | - | let nomPrice = | |
8 | + | let nomPrice = 1 | |
9 | 9 | ||
10 | 10 | let supplierDiscount = 12 | |
11 | 11 | ||
12 | 12 | let OwnerEcoPubKey = base58'4AHsCbS9QYVdKNvxrPWwsMwwy3KqXaCMXeAscExJZk9L' | |
13 | 13 | ||
14 | 14 | let wvs = 100000000 | |
15 | 15 | ||
16 | 16 | let NONE = "none" | |
17 | 17 | ||
18 | 18 | let issuer = Address(base58'3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4') | |
19 | 19 | ||
20 | 20 | func getNumberByKey (key) = { | |
21 | 21 | let num = match getInteger(this, key) { | |
22 | 22 | case a: Int => | |
23 | 23 | a | |
24 | 24 | case _ => | |
25 | 25 | 0 | |
26 | 26 | } | |
27 | 27 | num | |
28 | 28 | } | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func getStrByKey (key) = { | |
32 | 32 | let str = match getString(this, key) { | |
33 | 33 | case a: String => | |
34 | 34 | a | |
35 | 35 | case _ => | |
36 | 36 | NONE | |
37 | 37 | } | |
38 | 38 | str | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func getKeyItem (supplier,title) = ("tokens_Bit-CO2:_" + toBase58String(sha256(toBytes((supplier + title))))) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func getKeyItemSupplier (item) = (item + "_to_Amazonian_Conservation") | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func getValueItemSupplier (item) = getStrByKey(getKeyItemSupplier(item)) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func getKeyBalanceQtySupplier (item) = "Tokens_ofertados,_Saldo" | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func getValueBalanceQtySupplier (item) = getNumberByKey(getKeyBalanceQtySupplier(item)) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func getKeyItemData (item) = (item + "_description") | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func getKeyUserItemCounter (user,item) = (((item + "_") + user) + "_cnt") | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func getValueUserItemCounter (user,item) = getNumberByKey(getKeyUserItemCounter(user, item)) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func getKeyItemUserData (item) = "_userdata" | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func getKeyItemUserOrderQty (item) = "_tokens" | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func getValueItemUserOrderQty (item) = getNumberByKey(getKeyItemUserOrderQty(item)) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func getKeyBalanceSupplier (supplier) = "Seller_Balance:_waves" | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func getValueBalanceSupplier (supplier) = getNumberByKey(getKeyBalanceSupplier(supplier)) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func getKeyItemUser (item) = "Project_name:" | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func getValueItemUser (item) = getStrByKey(getKeyItemUser(item)) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func getKeyItemDiscountSupplier (item) = "_%" | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func getValueItemDiscountSupplier (item) = getNumberByKey(getKeyItemDiscountSupplier(item)) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func getKeyItemPriceSupplier (item) = "_waves" | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func getValueItemPriceSupplier (item) = getNumberByKey(getKeyItemPriceSupplier(item)) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | @Callable(i) | |
100 | 100 | func deposit (amount) = { | |
101 | 101 | let pmt = extract(i.payment) | |
102 | 102 | if ((pmt.assetId != aBitCO2)) | |
103 | 103 | then throw("Use cBitCO2 tokens only for the wallet deposit") | |
104 | 104 | else { | |
105 | 105 | let supplier = toBase58String(i.caller.bytes) | |
106 | 106 | let currentAmount = match getInteger(this, supplier) { | |
107 | 107 | case a: Int => | |
108 | 108 | a | |
109 | 109 | case _ => | |
110 | 110 | startQty | |
111 | 111 | } | |
112 | 112 | let newAmount = (currentAmount + pmt.amount) | |
113 | 113 | WriteSet([DataEntry(supplier, newAmount)]) | |
114 | 114 | } | |
115 | 115 | } | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | ||
119 | 119 | @Callable(i) | |
120 | 120 | func AddSupplierToken (title,preIcoQty,supplierDiscount,supplierData) = { | |
121 | 121 | let supplier = toBase58String(i.caller.bytes) | |
122 | 122 | let item = getKeyItem(supplier, title) | |
123 | 123 | if ((0 >= preIcoQty)) | |
124 | 124 | then throw("Sorry, insufficient token offer") | |
125 | - | else WriteSet([DataEntry(("Ofertante:_" + getKeyItemSupplier(item)), supplier), DataEntry(getKeyBalanceQtySupplier(item), preIcoQty), DataEntry(("Precio_Nominal:" + getKeyItemPriceSupplier(item)), nomPrice), DataEntry(("Max_Descuento_ofrecido:" + getKeyItemDiscountSupplier(item)), supplierDiscount), DataEntry(getKeyItemData(item), supplierData)]) | |
125 | + | else WriteSet([DataEntry(("Ofertante:_" + getKeyItemSupplier(item)), supplier), DataEntry(getKeyBalanceQtySupplier(item), preIcoQty), DataEntry(("Precio_Nominal:" + getKeyItemPriceSupplier(item)), (nomPrice * wvs)), DataEntry(("Max_Descuento_ofrecido:" + getKeyItemDiscountSupplier(item)), supplierDiscount), DataEntry(getKeyItemData(item), supplierData)]) | |
126 | 126 | } | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | ||
130 | 130 | @Callable(i) | |
131 | 131 | func purchase (item,projectName,userData,userDiscount,orderQty) = { | |
132 | 132 | let pmt = extract(i.payment) | |
133 | 133 | if (isDefined(pmt.assetId)) | |
134 | 134 | then throw("you can adquire cBitCO2 only by Waves tokens") | |
135 | 135 | else { | |
136 | 136 | let supplier = match getString(this, getKeyItemSupplier(item)) { | |
137 | 137 | case a: String => | |
138 | 138 | a | |
139 | 139 | case _ => | |
140 | 140 | NONE | |
141 | 141 | } | |
142 | 142 | let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) { | |
143 | 143 | case a: Int => | |
144 | 144 | a | |
145 | 145 | case _ => | |
146 | 146 | startQty | |
147 | 147 | } | |
148 | 148 | let balanceSupplier = match getInteger(this, getKeyBalanceSupplier(supplier)) { | |
149 | 149 | case a: Int => | |
150 | 150 | a | |
151 | 151 | case _ => | |
152 | 152 | 0 | |
153 | 153 | } | |
154 | 154 | let userAddress = toBase58String(i.caller.bytes) | |
155 | - | let buyerTokenPrice = (( | |
155 | + | let buyerTokenPrice = ((((100 - userDiscount) * nomPrice) * wvs) / 100) | |
156 | 156 | let totalAmount = (orderQty * buyerTokenPrice) | |
157 | 157 | if ((totalAmount > pmt.amount)) | |
158 | 158 | then throw("Payment Amount cannot be less than item Purchase Order") | |
159 | 159 | else if ((pmt.amount > totalAmount)) | |
160 | 160 | then throw("Payment Amount can't be higher than item Purchase Order") | |
161 | 161 | else ScriptResult(WriteSet([DataEntry(getKeyUserItemCounter(userAddress, item), (getValueUserItemCounter(userAddress, item) + 1)), DataEntry(getKeyItemUser(item), projectName), DataEntry(getKeyBalanceQtySupplier(item), (preIcoQty - orderQty)), DataEntry(getKeyItemUserData(item), userData), DataEntry((("Descuento solicitado:_" + userAddress) + "_%"), userDiscount), DataEntry(("Cantidad_solicitada:" + getKeyItemUserOrderQty(item)), orderQty), DataEntry((("Precio_de_1_Token_con_dscto:_" + userAddress) + "_waves"), buyerTokenPrice), DataEntry(("Request_Status:_" + userAddress), "confirmed"), DataEntry(getKeyBalanceSupplier(supplier), (balanceSupplier + pmt.amount))]), TransferSet([ScriptTransfer(addressFromStringValue(userAddress), orderQty, aBitCO2)])) | |
162 | 162 | } | |
163 | 163 | } | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | ||
167 | 167 | @Callable(i) | |
168 | 168 | func withdraw (title,amount) = { | |
169 | 169 | let supplier = toBase58String(i.caller.bytes) | |
170 | 170 | let item = getKeyItem(supplier, title) | |
171 | 171 | let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) { | |
172 | 172 | case a: Int => | |
173 | 173 | a | |
174 | 174 | case _ => | |
175 | 175 | startQty | |
176 | 176 | } | |
177 | 177 | let newAmount = (preIcoQty - amount) | |
178 | 178 | if ((0 > amount)) | |
179 | 179 | then throw("Can't withdraw negative amount") | |
180 | 180 | else if ((0 > newAmount)) | |
181 | 181 | then throw("Not enought /suficiente balance") | |
182 | 182 | else ScriptResult(WriteSet([DataEntry(item, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, aBitCO2)])) | |
183 | 183 | } | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | @Verifier(tx) | |
187 | 187 | func verify () = match tx { | |
188 | 188 | case t: SetScriptTransaction => | |
189 | 189 | sigVerify(tx.bodyBytes, tx.proofs[0], OwnerEcoPubKey) | |
190 | 190 | case d: DataTransaction => | |
191 | 191 | true | |
192 | 192 | case tx: TransferTransaction => | |
193 | 193 | let recipient = toBase58String(addressFromRecipient(tx.recipient).bytes) | |
194 | 194 | if ((tx.sender == issuer)) | |
195 | 195 | then true | |
196 | 196 | else throw("You can't transferred this token") | |
197 | 197 | case tx: ExchangeTransaction => | |
198 | 198 | let withWaves = if (!(isDefined(tx.sellOrder.assetPair.priceAsset))) | |
199 | 199 | then true | |
200 | 200 | else !(isDefined(tx.sellOrder.assetPair.amountAsset)) | |
201 | 201 | withWaves | |
202 | 202 | case tx: ExchangeTransaction => | |
203 | 203 | let pk = tx.proofs[1] | |
204 | 204 | let address = addressFromPublicKey(pk) | |
205 | 205 | let fee = 1400000 | |
206 | 206 | let hasMoney = ((wavesBalance(address) - fee) >= tx.buyOrder.price) | |
207 | 207 | let sell = sigVerify(tx.sellOrder.bodyBytes, tx.sellOrder.proofs[0], tx.sellOrder.senderPublicKey) | |
208 | 208 | let buy = sigVerify(tx.buyOrder.bodyBytes, tx.buyOrder.proofs[0], tx.buyOrder.senderPublicKey) | |
209 | 209 | let sellOrderSender = toBase58String(tx.sellOrder.sender.bytes) | |
210 | 210 | let minAmount = 1 | |
211 | 211 | let maxAmount = 4 | |
212 | 212 | let maxPrice = (maxAmount * nomPrice) | |
213 | 213 | if (if (buy) | |
214 | 214 | then if (isDefined((maxPrice >= tx.buyOrder.price))) | |
215 | 215 | then true | |
216 | 216 | else throw("El monto a pagar no puede ser menor que el precio de venta") | |
217 | 217 | else false) | |
218 | 218 | then true | |
219 | 219 | else if (sell) | |
220 | 220 | then if (if (if ((tx.sellOrder.sender == issuer)) | |
221 | 221 | then (tx.amount >= minAmount) | |
222 | 222 | else false) | |
223 | 223 | then (maxAmount >= tx.amount) | |
224 | 224 | else false) | |
225 | 225 | then true | |
226 | 226 | else throw("Error: Minimum amount: 1 aBitCO2; Maximum amount offered: 4 aBitCO2 by User Account") | |
227 | 227 | else false | |
228 | 228 | case c: InvokeScriptTransaction => | |
229 | 229 | true | |
230 | 230 | case _ => | |
231 | 231 | false | |
232 | 232 | } | |
233 | 233 |
github/deemru/w8io/169f3d6 49.19 ms ◑