tx · D7iDaKdtjXP65DcNS7FCMHx7T4zTxFBLHR8352cYakdP

3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4:  -0.01400000 Waves

2020.03.11 16:50 [904574] smart account 3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4 > SELF 0.00000000 Waves

{ "type": 13, "id": "D7iDaKdtjXP65DcNS7FCMHx7T4zTxFBLHR8352cYakdP", "fee": 1400000, "feeAssetId": null, "timestamp": 1583934576747, "version": 1, "sender": "3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4", "senderPublicKey": "4AHsCbS9QYVdKNvxrPWwsMwwy3KqXaCMXeAscExJZk9L", "proofs": [ "4gUarJn6wwg2oSt88ApZx2ZALQffeuM8yT7VJLeBiZFe58uAG4JWxr6bA73TTbkP1LcPa3jvpQNYE9Rwchk36dFC" ], "script": "base64:AAIDAAAAAAAAABMIARIGCgQIAQEIEgcKBQgICAEBAAAAHQAAAAAHYUJpdENPMgEAAAAgx/h6AJ03UJ8qMmy7JIhz3VjOE4OL3ofCGi0oG2fBKJYAAAAACHN0YXJ0UXR5AAAAAAAABRQAAAAAAAhub21QcmljZQAAAAAABfXhAAAAAAAQc3VwcGxpZXJEaXNjb3VudAAAAAAAAAAADAAAAAAOT3duZXJFY29QdWJLZXkBAAAAIC70W6NACRoO8DcwW0R46ze+bNGLr0tg3cAkNP8WNkAfAAAAAAN3dnMAAAAAAAX14QAAAAAABE5PTkUCAAAABG5vbmUAAAAABmlzc3VlcgkBAAAAB0FkZHJlc3MAAAABAQAAABoBVMr3Oz7nL9FV4g+t+EWzLN77jdANRWt9bwEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAADbnVtBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABQAAAANudW0BAAAAC2dldFN0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0aW9uBAAAAAJ0eAUAAAAHJG1hdGNoMAQAAAAJd2l0aFdhdmVzAwkBAAAAASEAAAABCQEAAAAJaXNEZWZpbmVkAAAAAQgICAUAAAACdHgAAAAJc2VsbE9yZGVyAAAACWFzc2V0UGFpcgAAAApwcmljZUFzc2V0BgkBAAAAASEAAAABCQEAAAAJaXNEZWZpbmVkAAAAAQgICAUAAAACdHgAAAAJc2VsbE9yZGVyAAAACWFzc2V0UGFpcgAAAAthbW91bnRBc3NldAUAAAAJd2l0aFdhdmVzAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdJbnZva2VTY3JpcHRUcmFuc2FjdGlvbgQAAAABYwUAAAAHJG1hdGNoMAYHR6M1LQ==", "chainId": 84, "height": 904574, "spentComplexity": 0 } View: original | compacted Prev: 4yVTstQBG5Kguo2GHZzdVWgd4PwVD8gWY1ovNpzzKq9t Next: 5xZWcZmZPJ4qRuFFUPsJGimYwQPBKsVdKMJAs3H8vGd3 Diff:
OldNewDifferences
7272 func B (t) = "_userdata"
7373
7474
75-func C (D) = (D + "_saldwvsuser")
75+func C (t) = "_tokens"
7676
7777
78-func E (D) = i(C(D))
78+func D (t) = i(C(t))
7979
8080
81-func F (t) = "_tokens"
81+func E (q) = "Seller_Balance:_waves"
8282
8383
84-func G (t) = i(F(t))
84+func F (q) = i(E(q))
8585
8686
87-func H (q) = "Seller_Balance:_waves"
87+func G (t) = "Project_name:"
8888
8989
90-func I (q) = i(H(q))
90+func H (t) = n(G(t))
9191
9292
93-func J (t) = "Project_name:"
93+func I (t) = "_%"
9494
9595
96-func K (t) = n(J(t))
96+func J (t) = i(I(t))
9797
9898
99-func L (t) = "_%"
99+func K (t) = "_waves"
100100
101101
102-func M (t) = i(L(t))
102+func L (t) = i(K(t))
103103
104104
105-func N (t) = "_waves"
106-
107-
108-func O (t) = i(N(t))
109-
110-
111-@Callable(P)
112-func AddSupplierToken (r,Q,d,R) = {
113- let q = toBase58String(P.caller.bytes)
105+@Callable(M)
106+func AddSupplierToken (r,N,d,O) = {
107+ let q = toBase58String(M.caller.bytes)
114108 let t = p(q, r)
115- if ((0 >= Q))
109+ if ((0 >= N))
116110 then throw("Sorry, insufficient token offer")
117- else WriteSet([DataEntry(("Ofertante:_" + s(t)), q), DataEntry(v(t), Q), DataEntry(("Precio_Nominal:" + N(t)), c), DataEntry(("Max_Descuento_ofrecido:" + L(t)), d), DataEntry(x(t), R)])
111+ 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)])
118112 }
119113
120114
121115
122-@Callable(P)
123-func PurchaseToken (t,S,T,U,V) = {
124- let W = extract(P.payment)
125- if (isDefined(W.assetId))
116+@Callable(M)
117+func PurchaseToken (t,P,Q,R,S) = {
118+ let T = extract(M.payment)
119+ if (isDefined(T.assetId))
126120 then throw("you can adquire cBitCO2 only by Waves tokens")
127121 else {
128122 let q = {
134128 }
135129 else g
136130 }
137- let Q = {
131+ let N = {
138132 let l = getInteger(this, v(t))
139133 if ($isInstanceOf(l, "Int"))
140134 then {
143137 }
144138 else b
145139 }
146- let X = {
147- let l = getInteger(this, H(q))
140+ let U = {
141+ let l = getInteger(this, E(q))
148142 if ($isInstanceOf(l, "Int"))
149143 then {
150144 let m = l
152146 }
153147 else 0
154148 }
155- let D = toBase58String(P.caller.bytes)
156- let Y = ((c * (100 - V)) / 100)
157- let Z = (U * Y)
158- if ((Z > W.amount))
149+ let V = toBase58String(M.caller.bytes)
150+ let W = ((c * (100 - S)) / 100)
151+ let X = (R * W)
152+ if ((X > T.amount))
159153 then throw("Payment Amount cannot be less than item Purchase Order")
160- else if ((W.amount > Z))
154+ else if ((T.amount > X))
161155 then throw("Payment Amount can't be higher than item Purchase Order")
162- else ScriptResult(WriteSet([DataEntry(y(D, t), (A(D, t) + 1)), DataEntry(J(t), S), DataEntry(B(t), T), DataEntry(("Cantidad_solicitada:" + F(t)), U), DataEntry(C(D), (E(D) - W.amount)), DataEntry(("Request_Status:_" + D), "confirmed"), DataEntry(v(t), (Q - U)), DataEntry(H(q), (X + W.amount))]), TransferSet(nil))
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(nil))
163157 }
164158 }
165159
166160
167-@Verifier(aa)
168-func ab () = {
169- let l = aa
161+@Verifier(Y)
162+func Z () = {
163+ let l = Y
170164 if ($isInstanceOf(l, "SetScriptTransaction"))
171165 then {
172- let ac = l
173- sigVerify(aa.bodyBytes, aa.proofs[0], e)
166+ let aa = l
167+ sigVerify(Y.bodyBytes, Y.proofs[0], e)
174168 }
175169 else if ($isInstanceOf(l, "DataTransaction"))
176170 then {
177- let ad = l
171+ let ab = l
178172 true
179173 }
180174 else if ($isInstanceOf(l, "TransferTransaction"))
181175 then {
182- let aa = l
176+ let Y = l
183177 true
184178 }
185179 else if ($isInstanceOf(l, "ExchangeTransaction"))
186180 then {
187- let aa = l
188- let ae = if (!(isDefined(aa.sellOrder.assetPair.priceAsset)))
181+ let Y = l
182+ let ac = if (!(isDefined(Y.sellOrder.assetPair.priceAsset)))
189183 then true
190- else !(isDefined(aa.sellOrder.assetPair.amountAsset))
191- ae
184+ else !(isDefined(Y.sellOrder.assetPair.amountAsset))
185+ ac
192186 }
193187 else if ($isInstanceOf(l, "InvokeScriptTransaction"))
194188 then {
195- let af = l
189+ let ad = l
196190 true
197191 }
198192 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
75-func C (D) = (D + "_saldwvsuser")
75+func C (t) = "_tokens"
7676
7777
78-func E (D) = i(C(D))
78+func D (t) = i(C(t))
7979
8080
81-func F (t) = "_tokens"
81+func E (q) = "Seller_Balance:_waves"
8282
8383
84-func G (t) = i(F(t))
84+func F (q) = i(E(q))
8585
8686
87-func H (q) = "Seller_Balance:_waves"
87+func G (t) = "Project_name:"
8888
8989
90-func I (q) = i(H(q))
90+func H (t) = n(G(t))
9191
9292
93-func J (t) = "Project_name:"
93+func I (t) = "_%"
9494
9595
96-func K (t) = n(J(t))
96+func J (t) = i(I(t))
9797
9898
99-func L (t) = "_%"
99+func K (t) = "_waves"
100100
101101
102-func M (t) = i(L(t))
102+func L (t) = i(K(t))
103103
104104
105-func N (t) = "_waves"
106-
107-
108-func O (t) = i(N(t))
109-
110-
111-@Callable(P)
112-func AddSupplierToken (r,Q,d,R) = {
113- let q = toBase58String(P.caller.bytes)
105+@Callable(M)
106+func AddSupplierToken (r,N,d,O) = {
107+ let q = toBase58String(M.caller.bytes)
114108 let t = p(q, r)
115- if ((0 >= Q))
109+ if ((0 >= N))
116110 then throw("Sorry, insufficient token offer")
117- else WriteSet([DataEntry(("Ofertante:_" + s(t)), q), DataEntry(v(t), Q), DataEntry(("Precio_Nominal:" + N(t)), c), DataEntry(("Max_Descuento_ofrecido:" + L(t)), d), DataEntry(x(t), R)])
111+ 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)])
118112 }
119113
120114
121115
122-@Callable(P)
123-func PurchaseToken (t,S,T,U,V) = {
124- let W = extract(P.payment)
125- if (isDefined(W.assetId))
116+@Callable(M)
117+func PurchaseToken (t,P,Q,R,S) = {
118+ let T = extract(M.payment)
119+ if (isDefined(T.assetId))
126120 then throw("you can adquire cBitCO2 only by Waves tokens")
127121 else {
128122 let q = {
129123 let l = getString(this, s(t))
130124 if ($isInstanceOf(l, "String"))
131125 then {
132126 let m = l
133127 m
134128 }
135129 else g
136130 }
137- let Q = {
131+ let N = {
138132 let l = getInteger(this, v(t))
139133 if ($isInstanceOf(l, "Int"))
140134 then {
141135 let m = l
142136 m
143137 }
144138 else b
145139 }
146- let X = {
147- let l = getInteger(this, H(q))
140+ let U = {
141+ let l = getInteger(this, E(q))
148142 if ($isInstanceOf(l, "Int"))
149143 then {
150144 let m = l
151145 m
152146 }
153147 else 0
154148 }
155- let D = toBase58String(P.caller.bytes)
156- let Y = ((c * (100 - V)) / 100)
157- let Z = (U * Y)
158- if ((Z > W.amount))
149+ let V = toBase58String(M.caller.bytes)
150+ let W = ((c * (100 - S)) / 100)
151+ let X = (R * W)
152+ if ((X > T.amount))
159153 then throw("Payment Amount cannot be less than item Purchase Order")
160- else if ((W.amount > Z))
154+ else if ((T.amount > X))
161155 then throw("Payment Amount can't be higher than item Purchase Order")
162- else ScriptResult(WriteSet([DataEntry(y(D, t), (A(D, t) + 1)), DataEntry(J(t), S), DataEntry(B(t), T), DataEntry(("Cantidad_solicitada:" + F(t)), U), DataEntry(C(D), (E(D) - W.amount)), DataEntry(("Request_Status:_" + D), "confirmed"), DataEntry(v(t), (Q - U)), DataEntry(H(q), (X + W.amount))]), TransferSet(nil))
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(nil))
163157 }
164158 }
165159
166160
167-@Verifier(aa)
168-func ab () = {
169- let l = aa
161+@Verifier(Y)
162+func Z () = {
163+ let l = Y
170164 if ($isInstanceOf(l, "SetScriptTransaction"))
171165 then {
172- let ac = l
173- sigVerify(aa.bodyBytes, aa.proofs[0], e)
166+ let aa = l
167+ sigVerify(Y.bodyBytes, Y.proofs[0], e)
174168 }
175169 else if ($isInstanceOf(l, "DataTransaction"))
176170 then {
177- let ad = l
171+ let ab = l
178172 true
179173 }
180174 else if ($isInstanceOf(l, "TransferTransaction"))
181175 then {
182- let aa = l
176+ let Y = l
183177 true
184178 }
185179 else if ($isInstanceOf(l, "ExchangeTransaction"))
186180 then {
187- let aa = l
188- let ae = if (!(isDefined(aa.sellOrder.assetPair.priceAsset)))
181+ let Y = l
182+ let ac = if (!(isDefined(Y.sellOrder.assetPair.priceAsset)))
189183 then true
190- else !(isDefined(aa.sellOrder.assetPair.amountAsset))
191- ae
184+ else !(isDefined(Y.sellOrder.assetPair.amountAsset))
185+ ac
192186 }
193187 else if ($isInstanceOf(l, "InvokeScriptTransaction"))
194188 then {
195- let af = l
189+ let ad = l
196190 true
197191 }
198192 else false
199193 }
200194

github/deemru/w8io/169f3d6 
53.51 ms