tx · AQJYmaiJ8DFd9hD7gkyQK4b9oQXLVuefTCB9Bk7hYpRF 3N9DpWDvNPnq3wuuyh2cGk9hcKfoke9CCfL: -0.01000000 Waves 2021.10.31 20:21 [1770778] smart account 3N9DpWDvNPnq3wuuyh2cGk9hcKfoke9CCfL > SELF 0.00000000 Waves
{ "type": 13, "id": "AQJYmaiJ8DFd9hD7gkyQK4b9oQXLVuefTCB9Bk7hYpRF", "fee": 1000000, "feeAssetId": null, "timestamp": 1635700955914, "version": 2, "chainId": 84, "sender": "3N9DpWDvNPnq3wuuyh2cGk9hcKfoke9CCfL", "senderPublicKey": "A695BnQcmLqEPwcN5kdhv4bHipgdE4FnM5CBEMtA95Mo", "proofs": [ "5ZDzLzFW9GhQvHPNiKjaFpvq4ppvRrCTe2GScYyCSh3c4evH4PJswnaaLGDX1yb8WMwXVyse69u9z4LFiQ2Uv13x" ], "script": "base64:AAIDAAAAAAAAAAsIARIHCgUICAgBAQAAAC0AAAAAB3hCaXRDTzIBAAAAICAEZKaqA3sNb6aq+pclWLOWiXpTDP/vusZoh2yDVNyNAAAAAA1zdGFydFRvdGFsUXR5AAAAAAAABKodAAAAAAxGaXJzdEZhc2VRdHkAAAAAAAAAK7kAAAAADVNlY29uZEZhc2VRdHkAAAAAAAAEMEQAAAAAA3d2cwAAAAAABfXhAAAAAAAETk9ORQIAAAAEbm9uZQAAAAALdG90YWxBbW91bnQAAAAAAAKZwvcAAAAABWV1cm91AAAAAAAAAAB0AAAAAAV1c2RudwAAAAAAAAAJ6wAAAAAFYmNvMmUAAAAAAAAAAAoAAAAAC093bmVyUHViS2V5AQAAACCHCjavfZLifVnrQ+Ec26hgaELdz++KhfvmPcJbb2x8dgEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAADbnVtBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0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AAAnR4BQAAAAckbWF0Y2gwBAAAAAl3aXRoV2F2ZXMDCQEAAAABIQAAAAEJAQAAAAlpc0RlZmluZWQAAAABCAgIBQAAAAJ0eAAAAAlzZWxsT3JkZXIAAAAJYXNzZXRQYWlyAAAACnByaWNlQXNzZXQGCQEAAAABIQAAAAEJAQAAAAlpc0RlZmluZWQAAAABCAgIBQAAAAJ0eAAAAAlzZWxsT3JkZXIAAAAJYXNzZXRQYWlyAAAAC2Ftb3VudEFzc2V0BQAAAAl3aXRoV2F2ZXMHXPHzsA==", "height": 1770778, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7cQ13Mq2ZBvW8EaqEjpS14BXuvTs3h5nVKHgBg3mtxeP Next: GUPYM7N4YmjykHJ8Rg2NJi6uVgWqdW8SKVveGWkSF2N7 Diff:
Old | New | Differences | |
---|---|---|---|
167 | 167 | } | |
168 | 168 | let userAddress = toBase58String(i.caller.bytes) | |
169 | 169 | let desc1 = (1000 - userDiscount) | |
170 | - | let currentTokenPrice = (((((desc1 * bco2e) * eurou) * 1000000000000) / 1000) / usdnw) | |
171 | - | let totalAmount1 = (((orderQty * 10000) * currentTokenPrice) / 10000000) | |
170 | + | let dsctFract = fraction(((((1000 - userDiscount) * bco2e) * eurou) * 10000), wvs, 1000) | |
171 | + | let currentTokenPrice = fraction(dsctFract, 1, usdnw) | |
172 | + | let totalAmount1 = ((orderQty * currentTokenPrice) * pow(10, 0, 12, 0, 0, HALFUP)) | |
172 | 173 | if ((totalAmount > pmt.amount)) | |
173 | 174 | then throw("Payment Amount can't be less than item Purchase Order") | |
174 | 175 | else if ((pmt.amount > totalAmount)) |
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 | 5 | ||
6 | 6 | let startTotalQty = 305693 | |
7 | 7 | ||
8 | 8 | let FirstFaseQty = 11193 | |
9 | 9 | ||
10 | 10 | let SecondFaseQty = 274500 | |
11 | 11 | ||
12 | 12 | let wvs = 100000000 | |
13 | 13 | ||
14 | 14 | let NONE = "none" | |
15 | 15 | ||
16 | 16 | let totalAmount = 43631351 | |
17 | 17 | ||
18 | 18 | let eurou = 116 | |
19 | 19 | ||
20 | 20 | let usdnw = 2539 | |
21 | 21 | ||
22 | 22 | let bco2e = 10 | |
23 | 23 | ||
24 | 24 | let OwnerPubKey = base58'A695BnQcmLqEPwcN5kdhv4bHipgdE4FnM5CBEMtA95Mo' | |
25 | 25 | ||
26 | 26 | func getNumberByKey (key) = { | |
27 | 27 | let num = match getInteger(this, key) { | |
28 | 28 | case a: Int => | |
29 | 29 | a | |
30 | 30 | case _ => | |
31 | 31 | 0 | |
32 | 32 | } | |
33 | 33 | num | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func getStrByKey (key) = { | |
38 | 38 | let str = match getString(this, key) { | |
39 | 39 | case a: String => | |
40 | 40 | a | |
41 | 41 | case _ => | |
42 | 42 | NONE | |
43 | 43 | } | |
44 | 44 | str | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func getKeyProjectCategory (item) = "Categoría:" | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func getValueProjectCategory (item) = getStrByKey(getKeyProjectCategory(item)) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func getKeyItemSupplier (supplier) = (supplier + "Comunidad Achuar Kapawi del Ecuador") | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func getKeyProjectName (item) = "Nombre del Proyecto:" | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func getValueProjectName (item) = getStrByKey(getKeyProjectName(item)) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func getKeyProjectCountry (item) = "País | Ubicación:" | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func getValueProjectCountry (item) = getStrByKey(getKeyProjectCountry(item)) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func getKeyProjectCode (item) = "Código:" | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func getValueProjectCode (item) = getStrByKey(getKeyProjectCode(item)) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func getKeyProjectPropietary (item) = "Propietario | Beneficiario del Proyecto:" | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func getValueProjectPropietary (item) = getStrByKey(getKeyProjectPropietary(item)) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func getKeyProjectDev (supplier) = "Desarrollador | Responsable Legal:" | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func getValueProjectDev (supplier) = getStrByKey(getKeyProjectDev(supplier)) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func getKeyFirstFaseQty (item) = "Tokens ofertados para Usuarios|inversores en Fase I Pre-ICO:" | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func getValueFirstFaseQty (item) = getStrByKey(getKeyFirstFaseQty(item)) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func getKeyNomTokenPrice (item) = "Precio Nominal, 1 token Bit-CO2:" | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func getKeyDescuento6TokPrice (item) = "Precio de 1 token Bit-CO2 con descuento elejido:" | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func getValueDescuento6TokPrice (item) = getNumberByKey(getKeyDescuento6TokPrice(item)) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func getKeySaldoTokenQtyStartEtapa (item) = "Saldo de tokens en oferta con dcto máx. del 6%:" | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func getValueSaldoTokenQtyStartEtapa (item) = getNumberByKey(getKeySaldoTokenQtyStartEtapa(item)) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func getKeyUserItemCounter (user,item) = "Order_№:" | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func getValueUserItemCounter (user,item) = getNumberByKey(getKeyUserItemCounter(user, item)) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func getKeyUserDocument (item) = "Documento Nacional de Identidad, DNI del Usuario:" | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func getValueUserDocument (item) = getStrByKey(getKeyUserDocument(item)) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func getKeyUserCountry (item) = "País de Residencia del Usuario:" | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func getValueUserCountry (item) = getStrByKey(getKeyUserCountry(item)) | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func getKeyDiscount6User (item) = "Descuento a elección voluntaria, máximo 6%:" | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func getValueDiscount6User (item) = getNumberByKey(getKeyDiscount6User(item)) | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func getKeyItemUserOrderQty (item) = "Cantidad de tokens a adquirir:" | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func getValueItemUserOrderQty (item) = getNumberByKey(getKeyItemUserOrderQty(item)) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func getKeyBalanceSupplier (supplier) = "Ingresos por Venta Directa / BlockChain:" | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func getValueBalanceSupplier (supplier) = getNumberByKey(getKeyBalanceSupplier(supplier)) | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | @Callable(i) | |
145 | 145 | func purchase (item,userDocument,userCountry,userDiscount,orderQty) = { | |
146 | 146 | let pmt = extract(i.payment) | |
147 | 147 | if (isDefined(pmt.assetId)) | |
148 | 148 | then throw("Ud. puede adquirir tokens xBitCO2 usando WavesKeeper y su token de pago Waves.") | |
149 | 149 | else { | |
150 | 150 | let supplier = match getString(this, getKeyItemSupplier(item)) { | |
151 | 151 | case a: String => | |
152 | 152 | a | |
153 | 153 | case _ => | |
154 | 154 | NONE | |
155 | 155 | } | |
156 | 156 | let preIcoQty = match getInteger(this, getKeySaldoTokenQtyStartEtapa(item)) { | |
157 | 157 | case a: Int => | |
158 | 158 | a | |
159 | 159 | case _ => | |
160 | 160 | 0 | |
161 | 161 | } | |
162 | 162 | let balanceSupplier = match getInteger(this, getKeyBalanceSupplier(supplier)) { | |
163 | 163 | case a: Int => | |
164 | 164 | a | |
165 | 165 | case _ => | |
166 | 166 | 0 | |
167 | 167 | } | |
168 | 168 | let userAddress = toBase58String(i.caller.bytes) | |
169 | 169 | let desc1 = (1000 - userDiscount) | |
170 | - | let currentTokenPrice = (((((desc1 * bco2e) * eurou) * 1000000000000) / 1000) / usdnw) | |
171 | - | let totalAmount1 = (((orderQty * 10000) * currentTokenPrice) / 10000000) | |
170 | + | let dsctFract = fraction(((((1000 - userDiscount) * bco2e) * eurou) * 10000), wvs, 1000) | |
171 | + | let currentTokenPrice = fraction(dsctFract, 1, usdnw) | |
172 | + | let totalAmount1 = ((orderQty * currentTokenPrice) * pow(10, 0, 12, 0, 0, HALFUP)) | |
172 | 173 | if ((totalAmount > pmt.amount)) | |
173 | 174 | then throw("Payment Amount can't be less than item Purchase Order") | |
174 | 175 | else if ((pmt.amount > totalAmount)) | |
175 | 176 | then throw("Payment Amount can't be higher than item Purchase Order") | |
176 | 177 | else ScriptResult(WriteSet([DataEntry(getKeyProjectCategory(item), "Conservación Forestal"), DataEntry(getKeyProjectName(item), "Reserva Amazónica Achuar-Kapawi"), DataEntry(getKeyProjectCountry(item), "Ecuador"), DataEntry(getKeyProjectCode(item), "01-EC_ACH-KAPAWI_01PREICO"), DataEntry(getKeyProjectPropietary(item), "Comunidad Achuar Kapawi"), DataEntry(getKeyProjectDev(supplier), "Fundación Alianza Ecológica 'NASE'"), DataEntry(getKeyNomTokenPrice(item), "10.00 Euros"), DataEntry("Cantidad de Tokens Bit-CO2 a emitir en Fase I y II Pre-ICO", startTotalQty), DataEntry(getKeyFirstFaseQty(item), FirstFaseQty), DataEntry(getKeyDescuento6TokPrice(item), currentTokenPrice), DataEntry("Prueba currentTokenPrice", currentTokenPrice), DataEntry(getKeyUserItemCounter(userAddress, item), (getValueUserItemCounter(userAddress, item) + 1)), DataEntry(getKeyUserDocument(item), userDocument), DataEntry(getKeyUserCountry(item), userCountry), DataEntry(getKeyDiscount6User(item), userDiscount), DataEntry(getKeyItemUserOrderQty(item), orderQty), DataEntry("Suma invertida, wvs", totalAmount), DataEntry("Suma 2, wvs", totalAmount1), DataEntry("Estado de su pedido:", "¡Adquisición Confirmada!"), DataEntry(getKeySaldoTokenQtyStartEtapa(item), (getValueSaldoTokenQtyStartEtapa(item) + orderQty)), DataEntry("Saldo de Tokens", ((FirstFaseQty - getValueSaldoTokenQtyStartEtapa(item)) - orderQty)), DataEntry(getKeyBalanceSupplier(supplier), (getValueBalanceSupplier(supplier) + pmt.amount)), DataEntry("Dirección del proyecto en Waves-BlockChain:", "3N9DpWDvNPnq3wuuyh2cGk9hcKfoke9CCfL")]), TransferSet([ScriptTransfer(addressFromStringValue(userAddress), orderQty, xBitCO2)])) | |
177 | 178 | } | |
178 | 179 | } | |
179 | 180 | ||
180 | 181 | ||
181 | 182 | @Verifier(tx) | |
182 | 183 | func verify () = match tx { | |
183 | 184 | case t: SetScriptTransaction => | |
184 | 185 | sigVerify(tx.bodyBytes, tx.proofs[0], OwnerPubKey) | |
185 | 186 | case d: ReissueTransaction|DataTransaction => | |
186 | 187 | true | |
187 | 188 | case tx: TransferTransaction => | |
188 | 189 | true | |
189 | 190 | case tx: ExchangeTransaction => | |
190 | 191 | let withWaves = if (!(isDefined(tx.sellOrder.assetPair.priceAsset))) | |
191 | 192 | then true | |
192 | 193 | else !(isDefined(tx.sellOrder.assetPair.amountAsset)) | |
193 | 194 | withWaves | |
194 | 195 | case _ => | |
195 | 196 | false | |
196 | 197 | } | |
197 | 198 |
github/deemru/w8io/169f3d6 34.50 ms ◑