tx · GKoaEa2R9sGpKnjtfeU4pHh33jh4SzeinxPayBxcNPiG

3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4:  -0.01400000 Waves

2020.03.10 11:54 [902821] smart account 3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4 > SELF 0.00000000 Waves

{ "type": 13, "id": "GKoaEa2R9sGpKnjtfeU4pHh33jh4SzeinxPayBxcNPiG", "fee": 1400000, "feeAssetId": null, "timestamp": 1583830426416, "version": 1, "sender": "3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4", "senderPublicKey": "4AHsCbS9QYVdKNvxrPWwsMwwy3KqXaCMXeAscExJZk9L", "proofs": [ "5x9Q2kHsiCWY5DddBypzz1k7jXNVaqKbxB5ZNE6Wx6K5PrGPaZ1xXH6GS9WyT2YvKeFArismn2qPEPuTQaScKiiR" ], "script": "base64:AAIDAAAAAAAAABAIARIFCgMIAQgSBQoDCAgIAAAAJQAAAAAHYUJpdENPMgEAAAAgx/h6AJ03UJ8qMmy7JIhz3VjOE4OL3ofCGi0oG2fBKJYAAAAACHN0YXJ0UXR5AAAAAAAABRQAAAAAAAhub21QcmljZQAAAAAABfXhAAAAAAAWZGlzY291bnRQcmVJY29TdXBwbGllcgAAAAAAAAAADAAAAAAOT3duZXJFY29QdWJLZXkBAAAAIC70W6NACRoO8DcwW0R46ze+bNGLr0tg3cAkNP8WNkAfAAAAAAN3dnMAAAAAAAX14QAAAAAABE5PTkUCAAAABG5vbmUAAAAABmlzc3VlcgkBAAAAB0FkZHJlc3MAAAABAQAAABoBVMr3Oz7nL9FV4g+t+EWzLN77jdANRWt9bwEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAADbnVtBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABQAAAANudW0BAAA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0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADk93bmVyRWNvUHViS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDAGAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAJ0eAUAAAAHJG1hdGNoMAYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE0V4Y2hhbmdlVHJhbnNhY3Rpb24EAAAAAnR4BQAAAAckbWF0Y2gwBAAAAAl3aXRoV2F2ZXMDCQEAAAABIQAAAAEJAQAAAAlpc0RlZmluZWQAAAABCAgIBQAAAAJ0eAAAAAlzZWxsT3JkZXIAAAAJYXNzZXRQYWlyAAAACnByaWNlQXNzZXQGCQEAAAABIQAAAAEJAQAAAAlpc0RlZmluZWQAAAABCAgIBQAAAAJ0eAAAAAlzZWxsT3JkZXIAAAAJYXNzZXRQYWlyAAAAC2Ftb3VudEFzc2V0BQAAAAl3aXRoV2F2ZXMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBAAAAAFjBQAAAAckbWF0Y2gwBgfGTkb+", "chainId": 84, "height": 902821, "spentComplexity": 0 } View: original | compacted Prev: 8NoNFDidy3yoA3LNMVCpQ4fgb2C1GfJ3AwAiGP5JVAEz Next: 2EjbzBc2KyqBpvtCeAcbGp4cNbA8qFTzMXzoDdYS4tfa Diff:
OldNewDifferences
127127
128128
129129 @Callable(V)
130-func AddSupplierToken (r,W) = {
130+func AddSupplierToken (r,W,X) = {
131131 let q = toBase58String(V.caller.bytes)
132132 let t = p(q, r)
133- let X = {
134- let l = getInteger(this, q)
135- if ($isInstanceOf(l, "Int"))
136- then {
137- let m = l
138- m
139- }
140- else b
141- }
142- if ((0 >= X))
133+ if ((0 >= W))
143134 then throw("Sorry, insufficient token offer")
144- else WriteSet([DataEntry(s(t), q), DataEntry(x(t), X), DataEntry(("Precio_Nominal_de_1 token_cBitCO2:_" + T(t)), c), DataEntry(R(t), d), DataEntry(z(t), W)])
135+ else WriteSet([DataEntry(s(t), q), DataEntry(("Saldo_tokens:_" + x(t)), W), DataEntry(("Precio_Nominal_de_1 token_cBitCO2:_" + T(t)), c), DataEntry(R(t), d), DataEntry(z(t), X)])
145136 }
146137
147138
153144 then throw("you can adquire cBitCO2 only by Waves tokens")
154145 else {
155146 let N = u(t)
156- let ab = {
147+ let W = {
157148 let l = getInteger(this, N)
158149 if ($isInstanceOf(l, "Int"))
159150 then {
162153 }
163154 else b
164155 }
165- let ac = toBase58String(V.caller.bytes)
166- let ad = ((c * (100 - d)) / 100)
167- let ae = (aa.amount / ad)
168- let af = (ab - ae)
169- let ag = (ae * ad)
170- if ((ag > aa.amount))
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))
171162 then throw("Payment Amount cannot be less than item Purchase Order")
172- else if ((aa.amount > ag))
163+ else if ((aa.amount > af))
173164 then throw("Payment Amount can't be higher than item Purchase Order")
174- else ScriptResult(WriteSet([DataEntry(A(ac, t), (C(ac, t) + 1)), DataEntry(s(t), Y), DataEntry(D(t), Z), DataEntry("Cantidad_de_tokens_a_comprar:_", ae), DataEntry(("Investment_Amount,_waves_" + G(t)), ag), DataEntry(("Pago_en__waves_del_Inversor" + E(t)), aa.amount), DataEntry((("Request_Status:_" + ac) + "_"), "sold"), DataEntry((("User_Balance:_" + I(t)) + "_"), ae), DataEntry(("Saldo_tokens_del_Proyecto" + x(t)), af), DataEntry(("Saldo_waves_del_vendedor" + M(N)), (O(N) + aa.amount))]), TransferSet([ScriptTransfer(addressFromStringValue(ac), ae, a)]))
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(("Investment_Amount,_waves_" + G(t)), af), DataEntry(("Pago_en__waves_del_Inversor" + E(t)), aa.amount), DataEntry((("Request_Status:_" + ab) + "_"), "sold"), DataEntry((("User_Balance:_" + I(t)) + "_"), ad), DataEntry(("Saldo_tokens:_" + x(t)), ae), DataEntry(("Saldo_waves_del_vendedor" + M(N)), (O(N) + aa.amount))]), TransferSet([ScriptTransfer(addressFromStringValue(ab), ad, a)]))
175166 }
176167 }
177168
178169
179-@Verifier(ah)
180-func ai () = {
181- let l = ah
170+@Verifier(ag)
171+func ah () = {
172+ let l = ag
182173 if ($isInstanceOf(l, "SetScriptTransaction"))
183174 then {
184- let aj = l
185- sigVerify(ah.bodyBytes, ah.proofs[0], e)
175+ let ai = l
176+ sigVerify(ag.bodyBytes, ag.proofs[0], e)
186177 }
187178 else if ($isInstanceOf(l, "DataTransaction"))
188179 then {
189- let ak = l
180+ let aj = l
190181 true
191182 }
192183 else if ($isInstanceOf(l, "TransferTransaction"))
193184 then {
194- let ah = l
185+ let ag = l
195186 true
196187 }
197188 else if ($isInstanceOf(l, "ExchangeTransaction"))
198189 then {
199- let ah = l
200- let al = if (!(isDefined(ah.sellOrder.assetPair.priceAsset)))
190+ let ag = l
191+ let ak = if (!(isDefined(ag.sellOrder.assetPair.priceAsset)))
201192 then true
202- else !(isDefined(ah.sellOrder.assetPair.amountAsset))
203- al
193+ else !(isDefined(ag.sellOrder.assetPair.amountAsset))
194+ ak
204195 }
205196 else if ($isInstanceOf(l, "InvokeScriptTransaction"))
206197 then {
207- let am = l
198+ let al = l
208199 true
209200 }
210201 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) = ("BitCO2:_" + toBase58String(sha256(toBytes((q + r)))))
4949
5050
5151 func s (t) = (t + "_Amaz")
5252
5353
5454 func u (t) = n(s(t))
5555
5656
5757 func v (t) = (t + "_tok.amount")
5858
5959
6060 func w (t) = i(v(t))
6161
6262
6363 func x (t) = (t + "_tokens")
6464
6565
6666 func y (t) = i(x(t))
6767
6868
6969 func z (t) = (t + "_description")
7070
7171
7272 func A (B,t) = (((t + "_") + B) + "_cnt")
7373
7474
7575 func C (B,t) = i(A(B, t))
7676
7777
7878 func D (t) = (t + "_userdata")
7979
8080
8181 func E (t) = (t + "_saldwvsuser")
8282
8383
8484 func F (t) = i(E(t))
8585
8686
8787 func G (t) = (t + "_user.pmt")
8888
8989
9090 func H (t) = i(G(t))
9191
9292
9393 func I (t) = (t + "_saldqty")
9494
9595
9696 func J (t) = i(I(t))
9797
9898
9999 func K (t) = (t + "_qty")
100100
101101
102102 func L (t) = i(K(t))
103103
104104
105105 func M (N) = (N + "_balance")
106106
107107
108108 func O (N) = i(M(N))
109109
110110
111111 func P (t) = (("name:_" + t) + "_")
112112
113113
114114 func Q (t) = n(P(t))
115115
116116
117117 func R (t) = (("disc:_" + t) + "_")
118118
119119
120120 func S (t) = i(R(t))
121121
122122
123123 func T (t) = (("Nom:_" + t) + "_")
124124
125125
126126 func U (t) = i(T(t))
127127
128128
129129 @Callable(V)
130-func AddSupplierToken (r,W) = {
130+func AddSupplierToken (r,W,X) = {
131131 let q = toBase58String(V.caller.bytes)
132132 let t = p(q, r)
133- let X = {
134- let l = getInteger(this, q)
135- if ($isInstanceOf(l, "Int"))
136- then {
137- let m = l
138- m
139- }
140- else b
141- }
142- if ((0 >= X))
133+ if ((0 >= W))
143134 then throw("Sorry, insufficient token offer")
144- else WriteSet([DataEntry(s(t), q), DataEntry(x(t), X), DataEntry(("Precio_Nominal_de_1 token_cBitCO2:_" + T(t)), c), DataEntry(R(t), d), DataEntry(z(t), W)])
135+ else WriteSet([DataEntry(s(t), q), DataEntry(("Saldo_tokens:_" + x(t)), W), DataEntry(("Precio_Nominal_de_1 token_cBitCO2:_" + T(t)), c), DataEntry(R(t), d), DataEntry(z(t), X)])
145136 }
146137
147138
148139
149140 @Callable(V)
150141 func PurchaseToken (t,Y,Z) = {
151142 let aa = extract(V.payment)
152143 if (isDefined(aa.assetId))
153144 then throw("you can adquire cBitCO2 only by Waves tokens")
154145 else {
155146 let N = u(t)
156- let ab = {
147+ let W = {
157148 let l = getInteger(this, N)
158149 if ($isInstanceOf(l, "Int"))
159150 then {
160151 let m = l
161152 m
162153 }
163154 else b
164155 }
165- let ac = toBase58String(V.caller.bytes)
166- let ad = ((c * (100 - d)) / 100)
167- let ae = (aa.amount / ad)
168- let af = (ab - ae)
169- let ag = (ae * ad)
170- if ((ag > aa.amount))
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))
171162 then throw("Payment Amount cannot be less than item Purchase Order")
172- else if ((aa.amount > ag))
163+ else if ((aa.amount > af))
173164 then throw("Payment Amount can't be higher than item Purchase Order")
174- else ScriptResult(WriteSet([DataEntry(A(ac, t), (C(ac, t) + 1)), DataEntry(s(t), Y), DataEntry(D(t), Z), DataEntry("Cantidad_de_tokens_a_comprar:_", ae), DataEntry(("Investment_Amount,_waves_" + G(t)), ag), DataEntry(("Pago_en__waves_del_Inversor" + E(t)), aa.amount), DataEntry((("Request_Status:_" + ac) + "_"), "sold"), DataEntry((("User_Balance:_" + I(t)) + "_"), ae), DataEntry(("Saldo_tokens_del_Proyecto" + x(t)), af), DataEntry(("Saldo_waves_del_vendedor" + M(N)), (O(N) + aa.amount))]), TransferSet([ScriptTransfer(addressFromStringValue(ac), ae, a)]))
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(("Investment_Amount,_waves_" + G(t)), af), DataEntry(("Pago_en__waves_del_Inversor" + E(t)), aa.amount), DataEntry((("Request_Status:_" + ab) + "_"), "sold"), DataEntry((("User_Balance:_" + I(t)) + "_"), ad), DataEntry(("Saldo_tokens:_" + x(t)), ae), DataEntry(("Saldo_waves_del_vendedor" + M(N)), (O(N) + aa.amount))]), TransferSet([ScriptTransfer(addressFromStringValue(ab), ad, a)]))
175166 }
176167 }
177168
178169
179-@Verifier(ah)
180-func ai () = {
181- let l = ah
170+@Verifier(ag)
171+func ah () = {
172+ let l = ag
182173 if ($isInstanceOf(l, "SetScriptTransaction"))
183174 then {
184- let aj = l
185- sigVerify(ah.bodyBytes, ah.proofs[0], e)
175+ let ai = l
176+ sigVerify(ag.bodyBytes, ag.proofs[0], e)
186177 }
187178 else if ($isInstanceOf(l, "DataTransaction"))
188179 then {
189- let ak = l
180+ let aj = l
190181 true
191182 }
192183 else if ($isInstanceOf(l, "TransferTransaction"))
193184 then {
194- let ah = l
185+ let ag = l
195186 true
196187 }
197188 else if ($isInstanceOf(l, "ExchangeTransaction"))
198189 then {
199- let ah = l
200- let al = if (!(isDefined(ah.sellOrder.assetPair.priceAsset)))
190+ let ag = l
191+ let ak = if (!(isDefined(ag.sellOrder.assetPair.priceAsset)))
201192 then true
202- else !(isDefined(ah.sellOrder.assetPair.amountAsset))
203- al
193+ else !(isDefined(ag.sellOrder.assetPair.amountAsset))
194+ ak
204195 }
205196 else if ($isInstanceOf(l, "InvokeScriptTransaction"))
206197 then {
207- let am = l
198+ let al = l
208199 true
209200 }
210201 else false
211202 }
212203

github/deemru/w8io/026f985 
46.07 ms