1pub use i_arb_sys::*;
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_arb_sys {
13 #[rustfmt::skip]
14 const __ABI: &str = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\",\"components\":[],\"indexed\":false},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"uniqueId\",\"type\":\"uint256\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"batchNumber\",\"type\":\"uint256\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"indexInBatch\",\"type\":\"uint256\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint256\",\"name\":\"arbBlockNum\",\"type\":\"uint256\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint256\",\"name\":\"ethBlockNum\",\"type\":\"uint256\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint256\",\"name\":\"callvalue\",\"type\":\"uint256\",\"components\":[],\"indexed\":false},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"L2ToL1Transaction\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\",\"components\":[],\"indexed\":false},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"hash\",\"type\":\"uint256\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"position\",\"type\":\"uint256\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"arbBlockNum\",\"type\":\"uint256\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint256\",\"name\":\"ethBlockNum\",\"type\":\"uint256\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint256\",\"name\":\"callvalue\",\"type\":\"uint256\",\"components\":[],\"indexed\":false},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"L2ToL1Tx\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reserved\",\"type\":\"uint256\",\"components\":[],\"indexed\":true},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"position\",\"type\":\"uint256\",\"components\":[],\"indexed\":true}],\"type\":\"event\",\"name\":\"SendMerkleUpdate\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"arbBlockNum\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"arbBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"arbBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"arbChainID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"arbOSVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"getStorageGasAvailable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"isTopLevelCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"unused\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"pure\",\"type\":\"function\",\"name\":\"mapL1SenderContractAddressToL2Alias\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"myCallersAddressWithoutAliasing\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"sendMerkleTreeState\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\",\"components\":[]},{\"internalType\":\"bytes32[]\",\"name\":\"partials\",\"type\":\"bytes32[]\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\",\"components\":[]}],\"stateMutability\":\"payable\",\"type\":\"function\",\"name\":\"sendTxToL1\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"wasMyCallersAddressAliased\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"payable\",\"type\":\"function\",\"name\":\"withdrawEth\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]}]";
15 pub static IARBSYS_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 IArbSys<M>(::ethers_contract::Contract<M>);
19 impl<M> ::core::clone::Clone for IArbSys<M> {
20 fn clone(&self) -> Self {
21 Self(::core::clone::Clone::clone(&self.0))
22 }
23 }
24 impl<M> ::core::ops::Deref for IArbSys<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 IArbSys<M> {
31 fn deref_mut(&mut self) -> &mut Self::Target {
32 &mut self.0
33 }
34 }
35 impl<M> ::core::fmt::Debug for IArbSys<M> {
36 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
37 f.debug_tuple(stringify!(IArbSys)).field(&self.address()).finish()
38 }
39 }
40 impl<M: ::ethers_providers::Middleware> IArbSys<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 IARBSYS_ABI.clone(),
51 client,
52 ),
53 )
54 }
55 pub fn arb_block_hash(
57 &self,
58 arb_block_num: ::ethers_core::types::U256,
59 ) -> ::ethers_contract::builders::ContractCall<M, [u8; 32]> {
60 self.0
61 .method_hash([43, 64, 122, 130], arb_block_num)
62 .expect("method not found (this should never happen)")
63 }
64 pub fn arb_block_number(
66 &self,
67 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
68 self.0
69 .method_hash([163, 177, 179, 29], ())
70 .expect("method not found (this should never happen)")
71 }
72 pub fn arb_chain_id(
74 &self,
75 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
76 self.0
77 .method_hash([209, 39, 245, 74], ())
78 .expect("method not found (this should never happen)")
79 }
80 pub fn arb_os_version(
82 &self,
83 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
84 self.0
85 .method_hash([5, 16, 56, 242], ())
86 .expect("method not found (this should never happen)")
87 }
88 pub fn get_storage_gas_available(
90 &self,
91 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
92 self.0
93 .method_hash([169, 69, 151, 255], ())
94 .expect("method not found (this should never happen)")
95 }
96 pub fn is_top_level_call(
98 &self,
99 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
100 self.0
101 .method_hash([8, 189, 98, 76], ())
102 .expect("method not found (this should never happen)")
103 }
104 pub fn map_l1_sender_contract_address_to_l2_alias(
106 &self,
107 sender: ::ethers_core::types::Address,
108 unused: ::ethers_core::types::Address,
109 ) -> ::ethers_contract::builders::ContractCall<
110 M,
111 ::ethers_core::types::Address,
112 > {
113 self.0
114 .method_hash([77, 187, 213, 6], (sender, unused))
115 .expect("method not found (this should never happen)")
116 }
117 pub fn my_callers_address_without_aliasing(
119 &self,
120 ) -> ::ethers_contract::builders::ContractCall<
121 M,
122 ::ethers_core::types::Address,
123 > {
124 self.0
125 .method_hash([215, 69, 35, 179], ())
126 .expect("method not found (this should never happen)")
127 }
128 pub fn send_merkle_tree_state(
130 &self,
131 ) -> ::ethers_contract::builders::ContractCall<
132 M,
133 (::ethers_core::types::U256, [u8; 32], ::std::vec::Vec<[u8; 32]>),
134 > {
135 self.0
136 .method_hash([122, 238, 205, 42], ())
137 .expect("method not found (this should never happen)")
138 }
139 pub fn send_tx_to_l1(
141 &self,
142 destination: ::ethers_core::types::Address,
143 data: ::ethers_core::types::Bytes,
144 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
145 self.0
146 .method_hash([146, 140, 22, 154], (destination, data))
147 .expect("method not found (this should never happen)")
148 }
149 pub fn was_my_callers_address_aliased(
151 &self,
152 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
153 self.0
154 .method_hash([23, 90, 38, 11], ())
155 .expect("method not found (this should never happen)")
156 }
157 pub fn withdraw_eth(
159 &self,
160 destination: ::ethers_core::types::Address,
161 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
162 self.0
163 .method_hash([37, 225, 96, 99], destination)
164 .expect("method not found (this should never happen)")
165 }
166 pub fn l2_to_l1_transaction_filter(
168 &self,
169 ) -> ::ethers_contract::builders::Event<
170 ::std::sync::Arc<M>,
171 M,
172 L2ToL1TransactionFilter,
173 > {
174 self.0.event()
175 }
176 pub fn l2_to_l1_tx_filter(
178 &self,
179 ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, L2ToL1TxFilter> {
180 self.0.event()
181 }
182 pub fn send_merkle_update_filter(
184 &self,
185 ) -> ::ethers_contract::builders::Event<
186 ::std::sync::Arc<M>,
187 M,
188 SendMerkleUpdateFilter,
189 > {
190 self.0.event()
191 }
192 pub fn events(
194 &self,
195 ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, IArbSysEvents> {
196 self.0.event_with_filter(::core::default::Default::default())
197 }
198 }
199 impl<M: ::ethers_providers::Middleware> From<::ethers_contract::Contract<M>>
200 for IArbSys<M> {
201 fn from(contract: ::ethers_contract::Contract<M>) -> Self {
202 Self::new(contract.address(), contract.client())
203 }
204 }
205 #[derive(
206 Clone,
207 ::ethers_contract::EthEvent,
208 ::ethers_contract::EthDisplay,
209 Default,
210 Debug,
211 PartialEq,
212 Eq,
213 Hash
214 )]
215 #[ethevent(
216 name = "L2ToL1Transaction",
217 abi = "L2ToL1Transaction(address,address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bytes)"
218 )]
219 pub struct L2ToL1TransactionFilter {
220 pub caller: ::ethers_core::types::Address,
221 #[ethevent(indexed)]
222 pub destination: ::ethers_core::types::Address,
223 #[ethevent(indexed)]
224 pub unique_id: ::ethers_core::types::U256,
225 #[ethevent(indexed)]
226 pub batch_number: ::ethers_core::types::U256,
227 pub index_in_batch: ::ethers_core::types::U256,
228 pub arb_block_num: ::ethers_core::types::U256,
229 pub eth_block_num: ::ethers_core::types::U256,
230 pub timestamp: ::ethers_core::types::U256,
231 pub callvalue: ::ethers_core::types::U256,
232 pub data: ::ethers_core::types::Bytes,
233 }
234 #[derive(
235 Clone,
236 ::ethers_contract::EthEvent,
237 ::ethers_contract::EthDisplay,
238 Default,
239 Debug,
240 PartialEq,
241 Eq,
242 Hash
243 )]
244 #[ethevent(
245 name = "L2ToL1Tx",
246 abi = "L2ToL1Tx(address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes)"
247 )]
248 pub struct L2ToL1TxFilter {
249 pub caller: ::ethers_core::types::Address,
250 #[ethevent(indexed)]
251 pub destination: ::ethers_core::types::Address,
252 #[ethevent(indexed)]
253 pub hash: ::ethers_core::types::U256,
254 #[ethevent(indexed)]
255 pub position: ::ethers_core::types::U256,
256 pub arb_block_num: ::ethers_core::types::U256,
257 pub eth_block_num: ::ethers_core::types::U256,
258 pub timestamp: ::ethers_core::types::U256,
259 pub callvalue: ::ethers_core::types::U256,
260 pub data: ::ethers_core::types::Bytes,
261 }
262 #[derive(
263 Clone,
264 ::ethers_contract::EthEvent,
265 ::ethers_contract::EthDisplay,
266 Default,
267 Debug,
268 PartialEq,
269 Eq,
270 Hash
271 )]
272 #[ethevent(
273 name = "SendMerkleUpdate",
274 abi = "SendMerkleUpdate(uint256,bytes32,uint256)"
275 )]
276 pub struct SendMerkleUpdateFilter {
277 #[ethevent(indexed)]
278 pub reserved: ::ethers_core::types::U256,
279 #[ethevent(indexed)]
280 pub hash: [u8; 32],
281 #[ethevent(indexed)]
282 pub position: ::ethers_core::types::U256,
283 }
284 #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
286 pub enum IArbSysEvents {
287 L2ToL1TransactionFilter(L2ToL1TransactionFilter),
288 L2ToL1TxFilter(L2ToL1TxFilter),
289 SendMerkleUpdateFilter(SendMerkleUpdateFilter),
290 }
291 impl ::ethers_contract::EthLogDecode for IArbSysEvents {
292 fn decode_log(
293 log: &::ethers_core::abi::RawLog,
294 ) -> ::core::result::Result<Self, ::ethers_core::abi::Error> {
295 if let Ok(decoded) = L2ToL1TransactionFilter::decode_log(log) {
296 return Ok(IArbSysEvents::L2ToL1TransactionFilter(decoded));
297 }
298 if let Ok(decoded) = L2ToL1TxFilter::decode_log(log) {
299 return Ok(IArbSysEvents::L2ToL1TxFilter(decoded));
300 }
301 if let Ok(decoded) = SendMerkleUpdateFilter::decode_log(log) {
302 return Ok(IArbSysEvents::SendMerkleUpdateFilter(decoded));
303 }
304 Err(::ethers_core::abi::Error::InvalidData)
305 }
306 }
307 impl ::core::fmt::Display for IArbSysEvents {
308 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
309 match self {
310 Self::L2ToL1TransactionFilter(element) => {
311 ::core::fmt::Display::fmt(element, f)
312 }
313 Self::L2ToL1TxFilter(element) => ::core::fmt::Display::fmt(element, f),
314 Self::SendMerkleUpdateFilter(element) => {
315 ::core::fmt::Display::fmt(element, f)
316 }
317 }
318 }
319 }
320 impl ::core::convert::From<L2ToL1TransactionFilter> for IArbSysEvents {
321 fn from(value: L2ToL1TransactionFilter) -> Self {
322 Self::L2ToL1TransactionFilter(value)
323 }
324 }
325 impl ::core::convert::From<L2ToL1TxFilter> for IArbSysEvents {
326 fn from(value: L2ToL1TxFilter) -> Self {
327 Self::L2ToL1TxFilter(value)
328 }
329 }
330 impl ::core::convert::From<SendMerkleUpdateFilter> for IArbSysEvents {
331 fn from(value: SendMerkleUpdateFilter) -> Self {
332 Self::SendMerkleUpdateFilter(value)
333 }
334 }
335 #[derive(
337 Clone,
338 ::ethers_contract::EthCall,
339 ::ethers_contract::EthDisplay,
340 Default,
341 Debug,
342 PartialEq,
343 Eq,
344 Hash
345 )]
346 #[ethcall(name = "arbBlockHash", abi = "arbBlockHash(uint256)")]
347 pub struct ArbBlockHashCall {
348 pub arb_block_num: ::ethers_core::types::U256,
349 }
350 #[derive(
352 Clone,
353 ::ethers_contract::EthCall,
354 ::ethers_contract::EthDisplay,
355 Default,
356 Debug,
357 PartialEq,
358 Eq,
359 Hash
360 )]
361 #[ethcall(name = "arbBlockNumber", abi = "arbBlockNumber()")]
362 pub struct ArbBlockNumberCall;
363 #[derive(
365 Clone,
366 ::ethers_contract::EthCall,
367 ::ethers_contract::EthDisplay,
368 Default,
369 Debug,
370 PartialEq,
371 Eq,
372 Hash
373 )]
374 #[ethcall(name = "arbChainID", abi = "arbChainID()")]
375 pub struct ArbChainIDCall;
376 #[derive(
378 Clone,
379 ::ethers_contract::EthCall,
380 ::ethers_contract::EthDisplay,
381 Default,
382 Debug,
383 PartialEq,
384 Eq,
385 Hash
386 )]
387 #[ethcall(name = "arbOSVersion", abi = "arbOSVersion()")]
388 pub struct ArbOSVersionCall;
389 #[derive(
391 Clone,
392 ::ethers_contract::EthCall,
393 ::ethers_contract::EthDisplay,
394 Default,
395 Debug,
396 PartialEq,
397 Eq,
398 Hash
399 )]
400 #[ethcall(name = "getStorageGasAvailable", abi = "getStorageGasAvailable()")]
401 pub struct GetStorageGasAvailableCall;
402 #[derive(
404 Clone,
405 ::ethers_contract::EthCall,
406 ::ethers_contract::EthDisplay,
407 Default,
408 Debug,
409 PartialEq,
410 Eq,
411 Hash
412 )]
413 #[ethcall(name = "isTopLevelCall", abi = "isTopLevelCall()")]
414 pub struct IsTopLevelCallCall;
415 #[derive(
417 Clone,
418 ::ethers_contract::EthCall,
419 ::ethers_contract::EthDisplay,
420 Default,
421 Debug,
422 PartialEq,
423 Eq,
424 Hash
425 )]
426 #[ethcall(
427 name = "mapL1SenderContractAddressToL2Alias",
428 abi = "mapL1SenderContractAddressToL2Alias(address,address)"
429 )]
430 pub struct MapL1SenderContractAddressToL2AliasCall {
431 pub sender: ::ethers_core::types::Address,
432 pub unused: ::ethers_core::types::Address,
433 }
434 #[derive(
436 Clone,
437 ::ethers_contract::EthCall,
438 ::ethers_contract::EthDisplay,
439 Default,
440 Debug,
441 PartialEq,
442 Eq,
443 Hash
444 )]
445 #[ethcall(
446 name = "myCallersAddressWithoutAliasing",
447 abi = "myCallersAddressWithoutAliasing()"
448 )]
449 pub struct MyCallersAddressWithoutAliasingCall;
450 #[derive(
452 Clone,
453 ::ethers_contract::EthCall,
454 ::ethers_contract::EthDisplay,
455 Default,
456 Debug,
457 PartialEq,
458 Eq,
459 Hash
460 )]
461 #[ethcall(name = "sendMerkleTreeState", abi = "sendMerkleTreeState()")]
462 pub struct SendMerkleTreeStateCall;
463 #[derive(
465 Clone,
466 ::ethers_contract::EthCall,
467 ::ethers_contract::EthDisplay,
468 Default,
469 Debug,
470 PartialEq,
471 Eq,
472 Hash
473 )]
474 #[ethcall(name = "sendTxToL1", abi = "sendTxToL1(address,bytes)")]
475 pub struct SendTxToL1Call {
476 pub destination: ::ethers_core::types::Address,
477 pub data: ::ethers_core::types::Bytes,
478 }
479 #[derive(
481 Clone,
482 ::ethers_contract::EthCall,
483 ::ethers_contract::EthDisplay,
484 Default,
485 Debug,
486 PartialEq,
487 Eq,
488 Hash
489 )]
490 #[ethcall(name = "wasMyCallersAddressAliased", abi = "wasMyCallersAddressAliased()")]
491 pub struct WasMyCallersAddressAliasedCall;
492 #[derive(
494 Clone,
495 ::ethers_contract::EthCall,
496 ::ethers_contract::EthDisplay,
497 Default,
498 Debug,
499 PartialEq,
500 Eq,
501 Hash
502 )]
503 #[ethcall(name = "withdrawEth", abi = "withdrawEth(address)")]
504 pub struct WithdrawEthCall {
505 pub destination: ::ethers_core::types::Address,
506 }
507 #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
509 pub enum IArbSysCalls {
510 ArbBlockHash(ArbBlockHashCall),
511 ArbBlockNumber(ArbBlockNumberCall),
512 ArbChainID(ArbChainIDCall),
513 ArbOSVersion(ArbOSVersionCall),
514 GetStorageGasAvailable(GetStorageGasAvailableCall),
515 IsTopLevelCall(IsTopLevelCallCall),
516 MapL1SenderContractAddressToL2Alias(MapL1SenderContractAddressToL2AliasCall),
517 MyCallersAddressWithoutAliasing(MyCallersAddressWithoutAliasingCall),
518 SendMerkleTreeState(SendMerkleTreeStateCall),
519 SendTxToL1(SendTxToL1Call),
520 WasMyCallersAddressAliased(WasMyCallersAddressAliasedCall),
521 WithdrawEth(WithdrawEthCall),
522 }
523 impl ::ethers_core::abi::AbiDecode for IArbSysCalls {
524 fn decode(
525 data: impl AsRef<[u8]>,
526 ) -> ::core::result::Result<Self, ::ethers_core::abi::AbiError> {
527 let data = data.as_ref();
528 if let Ok(decoded)
529 = <ArbBlockHashCall as ::ethers_core::abi::AbiDecode>::decode(data) {
530 return Ok(Self::ArbBlockHash(decoded));
531 }
532 if let Ok(decoded)
533 = <ArbBlockNumberCall as ::ethers_core::abi::AbiDecode>::decode(data) {
534 return Ok(Self::ArbBlockNumber(decoded));
535 }
536 if let Ok(decoded)
537 = <ArbChainIDCall as ::ethers_core::abi::AbiDecode>::decode(data) {
538 return Ok(Self::ArbChainID(decoded));
539 }
540 if let Ok(decoded)
541 = <ArbOSVersionCall as ::ethers_core::abi::AbiDecode>::decode(data) {
542 return Ok(Self::ArbOSVersion(decoded));
543 }
544 if let Ok(decoded)
545 = <GetStorageGasAvailableCall as ::ethers_core::abi::AbiDecode>::decode(
546 data,
547 ) {
548 return Ok(Self::GetStorageGasAvailable(decoded));
549 }
550 if let Ok(decoded)
551 = <IsTopLevelCallCall as ::ethers_core::abi::AbiDecode>::decode(data) {
552 return Ok(Self::IsTopLevelCall(decoded));
553 }
554 if let Ok(decoded)
555 = <MapL1SenderContractAddressToL2AliasCall as ::ethers_core::abi::AbiDecode>::decode(
556 data,
557 ) {
558 return Ok(Self::MapL1SenderContractAddressToL2Alias(decoded));
559 }
560 if let Ok(decoded)
561 = <MyCallersAddressWithoutAliasingCall as ::ethers_core::abi::AbiDecode>::decode(
562 data,
563 ) {
564 return Ok(Self::MyCallersAddressWithoutAliasing(decoded));
565 }
566 if let Ok(decoded)
567 = <SendMerkleTreeStateCall as ::ethers_core::abi::AbiDecode>::decode(
568 data,
569 ) {
570 return Ok(Self::SendMerkleTreeState(decoded));
571 }
572 if let Ok(decoded)
573 = <SendTxToL1Call as ::ethers_core::abi::AbiDecode>::decode(data) {
574 return Ok(Self::SendTxToL1(decoded));
575 }
576 if let Ok(decoded)
577 = <WasMyCallersAddressAliasedCall as ::ethers_core::abi::AbiDecode>::decode(
578 data,
579 ) {
580 return Ok(Self::WasMyCallersAddressAliased(decoded));
581 }
582 if let Ok(decoded)
583 = <WithdrawEthCall as ::ethers_core::abi::AbiDecode>::decode(data) {
584 return Ok(Self::WithdrawEth(decoded));
585 }
586 Err(::ethers_core::abi::Error::InvalidData.into())
587 }
588 }
589 impl ::ethers_core::abi::AbiEncode for IArbSysCalls {
590 fn encode(self) -> Vec<u8> {
591 match self {
592 Self::ArbBlockHash(element) => {
593 ::ethers_core::abi::AbiEncode::encode(element)
594 }
595 Self::ArbBlockNumber(element) => {
596 ::ethers_core::abi::AbiEncode::encode(element)
597 }
598 Self::ArbChainID(element) => {
599 ::ethers_core::abi::AbiEncode::encode(element)
600 }
601 Self::ArbOSVersion(element) => {
602 ::ethers_core::abi::AbiEncode::encode(element)
603 }
604 Self::GetStorageGasAvailable(element) => {
605 ::ethers_core::abi::AbiEncode::encode(element)
606 }
607 Self::IsTopLevelCall(element) => {
608 ::ethers_core::abi::AbiEncode::encode(element)
609 }
610 Self::MapL1SenderContractAddressToL2Alias(element) => {
611 ::ethers_core::abi::AbiEncode::encode(element)
612 }
613 Self::MyCallersAddressWithoutAliasing(element) => {
614 ::ethers_core::abi::AbiEncode::encode(element)
615 }
616 Self::SendMerkleTreeState(element) => {
617 ::ethers_core::abi::AbiEncode::encode(element)
618 }
619 Self::SendTxToL1(element) => {
620 ::ethers_core::abi::AbiEncode::encode(element)
621 }
622 Self::WasMyCallersAddressAliased(element) => {
623 ::ethers_core::abi::AbiEncode::encode(element)
624 }
625 Self::WithdrawEth(element) => {
626 ::ethers_core::abi::AbiEncode::encode(element)
627 }
628 }
629 }
630 }
631 impl ::core::fmt::Display for IArbSysCalls {
632 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
633 match self {
634 Self::ArbBlockHash(element) => ::core::fmt::Display::fmt(element, f),
635 Self::ArbBlockNumber(element) => ::core::fmt::Display::fmt(element, f),
636 Self::ArbChainID(element) => ::core::fmt::Display::fmt(element, f),
637 Self::ArbOSVersion(element) => ::core::fmt::Display::fmt(element, f),
638 Self::GetStorageGasAvailable(element) => {
639 ::core::fmt::Display::fmt(element, f)
640 }
641 Self::IsTopLevelCall(element) => ::core::fmt::Display::fmt(element, f),
642 Self::MapL1SenderContractAddressToL2Alias(element) => {
643 ::core::fmt::Display::fmt(element, f)
644 }
645 Self::MyCallersAddressWithoutAliasing(element) => {
646 ::core::fmt::Display::fmt(element, f)
647 }
648 Self::SendMerkleTreeState(element) => {
649 ::core::fmt::Display::fmt(element, f)
650 }
651 Self::SendTxToL1(element) => ::core::fmt::Display::fmt(element, f),
652 Self::WasMyCallersAddressAliased(element) => {
653 ::core::fmt::Display::fmt(element, f)
654 }
655 Self::WithdrawEth(element) => ::core::fmt::Display::fmt(element, f),
656 }
657 }
658 }
659 impl ::core::convert::From<ArbBlockHashCall> for IArbSysCalls {
660 fn from(value: ArbBlockHashCall) -> Self {
661 Self::ArbBlockHash(value)
662 }
663 }
664 impl ::core::convert::From<ArbBlockNumberCall> for IArbSysCalls {
665 fn from(value: ArbBlockNumberCall) -> Self {
666 Self::ArbBlockNumber(value)
667 }
668 }
669 impl ::core::convert::From<ArbChainIDCall> for IArbSysCalls {
670 fn from(value: ArbChainIDCall) -> Self {
671 Self::ArbChainID(value)
672 }
673 }
674 impl ::core::convert::From<ArbOSVersionCall> for IArbSysCalls {
675 fn from(value: ArbOSVersionCall) -> Self {
676 Self::ArbOSVersion(value)
677 }
678 }
679 impl ::core::convert::From<GetStorageGasAvailableCall> for IArbSysCalls {
680 fn from(value: GetStorageGasAvailableCall) -> Self {
681 Self::GetStorageGasAvailable(value)
682 }
683 }
684 impl ::core::convert::From<IsTopLevelCallCall> for IArbSysCalls {
685 fn from(value: IsTopLevelCallCall) -> Self {
686 Self::IsTopLevelCall(value)
687 }
688 }
689 impl ::core::convert::From<MapL1SenderContractAddressToL2AliasCall>
690 for IArbSysCalls {
691 fn from(value: MapL1SenderContractAddressToL2AliasCall) -> Self {
692 Self::MapL1SenderContractAddressToL2Alias(value)
693 }
694 }
695 impl ::core::convert::From<MyCallersAddressWithoutAliasingCall> for IArbSysCalls {
696 fn from(value: MyCallersAddressWithoutAliasingCall) -> Self {
697 Self::MyCallersAddressWithoutAliasing(value)
698 }
699 }
700 impl ::core::convert::From<SendMerkleTreeStateCall> for IArbSysCalls {
701 fn from(value: SendMerkleTreeStateCall) -> Self {
702 Self::SendMerkleTreeState(value)
703 }
704 }
705 impl ::core::convert::From<SendTxToL1Call> for IArbSysCalls {
706 fn from(value: SendTxToL1Call) -> Self {
707 Self::SendTxToL1(value)
708 }
709 }
710 impl ::core::convert::From<WasMyCallersAddressAliasedCall> for IArbSysCalls {
711 fn from(value: WasMyCallersAddressAliasedCall) -> Self {
712 Self::WasMyCallersAddressAliased(value)
713 }
714 }
715 impl ::core::convert::From<WithdrawEthCall> for IArbSysCalls {
716 fn from(value: WithdrawEthCall) -> Self {
717 Self::WithdrawEth(value)
718 }
719 }
720 #[derive(
722 Clone,
723 ::ethers_contract::EthAbiType,
724 ::ethers_contract::EthAbiCodec,
725 Default,
726 Debug,
727 PartialEq,
728 Eq,
729 Hash
730 )]
731 pub struct ArbBlockHashReturn(pub [u8; 32]);
732 #[derive(
734 Clone,
735 ::ethers_contract::EthAbiType,
736 ::ethers_contract::EthAbiCodec,
737 Default,
738 Debug,
739 PartialEq,
740 Eq,
741 Hash
742 )]
743 pub struct ArbBlockNumberReturn(pub ::ethers_core::types::U256);
744 #[derive(
746 Clone,
747 ::ethers_contract::EthAbiType,
748 ::ethers_contract::EthAbiCodec,
749 Default,
750 Debug,
751 PartialEq,
752 Eq,
753 Hash
754 )]
755 pub struct ArbChainIDReturn(pub ::ethers_core::types::U256);
756 #[derive(
758 Clone,
759 ::ethers_contract::EthAbiType,
760 ::ethers_contract::EthAbiCodec,
761 Default,
762 Debug,
763 PartialEq,
764 Eq,
765 Hash
766 )]
767 pub struct ArbOSVersionReturn(pub ::ethers_core::types::U256);
768 #[derive(
770 Clone,
771 ::ethers_contract::EthAbiType,
772 ::ethers_contract::EthAbiCodec,
773 Default,
774 Debug,
775 PartialEq,
776 Eq,
777 Hash
778 )]
779 pub struct GetStorageGasAvailableReturn(pub ::ethers_core::types::U256);
780 #[derive(
782 Clone,
783 ::ethers_contract::EthAbiType,
784 ::ethers_contract::EthAbiCodec,
785 Default,
786 Debug,
787 PartialEq,
788 Eq,
789 Hash
790 )]
791 pub struct IsTopLevelCallReturn(pub bool);
792 #[derive(
794 Clone,
795 ::ethers_contract::EthAbiType,
796 ::ethers_contract::EthAbiCodec,
797 Default,
798 Debug,
799 PartialEq,
800 Eq,
801 Hash
802 )]
803 pub struct MapL1SenderContractAddressToL2AliasReturn(
804 pub ::ethers_core::types::Address,
805 );
806 #[derive(
808 Clone,
809 ::ethers_contract::EthAbiType,
810 ::ethers_contract::EthAbiCodec,
811 Default,
812 Debug,
813 PartialEq,
814 Eq,
815 Hash
816 )]
817 pub struct MyCallersAddressWithoutAliasingReturn(pub ::ethers_core::types::Address);
818 #[derive(
820 Clone,
821 ::ethers_contract::EthAbiType,
822 ::ethers_contract::EthAbiCodec,
823 Default,
824 Debug,
825 PartialEq,
826 Eq,
827 Hash
828 )]
829 pub struct SendMerkleTreeStateReturn {
830 pub size: ::ethers_core::types::U256,
831 pub root: [u8; 32],
832 pub partials: ::std::vec::Vec<[u8; 32]>,
833 }
834 #[derive(
836 Clone,
837 ::ethers_contract::EthAbiType,
838 ::ethers_contract::EthAbiCodec,
839 Default,
840 Debug,
841 PartialEq,
842 Eq,
843 Hash
844 )]
845 pub struct SendTxToL1Return(pub ::ethers_core::types::U256);
846 #[derive(
848 Clone,
849 ::ethers_contract::EthAbiType,
850 ::ethers_contract::EthAbiCodec,
851 Default,
852 Debug,
853 PartialEq,
854 Eq,
855 Hash
856 )]
857 pub struct WasMyCallersAddressAliasedReturn(pub bool);
858 #[derive(
860 Clone,
861 ::ethers_contract::EthAbiType,
862 ::ethers_contract::EthAbiCodec,
863 Default,
864 Debug,
865 PartialEq,
866 Eq,
867 Hash
868 )]
869 pub struct WithdrawEthReturn(pub ::ethers_core::types::U256);
870}