pub use revert::*;
#[allow(
clippy::enum_variant_names,
clippy::too_many_arguments,
clippy::upper_case_acronyms,
clippy::type_complexity,
dead_code,
non_camel_case_types
)]
pub mod revert {
#[rustfmt::skip]
const __ABI: &str = "[{\"inputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\",\"name\":\"fail\",\"outputs\":[]}]";
pub static REVERT_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> =
::ethers::contract::Lazy::new(|| {
::ethers::core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid")
});
#[rustfmt::skip]
const __BYTECODE: &[u8] = &[
96,
128,
96,
64,
82,
52,
128,
21,
96,
15,
87,
96,
0,
128,
253,
91,
80,
96,
166,
128,
97,
0,
30,
96,
0,
57,
96,
0,
243,
254,
96,
128,
96,
64,
82,
52,
128,
21,
96,
15,
87,
96,
0,
128,
253,
91,
80,
96,
4,
54,
16,
96,
40,
87,
96,
0,
53,
96,
224,
28,
128,
99,
169,
204,
71,
24,
20,
96,
45,
87,
91,
96,
0,
128,
253,
91,
96,
51,
96,
53,
86,
91,
0,
91,
96,
64,
81,
98,
70,
27,
205,
96,
229,
27,
129,
82,
96,
32,
96,
4,
130,
1,
82,
96,
12,
96,
36,
130,
1,
82,
107,
72,
101,
108,
108,
111,
32,
87,
111,
114,
108,
100,
33,
96,
160,
27,
96,
68,
130,
1,
82,
96,
100,
1,
96,
64,
81,
128,
145,
3,
144,
253,
254,
162,
100,
105,
112,
102,
115,
88,
34,
18,
32,
165,
105,
203,
52,
30,
12,
251,
189,
23,
104,
230,
177,
56,
81,
188,
9,
253,
212,
229,
194,
174,
188,
252,
37,
245,
249,
7,
141,
60,
90,
231,
153,
100,
115,
111,
108,
99,
67,
0,
8,
19,
0,
51,
];
pub static REVERT_BYTECODE: ::ethers::core::types::Bytes =
::ethers::core::types::Bytes::from_static(__BYTECODE);
#[rustfmt::skip]
const __DEPLOYED_BYTECODE: &[u8] = &[
96,
128,
96,
64,
82,
52,
128,
21,
96,
15,
87,
96,
0,
128,
253,
91,
80,
96,
4,
54,
16,
96,
40,
87,
96,
0,
53,
96,
224,
28,
128,
99,
169,
204,
71,
24,
20,
96,
45,
87,
91,
96,
0,
128,
253,
91,
96,
51,
96,
53,
86,
91,
0,
91,
96,
64,
81,
98,
70,
27,
205,
96,
229,
27,
129,
82,
96,
32,
96,
4,
130,
1,
82,
96,
12,
96,
36,
130,
1,
82,
107,
72,
101,
108,
108,
111,
32,
87,
111,
114,
108,
100,
33,
96,
160,
27,
96,
68,
130,
1,
82,
96,
100,
1,
96,
64,
81,
128,
145,
3,
144,
253,
254,
162,
100,
105,
112,
102,
115,
88,
34,
18,
32,
165,
105,
203,
52,
30,
12,
251,
189,
23,
104,
230,
177,
56,
81,
188,
9,
253,
212,
229,
194,
174,
188,
252,
37,
245,
249,
7,
141,
60,
90,
231,
153,
100,
115,
111,
108,
99,
67,
0,
8,
19,
0,
51,
];
pub static REVERT_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes =
::ethers::core::types::Bytes::from_static(__DEPLOYED_BYTECODE);
pub struct Revert<M>(::ethers::contract::Contract<M>);
impl<M> ::core::clone::Clone for Revert<M> {
fn clone(&self) -> Self {
Self(::core::clone::Clone::clone(&self.0))
}
}
impl<M> ::core::ops::Deref for Revert<M> {
type Target = ::ethers::contract::Contract<M>;
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl<M> ::core::ops::DerefMut for Revert<M> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl<M> ::core::fmt::Debug for Revert<M> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple(stringify!(Revert))
.field(&self.address())
.finish()
}
}
impl<M: ::ethers::providers::Middleware> Revert<M> {
pub fn new<T: Into<::ethers::core::types::Address>>(
address: T,
client: ::std::sync::Arc<M>,
) -> Self {
Self(::ethers::contract::Contract::new(
address.into(),
REVERT_ABI.clone(),
client,
))
}
pub fn deploy<T: ::ethers::core::abi::Tokenize>(
client: ::std::sync::Arc<M>,
constructor_args: T,
) -> ::core::result::Result<
::ethers::contract::builders::ContractDeployer<M, Self>,
::ethers::contract::ContractError<M>,
> {
let factory = ::ethers::contract::ContractFactory::new(
REVERT_ABI.clone(),
REVERT_BYTECODE.clone().into(),
client,
);
let deployer = factory.deploy(constructor_args)?;
let deployer = ::ethers::contract::ContractDeployer::new(deployer);
Ok(deployer)
}
pub fn fail(&self) -> ::ethers::contract::builders::ContractCall<M, ()> {
self.0
.method_hash([169, 204, 71, 24], ())
.expect("method not found (this should never happen)")
}
}
impl<M: ::ethers::providers::Middleware> From<::ethers::contract::Contract<M>> for Revert<M> {
fn from(contract: ::ethers::contract::Contract<M>) -> Self {
Self::new(contract.address(), contract.client())
}
}
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
#[ethcall(name = "fail", abi = "fail()")]
pub struct FailCall;
}