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+EWzLN77jdANRWt9bwEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAADbnVtBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABQAAAANudW0BAAAAC2dldFN0ck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gIBQAAAAJ0eAAAAAlzZWxsT3JkZXIAAAAJYXNzZXRQYWlyAAAAC2Ftb3VudEFzc2V0BQAAAAl3aXRoV2F2ZXMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBAAAAAFjBQAAAAckbWF0Y2gwBgdrJQ5R", "chainId": 84, "height": 904327, "spentComplexity": 0 } View: original | compacted Prev: AWE2Puoc6oeGKB8TjoakwSxfg7P3nEUdgrgzjf9xvHYk Next: FfpVMy8WC5CWDJ1W2fPA2HNY7ZAx7kaWngfHqj1KhV3z Diff:
Old | New | Differences | |
---|---|---|---|
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | - | func p (q,r) = (" | |
48 | + | func p (q,r) = ("tokens_Bit-CO2:_" + toBase58String(sha256(toBytes((q + r))))) | |
49 | 49 | ||
50 | 50 | ||
51 | - | func s (t) = (t + "_ | |
51 | + | func s (t) = (t + "_to_Amazonian_Conservation") | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func u (t) = n(s(t)) | |
55 | 55 | ||
56 | 56 | ||
57 | - | func v (t) = (t + "_ | |
57 | + | func v (t) = (t + "_tokens") | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func w (t) = i(v(t)) | |
61 | 61 | ||
62 | 62 | ||
63 | - | func x (t) = (t + "_ | |
63 | + | func x (t) = (t + "_description") | |
64 | 64 | ||
65 | 65 | ||
66 | - | func y (t) = | |
66 | + | func y (z,t) = (((t + "_") + z) + "_cnt") | |
67 | 67 | ||
68 | 68 | ||
69 | - | func | |
69 | + | func A (z,t) = i(y(z, t)) | |
70 | 70 | ||
71 | 71 | ||
72 | - | func | |
72 | + | func B (t) = (t + "_userdata") | |
73 | 73 | ||
74 | 74 | ||
75 | - | func C ( | |
75 | + | func C (t) = (t + "_saldwvsuser") | |
76 | 76 | ||
77 | 77 | ||
78 | - | func D (t) = (t | |
78 | + | func D (t) = i(C(t)) | |
79 | 79 | ||
80 | 80 | ||
81 | - | func E (t) = (t + "_ | |
81 | + | func E (t) = (t + "_tokens") | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func F (t) = i(E(t)) | |
85 | 85 | ||
86 | 86 | ||
87 | - | func G ( | |
87 | + | func G (q) = (q + "_waves") | |
88 | 88 | ||
89 | 89 | ||
90 | - | func H ( | |
90 | + | func H (q) = i(G(q)) | |
91 | 91 | ||
92 | 92 | ||
93 | - | func I (t) = ( | |
93 | + | func I (t) = ("name:_" + t) | |
94 | 94 | ||
95 | 95 | ||
96 | - | func J (t) = | |
96 | + | func J (t) = n(I(t)) | |
97 | 97 | ||
98 | 98 | ||
99 | - | func K (t) = (t + "_ | |
99 | + | func K (t) = (("disc:_" + t) + "_") | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func L (t) = i(K(t)) | |
103 | 103 | ||
104 | 104 | ||
105 | - | func M ( | |
105 | + | func M (t) = (("Nom:_" + t) + "_") | |
106 | 106 | ||
107 | 107 | ||
108 | - | func N ( | |
108 | + | func N (t) = i(M(t)) | |
109 | 109 | ||
110 | 110 | ||
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) | |
132 | 114 | let t = p(q, r) | |
133 | - | if ((0 >= | |
115 | + | if ((0 >= P)) | |
134 | 116 | then throw("Sorry, insufficient token offer") | |
135 | - | else WriteSet([DataEntry(s(t), q), DataEntry(("Saldo_tokens:_" + | |
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)]) | |
136 | 118 | } | |
137 | 119 | ||
138 | 120 | ||
139 | 121 | ||
140 | - | @Callable( | |
141 | - | func PurchaseToken (t, | |
142 | - | let | |
143 | - | if (isDefined( | |
122 | + | @Callable(O) | |
123 | + | func PurchaseToken (t,R,S,T,U) = { | |
124 | + | let V = extract(O.payment) | |
125 | + | if (isDefined(V.assetId)) | |
144 | 126 | then throw("you can adquire cBitCO2 only by Waves tokens") | |
145 | 127 | 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)) | |
149 | 139 | if ($isInstanceOf(l, "Int")) | |
150 | 140 | then { | |
151 | 141 | let m = l | |
153 | 143 | } | |
154 | 144 | else b | |
155 | 145 | } | |
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)) | |
162 | 150 | then throw("Payment Amount cannot be less than item Purchase Order") | |
163 | - | else if (( | |
151 | + | else if ((V.amount > Y)) | |
164 | 152 | then throw("Payment Amount can't be higher than item Purchase Order") | |
165 | - | else ScriptResult(WriteSet([DataEntry( | |
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)])) | |
166 | 154 | } | |
167 | 155 | } | |
168 | 156 | ||
169 | 157 | ||
170 | - | @Verifier( | |
171 | - | func | |
172 | - | let l = | |
158 | + | @Verifier(Z) | |
159 | + | func aa () = { | |
160 | + | let l = Z | |
173 | 161 | if ($isInstanceOf(l, "SetScriptTransaction")) | |
174 | 162 | then { | |
175 | - | let | |
176 | - | sigVerify( | |
163 | + | let ab = l | |
164 | + | sigVerify(Z.bodyBytes, Z.proofs[0], e) | |
177 | 165 | } | |
178 | 166 | else if ($isInstanceOf(l, "DataTransaction")) | |
179 | 167 | then { | |
180 | - | let | |
168 | + | let ac = l | |
181 | 169 | true | |
182 | 170 | } | |
183 | 171 | else if ($isInstanceOf(l, "TransferTransaction")) | |
184 | 172 | then { | |
185 | - | let | |
173 | + | let Z = l | |
186 | 174 | true | |
187 | 175 | } | |
188 | 176 | else if ($isInstanceOf(l, "ExchangeTransaction")) | |
189 | 177 | then { | |
190 | - | let | |
191 | - | let | |
178 | + | let Z = l | |
179 | + | let ad = if (!(isDefined(Z.sellOrder.assetPair.priceAsset))) | |
192 | 180 | then true | |
193 | - | else !(isDefined( | |
194 | - | | |
181 | + | else !(isDefined(Z.sellOrder.assetPair.amountAsset)) | |
182 | + | ad | |
195 | 183 | } | |
196 | 184 | else if ($isInstanceOf(l, "InvokeScriptTransaction")) | |
197 | 185 | then { | |
198 | - | let | |
186 | + | let ae = l | |
199 | 187 | true | |
200 | 188 | } | |
201 | 189 | else false |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'ETbtNp6MBuSM9EfjmLDwctrYEBBiq8CZ7ti7zbwTktry' | |
5 | 5 | ||
6 | 6 | let b = 332800 | |
7 | 7 | ||
8 | 8 | let c = 100000000 | |
9 | 9 | ||
10 | 10 | let d = 12 | |
11 | 11 | ||
12 | 12 | let e = base58'4AHsCbS9QYVdKNvxrPWwsMwwy3KqXaCMXeAscExJZk9L' | |
13 | 13 | ||
14 | 14 | let f = 100000000 | |
15 | 15 | ||
16 | 16 | let g = "none" | |
17 | 17 | ||
18 | 18 | let h = Address(base58'3N8RGScPyKYySaXd5Z3VcpnttH2uBeMpSy4') | |
19 | 19 | ||
20 | 20 | func i (j) = { | |
21 | 21 | let k = { | |
22 | 22 | let l = getInteger(this, j) | |
23 | 23 | if ($isInstanceOf(l, "Int")) | |
24 | 24 | then { | |
25 | 25 | let m = l | |
26 | 26 | m | |
27 | 27 | } | |
28 | 28 | else 0 | |
29 | 29 | } | |
30 | 30 | k | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func n (j) = { | |
35 | 35 | let o = { | |
36 | 36 | let l = getString(this, j) | |
37 | 37 | if ($isInstanceOf(l, "String")) | |
38 | 38 | then { | |
39 | 39 | let m = l | |
40 | 40 | m | |
41 | 41 | } | |
42 | 42 | else g | |
43 | 43 | } | |
44 | 44 | o | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | - | func p (q,r) = (" | |
48 | + | func p (q,r) = ("tokens_Bit-CO2:_" + toBase58String(sha256(toBytes((q + r))))) | |
49 | 49 | ||
50 | 50 | ||
51 | - | func s (t) = (t + "_ | |
51 | + | func s (t) = (t + "_to_Amazonian_Conservation") | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func u (t) = n(s(t)) | |
55 | 55 | ||
56 | 56 | ||
57 | - | func v (t) = (t + "_ | |
57 | + | func v (t) = (t + "_tokens") | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func w (t) = i(v(t)) | |
61 | 61 | ||
62 | 62 | ||
63 | - | func x (t) = (t + "_ | |
63 | + | func x (t) = (t + "_description") | |
64 | 64 | ||
65 | 65 | ||
66 | - | func y (t) = | |
66 | + | func y (z,t) = (((t + "_") + z) + "_cnt") | |
67 | 67 | ||
68 | 68 | ||
69 | - | func | |
69 | + | func A (z,t) = i(y(z, t)) | |
70 | 70 | ||
71 | 71 | ||
72 | - | func | |
72 | + | func B (t) = (t + "_userdata") | |
73 | 73 | ||
74 | 74 | ||
75 | - | func C ( | |
75 | + | func C (t) = (t + "_saldwvsuser") | |
76 | 76 | ||
77 | 77 | ||
78 | - | func D (t) = (t | |
78 | + | func D (t) = i(C(t)) | |
79 | 79 | ||
80 | 80 | ||
81 | - | func E (t) = (t + "_ | |
81 | + | func E (t) = (t + "_tokens") | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func F (t) = i(E(t)) | |
85 | 85 | ||
86 | 86 | ||
87 | - | func G ( | |
87 | + | func G (q) = (q + "_waves") | |
88 | 88 | ||
89 | 89 | ||
90 | - | func H ( | |
90 | + | func H (q) = i(G(q)) | |
91 | 91 | ||
92 | 92 | ||
93 | - | func I (t) = ( | |
93 | + | func I (t) = ("name:_" + t) | |
94 | 94 | ||
95 | 95 | ||
96 | - | func J (t) = | |
96 | + | func J (t) = n(I(t)) | |
97 | 97 | ||
98 | 98 | ||
99 | - | func K (t) = (t + "_ | |
99 | + | func K (t) = (("disc:_" + t) + "_") | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func L (t) = i(K(t)) | |
103 | 103 | ||
104 | 104 | ||
105 | - | func M ( | |
105 | + | func M (t) = (("Nom:_" + t) + "_") | |
106 | 106 | ||
107 | 107 | ||
108 | - | func N ( | |
108 | + | func N (t) = i(M(t)) | |
109 | 109 | ||
110 | 110 | ||
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) | |
132 | 114 | let t = p(q, r) | |
133 | - | if ((0 >= | |
115 | + | if ((0 >= P)) | |
134 | 116 | then throw("Sorry, insufficient token offer") | |
135 | - | else WriteSet([DataEntry(s(t), q), DataEntry(("Saldo_tokens:_" + | |
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)]) | |
136 | 118 | } | |
137 | 119 | ||
138 | 120 | ||
139 | 121 | ||
140 | - | @Callable( | |
141 | - | func PurchaseToken (t, | |
142 | - | let | |
143 | - | if (isDefined( | |
122 | + | @Callable(O) | |
123 | + | func PurchaseToken (t,R,S,T,U) = { | |
124 | + | let V = extract(O.payment) | |
125 | + | if (isDefined(V.assetId)) | |
144 | 126 | then throw("you can adquire cBitCO2 only by Waves tokens") | |
145 | 127 | 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)) | |
149 | 139 | if ($isInstanceOf(l, "Int")) | |
150 | 140 | then { | |
151 | 141 | let m = l | |
152 | 142 | m | |
153 | 143 | } | |
154 | 144 | else b | |
155 | 145 | } | |
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)) | |
162 | 150 | then throw("Payment Amount cannot be less than item Purchase Order") | |
163 | - | else if (( | |
151 | + | else if ((V.amount > Y)) | |
164 | 152 | then throw("Payment Amount can't be higher than item Purchase Order") | |
165 | - | else ScriptResult(WriteSet([DataEntry( | |
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)])) | |
166 | 154 | } | |
167 | 155 | } | |
168 | 156 | ||
169 | 157 | ||
170 | - | @Verifier( | |
171 | - | func | |
172 | - | let l = | |
158 | + | @Verifier(Z) | |
159 | + | func aa () = { | |
160 | + | let l = Z | |
173 | 161 | if ($isInstanceOf(l, "SetScriptTransaction")) | |
174 | 162 | then { | |
175 | - | let | |
176 | - | sigVerify( | |
163 | + | let ab = l | |
164 | + | sigVerify(Z.bodyBytes, Z.proofs[0], e) | |
177 | 165 | } | |
178 | 166 | else if ($isInstanceOf(l, "DataTransaction")) | |
179 | 167 | then { | |
180 | - | let | |
168 | + | let ac = l | |
181 | 169 | true | |
182 | 170 | } | |
183 | 171 | else if ($isInstanceOf(l, "TransferTransaction")) | |
184 | 172 | then { | |
185 | - | let | |
173 | + | let Z = l | |
186 | 174 | true | |
187 | 175 | } | |
188 | 176 | else if ($isInstanceOf(l, "ExchangeTransaction")) | |
189 | 177 | then { | |
190 | - | let | |
191 | - | let | |
178 | + | let Z = l | |
179 | + | let ad = if (!(isDefined(Z.sellOrder.assetPair.priceAsset))) | |
192 | 180 | then true | |
193 | - | else !(isDefined( | |
194 | - | | |
181 | + | else !(isDefined(Z.sellOrder.assetPair.amountAsset)) | |
182 | + | ad | |
195 | 183 | } | |
196 | 184 | else if ($isInstanceOf(l, "InvokeScriptTransaction")) | |
197 | 185 | then { | |
198 | - | let | |
186 | + | let ae = l | |
199 | 187 | true | |
200 | 188 | } | |
201 | 189 | else false | |
202 | 190 | } | |
203 | 191 |
github/deemru/w8io/026f985 57.78 ms ◑