tx · 8UdMC93oQ3WpGUb3gPX9eQaEhnJJcJE3uonBYXN8wBte

3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4:  -0.01400000 Waves

2020.03.14 13:54 [908770] smart account 3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4 > SELF 0.00000000 Waves

{ "type": 13, "id": "8UdMC93oQ3WpGUb3gPX9eQaEhnJJcJE3uonBYXN8wBte", "fee": 1400000, "feeAssetId": null, "timestamp": 1584183225795, "version": 1, "sender": "3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4", "senderPublicKey": "4AHsCbS9QYVdKNvxrPWwsMwwy3KqXaCMXeAscExJZk9L", "proofs": [ "4XhkN5GpZeCZE31icvR14Y8APaugPBMy3qDZfuUgGYJsMntkvpTzPBx1CEoSsv86hh13xpy7sugbTnGZuTLEFZ3q" ], "script": "base64:AAIDAAAAAAAAABQIARIGCgQIAQEIEggKBgEICAgBAQAAAB0AAAAAB2FCaXRDTzIBAAAAIMf4egCdN1CfKjJsuySIc91YzhODi96HwhotKBtnwSiWAAAAAAhzdGFydFF0eQAAAAAAAAUUAAAAAAAIbm9tUHJpY2UAAAAAAAX14QAAAAAAEHN1cHBsaWVyRGlzY291bnQAAAAAAAAAAAwAAAAADk93bmVyRWNvUHViS2V5AQAAACAu9FujQAkaDvA3MFtEeOs3vmzRi69LYN3AJDT/FjZAHwAAAAADd3ZzAAAAAAAF9eEAAAAAAAROT05FAgAAAARub25lAAAAAAZpc3N1ZXIJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVTK9zs+5y/RVeIPrfhFsyze+43QDUVrfW8BAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAA251bQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAUAAAADbnVtAQAAAAtnZXRTdHJC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Y3JpcHRUcmFuc2FjdGlvbgQAAAABYwUAAAAHJG1hdGNoMAYH3R++jg==", "chainId": 84, "height": 908770, "spentComplexity": 0 } View: original | compacted Prev: AWsh9fP8tMrHgNCSKz2uyec8EXjdkNDKuTtSidBQtG6J Next: 5U58buC6U4sTf47Ch5VFwSEwFNRaFbVA4x237XbaHTwN Diff:
OldNewDifferences
114114
115115
116116 @Callable(M)
117-func PurchaseToken (t,P,Q,R,S) = {
118- let T = extract(M.payment)
119- if (isDefined(T.assetId))
117+func purchase (P,t,Q,R,S,T) = {
118+ let U = extract(M.payment)
119+ if (isDefined(U.assetId))
120120 then throw("you can adquire cBitCO2 only by Waves tokens")
121121 else {
122122 let q = {
137137 }
138138 else b
139139 }
140- let U = {
140+ let V = {
141141 let l = getInteger(this, E(q))
142142 if ($isInstanceOf(l, "Int"))
143143 then {
146146 }
147147 else 0
148148 }
149- let V = toBase58String(M.caller.bytes)
150- let W = ((c * (100 - S)) / 100)
151- let X = (R * W)
152- if ((X > T.amount))
149+ let W = toBase58String(M.caller.bytes)
150+ let X = ((c * (100 - T)) / 100)
151+ let Y = (S * X)
152+ if ((Y > U.amount))
153153 then throw("Payment Amount cannot be less than item Purchase Order")
154- else if ((T.amount > X))
154+ else if ((U.amount > Y))
155155 then throw("Payment Amount can't be higher than item Purchase Order")
156- else ScriptResult(WriteSet([DataEntry(y(V, t), (A(V, t) + 1)), DataEntry(G(t), P), DataEntry(B(t), Q), DataEntry(("Cantidad_solicitada:" + C(t)), R), DataEntry(("Request_Status:_" + V), "confirmed"), DataEntry(v(t), (N - R)), DataEntry(E(q), (U + T.amount))]), TransferSet([ScriptTransfer(addressFromStringValue(V), R, a)]))
156+ else ScriptResult(WriteSet([DataEntry(y(W, t), (A(W, t) + 1)), DataEntry(G(t), Q), DataEntry(B(t), R), DataEntry(("Cantidad_solicitada:" + C(t)), S), DataEntry(("Request_Status:_" + W), "confirmed"), DataEntry(v(t), (N - S)), DataEntry(E(q), (V + U.amount))]), TransferSet([ScriptTransfer(addressFromStringValue(W), S, a)]))
157157 }
158158 }
159159
160160
161-@Verifier(Y)
162-func Z () = {
163- let l = Y
161+@Verifier(Z)
162+func aa () = {
163+ let l = Z
164164 if ($isInstanceOf(l, "SetScriptTransaction"))
165165 then {
166- let aa = l
167- sigVerify(Y.bodyBytes, Y.proofs[0], e)
166+ let ab = l
167+ sigVerify(Z.bodyBytes, Z.proofs[0], e)
168168 }
169169 else if ($isInstanceOf(l, "DataTransaction"))
170170 then {
171- let ab = l
171+ let ac = l
172172 true
173173 }
174174 else if ($isInstanceOf(l, "TransferTransaction"))
175175 then {
176- let Y = l
177- let ac = toBase58String(addressFromRecipient(Y.recipient).bytes)
178- if ((Y.sender == h))
176+ let Z = l
177+ let ad = toBase58String(addressFromRecipient(Z.recipient).bytes)
178+ if ((Z.sender == h))
179179 then true
180180 else throw("You can't transferred this token")
181181 }
182182 else if ($isInstanceOf(l, "ExchangeTransaction"))
183183 then {
184- let Y = l
185- let ad = if (!(isDefined(Y.sellOrder.assetPair.priceAsset)))
184+ let Z = l
185+ let ae = if (!(isDefined(Z.sellOrder.assetPair.priceAsset)))
186186 then true
187- else !(isDefined(Y.sellOrder.assetPair.amountAsset))
188- ad
187+ else !(isDefined(Z.sellOrder.assetPair.amountAsset))
188+ ae
189189 }
190190 else if ($isInstanceOf(l, "ExchangeTransaction"))
191191 then {
192- let Y = l
193- let ae = Y.proofs[1]
194- let af = addressFromPublicKey(ae)
195- let ag = 1400000
196- let ah = ((wavesBalance(af) - ag) >= Y.buyOrder.price)
197- let ai = sigVerify(Y.sellOrder.bodyBytes, Y.sellOrder.proofs[0], Y.sellOrder.senderPublicKey)
198- let aj = sigVerify(Y.buyOrder.bodyBytes, Y.buyOrder.proofs[0], Y.buyOrder.senderPublicKey)
199- let ak = toBase58String(Y.sellOrder.sender.bytes)
200- let al = 1
201- let am = 4
202- let an = (am * c)
203- if (if (aj)
204- then if (isDefined((an >= Y.buyOrder.price)))
192+ let Z = l
193+ let af = Z.proofs[1]
194+ let ag = addressFromPublicKey(af)
195+ let ah = 1400000
196+ let ai = ((wavesBalance(ag) - ah) >= Z.buyOrder.price)
197+ let aj = sigVerify(Z.sellOrder.bodyBytes, Z.sellOrder.proofs[0], Z.sellOrder.senderPublicKey)
198+ let ak = sigVerify(Z.buyOrder.bodyBytes, Z.buyOrder.proofs[0], Z.buyOrder.senderPublicKey)
199+ let al = toBase58String(Z.sellOrder.sender.bytes)
200+ let am = 1
201+ let an = 4
202+ let ao = (an * c)
203+ if (if (ak)
204+ then if (isDefined((ao >= Z.buyOrder.price)))
205205 then true
206206 else throw("El monto a pagar no puede ser menor que el precio de venta")
207207 else false)
208208 then true
209- else if (ai)
210- then if (if (if ((Y.sellOrder.sender == h))
211- then (Y.amount >= al)
209+ else if (aj)
210+ then if (if (if ((Z.sellOrder.sender == h))
211+ then (Z.amount >= am)
212212 else false)
213- then (am >= Y.amount)
213+ then (an >= Z.amount)
214214 else false)
215215 then true
216216 else throw("Error: Minimum amount: 1 aBitCO2; Maximum amount offered: 4 aBitCO2 by User Account")
218218 }
219219 else if ($isInstanceOf(l, "InvokeScriptTransaction"))
220220 then {
221- let ao = l
221+ let ap = l
222222 true
223223 }
224224 else false
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'ETbtNp6MBuSM9EfjmLDwctrYEBBiq8CZ7ti7zbwTktry'
55
66 let b = 332800
77
88 let c = 100000000
99
1010 let d = 12
1111
1212 let e = base58'4AHsCbS9QYVdKNvxrPWwsMwwy3KqXaCMXeAscExJZk9L'
1313
1414 let f = 100000000
1515
1616 let g = "none"
1717
1818 let h = Address(base58'3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4')
1919
2020 func i (j) = {
2121 let k = {
2222 let l = getInteger(this, j)
2323 if ($isInstanceOf(l, "Int"))
2424 then {
2525 let m = l
2626 m
2727 }
2828 else 0
2929 }
3030 k
3131 }
3232
3333
3434 func n (j) = {
3535 let o = {
3636 let l = getString(this, j)
3737 if ($isInstanceOf(l, "String"))
3838 then {
3939 let m = l
4040 m
4141 }
4242 else g
4343 }
4444 o
4545 }
4646
4747
4848 func p (q,r) = ("tokens_Bit-CO2:_" + toBase58String(sha256(toBytes((q + r)))))
4949
5050
5151 func s (t) = (t + "_to_Amazonian_Conservation")
5252
5353
5454 func u (t) = n(s(t))
5555
5656
5757 func v (t) = "Tokens_ofertados,_Saldo"
5858
5959
6060 func w (t) = i(v(t))
6161
6262
6363 func x (t) = (t + "_description")
6464
6565
6666 func y (z,t) = (((t + "_") + z) + "_cnt")
6767
6868
6969 func A (z,t) = i(y(z, t))
7070
7171
7272 func B (t) = "_userdata"
7373
7474
7575 func C (t) = "_tokens"
7676
7777
7878 func D (t) = i(C(t))
7979
8080
8181 func E (q) = "Seller_Balance:_waves"
8282
8383
8484 func F (q) = i(E(q))
8585
8686
8787 func G (t) = "Project_name:"
8888
8989
9090 func H (t) = n(G(t))
9191
9292
9393 func I (t) = "_%"
9494
9595
9696 func J (t) = i(I(t))
9797
9898
9999 func K (t) = "_waves"
100100
101101
102102 func L (t) = i(K(t))
103103
104104
105105 @Callable(M)
106106 func AddSupplierToken (r,N,d,O) = {
107107 let q = toBase58String(M.caller.bytes)
108108 let t = p(q, r)
109109 if ((0 >= N))
110110 then throw("Sorry, insufficient token offer")
111111 else WriteSet([DataEntry(("Ofertante:_" + s(t)), q), DataEntry(v(t), N), DataEntry(("Precio_Nominal:" + K(t)), c), DataEntry(("Max_Descuento_ofrecido:" + I(t)), d), DataEntry(x(t), O)])
112112 }
113113
114114
115115
116116 @Callable(M)
117-func PurchaseToken (t,P,Q,R,S) = {
118- let T = extract(M.payment)
119- if (isDefined(T.assetId))
117+func purchase (P,t,Q,R,S,T) = {
118+ let U = extract(M.payment)
119+ if (isDefined(U.assetId))
120120 then throw("you can adquire cBitCO2 only by Waves tokens")
121121 else {
122122 let q = {
123123 let l = getString(this, s(t))
124124 if ($isInstanceOf(l, "String"))
125125 then {
126126 let m = l
127127 m
128128 }
129129 else g
130130 }
131131 let N = {
132132 let l = getInteger(this, v(t))
133133 if ($isInstanceOf(l, "Int"))
134134 then {
135135 let m = l
136136 m
137137 }
138138 else b
139139 }
140- let U = {
140+ let V = {
141141 let l = getInteger(this, E(q))
142142 if ($isInstanceOf(l, "Int"))
143143 then {
144144 let m = l
145145 m
146146 }
147147 else 0
148148 }
149- let V = toBase58String(M.caller.bytes)
150- let W = ((c * (100 - S)) / 100)
151- let X = (R * W)
152- if ((X > T.amount))
149+ let W = toBase58String(M.caller.bytes)
150+ let X = ((c * (100 - T)) / 100)
151+ let Y = (S * X)
152+ if ((Y > U.amount))
153153 then throw("Payment Amount cannot be less than item Purchase Order")
154- else if ((T.amount > X))
154+ else if ((U.amount > Y))
155155 then throw("Payment Amount can't be higher than item Purchase Order")
156- else ScriptResult(WriteSet([DataEntry(y(V, t), (A(V, t) + 1)), DataEntry(G(t), P), DataEntry(B(t), Q), DataEntry(("Cantidad_solicitada:" + C(t)), R), DataEntry(("Request_Status:_" + V), "confirmed"), DataEntry(v(t), (N - R)), DataEntry(E(q), (U + T.amount))]), TransferSet([ScriptTransfer(addressFromStringValue(V), R, a)]))
156+ else ScriptResult(WriteSet([DataEntry(y(W, t), (A(W, t) + 1)), DataEntry(G(t), Q), DataEntry(B(t), R), DataEntry(("Cantidad_solicitada:" + C(t)), S), DataEntry(("Request_Status:_" + W), "confirmed"), DataEntry(v(t), (N - S)), DataEntry(E(q), (V + U.amount))]), TransferSet([ScriptTransfer(addressFromStringValue(W), S, a)]))
157157 }
158158 }
159159
160160
161-@Verifier(Y)
162-func Z () = {
163- let l = Y
161+@Verifier(Z)
162+func aa () = {
163+ let l = Z
164164 if ($isInstanceOf(l, "SetScriptTransaction"))
165165 then {
166- let aa = l
167- sigVerify(Y.bodyBytes, Y.proofs[0], e)
166+ let ab = l
167+ sigVerify(Z.bodyBytes, Z.proofs[0], e)
168168 }
169169 else if ($isInstanceOf(l, "DataTransaction"))
170170 then {
171- let ab = l
171+ let ac = l
172172 true
173173 }
174174 else if ($isInstanceOf(l, "TransferTransaction"))
175175 then {
176- let Y = l
177- let ac = toBase58String(addressFromRecipient(Y.recipient).bytes)
178- if ((Y.sender == h))
176+ let Z = l
177+ let ad = toBase58String(addressFromRecipient(Z.recipient).bytes)
178+ if ((Z.sender == h))
179179 then true
180180 else throw("You can't transferred this token")
181181 }
182182 else if ($isInstanceOf(l, "ExchangeTransaction"))
183183 then {
184- let Y = l
185- let ad = if (!(isDefined(Y.sellOrder.assetPair.priceAsset)))
184+ let Z = l
185+ let ae = if (!(isDefined(Z.sellOrder.assetPair.priceAsset)))
186186 then true
187- else !(isDefined(Y.sellOrder.assetPair.amountAsset))
188- ad
187+ else !(isDefined(Z.sellOrder.assetPair.amountAsset))
188+ ae
189189 }
190190 else if ($isInstanceOf(l, "ExchangeTransaction"))
191191 then {
192- let Y = l
193- let ae = Y.proofs[1]
194- let af = addressFromPublicKey(ae)
195- let ag = 1400000
196- let ah = ((wavesBalance(af) - ag) >= Y.buyOrder.price)
197- let ai = sigVerify(Y.sellOrder.bodyBytes, Y.sellOrder.proofs[0], Y.sellOrder.senderPublicKey)
198- let aj = sigVerify(Y.buyOrder.bodyBytes, Y.buyOrder.proofs[0], Y.buyOrder.senderPublicKey)
199- let ak = toBase58String(Y.sellOrder.sender.bytes)
200- let al = 1
201- let am = 4
202- let an = (am * c)
203- if (if (aj)
204- then if (isDefined((an >= Y.buyOrder.price)))
192+ let Z = l
193+ let af = Z.proofs[1]
194+ let ag = addressFromPublicKey(af)
195+ let ah = 1400000
196+ let ai = ((wavesBalance(ag) - ah) >= Z.buyOrder.price)
197+ let aj = sigVerify(Z.sellOrder.bodyBytes, Z.sellOrder.proofs[0], Z.sellOrder.senderPublicKey)
198+ let ak = sigVerify(Z.buyOrder.bodyBytes, Z.buyOrder.proofs[0], Z.buyOrder.senderPublicKey)
199+ let al = toBase58String(Z.sellOrder.sender.bytes)
200+ let am = 1
201+ let an = 4
202+ let ao = (an * c)
203+ if (if (ak)
204+ then if (isDefined((ao >= Z.buyOrder.price)))
205205 then true
206206 else throw("El monto a pagar no puede ser menor que el precio de venta")
207207 else false)
208208 then true
209- else if (ai)
210- then if (if (if ((Y.sellOrder.sender == h))
211- then (Y.amount >= al)
209+ else if (aj)
210+ then if (if (if ((Z.sellOrder.sender == h))
211+ then (Z.amount >= am)
212212 else false)
213- then (am >= Y.amount)
213+ then (an >= Z.amount)
214214 else false)
215215 then true
216216 else throw("Error: Minimum amount: 1 aBitCO2; Maximum amount offered: 4 aBitCO2 by User Account")
217217 else false
218218 }
219219 else if ($isInstanceOf(l, "InvokeScriptTransaction"))
220220 then {
221- let ao = l
221+ let ap = l
222222 true
223223 }
224224 else false
225225 }
226226

github/deemru/w8io/873ac7e 
103.04 ms