1pub use i_outbox::*;
2#[allow(
5 clippy::enum_variant_names,
6 clippy::too_many_arguments,
7 clippy::upper_case_acronyms,
8 clippy::type_complexity,
9 dead_code,
10 non_camel_case_types,
11)]
12pub mod i_outbox {
13 #[rustfmt::skip]
14 const __ABI: &str = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"l2Sender\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"zero\",\"type\":\"uint256\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"transactionIndex\",\"type\":\"uint256\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"OutBoxTransactionExecuted\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\",\"components\":[],\"indexed\":true},{\"internalType\":\"bytes32\",\"name\":\"outputRoot\",\"type\":\"bytes32\",\"components\":[],\"indexed\":true}],\"type\":\"event\",\"name\":\"SendRootUpdated\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"OUTBOX_VERSION\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"l2Sender\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"l2Block\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"l1Block\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"l2Timestamp\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\",\"components\":[]}],\"stateMutability\":\"pure\",\"type\":\"function\",\"name\":\"calculateItemHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"proof\",\"type\":\"bytes32[]\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"path\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"bytes32\",\"name\":\"item\",\"type\":\"bytes32\",\"components\":[]}],\"stateMutability\":\"pure\",\"type\":\"function\",\"name\":\"calculateMerkleRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"proof\",\"type\":\"bytes32[]\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"l2Sender\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"l2Block\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"l1Block\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"l2Timestamp\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"executeTransaction\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"l2Sender\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"l2Block\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"l1Block\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"l2Timestamp\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"executeTransactionSimulation\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"isSpent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"l2ToL1Block\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"l2ToL1EthBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"l2ToL1OutputId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"l2ToL1Sender\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"l2ToL1Timestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"rollup\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"roots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"spent\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"sendRoot\",\"type\":\"bytes32\",\"components\":[]},{\"internalType\":\"bytes32\",\"name\":\"l2BlockHash\",\"type\":\"bytes32\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"updateSendRoot\",\"outputs\":[]}]";
15 pub static IOUTBOX_ABI: ::ethers_contract::Lazy<::ethers_core::abi::Abi> = ::ethers_contract::Lazy::new(||
17 ::ethers_core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid"));
18 pub struct IOutbox<M>(::ethers_contract::Contract<M>);
19 impl<M> ::core::clone::Clone for IOutbox<M> {
20 fn clone(&self) -> Self {
21 Self(::core::clone::Clone::clone(&self.0))
22 }
23 }
24 impl<M> ::core::ops::Deref for IOutbox<M> {
25 type Target = ::ethers_contract::Contract<M>;
26 fn deref(&self) -> &Self::Target {
27 &self.0
28 }
29 }
30 impl<M> ::core::ops::DerefMut for IOutbox<M> {
31 fn deref_mut(&mut self) -> &mut Self::Target {
32 &mut self.0
33 }
34 }
35 impl<M> ::core::fmt::Debug for IOutbox<M> {
36 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
37 f.debug_tuple(stringify!(IOutbox)).field(&self.address()).finish()
38 }
39 }
40 impl<M: ::ethers_providers::Middleware> IOutbox<M> {
41 pub fn new<T: Into<::ethers_core::types::Address>>(
44 address: T,
45 client: ::std::sync::Arc<M>,
46 ) -> Self {
47 Self(
48 ::ethers_contract::Contract::new(
49 address.into(),
50 IOUTBOX_ABI.clone(),
51 client,
52 ),
53 )
54 }
55 pub fn outbox_version(
57 &self,
58 ) -> ::ethers_contract::builders::ContractCall<M, u128> {
59 self.0
60 .method_hash([199, 81, 132, 223], ())
61 .expect("method not found (this should never happen)")
62 }
63 pub fn bridge(
65 &self,
66 ) -> ::ethers_contract::builders::ContractCall<
67 M,
68 ::ethers_core::types::Address,
69 > {
70 self.0
71 .method_hash([231, 140, 234, 146], ())
72 .expect("method not found (this should never happen)")
73 }
74 pub fn calculate_item_hash(
76 &self,
77 l_2_sender: ::ethers_core::types::Address,
78 to: ::ethers_core::types::Address,
79 l_2_block: ::ethers_core::types::U256,
80 l_1_block: ::ethers_core::types::U256,
81 l_2_timestamp: ::ethers_core::types::U256,
82 value: ::ethers_core::types::U256,
83 data: ::ethers_core::types::Bytes,
84 ) -> ::ethers_contract::builders::ContractCall<M, [u8; 32]> {
85 self.0
86 .method_hash(
87 [159, 12, 4, 191],
88 (l_2_sender, to, l_2_block, l_1_block, l_2_timestamp, value, data),
89 )
90 .expect("method not found (this should never happen)")
91 }
92 pub fn calculate_merkle_root(
94 &self,
95 proof: ::std::vec::Vec<[u8; 32]>,
96 path: ::ethers_core::types::U256,
97 item: [u8; 32],
98 ) -> ::ethers_contract::builders::ContractCall<M, [u8; 32]> {
99 self.0
100 .method_hash([0, 116, 54, 211], (proof, path, item))
101 .expect("method not found (this should never happen)")
102 }
103 pub fn execute_transaction(
105 &self,
106 proof: ::std::vec::Vec<[u8; 32]>,
107 index: ::ethers_core::types::U256,
108 l_2_sender: ::ethers_core::types::Address,
109 to: ::ethers_core::types::Address,
110 l_2_block: ::ethers_core::types::U256,
111 l_1_block: ::ethers_core::types::U256,
112 l_2_timestamp: ::ethers_core::types::U256,
113 value: ::ethers_core::types::U256,
114 data: ::ethers_core::types::Bytes,
115 ) -> ::ethers_contract::builders::ContractCall<M, ()> {
116 self.0
117 .method_hash(
118 [8, 99, 90, 149],
119 (
120 proof,
121 index,
122 l_2_sender,
123 to,
124 l_2_block,
125 l_1_block,
126 l_2_timestamp,
127 value,
128 data,
129 ),
130 )
131 .expect("method not found (this should never happen)")
132 }
133 pub fn execute_transaction_simulation(
135 &self,
136 index: ::ethers_core::types::U256,
137 l_2_sender: ::ethers_core::types::Address,
138 to: ::ethers_core::types::Address,
139 l_2_block: ::ethers_core::types::U256,
140 l_1_block: ::ethers_core::types::U256,
141 l_2_timestamp: ::ethers_core::types::U256,
142 value: ::ethers_core::types::U256,
143 data: ::ethers_core::types::Bytes,
144 ) -> ::ethers_contract::builders::ContractCall<M, ()> {
145 self.0
146 .method_hash(
147 [40, 142, 91, 16],
148 (
149 index,
150 l_2_sender,
151 to,
152 l_2_block,
153 l_1_block,
154 l_2_timestamp,
155 value,
156 data,
157 ),
158 )
159 .expect("method not found (this should never happen)")
160 }
161 pub fn is_spent(
163 &self,
164 index: ::ethers_core::types::U256,
165 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
166 self.0
167 .method_hash([90, 18, 158, 254], index)
168 .expect("method not found (this should never happen)")
169 }
170 pub fn l_2_to_l1_block(
172 &self,
173 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
174 self.0
175 .method_hash([70, 84, 119, 144], ())
176 .expect("method not found (this should never happen)")
177 }
178 pub fn l_2_to_l1_eth_block(
180 &self,
181 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
182 self.0
183 .method_hash([133, 21, 188, 106], ())
184 .expect("method not found (this should never happen)")
185 }
186 pub fn l_2_to_l1_output_id(
188 &self,
189 ) -> ::ethers_contract::builders::ContractCall<M, [u8; 32]> {
190 self.0
191 .method_hash([114, 242, 168, 199], ())
192 .expect("method not found (this should never happen)")
193 }
194 pub fn l_2_to_l1_sender(
196 &self,
197 ) -> ::ethers_contract::builders::ContractCall<
198 M,
199 ::ethers_core::types::Address,
200 > {
201 self.0
202 .method_hash([128, 100, 139, 2], ())
203 .expect("method not found (this should never happen)")
204 }
205 pub fn l_2_to_l1_timestamp(
207 &self,
208 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
209 self.0
210 .method_hash([176, 243, 5, 55], ())
211 .expect("method not found (this should never happen)")
212 }
213 pub fn rollup(
215 &self,
216 ) -> ::ethers_contract::builders::ContractCall<
217 M,
218 ::ethers_core::types::Address,
219 > {
220 self.0
221 .method_hash([203, 35, 188, 181], ())
222 .expect("method not found (this should never happen)")
223 }
224 pub fn roots(
226 &self,
227 p0: [u8; 32],
228 ) -> ::ethers_contract::builders::ContractCall<M, [u8; 32]> {
229 self.0
230 .method_hash([174, 109, 234, 215], p0)
231 .expect("method not found (this should never happen)")
232 }
233 pub fn spent(
235 &self,
236 p0: ::ethers_core::types::U256,
237 ) -> ::ethers_contract::builders::ContractCall<M, [u8; 32]> {
238 self.0
239 .method_hash([213, 181, 204, 35], p0)
240 .expect("method not found (this should never happen)")
241 }
242 pub fn update_send_root(
244 &self,
245 send_root: [u8; 32],
246 l_2_block_hash: [u8; 32],
247 ) -> ::ethers_contract::builders::ContractCall<M, ()> {
248 self.0
249 .method_hash([160, 76, 238, 96], (send_root, l_2_block_hash))
250 .expect("method not found (this should never happen)")
251 }
252 pub fn out_box_transaction_executed_filter(
254 &self,
255 ) -> ::ethers_contract::builders::Event<
256 ::std::sync::Arc<M>,
257 M,
258 OutBoxTransactionExecutedFilter,
259 > {
260 self.0.event()
261 }
262 pub fn send_root_updated_filter(
264 &self,
265 ) -> ::ethers_contract::builders::Event<
266 ::std::sync::Arc<M>,
267 M,
268 SendRootUpdatedFilter,
269 > {
270 self.0.event()
271 }
272 pub fn events(
274 &self,
275 ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, IOutboxEvents> {
276 self.0.event_with_filter(::core::default::Default::default())
277 }
278 }
279 impl<M: ::ethers_providers::Middleware> From<::ethers_contract::Contract<M>>
280 for IOutbox<M> {
281 fn from(contract: ::ethers_contract::Contract<M>) -> Self {
282 Self::new(contract.address(), contract.client())
283 }
284 }
285 #[derive(
286 Clone,
287 ::ethers_contract::EthEvent,
288 ::ethers_contract::EthDisplay,
289 Default,
290 Debug,
291 PartialEq,
292 Eq,
293 Hash
294 )]
295 #[ethevent(
296 name = "OutBoxTransactionExecuted",
297 abi = "OutBoxTransactionExecuted(address,address,uint256,uint256)"
298 )]
299 pub struct OutBoxTransactionExecutedFilter {
300 #[ethevent(indexed)]
301 pub to: ::ethers_core::types::Address,
302 #[ethevent(indexed)]
303 pub l_2_sender: ::ethers_core::types::Address,
304 #[ethevent(indexed)]
305 pub zero: ::ethers_core::types::U256,
306 pub transaction_index: ::ethers_core::types::U256,
307 }
308 #[derive(
309 Clone,
310 ::ethers_contract::EthEvent,
311 ::ethers_contract::EthDisplay,
312 Default,
313 Debug,
314 PartialEq,
315 Eq,
316 Hash
317 )]
318 #[ethevent(name = "SendRootUpdated", abi = "SendRootUpdated(bytes32,bytes32)")]
319 pub struct SendRootUpdatedFilter {
320 #[ethevent(indexed)]
321 pub block_hash: [u8; 32],
322 #[ethevent(indexed)]
323 pub output_root: [u8; 32],
324 }
325 #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
327 pub enum IOutboxEvents {
328 OutBoxTransactionExecutedFilter(OutBoxTransactionExecutedFilter),
329 SendRootUpdatedFilter(SendRootUpdatedFilter),
330 }
331 impl ::ethers_contract::EthLogDecode for IOutboxEvents {
332 fn decode_log(
333 log: &::ethers_core::abi::RawLog,
334 ) -> ::core::result::Result<Self, ::ethers_core::abi::Error> {
335 if let Ok(decoded) = OutBoxTransactionExecutedFilter::decode_log(log) {
336 return Ok(IOutboxEvents::OutBoxTransactionExecutedFilter(decoded));
337 }
338 if let Ok(decoded) = SendRootUpdatedFilter::decode_log(log) {
339 return Ok(IOutboxEvents::SendRootUpdatedFilter(decoded));
340 }
341 Err(::ethers_core::abi::Error::InvalidData)
342 }
343 }
344 impl ::core::fmt::Display for IOutboxEvents {
345 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
346 match self {
347 Self::OutBoxTransactionExecutedFilter(element) => {
348 ::core::fmt::Display::fmt(element, f)
349 }
350 Self::SendRootUpdatedFilter(element) => {
351 ::core::fmt::Display::fmt(element, f)
352 }
353 }
354 }
355 }
356 impl ::core::convert::From<OutBoxTransactionExecutedFilter> for IOutboxEvents {
357 fn from(value: OutBoxTransactionExecutedFilter) -> Self {
358 Self::OutBoxTransactionExecutedFilter(value)
359 }
360 }
361 impl ::core::convert::From<SendRootUpdatedFilter> for IOutboxEvents {
362 fn from(value: SendRootUpdatedFilter) -> Self {
363 Self::SendRootUpdatedFilter(value)
364 }
365 }
366 #[derive(
368 Clone,
369 ::ethers_contract::EthCall,
370 ::ethers_contract::EthDisplay,
371 Default,
372 Debug,
373 PartialEq,
374 Eq,
375 Hash
376 )]
377 #[ethcall(name = "OUTBOX_VERSION", abi = "OUTBOX_VERSION()")]
378 pub struct OutboxVersionCall;
379 #[derive(
381 Clone,
382 ::ethers_contract::EthCall,
383 ::ethers_contract::EthDisplay,
384 Default,
385 Debug,
386 PartialEq,
387 Eq,
388 Hash
389 )]
390 #[ethcall(name = "bridge", abi = "bridge()")]
391 pub struct BridgeCall;
392 #[derive(
394 Clone,
395 ::ethers_contract::EthCall,
396 ::ethers_contract::EthDisplay,
397 Default,
398 Debug,
399 PartialEq,
400 Eq,
401 Hash
402 )]
403 #[ethcall(
404 name = "calculateItemHash",
405 abi = "calculateItemHash(address,address,uint256,uint256,uint256,uint256,bytes)"
406 )]
407 pub struct CalculateItemHashCall {
408 pub l_2_sender: ::ethers_core::types::Address,
409 pub to: ::ethers_core::types::Address,
410 pub l_2_block: ::ethers_core::types::U256,
411 pub l_1_block: ::ethers_core::types::U256,
412 pub l_2_timestamp: ::ethers_core::types::U256,
413 pub value: ::ethers_core::types::U256,
414 pub data: ::ethers_core::types::Bytes,
415 }
416 #[derive(
418 Clone,
419 ::ethers_contract::EthCall,
420 ::ethers_contract::EthDisplay,
421 Default,
422 Debug,
423 PartialEq,
424 Eq,
425 Hash
426 )]
427 #[ethcall(
428 name = "calculateMerkleRoot",
429 abi = "calculateMerkleRoot(bytes32[],uint256,bytes32)"
430 )]
431 pub struct CalculateMerkleRootCall {
432 pub proof: ::std::vec::Vec<[u8; 32]>,
433 pub path: ::ethers_core::types::U256,
434 pub item: [u8; 32],
435 }
436 #[derive(
438 Clone,
439 ::ethers_contract::EthCall,
440 ::ethers_contract::EthDisplay,
441 Default,
442 Debug,
443 PartialEq,
444 Eq,
445 Hash
446 )]
447 #[ethcall(
448 name = "executeTransaction",
449 abi = "executeTransaction(bytes32[],uint256,address,address,uint256,uint256,uint256,uint256,bytes)"
450 )]
451 pub struct ExecuteTransactionCall {
452 pub proof: ::std::vec::Vec<[u8; 32]>,
453 pub index: ::ethers_core::types::U256,
454 pub l_2_sender: ::ethers_core::types::Address,
455 pub to: ::ethers_core::types::Address,
456 pub l_2_block: ::ethers_core::types::U256,
457 pub l_1_block: ::ethers_core::types::U256,
458 pub l_2_timestamp: ::ethers_core::types::U256,
459 pub value: ::ethers_core::types::U256,
460 pub data: ::ethers_core::types::Bytes,
461 }
462 #[derive(
464 Clone,
465 ::ethers_contract::EthCall,
466 ::ethers_contract::EthDisplay,
467 Default,
468 Debug,
469 PartialEq,
470 Eq,
471 Hash
472 )]
473 #[ethcall(
474 name = "executeTransactionSimulation",
475 abi = "executeTransactionSimulation(uint256,address,address,uint256,uint256,uint256,uint256,bytes)"
476 )]
477 pub struct ExecuteTransactionSimulationCall {
478 pub index: ::ethers_core::types::U256,
479 pub l_2_sender: ::ethers_core::types::Address,
480 pub to: ::ethers_core::types::Address,
481 pub l_2_block: ::ethers_core::types::U256,
482 pub l_1_block: ::ethers_core::types::U256,
483 pub l_2_timestamp: ::ethers_core::types::U256,
484 pub value: ::ethers_core::types::U256,
485 pub data: ::ethers_core::types::Bytes,
486 }
487 #[derive(
489 Clone,
490 ::ethers_contract::EthCall,
491 ::ethers_contract::EthDisplay,
492 Default,
493 Debug,
494 PartialEq,
495 Eq,
496 Hash
497 )]
498 #[ethcall(name = "isSpent", abi = "isSpent(uint256)")]
499 pub struct IsSpentCall {
500 pub index: ::ethers_core::types::U256,
501 }
502 #[derive(
504 Clone,
505 ::ethers_contract::EthCall,
506 ::ethers_contract::EthDisplay,
507 Default,
508 Debug,
509 PartialEq,
510 Eq,
511 Hash
512 )]
513 #[ethcall(name = "l2ToL1Block", abi = "l2ToL1Block()")]
514 pub struct L2ToL1BlockCall;
515 #[derive(
517 Clone,
518 ::ethers_contract::EthCall,
519 ::ethers_contract::EthDisplay,
520 Default,
521 Debug,
522 PartialEq,
523 Eq,
524 Hash
525 )]
526 #[ethcall(name = "l2ToL1EthBlock", abi = "l2ToL1EthBlock()")]
527 pub struct L2ToL1EthBlockCall;
528 #[derive(
530 Clone,
531 ::ethers_contract::EthCall,
532 ::ethers_contract::EthDisplay,
533 Default,
534 Debug,
535 PartialEq,
536 Eq,
537 Hash
538 )]
539 #[ethcall(name = "l2ToL1OutputId", abi = "l2ToL1OutputId()")]
540 pub struct L2ToL1OutputIdCall;
541 #[derive(
543 Clone,
544 ::ethers_contract::EthCall,
545 ::ethers_contract::EthDisplay,
546 Default,
547 Debug,
548 PartialEq,
549 Eq,
550 Hash
551 )]
552 #[ethcall(name = "l2ToL1Sender", abi = "l2ToL1Sender()")]
553 pub struct L2ToL1SenderCall;
554 #[derive(
556 Clone,
557 ::ethers_contract::EthCall,
558 ::ethers_contract::EthDisplay,
559 Default,
560 Debug,
561 PartialEq,
562 Eq,
563 Hash
564 )]
565 #[ethcall(name = "l2ToL1Timestamp", abi = "l2ToL1Timestamp()")]
566 pub struct L2ToL1TimestampCall;
567 #[derive(
569 Clone,
570 ::ethers_contract::EthCall,
571 ::ethers_contract::EthDisplay,
572 Default,
573 Debug,
574 PartialEq,
575 Eq,
576 Hash
577 )]
578 #[ethcall(name = "rollup", abi = "rollup()")]
579 pub struct RollupCall;
580 #[derive(
582 Clone,
583 ::ethers_contract::EthCall,
584 ::ethers_contract::EthDisplay,
585 Default,
586 Debug,
587 PartialEq,
588 Eq,
589 Hash
590 )]
591 #[ethcall(name = "roots", abi = "roots(bytes32)")]
592 pub struct RootsCall(pub [u8; 32]);
593 #[derive(
595 Clone,
596 ::ethers_contract::EthCall,
597 ::ethers_contract::EthDisplay,
598 Default,
599 Debug,
600 PartialEq,
601 Eq,
602 Hash
603 )]
604 #[ethcall(name = "spent", abi = "spent(uint256)")]
605 pub struct SpentCall(pub ::ethers_core::types::U256);
606 #[derive(
608 Clone,
609 ::ethers_contract::EthCall,
610 ::ethers_contract::EthDisplay,
611 Default,
612 Debug,
613 PartialEq,
614 Eq,
615 Hash
616 )]
617 #[ethcall(name = "updateSendRoot", abi = "updateSendRoot(bytes32,bytes32)")]
618 pub struct UpdateSendRootCall {
619 pub send_root: [u8; 32],
620 pub l_2_block_hash: [u8; 32],
621 }
622 #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
624 pub enum IOutboxCalls {
625 OutboxVersion(OutboxVersionCall),
626 Bridge(BridgeCall),
627 CalculateItemHash(CalculateItemHashCall),
628 CalculateMerkleRoot(CalculateMerkleRootCall),
629 ExecuteTransaction(ExecuteTransactionCall),
630 ExecuteTransactionSimulation(ExecuteTransactionSimulationCall),
631 IsSpent(IsSpentCall),
632 L2ToL1Block(L2ToL1BlockCall),
633 L2ToL1EthBlock(L2ToL1EthBlockCall),
634 L2ToL1OutputId(L2ToL1OutputIdCall),
635 L2ToL1Sender(L2ToL1SenderCall),
636 L2ToL1Timestamp(L2ToL1TimestampCall),
637 Rollup(RollupCall),
638 Roots(RootsCall),
639 Spent(SpentCall),
640 UpdateSendRoot(UpdateSendRootCall),
641 }
642 impl ::ethers_core::abi::AbiDecode for IOutboxCalls {
643 fn decode(
644 data: impl AsRef<[u8]>,
645 ) -> ::core::result::Result<Self, ::ethers_core::abi::AbiError> {
646 let data = data.as_ref();
647 if let Ok(decoded)
648 = <OutboxVersionCall as ::ethers_core::abi::AbiDecode>::decode(data) {
649 return Ok(Self::OutboxVersion(decoded));
650 }
651 if let Ok(decoded)
652 = <BridgeCall as ::ethers_core::abi::AbiDecode>::decode(data) {
653 return Ok(Self::Bridge(decoded));
654 }
655 if let Ok(decoded)
656 = <CalculateItemHashCall as ::ethers_core::abi::AbiDecode>::decode(
657 data,
658 ) {
659 return Ok(Self::CalculateItemHash(decoded));
660 }
661 if let Ok(decoded)
662 = <CalculateMerkleRootCall as ::ethers_core::abi::AbiDecode>::decode(
663 data,
664 ) {
665 return Ok(Self::CalculateMerkleRoot(decoded));
666 }
667 if let Ok(decoded)
668 = <ExecuteTransactionCall as ::ethers_core::abi::AbiDecode>::decode(
669 data,
670 ) {
671 return Ok(Self::ExecuteTransaction(decoded));
672 }
673 if let Ok(decoded)
674 = <ExecuteTransactionSimulationCall as ::ethers_core::abi::AbiDecode>::decode(
675 data,
676 ) {
677 return Ok(Self::ExecuteTransactionSimulation(decoded));
678 }
679 if let Ok(decoded)
680 = <IsSpentCall as ::ethers_core::abi::AbiDecode>::decode(data) {
681 return Ok(Self::IsSpent(decoded));
682 }
683 if let Ok(decoded)
684 = <L2ToL1BlockCall as ::ethers_core::abi::AbiDecode>::decode(data) {
685 return Ok(Self::L2ToL1Block(decoded));
686 }
687 if let Ok(decoded)
688 = <L2ToL1EthBlockCall as ::ethers_core::abi::AbiDecode>::decode(data) {
689 return Ok(Self::L2ToL1EthBlock(decoded));
690 }
691 if let Ok(decoded)
692 = <L2ToL1OutputIdCall as ::ethers_core::abi::AbiDecode>::decode(data) {
693 return Ok(Self::L2ToL1OutputId(decoded));
694 }
695 if let Ok(decoded)
696 = <L2ToL1SenderCall as ::ethers_core::abi::AbiDecode>::decode(data) {
697 return Ok(Self::L2ToL1Sender(decoded));
698 }
699 if let Ok(decoded)
700 = <L2ToL1TimestampCall as ::ethers_core::abi::AbiDecode>::decode(data) {
701 return Ok(Self::L2ToL1Timestamp(decoded));
702 }
703 if let Ok(decoded)
704 = <RollupCall as ::ethers_core::abi::AbiDecode>::decode(data) {
705 return Ok(Self::Rollup(decoded));
706 }
707 if let Ok(decoded)
708 = <RootsCall as ::ethers_core::abi::AbiDecode>::decode(data) {
709 return Ok(Self::Roots(decoded));
710 }
711 if let Ok(decoded)
712 = <SpentCall as ::ethers_core::abi::AbiDecode>::decode(data) {
713 return Ok(Self::Spent(decoded));
714 }
715 if let Ok(decoded)
716 = <UpdateSendRootCall as ::ethers_core::abi::AbiDecode>::decode(data) {
717 return Ok(Self::UpdateSendRoot(decoded));
718 }
719 Err(::ethers_core::abi::Error::InvalidData.into())
720 }
721 }
722 impl ::ethers_core::abi::AbiEncode for IOutboxCalls {
723 fn encode(self) -> Vec<u8> {
724 match self {
725 Self::OutboxVersion(element) => {
726 ::ethers_core::abi::AbiEncode::encode(element)
727 }
728 Self::Bridge(element) => ::ethers_core::abi::AbiEncode::encode(element),
729 Self::CalculateItemHash(element) => {
730 ::ethers_core::abi::AbiEncode::encode(element)
731 }
732 Self::CalculateMerkleRoot(element) => {
733 ::ethers_core::abi::AbiEncode::encode(element)
734 }
735 Self::ExecuteTransaction(element) => {
736 ::ethers_core::abi::AbiEncode::encode(element)
737 }
738 Self::ExecuteTransactionSimulation(element) => {
739 ::ethers_core::abi::AbiEncode::encode(element)
740 }
741 Self::IsSpent(element) => ::ethers_core::abi::AbiEncode::encode(element),
742 Self::L2ToL1Block(element) => {
743 ::ethers_core::abi::AbiEncode::encode(element)
744 }
745 Self::L2ToL1EthBlock(element) => {
746 ::ethers_core::abi::AbiEncode::encode(element)
747 }
748 Self::L2ToL1OutputId(element) => {
749 ::ethers_core::abi::AbiEncode::encode(element)
750 }
751 Self::L2ToL1Sender(element) => {
752 ::ethers_core::abi::AbiEncode::encode(element)
753 }
754 Self::L2ToL1Timestamp(element) => {
755 ::ethers_core::abi::AbiEncode::encode(element)
756 }
757 Self::Rollup(element) => ::ethers_core::abi::AbiEncode::encode(element),
758 Self::Roots(element) => ::ethers_core::abi::AbiEncode::encode(element),
759 Self::Spent(element) => ::ethers_core::abi::AbiEncode::encode(element),
760 Self::UpdateSendRoot(element) => {
761 ::ethers_core::abi::AbiEncode::encode(element)
762 }
763 }
764 }
765 }
766 impl ::core::fmt::Display for IOutboxCalls {
767 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
768 match self {
769 Self::OutboxVersion(element) => ::core::fmt::Display::fmt(element, f),
770 Self::Bridge(element) => ::core::fmt::Display::fmt(element, f),
771 Self::CalculateItemHash(element) => ::core::fmt::Display::fmt(element, f),
772 Self::CalculateMerkleRoot(element) => {
773 ::core::fmt::Display::fmt(element, f)
774 }
775 Self::ExecuteTransaction(element) => {
776 ::core::fmt::Display::fmt(element, f)
777 }
778 Self::ExecuteTransactionSimulation(element) => {
779 ::core::fmt::Display::fmt(element, f)
780 }
781 Self::IsSpent(element) => ::core::fmt::Display::fmt(element, f),
782 Self::L2ToL1Block(element) => ::core::fmt::Display::fmt(element, f),
783 Self::L2ToL1EthBlock(element) => ::core::fmt::Display::fmt(element, f),
784 Self::L2ToL1OutputId(element) => ::core::fmt::Display::fmt(element, f),
785 Self::L2ToL1Sender(element) => ::core::fmt::Display::fmt(element, f),
786 Self::L2ToL1Timestamp(element) => ::core::fmt::Display::fmt(element, f),
787 Self::Rollup(element) => ::core::fmt::Display::fmt(element, f),
788 Self::Roots(element) => ::core::fmt::Display::fmt(element, f),
789 Self::Spent(element) => ::core::fmt::Display::fmt(element, f),
790 Self::UpdateSendRoot(element) => ::core::fmt::Display::fmt(element, f),
791 }
792 }
793 }
794 impl ::core::convert::From<OutboxVersionCall> for IOutboxCalls {
795 fn from(value: OutboxVersionCall) -> Self {
796 Self::OutboxVersion(value)
797 }
798 }
799 impl ::core::convert::From<BridgeCall> for IOutboxCalls {
800 fn from(value: BridgeCall) -> Self {
801 Self::Bridge(value)
802 }
803 }
804 impl ::core::convert::From<CalculateItemHashCall> for IOutboxCalls {
805 fn from(value: CalculateItemHashCall) -> Self {
806 Self::CalculateItemHash(value)
807 }
808 }
809 impl ::core::convert::From<CalculateMerkleRootCall> for IOutboxCalls {
810 fn from(value: CalculateMerkleRootCall) -> Self {
811 Self::CalculateMerkleRoot(value)
812 }
813 }
814 impl ::core::convert::From<ExecuteTransactionCall> for IOutboxCalls {
815 fn from(value: ExecuteTransactionCall) -> Self {
816 Self::ExecuteTransaction(value)
817 }
818 }
819 impl ::core::convert::From<ExecuteTransactionSimulationCall> for IOutboxCalls {
820 fn from(value: ExecuteTransactionSimulationCall) -> Self {
821 Self::ExecuteTransactionSimulation(value)
822 }
823 }
824 impl ::core::convert::From<IsSpentCall> for IOutboxCalls {
825 fn from(value: IsSpentCall) -> Self {
826 Self::IsSpent(value)
827 }
828 }
829 impl ::core::convert::From<L2ToL1BlockCall> for IOutboxCalls {
830 fn from(value: L2ToL1BlockCall) -> Self {
831 Self::L2ToL1Block(value)
832 }
833 }
834 impl ::core::convert::From<L2ToL1EthBlockCall> for IOutboxCalls {
835 fn from(value: L2ToL1EthBlockCall) -> Self {
836 Self::L2ToL1EthBlock(value)
837 }
838 }
839 impl ::core::convert::From<L2ToL1OutputIdCall> for IOutboxCalls {
840 fn from(value: L2ToL1OutputIdCall) -> Self {
841 Self::L2ToL1OutputId(value)
842 }
843 }
844 impl ::core::convert::From<L2ToL1SenderCall> for IOutboxCalls {
845 fn from(value: L2ToL1SenderCall) -> Self {
846 Self::L2ToL1Sender(value)
847 }
848 }
849 impl ::core::convert::From<L2ToL1TimestampCall> for IOutboxCalls {
850 fn from(value: L2ToL1TimestampCall) -> Self {
851 Self::L2ToL1Timestamp(value)
852 }
853 }
854 impl ::core::convert::From<RollupCall> for IOutboxCalls {
855 fn from(value: RollupCall) -> Self {
856 Self::Rollup(value)
857 }
858 }
859 impl ::core::convert::From<RootsCall> for IOutboxCalls {
860 fn from(value: RootsCall) -> Self {
861 Self::Roots(value)
862 }
863 }
864 impl ::core::convert::From<SpentCall> for IOutboxCalls {
865 fn from(value: SpentCall) -> Self {
866 Self::Spent(value)
867 }
868 }
869 impl ::core::convert::From<UpdateSendRootCall> for IOutboxCalls {
870 fn from(value: UpdateSendRootCall) -> Self {
871 Self::UpdateSendRoot(value)
872 }
873 }
874 #[derive(
876 Clone,
877 ::ethers_contract::EthAbiType,
878 ::ethers_contract::EthAbiCodec,
879 Default,
880 Debug,
881 PartialEq,
882 Eq,
883 Hash
884 )]
885 pub struct OutboxVersionReturn(pub u128);
886 #[derive(
888 Clone,
889 ::ethers_contract::EthAbiType,
890 ::ethers_contract::EthAbiCodec,
891 Default,
892 Debug,
893 PartialEq,
894 Eq,
895 Hash
896 )]
897 pub struct BridgeReturn(pub ::ethers_core::types::Address);
898 #[derive(
900 Clone,
901 ::ethers_contract::EthAbiType,
902 ::ethers_contract::EthAbiCodec,
903 Default,
904 Debug,
905 PartialEq,
906 Eq,
907 Hash
908 )]
909 pub struct CalculateItemHashReturn(pub [u8; 32]);
910 #[derive(
912 Clone,
913 ::ethers_contract::EthAbiType,
914 ::ethers_contract::EthAbiCodec,
915 Default,
916 Debug,
917 PartialEq,
918 Eq,
919 Hash
920 )]
921 pub struct CalculateMerkleRootReturn(pub [u8; 32]);
922 #[derive(
924 Clone,
925 ::ethers_contract::EthAbiType,
926 ::ethers_contract::EthAbiCodec,
927 Default,
928 Debug,
929 PartialEq,
930 Eq,
931 Hash
932 )]
933 pub struct IsSpentReturn(pub bool);
934 #[derive(
936 Clone,
937 ::ethers_contract::EthAbiType,
938 ::ethers_contract::EthAbiCodec,
939 Default,
940 Debug,
941 PartialEq,
942 Eq,
943 Hash
944 )]
945 pub struct L2ToL1BlockReturn(pub ::ethers_core::types::U256);
946 #[derive(
948 Clone,
949 ::ethers_contract::EthAbiType,
950 ::ethers_contract::EthAbiCodec,
951 Default,
952 Debug,
953 PartialEq,
954 Eq,
955 Hash
956 )]
957 pub struct L2ToL1EthBlockReturn(pub ::ethers_core::types::U256);
958 #[derive(
960 Clone,
961 ::ethers_contract::EthAbiType,
962 ::ethers_contract::EthAbiCodec,
963 Default,
964 Debug,
965 PartialEq,
966 Eq,
967 Hash
968 )]
969 pub struct L2ToL1OutputIdReturn(pub [u8; 32]);
970 #[derive(
972 Clone,
973 ::ethers_contract::EthAbiType,
974 ::ethers_contract::EthAbiCodec,
975 Default,
976 Debug,
977 PartialEq,
978 Eq,
979 Hash
980 )]
981 pub struct L2ToL1SenderReturn(pub ::ethers_core::types::Address);
982 #[derive(
984 Clone,
985 ::ethers_contract::EthAbiType,
986 ::ethers_contract::EthAbiCodec,
987 Default,
988 Debug,
989 PartialEq,
990 Eq,
991 Hash
992 )]
993 pub struct L2ToL1TimestampReturn(pub ::ethers_core::types::U256);
994 #[derive(
996 Clone,
997 ::ethers_contract::EthAbiType,
998 ::ethers_contract::EthAbiCodec,
999 Default,
1000 Debug,
1001 PartialEq,
1002 Eq,
1003 Hash
1004 )]
1005 pub struct RollupReturn(pub ::ethers_core::types::Address);
1006 #[derive(
1008 Clone,
1009 ::ethers_contract::EthAbiType,
1010 ::ethers_contract::EthAbiCodec,
1011 Default,
1012 Debug,
1013 PartialEq,
1014 Eq,
1015 Hash
1016 )]
1017 pub struct RootsReturn(pub [u8; 32]);
1018 #[derive(
1020 Clone,
1021 ::ethers_contract::EthAbiType,
1022 ::ethers_contract::EthAbiCodec,
1023 Default,
1024 Debug,
1025 PartialEq,
1026 Eq,
1027 Hash
1028 )]
1029 pub struct SpentReturn(pub [u8; 32]);
1030}