tx · 4pTDfY2jzXY2yKp7BKqJ2DK7tu5BY3ytm8HkW2M5PUPg 3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4: -0.01400000 Waves 2020.03.31 22:05 [934035] smart account 3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4 > SELF 0.00000000 Waves
{ "type": 13, "id": "4pTDfY2jzXY2yKp7BKqJ2DK7tu5BY3ytm8HkW2M5PUPg", "fee": 1400000, "feeAssetId": null, "timestamp": 1585677926148, "version": 1, "sender": "3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4", "senderPublicKey": "4AHsCbS9QYVdKNvxrPWwsMwwy3KqXaCMXeAscExJZk9L", "proofs": [ "25W3ry1Rq9eLqxocNxivFiKds9xtrYESYbnoRG7emRvgttULqhrJwRPVs7vkRoXsF3e8NvEV1zQQLhFVAXzy4Gu5" ], "script": "base64:AAIDAAAAAAAAACAIARIDCgEBEggKBggICAEBCBIHCgUICAgBARIECgIIAQAAAB8AAAAAB2FCaXRDTzIBAAAAIMf4egCdN1CfKjJsuySIc91YzhODi96HwhotKBtnwSiWAAAAAAhzdGFydFF0eQAAAAAAAAUUAAAAAAAIbm9tUHJpY2UAAAAAAAAAAAEAAAAAEHN1cHBsaWVyRGlzY291bnQAAAAAAAAAAAwAAAAADk93bmVyRWNvUHViS2V5AQAAACAu9FujQAkaDvA3MFtEeOs3vmzRi69LYN3AJDT/FjZAHwAAAAADd3ZzAAAAAAAF9eEAAAAAAAROT05FAgAAAARub25lAAAAAAZpc3N1ZXIJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVTK9zs+5y/RVeIPrfhFsyze+43QDUVrfW8BAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAA251bQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAUAAAADb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AAAAAIICAUAAAACdHgAAAAJc2VsbE9yZGVyAAAABnNlbmRlcgUAAAAGaXNzdWVyCQAAZwAAAAIIBQAAAAJ0eAAAAAZhbW91bnQFAAAACW1pbkFtb3VudAcJAABnAAAAAgUAAAAJbWF4QW1vdW50CAUAAAACdHgAAAAGYW1vdW50BwYJAAACAAAAAQIAAABTRXJyb3I6IE1pbmltdW0gYW1vdW50OiAxIGFCaXRDTzI7IE1heGltdW0gYW1vdW50IG9mZmVyZWQ6IDQgYUJpdENPMiBieSBVc2VyIEFjY291bnQHAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdJbnZva2VTY3JpcHRUcmFuc2FjdGlvbgQAAAABYwUAAAAHJG1hdGNoMAYHA4u2bg==", "chainId": 84, "height": 934035, "spentComplexity": 0 } View: original | compacted Prev: 4EpBivtxnDB9mi44ojHrDjavnF3kDMerPdg3dn4oEe4X Next: 9LxUFMnHUJ635c4PUGN5Uu7idQtxg7XWa7zUhTU44GPS Diff:
Old | New | Differences | |
---|---|---|---|
134 | 134 | ||
135 | 135 | ||
136 | 136 | @Callable(i) | |
137 | - | func purchase (item, | |
137 | + | func purchase (item,userName,userCountry,userDiscount,orderQty) = { | |
138 | 138 | let pmt = extract(i.payment) | |
139 | 139 | if (isDefined(pmt.assetId)) | |
140 | 140 | then throw("you can adquire cBitCO2 only by Waves tokens") | |
164 | 164 | then throw("Payment Amount cannot be less than item Purchase Order") | |
165 | 165 | else if ((pmt.amount > totalAmount)) | |
166 | 166 | then throw("Payment Amount can't be higher than item Purchase Order") | |
167 | - | else ScriptResult(WriteSet([DataEntry(getKeyUserItemCounter(userAddress, item), (getValueUserItemCounter(userAddress, item) + 1)), DataEntry(getKeyBalanceQtySupplier(item), (preIcoQty - orderQty)), DataEntry(getKeyItemUser(item), | |
167 | + | else ScriptResult(WriteSet([DataEntry(getKeyUserItemCounter(userAddress, item), (getValueUserItemCounter(userAddress, item) + 1)), DataEntry(getKeyBalanceQtySupplier(item), (preIcoQty - orderQty)), DataEntry(getKeyItemUser(item), userName), DataEntry(getKeyItemUserData(item), userCountry), DataEntry(getKeyItemDiscountUser(item), userDiscount), DataEntry(getKeyItemUserOrderQty(item), orderQty), DataEntry(("UserPrice_1_token,_waves:_" + userAddress), buyerTokenPrice), DataEntry(("Payment_amount,_waves:_" + userAddress), totalAmount), DataEntry(("Order_Status:_" + userAddress), "confirmed"), DataEntry(getKeyBalanceSupplier(supplier), (balanceSupplier + pmt.amount))]), TransferSet([ScriptTransfer(addressFromStringValue(userAddress), orderQty, aBitCO2)])) | |
168 | 168 | } | |
169 | 169 | } | |
170 | 170 |
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 | 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) = ("Bit-CO2_token: " + 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 getKeyItemData (item) = "description: " | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func getKeyItemDiscountSupplier (item) = "Offered_SupplierDiscount,_max_%" | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func getValueItemDiscountSupplier (item) = getNumberByKey(getKeyItemDiscountSupplier(item)) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func getKeyBalanceQtySupplier (item) = "Offered_Qty, balance:" | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func getValueBalanceQtySupplier (item) = getNumberByKey(getKeyBalanceQtySupplier(item)) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func getKeyBalanceSupplier (supplier) = "Seller_Balance:_waves" | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func getValueBalanceSupplier (supplier) = getNumberByKey(getKeyBalanceSupplier(supplier)) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func getKeyUserItemCounter (user,item) = "Order_№:" | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func getValueUserItemCounter (user,item) = getNumberByKey(getKeyUserItemCounter(user, item)) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func getKeyItemUser (item) = "UserName:" | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func getValueItemUser (item) = getStrByKey(getKeyItemUser(item)) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func getKeyItemUserData (item) = "UserCountry:" | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func getKeyItemDiscountUser (item) = "UserDiscount,_%:" | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func getValueItemDiscountUser (item) = getNumberByKey(getKeyItemDiscountUser(item)) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func getKeyItemUserOrderQty (item) = "Order_qty,_tokens:" | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func getValueItemUserOrderQty (item) = getNumberByKey(getKeyItemUserOrderQty(item)) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func getKeyItemPriceSupplier (item) = "_waves" | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func getValueItemPriceSupplier (item) = getNumberByKey(getKeyItemPriceSupplier(item)) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | @Callable(i) | |
106 | 106 | func deposit (amount) = { | |
107 | 107 | let pmt = extract(i.payment) | |
108 | 108 | if ((pmt.assetId != aBitCO2)) | |
109 | 109 | then throw("Use cBitCO2 tokens only for the wallet deposit") | |
110 | 110 | else { | |
111 | 111 | let supplier = toBase58String(i.caller.bytes) | |
112 | 112 | let currentAmount = match getInteger(this, supplier) { | |
113 | 113 | case a: Int => | |
114 | 114 | a | |
115 | 115 | case _ => | |
116 | 116 | startQty | |
117 | 117 | } | |
118 | 118 | let newAmount = (currentAmount + pmt.amount) | |
119 | 119 | WriteSet([DataEntry(supplier, newAmount)]) | |
120 | 120 | } | |
121 | 121 | } | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | ||
125 | 125 | @Callable(i) | |
126 | 126 | func AddSupplierToken (title,name,country,preIcoQty,supplierDiscount,supplierData) = { | |
127 | 127 | let supplier = toBase58String(i.caller.bytes) | |
128 | 128 | let item = getKeyItem(supplier, title) | |
129 | 129 | if ((0 >= preIcoQty)) | |
130 | 130 | then throw("Sorry, insufficient token offer") | |
131 | 131 | else WriteSet([DataEntry(("Supplier:_" + getKeyItemSupplier(item)), supplier), DataEntry(("Title:_" + supplier), title), DataEntry(("ProjectName:_" + supplier), name), DataEntry(("Country:_" + supplier), country), DataEntry(getKeyBalanceQtySupplier(item), preIcoQty), DataEntry(("NomTokenPrice:_" + getKeyItemPriceSupplier(item)), (nomPrice * wvs)), DataEntry(("Max_Descuento_ofrecido:" + getKeyItemDiscountSupplier(item)), supplierDiscount), DataEntry(("Development:_" + getKeyItemData(item)), supplierData)]) | |
132 | 132 | } | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | ||
136 | 136 | @Callable(i) | |
137 | - | func purchase (item, | |
137 | + | func purchase (item,userName,userCountry,userDiscount,orderQty) = { | |
138 | 138 | let pmt = extract(i.payment) | |
139 | 139 | if (isDefined(pmt.assetId)) | |
140 | 140 | then throw("you can adquire cBitCO2 only by Waves tokens") | |
141 | 141 | else { | |
142 | 142 | let supplier = match getString(this, getKeyItemSupplier(item)) { | |
143 | 143 | case a: String => | |
144 | 144 | a | |
145 | 145 | case _ => | |
146 | 146 | NONE | |
147 | 147 | } | |
148 | 148 | let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) { | |
149 | 149 | case a: Int => | |
150 | 150 | a | |
151 | 151 | case _ => | |
152 | 152 | startQty | |
153 | 153 | } | |
154 | 154 | let balanceSupplier = match getInteger(this, getKeyBalanceSupplier(supplier)) { | |
155 | 155 | case a: Int => | |
156 | 156 | a | |
157 | 157 | case _ => | |
158 | 158 | 0 | |
159 | 159 | } | |
160 | 160 | let userAddress = toBase58String(i.caller.bytes) | |
161 | 161 | let buyerTokenPrice = ((((100 - userDiscount) * nomPrice) * wvs) / 100) | |
162 | 162 | let totalAmount = (orderQty * buyerTokenPrice) | |
163 | 163 | if ((totalAmount > pmt.amount)) | |
164 | 164 | then throw("Payment Amount cannot be less than item Purchase Order") | |
165 | 165 | else if ((pmt.amount > totalAmount)) | |
166 | 166 | then throw("Payment Amount can't be higher than item Purchase Order") | |
167 | - | else ScriptResult(WriteSet([DataEntry(getKeyUserItemCounter(userAddress, item), (getValueUserItemCounter(userAddress, item) + 1)), DataEntry(getKeyBalanceQtySupplier(item), (preIcoQty - orderQty)), DataEntry(getKeyItemUser(item), | |
167 | + | else ScriptResult(WriteSet([DataEntry(getKeyUserItemCounter(userAddress, item), (getValueUserItemCounter(userAddress, item) + 1)), DataEntry(getKeyBalanceQtySupplier(item), (preIcoQty - orderQty)), DataEntry(getKeyItemUser(item), userName), DataEntry(getKeyItemUserData(item), userCountry), DataEntry(getKeyItemDiscountUser(item), userDiscount), DataEntry(getKeyItemUserOrderQty(item), orderQty), DataEntry(("UserPrice_1_token,_waves:_" + userAddress), buyerTokenPrice), DataEntry(("Payment_amount,_waves:_" + userAddress), totalAmount), DataEntry(("Order_Status:_" + userAddress), "confirmed"), DataEntry(getKeyBalanceSupplier(supplier), (balanceSupplier + pmt.amount))]), TransferSet([ScriptTransfer(addressFromStringValue(userAddress), orderQty, aBitCO2)])) | |
168 | 168 | } | |
169 | 169 | } | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | ||
173 | 173 | @Callable(i) | |
174 | 174 | func withdraw (title,amount) = { | |
175 | 175 | let supplier = toBase58String(i.caller.bytes) | |
176 | 176 | let item = getKeyItem(supplier, title) | |
177 | 177 | let preIcoQty = match getInteger(this, getKeyBalanceQtySupplier(item)) { | |
178 | 178 | case a: Int => | |
179 | 179 | a | |
180 | 180 | case _ => | |
181 | 181 | startQty | |
182 | 182 | } | |
183 | 183 | let newAmount = (preIcoQty - amount) | |
184 | 184 | if ((0 > amount)) | |
185 | 185 | then throw("Can't withdraw negative amount") | |
186 | 186 | else if ((0 > newAmount)) | |
187 | 187 | then throw("Not enought /suficiente balance") | |
188 | 188 | else ScriptResult(WriteSet([DataEntry(item, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, aBitCO2)])) | |
189 | 189 | } | |
190 | 190 | ||
191 | 191 | ||
192 | 192 | @Verifier(tx) | |
193 | 193 | func verify () = match tx { | |
194 | 194 | case t: SetScriptTransaction => | |
195 | 195 | sigVerify(tx.bodyBytes, tx.proofs[0], OwnerEcoPubKey) | |
196 | 196 | case d: DataTransaction => | |
197 | 197 | true | |
198 | 198 | case tx: TransferTransaction => | |
199 | 199 | let recipient = toBase58String(addressFromRecipient(tx.recipient).bytes) | |
200 | 200 | if ((tx.sender == issuer)) | |
201 | 201 | then true | |
202 | 202 | else throw("You can't transferred this token") | |
203 | 203 | case tx: ExchangeTransaction => | |
204 | 204 | let withWaves = if (!(isDefined(tx.sellOrder.assetPair.priceAsset))) | |
205 | 205 | then true | |
206 | 206 | else !(isDefined(tx.sellOrder.assetPair.amountAsset)) | |
207 | 207 | withWaves | |
208 | 208 | case tx: ExchangeTransaction => | |
209 | 209 | let pk = tx.proofs[1] | |
210 | 210 | let address = addressFromPublicKey(pk) | |
211 | 211 | let fee = 1400000 | |
212 | 212 | let hasMoney = ((wavesBalance(address) - fee) >= tx.buyOrder.price) | |
213 | 213 | let sell = sigVerify(tx.sellOrder.bodyBytes, tx.sellOrder.proofs[0], tx.sellOrder.senderPublicKey) | |
214 | 214 | let buy = sigVerify(tx.buyOrder.bodyBytes, tx.buyOrder.proofs[0], tx.buyOrder.senderPublicKey) | |
215 | 215 | let sellOrderSender = toBase58String(tx.sellOrder.sender.bytes) | |
216 | 216 | let minAmount = 1 | |
217 | 217 | let maxAmount = 4 | |
218 | 218 | let maxPrice = (maxAmount * nomPrice) | |
219 | 219 | if (if (buy) | |
220 | 220 | then if (isDefined((maxPrice >= tx.buyOrder.price))) | |
221 | 221 | then true | |
222 | 222 | else throw("El monto a pagar no puede ser menor que el precio de venta") | |
223 | 223 | else false) | |
224 | 224 | then true | |
225 | 225 | else if (sell) | |
226 | 226 | then if (if (if ((tx.sellOrder.sender == issuer)) | |
227 | 227 | then (tx.amount >= minAmount) | |
228 | 228 | else false) | |
229 | 229 | then (maxAmount >= tx.amount) | |
230 | 230 | else false) | |
231 | 231 | then true | |
232 | 232 | else throw("Error: Minimum amount: 1 aBitCO2; Maximum amount offered: 4 aBitCO2 by User Account") | |
233 | 233 | else false | |
234 | 234 | case c: InvokeScriptTransaction => | |
235 | 235 | true | |
236 | 236 | case _ => | |
237 | 237 | false | |
238 | 238 | } | |
239 | 239 |
github/deemru/w8io/169f3d6 54.76 ms ◑