tx · 52XBai7eLEAek4cwq7M4q79WGNcm2tDGsaVujEJj9M64

3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4:  -0.01400000 Waves

2020.03.11 12:44 [904327] smart account 3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4 > SELF 0.00000000 Waves

{ "type": 13, "id": "52XBai7eLEAek4cwq7M4q79WGNcm2tDGsaVujEJj9M64", "fee": 1400000, "feeAssetId": null, "timestamp": 1583919775148, "version": 1, "sender": "3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4", "senderPublicKey": "4AHsCbS9QYVdKNvxrPWwsMwwy3KqXaCMXeAscExJZk9L", "proofs": [ "8A8xsQr2QtrJKDZ5QzsGDFtty9bVkXCkebRd4iiUoSADuqFvxvxFGfKijSJuN7TX3qdyE7jTdJPwpGv7vMsaTXB" ], "script": "base64:AAIDAAAAAAAAABMIARIGCgQIAQEIEgcKBQgICAEBAAAAHwAAAAAHYUJpdENPMgEAAAAgx/h6AJ03UJ8qMmy7JIhz3VjOE4OL3ofCGi0oG2fBKJYAAAAACHN0YXJ0UXR5AAAAAAAABRQAAAAAAAhub21QcmljZQAAAAAABfXhAAAAAAAQc3VwcGxpZXJEaXNjb3VudAAAAAAAAAAADAAAAAAOT3duZXJFY29QdWJLZXkBAAAAIC70W6NACRoO8DcwW0R46ze+bNGLr0tg3cAkNP8WNkAfAAAAAAN3dnMAAAAAAAX14QAAAAAABE5PTkUCAAAABG5vbmUAAAAABmlzc3VlcgkBAAAAB0FkZHJlc3MAAAABAQAAABoBVMr3Oz7nL9FV4g+t+EWzLN77jdANRWt9bwEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAADbnVtBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABQAAAANudW0BAAAAC2dldFN0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AgIBQAAAAJ0eAAAAAlzZWxsT3JkZXIAAAAJYXNzZXRQYWlyAAAAC2Ftb3VudEFzc2V0BQAAAAl3aXRoV2F2ZXMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBAAAAAFjBQAAAAckbWF0Y2gwBgdrJQ5R", "chainId": 84, "height": 904327, "spentComplexity": 0 } View: original | compacted Prev: AWE2Puoc6oeGKB8TjoakwSxfg7P3nEUdgrgzjf9xvHYk Next: FfpVMy8WC5CWDJ1W2fPA2HNY7ZAx7kaWngfHqj1KhV3z Diff:
OldNewDifferences
4545 }
4646
4747
48-func p (q,r) = ("BitCO2:_" + toBase58String(sha256(toBytes((q + r)))))
48+func p (q,r) = ("tokens_Bit-CO2:_" + toBase58String(sha256(toBytes((q + r)))))
4949
5050
51-func s (t) = (t + "_Amaz")
51+func s (t) = (t + "_to_Amazonian_Conservation")
5252
5353
5454 func u (t) = n(s(t))
5555
5656
57-func v (t) = (t + "_tok.amount")
57+func v (t) = (t + "_tokens")
5858
5959
6060 func w (t) = i(v(t))
6161
6262
63-func x (t) = (t + "_tokens")
63+func x (t) = (t + "_description")
6464
6565
66-func y (t) = i(x(t))
66+func y (z,t) = (((t + "_") + z) + "_cnt")
6767
6868
69-func z (t) = (t + "_description")
69+func A (z,t) = i(y(z, t))
7070
7171
72-func A (B,t) = (((t + "_") + B) + "_cnt")
72+func B (t) = (t + "_userdata")
7373
7474
75-func C (B,t) = i(A(B, t))
75+func C (t) = (t + "_saldwvsuser")
7676
7777
78-func D (t) = (t + "_userdata")
78+func D (t) = i(C(t))
7979
8080
81-func E (t) = (t + "_saldwvsuser")
81+func E (t) = (t + "_tokens")
8282
8383
8484 func F (t) = i(E(t))
8585
8686
87-func G (t) = (t + "_user.pmt")
87+func G (q) = (q + "_waves")
8888
8989
90-func H (t) = i(G(t))
90+func H (q) = i(G(q))
9191
9292
93-func I (t) = (t + "_saldqty")
93+func I (t) = ("name:_" + t)
9494
9595
96-func J (t) = i(I(t))
96+func J (t) = n(I(t))
9797
9898
99-func K (t) = (t + "_qty")
99+func K (t) = (("disc:_" + t) + "_")
100100
101101
102102 func L (t) = i(K(t))
103103
104104
105-func M (q) = (q + "_seller_balance")
105+func M (t) = (("Nom:_" + t) + "_")
106106
107107
108-func N (O) = i(M(O))
108+func N (t) = i(M(t))
109109
110110
111-func P (t) = (("name:_" + t) + "_")
112-
113-
114-func Q (t) = n(P(t))
115-
116-
117-func R (t) = (("disc:_" + t) + "_")
118-
119-
120-func S (t) = i(R(t))
121-
122-
123-func T (t) = (("Nom:_" + t) + "_")
124-
125-
126-func U (t) = i(T(t))
127-
128-
129-@Callable(V)
130-func AddSupplierToken (r,W,X) = {
131- let q = toBase58String(V.caller.bytes)
111+@Callable(O)
112+func AddSupplierToken (r,P,d,Q) = {
113+ let q = toBase58String(O.caller.bytes)
132114 let t = p(q, r)
133- if ((0 >= W))
115+ if ((0 >= P))
134116 then throw("Sorry, insufficient token offer")
135- else WriteSet([DataEntry(s(t), q), DataEntry(("Saldo_tokens:_" + x(t)), W), DataEntry(("Precio_Nominal_1_BitCO2:_" + T(t)), c), DataEntry(R(t), d), DataEntry(z(t), X), DataEntry(M(q), 0)])
117+ else WriteSet([DataEntry(("Ofertante:_" + s(t)), q), DataEntry(("Saldo/Cantidad,_tokens:_" + v(t)), P), DataEntry(("Precio_Nominal_1_BitCO2:_" + M(t)), c), DataEntry(("Max_Descuento_ofrecido:_" + K(t)), d), DataEntry(x(t), Q), DataEntry(("Saldo/Blance,_waves:_" + G(q)), 0)])
136118 }
137119
138120
139121
140-@Callable(V)
141-func PurchaseToken (t,Y,Z) = {
142- let aa = extract(V.payment)
143- if (isDefined(aa.assetId))
122+@Callable(O)
123+func PurchaseToken (t,R,S,T,U) = {
124+ let V = extract(O.payment)
125+ if (isDefined(V.assetId))
144126 then throw("you can adquire cBitCO2 only by Waves tokens")
145127 else {
146- let O = u(t)
147- let W = {
148- let l = getInteger(this, x(t))
128+ let q = {
129+ let l = getString(this, s(t))
130+ if ($isInstanceOf(l, "String"))
131+ then {
132+ let m = l
133+ m
134+ }
135+ else g
136+ }
137+ let P = {
138+ let l = getInteger(this, v(t))
149139 if ($isInstanceOf(l, "Int"))
150140 then {
151141 let m = l
153143 }
154144 else b
155145 }
156- let ab = toBase58String(V.caller.bytes)
157- let ac = ((c * (100 - d)) / 100)
158- let ad = (aa.amount / ac)
159- let ae = (W - ad)
160- let af = (ad * ac)
161- if ((af > aa.amount))
146+ let W = toBase58String(O.caller.bytes)
147+ let X = ((c * (100 - U)) / 100)
148+ let Y = (T * X)
149+ if ((Y > V.amount))
162150 then throw("Payment Amount cannot be less than item Purchase Order")
163- else if ((aa.amount > af))
151+ else if ((V.amount > Y))
164152 then throw("Payment Amount can't be higher than item Purchase Order")
165- else ScriptResult(WriteSet([DataEntry(A(ab, t), (C(ab, t) + 1)), DataEntry(s(t), Y), DataEntry(D(t), Z), DataEntry("Cantidad_de_tokens_a_comprar:_", ad), DataEntry(("Suma_a_invertir:_" + E(t)), aa.amount), DataEntry(("Request_Status:_" + ab), "sold"), DataEntry(("User_Balance:_" + I(t)), (J(t) + ad)), DataEntry(("Saldo_tokens:_" + x(t)), ae), DataEntry(("Saldo_Seller:_" + M(O)), (N(O) + aa.amount))]), TransferSet([ScriptTransfer(addressFromStringValue(ab), ad, a)]))
153+ else ScriptResult(WriteSet([DataEntry(y(W, t), (A(W, t) + 1)), DataEntry(I(t), R), DataEntry(B(t), S), DataEntry(("Cantidad_solicitada:_" + E(t)), T), DataEntry(("Balance_usuario:_" + C(t)), (D(t) - V.amount)), DataEntry(("Request_Status:_" + W), "sold"), DataEntry(("Saldo_Supplier:_" + v(t)), (w(t) - T)), DataEntry(("Saldo_Seller:_" + G(q)), (H(q) + V.amount))]), TransferSet([ScriptTransfer(addressFromStringValue(W), T, a)]))
166154 }
167155 }
168156
169157
170-@Verifier(ag)
171-func ah () = {
172- let l = ag
158+@Verifier(Z)
159+func aa () = {
160+ let l = Z
173161 if ($isInstanceOf(l, "SetScriptTransaction"))
174162 then {
175- let ai = l
176- sigVerify(ag.bodyBytes, ag.proofs[0], e)
163+ let ab = l
164+ sigVerify(Z.bodyBytes, Z.proofs[0], e)
177165 }
178166 else if ($isInstanceOf(l, "DataTransaction"))
179167 then {
180- let aj = l
168+ let ac = l
181169 true
182170 }
183171 else if ($isInstanceOf(l, "TransferTransaction"))
184172 then {
185- let ag = l
173+ let Z = l
186174 true
187175 }
188176 else if ($isInstanceOf(l, "ExchangeTransaction"))
189177 then {
190- let ag = l
191- let ak = if (!(isDefined(ag.sellOrder.assetPair.priceAsset)))
178+ let Z = l
179+ let ad = if (!(isDefined(Z.sellOrder.assetPair.priceAsset)))
192180 then true
193- else !(isDefined(ag.sellOrder.assetPair.amountAsset))
194- ak
181+ else !(isDefined(Z.sellOrder.assetPair.amountAsset))
182+ ad
195183 }
196184 else if ($isInstanceOf(l, "InvokeScriptTransaction"))
197185 then {
198- let al = l
186+ let ae = l
199187 true
200188 }
201189 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
48-func p (q,r) = ("BitCO2:_" + toBase58String(sha256(toBytes((q + r)))))
48+func p (q,r) = ("tokens_Bit-CO2:_" + toBase58String(sha256(toBytes((q + r)))))
4949
5050
51-func s (t) = (t + "_Amaz")
51+func s (t) = (t + "_to_Amazonian_Conservation")
5252
5353
5454 func u (t) = n(s(t))
5555
5656
57-func v (t) = (t + "_tok.amount")
57+func v (t) = (t + "_tokens")
5858
5959
6060 func w (t) = i(v(t))
6161
6262
63-func x (t) = (t + "_tokens")
63+func x (t) = (t + "_description")
6464
6565
66-func y (t) = i(x(t))
66+func y (z,t) = (((t + "_") + z) + "_cnt")
6767
6868
69-func z (t) = (t + "_description")
69+func A (z,t) = i(y(z, t))
7070
7171
72-func A (B,t) = (((t + "_") + B) + "_cnt")
72+func B (t) = (t + "_userdata")
7373
7474
75-func C (B,t) = i(A(B, t))
75+func C (t) = (t + "_saldwvsuser")
7676
7777
78-func D (t) = (t + "_userdata")
78+func D (t) = i(C(t))
7979
8080
81-func E (t) = (t + "_saldwvsuser")
81+func E (t) = (t + "_tokens")
8282
8383
8484 func F (t) = i(E(t))
8585
8686
87-func G (t) = (t + "_user.pmt")
87+func G (q) = (q + "_waves")
8888
8989
90-func H (t) = i(G(t))
90+func H (q) = i(G(q))
9191
9292
93-func I (t) = (t + "_saldqty")
93+func I (t) = ("name:_" + t)
9494
9595
96-func J (t) = i(I(t))
96+func J (t) = n(I(t))
9797
9898
99-func K (t) = (t + "_qty")
99+func K (t) = (("disc:_" + t) + "_")
100100
101101
102102 func L (t) = i(K(t))
103103
104104
105-func M (q) = (q + "_seller_balance")
105+func M (t) = (("Nom:_" + t) + "_")
106106
107107
108-func N (O) = i(M(O))
108+func N (t) = i(M(t))
109109
110110
111-func P (t) = (("name:_" + t) + "_")
112-
113-
114-func Q (t) = n(P(t))
115-
116-
117-func R (t) = (("disc:_" + t) + "_")
118-
119-
120-func S (t) = i(R(t))
121-
122-
123-func T (t) = (("Nom:_" + t) + "_")
124-
125-
126-func U (t) = i(T(t))
127-
128-
129-@Callable(V)
130-func AddSupplierToken (r,W,X) = {
131- let q = toBase58String(V.caller.bytes)
111+@Callable(O)
112+func AddSupplierToken (r,P,d,Q) = {
113+ let q = toBase58String(O.caller.bytes)
132114 let t = p(q, r)
133- if ((0 >= W))
115+ if ((0 >= P))
134116 then throw("Sorry, insufficient token offer")
135- else WriteSet([DataEntry(s(t), q), DataEntry(("Saldo_tokens:_" + x(t)), W), DataEntry(("Precio_Nominal_1_BitCO2:_" + T(t)), c), DataEntry(R(t), d), DataEntry(z(t), X), DataEntry(M(q), 0)])
117+ else WriteSet([DataEntry(("Ofertante:_" + s(t)), q), DataEntry(("Saldo/Cantidad,_tokens:_" + v(t)), P), DataEntry(("Precio_Nominal_1_BitCO2:_" + M(t)), c), DataEntry(("Max_Descuento_ofrecido:_" + K(t)), d), DataEntry(x(t), Q), DataEntry(("Saldo/Blance,_waves:_" + G(q)), 0)])
136118 }
137119
138120
139121
140-@Callable(V)
141-func PurchaseToken (t,Y,Z) = {
142- let aa = extract(V.payment)
143- if (isDefined(aa.assetId))
122+@Callable(O)
123+func PurchaseToken (t,R,S,T,U) = {
124+ let V = extract(O.payment)
125+ if (isDefined(V.assetId))
144126 then throw("you can adquire cBitCO2 only by Waves tokens")
145127 else {
146- let O = u(t)
147- let W = {
148- let l = getInteger(this, x(t))
128+ let q = {
129+ let l = getString(this, s(t))
130+ if ($isInstanceOf(l, "String"))
131+ then {
132+ let m = l
133+ m
134+ }
135+ else g
136+ }
137+ let P = {
138+ let l = getInteger(this, v(t))
149139 if ($isInstanceOf(l, "Int"))
150140 then {
151141 let m = l
152142 m
153143 }
154144 else b
155145 }
156- let ab = toBase58String(V.caller.bytes)
157- let ac = ((c * (100 - d)) / 100)
158- let ad = (aa.amount / ac)
159- let ae = (W - ad)
160- let af = (ad * ac)
161- if ((af > aa.amount))
146+ let W = toBase58String(O.caller.bytes)
147+ let X = ((c * (100 - U)) / 100)
148+ let Y = (T * X)
149+ if ((Y > V.amount))
162150 then throw("Payment Amount cannot be less than item Purchase Order")
163- else if ((aa.amount > af))
151+ else if ((V.amount > Y))
164152 then throw("Payment Amount can't be higher than item Purchase Order")
165- else ScriptResult(WriteSet([DataEntry(A(ab, t), (C(ab, t) + 1)), DataEntry(s(t), Y), DataEntry(D(t), Z), DataEntry("Cantidad_de_tokens_a_comprar:_", ad), DataEntry(("Suma_a_invertir:_" + E(t)), aa.amount), DataEntry(("Request_Status:_" + ab), "sold"), DataEntry(("User_Balance:_" + I(t)), (J(t) + ad)), DataEntry(("Saldo_tokens:_" + x(t)), ae), DataEntry(("Saldo_Seller:_" + M(O)), (N(O) + aa.amount))]), TransferSet([ScriptTransfer(addressFromStringValue(ab), ad, a)]))
153+ else ScriptResult(WriteSet([DataEntry(y(W, t), (A(W, t) + 1)), DataEntry(I(t), R), DataEntry(B(t), S), DataEntry(("Cantidad_solicitada:_" + E(t)), T), DataEntry(("Balance_usuario:_" + C(t)), (D(t) - V.amount)), DataEntry(("Request_Status:_" + W), "sold"), DataEntry(("Saldo_Supplier:_" + v(t)), (w(t) - T)), DataEntry(("Saldo_Seller:_" + G(q)), (H(q) + V.amount))]), TransferSet([ScriptTransfer(addressFromStringValue(W), T, a)]))
166154 }
167155 }
168156
169157
170-@Verifier(ag)
171-func ah () = {
172- let l = ag
158+@Verifier(Z)
159+func aa () = {
160+ let l = Z
173161 if ($isInstanceOf(l, "SetScriptTransaction"))
174162 then {
175- let ai = l
176- sigVerify(ag.bodyBytes, ag.proofs[0], e)
163+ let ab = l
164+ sigVerify(Z.bodyBytes, Z.proofs[0], e)
177165 }
178166 else if ($isInstanceOf(l, "DataTransaction"))
179167 then {
180- let aj = l
168+ let ac = l
181169 true
182170 }
183171 else if ($isInstanceOf(l, "TransferTransaction"))
184172 then {
185- let ag = l
173+ let Z = l
186174 true
187175 }
188176 else if ($isInstanceOf(l, "ExchangeTransaction"))
189177 then {
190- let ag = l
191- let ak = if (!(isDefined(ag.sellOrder.assetPair.priceAsset)))
178+ let Z = l
179+ let ad = if (!(isDefined(Z.sellOrder.assetPair.priceAsset)))
192180 then true
193- else !(isDefined(ag.sellOrder.assetPair.amountAsset))
194- ak
181+ else !(isDefined(Z.sellOrder.assetPair.amountAsset))
182+ ad
195183 }
196184 else if ($isInstanceOf(l, "InvokeScriptTransaction"))
197185 then {
198- let al = l
186+ let ae = l
199187 true
200188 }
201189 else false
202190 }
203191

github/deemru/w8io/026f985 
57.78 ms