diff --git a/Cargo.lock b/Cargo.lock index 9644fba8c..11eaf907e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12989,12 +12989,15 @@ dependencies = [ "anyhow", "cumulus-pallet-parachain-system", "cumulus-primitives-core", + "frame-benchmarking", "frame-support 37.0.0", "frame-system", "hyperbridge-client-machine", "ismp", "ismp-parachain", + "ismp-testsuite", "log", + "pallet-assets", "pallet-balances", "pallet-hyperbridge", "pallet-ismp", diff --git a/evm/abi/src/generated/beefy.rs b/evm/abi/src/generated/beefy.rs index 4b191f658..6b35d0121 100644 --- a/evm/abi/src/generated/beefy.rs +++ b/evm/abi/src/generated/beefy.rs @@ -2,18 +2,18 @@ pub use beefy::*; /// This module was auto-generated with ethers-rs Abigen. /// More information at: #[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, + clippy::enum_variant_names, + clippy::too_many_arguments, + clippy::upper_case_acronyms, + clippy::type_complexity, + dead_code, + non_camel_case_types )] pub mod beefy { - pub use super::super::shared_types::*; - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { + pub use super::super::shared_types::*; + #[allow(deprecated)] + fn __abi() -> ::ethers::core::abi::Abi { + ::ethers::core::abi::ethabi::Contract { constructor: ::core::option::Option::None, functions: ::core::convert::From::from([ ( @@ -367,766 +367,735 @@ pub mod beefy { receive: false, fallback: false, } - } - ///The parsed JSON ABI of the contract. - pub static BEEFY_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - pub struct Beefy(::ethers::contract::Contract); - impl ::core::clone::Clone for Beefy { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for Beefy { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for Beefy { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for Beefy { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(Beefy)).field(&self.address()).finish() - } - } - impl Beefy { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - BEEFY_ABI.clone(), - client, - ), - ) - } - ///Calls the contract's `MMR_ROOT_PAYLOAD_ID` (0xaf8b91d6) function - pub fn mmr_root_payload_id( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([175, 139, 145, 214], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `noOp` (0x756087e2) function - pub fn no_op( - &self, - s: BeefyConsensusState, - p: BeefyConsensusProof, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([117, 96, 135, 226], (s, p)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `supportsInterface` (0x01ffc9a7) function - pub fn supports_interface( - &self, - interface_id: [u8; 4], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([1, 255, 201, 167], interface_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `verifyConsensus` (0x7d755598) function - pub fn verify_consensus( - &self, - encoded_state: ::ethers::core::types::Bytes, - encoded_proof: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall< - M, - (::ethers::core::types::Bytes, ::std::vec::Vec), - > { - self.0 - .method_hash([125, 117, 85, 152], (encoded_state, encoded_proof)) - .expect("method not found (this should never happen)") - } - } - impl From<::ethers::contract::Contract> - for Beefy { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - ///Custom Error type `IllegalGenesisBlock` with signature `IllegalGenesisBlock()` and selector `0xb4eb9e51` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "IllegalGenesisBlock", abi = "IllegalGenesisBlock()")] - pub struct IllegalGenesisBlock; - ///Custom Error type `InvalidAuthoritiesProof` with signature `InvalidAuthoritiesProof()` and selector `0x528bd3ef` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "InvalidAuthoritiesProof", abi = "InvalidAuthoritiesProof()")] - pub struct InvalidAuthoritiesProof; - ///Custom Error type `InvalidMmrProof` with signature `InvalidMmrProof()` and selector `0x5c90c348` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "InvalidMmrProof", abi = "InvalidMmrProof()")] - pub struct InvalidMmrProof; - ///Custom Error type `InvalidUltraPlonkProof` with signature `InvalidUltraPlonkProof()` and selector `0x866dc22c` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "InvalidUltraPlonkProof", abi = "InvalidUltraPlonkProof()")] - pub struct InvalidUltraPlonkProof; - ///Custom Error type `MmrRootHashMissing` with signature `MmrRootHashMissing()` and selector `0x8c6238e4` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "MmrRootHashMissing", abi = "MmrRootHashMissing()")] - pub struct MmrRootHashMissing; - ///Custom Error type `StaleHeight` with signature `StaleHeight()` and selector `0xbeda4fc3` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "StaleHeight", abi = "StaleHeight()")] - pub struct StaleHeight; - ///Custom Error type `SuperMajorityRequired` with signature `SuperMajorityRequired()` and selector `0xeaa43dfc` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "SuperMajorityRequired", abi = "SuperMajorityRequired()")] - pub struct SuperMajorityRequired; - ///Custom Error type `UnknownAuthoritySet` with signature `UnknownAuthoritySet()` and selector `0xe405cd0a` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "UnknownAuthoritySet", abi = "UnknownAuthoritySet()")] - pub struct UnknownAuthoritySet; - ///Container type for all of the contract's custom errors - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum BeefyErrors { - IllegalGenesisBlock(IllegalGenesisBlock), - InvalidAuthoritiesProof(InvalidAuthoritiesProof), - InvalidMmrProof(InvalidMmrProof), - InvalidUltraPlonkProof(InvalidUltraPlonkProof), - MmrRootHashMissing(MmrRootHashMissing), - StaleHeight(StaleHeight), - SuperMajorityRequired(SuperMajorityRequired), - UnknownAuthoritySet(UnknownAuthoritySet), - /// The standard solidity revert string, with selector - /// Error(string) -- 0x08c379a0 - RevertString(::std::string::String), - } - impl ::ethers::core::abi::AbiDecode for BeefyErrors { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = <::std::string::String as ::ethers::core::abi::AbiDecode>::decode( - data, - ) { - return Ok(Self::RevertString(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::IllegalGenesisBlock(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::InvalidAuthoritiesProof(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::InvalidMmrProof(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::InvalidUltraPlonkProof(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::MmrRootHashMissing(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::StaleHeight(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SuperMajorityRequired(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::UnknownAuthoritySet(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for BeefyErrors { - fn encode(self) -> ::std::vec::Vec { - match self { - Self::IllegalGenesisBlock(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::InvalidAuthoritiesProof(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::InvalidMmrProof(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::InvalidUltraPlonkProof(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::MmrRootHashMissing(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::StaleHeight(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SuperMajorityRequired(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::UnknownAuthoritySet(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s), - } - } - } - impl ::ethers::contract::ContractRevert for BeefyErrors { - fn valid_selector(selector: [u8; 4]) -> bool { - match selector { - [0x08, 0xc3, 0x79, 0xa0] => true, - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => true, - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ => false, - } - } - } - impl ::core::fmt::Display for BeefyErrors { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::IllegalGenesisBlock(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::InvalidAuthoritiesProof(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::InvalidMmrProof(element) => ::core::fmt::Display::fmt(element, f), - Self::InvalidUltraPlonkProof(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::MmrRootHashMissing(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::StaleHeight(element) => ::core::fmt::Display::fmt(element, f), - Self::SuperMajorityRequired(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::UnknownAuthoritySet(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::RevertString(s) => ::core::fmt::Display::fmt(s, f), - } - } - } - impl ::core::convert::From<::std::string::String> for BeefyErrors { - fn from(value: String) -> Self { - Self::RevertString(value) - } - } - impl ::core::convert::From for BeefyErrors { - fn from(value: IllegalGenesisBlock) -> Self { - Self::IllegalGenesisBlock(value) - } - } - impl ::core::convert::From for BeefyErrors { - fn from(value: InvalidAuthoritiesProof) -> Self { - Self::InvalidAuthoritiesProof(value) - } - } - impl ::core::convert::From for BeefyErrors { - fn from(value: InvalidMmrProof) -> Self { - Self::InvalidMmrProof(value) - } - } - impl ::core::convert::From for BeefyErrors { - fn from(value: InvalidUltraPlonkProof) -> Self { - Self::InvalidUltraPlonkProof(value) - } - } - impl ::core::convert::From for BeefyErrors { - fn from(value: MmrRootHashMissing) -> Self { - Self::MmrRootHashMissing(value) - } - } - impl ::core::convert::From for BeefyErrors { - fn from(value: StaleHeight) -> Self { - Self::StaleHeight(value) - } - } - impl ::core::convert::From for BeefyErrors { - fn from(value: SuperMajorityRequired) -> Self { - Self::SuperMajorityRequired(value) - } - } - impl ::core::convert::From for BeefyErrors { - fn from(value: UnknownAuthoritySet) -> Self { - Self::UnknownAuthoritySet(value) - } - } - ///Container type for all input parameters for the `MMR_ROOT_PAYLOAD_ID` function with signature `MMR_ROOT_PAYLOAD_ID()` and selector `0xaf8b91d6` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "MMR_ROOT_PAYLOAD_ID", abi = "MMR_ROOT_PAYLOAD_ID()")] - pub struct MmrRootPayloadIdCall; - ///Container type for all input parameters for the `noOp` function with signature `noOp((uint256,uint256,(uint256,uint256,bytes32),(uint256,uint256,bytes32)),(((((bytes2,bytes)[],uint256,uint256),(bytes,uint256)[]),(uint256,uint256,bytes32,(uint256,uint256,bytes32),bytes32,uint256,uint256),bytes32[],(uint256,bytes32)[][]),((uint256,uint256,bytes),(uint256,bytes32)[][])))` and selector `0x756087e2` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "noOp", - abi = "noOp((uint256,uint256,(uint256,uint256,bytes32),(uint256,uint256,bytes32)),(((((bytes2,bytes)[],uint256,uint256),(bytes,uint256)[]),(uint256,uint256,bytes32,(uint256,uint256,bytes32),bytes32,uint256,uint256),bytes32[],(uint256,bytes32)[][]),((uint256,uint256,bytes),(uint256,bytes32)[][])))" - )] - pub struct NoOpCall { - pub s: BeefyConsensusState, - pub p: BeefyConsensusProof, - } - ///Container type for all input parameters for the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")] - pub struct SupportsInterfaceCall { - pub interface_id: [u8; 4], - } - ///Container type for all input parameters for the `verifyConsensus` function with signature `verifyConsensus(bytes,bytes)` and selector `0x7d755598` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "verifyConsensus", abi = "verifyConsensus(bytes,bytes)")] - pub struct VerifyConsensusCall { - pub encoded_state: ::ethers::core::types::Bytes, - pub encoded_proof: ::ethers::core::types::Bytes, - } - ///Container type for all of the contract's call - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum BeefyCalls { - MmrRootPayloadId(MmrRootPayloadIdCall), - NoOp(NoOpCall), - SupportsInterface(SupportsInterfaceCall), - VerifyConsensus(VerifyConsensusCall), - } - impl ::ethers::core::abi::AbiDecode for BeefyCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::MmrRootPayloadId(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::NoOp(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SupportsInterface(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::VerifyConsensus(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for BeefyCalls { - fn encode(self) -> Vec { - match self { - Self::MmrRootPayloadId(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::NoOp(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::SupportsInterface(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::VerifyConsensus(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for BeefyCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::MmrRootPayloadId(element) => ::core::fmt::Display::fmt(element, f), - Self::NoOp(element) => ::core::fmt::Display::fmt(element, f), - Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f), - Self::VerifyConsensus(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for BeefyCalls { - fn from(value: MmrRootPayloadIdCall) -> Self { - Self::MmrRootPayloadId(value) - } - } - impl ::core::convert::From for BeefyCalls { - fn from(value: NoOpCall) -> Self { - Self::NoOp(value) - } - } - impl ::core::convert::From for BeefyCalls { - fn from(value: SupportsInterfaceCall) -> Self { - Self::SupportsInterface(value) - } - } - impl ::core::convert::From for BeefyCalls { - fn from(value: VerifyConsensusCall) -> Self { - Self::VerifyConsensus(value) - } - } - ///Container type for all return fields from the `MMR_ROOT_PAYLOAD_ID` function with signature `MMR_ROOT_PAYLOAD_ID()` and selector `0xaf8b91d6` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct MmrRootPayloadIdReturn(pub [u8; 2]); - ///Container type for all return fields from the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SupportsInterfaceReturn(pub bool); - ///Container type for all return fields from the `verifyConsensus` function with signature `verifyConsensus(bytes,bytes)` and selector `0x7d755598` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct VerifyConsensusReturn( - pub ::ethers::core::types::Bytes, - pub ::std::vec::Vec, - ); - ///`BeefyConsensusProof(((((bytes2,bytes)[],uint256,uint256),(bytes,uint256)[]),(uint256,uint256,bytes32,(uint256,uint256,bytes32),bytes32,uint256,uint256),bytes32[],(uint256,bytes32)[]),((uint256,uint256,bytes),(uint256,bytes32)[]))` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct BeefyConsensusProof { - pub relay: RelayChainProof, - pub parachain: ParachainProof, - } - ///`BeefyConsensusState(uint256,uint256,(uint256,uint256,bytes32),(uint256,uint256,bytes32))` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct BeefyConsensusState { - pub latest_height: ::ethers::core::types::U256, - pub beefy_activation_block: ::ethers::core::types::U256, - pub current_authority_set: AuthoritySetCommitment, - pub next_authority_set: AuthoritySetCommitment, - } - ///`BeefyMmrLeaf(uint256,uint256,bytes32,(uint256,uint256,bytes32),bytes32,uint256,uint256)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct BeefyMmrLeaf { - pub version: ::ethers::core::types::U256, - pub parent_number: ::ethers::core::types::U256, - pub parent_hash: [u8; 32], - pub next_authority_set: AuthoritySetCommitment, - pub extra: [u8; 32], - pub k_index: ::ethers::core::types::U256, - pub leaf_index: ::ethers::core::types::U256, - } - ///`Commitment((bytes2,bytes)[],uint256,uint256)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct Commitment { - pub payload: ::std::vec::Vec, - pub block_number: ::ethers::core::types::U256, - pub validator_set_id: ::ethers::core::types::U256, - } - ///`Node(uint256,bytes32)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct Node { - pub k_index: ::ethers::core::types::U256, - pub node: [u8; 32], - } - ///`Parachain(uint256,uint256,bytes)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct Parachain { - pub index: ::ethers::core::types::U256, - pub id: ::ethers::core::types::U256, - pub header: ::ethers::core::types::Bytes, - } - ///`ParachainProof((uint256,uint256,bytes),(uint256,bytes32)[])` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ParachainProof { - pub parachain: Parachain, - pub proof: ::std::vec::Vec<::std::vec::Vec>, - } - ///`Payload(bytes2,bytes)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct Payload { - pub id: [u8; 2], - pub data: ::ethers::core::types::Bytes, - } - ///`RelayChainProof((((bytes2,bytes)[],uint256,uint256),(bytes,uint256)[]),(uint256,uint256,bytes32,(uint256,uint256,bytes32),bytes32,uint256,uint256),bytes32[],(uint256,bytes32)[])` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct RelayChainProof { - pub signed_commitment: SignedCommitment, - pub latest_mmr_leaf: BeefyMmrLeaf, - pub mmr_proof: ::std::vec::Vec<[u8; 32]>, - pub proof: ::std::vec::Vec<::std::vec::Vec>, - } - ///`SignedCommitment(((bytes2,bytes)[],uint256,uint256),(bytes,uint256)[])` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SignedCommitment { - pub commitment: Commitment, - pub votes: ::std::vec::Vec, - } - ///`Vote(bytes,uint256)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct Vote { - pub signature: ::ethers::core::types::Bytes, - pub authority_index: ::ethers::core::types::U256, - } + } + ///The parsed JSON ABI of the contract. + pub static BEEFY_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = + ::ethers::contract::Lazy::new(__abi); + pub struct Beefy(::ethers::contract::Contract); + impl ::core::clone::Clone for Beefy { + fn clone(&self) -> Self { + Self(::core::clone::Clone::clone(&self.0)) + } + } + impl ::core::ops::Deref for Beefy { + type Target = ::ethers::contract::Contract; + fn deref(&self) -> &Self::Target { + &self.0 + } + } + impl ::core::ops::DerefMut for Beefy { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } + } + impl ::core::fmt::Debug for Beefy { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple(::core::stringify!(Beefy)).field(&self.address()).finish() + } + } + impl Beefy { + /// Creates a new contract instance with the specified `ethers` client at + /// `address`. The contract derefs to a `ethers::Contract` object. + pub fn new>( + address: T, + client: ::std::sync::Arc, + ) -> Self { + Self(::ethers::contract::Contract::new(address.into(), BEEFY_ABI.clone(), client)) + } + ///Calls the contract's `MMR_ROOT_PAYLOAD_ID` (0xaf8b91d6) function + pub fn mmr_root_payload_id( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([175, 139, 145, 214], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `noOp` (0x756087e2) function + pub fn no_op( + &self, + s: BeefyConsensusState, + p: BeefyConsensusProof, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([117, 96, 135, 226], (s, p)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `supportsInterface` (0x01ffc9a7) function + pub fn supports_interface( + &self, + interface_id: [u8; 4], + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([1, 255, 201, 167], interface_id) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `verifyConsensus` (0x7d755598) function + pub fn verify_consensus( + &self, + encoded_state: ::ethers::core::types::Bytes, + encoded_proof: ::ethers::core::types::Bytes, + ) -> ::ethers::contract::builders::ContractCall< + M, + (::ethers::core::types::Bytes, ::std::vec::Vec), + > { + self.0 + .method_hash([125, 117, 85, 152], (encoded_state, encoded_proof)) + .expect("method not found (this should never happen)") + } + } + impl From<::ethers::contract::Contract> for Beefy { + fn from(contract: ::ethers::contract::Contract) -> Self { + Self::new(contract.address(), contract.client()) + } + } + ///Custom Error type `IllegalGenesisBlock` with signature `IllegalGenesisBlock()` and selector + /// `0xb4eb9e51` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "IllegalGenesisBlock", abi = "IllegalGenesisBlock()")] + pub struct IllegalGenesisBlock; + ///Custom Error type `InvalidAuthoritiesProof` with signature `InvalidAuthoritiesProof()` and + /// selector `0x528bd3ef` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "InvalidAuthoritiesProof", abi = "InvalidAuthoritiesProof()")] + pub struct InvalidAuthoritiesProof; + ///Custom Error type `InvalidMmrProof` with signature `InvalidMmrProof()` and selector + /// `0x5c90c348` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "InvalidMmrProof", abi = "InvalidMmrProof()")] + pub struct InvalidMmrProof; + ///Custom Error type `InvalidUltraPlonkProof` with signature `InvalidUltraPlonkProof()` and + /// selector `0x866dc22c` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "InvalidUltraPlonkProof", abi = "InvalidUltraPlonkProof()")] + pub struct InvalidUltraPlonkProof; + ///Custom Error type `MmrRootHashMissing` with signature `MmrRootHashMissing()` and selector + /// `0x8c6238e4` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "MmrRootHashMissing", abi = "MmrRootHashMissing()")] + pub struct MmrRootHashMissing; + ///Custom Error type `StaleHeight` with signature `StaleHeight()` and selector `0xbeda4fc3` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "StaleHeight", abi = "StaleHeight()")] + pub struct StaleHeight; + ///Custom Error type `SuperMajorityRequired` with signature `SuperMajorityRequired()` and + /// selector `0xeaa43dfc` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "SuperMajorityRequired", abi = "SuperMajorityRequired()")] + pub struct SuperMajorityRequired; + ///Custom Error type `UnknownAuthoritySet` with signature `UnknownAuthoritySet()` and selector + /// `0xe405cd0a` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "UnknownAuthoritySet", abi = "UnknownAuthoritySet()")] + pub struct UnknownAuthoritySet; + ///Container type for all of the contract's custom errors + #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] + pub enum BeefyErrors { + IllegalGenesisBlock(IllegalGenesisBlock), + InvalidAuthoritiesProof(InvalidAuthoritiesProof), + InvalidMmrProof(InvalidMmrProof), + InvalidUltraPlonkProof(InvalidUltraPlonkProof), + MmrRootHashMissing(MmrRootHashMissing), + StaleHeight(StaleHeight), + SuperMajorityRequired(SuperMajorityRequired), + UnknownAuthoritySet(UnknownAuthoritySet), + /// The standard solidity revert string, with selector + /// Error(string) -- 0x08c379a0 + RevertString(::std::string::String), + } + impl ::ethers::core::abi::AbiDecode for BeefyErrors { + fn decode( + data: impl AsRef<[u8]>, + ) -> ::core::result::Result { + let data = data.as_ref(); + if let Ok(decoded) = + <::std::string::String as ::ethers::core::abi::AbiDecode>::decode(data) + { + return Ok(Self::RevertString(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::IllegalGenesisBlock(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::InvalidAuthoritiesProof(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::InvalidMmrProof(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::InvalidUltraPlonkProof(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::MmrRootHashMissing(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::StaleHeight(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::SuperMajorityRequired(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::UnknownAuthoritySet(decoded)); + } + Err(::ethers::core::abi::Error::InvalidData.into()) + } + } + impl ::ethers::core::abi::AbiEncode for BeefyErrors { + fn encode(self) -> ::std::vec::Vec { + match self { + Self::IllegalGenesisBlock(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::InvalidAuthoritiesProof(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::InvalidMmrProof(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::InvalidUltraPlonkProof(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::MmrRootHashMissing(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::StaleHeight(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::SuperMajorityRequired(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::UnknownAuthoritySet(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s), + } + } + } + impl ::ethers::contract::ContractRevert for BeefyErrors { + fn valid_selector(selector: [u8; 4]) -> bool { + match selector { + [0x08, 0xc3, 0x79, 0xa0] => true, + _ if selector == + ::selector() => + true, + _ if selector == + ::selector() => + true, + _ if selector == ::selector() => + true, + _ if selector == + ::selector() => + true, + _ if selector == + ::selector() => + true, + _ if selector == ::selector() => true, + _ if selector == + ::selector() => + true, + _ if selector == + ::selector() => + true, + _ => false, + } + } + } + impl ::core::fmt::Display for BeefyErrors { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + match self { + Self::IllegalGenesisBlock(element) => ::core::fmt::Display::fmt(element, f), + Self::InvalidAuthoritiesProof(element) => ::core::fmt::Display::fmt(element, f), + Self::InvalidMmrProof(element) => ::core::fmt::Display::fmt(element, f), + Self::InvalidUltraPlonkProof(element) => ::core::fmt::Display::fmt(element, f), + Self::MmrRootHashMissing(element) => ::core::fmt::Display::fmt(element, f), + Self::StaleHeight(element) => ::core::fmt::Display::fmt(element, f), + Self::SuperMajorityRequired(element) => ::core::fmt::Display::fmt(element, f), + Self::UnknownAuthoritySet(element) => ::core::fmt::Display::fmt(element, f), + Self::RevertString(s) => ::core::fmt::Display::fmt(s, f), + } + } + } + impl ::core::convert::From<::std::string::String> for BeefyErrors { + fn from(value: String) -> Self { + Self::RevertString(value) + } + } + impl ::core::convert::From for BeefyErrors { + fn from(value: IllegalGenesisBlock) -> Self { + Self::IllegalGenesisBlock(value) + } + } + impl ::core::convert::From for BeefyErrors { + fn from(value: InvalidAuthoritiesProof) -> Self { + Self::InvalidAuthoritiesProof(value) + } + } + impl ::core::convert::From for BeefyErrors { + fn from(value: InvalidMmrProof) -> Self { + Self::InvalidMmrProof(value) + } + } + impl ::core::convert::From for BeefyErrors { + fn from(value: InvalidUltraPlonkProof) -> Self { + Self::InvalidUltraPlonkProof(value) + } + } + impl ::core::convert::From for BeefyErrors { + fn from(value: MmrRootHashMissing) -> Self { + Self::MmrRootHashMissing(value) + } + } + impl ::core::convert::From for BeefyErrors { + fn from(value: StaleHeight) -> Self { + Self::StaleHeight(value) + } + } + impl ::core::convert::From for BeefyErrors { + fn from(value: SuperMajorityRequired) -> Self { + Self::SuperMajorityRequired(value) + } + } + impl ::core::convert::From for BeefyErrors { + fn from(value: UnknownAuthoritySet) -> Self { + Self::UnknownAuthoritySet(value) + } + } + ///Container type for all input parameters for the `MMR_ROOT_PAYLOAD_ID` function with + /// signature `MMR_ROOT_PAYLOAD_ID()` and selector `0xaf8b91d6` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "MMR_ROOT_PAYLOAD_ID", abi = "MMR_ROOT_PAYLOAD_ID()")] + pub struct MmrRootPayloadIdCall; + ///Container type for all input parameters for the `noOp` function with signature + /// `noOp((uint256,uint256,(uint256,uint256,bytes32),(uint256,uint256,bytes32)),(((((bytes2, + /// bytes)[],uint256,uint256),(bytes,uint256)[]),(uint256,uint256,bytes32,(uint256,uint256, + /// bytes32),bytes32,uint256,uint256),bytes32[],(uint256,bytes32)[][]),((uint256,uint256,bytes), + /// (uint256,bytes32)[][])))` and selector `0x756087e2` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "noOp", + abi = "noOp((uint256,uint256,(uint256,uint256,bytes32),(uint256,uint256,bytes32)),(((((bytes2,bytes)[],uint256,uint256),(bytes,uint256)[]),(uint256,uint256,bytes32,(uint256,uint256,bytes32),bytes32,uint256,uint256),bytes32[],(uint256,bytes32)[][]),((uint256,uint256,bytes),(uint256,bytes32)[][])))" + )] + pub struct NoOpCall { + pub s: BeefyConsensusState, + pub p: BeefyConsensusProof, + } + ///Container type for all input parameters for the `supportsInterface` function with signature + /// `supportsInterface(bytes4)` and selector `0x01ffc9a7` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")] + pub struct SupportsInterfaceCall { + pub interface_id: [u8; 4], + } + ///Container type for all input parameters for the `verifyConsensus` function with signature + /// `verifyConsensus(bytes,bytes)` and selector `0x7d755598` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "verifyConsensus", abi = "verifyConsensus(bytes,bytes)")] + pub struct VerifyConsensusCall { + pub encoded_state: ::ethers::core::types::Bytes, + pub encoded_proof: ::ethers::core::types::Bytes, + } + ///Container type for all of the contract's call + #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] + pub enum BeefyCalls { + MmrRootPayloadId(MmrRootPayloadIdCall), + NoOp(NoOpCall), + SupportsInterface(SupportsInterfaceCall), + VerifyConsensus(VerifyConsensusCall), + } + impl ::ethers::core::abi::AbiDecode for BeefyCalls { + fn decode( + data: impl AsRef<[u8]>, + ) -> ::core::result::Result { + let data = data.as_ref(); + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::MmrRootPayloadId(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::NoOp(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::SupportsInterface(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::VerifyConsensus(decoded)); + } + Err(::ethers::core::abi::Error::InvalidData.into()) + } + } + impl ::ethers::core::abi::AbiEncode for BeefyCalls { + fn encode(self) -> Vec { + match self { + Self::MmrRootPayloadId(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::NoOp(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::SupportsInterface(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::VerifyConsensus(element) => ::ethers::core::abi::AbiEncode::encode(element), + } + } + } + impl ::core::fmt::Display for BeefyCalls { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + match self { + Self::MmrRootPayloadId(element) => ::core::fmt::Display::fmt(element, f), + Self::NoOp(element) => ::core::fmt::Display::fmt(element, f), + Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f), + Self::VerifyConsensus(element) => ::core::fmt::Display::fmt(element, f), + } + } + } + impl ::core::convert::From for BeefyCalls { + fn from(value: MmrRootPayloadIdCall) -> Self { + Self::MmrRootPayloadId(value) + } + } + impl ::core::convert::From for BeefyCalls { + fn from(value: NoOpCall) -> Self { + Self::NoOp(value) + } + } + impl ::core::convert::From for BeefyCalls { + fn from(value: SupportsInterfaceCall) -> Self { + Self::SupportsInterface(value) + } + } + impl ::core::convert::From for BeefyCalls { + fn from(value: VerifyConsensusCall) -> Self { + Self::VerifyConsensus(value) + } + } + ///Container type for all return fields from the `MMR_ROOT_PAYLOAD_ID` function with signature + /// `MMR_ROOT_PAYLOAD_ID()` and selector `0xaf8b91d6` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct MmrRootPayloadIdReturn(pub [u8; 2]); + ///Container type for all return fields from the `supportsInterface` function with signature + /// `supportsInterface(bytes4)` and selector `0x01ffc9a7` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct SupportsInterfaceReturn(pub bool); + ///Container type for all return fields from the `verifyConsensus` function with signature + /// `verifyConsensus(bytes,bytes)` and selector `0x7d755598` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct VerifyConsensusReturn( + pub ::ethers::core::types::Bytes, + pub ::std::vec::Vec, + ); + ///`BeefyConsensusProof(((((bytes2,bytes)[],uint256,uint256),(bytes,uint256)[]),(uint256, + /// uint256,bytes32,(uint256,uint256,bytes32),bytes32,uint256,uint256),bytes32[],(uint256, + /// bytes32)[]),((uint256,uint256,bytes),(uint256,bytes32)[]))` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct BeefyConsensusProof { + pub relay: RelayChainProof, + pub parachain: ParachainProof, + } + ///`BeefyConsensusState(uint256,uint256,(uint256,uint256,bytes32),(uint256,uint256,bytes32))` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct BeefyConsensusState { + pub latest_height: ::ethers::core::types::U256, + pub beefy_activation_block: ::ethers::core::types::U256, + pub current_authority_set: AuthoritySetCommitment, + pub next_authority_set: AuthoritySetCommitment, + } + ///`BeefyMmrLeaf(uint256,uint256,bytes32,(uint256,uint256,bytes32),bytes32,uint256,uint256)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct BeefyMmrLeaf { + pub version: ::ethers::core::types::U256, + pub parent_number: ::ethers::core::types::U256, + pub parent_hash: [u8; 32], + pub next_authority_set: AuthoritySetCommitment, + pub extra: [u8; 32], + pub k_index: ::ethers::core::types::U256, + pub leaf_index: ::ethers::core::types::U256, + } + ///`Commitment((bytes2,bytes)[],uint256,uint256)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct Commitment { + pub payload: ::std::vec::Vec, + pub block_number: ::ethers::core::types::U256, + pub validator_set_id: ::ethers::core::types::U256, + } + ///`Node(uint256,bytes32)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct Node { + pub k_index: ::ethers::core::types::U256, + pub node: [u8; 32], + } + ///`Parachain(uint256,uint256,bytes)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct Parachain { + pub index: ::ethers::core::types::U256, + pub id: ::ethers::core::types::U256, + pub header: ::ethers::core::types::Bytes, + } + ///`ParachainProof((uint256,uint256,bytes),(uint256,bytes32)[])` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct ParachainProof { + pub parachain: Parachain, + pub proof: ::std::vec::Vec<::std::vec::Vec>, + } + ///`Payload(bytes2,bytes)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct Payload { + pub id: [u8; 2], + pub data: ::ethers::core::types::Bytes, + } + ///`RelayChainProof((((bytes2,bytes)[],uint256,uint256),(bytes,uint256)[]),(uint256,uint256, + /// bytes32,(uint256,uint256,bytes32),bytes32,uint256,uint256),bytes32[],(uint256,bytes32)[])` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct RelayChainProof { + pub signed_commitment: SignedCommitment, + pub latest_mmr_leaf: BeefyMmrLeaf, + pub mmr_proof: ::std::vec::Vec<[u8; 32]>, + pub proof: ::std::vec::Vec<::std::vec::Vec>, + } + ///`SignedCommitment(((bytes2,bytes)[],uint256,uint256),(bytes,uint256)[])` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct SignedCommitment { + pub commitment: Commitment, + pub votes: ::std::vec::Vec, + } + ///`Vote(bytes,uint256)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct Vote { + pub signature: ::ethers::core::types::Bytes, + pub authority_index: ::ethers::core::types::U256, + } } diff --git a/evm/abi/src/generated/erc20.rs b/evm/abi/src/generated/erc20.rs index a690bd214..8106a1637 100644 --- a/evm/abi/src/generated/erc20.rs +++ b/evm/abi/src/generated/erc20.rs @@ -2,1216 +2,1116 @@ pub use erc20::*; /// This module was auto-generated with ethers-rs Abigen. /// More information at: #[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, + clippy::enum_variant_names, + clippy::too_many_arguments, + clippy::upper_case_acronyms, + clippy::type_complexity, + dead_code, + non_camel_case_types )] pub mod erc20 { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::Some(::ethers::core::abi::ethabi::Constructor { - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("name_"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("symbol_"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - }), - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("allowance"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("allowance"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("approve"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("approve"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("amount"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("balanceOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("balanceOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("account"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("decimals"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("decimals"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("decreaseAllowance"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("decreaseAllowance"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("subtractedValue"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("increaseAllowance"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("increaseAllowance"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("addedValue"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("name"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("name"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("symbol"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("symbol"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("totalSupply"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("totalSupply"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("transfer"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("amount"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("transferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("amount"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("Approval"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Approval"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("value"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("Transfer"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("value"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static ERC20_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - #[rustfmt::skip] + #[allow(deprecated)] + fn __abi() -> ::ethers::core::abi::Abi { + ::ethers::core::abi::ethabi::Contract { + constructor: ::core::option::Option::Some(::ethers::core::abi::ethabi::Constructor { + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("name_"), + kind: ::ethers::core::abi::ethabi::ParamType::String, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("string"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("symbol_"), + kind: ::ethers::core::abi::ethabi::ParamType::String, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("string"), + ), + }, + ], + }), + functions: ::core::convert::From::from([ + ( + ::std::borrow::ToOwned::to_owned("allowance"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("allowance"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("owner"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("spender"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("approve"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("approve"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("spender"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("amount"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bool"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("balanceOf"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("balanceOf"), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("account"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + },], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("decimals"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("decimals"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint8"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("decreaseAllowance"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("decreaseAllowance"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("spender"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("subtractedValue"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bool"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("increaseAllowance"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("increaseAllowance"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("spender"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("addedValue"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bool"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("name"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("name"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::String, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("string"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("symbol"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("symbol"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::String, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("string"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("totalSupply"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("totalSupply"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("transfer"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("transfer"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("to"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("amount"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bool"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("transferFrom"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("transferFrom"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("from"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("to"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("amount"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bool"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ]), + events: ::core::convert::From::from([ + ( + ::std::borrow::ToOwned::to_owned("Approval"), + ::std::vec![::ethers::core::abi::ethabi::Event { + name: ::std::borrow::ToOwned::to_owned("Approval"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("owner"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: true, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("spender"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: true, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("value"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + indexed: false, + }, + ], + anonymous: false, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("Transfer"), + ::std::vec![::ethers::core::abi::ethabi::Event { + name: ::std::borrow::ToOwned::to_owned("Transfer"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("from"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: true, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("to"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: true, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("value"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + indexed: false, + }, + ], + anonymous: false, + },], + ), + ]), + errors: ::std::collections::BTreeMap::new(), + receive: false, + fallback: false, + } + } + ///The parsed JSON ABI of the contract. + pub static ERC20_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = + ::ethers::contract::Lazy::new(__abi); + #[rustfmt::skip] const __BYTECODE: &[u8] = b"`\x80`@R4\x80\x15b\0\0\x10W_\x80\xFD[P`@Qb\0\x0B\x0E8\x03\x80b\0\x0B\x0E\x839\x81\x01`@\x81\x90Rb\0\x003\x91b\0\x01\x17V[`\x03b\0\0A\x83\x82b\0\x02\tV[P`\x04b\0\0P\x82\x82b\0\x02\tV[PPPb\0\x02\xD1V[cNH{q`\xE0\x1B_R`A`\x04R`$_\xFD[_\x82`\x1F\x83\x01\x12b\0\0}W_\x80\xFD[\x81Q`\x01`\x01`@\x1B\x03\x80\x82\x11\x15b\0\0\x9AWb\0\0\x9Ab\0\0YV[`@Q`\x1F\x83\x01`\x1F\x19\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15b\0\0\xC5Wb\0\0\xC5b\0\0YV[\x81`@R\x83\x81R` \x92P\x86\x83\x85\x88\x01\x01\x11\x15b\0\0\xE1W_\x80\xFD[_\x91P[\x83\x82\x10\x15b\0\x01\x04W\x85\x82\x01\x83\x01Q\x81\x83\x01\x84\x01R\x90\x82\x01\x90b\0\0\xE5V[_\x93\x81\x01\x90\x92\x01\x92\x90\x92R\x94\x93PPPPV[_\x80`@\x83\x85\x03\x12\x15b\0\x01)W_\x80\xFD[\x82Q`\x01`\x01`@\x1B\x03\x80\x82\x11\x15b\0\x01@W_\x80\xFD[b\0\x01N\x86\x83\x87\x01b\0\0mV[\x93P` \x85\x01Q\x91P\x80\x82\x11\x15b\0\x01dW_\x80\xFD[Pb\0\x01s\x85\x82\x86\x01b\0\0mV[\x91PP\x92P\x92\x90PV[`\x01\x81\x81\x1C\x90\x82\x16\x80b\0\x01\x92W`\x7F\x82\x16\x91P[` \x82\x10\x81\x03b\0\x01\xB1WcNH{q`\xE0\x1B_R`\"`\x04R`$_\xFD[P\x91\x90PV[`\x1F\x82\x11\x15b\0\x02\x04W_\x81\x81R` \x81 `\x1F\x85\x01`\x05\x1C\x81\x01` \x86\x10\x15b\0\x01\xDFWP\x80[`\x1F\x85\x01`\x05\x1C\x82\x01\x91P[\x81\x81\x10\x15b\0\x02\0W\x82\x81U`\x01\x01b\0\x01\xEBV[PPP[PPPV[\x81Q`\x01`\x01`@\x1B\x03\x81\x11\x15b\0\x02%Wb\0\x02%b\0\0YV[b\0\x02=\x81b\0\x026\x84Tb\0\x01}V[\x84b\0\x01\xB7V[` \x80`\x1F\x83\x11`\x01\x81\x14b\0\x02sW_\x84\x15b\0\x02[WP\x85\x83\x01Q[_\x19`\x03\x86\x90\x1B\x1C\x19\x16`\x01\x85\x90\x1B\x17\x85Ub\0\x02\0V[_\x85\x81R` \x81 `\x1F\x19\x86\x16\x91[\x82\x81\x10\x15b\0\x02\xA3W\x88\x86\x01Q\x82U\x94\x84\x01\x94`\x01\x90\x91\x01\x90\x84\x01b\0\x02\x82V[P\x85\x82\x10\x15b\0\x02\xC1W\x87\x85\x01Q_\x19`\x03\x88\x90\x1B`\xF8\x16\x1C\x19\x16\x81U[PPPPP`\x01\x90\x81\x1B\x01\x90UPV[a\x08/\x80b\0\x02\xDF_9_\xF3\xFE`\x80`@R4\x80\x15a\0\x0FW_\x80\xFD[P`\x046\x10a\0\xA6W_5`\xE0\x1C\x80c9P\x93Q\x11a\0nW\x80c9P\x93Q\x14a\x01\x1FW\x80cp\xA0\x821\x14a\x012W\x80c\x95\xD8\x9BA\x14a\x01ZW\x80c\xA4W\xC2\xD7\x14a\x01bW\x80c\xA9\x05\x9C\xBB\x14a\x01uW\x80c\xDDb\xED>\x14a\x01\x88W_\x80\xFD[\x80c\x06\xFD\xDE\x03\x14a\0\xAAW\x80c\t^\xA7\xB3\x14a\0\xC8W\x80c\x18\x16\r\xDD\x14a\0\xEBW\x80c#\xB8r\xDD\x14a\0\xFDW\x80c1<\xE5g\x14a\x01\x10W[_\x80\xFD[a\0\xB2a\x01\x9BV[`@Qa\0\xBF\x91\x90a\x06\x8AV[`@Q\x80\x91\x03\x90\xF3[a\0\xDBa\0\xD66`\x04a\x06\xF0V[a\x02+V[`@Q\x90\x15\x15\x81R` \x01a\0\xBFV[`\x02T[`@Q\x90\x81R` \x01a\0\xBFV[a\0\xDBa\x01\x0B6`\x04a\x07\x18V[a\x02DV[`@Q`\x12\x81R` \x01a\0\xBFV[a\0\xDBa\x01-6`\x04a\x06\xF0V[a\x02gV[a\0\xEFa\x01@6`\x04a\x07QV[`\x01`\x01`\xA0\x1B\x03\x16_\x90\x81R` \x81\x90R`@\x90 T\x90V[a\0\xB2a\x02\x88V[a\0\xDBa\x01p6`\x04a\x06\xF0V[a\x02\x97V[a\0\xDBa\x01\x836`\x04a\x06\xF0V[a\x03\x16V[a\0\xEFa\x01\x966`\x04a\x07qV[a\x03#V[```\x03\x80Ta\x01\xAA\x90a\x07\xA2V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x01\xD6\x90a\x07\xA2V[\x80\x15a\x02!W\x80`\x1F\x10a\x01\xF8Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x02!V[\x82\x01\x91\x90_R` _ \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x02\x04W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x90P\x90V[_3a\x028\x81\x85\x85a\x03MV[`\x01\x91PP[\x92\x91PPV[_3a\x02Q\x85\x82\x85a\x04pV[a\x02\\\x85\x85\x85a\x04\xE8V[P`\x01\x94\x93PPPPV[_3a\x028\x81\x85\x85a\x02y\x83\x83a\x03#V[a\x02\x83\x91\x90a\x07\xDAV[a\x03MV[```\x04\x80Ta\x01\xAA\x90a\x07\xA2V[_3\x81a\x02\xA4\x82\x86a\x03#V[\x90P\x83\x81\x10\x15a\x03\tW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`%`$\x82\x01R\x7FERC20: decreased allowance below`D\x82\x01Rd zero`\xD8\x1B`d\x82\x01R`\x84\x01[`@Q\x80\x91\x03\x90\xFD[a\x02\\\x82\x86\x86\x84\x03a\x03MV[_3a\x028\x81\x85\x85a\x04\xE8V[`\x01`\x01`\xA0\x1B\x03\x91\x82\x16_\x90\x81R`\x01` \x90\x81R`@\x80\x83 \x93\x90\x94\x16\x82R\x91\x90\x91R T\x90V[`\x01`\x01`\xA0\x1B\x03\x83\x16a\x03\xAFW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`$\x80\x82\x01R\x7FERC20: approve from the zero add`D\x82\x01Rcress`\xE0\x1B`d\x82\x01R`\x84\x01a\x03\0V[`\x01`\x01`\xA0\x1B\x03\x82\x16a\x04\x10W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\"`$\x82\x01R\x7FERC20: approve to the zero addre`D\x82\x01Rass`\xF0\x1B`d\x82\x01R`\x84\x01a\x03\0V[`\x01`\x01`\xA0\x1B\x03\x83\x81\x16_\x81\x81R`\x01` \x90\x81R`@\x80\x83 \x94\x87\x16\x80\x84R\x94\x82R\x91\x82\x90 \x85\x90U\x90Q\x84\x81R\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\x01`@Q\x80\x91\x03\x90\xA3PPPV[_a\x04{\x84\x84a\x03#V[\x90P_\x19\x81\x14a\x04\xE2W\x81\x81\x10\x15a\x04\xD5W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1D`$\x82\x01R\x7FERC20: insufficient allowance\0\0\0`D\x82\x01R`d\x01a\x03\0V[a\x04\xE2\x84\x84\x84\x84\x03a\x03MV[PPPPV[`\x01`\x01`\xA0\x1B\x03\x83\x16a\x05LW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`%`$\x82\x01R\x7FERC20: transfer from the zero ad`D\x82\x01Rddress`\xD8\x1B`d\x82\x01R`\x84\x01a\x03\0V[`\x01`\x01`\xA0\x1B\x03\x82\x16a\x05\xAEW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`#`$\x82\x01R\x7FERC20: transfer to the zero addr`D\x82\x01Rbess`\xE8\x1B`d\x82\x01R`\x84\x01a\x03\0V[`\x01`\x01`\xA0\x1B\x03\x83\x16_\x90\x81R` \x81\x90R`@\x90 T\x81\x81\x10\x15a\x06%W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`&`$\x82\x01R\x7FERC20: transfer amount exceeds b`D\x82\x01Realance`\xD0\x1B`d\x82\x01R`\x84\x01a\x03\0V[`\x01`\x01`\xA0\x1B\x03\x84\x81\x16_\x81\x81R` \x81\x81R`@\x80\x83 \x87\x87\x03\x90U\x93\x87\x16\x80\x83R\x91\x84\x90 \x80T\x87\x01\x90U\x92Q\x85\x81R\x90\x92\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x91\x01`@Q\x80\x91\x03\x90\xA3a\x04\xE2V[_` \x80\x83R\x83Q\x80\x82\x85\x01R_[\x81\x81\x10\x15a\x06\xB5W\x85\x81\x01\x83\x01Q\x85\x82\x01`@\x01R\x82\x01a\x06\x99V[P_`@\x82\x86\x01\x01R`@`\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x92PPP\x92\x91PPV[\x805`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x06\xEBW_\x80\xFD[\x91\x90PV[_\x80`@\x83\x85\x03\x12\x15a\x07\x01W_\x80\xFD[a\x07\n\x83a\x06\xD5V[\x94` \x93\x90\x93\x015\x93PPPV[_\x80_``\x84\x86\x03\x12\x15a\x07*W_\x80\xFD[a\x073\x84a\x06\xD5V[\x92Pa\x07A` \x85\x01a\x06\xD5V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[_` \x82\x84\x03\x12\x15a\x07aW_\x80\xFD[a\x07j\x82a\x06\xD5V[\x93\x92PPPV[_\x80`@\x83\x85\x03\x12\x15a\x07\x82W_\x80\xFD[a\x07\x8B\x83a\x06\xD5V[\x91Pa\x07\x99` \x84\x01a\x06\xD5V[\x90P\x92P\x92\x90PV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x07\xB6W`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x07\xD4WcNH{q`\xE0\x1B_R`\"`\x04R`$_\xFD[P\x91\x90PV[\x80\x82\x01\x80\x82\x11\x15a\x02>WcNH{q`\xE0\x1B_R`\x11`\x04R`$_\xFD\xFE\xA2dipfsX\"\x12 \x8ESUR\xAB\x18\xED\xCEB~\x91\xFA\x18\x8Fg~\xB8\xC5\xC8\xE4\x0C\xFA\x97\xF6l\x14a\x01\x88W_\x80\xFD[\x80c\x06\xFD\xDE\x03\x14a\0\xAAW\x80c\t^\xA7\xB3\x14a\0\xC8W\x80c\x18\x16\r\xDD\x14a\0\xEBW\x80c#\xB8r\xDD\x14a\0\xFDW\x80c1<\xE5g\x14a\x01\x10W[_\x80\xFD[a\0\xB2a\x01\x9BV[`@Qa\0\xBF\x91\x90a\x06\x8AV[`@Q\x80\x91\x03\x90\xF3[a\0\xDBa\0\xD66`\x04a\x06\xF0V[a\x02+V[`@Q\x90\x15\x15\x81R` \x01a\0\xBFV[`\x02T[`@Q\x90\x81R` \x01a\0\xBFV[a\0\xDBa\x01\x0B6`\x04a\x07\x18V[a\x02DV[`@Q`\x12\x81R` \x01a\0\xBFV[a\0\xDBa\x01-6`\x04a\x06\xF0V[a\x02gV[a\0\xEFa\x01@6`\x04a\x07QV[`\x01`\x01`\xA0\x1B\x03\x16_\x90\x81R` \x81\x90R`@\x90 T\x90V[a\0\xB2a\x02\x88V[a\0\xDBa\x01p6`\x04a\x06\xF0V[a\x02\x97V[a\0\xDBa\x01\x836`\x04a\x06\xF0V[a\x03\x16V[a\0\xEFa\x01\x966`\x04a\x07qV[a\x03#V[```\x03\x80Ta\x01\xAA\x90a\x07\xA2V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x01\xD6\x90a\x07\xA2V[\x80\x15a\x02!W\x80`\x1F\x10a\x01\xF8Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x02!V[\x82\x01\x91\x90_R` _ \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x02\x04W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x90P\x90V[_3a\x028\x81\x85\x85a\x03MV[`\x01\x91PP[\x92\x91PPV[_3a\x02Q\x85\x82\x85a\x04pV[a\x02\\\x85\x85\x85a\x04\xE8V[P`\x01\x94\x93PPPPV[_3a\x028\x81\x85\x85a\x02y\x83\x83a\x03#V[a\x02\x83\x91\x90a\x07\xDAV[a\x03MV[```\x04\x80Ta\x01\xAA\x90a\x07\xA2V[_3\x81a\x02\xA4\x82\x86a\x03#V[\x90P\x83\x81\x10\x15a\x03\tW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`%`$\x82\x01R\x7FERC20: decreased allowance below`D\x82\x01Rd zero`\xD8\x1B`d\x82\x01R`\x84\x01[`@Q\x80\x91\x03\x90\xFD[a\x02\\\x82\x86\x86\x84\x03a\x03MV[_3a\x028\x81\x85\x85a\x04\xE8V[`\x01`\x01`\xA0\x1B\x03\x91\x82\x16_\x90\x81R`\x01` \x90\x81R`@\x80\x83 \x93\x90\x94\x16\x82R\x91\x90\x91R T\x90V[`\x01`\x01`\xA0\x1B\x03\x83\x16a\x03\xAFW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`$\x80\x82\x01R\x7FERC20: approve from the zero add`D\x82\x01Rcress`\xE0\x1B`d\x82\x01R`\x84\x01a\x03\0V[`\x01`\x01`\xA0\x1B\x03\x82\x16a\x04\x10W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\"`$\x82\x01R\x7FERC20: approve to the zero addre`D\x82\x01Rass`\xF0\x1B`d\x82\x01R`\x84\x01a\x03\0V[`\x01`\x01`\xA0\x1B\x03\x83\x81\x16_\x81\x81R`\x01` \x90\x81R`@\x80\x83 \x94\x87\x16\x80\x84R\x94\x82R\x91\x82\x90 \x85\x90U\x90Q\x84\x81R\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\x01`@Q\x80\x91\x03\x90\xA3PPPV[_a\x04{\x84\x84a\x03#V[\x90P_\x19\x81\x14a\x04\xE2W\x81\x81\x10\x15a\x04\xD5W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1D`$\x82\x01R\x7FERC20: insufficient allowance\0\0\0`D\x82\x01R`d\x01a\x03\0V[a\x04\xE2\x84\x84\x84\x84\x03a\x03MV[PPPPV[`\x01`\x01`\xA0\x1B\x03\x83\x16a\x05LW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`%`$\x82\x01R\x7FERC20: transfer from the zero ad`D\x82\x01Rddress`\xD8\x1B`d\x82\x01R`\x84\x01a\x03\0V[`\x01`\x01`\xA0\x1B\x03\x82\x16a\x05\xAEW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`#`$\x82\x01R\x7FERC20: transfer to the zero addr`D\x82\x01Rbess`\xE8\x1B`d\x82\x01R`\x84\x01a\x03\0V[`\x01`\x01`\xA0\x1B\x03\x83\x16_\x90\x81R` \x81\x90R`@\x90 T\x81\x81\x10\x15a\x06%W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`&`$\x82\x01R\x7FERC20: transfer amount exceeds b`D\x82\x01Realance`\xD0\x1B`d\x82\x01R`\x84\x01a\x03\0V[`\x01`\x01`\xA0\x1B\x03\x84\x81\x16_\x81\x81R` \x81\x81R`@\x80\x83 \x87\x87\x03\x90U\x93\x87\x16\x80\x83R\x91\x84\x90 \x80T\x87\x01\x90U\x92Q\x85\x81R\x90\x92\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x91\x01`@Q\x80\x91\x03\x90\xA3a\x04\xE2V[_` \x80\x83R\x83Q\x80\x82\x85\x01R_[\x81\x81\x10\x15a\x06\xB5W\x85\x81\x01\x83\x01Q\x85\x82\x01`@\x01R\x82\x01a\x06\x99V[P_`@\x82\x86\x01\x01R`@`\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x92PPP\x92\x91PPV[\x805`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x06\xEBW_\x80\xFD[\x91\x90PV[_\x80`@\x83\x85\x03\x12\x15a\x07\x01W_\x80\xFD[a\x07\n\x83a\x06\xD5V[\x94` \x93\x90\x93\x015\x93PPPV[_\x80_``\x84\x86\x03\x12\x15a\x07*W_\x80\xFD[a\x073\x84a\x06\xD5V[\x92Pa\x07A` \x85\x01a\x06\xD5V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[_` \x82\x84\x03\x12\x15a\x07aW_\x80\xFD[a\x07j\x82a\x06\xD5V[\x93\x92PPPV[_\x80`@\x83\x85\x03\x12\x15a\x07\x82W_\x80\xFD[a\x07\x8B\x83a\x06\xD5V[\x91Pa\x07\x99` \x84\x01a\x06\xD5V[\x90P\x92P\x92\x90PV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x07\xB6W`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x07\xD4WcNH{q`\xE0\x1B_R`\"`\x04R`$_\xFD[P\x91\x90PV[\x80\x82\x01\x80\x82\x11\x15a\x02>WcNH{q`\xE0\x1B_R`\x11`\x04R`$_\xFD\xFE\xA2dipfsX\"\x12 \x8ESUR\xAB\x18\xED\xCEB~\x91\xFA\x18\x8Fg~\xB8\xC5\xC8\xE4\x0C\xFA\x97\xF6l(::ethers::contract::Contract); - impl ::core::clone::Clone for ERC20 { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for ERC20 { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for ERC20 { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for ERC20 { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(ERC20)).field(&self.address()).finish() - } - } - impl ERC20 { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - ERC20_ABI.clone(), - client, - ), - ) - } - /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it. - /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction - /// - /// Notes: - /// - If there are no constructor arguments, you should pass `()` as the argument. - /// - The default poll duration is 7 seconds. - /// - The default number of confirmations is 1 block. - /// - /// - /// # Example - /// - /// Generate contract bindings with `abigen!` and deploy a new contract instance. - /// - /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. - /// - /// ```ignore - /// # async fn deploy(client: ::std::sync::Arc) { - /// abigen!(Greeter, "../greeter.json"); - /// - /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); - /// let msg = greeter_contract.greet().call().await.unwrap(); - /// # } - /// ``` - pub fn deploy( - client: ::std::sync::Arc, - constructor_args: T, - ) -> ::core::result::Result< - ::ethers::contract::builders::ContractDeployer, - ::ethers::contract::ContractError, - > { - let factory = ::ethers::contract::ContractFactory::new( - ERC20_ABI.clone(), - ERC20_BYTECODE.clone().into(), - client, - ); - let deployer = factory.deploy(constructor_args)?; - let deployer = ::ethers::contract::ContractDeployer::new(deployer); - Ok(deployer) - } - ///Calls the contract's `allowance` (0xdd62ed3e) function - pub fn allowance( - &self, - owner: ::ethers::core::types::Address, - spender: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([221, 98, 237, 62], (owner, spender)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `approve` (0x095ea7b3) function - pub fn approve( - &self, - spender: ::ethers::core::types::Address, - amount: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([9, 94, 167, 179], (spender, amount)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `balanceOf` (0x70a08231) function - pub fn balance_of( - &self, - account: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([112, 160, 130, 49], account) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `decimals` (0x313ce567) function - pub fn decimals(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([49, 60, 229, 103], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `decreaseAllowance` (0xa457c2d7) function - pub fn decrease_allowance( - &self, - spender: ::ethers::core::types::Address, - subtracted_value: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([164, 87, 194, 215], (spender, subtracted_value)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `increaseAllowance` (0x39509351) function - pub fn increase_allowance( - &self, - spender: ::ethers::core::types::Address, - added_value: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([57, 80, 147, 81], (spender, added_value)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `name` (0x06fdde03) function - pub fn name( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([6, 253, 222, 3], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `symbol` (0x95d89b41) function - pub fn symbol( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([149, 216, 155, 65], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `totalSupply` (0x18160ddd) function - pub fn total_supply( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([24, 22, 13, 221], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `transfer` (0xa9059cbb) function - pub fn transfer( - &self, - to: ::ethers::core::types::Address, - amount: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([169, 5, 156, 187], (to, amount)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `transferFrom` (0x23b872dd) function - pub fn transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - amount: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([35, 184, 114, 221], (from, to, amount)) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `Approval` event - pub fn approval_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalFilter, - > { - self.0.event() - } - ///Gets the contract's `Transfer` event - pub fn transfer_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - TransferFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, ERC20Events> { - self.0.event_with_filter(::core::default::Default::default()) - } - } - impl From<::ethers::contract::Contract> - for ERC20 { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")] - pub struct ApprovalFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub spender: ::ethers::core::types::Address, - pub value: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")] - pub struct TransferFilter { - #[ethevent(indexed)] - pub from: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub to: ::ethers::core::types::Address, - pub value: ::ethers::core::types::U256, - } - ///Container type for all of the contract's events - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum ERC20Events { - ApprovalFilter(ApprovalFilter), - TransferFilter(TransferFilter), - } - impl ::ethers::contract::EthLogDecode for ERC20Events { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = ApprovalFilter::decode_log(log) { - return Ok(ERC20Events::ApprovalFilter(decoded)); - } - if let Ok(decoded) = TransferFilter::decode_log(log) { - return Ok(ERC20Events::TransferFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for ERC20Events { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for ERC20Events { - fn from(value: ApprovalFilter) -> Self { - Self::ApprovalFilter(value) - } - } - impl ::core::convert::From for ERC20Events { - fn from(value: TransferFilter) -> Self { - Self::TransferFilter(value) - } - } - ///Container type for all input parameters for the `allowance` function with signature `allowance(address,address)` and selector `0xdd62ed3e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "allowance", abi = "allowance(address,address)")] - pub struct AllowanceCall { - pub owner: ::ethers::core::types::Address, - pub spender: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "approve", abi = "approve(address,uint256)")] - pub struct ApproveCall { - pub spender: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "balanceOf", abi = "balanceOf(address)")] - pub struct BalanceOfCall { - pub account: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `decimals` function with signature `decimals()` and selector `0x313ce567` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "decimals", abi = "decimals()")] - pub struct DecimalsCall; - ///Container type for all input parameters for the `decreaseAllowance` function with signature `decreaseAllowance(address,uint256)` and selector `0xa457c2d7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "decreaseAllowance", abi = "decreaseAllowance(address,uint256)")] - pub struct DecreaseAllowanceCall { - pub spender: ::ethers::core::types::Address, - pub subtracted_value: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `increaseAllowance` function with signature `increaseAllowance(address,uint256)` and selector `0x39509351` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "increaseAllowance", abi = "increaseAllowance(address,uint256)")] - pub struct IncreaseAllowanceCall { - pub spender: ::ethers::core::types::Address, - pub added_value: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "name", abi = "name()")] - pub struct NameCall; - ///Container type for all input parameters for the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "symbol", abi = "symbol()")] - pub struct SymbolCall; - ///Container type for all input parameters for the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "totalSupply", abi = "totalSupply()")] - pub struct TotalSupplyCall; - ///Container type for all input parameters for the `transfer` function with signature `transfer(address,uint256)` and selector `0xa9059cbb` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "transfer", abi = "transfer(address,uint256)")] - pub struct TransferCall { - pub to: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")] - pub struct TransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - } - ///Container type for all of the contract's call - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum ERC20Calls { - Allowance(AllowanceCall), - Approve(ApproveCall), - BalanceOf(BalanceOfCall), - Decimals(DecimalsCall), - DecreaseAllowance(DecreaseAllowanceCall), - IncreaseAllowance(IncreaseAllowanceCall), - Name(NameCall), - Symbol(SymbolCall), - TotalSupply(TotalSupplyCall), - Transfer(TransferCall), - TransferFrom(TransferFromCall), - } - impl ::ethers::core::abi::AbiDecode for ERC20Calls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Allowance(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Approve(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::BalanceOf(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Decimals(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::DecreaseAllowance(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::IncreaseAllowance(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Name(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Symbol(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TotalSupply(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Transfer(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TransferFrom(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for ERC20Calls { - fn encode(self) -> Vec { - match self { - Self::Allowance(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Approve(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::BalanceOf(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Decimals(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::DecreaseAllowance(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::IncreaseAllowance(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Name(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Symbol(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::TotalSupply(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Transfer(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::TransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for ERC20Calls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::Allowance(element) => ::core::fmt::Display::fmt(element, f), - Self::Approve(element) => ::core::fmt::Display::fmt(element, f), - Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f), - Self::Decimals(element) => ::core::fmt::Display::fmt(element, f), - Self::DecreaseAllowance(element) => ::core::fmt::Display::fmt(element, f), - Self::IncreaseAllowance(element) => ::core::fmt::Display::fmt(element, f), - Self::Name(element) => ::core::fmt::Display::fmt(element, f), - Self::Symbol(element) => ::core::fmt::Display::fmt(element, f), - Self::TotalSupply(element) => ::core::fmt::Display::fmt(element, f), - Self::Transfer(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for ERC20Calls { - fn from(value: AllowanceCall) -> Self { - Self::Allowance(value) - } - } - impl ::core::convert::From for ERC20Calls { - fn from(value: ApproveCall) -> Self { - Self::Approve(value) - } - } - impl ::core::convert::From for ERC20Calls { - fn from(value: BalanceOfCall) -> Self { - Self::BalanceOf(value) - } - } - impl ::core::convert::From for ERC20Calls { - fn from(value: DecimalsCall) -> Self { - Self::Decimals(value) - } - } - impl ::core::convert::From for ERC20Calls { - fn from(value: DecreaseAllowanceCall) -> Self { - Self::DecreaseAllowance(value) - } - } - impl ::core::convert::From for ERC20Calls { - fn from(value: IncreaseAllowanceCall) -> Self { - Self::IncreaseAllowance(value) - } - } - impl ::core::convert::From for ERC20Calls { - fn from(value: NameCall) -> Self { - Self::Name(value) - } - } - impl ::core::convert::From for ERC20Calls { - fn from(value: SymbolCall) -> Self { - Self::Symbol(value) - } - } - impl ::core::convert::From for ERC20Calls { - fn from(value: TotalSupplyCall) -> Self { - Self::TotalSupply(value) - } - } - impl ::core::convert::From for ERC20Calls { - fn from(value: TransferCall) -> Self { - Self::Transfer(value) - } - } - impl ::core::convert::From for ERC20Calls { - fn from(value: TransferFromCall) -> Self { - Self::TransferFrom(value) - } - } - ///Container type for all return fields from the `allowance` function with signature `allowance(address,address)` and selector `0xdd62ed3e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct AllowanceReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ApproveReturn(pub bool); - ///Container type for all return fields from the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct BalanceOfReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `decimals` function with signature `decimals()` and selector `0x313ce567` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct DecimalsReturn(pub u8); - ///Container type for all return fields from the `decreaseAllowance` function with signature `decreaseAllowance(address,uint256)` and selector `0xa457c2d7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct DecreaseAllowanceReturn(pub bool); - ///Container type for all return fields from the `increaseAllowance` function with signature `increaseAllowance(address,uint256)` and selector `0x39509351` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct IncreaseAllowanceReturn(pub bool); - ///Container type for all return fields from the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct NameReturn(pub ::std::string::String); - ///Container type for all return fields from the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SymbolReturn(pub ::std::string::String); - ///Container type for all return fields from the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TotalSupplyReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `transfer` function with signature `transfer(address,uint256)` and selector `0xa9059cbb` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TransferReturn(pub bool); - ///Container type for all return fields from the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TransferFromReturn(pub bool); + /// The deployed bytecode of the contract. + pub static ERC20_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = + ::ethers::core::types::Bytes::from_static(__DEPLOYED_BYTECODE); + pub struct ERC20(::ethers::contract::Contract); + impl ::core::clone::Clone for ERC20 { + fn clone(&self) -> Self { + Self(::core::clone::Clone::clone(&self.0)) + } + } + impl ::core::ops::Deref for ERC20 { + type Target = ::ethers::contract::Contract; + fn deref(&self) -> &Self::Target { + &self.0 + } + } + impl ::core::ops::DerefMut for ERC20 { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } + } + impl ::core::fmt::Debug for ERC20 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple(::core::stringify!(ERC20)).field(&self.address()).finish() + } + } + impl ERC20 { + /// Creates a new contract instance with the specified `ethers` client at + /// `address`. The contract derefs to a `ethers::Contract` object. + pub fn new>( + address: T, + client: ::std::sync::Arc, + ) -> Self { + Self(::ethers::contract::Contract::new(address.into(), ERC20_ABI.clone(), client)) + } + /// Constructs the general purpose `Deployer` instance based on the provided constructor + /// arguments and sends it. Returns a new instance of a deployer that returns an instance + /// of this contract after sending the transaction + /// + /// Notes: + /// - If there are no constructor arguments, you should pass `()` as the argument. + /// - The default poll duration is 7 seconds. + /// - The default number of confirmations is 1 block. + /// + /// + /// # Example + /// + /// Generate contract bindings with `abigen!` and deploy a new contract instance. + /// + /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. + /// + /// ```ignore + /// # async fn deploy(client: ::std::sync::Arc) { + /// abigen!(Greeter, "../greeter.json"); + /// + /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); + /// let msg = greeter_contract.greet().call().await.unwrap(); + /// # } + /// ``` + pub fn deploy( + client: ::std::sync::Arc, + constructor_args: T, + ) -> ::core::result::Result< + ::ethers::contract::builders::ContractDeployer, + ::ethers::contract::ContractError, + > { + let factory = ::ethers::contract::ContractFactory::new( + ERC20_ABI.clone(), + ERC20_BYTECODE.clone().into(), + client, + ); + let deployer = factory.deploy(constructor_args)?; + let deployer = ::ethers::contract::ContractDeployer::new(deployer); + Ok(deployer) + } + ///Calls the contract's `allowance` (0xdd62ed3e) function + pub fn allowance( + &self, + owner: ::ethers::core::types::Address, + spender: ::ethers::core::types::Address, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([221, 98, 237, 62], (owner, spender)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `approve` (0x095ea7b3) function + pub fn approve( + &self, + spender: ::ethers::core::types::Address, + amount: ::ethers::core::types::U256, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([9, 94, 167, 179], (spender, amount)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `balanceOf` (0x70a08231) function + pub fn balance_of( + &self, + account: ::ethers::core::types::Address, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([112, 160, 130, 49], account) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `decimals` (0x313ce567) function + pub fn decimals(&self) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([49, 60, 229, 103], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `decreaseAllowance` (0xa457c2d7) function + pub fn decrease_allowance( + &self, + spender: ::ethers::core::types::Address, + subtracted_value: ::ethers::core::types::U256, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([164, 87, 194, 215], (spender, subtracted_value)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `increaseAllowance` (0x39509351) function + pub fn increase_allowance( + &self, + spender: ::ethers::core::types::Address, + added_value: ::ethers::core::types::U256, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([57, 80, 147, 81], (spender, added_value)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `name` (0x06fdde03) function + pub fn name(&self) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([6, 253, 222, 3], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `symbol` (0x95d89b41) function + pub fn symbol( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([149, 216, 155, 65], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `totalSupply` (0x18160ddd) function + pub fn total_supply( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([24, 22, 13, 221], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `transfer` (0xa9059cbb) function + pub fn transfer( + &self, + to: ::ethers::core::types::Address, + amount: ::ethers::core::types::U256, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([169, 5, 156, 187], (to, amount)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `transferFrom` (0x23b872dd) function + pub fn transfer_from( + &self, + from: ::ethers::core::types::Address, + to: ::ethers::core::types::Address, + amount: ::ethers::core::types::U256, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([35, 184, 114, 221], (from, to, amount)) + .expect("method not found (this should never happen)") + } + ///Gets the contract's `Approval` event + pub fn approval_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, ApprovalFilter> { + self.0.event() + } + ///Gets the contract's `Transfer` event + pub fn transfer_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, TransferFilter> { + self.0.event() + } + /// Returns an `Event` builder for all the events of this contract. + pub fn events( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, ERC20Events> { + self.0.event_with_filter(::core::default::Default::default()) + } + } + impl From<::ethers::contract::Contract> for ERC20 { + fn from(contract: ::ethers::contract::Contract) -> Self { + Self::new(contract.address(), contract.client()) + } + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")] + pub struct ApprovalFilter { + #[ethevent(indexed)] + pub owner: ::ethers::core::types::Address, + #[ethevent(indexed)] + pub spender: ::ethers::core::types::Address, + pub value: ::ethers::core::types::U256, + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")] + pub struct TransferFilter { + #[ethevent(indexed)] + pub from: ::ethers::core::types::Address, + #[ethevent(indexed)] + pub to: ::ethers::core::types::Address, + pub value: ::ethers::core::types::U256, + } + ///Container type for all of the contract's events + #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] + pub enum ERC20Events { + ApprovalFilter(ApprovalFilter), + TransferFilter(TransferFilter), + } + impl ::ethers::contract::EthLogDecode for ERC20Events { + fn decode_log( + log: &::ethers::core::abi::RawLog, + ) -> ::core::result::Result { + if let Ok(decoded) = ApprovalFilter::decode_log(log) { + return Ok(ERC20Events::ApprovalFilter(decoded)); + } + if let Ok(decoded) = TransferFilter::decode_log(log) { + return Ok(ERC20Events::TransferFilter(decoded)); + } + Err(::ethers::core::abi::Error::InvalidData) + } + } + impl ::core::fmt::Display for ERC20Events { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + match self { + Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f), + } + } + } + impl ::core::convert::From for ERC20Events { + fn from(value: ApprovalFilter) -> Self { + Self::ApprovalFilter(value) + } + } + impl ::core::convert::From for ERC20Events { + fn from(value: TransferFilter) -> Self { + Self::TransferFilter(value) + } + } + ///Container type for all input parameters for the `allowance` function with signature + /// `allowance(address,address)` and selector `0xdd62ed3e` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "allowance", abi = "allowance(address,address)")] + pub struct AllowanceCall { + pub owner: ::ethers::core::types::Address, + pub spender: ::ethers::core::types::Address, + } + ///Container type for all input parameters for the `approve` function with signature + /// `approve(address,uint256)` and selector `0x095ea7b3` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "approve", abi = "approve(address,uint256)")] + pub struct ApproveCall { + pub spender: ::ethers::core::types::Address, + pub amount: ::ethers::core::types::U256, + } + ///Container type for all input parameters for the `balanceOf` function with signature + /// `balanceOf(address)` and selector `0x70a08231` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "balanceOf", abi = "balanceOf(address)")] + pub struct BalanceOfCall { + pub account: ::ethers::core::types::Address, + } + ///Container type for all input parameters for the `decimals` function with signature + /// `decimals()` and selector `0x313ce567` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "decimals", abi = "decimals()")] + pub struct DecimalsCall; + ///Container type for all input parameters for the `decreaseAllowance` function with signature + /// `decreaseAllowance(address,uint256)` and selector `0xa457c2d7` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "decreaseAllowance", abi = "decreaseAllowance(address,uint256)")] + pub struct DecreaseAllowanceCall { + pub spender: ::ethers::core::types::Address, + pub subtracted_value: ::ethers::core::types::U256, + } + ///Container type for all input parameters for the `increaseAllowance` function with signature + /// `increaseAllowance(address,uint256)` and selector `0x39509351` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "increaseAllowance", abi = "increaseAllowance(address,uint256)")] + pub struct IncreaseAllowanceCall { + pub spender: ::ethers::core::types::Address, + pub added_value: ::ethers::core::types::U256, + } + ///Container type for all input parameters for the `name` function with signature `name()` and + /// selector `0x06fdde03` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "name", abi = "name()")] + pub struct NameCall; + ///Container type for all input parameters for the `symbol` function with signature `symbol()` + /// and selector `0x95d89b41` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "symbol", abi = "symbol()")] + pub struct SymbolCall; + ///Container type for all input parameters for the `totalSupply` function with signature + /// `totalSupply()` and selector `0x18160ddd` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "totalSupply", abi = "totalSupply()")] + pub struct TotalSupplyCall; + ///Container type for all input parameters for the `transfer` function with signature + /// `transfer(address,uint256)` and selector `0xa9059cbb` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "transfer", abi = "transfer(address,uint256)")] + pub struct TransferCall { + pub to: ::ethers::core::types::Address, + pub amount: ::ethers::core::types::U256, + } + ///Container type for all input parameters for the `transferFrom` function with signature + /// `transferFrom(address,address,uint256)` and selector `0x23b872dd` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")] + pub struct TransferFromCall { + pub from: ::ethers::core::types::Address, + pub to: ::ethers::core::types::Address, + pub amount: ::ethers::core::types::U256, + } + ///Container type for all of the contract's call + #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] + pub enum ERC20Calls { + Allowance(AllowanceCall), + Approve(ApproveCall), + BalanceOf(BalanceOfCall), + Decimals(DecimalsCall), + DecreaseAllowance(DecreaseAllowanceCall), + IncreaseAllowance(IncreaseAllowanceCall), + Name(NameCall), + Symbol(SymbolCall), + TotalSupply(TotalSupplyCall), + Transfer(TransferCall), + TransferFrom(TransferFromCall), + } + impl ::ethers::core::abi::AbiDecode for ERC20Calls { + fn decode( + data: impl AsRef<[u8]>, + ) -> ::core::result::Result { + let data = data.as_ref(); + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Allowance(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Approve(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::BalanceOf(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Decimals(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::DecreaseAllowance(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::IncreaseAllowance(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Name(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Symbol(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::TotalSupply(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Transfer(decoded)); + } + if let Ok(decoded) = ::decode(data) + { + return Ok(Self::TransferFrom(decoded)); + } + Err(::ethers::core::abi::Error::InvalidData.into()) + } + } + impl ::ethers::core::abi::AbiEncode for ERC20Calls { + fn encode(self) -> Vec { + match self { + Self::Allowance(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::Approve(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::BalanceOf(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::Decimals(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::DecreaseAllowance(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::IncreaseAllowance(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::Name(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::Symbol(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::TotalSupply(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::Transfer(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::TransferFrom(element) => ::ethers::core::abi::AbiEncode::encode(element), + } + } + } + impl ::core::fmt::Display for ERC20Calls { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + match self { + Self::Allowance(element) => ::core::fmt::Display::fmt(element, f), + Self::Approve(element) => ::core::fmt::Display::fmt(element, f), + Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f), + Self::Decimals(element) => ::core::fmt::Display::fmt(element, f), + Self::DecreaseAllowance(element) => ::core::fmt::Display::fmt(element, f), + Self::IncreaseAllowance(element) => ::core::fmt::Display::fmt(element, f), + Self::Name(element) => ::core::fmt::Display::fmt(element, f), + Self::Symbol(element) => ::core::fmt::Display::fmt(element, f), + Self::TotalSupply(element) => ::core::fmt::Display::fmt(element, f), + Self::Transfer(element) => ::core::fmt::Display::fmt(element, f), + Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f), + } + } + } + impl ::core::convert::From for ERC20Calls { + fn from(value: AllowanceCall) -> Self { + Self::Allowance(value) + } + } + impl ::core::convert::From for ERC20Calls { + fn from(value: ApproveCall) -> Self { + Self::Approve(value) + } + } + impl ::core::convert::From for ERC20Calls { + fn from(value: BalanceOfCall) -> Self { + Self::BalanceOf(value) + } + } + impl ::core::convert::From for ERC20Calls { + fn from(value: DecimalsCall) -> Self { + Self::Decimals(value) + } + } + impl ::core::convert::From for ERC20Calls { + fn from(value: DecreaseAllowanceCall) -> Self { + Self::DecreaseAllowance(value) + } + } + impl ::core::convert::From for ERC20Calls { + fn from(value: IncreaseAllowanceCall) -> Self { + Self::IncreaseAllowance(value) + } + } + impl ::core::convert::From for ERC20Calls { + fn from(value: NameCall) -> Self { + Self::Name(value) + } + } + impl ::core::convert::From for ERC20Calls { + fn from(value: SymbolCall) -> Self { + Self::Symbol(value) + } + } + impl ::core::convert::From for ERC20Calls { + fn from(value: TotalSupplyCall) -> Self { + Self::TotalSupply(value) + } + } + impl ::core::convert::From for ERC20Calls { + fn from(value: TransferCall) -> Self { + Self::Transfer(value) + } + } + impl ::core::convert::From for ERC20Calls { + fn from(value: TransferFromCall) -> Self { + Self::TransferFrom(value) + } + } + ///Container type for all return fields from the `allowance` function with signature + /// `allowance(address,address)` and selector `0xdd62ed3e` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct AllowanceReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `approve` function with signature + /// `approve(address,uint256)` and selector `0x095ea7b3` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct ApproveReturn(pub bool); + ///Container type for all return fields from the `balanceOf` function with signature + /// `balanceOf(address)` and selector `0x70a08231` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct BalanceOfReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `decimals` function with signature + /// `decimals()` and selector `0x313ce567` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct DecimalsReturn(pub u8); + ///Container type for all return fields from the `decreaseAllowance` function with signature + /// `decreaseAllowance(address,uint256)` and selector `0xa457c2d7` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct DecreaseAllowanceReturn(pub bool); + ///Container type for all return fields from the `increaseAllowance` function with signature + /// `increaseAllowance(address,uint256)` and selector `0x39509351` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct IncreaseAllowanceReturn(pub bool); + ///Container type for all return fields from the `name` function with signature `name()` and + /// selector `0x06fdde03` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct NameReturn(pub ::std::string::String); + ///Container type for all return fields from the `symbol` function with signature `symbol()` + /// and selector `0x95d89b41` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct SymbolReturn(pub ::std::string::String); + ///Container type for all return fields from the `totalSupply` function with signature + /// `totalSupply()` and selector `0x18160ddd` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct TotalSupplyReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `transfer` function with signature + /// `transfer(address,uint256)` and selector `0xa9059cbb` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct TransferReturn(pub bool); + ///Container type for all return fields from the `transferFrom` function with signature + /// `transferFrom(address,address,uint256)` and selector `0x23b872dd` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct TransferFromReturn(pub bool); } diff --git a/evm/abi/src/generated/evm_host.rs b/evm/abi/src/generated/evm_host.rs index e8f162cb5..ed862de10 100644 --- a/evm/abi/src/generated/evm_host.rs +++ b/evm/abi/src/generated/evm_host.rs @@ -2,18 +2,18 @@ pub use evm_host::*; /// This module was auto-generated with ethers-rs Abigen. /// More information at: #[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, + clippy::enum_variant_names, + clippy::too_many_arguments, + clippy::upper_case_acronyms, + clippy::type_complexity, + dead_code, + non_camel_case_types )] pub mod evm_host { - pub use super::super::shared_types::*; - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { + pub use super::super::shared_types::*; + #[allow(deprecated)] + fn __abi() -> ::ethers::core::abi::Abi { + ::ethers::core::abi::ethabi::Contract { constructor: ::core::option::Option::None, functions: ::core::convert::From::from([ ( @@ -2254,3657 +2254,3433 @@ pub mod evm_host { receive: true, fallback: false, } - } - ///The parsed JSON ABI of the contract. - pub static EVMHOST_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - pub struct EvmHost(::ethers::contract::Contract); - impl ::core::clone::Clone for EvmHost { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for EvmHost { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for EvmHost { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for EvmHost { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(EvmHost)).field(&self.address()).finish() - } - } - impl EvmHost { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - EVMHOST_ABI.clone(), - client, - ), - ) - } - ///Calls the contract's `admin` (0xf851a440) function - pub fn admin( - &self, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([248, 81, 164, 64], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `chainId` (0x9a8a0592) function - pub fn chain_id( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([154, 138, 5, 146], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `challengePeriod` (0xf3f480d9) function - pub fn challenge_period( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([243, 244, 128, 217], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `consensusClient` (0x2476132b) function - pub fn consensus_client( - &self, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([36, 118, 19, 43], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `consensusState` (0xbbad99d4) function - pub fn consensus_state( - &self, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Bytes, - > { - self.0 - .method_hash([187, 173, 153, 212], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `consensusUpdateTime` (0x9a8425bc) function - pub fn consensus_update_time( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([154, 132, 37, 188], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `deleteStateMachineCommitment` (0xf8ddf259) function - pub fn delete_state_machine_commitment( - &self, - height: StateMachineHeight, - fisherman: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([248, 221, 242, 89], (height, fisherman)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `dispatch` (0x94480805) function - pub fn dispatch( - &self, - post: DispatchPost, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([148, 72, 8, 5], (post,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `dispatch` (0xb8f3e8f5) function - pub fn dispatch_with_post( - &self, - post: DispatchPost, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([184, 243, 232, 245], (post,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `dispatch` (0xd22e3343) function - pub fn dispatch_with_get( - &self, - get: DispatchGet, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([210, 46, 51, 67], (get,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `dispatchIncoming` (0xab013de1) function - pub fn dispatch_incoming( - &self, - response: GetResponse, - relayer: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([171, 1, 61, 225], (response, relayer)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `dispatchIncoming` (0xb85e6fbb) function - pub fn dispatch_incoming_with_request( - &self, - request: PostRequest, - relayer: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([184, 94, 111, 187], (request, relayer)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `dispatchIncoming` (0xfc8a341c) function - pub fn dispatch_incoming_with_response( - &self, - response: GetResponse, - relayer: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([252, 138, 52, 28], (response, relayer)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `dispatchTimeOut` (0x0446fc47) function - pub fn dispatch_time_out_0( - &self, - response: PostResponse, - meta: FeeMetadata, - commitment: [u8; 32], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([4, 70, 252, 71], (response, meta, commitment)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `dispatchTimeOut` (0x4b46efaa) function - pub fn dispatch_time_out_1( - &self, - request: GetRequest, - meta: FeeMetadata, - commitment: [u8; 32], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([75, 70, 239, 170], (request, meta, commitment)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `dispatchTimeOut` (0x6d6c2313) function - pub fn dispatch_time_out_2( - &self, - request: GetRequest, - meta: FeeMetadata, - commitment: [u8; 32], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([109, 108, 35, 19], (request, meta, commitment)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `feeToken` (0x647846a5) function - pub fn fee_token( - &self, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([100, 120, 70, 165], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `frozen` (0x054f7d9c) function - pub fn frozen(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([5, 79, 125, 156], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `fundRequest` (0xb9ea3289) function - pub fn fund_request( - &self, - commitment: [u8; 32], - amount: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([185, 234, 50, 137], (commitment, amount)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `fundResponse` (0xfadce3c7) function - pub fn fund_response( - &self, - commitment: [u8; 32], - amount: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([250, 220, 227, 199], (commitment, amount)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `host` (0xf437bc59) function - pub fn host( - &self, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Bytes, - > { - self.0 - .method_hash([244, 55, 188, 89], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `hostParams` (0x2215364d) function - pub fn host_params( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([34, 21, 54, 77], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `hyperbridge` (0x005e763e) function - pub fn hyperbridge( - &self, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Bytes, - > { - self.0 - .method_hash([0, 94, 118, 62], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `latestStateMachineHeight` (0x9c095f86) function - pub fn latest_state_machine_height( - &self, - id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([156, 9, 95, 134], id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `nonce` (0xaffed0e0) function - pub fn nonce( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([175, 254, 208, 224], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `perByteFee` (0x4011ec0a) function - pub fn per_byte_fee( - &self, - state_id: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([64, 17, 236, 10], state_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `requestCommitments` (0x368bf464) function - pub fn request_commitments( - &self, - commitment: [u8; 32], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([54, 139, 244, 100], commitment) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `requestReceipts` (0x19667a3e) function - pub fn request_receipts( - &self, - commitment: [u8; 32], - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([25, 102, 122, 62], commitment) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `responded` (0x73bfa8ae) function - pub fn responded( - &self, - commitment: [u8; 32], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([115, 191, 168, 174], commitment) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `responseCommitments` (0x2211f1dd) function - pub fn response_commitments( - &self, - commitment: [u8; 32], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([34, 17, 241, 221], commitment) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `responseReceipts` (0x8856337e) function - pub fn response_receipts( - &self, - commitment: [u8; 32], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([136, 86, 51, 126], commitment) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `setConsensusState` (0x8d48f3c7) function - pub fn set_consensus_state( - &self, - state: ::ethers::core::types::Bytes, - height: StateMachineHeight, - commitment: StateCommitment, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([141, 72, 243, 199], (state, height, commitment)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `setFrozenState` (0x6ac88bad) function - pub fn set_frozen_state( - &self, - new_state: u8, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([106, 200, 139, 173], new_state) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `stateCommitmentFee` (0xb5c8a08e) function - pub fn state_commitment_fee( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([181, 200, 160, 142], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `stateMachineCommitment` (0xa70a8c47) function - pub fn state_machine_commitment( - &self, - height: StateMachineHeight, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([167, 10, 140, 71], (height,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `stateMachineCommitmentUpdateTime` (0x1a880a93) function - pub fn state_machine_commitment_update_time( - &self, - height: StateMachineHeight, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([26, 136, 10, 147], (height,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `stateMachineId` (0x7a1bd7c1) function - pub fn state_machine_id( - &self, - parachain_id: ::ethers::core::types::Bytes, - id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([122, 27, 215, 193], (parachain_id, id)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `storeConsensusState` (0xb4974cf0) function - pub fn store_consensus_state( - &self, - state: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([180, 151, 76, 240], state) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `storeStateMachineCommitment` (0x559efe9e) function - pub fn store_state_machine_commitment( - &self, - height: StateMachineHeight, - commitment: StateCommitment, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([85, 158, 254, 158], (height, commitment)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `timestamp` (0xb80777ea) function - pub fn timestamp( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([184, 7, 119, 234], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `unStakingPeriod` (0xd40784c7) function - pub fn un_staking_period( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([212, 7, 132, 199], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `uniswapV2Router` (0x1694505e) function - pub fn uniswap_v2_router( - &self, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([22, 148, 80, 94], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `updateHostParams` (0x6ad7df47) function - pub fn update_host_params( - &self, - params: HostParams, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([106, 215, 223, 71], (params,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `vetoes` (0x5218d908) function - pub fn vetoes( - &self, - para_id: ::ethers::core::types::U256, - height: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([82, 24, 217, 8], (para_id, height)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `withdraw` (0xcb1a6e2f) function - pub fn withdraw( - &self, - params: WithdrawParams, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([203, 26, 110, 47], (params,)) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `GetRequestEvent` event - pub fn get_request_event_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - GetRequestEventFilter, - > { - self.0.event() - } - ///Gets the contract's `GetRequestHandled` event - pub fn get_request_handled_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - GetRequestHandledFilter, - > { - self.0.event() - } - ///Gets the contract's `GetRequestTimeoutHandled` event - pub fn get_request_timeout_handled_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - GetRequestTimeoutHandledFilter, - > { - self.0.event() - } - ///Gets the contract's `HostFrozen` event - pub fn host_frozen_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - HostFrozenFilter, - > { - self.0.event() - } - ///Gets the contract's `HostParamsUpdated` event - pub fn host_params_updated_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - HostParamsUpdatedFilter, - > { - self.0.event() - } - ///Gets the contract's `HostWithdrawal` event - pub fn host_withdrawal_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - HostWithdrawalFilter, - > { - self.0.event() - } - ///Gets the contract's `PostRequestEvent` event - pub fn post_request_event_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - PostRequestEventFilter, - > { - self.0.event() - } - ///Gets the contract's `PostRequestHandled` event - pub fn post_request_handled_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - PostRequestHandledFilter, - > { - self.0.event() - } - ///Gets the contract's `PostRequestTimeoutHandled` event - pub fn post_request_timeout_handled_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - PostRequestTimeoutHandledFilter, - > { - self.0.event() - } - ///Gets the contract's `PostResponseEvent` event - pub fn post_response_event_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - PostResponseEventFilter, - > { - self.0.event() - } - ///Gets the contract's `PostResponseFunded` event - pub fn post_response_funded_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - PostResponseFundedFilter, - > { - self.0.event() - } - ///Gets the contract's `PostResponseHandled` event - pub fn post_response_handled_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - PostResponseHandledFilter, - > { - self.0.event() - } - ///Gets the contract's `PostResponseTimeoutHandled` event - pub fn post_response_timeout_handled_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - PostResponseTimeoutHandledFilter, - > { - self.0.event() - } - ///Gets the contract's `RequestFunded` event - pub fn request_funded_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - RequestFundedFilter, - > { - self.0.event() - } - ///Gets the contract's `StateCommitmentRead` event - pub fn state_commitment_read_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - StateCommitmentReadFilter, - > { - self.0.event() - } - ///Gets the contract's `StateCommitmentVetoed` event - pub fn state_commitment_vetoed_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - StateCommitmentVetoedFilter, - > { - self.0.event() - } - ///Gets the contract's `StateMachineUpdated` event - pub fn state_machine_updated_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - StateMachineUpdatedFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, EvmHostEvents> { - self.0.event_with_filter(::core::default::Default::default()) - } - } - impl From<::ethers::contract::Contract> - for EvmHost { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - ///Custom Error type `CannotChangeFeeToken` with signature `CannotChangeFeeToken()` and selector `0x50b79e6a` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "CannotChangeFeeToken", abi = "CannotChangeFeeToken()")] - pub struct CannotChangeFeeToken; - ///Custom Error type `DuplicateResponse` with signature `DuplicateResponse()` and selector `0x276d57d8` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "DuplicateResponse", abi = "DuplicateResponse()")] - pub struct DuplicateResponse; - ///Custom Error type `FrozenHost` with signature `FrozenHost()` and selector `0x61dfed09` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "FrozenHost", abi = "FrozenHost()")] - pub struct FrozenHost; - ///Custom Error type `InvalidAddressLength` with signature `InvalidAddressLength()` and selector `0xcc2cec02` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "InvalidAddressLength", abi = "InvalidAddressLength()")] - pub struct InvalidAddressLength; - ///Custom Error type `InvalidConsensusClient` with signature `InvalidConsensusClient()` and selector `0x1435c60b` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "InvalidConsensusClient", abi = "InvalidConsensusClient()")] - pub struct InvalidConsensusClient; - ///Custom Error type `InvalidHandler` with signature `InvalidHandler()` and selector `0xd8f59fa5` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "InvalidHandler", abi = "InvalidHandler()")] - pub struct InvalidHandler; - ///Custom Error type `InvalidHostManager` with signature `InvalidHostManager()` and selector `0xd445bb14` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "InvalidHostManager", abi = "InvalidHostManager()")] - pub struct InvalidHostManager; - ///Custom Error type `InvalidHyperbridgeId` with signature `InvalidHyperbridgeId()` and selector `0x9ea9869f` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "InvalidHyperbridgeId", abi = "InvalidHyperbridgeId()")] - pub struct InvalidHyperbridgeId; - ///Custom Error type `InvalidStateMachinesLength` with signature `InvalidStateMachinesLength()` and selector `0x4f450476` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror( - name = "InvalidStateMachinesLength", - abi = "InvalidStateMachinesLength()" - )] - pub struct InvalidStateMachinesLength; - ///Custom Error type `InvalidUnstakingPeriod` with signature `InvalidUnstakingPeriod()` and selector `0xd641157e` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "InvalidUnstakingPeriod", abi = "InvalidUnstakingPeriod()")] - pub struct InvalidUnstakingPeriod; - ///Custom Error type `UnauthorizedAccount` with signature `UnauthorizedAccount()` and selector `0xa97ff08a` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "UnauthorizedAccount", abi = "UnauthorizedAccount()")] - pub struct UnauthorizedAccount; - ///Custom Error type `UnauthorizedAction` with signature `UnauthorizedAction()` and selector `0x843800fa` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "UnauthorizedAction", abi = "UnauthorizedAction()")] - pub struct UnauthorizedAction; - ///Custom Error type `UnauthorizedResponse` with signature `UnauthorizedResponse()` and selector `0x850dc39c` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "UnauthorizedResponse", abi = "UnauthorizedResponse()")] - pub struct UnauthorizedResponse; - ///Custom Error type `UnknownRequest` with signature `UnknownRequest()` and selector `0x6d080297` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "UnknownRequest", abi = "UnknownRequest()")] - pub struct UnknownRequest; - ///Custom Error type `UnknownResponse` with signature `UnknownResponse()` and selector `0x950a5b24` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "UnknownResponse", abi = "UnknownResponse()")] - pub struct UnknownResponse; - ///Custom Error type `WithdrawalFailed` with signature `WithdrawalFailed()` and selector `0x27fcd9d1` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "WithdrawalFailed", abi = "WithdrawalFailed()")] - pub struct WithdrawalFailed; - ///Container type for all of the contract's custom errors - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum EvmHostErrors { - CannotChangeFeeToken(CannotChangeFeeToken), - DuplicateResponse(DuplicateResponse), - FrozenHost(FrozenHost), - InvalidAddressLength(InvalidAddressLength), - InvalidConsensusClient(InvalidConsensusClient), - InvalidHandler(InvalidHandler), - InvalidHostManager(InvalidHostManager), - InvalidHyperbridgeId(InvalidHyperbridgeId), - InvalidStateMachinesLength(InvalidStateMachinesLength), - InvalidUnstakingPeriod(InvalidUnstakingPeriod), - UnauthorizedAccount(UnauthorizedAccount), - UnauthorizedAction(UnauthorizedAction), - UnauthorizedResponse(UnauthorizedResponse), - UnknownRequest(UnknownRequest), - UnknownResponse(UnknownResponse), - WithdrawalFailed(WithdrawalFailed), - /// The standard solidity revert string, with selector - /// Error(string) -- 0x08c379a0 - RevertString(::std::string::String), - } - impl ::ethers::core::abi::AbiDecode for EvmHostErrors { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = <::std::string::String as ::ethers::core::abi::AbiDecode>::decode( - data, - ) { - return Ok(Self::RevertString(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::CannotChangeFeeToken(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::DuplicateResponse(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::FrozenHost(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::InvalidAddressLength(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::InvalidConsensusClient(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::InvalidHandler(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::InvalidHostManager(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::InvalidHyperbridgeId(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::InvalidStateMachinesLength(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::InvalidUnstakingPeriod(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::UnauthorizedAccount(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::UnauthorizedAction(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::UnauthorizedResponse(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::UnknownRequest(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::UnknownResponse(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::WithdrawalFailed(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for EvmHostErrors { - fn encode(self) -> ::std::vec::Vec { - match self { - Self::CannotChangeFeeToken(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::DuplicateResponse(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::FrozenHost(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::InvalidAddressLength(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::InvalidConsensusClient(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::InvalidHandler(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::InvalidHostManager(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::InvalidHyperbridgeId(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::InvalidStateMachinesLength(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::InvalidUnstakingPeriod(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::UnauthorizedAccount(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::UnauthorizedAction(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::UnauthorizedResponse(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::UnknownRequest(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::UnknownResponse(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::WithdrawalFailed(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s), - } - } - } - impl ::ethers::contract::ContractRevert for EvmHostErrors { - fn valid_selector(selector: [u8; 4]) -> bool { - match selector { - [0x08, 0xc3, 0x79, 0xa0] => true, - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => true, - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ => false, - } - } - } - impl ::core::fmt::Display for EvmHostErrors { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::CannotChangeFeeToken(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::DuplicateResponse(element) => ::core::fmt::Display::fmt(element, f), - Self::FrozenHost(element) => ::core::fmt::Display::fmt(element, f), - Self::InvalidAddressLength(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::InvalidConsensusClient(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::InvalidHandler(element) => ::core::fmt::Display::fmt(element, f), - Self::InvalidHostManager(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::InvalidHyperbridgeId(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::InvalidStateMachinesLength(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::InvalidUnstakingPeriod(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::UnauthorizedAccount(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::UnauthorizedAction(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::UnauthorizedResponse(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::UnknownRequest(element) => ::core::fmt::Display::fmt(element, f), - Self::UnknownResponse(element) => ::core::fmt::Display::fmt(element, f), - Self::WithdrawalFailed(element) => ::core::fmt::Display::fmt(element, f), - Self::RevertString(s) => ::core::fmt::Display::fmt(s, f), - } - } - } - impl ::core::convert::From<::std::string::String> for EvmHostErrors { - fn from(value: String) -> Self { - Self::RevertString(value) - } - } - impl ::core::convert::From for EvmHostErrors { - fn from(value: CannotChangeFeeToken) -> Self { - Self::CannotChangeFeeToken(value) - } - } - impl ::core::convert::From for EvmHostErrors { - fn from(value: DuplicateResponse) -> Self { - Self::DuplicateResponse(value) - } - } - impl ::core::convert::From for EvmHostErrors { - fn from(value: FrozenHost) -> Self { - Self::FrozenHost(value) - } - } - impl ::core::convert::From for EvmHostErrors { - fn from(value: InvalidAddressLength) -> Self { - Self::InvalidAddressLength(value) - } - } - impl ::core::convert::From for EvmHostErrors { - fn from(value: InvalidConsensusClient) -> Self { - Self::InvalidConsensusClient(value) - } - } - impl ::core::convert::From for EvmHostErrors { - fn from(value: InvalidHandler) -> Self { - Self::InvalidHandler(value) - } - } - impl ::core::convert::From for EvmHostErrors { - fn from(value: InvalidHostManager) -> Self { - Self::InvalidHostManager(value) - } - } - impl ::core::convert::From for EvmHostErrors { - fn from(value: InvalidHyperbridgeId) -> Self { - Self::InvalidHyperbridgeId(value) - } - } - impl ::core::convert::From for EvmHostErrors { - fn from(value: InvalidStateMachinesLength) -> Self { - Self::InvalidStateMachinesLength(value) - } - } - impl ::core::convert::From for EvmHostErrors { - fn from(value: InvalidUnstakingPeriod) -> Self { - Self::InvalidUnstakingPeriod(value) - } - } - impl ::core::convert::From for EvmHostErrors { - fn from(value: UnauthorizedAccount) -> Self { - Self::UnauthorizedAccount(value) - } - } - impl ::core::convert::From for EvmHostErrors { - fn from(value: UnauthorizedAction) -> Self { - Self::UnauthorizedAction(value) - } - } - impl ::core::convert::From for EvmHostErrors { - fn from(value: UnauthorizedResponse) -> Self { - Self::UnauthorizedResponse(value) - } - } - impl ::core::convert::From for EvmHostErrors { - fn from(value: UnknownRequest) -> Self { - Self::UnknownRequest(value) - } - } - impl ::core::convert::From for EvmHostErrors { - fn from(value: UnknownResponse) -> Self { - Self::UnknownResponse(value) - } - } - impl ::core::convert::From for EvmHostErrors { - fn from(value: WithdrawalFailed) -> Self { - Self::WithdrawalFailed(value) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent( - name = "GetRequestEvent", - abi = "GetRequestEvent(string,string,address,bytes[],uint256,uint256,uint256,bytes,uint256)" - )] - pub struct GetRequestEventFilter { - pub source: ::std::string::String, - pub dest: ::std::string::String, - #[ethevent(indexed)] - pub from: ::ethers::core::types::Address, - pub keys: ::std::vec::Vec<::ethers::core::types::Bytes>, - pub height: ::ethers::core::types::U256, - pub nonce: ::ethers::core::types::U256, - pub timeout_timestamp: ::ethers::core::types::U256, - pub context: ::ethers::core::types::Bytes, - pub fee: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "GetRequestHandled", abi = "GetRequestHandled(bytes32,address)")] - pub struct GetRequestHandledFilter { - #[ethevent(indexed)] - pub commitment: [u8; 32], - pub relayer: ::ethers::core::types::Address, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent( - name = "GetRequestTimeoutHandled", - abi = "GetRequestTimeoutHandled(bytes32,string)" - )] - pub struct GetRequestTimeoutHandledFilter { - #[ethevent(indexed)] - pub commitment: [u8; 32], - pub dest: ::std::string::String, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "HostFrozen", abi = "HostFrozen(uint8)")] - pub struct HostFrozenFilter { - pub status: u8, - } - #[derive(Clone, ::ethers::contract::EthEvent, ::ethers::contract::EthDisplay)] - #[ethevent( - name = "HostParamsUpdated", - abi = "HostParamsUpdated((uint256,uint256,uint256,address,address,address,address,address,uint256,uint256,address,uint256[],(bytes32,uint256)[],bytes),(uint256,uint256,uint256,address,address,address,address,address,uint256,uint256,address,uint256[],(bytes32,uint256)[],bytes))" - )] - pub struct HostParamsUpdatedFilter { - pub old_params: HostParams, - pub new_params: HostParams, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "HostWithdrawal", abi = "HostWithdrawal(uint256,address,bool)")] - pub struct HostWithdrawalFilter { - pub amount: ::ethers::core::types::U256, - pub beneficiary: ::ethers::core::types::Address, - pub native: bool, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent( - name = "PostRequestEvent", - abi = "PostRequestEvent(string,string,address,bytes,uint256,uint256,bytes,uint256)" - )] - pub struct PostRequestEventFilter { - pub source: ::std::string::String, - pub dest: ::std::string::String, - #[ethevent(indexed)] - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Bytes, - pub nonce: ::ethers::core::types::U256, - pub timeout_timestamp: ::ethers::core::types::U256, - pub body: ::ethers::core::types::Bytes, - pub fee: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "PostRequestHandled", abi = "PostRequestHandled(bytes32,address)")] - pub struct PostRequestHandledFilter { - #[ethevent(indexed)] - pub commitment: [u8; 32], - pub relayer: ::ethers::core::types::Address, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent( - name = "PostRequestTimeoutHandled", - abi = "PostRequestTimeoutHandled(bytes32,string)" - )] - pub struct PostRequestTimeoutHandledFilter { - #[ethevent(indexed)] - pub commitment: [u8; 32], - pub dest: ::std::string::String, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent( - name = "PostResponseEvent", - abi = "PostResponseEvent(string,string,address,bytes,uint256,uint256,bytes,bytes,uint256,uint256)" - )] - pub struct PostResponseEventFilter { - pub source: ::std::string::String, - pub dest: ::std::string::String, - #[ethevent(indexed)] - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Bytes, - pub nonce: ::ethers::core::types::U256, - pub timeout_timestamp: ::ethers::core::types::U256, - pub body: ::ethers::core::types::Bytes, - pub response: ::ethers::core::types::Bytes, - pub response_timeout_timestamp: ::ethers::core::types::U256, - pub fee: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "PostResponseFunded", abi = "PostResponseFunded(bytes32,uint256)")] - pub struct PostResponseFundedFilter { - #[ethevent(indexed)] - pub commitment: [u8; 32], - pub new_fee: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent( - name = "PostResponseHandled", - abi = "PostResponseHandled(bytes32,address)" - )] - pub struct PostResponseHandledFilter { - #[ethevent(indexed)] - pub commitment: [u8; 32], - pub relayer: ::ethers::core::types::Address, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent( - name = "PostResponseTimeoutHandled", - abi = "PostResponseTimeoutHandled(bytes32,string)" - )] - pub struct PostResponseTimeoutHandledFilter { - #[ethevent(indexed)] - pub commitment: [u8; 32], - pub dest: ::std::string::String, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "RequestFunded", abi = "RequestFunded(bytes32,uint256)")] - pub struct RequestFundedFilter { - #[ethevent(indexed)] - pub commitment: [u8; 32], - pub new_fee: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent( - name = "StateCommitmentRead", - abi = "StateCommitmentRead(address,uint256)" - )] - pub struct StateCommitmentReadFilter { - #[ethevent(indexed)] - pub caller: ::ethers::core::types::Address, - pub fee: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent( - name = "StateCommitmentVetoed", - abi = "StateCommitmentVetoed(string,uint256,(uint256,bytes32,bytes32),address)" - )] - pub struct StateCommitmentVetoedFilter { - pub state_machine_id: ::std::string::String, - pub height: ::ethers::core::types::U256, - pub state_commitment: StateCommitment, - #[ethevent(indexed)] - pub fisherman: ::ethers::core::types::Address, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent( - name = "StateMachineUpdated", - abi = "StateMachineUpdated(string,uint256)" - )] - pub struct StateMachineUpdatedFilter { - pub state_machine_id: ::std::string::String, - pub height: ::ethers::core::types::U256, - } - ///Container type for all of the contract's events - #[derive(Clone, ::ethers::contract::EthAbiType)] - pub enum EvmHostEvents { - GetRequestEventFilter(GetRequestEventFilter), - GetRequestHandledFilter(GetRequestHandledFilter), - GetRequestTimeoutHandledFilter(GetRequestTimeoutHandledFilter), - HostFrozenFilter(HostFrozenFilter), - HostParamsUpdatedFilter(HostParamsUpdatedFilter), - HostWithdrawalFilter(HostWithdrawalFilter), - PostRequestEventFilter(PostRequestEventFilter), - PostRequestHandledFilter(PostRequestHandledFilter), - PostRequestTimeoutHandledFilter(PostRequestTimeoutHandledFilter), - PostResponseEventFilter(PostResponseEventFilter), - PostResponseFundedFilter(PostResponseFundedFilter), - PostResponseHandledFilter(PostResponseHandledFilter), - PostResponseTimeoutHandledFilter(PostResponseTimeoutHandledFilter), - RequestFundedFilter(RequestFundedFilter), - StateCommitmentReadFilter(StateCommitmentReadFilter), - StateCommitmentVetoedFilter(StateCommitmentVetoedFilter), - StateMachineUpdatedFilter(StateMachineUpdatedFilter), - } - impl ::ethers::contract::EthLogDecode for EvmHostEvents { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = GetRequestEventFilter::decode_log(log) { - return Ok(EvmHostEvents::GetRequestEventFilter(decoded)); - } - if let Ok(decoded) = GetRequestHandledFilter::decode_log(log) { - return Ok(EvmHostEvents::GetRequestHandledFilter(decoded)); - } - if let Ok(decoded) = GetRequestTimeoutHandledFilter::decode_log(log) { - return Ok(EvmHostEvents::GetRequestTimeoutHandledFilter(decoded)); - } - if let Ok(decoded) = HostFrozenFilter::decode_log(log) { - return Ok(EvmHostEvents::HostFrozenFilter(decoded)); - } - if let Ok(decoded) = HostParamsUpdatedFilter::decode_log(log) { - return Ok(EvmHostEvents::HostParamsUpdatedFilter(decoded)); - } - if let Ok(decoded) = HostWithdrawalFilter::decode_log(log) { - return Ok(EvmHostEvents::HostWithdrawalFilter(decoded)); - } - if let Ok(decoded) = PostRequestEventFilter::decode_log(log) { - return Ok(EvmHostEvents::PostRequestEventFilter(decoded)); - } - if let Ok(decoded) = PostRequestHandledFilter::decode_log(log) { - return Ok(EvmHostEvents::PostRequestHandledFilter(decoded)); - } - if let Ok(decoded) = PostRequestTimeoutHandledFilter::decode_log(log) { - return Ok(EvmHostEvents::PostRequestTimeoutHandledFilter(decoded)); - } - if let Ok(decoded) = PostResponseEventFilter::decode_log(log) { - return Ok(EvmHostEvents::PostResponseEventFilter(decoded)); - } - if let Ok(decoded) = PostResponseFundedFilter::decode_log(log) { - return Ok(EvmHostEvents::PostResponseFundedFilter(decoded)); - } - if let Ok(decoded) = PostResponseHandledFilter::decode_log(log) { - return Ok(EvmHostEvents::PostResponseHandledFilter(decoded)); - } - if let Ok(decoded) = PostResponseTimeoutHandledFilter::decode_log(log) { - return Ok(EvmHostEvents::PostResponseTimeoutHandledFilter(decoded)); - } - if let Ok(decoded) = RequestFundedFilter::decode_log(log) { - return Ok(EvmHostEvents::RequestFundedFilter(decoded)); - } - if let Ok(decoded) = StateCommitmentReadFilter::decode_log(log) { - return Ok(EvmHostEvents::StateCommitmentReadFilter(decoded)); - } - if let Ok(decoded) = StateCommitmentVetoedFilter::decode_log(log) { - return Ok(EvmHostEvents::StateCommitmentVetoedFilter(decoded)); - } - if let Ok(decoded) = StateMachineUpdatedFilter::decode_log(log) { - return Ok(EvmHostEvents::StateMachineUpdatedFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for EvmHostEvents { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::GetRequestEventFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::GetRequestHandledFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::GetRequestTimeoutHandledFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::HostFrozenFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::HostParamsUpdatedFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::HostWithdrawalFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::PostRequestEventFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::PostRequestHandledFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::PostRequestTimeoutHandledFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::PostResponseEventFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::PostResponseFundedFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::PostResponseHandledFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::PostResponseTimeoutHandledFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::RequestFundedFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::StateCommitmentReadFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::StateCommitmentVetoedFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::StateMachineUpdatedFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - } - } - } - impl ::core::convert::From for EvmHostEvents { - fn from(value: GetRequestEventFilter) -> Self { - Self::GetRequestEventFilter(value) - } - } - impl ::core::convert::From for EvmHostEvents { - fn from(value: GetRequestHandledFilter) -> Self { - Self::GetRequestHandledFilter(value) - } - } - impl ::core::convert::From for EvmHostEvents { - fn from(value: GetRequestTimeoutHandledFilter) -> Self { - Self::GetRequestTimeoutHandledFilter(value) - } - } - impl ::core::convert::From for EvmHostEvents { - fn from(value: HostFrozenFilter) -> Self { - Self::HostFrozenFilter(value) - } - } - impl ::core::convert::From for EvmHostEvents { - fn from(value: HostParamsUpdatedFilter) -> Self { - Self::HostParamsUpdatedFilter(value) - } - } - impl ::core::convert::From for EvmHostEvents { - fn from(value: HostWithdrawalFilter) -> Self { - Self::HostWithdrawalFilter(value) - } - } - impl ::core::convert::From for EvmHostEvents { - fn from(value: PostRequestEventFilter) -> Self { - Self::PostRequestEventFilter(value) - } - } - impl ::core::convert::From for EvmHostEvents { - fn from(value: PostRequestHandledFilter) -> Self { - Self::PostRequestHandledFilter(value) - } - } - impl ::core::convert::From for EvmHostEvents { - fn from(value: PostRequestTimeoutHandledFilter) -> Self { - Self::PostRequestTimeoutHandledFilter(value) - } - } - impl ::core::convert::From for EvmHostEvents { - fn from(value: PostResponseEventFilter) -> Self { - Self::PostResponseEventFilter(value) - } - } - impl ::core::convert::From for EvmHostEvents { - fn from(value: PostResponseFundedFilter) -> Self { - Self::PostResponseFundedFilter(value) - } - } - impl ::core::convert::From for EvmHostEvents { - fn from(value: PostResponseHandledFilter) -> Self { - Self::PostResponseHandledFilter(value) - } - } - impl ::core::convert::From for EvmHostEvents { - fn from(value: PostResponseTimeoutHandledFilter) -> Self { - Self::PostResponseTimeoutHandledFilter(value) - } - } - impl ::core::convert::From for EvmHostEvents { - fn from(value: RequestFundedFilter) -> Self { - Self::RequestFundedFilter(value) - } - } - impl ::core::convert::From for EvmHostEvents { - fn from(value: StateCommitmentReadFilter) -> Self { - Self::StateCommitmentReadFilter(value) - } - } - impl ::core::convert::From for EvmHostEvents { - fn from(value: StateCommitmentVetoedFilter) -> Self { - Self::StateCommitmentVetoedFilter(value) - } - } - impl ::core::convert::From for EvmHostEvents { - fn from(value: StateMachineUpdatedFilter) -> Self { - Self::StateMachineUpdatedFilter(value) - } - } - ///Container type for all input parameters for the `admin` function with signature `admin()` and selector `0xf851a440` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "admin", abi = "admin()")] - pub struct AdminCall; - ///Container type for all input parameters for the `chainId` function with signature `chainId()` and selector `0x9a8a0592` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "chainId", abi = "chainId()")] - pub struct ChainIdCall; - ///Container type for all input parameters for the `challengePeriod` function with signature `challengePeriod()` and selector `0xf3f480d9` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "challengePeriod", abi = "challengePeriod()")] - pub struct ChallengePeriodCall; - ///Container type for all input parameters for the `consensusClient` function with signature `consensusClient()` and selector `0x2476132b` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "consensusClient", abi = "consensusClient()")] - pub struct ConsensusClientCall; - ///Container type for all input parameters for the `consensusState` function with signature `consensusState()` and selector `0xbbad99d4` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "consensusState", abi = "consensusState()")] - pub struct ConsensusStateCall; - ///Container type for all input parameters for the `consensusUpdateTime` function with signature `consensusUpdateTime()` and selector `0x9a8425bc` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "consensusUpdateTime", abi = "consensusUpdateTime()")] - pub struct ConsensusUpdateTimeCall; - ///Container type for all input parameters for the `deleteStateMachineCommitment` function with signature `deleteStateMachineCommitment((uint256,uint256),address)` and selector `0xf8ddf259` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "deleteStateMachineCommitment", - abi = "deleteStateMachineCommitment((uint256,uint256),address)" - )] - pub struct DeleteStateMachineCommitmentCall { - pub height: StateMachineHeight, - pub fisherman: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `dispatch` function with signature `dispatch(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64,uint256,address))` and selector `0x94480805` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "dispatch", - abi = "dispatch(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64,uint256,address))" - )] - pub struct DispatchCall { - pub post: DispatchPost, - } - ///Container type for all input parameters for the `dispatch` function with signature `dispatch((bytes,bytes,bytes,uint64,uint256,address))` and selector `0xb8f3e8f5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "dispatch", - abi = "dispatch((bytes,bytes,bytes,uint64,uint256,address))" - )] - pub struct DispatchWithPostCall { - pub post: DispatchPost, - } - ///Container type for all input parameters for the `dispatch` function with signature `dispatch((bytes,uint64,bytes[],uint64,uint256,bytes))` and selector `0xd22e3343` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "dispatch", - abi = "dispatch((bytes,uint64,bytes[],uint64,uint256,bytes))" - )] - pub struct DispatchWithGetCall { - pub get: DispatchGet, - } - ///Container type for all input parameters for the `dispatchIncoming` function with signature `dispatchIncoming(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),address)` and selector `0xab013de1` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "dispatchIncoming", - abi = "dispatchIncoming(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),address)" - )] - pub struct DispatchIncomingCall { - pub response: GetResponse, - pub relayer: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `dispatchIncoming` function with signature `dispatchIncoming((bytes,bytes,uint64,bytes,bytes,uint64,bytes),address)` and selector `0xb85e6fbb` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "dispatchIncoming", - abi = "dispatchIncoming((bytes,bytes,uint64,bytes,bytes,uint64,bytes),address)" - )] - pub struct DispatchIncomingWithRequestCall { - pub request: PostRequest, - pub relayer: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `dispatchIncoming` function with signature `dispatchIncoming(((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]),address)` and selector `0xfc8a341c` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "dispatchIncoming", - abi = "dispatchIncoming(((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]),address)" - )] - pub struct DispatchIncomingWithResponseCall { - pub response: GetResponse, - pub relayer: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `dispatchTimeOut` function with signature `dispatchTimeOut(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),(uint256,address),bytes32)` and selector `0x0446fc47` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "dispatchTimeOut", - abi = "dispatchTimeOut(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),(uint256,address),bytes32)" - )] - pub struct DispatchTimeOut0Call { - pub response: PostResponse, - pub meta: FeeMetadata, - pub commitment: [u8; 32], - } - ///Container type for all input parameters for the `dispatchTimeOut` function with signature `dispatchTimeOut((bytes,bytes,uint64,bytes,bytes,uint64,bytes),(uint256,address),bytes32)` and selector `0x4b46efaa` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "dispatchTimeOut", - abi = "dispatchTimeOut((bytes,bytes,uint64,bytes,bytes,uint64,bytes),(uint256,address),bytes32)" - )] - pub struct DispatchTimeOut1Call { - pub request: GetRequest, - pub meta: FeeMetadata, - pub commitment: [u8; 32], - } - ///Container type for all input parameters for the `dispatchTimeOut` function with signature `dispatchTimeOut((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(uint256,address),bytes32)` and selector `0x6d6c2313` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "dispatchTimeOut", - abi = "dispatchTimeOut((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(uint256,address),bytes32)" - )] - pub struct DispatchTimeOut2Call { - pub request: GetRequest, - pub meta: FeeMetadata, - pub commitment: [u8; 32], - } - ///Container type for all input parameters for the `feeToken` function with signature `feeToken()` and selector `0x647846a5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "feeToken", abi = "feeToken()")] - pub struct FeeTokenCall; - ///Container type for all input parameters for the `frozen` function with signature `frozen()` and selector `0x054f7d9c` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "frozen", abi = "frozen()")] - pub struct FrozenCall; - ///Container type for all input parameters for the `fundRequest` function with signature `fundRequest(bytes32,uint256)` and selector `0xb9ea3289` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "fundRequest", abi = "fundRequest(bytes32,uint256)")] - pub struct FundRequestCall { - pub commitment: [u8; 32], - pub amount: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `fundResponse` function with signature `fundResponse(bytes32,uint256)` and selector `0xfadce3c7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "fundResponse", abi = "fundResponse(bytes32,uint256)")] - pub struct FundResponseCall { - pub commitment: [u8; 32], - pub amount: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `host` function with signature `host()` and selector `0xf437bc59` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "host", abi = "host()")] - pub struct HostCall; - ///Container type for all input parameters for the `hostParams` function with signature `hostParams()` and selector `0x2215364d` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "hostParams", abi = "hostParams()")] - pub struct HostParamsCall; - ///Container type for all input parameters for the `hyperbridge` function with signature `hyperbridge()` and selector `0x005e763e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "hyperbridge", abi = "hyperbridge()")] - pub struct HyperbridgeCall; - ///Container type for all input parameters for the `latestStateMachineHeight` function with signature `latestStateMachineHeight(uint256)` and selector `0x9c095f86` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "latestStateMachineHeight", - abi = "latestStateMachineHeight(uint256)" - )] - pub struct LatestStateMachineHeightCall { - pub id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `nonce` function with signature `nonce()` and selector `0xaffed0e0` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "nonce", abi = "nonce()")] - pub struct NonceCall; - ///Container type for all input parameters for the `perByteFee` function with signature `perByteFee(bytes)` and selector `0x4011ec0a` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "perByteFee", abi = "perByteFee(bytes)")] - pub struct PerByteFeeCall { - pub state_id: ::ethers::core::types::Bytes, - } - ///Container type for all input parameters for the `requestCommitments` function with signature `requestCommitments(bytes32)` and selector `0x368bf464` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "requestCommitments", abi = "requestCommitments(bytes32)")] - pub struct RequestCommitmentsCall { - pub commitment: [u8; 32], - } - ///Container type for all input parameters for the `requestReceipts` function with signature `requestReceipts(bytes32)` and selector `0x19667a3e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "requestReceipts", abi = "requestReceipts(bytes32)")] - pub struct RequestReceiptsCall { - pub commitment: [u8; 32], - } - ///Container type for all input parameters for the `responded` function with signature `responded(bytes32)` and selector `0x73bfa8ae` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "responded", abi = "responded(bytes32)")] - pub struct RespondedCall { - pub commitment: [u8; 32], - } - ///Container type for all input parameters for the `responseCommitments` function with signature `responseCommitments(bytes32)` and selector `0x2211f1dd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "responseCommitments", abi = "responseCommitments(bytes32)")] - pub struct ResponseCommitmentsCall { - pub commitment: [u8; 32], - } - ///Container type for all input parameters for the `responseReceipts` function with signature `responseReceipts(bytes32)` and selector `0x8856337e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "responseReceipts", abi = "responseReceipts(bytes32)")] - pub struct ResponseReceiptsCall { - pub commitment: [u8; 32], - } - ///Container type for all input parameters for the `setConsensusState` function with signature `setConsensusState(bytes,(uint256,uint256),(uint256,bytes32,bytes32))` and selector `0x8d48f3c7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "setConsensusState", - abi = "setConsensusState(bytes,(uint256,uint256),(uint256,bytes32,bytes32))" - )] - pub struct SetConsensusStateCall { - pub state: ::ethers::core::types::Bytes, - pub height: StateMachineHeight, - pub commitment: StateCommitment, - } - ///Container type for all input parameters for the `setFrozenState` function with signature `setFrozenState(uint8)` and selector `0x6ac88bad` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "setFrozenState", abi = "setFrozenState(uint8)")] - pub struct SetFrozenStateCall { - pub new_state: u8, - } - ///Container type for all input parameters for the `stateCommitmentFee` function with signature `stateCommitmentFee()` and selector `0xb5c8a08e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "stateCommitmentFee", abi = "stateCommitmentFee()")] - pub struct StateCommitmentFeeCall; - ///Container type for all input parameters for the `stateMachineCommitment` function with signature `stateMachineCommitment((uint256,uint256))` and selector `0xa70a8c47` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "stateMachineCommitment", - abi = "stateMachineCommitment((uint256,uint256))" - )] - pub struct StateMachineCommitmentCall { - pub height: StateMachineHeight, - } - ///Container type for all input parameters for the `stateMachineCommitmentUpdateTime` function with signature `stateMachineCommitmentUpdateTime((uint256,uint256))` and selector `0x1a880a93` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "stateMachineCommitmentUpdateTime", - abi = "stateMachineCommitmentUpdateTime((uint256,uint256))" - )] - pub struct StateMachineCommitmentUpdateTimeCall { - pub height: StateMachineHeight, - } - ///Container type for all input parameters for the `stateMachineId` function with signature `stateMachineId(bytes,uint256)` and selector `0x7a1bd7c1` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "stateMachineId", abi = "stateMachineId(bytes,uint256)")] - pub struct StateMachineIdCall { - pub parachain_id: ::ethers::core::types::Bytes, - pub id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `storeConsensusState` function with signature `storeConsensusState(bytes)` and selector `0xb4974cf0` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "storeConsensusState", abi = "storeConsensusState(bytes)")] - pub struct StoreConsensusStateCall { - pub state: ::ethers::core::types::Bytes, - } - ///Container type for all input parameters for the `storeStateMachineCommitment` function with signature `storeStateMachineCommitment((uint256,uint256),(uint256,bytes32,bytes32))` and selector `0x559efe9e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "storeStateMachineCommitment", - abi = "storeStateMachineCommitment((uint256,uint256),(uint256,bytes32,bytes32))" - )] - pub struct StoreStateMachineCommitmentCall { - pub height: StateMachineHeight, - pub commitment: StateCommitment, - } - ///Container type for all input parameters for the `timestamp` function with signature `timestamp()` and selector `0xb80777ea` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "timestamp", abi = "timestamp()")] - pub struct TimestampCall; - ///Container type for all input parameters for the `unStakingPeriod` function with signature `unStakingPeriod()` and selector `0xd40784c7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "unStakingPeriod", abi = "unStakingPeriod()")] - pub struct UnStakingPeriodCall; - ///Container type for all input parameters for the `uniswapV2Router` function with signature `uniswapV2Router()` and selector `0x1694505e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "uniswapV2Router", abi = "uniswapV2Router()")] - pub struct UniswapV2RouterCall; - ///Container type for all input parameters for the `updateHostParams` function with signature `updateHostParams((uint256,uint256,uint256,address,address,address,address,address,uint256,uint256,address,uint256[],(bytes32,uint256)[],bytes))` and selector `0x6ad7df47` - #[derive(Clone, ::ethers::contract::EthCall, ::ethers::contract::EthDisplay)] - #[ethcall( - name = "updateHostParams", - abi = "updateHostParams((uint256,uint256,uint256,address,address,address,address,address,uint256,uint256,address,uint256[],(bytes32,uint256)[],bytes))" - )] - pub struct UpdateHostParamsCall { - pub params: HostParams, - } - ///Container type for all input parameters for the `vetoes` function with signature `vetoes(uint256,uint256)` and selector `0x5218d908` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "vetoes", abi = "vetoes(uint256,uint256)")] - pub struct VetoesCall { - pub para_id: ::ethers::core::types::U256, - pub height: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `withdraw` function with signature `withdraw((address,uint256,bool))` and selector `0xcb1a6e2f` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "withdraw", abi = "withdraw((address,uint256,bool))")] - pub struct WithdrawCall { - pub params: WithdrawParams, - } - ///Container type for all of the contract's call - #[derive(Clone, ::ethers::contract::EthAbiType)] - pub enum EvmHostCalls { - Admin(AdminCall), - ChainId(ChainIdCall), - ChallengePeriod(ChallengePeriodCall), - ConsensusClient(ConsensusClientCall), - ConsensusState(ConsensusStateCall), - ConsensusUpdateTime(ConsensusUpdateTimeCall), - DeleteStateMachineCommitment(DeleteStateMachineCommitmentCall), - Dispatch(DispatchCall), - DispatchWithPost(DispatchWithPostCall), - DispatchWithGet(DispatchWithGetCall), - DispatchIncoming(DispatchIncomingCall), - DispatchIncomingWithRequest(DispatchIncomingWithRequestCall), - DispatchIncomingWithResponse(DispatchIncomingWithResponseCall), - DispatchTimeOut0(DispatchTimeOut0Call), - DispatchTimeOut1(DispatchTimeOut1Call), - DispatchTimeOut2(DispatchTimeOut2Call), - FeeToken(FeeTokenCall), - Frozen(FrozenCall), - FundRequest(FundRequestCall), - FundResponse(FundResponseCall), - Host(HostCall), - HostParams(HostParamsCall), - Hyperbridge(HyperbridgeCall), - LatestStateMachineHeight(LatestStateMachineHeightCall), - Nonce(NonceCall), - PerByteFee(PerByteFeeCall), - RequestCommitments(RequestCommitmentsCall), - RequestReceipts(RequestReceiptsCall), - Responded(RespondedCall), - ResponseCommitments(ResponseCommitmentsCall), - ResponseReceipts(ResponseReceiptsCall), - SetConsensusState(SetConsensusStateCall), - SetFrozenState(SetFrozenStateCall), - StateCommitmentFee(StateCommitmentFeeCall), - StateMachineCommitment(StateMachineCommitmentCall), - StateMachineCommitmentUpdateTime(StateMachineCommitmentUpdateTimeCall), - StateMachineId(StateMachineIdCall), - StoreConsensusState(StoreConsensusStateCall), - StoreStateMachineCommitment(StoreStateMachineCommitmentCall), - Timestamp(TimestampCall), - UnStakingPeriod(UnStakingPeriodCall), - UniswapV2Router(UniswapV2RouterCall), - UpdateHostParams(UpdateHostParamsCall), - Vetoes(VetoesCall), - Withdraw(WithdrawCall), - } - impl ::ethers::core::abi::AbiDecode for EvmHostCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Admin(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::ChainId(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::ChallengePeriod(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::ConsensusClient(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::ConsensusState(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::ConsensusUpdateTime(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::DeleteStateMachineCommitment(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Dispatch(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::DispatchWithPost(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::DispatchWithGet(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::DispatchIncoming(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::DispatchIncomingWithRequest(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::DispatchIncomingWithResponse(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::DispatchTimeOut0(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::DispatchTimeOut1(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::DispatchTimeOut2(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::FeeToken(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Frozen(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::FundRequest(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::FundResponse(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Host(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::HostParams(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Hyperbridge(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::LatestStateMachineHeight(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Nonce(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::PerByteFee(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::RequestCommitments(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::RequestReceipts(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Responded(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::ResponseCommitments(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::ResponseReceipts(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SetConsensusState(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SetFrozenState(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::StateCommitmentFee(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::StateMachineCommitment(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::StateMachineCommitmentUpdateTime(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::StateMachineId(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::StoreConsensusState(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::StoreStateMachineCommitment(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Timestamp(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::UnStakingPeriod(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::UniswapV2Router(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::UpdateHostParams(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Vetoes(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Withdraw(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for EvmHostCalls { - fn encode(self) -> Vec { - match self { - Self::Admin(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ChainId(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::ChallengePeriod(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ConsensusClient(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ConsensusState(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ConsensusUpdateTime(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::DeleteStateMachineCommitment(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Dispatch(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::DispatchWithPost(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::DispatchWithGet(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::DispatchIncoming(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::DispatchIncomingWithRequest(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::DispatchIncomingWithResponse(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::DispatchTimeOut0(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::DispatchTimeOut1(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::DispatchTimeOut2(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::FeeToken(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Frozen(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::FundRequest(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::FundResponse(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Host(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::HostParams(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Hyperbridge(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::LatestStateMachineHeight(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Nonce(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::PerByteFee(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::RequestCommitments(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::RequestReceipts(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Responded(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ResponseCommitments(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ResponseReceipts(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SetConsensusState(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SetFrozenState(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::StateCommitmentFee(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::StateMachineCommitment(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::StateMachineCommitmentUpdateTime(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::StateMachineId(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::StoreConsensusState(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::StoreStateMachineCommitment(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Timestamp(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::UnStakingPeriod(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::UniswapV2Router(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::UpdateHostParams(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Vetoes(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Withdraw(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for EvmHostCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::Admin(element) => ::core::fmt::Display::fmt(element, f), - Self::ChainId(element) => ::core::fmt::Display::fmt(element, f), - Self::ChallengePeriod(element) => ::core::fmt::Display::fmt(element, f), - Self::ConsensusClient(element) => ::core::fmt::Display::fmt(element, f), - Self::ConsensusState(element) => ::core::fmt::Display::fmt(element, f), - Self::ConsensusUpdateTime(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::DeleteStateMachineCommitment(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::Dispatch(element) => ::core::fmt::Display::fmt(element, f), - Self::DispatchWithPost(element) => ::core::fmt::Display::fmt(element, f), - Self::DispatchWithGet(element) => ::core::fmt::Display::fmt(element, f), - Self::DispatchIncoming(element) => ::core::fmt::Display::fmt(element, f), - Self::DispatchIncomingWithRequest(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::DispatchIncomingWithResponse(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::DispatchTimeOut0(element) => ::core::fmt::Display::fmt(element, f), - Self::DispatchTimeOut1(element) => ::core::fmt::Display::fmt(element, f), - Self::DispatchTimeOut2(element) => ::core::fmt::Display::fmt(element, f), - Self::FeeToken(element) => ::core::fmt::Display::fmt(element, f), - Self::Frozen(element) => ::core::fmt::Display::fmt(element, f), - Self::FundRequest(element) => ::core::fmt::Display::fmt(element, f), - Self::FundResponse(element) => ::core::fmt::Display::fmt(element, f), - Self::Host(element) => ::core::fmt::Display::fmt(element, f), - Self::HostParams(element) => ::core::fmt::Display::fmt(element, f), - Self::Hyperbridge(element) => ::core::fmt::Display::fmt(element, f), - Self::LatestStateMachineHeight(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::Nonce(element) => ::core::fmt::Display::fmt(element, f), - Self::PerByteFee(element) => ::core::fmt::Display::fmt(element, f), - Self::RequestCommitments(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::RequestReceipts(element) => ::core::fmt::Display::fmt(element, f), - Self::Responded(element) => ::core::fmt::Display::fmt(element, f), - Self::ResponseCommitments(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::ResponseReceipts(element) => ::core::fmt::Display::fmt(element, f), - Self::SetConsensusState(element) => ::core::fmt::Display::fmt(element, f), - Self::SetFrozenState(element) => ::core::fmt::Display::fmt(element, f), - Self::StateCommitmentFee(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::StateMachineCommitment(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::StateMachineCommitmentUpdateTime(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::StateMachineId(element) => ::core::fmt::Display::fmt(element, f), - Self::StoreConsensusState(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::StoreStateMachineCommitment(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::Timestamp(element) => ::core::fmt::Display::fmt(element, f), - Self::UnStakingPeriod(element) => ::core::fmt::Display::fmt(element, f), - Self::UniswapV2Router(element) => ::core::fmt::Display::fmt(element, f), - Self::UpdateHostParams(element) => ::core::fmt::Display::fmt(element, f), - Self::Vetoes(element) => ::core::fmt::Display::fmt(element, f), - Self::Withdraw(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: AdminCall) -> Self { - Self::Admin(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: ChainIdCall) -> Self { - Self::ChainId(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: ChallengePeriodCall) -> Self { - Self::ChallengePeriod(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: ConsensusClientCall) -> Self { - Self::ConsensusClient(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: ConsensusStateCall) -> Self { - Self::ConsensusState(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: ConsensusUpdateTimeCall) -> Self { - Self::ConsensusUpdateTime(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: DeleteStateMachineCommitmentCall) -> Self { - Self::DeleteStateMachineCommitment(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: DispatchCall) -> Self { - Self::Dispatch(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: DispatchWithPostCall) -> Self { - Self::DispatchWithPost(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: DispatchWithGetCall) -> Self { - Self::DispatchWithGet(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: DispatchIncomingCall) -> Self { - Self::DispatchIncoming(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: DispatchIncomingWithRequestCall) -> Self { - Self::DispatchIncomingWithRequest(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: DispatchIncomingWithResponseCall) -> Self { - Self::DispatchIncomingWithResponse(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: DispatchTimeOut0Call) -> Self { - Self::DispatchTimeOut0(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: DispatchTimeOut1Call) -> Self { - Self::DispatchTimeOut1(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: DispatchTimeOut2Call) -> Self { - Self::DispatchTimeOut2(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: FeeTokenCall) -> Self { - Self::FeeToken(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: FrozenCall) -> Self { - Self::Frozen(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: FundRequestCall) -> Self { - Self::FundRequest(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: FundResponseCall) -> Self { - Self::FundResponse(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: HostCall) -> Self { - Self::Host(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: HostParamsCall) -> Self { - Self::HostParams(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: HyperbridgeCall) -> Self { - Self::Hyperbridge(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: LatestStateMachineHeightCall) -> Self { - Self::LatestStateMachineHeight(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: NonceCall) -> Self { - Self::Nonce(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: PerByteFeeCall) -> Self { - Self::PerByteFee(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: RequestCommitmentsCall) -> Self { - Self::RequestCommitments(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: RequestReceiptsCall) -> Self { - Self::RequestReceipts(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: RespondedCall) -> Self { - Self::Responded(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: ResponseCommitmentsCall) -> Self { - Self::ResponseCommitments(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: ResponseReceiptsCall) -> Self { - Self::ResponseReceipts(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: SetConsensusStateCall) -> Self { - Self::SetConsensusState(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: SetFrozenStateCall) -> Self { - Self::SetFrozenState(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: StateCommitmentFeeCall) -> Self { - Self::StateCommitmentFee(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: StateMachineCommitmentCall) -> Self { - Self::StateMachineCommitment(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: StateMachineCommitmentUpdateTimeCall) -> Self { - Self::StateMachineCommitmentUpdateTime(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: StateMachineIdCall) -> Self { - Self::StateMachineId(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: StoreConsensusStateCall) -> Self { - Self::StoreConsensusState(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: StoreStateMachineCommitmentCall) -> Self { - Self::StoreStateMachineCommitment(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: TimestampCall) -> Self { - Self::Timestamp(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: UnStakingPeriodCall) -> Self { - Self::UnStakingPeriod(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: UniswapV2RouterCall) -> Self { - Self::UniswapV2Router(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: UpdateHostParamsCall) -> Self { - Self::UpdateHostParams(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: VetoesCall) -> Self { - Self::Vetoes(value) - } - } - impl ::core::convert::From for EvmHostCalls { - fn from(value: WithdrawCall) -> Self { - Self::Withdraw(value) - } - } - ///Container type for all return fields from the `admin` function with signature `admin()` and selector `0xf851a440` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct AdminReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `chainId` function with signature `chainId()` and selector `0x9a8a0592` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ChainIdReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `challengePeriod` function with signature `challengePeriod()` and selector `0xf3f480d9` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ChallengePeriodReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `consensusClient` function with signature `consensusClient()` and selector `0x2476132b` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ConsensusClientReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `consensusState` function with signature `consensusState()` and selector `0xbbad99d4` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ConsensusStateReturn(pub ::ethers::core::types::Bytes); - ///Container type for all return fields from the `consensusUpdateTime` function with signature `consensusUpdateTime()` and selector `0x9a8425bc` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ConsensusUpdateTimeReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `dispatch` function with signature `dispatch(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64,uint256,address))` and selector `0x94480805` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct DispatchReturn { - pub commitment: [u8; 32], - } - ///Container type for all return fields from the `dispatch` function with signature `dispatch((bytes,bytes,bytes,uint64,uint256,address))` and selector `0xb8f3e8f5` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct DispatchWithPostReturn { - pub commitment: [u8; 32], - } - ///Container type for all return fields from the `dispatch` function with signature `dispatch((bytes,uint64,bytes[],uint64,uint256,bytes))` and selector `0xd22e3343` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct DispatchWithGetReturn { - pub commitment: [u8; 32], - } - ///Container type for all return fields from the `feeToken` function with signature `feeToken()` and selector `0x647846a5` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct FeeTokenReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `frozen` function with signature `frozen()` and selector `0x054f7d9c` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct FrozenReturn(pub u8); - ///Container type for all return fields from the `host` function with signature `host()` and selector `0xf437bc59` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct HostReturn(pub ::ethers::core::types::Bytes); - ///Container type for all return fields from the `hostParams` function with signature `hostParams()` and selector `0x2215364d` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct HostParamsReturn(pub HostParams); - ///Container type for all return fields from the `hyperbridge` function with signature `hyperbridge()` and selector `0x005e763e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct HyperbridgeReturn(pub ::ethers::core::types::Bytes); - ///Container type for all return fields from the `latestStateMachineHeight` function with signature `latestStateMachineHeight(uint256)` and selector `0x9c095f86` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct LatestStateMachineHeightReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `nonce` function with signature `nonce()` and selector `0xaffed0e0` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct NonceReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `perByteFee` function with signature `perByteFee(bytes)` and selector `0x4011ec0a` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct PerByteFeeReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `requestCommitments` function with signature `requestCommitments(bytes32)` and selector `0x368bf464` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct RequestCommitmentsReturn(pub FeeMetadata); - ///Container type for all return fields from the `requestReceipts` function with signature `requestReceipts(bytes32)` and selector `0x19667a3e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct RequestReceiptsReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `responded` function with signature `responded(bytes32)` and selector `0x73bfa8ae` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct RespondedReturn(pub bool); - ///Container type for all return fields from the `responseCommitments` function with signature `responseCommitments(bytes32)` and selector `0x2211f1dd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ResponseCommitmentsReturn(pub FeeMetadata); - ///Container type for all return fields from the `responseReceipts` function with signature `responseReceipts(bytes32)` and selector `0x8856337e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ResponseReceiptsReturn(pub ResponseReceipt); - ///Container type for all return fields from the `stateCommitmentFee` function with signature `stateCommitmentFee()` and selector `0xb5c8a08e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct StateCommitmentFeeReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `stateMachineCommitment` function with signature `stateMachineCommitment((uint256,uint256))` and selector `0xa70a8c47` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct StateMachineCommitmentReturn(pub StateCommitment); - ///Container type for all return fields from the `stateMachineCommitmentUpdateTime` function with signature `stateMachineCommitmentUpdateTime((uint256,uint256))` and selector `0x1a880a93` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct StateMachineCommitmentUpdateTimeReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `stateMachineId` function with signature `stateMachineId(bytes,uint256)` and selector `0x7a1bd7c1` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct StateMachineIdReturn(pub ::std::string::String); - ///Container type for all return fields from the `timestamp` function with signature `timestamp()` and selector `0xb80777ea` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TimestampReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `unStakingPeriod` function with signature `unStakingPeriod()` and selector `0xd40784c7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct UnStakingPeriodReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `uniswapV2Router` function with signature `uniswapV2Router()` and selector `0x1694505e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct UniswapV2RouterReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `vetoes` function with signature `vetoes(uint256,uint256)` and selector `0x5218d908` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct VetoesReturn(pub ::ethers::core::types::Address); - ///`DispatchGet(bytes,uint64,bytes[],uint64,uint256,bytes)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct DispatchGet { - pub dest: ::ethers::core::types::Bytes, - pub height: u64, - pub keys: ::std::vec::Vec<::ethers::core::types::Bytes>, - pub timeout: u64, - pub fee: ::ethers::core::types::U256, - pub context: ::ethers::core::types::Bytes, - } - ///`FeeMetadata(uint256,address)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct FeeMetadata { - pub fee: ::ethers::core::types::U256, - pub sender: ::ethers::core::types::Address, - } - ///`HostParams(uint256,uint256,uint256,address,address,address,address,address,uint256,uint256,address,uint256[],(bytes32,uint256)[],bytes)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct HostParams { - pub default_timeout: ::ethers::core::types::U256, - pub default_per_byte_fee: ::ethers::core::types::U256, - pub state_commitment_fee: ::ethers::core::types::U256, - pub fee_token: ::ethers::core::types::Address, - pub admin: ::ethers::core::types::Address, - pub handler: ::ethers::core::types::Address, - pub host_manager: ::ethers::core::types::Address, - pub uniswap_v2: ::ethers::core::types::Address, - pub un_staking_period: ::ethers::core::types::U256, - pub challenge_period: ::ethers::core::types::U256, - pub consensus_client: ::ethers::core::types::Address, - pub state_machines: ::std::vec::Vec<::ethers::core::types::U256>, - pub per_byte_fees: ::std::vec::Vec, - pub hyperbridge: ::ethers::core::types::Bytes, - } - ///`PerByteFee(bytes32,uint256)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct PerByteFee { - pub state_id_hash: [u8; 32], - pub per_byte_fee: ::ethers::core::types::U256, - } - ///`ResponseReceipt(bytes32,address)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ResponseReceipt { - pub response_commitment: [u8; 32], - pub relayer: ::ethers::core::types::Address, - } - ///`WithdrawParams(address,uint256,bool)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct WithdrawParams { - pub beneficiary: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - pub native: bool, - } + } + ///The parsed JSON ABI of the contract. + pub static EVMHOST_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = + ::ethers::contract::Lazy::new(__abi); + pub struct EvmHost(::ethers::contract::Contract); + impl ::core::clone::Clone for EvmHost { + fn clone(&self) -> Self { + Self(::core::clone::Clone::clone(&self.0)) + } + } + impl ::core::ops::Deref for EvmHost { + type Target = ::ethers::contract::Contract; + fn deref(&self) -> &Self::Target { + &self.0 + } + } + impl ::core::ops::DerefMut for EvmHost { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } + } + impl ::core::fmt::Debug for EvmHost { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple(::core::stringify!(EvmHost)).field(&self.address()).finish() + } + } + impl EvmHost { + /// Creates a new contract instance with the specified `ethers` client at + /// `address`. The contract derefs to a `ethers::Contract` object. + pub fn new>( + address: T, + client: ::std::sync::Arc, + ) -> Self { + Self(::ethers::contract::Contract::new(address.into(), EVMHOST_ABI.clone(), client)) + } + ///Calls the contract's `admin` (0xf851a440) function + pub fn admin( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([248, 81, 164, 64], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `chainId` (0x9a8a0592) function + pub fn chain_id( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([154, 138, 5, 146], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `challengePeriod` (0xf3f480d9) function + pub fn challenge_period( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([243, 244, 128, 217], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `consensusClient` (0x2476132b) function + pub fn consensus_client( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([36, 118, 19, 43], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `consensusState` (0xbbad99d4) function + pub fn consensus_state( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([187, 173, 153, 212], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `consensusUpdateTime` (0x9a8425bc) function + pub fn consensus_update_time( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([154, 132, 37, 188], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `deleteStateMachineCommitment` (0xf8ddf259) function + pub fn delete_state_machine_commitment( + &self, + height: StateMachineHeight, + fisherman: ::ethers::core::types::Address, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([248, 221, 242, 89], (height, fisherman)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `dispatch` (0x94480805) function + pub fn dispatch( + &self, + post: DispatchPost, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([148, 72, 8, 5], (post,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `dispatch` (0xb8f3e8f5) function + pub fn dispatch_with_post( + &self, + post: DispatchPost, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([184, 243, 232, 245], (post,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `dispatch` (0xd22e3343) function + pub fn dispatch_with_get( + &self, + get: DispatchGet, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([210, 46, 51, 67], (get,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `dispatchIncoming` (0xab013de1) function + pub fn dispatch_incoming( + &self, + response: GetResponse, + relayer: ::ethers::core::types::Address, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([171, 1, 61, 225], (response, relayer)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `dispatchIncoming` (0xb85e6fbb) function + pub fn dispatch_incoming_with_request( + &self, + request: PostRequest, + relayer: ::ethers::core::types::Address, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([184, 94, 111, 187], (request, relayer)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `dispatchIncoming` (0xfc8a341c) function + pub fn dispatch_incoming_with_response( + &self, + response: GetResponse, + relayer: ::ethers::core::types::Address, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([252, 138, 52, 28], (response, relayer)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `dispatchTimeOut` (0x0446fc47) function + pub fn dispatch_time_out_0( + &self, + response: PostResponse, + meta: FeeMetadata, + commitment: [u8; 32], + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([4, 70, 252, 71], (response, meta, commitment)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `dispatchTimeOut` (0x4b46efaa) function + pub fn dispatch_time_out_1( + &self, + request: GetRequest, + meta: FeeMetadata, + commitment: [u8; 32], + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([75, 70, 239, 170], (request, meta, commitment)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `dispatchTimeOut` (0x6d6c2313) function + pub fn dispatch_time_out_2( + &self, + request: GetRequest, + meta: FeeMetadata, + commitment: [u8; 32], + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([109, 108, 35, 19], (request, meta, commitment)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `feeToken` (0x647846a5) function + pub fn fee_token( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([100, 120, 70, 165], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `frozen` (0x054f7d9c) function + pub fn frozen(&self) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([5, 79, 125, 156], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `fundRequest` (0xb9ea3289) function + pub fn fund_request( + &self, + commitment: [u8; 32], + amount: ::ethers::core::types::U256, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([185, 234, 50, 137], (commitment, amount)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `fundResponse` (0xfadce3c7) function + pub fn fund_response( + &self, + commitment: [u8; 32], + amount: ::ethers::core::types::U256, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([250, 220, 227, 199], (commitment, amount)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `host` (0xf437bc59) function + pub fn host( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([244, 55, 188, 89], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `hostParams` (0x2215364d) function + pub fn host_params(&self) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([34, 21, 54, 77], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `hyperbridge` (0x005e763e) function + pub fn hyperbridge( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([0, 94, 118, 62], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `latestStateMachineHeight` (0x9c095f86) function + pub fn latest_state_machine_height( + &self, + id: ::ethers::core::types::U256, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([156, 9, 95, 134], id) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `nonce` (0xaffed0e0) function + pub fn nonce( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([175, 254, 208, 224], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `perByteFee` (0x4011ec0a) function + pub fn per_byte_fee( + &self, + state_id: ::ethers::core::types::Bytes, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([64, 17, 236, 10], state_id) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `requestCommitments` (0x368bf464) function + pub fn request_commitments( + &self, + commitment: [u8; 32], + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([54, 139, 244, 100], commitment) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `requestReceipts` (0x19667a3e) function + pub fn request_receipts( + &self, + commitment: [u8; 32], + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([25, 102, 122, 62], commitment) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `responded` (0x73bfa8ae) function + pub fn responded( + &self, + commitment: [u8; 32], + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([115, 191, 168, 174], commitment) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `responseCommitments` (0x2211f1dd) function + pub fn response_commitments( + &self, + commitment: [u8; 32], + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([34, 17, 241, 221], commitment) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `responseReceipts` (0x8856337e) function + pub fn response_receipts( + &self, + commitment: [u8; 32], + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([136, 86, 51, 126], commitment) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `setConsensusState` (0x8d48f3c7) function + pub fn set_consensus_state( + &self, + state: ::ethers::core::types::Bytes, + height: StateMachineHeight, + commitment: StateCommitment, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([141, 72, 243, 199], (state, height, commitment)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `setFrozenState` (0x6ac88bad) function + pub fn set_frozen_state( + &self, + new_state: u8, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([106, 200, 139, 173], new_state) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `stateCommitmentFee` (0xb5c8a08e) function + pub fn state_commitment_fee( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([181, 200, 160, 142], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `stateMachineCommitment` (0xa70a8c47) function + pub fn state_machine_commitment( + &self, + height: StateMachineHeight, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([167, 10, 140, 71], (height,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `stateMachineCommitmentUpdateTime` (0x1a880a93) function + pub fn state_machine_commitment_update_time( + &self, + height: StateMachineHeight, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([26, 136, 10, 147], (height,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `stateMachineId` (0x7a1bd7c1) function + pub fn state_machine_id( + &self, + parachain_id: ::ethers::core::types::Bytes, + id: ::ethers::core::types::U256, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([122, 27, 215, 193], (parachain_id, id)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `storeConsensusState` (0xb4974cf0) function + pub fn store_consensus_state( + &self, + state: ::ethers::core::types::Bytes, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([180, 151, 76, 240], state) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `storeStateMachineCommitment` (0x559efe9e) function + pub fn store_state_machine_commitment( + &self, + height: StateMachineHeight, + commitment: StateCommitment, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([85, 158, 254, 158], (height, commitment)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `timestamp` (0xb80777ea) function + pub fn timestamp( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([184, 7, 119, 234], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `unStakingPeriod` (0xd40784c7) function + pub fn un_staking_period( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([212, 7, 132, 199], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `uniswapV2Router` (0x1694505e) function + pub fn uniswap_v2_router( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([22, 148, 80, 94], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `updateHostParams` (0x6ad7df47) function + pub fn update_host_params( + &self, + params: HostParams, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([106, 215, 223, 71], (params,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `vetoes` (0x5218d908) function + pub fn vetoes( + &self, + para_id: ::ethers::core::types::U256, + height: ::ethers::core::types::U256, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([82, 24, 217, 8], (para_id, height)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `withdraw` (0xcb1a6e2f) function + pub fn withdraw( + &self, + params: WithdrawParams, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([203, 26, 110, 47], (params,)) + .expect("method not found (this should never happen)") + } + ///Gets the contract's `GetRequestEvent` event + pub fn get_request_event_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, GetRequestEventFilter> { + self.0.event() + } + ///Gets the contract's `GetRequestHandled` event + pub fn get_request_handled_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, GetRequestHandledFilter> + { + self.0.event() + } + ///Gets the contract's `GetRequestTimeoutHandled` event + pub fn get_request_timeout_handled_filter( + &self, + ) -> ::ethers::contract::builders::Event< + ::std::sync::Arc, + M, + GetRequestTimeoutHandledFilter, + > { + self.0.event() + } + ///Gets the contract's `HostFrozen` event + pub fn host_frozen_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, HostFrozenFilter> { + self.0.event() + } + ///Gets the contract's `HostParamsUpdated` event + pub fn host_params_updated_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, HostParamsUpdatedFilter> + { + self.0.event() + } + ///Gets the contract's `HostWithdrawal` event + pub fn host_withdrawal_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, HostWithdrawalFilter> { + self.0.event() + } + ///Gets the contract's `PostRequestEvent` event + pub fn post_request_event_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, PostRequestEventFilter> { + self.0.event() + } + ///Gets the contract's `PostRequestHandled` event + pub fn post_request_handled_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, PostRequestHandledFilter> + { + self.0.event() + } + ///Gets the contract's `PostRequestTimeoutHandled` event + pub fn post_request_timeout_handled_filter( + &self, + ) -> ::ethers::contract::builders::Event< + ::std::sync::Arc, + M, + PostRequestTimeoutHandledFilter, + > { + self.0.event() + } + ///Gets the contract's `PostResponseEvent` event + pub fn post_response_event_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, PostResponseEventFilter> + { + self.0.event() + } + ///Gets the contract's `PostResponseFunded` event + pub fn post_response_funded_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, PostResponseFundedFilter> + { + self.0.event() + } + ///Gets the contract's `PostResponseHandled` event + pub fn post_response_handled_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, PostResponseHandledFilter> + { + self.0.event() + } + ///Gets the contract's `PostResponseTimeoutHandled` event + pub fn post_response_timeout_handled_filter( + &self, + ) -> ::ethers::contract::builders::Event< + ::std::sync::Arc, + M, + PostResponseTimeoutHandledFilter, + > { + self.0.event() + } + ///Gets the contract's `RequestFunded` event + pub fn request_funded_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, RequestFundedFilter> { + self.0.event() + } + ///Gets the contract's `StateCommitmentRead` event + pub fn state_commitment_read_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, StateCommitmentReadFilter> + { + self.0.event() + } + ///Gets the contract's `StateCommitmentVetoed` event + pub fn state_commitment_vetoed_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, StateCommitmentVetoedFilter> + { + self.0.event() + } + ///Gets the contract's `StateMachineUpdated` event + pub fn state_machine_updated_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, StateMachineUpdatedFilter> + { + self.0.event() + } + /// Returns an `Event` builder for all the events of this contract. + pub fn events( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, EvmHostEvents> { + self.0.event_with_filter(::core::default::Default::default()) + } + } + impl From<::ethers::contract::Contract> for EvmHost { + fn from(contract: ::ethers::contract::Contract) -> Self { + Self::new(contract.address(), contract.client()) + } + } + ///Custom Error type `CannotChangeFeeToken` with signature `CannotChangeFeeToken()` and + /// selector `0x50b79e6a` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "CannotChangeFeeToken", abi = "CannotChangeFeeToken()")] + pub struct CannotChangeFeeToken; + ///Custom Error type `DuplicateResponse` with signature `DuplicateResponse()` and selector + /// `0x276d57d8` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "DuplicateResponse", abi = "DuplicateResponse()")] + pub struct DuplicateResponse; + ///Custom Error type `FrozenHost` with signature `FrozenHost()` and selector `0x61dfed09` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "FrozenHost", abi = "FrozenHost()")] + pub struct FrozenHost; + ///Custom Error type `InvalidAddressLength` with signature `InvalidAddressLength()` and + /// selector `0xcc2cec02` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "InvalidAddressLength", abi = "InvalidAddressLength()")] + pub struct InvalidAddressLength; + ///Custom Error type `InvalidConsensusClient` with signature `InvalidConsensusClient()` and + /// selector `0x1435c60b` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "InvalidConsensusClient", abi = "InvalidConsensusClient()")] + pub struct InvalidConsensusClient; + ///Custom Error type `InvalidHandler` with signature `InvalidHandler()` and selector + /// `0xd8f59fa5` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "InvalidHandler", abi = "InvalidHandler()")] + pub struct InvalidHandler; + ///Custom Error type `InvalidHostManager` with signature `InvalidHostManager()` and selector + /// `0xd445bb14` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "InvalidHostManager", abi = "InvalidHostManager()")] + pub struct InvalidHostManager; + ///Custom Error type `InvalidHyperbridgeId` with signature `InvalidHyperbridgeId()` and + /// selector `0x9ea9869f` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "InvalidHyperbridgeId", abi = "InvalidHyperbridgeId()")] + pub struct InvalidHyperbridgeId; + ///Custom Error type `InvalidStateMachinesLength` with signature `InvalidStateMachinesLength()` + /// and selector `0x4f450476` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "InvalidStateMachinesLength", abi = "InvalidStateMachinesLength()")] + pub struct InvalidStateMachinesLength; + ///Custom Error type `InvalidUnstakingPeriod` with signature `InvalidUnstakingPeriod()` and + /// selector `0xd641157e` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "InvalidUnstakingPeriod", abi = "InvalidUnstakingPeriod()")] + pub struct InvalidUnstakingPeriod; + ///Custom Error type `UnauthorizedAccount` with signature `UnauthorizedAccount()` and selector + /// `0xa97ff08a` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "UnauthorizedAccount", abi = "UnauthorizedAccount()")] + pub struct UnauthorizedAccount; + ///Custom Error type `UnauthorizedAction` with signature `UnauthorizedAction()` and selector + /// `0x843800fa` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "UnauthorizedAction", abi = "UnauthorizedAction()")] + pub struct UnauthorizedAction; + ///Custom Error type `UnauthorizedResponse` with signature `UnauthorizedResponse()` and + /// selector `0x850dc39c` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "UnauthorizedResponse", abi = "UnauthorizedResponse()")] + pub struct UnauthorizedResponse; + ///Custom Error type `UnknownRequest` with signature `UnknownRequest()` and selector + /// `0x6d080297` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "UnknownRequest", abi = "UnknownRequest()")] + pub struct UnknownRequest; + ///Custom Error type `UnknownResponse` with signature `UnknownResponse()` and selector + /// `0x950a5b24` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "UnknownResponse", abi = "UnknownResponse()")] + pub struct UnknownResponse; + ///Custom Error type `WithdrawalFailed` with signature `WithdrawalFailed()` and selector + /// `0x27fcd9d1` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "WithdrawalFailed", abi = "WithdrawalFailed()")] + pub struct WithdrawalFailed; + ///Container type for all of the contract's custom errors + #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] + pub enum EvmHostErrors { + CannotChangeFeeToken(CannotChangeFeeToken), + DuplicateResponse(DuplicateResponse), + FrozenHost(FrozenHost), + InvalidAddressLength(InvalidAddressLength), + InvalidConsensusClient(InvalidConsensusClient), + InvalidHandler(InvalidHandler), + InvalidHostManager(InvalidHostManager), + InvalidHyperbridgeId(InvalidHyperbridgeId), + InvalidStateMachinesLength(InvalidStateMachinesLength), + InvalidUnstakingPeriod(InvalidUnstakingPeriod), + UnauthorizedAccount(UnauthorizedAccount), + UnauthorizedAction(UnauthorizedAction), + UnauthorizedResponse(UnauthorizedResponse), + UnknownRequest(UnknownRequest), + UnknownResponse(UnknownResponse), + WithdrawalFailed(WithdrawalFailed), + /// The standard solidity revert string, with selector + /// Error(string) -- 0x08c379a0 + RevertString(::std::string::String), + } + impl ::ethers::core::abi::AbiDecode for EvmHostErrors { + fn decode( + data: impl AsRef<[u8]>, + ) -> ::core::result::Result { + let data = data.as_ref(); + if let Ok(decoded) = + <::std::string::String as ::ethers::core::abi::AbiDecode>::decode(data) + { + return Ok(Self::RevertString(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::CannotChangeFeeToken(decoded)); + } + if let Ok(decoded) = ::decode(data) + { + return Ok(Self::DuplicateResponse(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::FrozenHost(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::InvalidAddressLength(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::InvalidConsensusClient(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::InvalidHandler(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::InvalidHostManager(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::InvalidHyperbridgeId(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::InvalidStateMachinesLength(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::InvalidUnstakingPeriod(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::UnauthorizedAccount(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::UnauthorizedAction(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::UnauthorizedResponse(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::UnknownRequest(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::UnknownResponse(decoded)); + } + if let Ok(decoded) = ::decode(data) + { + return Ok(Self::WithdrawalFailed(decoded)); + } + Err(::ethers::core::abi::Error::InvalidData.into()) + } + } + impl ::ethers::core::abi::AbiEncode for EvmHostErrors { + fn encode(self) -> ::std::vec::Vec { + match self { + Self::CannotChangeFeeToken(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::DuplicateResponse(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::FrozenHost(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::InvalidAddressLength(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::InvalidConsensusClient(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::InvalidHandler(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::InvalidHostManager(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::InvalidHyperbridgeId(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::InvalidStateMachinesLength(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::InvalidUnstakingPeriod(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::UnauthorizedAccount(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::UnauthorizedAction(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::UnauthorizedResponse(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::UnknownRequest(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::UnknownResponse(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::WithdrawalFailed(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s), + } + } + } + impl ::ethers::contract::ContractRevert for EvmHostErrors { + fn valid_selector(selector: [u8; 4]) -> bool { + match selector { + [0x08, 0xc3, 0x79, 0xa0] => true, + _ if selector == + ::selector() => + true, + _ if selector == + ::selector() => + true, + _ if selector == ::selector() => true, + _ if selector == + ::selector() => + true, + _ if selector == + ::selector() => + true, + _ if selector == ::selector() => + true, + _ if selector == + ::selector() => + true, + _ if selector == + ::selector() => + true, + _ if selector == + ::selector() => + true, + _ if selector == + ::selector() => + true, + _ if selector == + ::selector() => + true, + _ if selector == + ::selector() => + true, + _ if selector == + ::selector() => + true, + _ if selector == ::selector() => + true, + _ if selector == ::selector() => + true, + _ if selector == ::selector() => + true, + _ => false, + } + } + } + impl ::core::fmt::Display for EvmHostErrors { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + match self { + Self::CannotChangeFeeToken(element) => ::core::fmt::Display::fmt(element, f), + Self::DuplicateResponse(element) => ::core::fmt::Display::fmt(element, f), + Self::FrozenHost(element) => ::core::fmt::Display::fmt(element, f), + Self::InvalidAddressLength(element) => ::core::fmt::Display::fmt(element, f), + Self::InvalidConsensusClient(element) => ::core::fmt::Display::fmt(element, f), + Self::InvalidHandler(element) => ::core::fmt::Display::fmt(element, f), + Self::InvalidHostManager(element) => ::core::fmt::Display::fmt(element, f), + Self::InvalidHyperbridgeId(element) => ::core::fmt::Display::fmt(element, f), + Self::InvalidStateMachinesLength(element) => ::core::fmt::Display::fmt(element, f), + Self::InvalidUnstakingPeriod(element) => ::core::fmt::Display::fmt(element, f), + Self::UnauthorizedAccount(element) => ::core::fmt::Display::fmt(element, f), + Self::UnauthorizedAction(element) => ::core::fmt::Display::fmt(element, f), + Self::UnauthorizedResponse(element) => ::core::fmt::Display::fmt(element, f), + Self::UnknownRequest(element) => ::core::fmt::Display::fmt(element, f), + Self::UnknownResponse(element) => ::core::fmt::Display::fmt(element, f), + Self::WithdrawalFailed(element) => ::core::fmt::Display::fmt(element, f), + Self::RevertString(s) => ::core::fmt::Display::fmt(s, f), + } + } + } + impl ::core::convert::From<::std::string::String> for EvmHostErrors { + fn from(value: String) -> Self { + Self::RevertString(value) + } + } + impl ::core::convert::From for EvmHostErrors { + fn from(value: CannotChangeFeeToken) -> Self { + Self::CannotChangeFeeToken(value) + } + } + impl ::core::convert::From for EvmHostErrors { + fn from(value: DuplicateResponse) -> Self { + Self::DuplicateResponse(value) + } + } + impl ::core::convert::From for EvmHostErrors { + fn from(value: FrozenHost) -> Self { + Self::FrozenHost(value) + } + } + impl ::core::convert::From for EvmHostErrors { + fn from(value: InvalidAddressLength) -> Self { + Self::InvalidAddressLength(value) + } + } + impl ::core::convert::From for EvmHostErrors { + fn from(value: InvalidConsensusClient) -> Self { + Self::InvalidConsensusClient(value) + } + } + impl ::core::convert::From for EvmHostErrors { + fn from(value: InvalidHandler) -> Self { + Self::InvalidHandler(value) + } + } + impl ::core::convert::From for EvmHostErrors { + fn from(value: InvalidHostManager) -> Self { + Self::InvalidHostManager(value) + } + } + impl ::core::convert::From for EvmHostErrors { + fn from(value: InvalidHyperbridgeId) -> Self { + Self::InvalidHyperbridgeId(value) + } + } + impl ::core::convert::From for EvmHostErrors { + fn from(value: InvalidStateMachinesLength) -> Self { + Self::InvalidStateMachinesLength(value) + } + } + impl ::core::convert::From for EvmHostErrors { + fn from(value: InvalidUnstakingPeriod) -> Self { + Self::InvalidUnstakingPeriod(value) + } + } + impl ::core::convert::From for EvmHostErrors { + fn from(value: UnauthorizedAccount) -> Self { + Self::UnauthorizedAccount(value) + } + } + impl ::core::convert::From for EvmHostErrors { + fn from(value: UnauthorizedAction) -> Self { + Self::UnauthorizedAction(value) + } + } + impl ::core::convert::From for EvmHostErrors { + fn from(value: UnauthorizedResponse) -> Self { + Self::UnauthorizedResponse(value) + } + } + impl ::core::convert::From for EvmHostErrors { + fn from(value: UnknownRequest) -> Self { + Self::UnknownRequest(value) + } + } + impl ::core::convert::From for EvmHostErrors { + fn from(value: UnknownResponse) -> Self { + Self::UnknownResponse(value) + } + } + impl ::core::convert::From for EvmHostErrors { + fn from(value: WithdrawalFailed) -> Self { + Self::WithdrawalFailed(value) + } + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent( + name = "GetRequestEvent", + abi = "GetRequestEvent(string,string,address,bytes[],uint256,uint256,uint256,bytes,uint256)" + )] + pub struct GetRequestEventFilter { + pub source: ::std::string::String, + pub dest: ::std::string::String, + #[ethevent(indexed)] + pub from: ::ethers::core::types::Address, + pub keys: ::std::vec::Vec<::ethers::core::types::Bytes>, + pub height: ::ethers::core::types::U256, + pub nonce: ::ethers::core::types::U256, + pub timeout_timestamp: ::ethers::core::types::U256, + pub context: ::ethers::core::types::Bytes, + pub fee: ::ethers::core::types::U256, + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent(name = "GetRequestHandled", abi = "GetRequestHandled(bytes32,address)")] + pub struct GetRequestHandledFilter { + #[ethevent(indexed)] + pub commitment: [u8; 32], + pub relayer: ::ethers::core::types::Address, + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent(name = "GetRequestTimeoutHandled", abi = "GetRequestTimeoutHandled(bytes32,string)")] + pub struct GetRequestTimeoutHandledFilter { + #[ethevent(indexed)] + pub commitment: [u8; 32], + pub dest: ::std::string::String, + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent(name = "HostFrozen", abi = "HostFrozen(uint8)")] + pub struct HostFrozenFilter { + pub status: u8, + } + #[derive(Clone, ::ethers::contract::EthEvent, ::ethers::contract::EthDisplay)] + #[ethevent( + name = "HostParamsUpdated", + abi = "HostParamsUpdated((uint256,uint256,uint256,address,address,address,address,address,uint256,uint256,address,uint256[],(bytes32,uint256)[],bytes),(uint256,uint256,uint256,address,address,address,address,address,uint256,uint256,address,uint256[],(bytes32,uint256)[],bytes))" + )] + pub struct HostParamsUpdatedFilter { + pub old_params: HostParams, + pub new_params: HostParams, + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent(name = "HostWithdrawal", abi = "HostWithdrawal(uint256,address,bool)")] + pub struct HostWithdrawalFilter { + pub amount: ::ethers::core::types::U256, + pub beneficiary: ::ethers::core::types::Address, + pub native: bool, + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent( + name = "PostRequestEvent", + abi = "PostRequestEvent(string,string,address,bytes,uint256,uint256,bytes,uint256)" + )] + pub struct PostRequestEventFilter { + pub source: ::std::string::String, + pub dest: ::std::string::String, + #[ethevent(indexed)] + pub from: ::ethers::core::types::Address, + pub to: ::ethers::core::types::Bytes, + pub nonce: ::ethers::core::types::U256, + pub timeout_timestamp: ::ethers::core::types::U256, + pub body: ::ethers::core::types::Bytes, + pub fee: ::ethers::core::types::U256, + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent(name = "PostRequestHandled", abi = "PostRequestHandled(bytes32,address)")] + pub struct PostRequestHandledFilter { + #[ethevent(indexed)] + pub commitment: [u8; 32], + pub relayer: ::ethers::core::types::Address, + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent( + name = "PostRequestTimeoutHandled", + abi = "PostRequestTimeoutHandled(bytes32,string)" + )] + pub struct PostRequestTimeoutHandledFilter { + #[ethevent(indexed)] + pub commitment: [u8; 32], + pub dest: ::std::string::String, + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent( + name = "PostResponseEvent", + abi = "PostResponseEvent(string,string,address,bytes,uint256,uint256,bytes,bytes,uint256,uint256)" + )] + pub struct PostResponseEventFilter { + pub source: ::std::string::String, + pub dest: ::std::string::String, + #[ethevent(indexed)] + pub from: ::ethers::core::types::Address, + pub to: ::ethers::core::types::Bytes, + pub nonce: ::ethers::core::types::U256, + pub timeout_timestamp: ::ethers::core::types::U256, + pub body: ::ethers::core::types::Bytes, + pub response: ::ethers::core::types::Bytes, + pub response_timeout_timestamp: ::ethers::core::types::U256, + pub fee: ::ethers::core::types::U256, + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent(name = "PostResponseFunded", abi = "PostResponseFunded(bytes32,uint256)")] + pub struct PostResponseFundedFilter { + #[ethevent(indexed)] + pub commitment: [u8; 32], + pub new_fee: ::ethers::core::types::U256, + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent(name = "PostResponseHandled", abi = "PostResponseHandled(bytes32,address)")] + pub struct PostResponseHandledFilter { + #[ethevent(indexed)] + pub commitment: [u8; 32], + pub relayer: ::ethers::core::types::Address, + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent( + name = "PostResponseTimeoutHandled", + abi = "PostResponseTimeoutHandled(bytes32,string)" + )] + pub struct PostResponseTimeoutHandledFilter { + #[ethevent(indexed)] + pub commitment: [u8; 32], + pub dest: ::std::string::String, + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent(name = "RequestFunded", abi = "RequestFunded(bytes32,uint256)")] + pub struct RequestFundedFilter { + #[ethevent(indexed)] + pub commitment: [u8; 32], + pub new_fee: ::ethers::core::types::U256, + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent(name = "StateCommitmentRead", abi = "StateCommitmentRead(address,uint256)")] + pub struct StateCommitmentReadFilter { + #[ethevent(indexed)] + pub caller: ::ethers::core::types::Address, + pub fee: ::ethers::core::types::U256, + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent( + name = "StateCommitmentVetoed", + abi = "StateCommitmentVetoed(string,uint256,(uint256,bytes32,bytes32),address)" + )] + pub struct StateCommitmentVetoedFilter { + pub state_machine_id: ::std::string::String, + pub height: ::ethers::core::types::U256, + pub state_commitment: StateCommitment, + #[ethevent(indexed)] + pub fisherman: ::ethers::core::types::Address, + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent(name = "StateMachineUpdated", abi = "StateMachineUpdated(string,uint256)")] + pub struct StateMachineUpdatedFilter { + pub state_machine_id: ::std::string::String, + pub height: ::ethers::core::types::U256, + } + ///Container type for all of the contract's events + #[derive(Clone, ::ethers::contract::EthAbiType)] + pub enum EvmHostEvents { + GetRequestEventFilter(GetRequestEventFilter), + GetRequestHandledFilter(GetRequestHandledFilter), + GetRequestTimeoutHandledFilter(GetRequestTimeoutHandledFilter), + HostFrozenFilter(HostFrozenFilter), + HostParamsUpdatedFilter(HostParamsUpdatedFilter), + HostWithdrawalFilter(HostWithdrawalFilter), + PostRequestEventFilter(PostRequestEventFilter), + PostRequestHandledFilter(PostRequestHandledFilter), + PostRequestTimeoutHandledFilter(PostRequestTimeoutHandledFilter), + PostResponseEventFilter(PostResponseEventFilter), + PostResponseFundedFilter(PostResponseFundedFilter), + PostResponseHandledFilter(PostResponseHandledFilter), + PostResponseTimeoutHandledFilter(PostResponseTimeoutHandledFilter), + RequestFundedFilter(RequestFundedFilter), + StateCommitmentReadFilter(StateCommitmentReadFilter), + StateCommitmentVetoedFilter(StateCommitmentVetoedFilter), + StateMachineUpdatedFilter(StateMachineUpdatedFilter), + } + impl ::ethers::contract::EthLogDecode for EvmHostEvents { + fn decode_log( + log: &::ethers::core::abi::RawLog, + ) -> ::core::result::Result { + if let Ok(decoded) = GetRequestEventFilter::decode_log(log) { + return Ok(EvmHostEvents::GetRequestEventFilter(decoded)); + } + if let Ok(decoded) = GetRequestHandledFilter::decode_log(log) { + return Ok(EvmHostEvents::GetRequestHandledFilter(decoded)); + } + if let Ok(decoded) = GetRequestTimeoutHandledFilter::decode_log(log) { + return Ok(EvmHostEvents::GetRequestTimeoutHandledFilter(decoded)); + } + if let Ok(decoded) = HostFrozenFilter::decode_log(log) { + return Ok(EvmHostEvents::HostFrozenFilter(decoded)); + } + if let Ok(decoded) = HostParamsUpdatedFilter::decode_log(log) { + return Ok(EvmHostEvents::HostParamsUpdatedFilter(decoded)); + } + if let Ok(decoded) = HostWithdrawalFilter::decode_log(log) { + return Ok(EvmHostEvents::HostWithdrawalFilter(decoded)); + } + if let Ok(decoded) = PostRequestEventFilter::decode_log(log) { + return Ok(EvmHostEvents::PostRequestEventFilter(decoded)); + } + if let Ok(decoded) = PostRequestHandledFilter::decode_log(log) { + return Ok(EvmHostEvents::PostRequestHandledFilter(decoded)); + } + if let Ok(decoded) = PostRequestTimeoutHandledFilter::decode_log(log) { + return Ok(EvmHostEvents::PostRequestTimeoutHandledFilter(decoded)); + } + if let Ok(decoded) = PostResponseEventFilter::decode_log(log) { + return Ok(EvmHostEvents::PostResponseEventFilter(decoded)); + } + if let Ok(decoded) = PostResponseFundedFilter::decode_log(log) { + return Ok(EvmHostEvents::PostResponseFundedFilter(decoded)); + } + if let Ok(decoded) = PostResponseHandledFilter::decode_log(log) { + return Ok(EvmHostEvents::PostResponseHandledFilter(decoded)); + } + if let Ok(decoded) = PostResponseTimeoutHandledFilter::decode_log(log) { + return Ok(EvmHostEvents::PostResponseTimeoutHandledFilter(decoded)); + } + if let Ok(decoded) = RequestFundedFilter::decode_log(log) { + return Ok(EvmHostEvents::RequestFundedFilter(decoded)); + } + if let Ok(decoded) = StateCommitmentReadFilter::decode_log(log) { + return Ok(EvmHostEvents::StateCommitmentReadFilter(decoded)); + } + if let Ok(decoded) = StateCommitmentVetoedFilter::decode_log(log) { + return Ok(EvmHostEvents::StateCommitmentVetoedFilter(decoded)); + } + if let Ok(decoded) = StateMachineUpdatedFilter::decode_log(log) { + return Ok(EvmHostEvents::StateMachineUpdatedFilter(decoded)); + } + Err(::ethers::core::abi::Error::InvalidData) + } + } + impl ::core::fmt::Display for EvmHostEvents { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + match self { + Self::GetRequestEventFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::GetRequestHandledFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::GetRequestTimeoutHandledFilter(element) => + ::core::fmt::Display::fmt(element, f), + Self::HostFrozenFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::HostParamsUpdatedFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::HostWithdrawalFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::PostRequestEventFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::PostRequestHandledFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::PostRequestTimeoutHandledFilter(element) => + ::core::fmt::Display::fmt(element, f), + Self::PostResponseEventFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::PostResponseFundedFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::PostResponseHandledFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::PostResponseTimeoutHandledFilter(element) => + ::core::fmt::Display::fmt(element, f), + Self::RequestFundedFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::StateCommitmentReadFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::StateCommitmentVetoedFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::StateMachineUpdatedFilter(element) => ::core::fmt::Display::fmt(element, f), + } + } + } + impl ::core::convert::From for EvmHostEvents { + fn from(value: GetRequestEventFilter) -> Self { + Self::GetRequestEventFilter(value) + } + } + impl ::core::convert::From for EvmHostEvents { + fn from(value: GetRequestHandledFilter) -> Self { + Self::GetRequestHandledFilter(value) + } + } + impl ::core::convert::From for EvmHostEvents { + fn from(value: GetRequestTimeoutHandledFilter) -> Self { + Self::GetRequestTimeoutHandledFilter(value) + } + } + impl ::core::convert::From for EvmHostEvents { + fn from(value: HostFrozenFilter) -> Self { + Self::HostFrozenFilter(value) + } + } + impl ::core::convert::From for EvmHostEvents { + fn from(value: HostParamsUpdatedFilter) -> Self { + Self::HostParamsUpdatedFilter(value) + } + } + impl ::core::convert::From for EvmHostEvents { + fn from(value: HostWithdrawalFilter) -> Self { + Self::HostWithdrawalFilter(value) + } + } + impl ::core::convert::From for EvmHostEvents { + fn from(value: PostRequestEventFilter) -> Self { + Self::PostRequestEventFilter(value) + } + } + impl ::core::convert::From for EvmHostEvents { + fn from(value: PostRequestHandledFilter) -> Self { + Self::PostRequestHandledFilter(value) + } + } + impl ::core::convert::From for EvmHostEvents { + fn from(value: PostRequestTimeoutHandledFilter) -> Self { + Self::PostRequestTimeoutHandledFilter(value) + } + } + impl ::core::convert::From for EvmHostEvents { + fn from(value: PostResponseEventFilter) -> Self { + Self::PostResponseEventFilter(value) + } + } + impl ::core::convert::From for EvmHostEvents { + fn from(value: PostResponseFundedFilter) -> Self { + Self::PostResponseFundedFilter(value) + } + } + impl ::core::convert::From for EvmHostEvents { + fn from(value: PostResponseHandledFilter) -> Self { + Self::PostResponseHandledFilter(value) + } + } + impl ::core::convert::From for EvmHostEvents { + fn from(value: PostResponseTimeoutHandledFilter) -> Self { + Self::PostResponseTimeoutHandledFilter(value) + } + } + impl ::core::convert::From for EvmHostEvents { + fn from(value: RequestFundedFilter) -> Self { + Self::RequestFundedFilter(value) + } + } + impl ::core::convert::From for EvmHostEvents { + fn from(value: StateCommitmentReadFilter) -> Self { + Self::StateCommitmentReadFilter(value) + } + } + impl ::core::convert::From for EvmHostEvents { + fn from(value: StateCommitmentVetoedFilter) -> Self { + Self::StateCommitmentVetoedFilter(value) + } + } + impl ::core::convert::From for EvmHostEvents { + fn from(value: StateMachineUpdatedFilter) -> Self { + Self::StateMachineUpdatedFilter(value) + } + } + ///Container type for all input parameters for the `admin` function with signature `admin()` + /// and selector `0xf851a440` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "admin", abi = "admin()")] + pub struct AdminCall; + ///Container type for all input parameters for the `chainId` function with signature + /// `chainId()` and selector `0x9a8a0592` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "chainId", abi = "chainId()")] + pub struct ChainIdCall; + ///Container type for all input parameters for the `challengePeriod` function with signature + /// `challengePeriod()` and selector `0xf3f480d9` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "challengePeriod", abi = "challengePeriod()")] + pub struct ChallengePeriodCall; + ///Container type for all input parameters for the `consensusClient` function with signature + /// `consensusClient()` and selector `0x2476132b` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "consensusClient", abi = "consensusClient()")] + pub struct ConsensusClientCall; + ///Container type for all input parameters for the `consensusState` function with signature + /// `consensusState()` and selector `0xbbad99d4` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "consensusState", abi = "consensusState()")] + pub struct ConsensusStateCall; + ///Container type for all input parameters for the `consensusUpdateTime` function with + /// signature `consensusUpdateTime()` and selector `0x9a8425bc` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "consensusUpdateTime", abi = "consensusUpdateTime()")] + pub struct ConsensusUpdateTimeCall; + ///Container type for all input parameters for the `deleteStateMachineCommitment` function with + /// signature `deleteStateMachineCommitment((uint256,uint256),address)` and selector + /// `0xf8ddf259` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "deleteStateMachineCommitment", + abi = "deleteStateMachineCommitment((uint256,uint256),address)" + )] + pub struct DeleteStateMachineCommitmentCall { + pub height: StateMachineHeight, + pub fisherman: ::ethers::core::types::Address, + } + ///Container type for all input parameters for the `dispatch` function with signature + /// `dispatch(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64,uint256,address))` and + /// selector `0x94480805` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "dispatch", + abi = "dispatch(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64,uint256,address))" + )] + pub struct DispatchCall { + pub post: DispatchPost, + } + ///Container type for all input parameters for the `dispatch` function with signature + /// `dispatch((bytes,bytes,bytes,uint64,uint256,address))` and selector `0xb8f3e8f5` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "dispatch", abi = "dispatch((bytes,bytes,bytes,uint64,uint256,address))")] + pub struct DispatchWithPostCall { + pub post: DispatchPost, + } + ///Container type for all input parameters for the `dispatch` function with signature + /// `dispatch((bytes,uint64,bytes[],uint64,uint256,bytes))` and selector `0xd22e3343` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "dispatch", abi = "dispatch((bytes,uint64,bytes[],uint64,uint256,bytes))")] + pub struct DispatchWithGetCall { + pub get: DispatchGet, + } + ///Container type for all input parameters for the `dispatchIncoming` function with signature + /// `dispatchIncoming(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),address)` and + /// selector `0xab013de1` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "dispatchIncoming", + abi = "dispatchIncoming(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),address)" + )] + pub struct DispatchIncomingCall { + pub response: GetResponse, + pub relayer: ::ethers::core::types::Address, + } + ///Container type for all input parameters for the `dispatchIncoming` function with signature + /// `dispatchIncoming((bytes,bytes,uint64,bytes,bytes,uint64,bytes),address)` and selector + /// `0xb85e6fbb` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "dispatchIncoming", + abi = "dispatchIncoming((bytes,bytes,uint64,bytes,bytes,uint64,bytes),address)" + )] + pub struct DispatchIncomingWithRequestCall { + pub request: PostRequest, + pub relayer: ::ethers::core::types::Address, + } + ///Container type for all input parameters for the `dispatchIncoming` function with signature + /// `dispatchIncoming(((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes, + /// bytes)[]),address)` and selector `0xfc8a341c` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "dispatchIncoming", + abi = "dispatchIncoming(((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]),address)" + )] + pub struct DispatchIncomingWithResponseCall { + pub response: GetResponse, + pub relayer: ::ethers::core::types::Address, + } + ///Container type for all input parameters for the `dispatchTimeOut` function with signature + /// `dispatchTimeOut(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),(uint256, + /// address),bytes32)` and selector `0x0446fc47` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "dispatchTimeOut", + abi = "dispatchTimeOut(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),(uint256,address),bytes32)" + )] + pub struct DispatchTimeOut0Call { + pub response: PostResponse, + pub meta: FeeMetadata, + pub commitment: [u8; 32], + } + ///Container type for all input parameters for the `dispatchTimeOut` function with signature + /// `dispatchTimeOut((bytes,bytes,uint64,bytes,bytes,uint64,bytes),(uint256,address),bytes32)` + /// and selector `0x4b46efaa` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "dispatchTimeOut", + abi = "dispatchTimeOut((bytes,bytes,uint64,bytes,bytes,uint64,bytes),(uint256,address),bytes32)" + )] + pub struct DispatchTimeOut1Call { + pub request: GetRequest, + pub meta: FeeMetadata, + pub commitment: [u8; 32], + } + ///Container type for all input parameters for the `dispatchTimeOut` function with signature + /// `dispatchTimeOut((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(uint256,address), + /// bytes32)` and selector `0x6d6c2313` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "dispatchTimeOut", + abi = "dispatchTimeOut((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(uint256,address),bytes32)" + )] + pub struct DispatchTimeOut2Call { + pub request: GetRequest, + pub meta: FeeMetadata, + pub commitment: [u8; 32], + } + ///Container type for all input parameters for the `feeToken` function with signature + /// `feeToken()` and selector `0x647846a5` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "feeToken", abi = "feeToken()")] + pub struct FeeTokenCall; + ///Container type for all input parameters for the `frozen` function with signature `frozen()` + /// and selector `0x054f7d9c` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "frozen", abi = "frozen()")] + pub struct FrozenCall; + ///Container type for all input parameters for the `fundRequest` function with signature + /// `fundRequest(bytes32,uint256)` and selector `0xb9ea3289` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "fundRequest", abi = "fundRequest(bytes32,uint256)")] + pub struct FundRequestCall { + pub commitment: [u8; 32], + pub amount: ::ethers::core::types::U256, + } + ///Container type for all input parameters for the `fundResponse` function with signature + /// `fundResponse(bytes32,uint256)` and selector `0xfadce3c7` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "fundResponse", abi = "fundResponse(bytes32,uint256)")] + pub struct FundResponseCall { + pub commitment: [u8; 32], + pub amount: ::ethers::core::types::U256, + } + ///Container type for all input parameters for the `host` function with signature `host()` and + /// selector `0xf437bc59` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "host", abi = "host()")] + pub struct HostCall; + ///Container type for all input parameters for the `hostParams` function with signature + /// `hostParams()` and selector `0x2215364d` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "hostParams", abi = "hostParams()")] + pub struct HostParamsCall; + ///Container type for all input parameters for the `hyperbridge` function with signature + /// `hyperbridge()` and selector `0x005e763e` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "hyperbridge", abi = "hyperbridge()")] + pub struct HyperbridgeCall; + ///Container type for all input parameters for the `latestStateMachineHeight` function with + /// signature `latestStateMachineHeight(uint256)` and selector `0x9c095f86` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "latestStateMachineHeight", abi = "latestStateMachineHeight(uint256)")] + pub struct LatestStateMachineHeightCall { + pub id: ::ethers::core::types::U256, + } + ///Container type for all input parameters for the `nonce` function with signature `nonce()` + /// and selector `0xaffed0e0` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "nonce", abi = "nonce()")] + pub struct NonceCall; + ///Container type for all input parameters for the `perByteFee` function with signature + /// `perByteFee(bytes)` and selector `0x4011ec0a` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "perByteFee", abi = "perByteFee(bytes)")] + pub struct PerByteFeeCall { + pub state_id: ::ethers::core::types::Bytes, + } + ///Container type for all input parameters for the `requestCommitments` function with signature + /// `requestCommitments(bytes32)` and selector `0x368bf464` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "requestCommitments", abi = "requestCommitments(bytes32)")] + pub struct RequestCommitmentsCall { + pub commitment: [u8; 32], + } + ///Container type for all input parameters for the `requestReceipts` function with signature + /// `requestReceipts(bytes32)` and selector `0x19667a3e` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "requestReceipts", abi = "requestReceipts(bytes32)")] + pub struct RequestReceiptsCall { + pub commitment: [u8; 32], + } + ///Container type for all input parameters for the `responded` function with signature + /// `responded(bytes32)` and selector `0x73bfa8ae` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "responded", abi = "responded(bytes32)")] + pub struct RespondedCall { + pub commitment: [u8; 32], + } + ///Container type for all input parameters for the `responseCommitments` function with + /// signature `responseCommitments(bytes32)` and selector `0x2211f1dd` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "responseCommitments", abi = "responseCommitments(bytes32)")] + pub struct ResponseCommitmentsCall { + pub commitment: [u8; 32], + } + ///Container type for all input parameters for the `responseReceipts` function with signature + /// `responseReceipts(bytes32)` and selector `0x8856337e` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "responseReceipts", abi = "responseReceipts(bytes32)")] + pub struct ResponseReceiptsCall { + pub commitment: [u8; 32], + } + ///Container type for all input parameters for the `setConsensusState` function with signature + /// `setConsensusState(bytes,(uint256,uint256),(uint256,bytes32,bytes32))` and selector + /// `0x8d48f3c7` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "setConsensusState", + abi = "setConsensusState(bytes,(uint256,uint256),(uint256,bytes32,bytes32))" + )] + pub struct SetConsensusStateCall { + pub state: ::ethers::core::types::Bytes, + pub height: StateMachineHeight, + pub commitment: StateCommitment, + } + ///Container type for all input parameters for the `setFrozenState` function with signature + /// `setFrozenState(uint8)` and selector `0x6ac88bad` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "setFrozenState", abi = "setFrozenState(uint8)")] + pub struct SetFrozenStateCall { + pub new_state: u8, + } + ///Container type for all input parameters for the `stateCommitmentFee` function with signature + /// `stateCommitmentFee()` and selector `0xb5c8a08e` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "stateCommitmentFee", abi = "stateCommitmentFee()")] + pub struct StateCommitmentFeeCall; + ///Container type for all input parameters for the `stateMachineCommitment` function with + /// signature `stateMachineCommitment((uint256,uint256))` and selector `0xa70a8c47` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "stateMachineCommitment", abi = "stateMachineCommitment((uint256,uint256))")] + pub struct StateMachineCommitmentCall { + pub height: StateMachineHeight, + } + ///Container type for all input parameters for the `stateMachineCommitmentUpdateTime` function + /// with signature `stateMachineCommitmentUpdateTime((uint256,uint256))` and selector + /// `0x1a880a93` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "stateMachineCommitmentUpdateTime", + abi = "stateMachineCommitmentUpdateTime((uint256,uint256))" + )] + pub struct StateMachineCommitmentUpdateTimeCall { + pub height: StateMachineHeight, + } + ///Container type for all input parameters for the `stateMachineId` function with signature + /// `stateMachineId(bytes,uint256)` and selector `0x7a1bd7c1` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "stateMachineId", abi = "stateMachineId(bytes,uint256)")] + pub struct StateMachineIdCall { + pub parachain_id: ::ethers::core::types::Bytes, + pub id: ::ethers::core::types::U256, + } + ///Container type for all input parameters for the `storeConsensusState` function with + /// signature `storeConsensusState(bytes)` and selector `0xb4974cf0` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "storeConsensusState", abi = "storeConsensusState(bytes)")] + pub struct StoreConsensusStateCall { + pub state: ::ethers::core::types::Bytes, + } + ///Container type for all input parameters for the `storeStateMachineCommitment` function with + /// signature `storeStateMachineCommitment((uint256,uint256),(uint256,bytes32,bytes32))` and + /// selector `0x559efe9e` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "storeStateMachineCommitment", + abi = "storeStateMachineCommitment((uint256,uint256),(uint256,bytes32,bytes32))" + )] + pub struct StoreStateMachineCommitmentCall { + pub height: StateMachineHeight, + pub commitment: StateCommitment, + } + ///Container type for all input parameters for the `timestamp` function with signature + /// `timestamp()` and selector `0xb80777ea` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "timestamp", abi = "timestamp()")] + pub struct TimestampCall; + ///Container type for all input parameters for the `unStakingPeriod` function with signature + /// `unStakingPeriod()` and selector `0xd40784c7` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "unStakingPeriod", abi = "unStakingPeriod()")] + pub struct UnStakingPeriodCall; + ///Container type for all input parameters for the `uniswapV2Router` function with signature + /// `uniswapV2Router()` and selector `0x1694505e` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "uniswapV2Router", abi = "uniswapV2Router()")] + pub struct UniswapV2RouterCall; + ///Container type for all input parameters for the `updateHostParams` function with signature + /// `updateHostParams((uint256,uint256,uint256,address,address,address,address,address,uint256, + /// uint256,address,uint256[],(bytes32,uint256)[],bytes))` and selector `0x6ad7df47` + #[derive(Clone, ::ethers::contract::EthCall, ::ethers::contract::EthDisplay)] + #[ethcall( + name = "updateHostParams", + abi = "updateHostParams((uint256,uint256,uint256,address,address,address,address,address,uint256,uint256,address,uint256[],(bytes32,uint256)[],bytes))" + )] + pub struct UpdateHostParamsCall { + pub params: HostParams, + } + ///Container type for all input parameters for the `vetoes` function with signature + /// `vetoes(uint256,uint256)` and selector `0x5218d908` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "vetoes", abi = "vetoes(uint256,uint256)")] + pub struct VetoesCall { + pub para_id: ::ethers::core::types::U256, + pub height: ::ethers::core::types::U256, + } + ///Container type for all input parameters for the `withdraw` function with signature + /// `withdraw((address,uint256,bool))` and selector `0xcb1a6e2f` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "withdraw", abi = "withdraw((address,uint256,bool))")] + pub struct WithdrawCall { + pub params: WithdrawParams, + } + ///Container type for all of the contract's call + #[derive(Clone, ::ethers::contract::EthAbiType)] + pub enum EvmHostCalls { + Admin(AdminCall), + ChainId(ChainIdCall), + ChallengePeriod(ChallengePeriodCall), + ConsensusClient(ConsensusClientCall), + ConsensusState(ConsensusStateCall), + ConsensusUpdateTime(ConsensusUpdateTimeCall), + DeleteStateMachineCommitment(DeleteStateMachineCommitmentCall), + Dispatch(DispatchCall), + DispatchWithPost(DispatchWithPostCall), + DispatchWithGet(DispatchWithGetCall), + DispatchIncoming(DispatchIncomingCall), + DispatchIncomingWithRequest(DispatchIncomingWithRequestCall), + DispatchIncomingWithResponse(DispatchIncomingWithResponseCall), + DispatchTimeOut0(DispatchTimeOut0Call), + DispatchTimeOut1(DispatchTimeOut1Call), + DispatchTimeOut2(DispatchTimeOut2Call), + FeeToken(FeeTokenCall), + Frozen(FrozenCall), + FundRequest(FundRequestCall), + FundResponse(FundResponseCall), + Host(HostCall), + HostParams(HostParamsCall), + Hyperbridge(HyperbridgeCall), + LatestStateMachineHeight(LatestStateMachineHeightCall), + Nonce(NonceCall), + PerByteFee(PerByteFeeCall), + RequestCommitments(RequestCommitmentsCall), + RequestReceipts(RequestReceiptsCall), + Responded(RespondedCall), + ResponseCommitments(ResponseCommitmentsCall), + ResponseReceipts(ResponseReceiptsCall), + SetConsensusState(SetConsensusStateCall), + SetFrozenState(SetFrozenStateCall), + StateCommitmentFee(StateCommitmentFeeCall), + StateMachineCommitment(StateMachineCommitmentCall), + StateMachineCommitmentUpdateTime(StateMachineCommitmentUpdateTimeCall), + StateMachineId(StateMachineIdCall), + StoreConsensusState(StoreConsensusStateCall), + StoreStateMachineCommitment(StoreStateMachineCommitmentCall), + Timestamp(TimestampCall), + UnStakingPeriod(UnStakingPeriodCall), + UniswapV2Router(UniswapV2RouterCall), + UpdateHostParams(UpdateHostParamsCall), + Vetoes(VetoesCall), + Withdraw(WithdrawCall), + } + impl ::ethers::core::abi::AbiDecode for EvmHostCalls { + fn decode( + data: impl AsRef<[u8]>, + ) -> ::core::result::Result { + let data = data.as_ref(); + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Admin(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::ChainId(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::ChallengePeriod(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::ConsensusClient(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::ConsensusState(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::ConsensusUpdateTime(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::DeleteStateMachineCommitment(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Dispatch(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::DispatchWithPost(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::DispatchWithGet(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::DispatchIncoming(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::DispatchIncomingWithRequest(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::DispatchIncomingWithResponse(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::DispatchTimeOut0(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::DispatchTimeOut1(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::DispatchTimeOut2(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::FeeToken(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Frozen(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::FundRequest(decoded)); + } + if let Ok(decoded) = ::decode(data) + { + return Ok(Self::FundResponse(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Host(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::HostParams(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Hyperbridge(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::LatestStateMachineHeight(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Nonce(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::PerByteFee(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::RequestCommitments(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::RequestReceipts(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Responded(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::ResponseCommitments(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::ResponseReceipts(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::SetConsensusState(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::SetFrozenState(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::StateCommitmentFee(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::StateMachineCommitment(decoded)); + } + if let Ok(decoded) = + ::decode( + data, + ) { + return Ok(Self::StateMachineCommitmentUpdateTime(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::StateMachineId(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::StoreConsensusState(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::StoreStateMachineCommitment(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Timestamp(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::UnStakingPeriod(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::UniswapV2Router(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::UpdateHostParams(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Vetoes(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Withdraw(decoded)); + } + Err(::ethers::core::abi::Error::InvalidData.into()) + } + } + impl ::ethers::core::abi::AbiEncode for EvmHostCalls { + fn encode(self) -> Vec { + match self { + Self::Admin(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::ChainId(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::ChallengePeriod(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::ConsensusClient(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::ConsensusState(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::ConsensusUpdateTime(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::DeleteStateMachineCommitment(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::Dispatch(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::DispatchWithPost(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::DispatchWithGet(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::DispatchIncoming(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::DispatchIncomingWithRequest(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::DispatchIncomingWithResponse(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::DispatchTimeOut0(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::DispatchTimeOut1(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::DispatchTimeOut2(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::FeeToken(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::Frozen(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::FundRequest(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::FundResponse(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::Host(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::HostParams(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::Hyperbridge(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::LatestStateMachineHeight(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::Nonce(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::PerByteFee(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::RequestCommitments(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::RequestReceipts(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::Responded(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::ResponseCommitments(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::ResponseReceipts(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::SetConsensusState(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::SetFrozenState(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::StateCommitmentFee(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::StateMachineCommitment(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::StateMachineCommitmentUpdateTime(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::StateMachineId(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::StoreConsensusState(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::StoreStateMachineCommitment(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::Timestamp(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::UnStakingPeriod(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::UniswapV2Router(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::UpdateHostParams(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::Vetoes(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::Withdraw(element) => ::ethers::core::abi::AbiEncode::encode(element), + } + } + } + impl ::core::fmt::Display for EvmHostCalls { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + match self { + Self::Admin(element) => ::core::fmt::Display::fmt(element, f), + Self::ChainId(element) => ::core::fmt::Display::fmt(element, f), + Self::ChallengePeriod(element) => ::core::fmt::Display::fmt(element, f), + Self::ConsensusClient(element) => ::core::fmt::Display::fmt(element, f), + Self::ConsensusState(element) => ::core::fmt::Display::fmt(element, f), + Self::ConsensusUpdateTime(element) => ::core::fmt::Display::fmt(element, f), + Self::DeleteStateMachineCommitment(element) => + ::core::fmt::Display::fmt(element, f), + Self::Dispatch(element) => ::core::fmt::Display::fmt(element, f), + Self::DispatchWithPost(element) => ::core::fmt::Display::fmt(element, f), + Self::DispatchWithGet(element) => ::core::fmt::Display::fmt(element, f), + Self::DispatchIncoming(element) => ::core::fmt::Display::fmt(element, f), + Self::DispatchIncomingWithRequest(element) => ::core::fmt::Display::fmt(element, f), + Self::DispatchIncomingWithResponse(element) => + ::core::fmt::Display::fmt(element, f), + Self::DispatchTimeOut0(element) => ::core::fmt::Display::fmt(element, f), + Self::DispatchTimeOut1(element) => ::core::fmt::Display::fmt(element, f), + Self::DispatchTimeOut2(element) => ::core::fmt::Display::fmt(element, f), + Self::FeeToken(element) => ::core::fmt::Display::fmt(element, f), + Self::Frozen(element) => ::core::fmt::Display::fmt(element, f), + Self::FundRequest(element) => ::core::fmt::Display::fmt(element, f), + Self::FundResponse(element) => ::core::fmt::Display::fmt(element, f), + Self::Host(element) => ::core::fmt::Display::fmt(element, f), + Self::HostParams(element) => ::core::fmt::Display::fmt(element, f), + Self::Hyperbridge(element) => ::core::fmt::Display::fmt(element, f), + Self::LatestStateMachineHeight(element) => ::core::fmt::Display::fmt(element, f), + Self::Nonce(element) => ::core::fmt::Display::fmt(element, f), + Self::PerByteFee(element) => ::core::fmt::Display::fmt(element, f), + Self::RequestCommitments(element) => ::core::fmt::Display::fmt(element, f), + Self::RequestReceipts(element) => ::core::fmt::Display::fmt(element, f), + Self::Responded(element) => ::core::fmt::Display::fmt(element, f), + Self::ResponseCommitments(element) => ::core::fmt::Display::fmt(element, f), + Self::ResponseReceipts(element) => ::core::fmt::Display::fmt(element, f), + Self::SetConsensusState(element) => ::core::fmt::Display::fmt(element, f), + Self::SetFrozenState(element) => ::core::fmt::Display::fmt(element, f), + Self::StateCommitmentFee(element) => ::core::fmt::Display::fmt(element, f), + Self::StateMachineCommitment(element) => ::core::fmt::Display::fmt(element, f), + Self::StateMachineCommitmentUpdateTime(element) => + ::core::fmt::Display::fmt(element, f), + Self::StateMachineId(element) => ::core::fmt::Display::fmt(element, f), + Self::StoreConsensusState(element) => ::core::fmt::Display::fmt(element, f), + Self::StoreStateMachineCommitment(element) => ::core::fmt::Display::fmt(element, f), + Self::Timestamp(element) => ::core::fmt::Display::fmt(element, f), + Self::UnStakingPeriod(element) => ::core::fmt::Display::fmt(element, f), + Self::UniswapV2Router(element) => ::core::fmt::Display::fmt(element, f), + Self::UpdateHostParams(element) => ::core::fmt::Display::fmt(element, f), + Self::Vetoes(element) => ::core::fmt::Display::fmt(element, f), + Self::Withdraw(element) => ::core::fmt::Display::fmt(element, f), + } + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: AdminCall) -> Self { + Self::Admin(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: ChainIdCall) -> Self { + Self::ChainId(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: ChallengePeriodCall) -> Self { + Self::ChallengePeriod(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: ConsensusClientCall) -> Self { + Self::ConsensusClient(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: ConsensusStateCall) -> Self { + Self::ConsensusState(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: ConsensusUpdateTimeCall) -> Self { + Self::ConsensusUpdateTime(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: DeleteStateMachineCommitmentCall) -> Self { + Self::DeleteStateMachineCommitment(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: DispatchCall) -> Self { + Self::Dispatch(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: DispatchWithPostCall) -> Self { + Self::DispatchWithPost(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: DispatchWithGetCall) -> Self { + Self::DispatchWithGet(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: DispatchIncomingCall) -> Self { + Self::DispatchIncoming(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: DispatchIncomingWithRequestCall) -> Self { + Self::DispatchIncomingWithRequest(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: DispatchIncomingWithResponseCall) -> Self { + Self::DispatchIncomingWithResponse(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: DispatchTimeOut0Call) -> Self { + Self::DispatchTimeOut0(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: DispatchTimeOut1Call) -> Self { + Self::DispatchTimeOut1(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: DispatchTimeOut2Call) -> Self { + Self::DispatchTimeOut2(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: FeeTokenCall) -> Self { + Self::FeeToken(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: FrozenCall) -> Self { + Self::Frozen(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: FundRequestCall) -> Self { + Self::FundRequest(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: FundResponseCall) -> Self { + Self::FundResponse(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: HostCall) -> Self { + Self::Host(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: HostParamsCall) -> Self { + Self::HostParams(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: HyperbridgeCall) -> Self { + Self::Hyperbridge(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: LatestStateMachineHeightCall) -> Self { + Self::LatestStateMachineHeight(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: NonceCall) -> Self { + Self::Nonce(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: PerByteFeeCall) -> Self { + Self::PerByteFee(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: RequestCommitmentsCall) -> Self { + Self::RequestCommitments(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: RequestReceiptsCall) -> Self { + Self::RequestReceipts(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: RespondedCall) -> Self { + Self::Responded(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: ResponseCommitmentsCall) -> Self { + Self::ResponseCommitments(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: ResponseReceiptsCall) -> Self { + Self::ResponseReceipts(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: SetConsensusStateCall) -> Self { + Self::SetConsensusState(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: SetFrozenStateCall) -> Self { + Self::SetFrozenState(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: StateCommitmentFeeCall) -> Self { + Self::StateCommitmentFee(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: StateMachineCommitmentCall) -> Self { + Self::StateMachineCommitment(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: StateMachineCommitmentUpdateTimeCall) -> Self { + Self::StateMachineCommitmentUpdateTime(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: StateMachineIdCall) -> Self { + Self::StateMachineId(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: StoreConsensusStateCall) -> Self { + Self::StoreConsensusState(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: StoreStateMachineCommitmentCall) -> Self { + Self::StoreStateMachineCommitment(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: TimestampCall) -> Self { + Self::Timestamp(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: UnStakingPeriodCall) -> Self { + Self::UnStakingPeriod(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: UniswapV2RouterCall) -> Self { + Self::UniswapV2Router(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: UpdateHostParamsCall) -> Self { + Self::UpdateHostParams(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: VetoesCall) -> Self { + Self::Vetoes(value) + } + } + impl ::core::convert::From for EvmHostCalls { + fn from(value: WithdrawCall) -> Self { + Self::Withdraw(value) + } + } + ///Container type for all return fields from the `admin` function with signature `admin()` and + /// selector `0xf851a440` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct AdminReturn(pub ::ethers::core::types::Address); + ///Container type for all return fields from the `chainId` function with signature `chainId()` + /// and selector `0x9a8a0592` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct ChainIdReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `challengePeriod` function with signature + /// `challengePeriod()` and selector `0xf3f480d9` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct ChallengePeriodReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `consensusClient` function with signature + /// `consensusClient()` and selector `0x2476132b` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct ConsensusClientReturn(pub ::ethers::core::types::Address); + ///Container type for all return fields from the `consensusState` function with signature + /// `consensusState()` and selector `0xbbad99d4` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct ConsensusStateReturn(pub ::ethers::core::types::Bytes); + ///Container type for all return fields from the `consensusUpdateTime` function with signature + /// `consensusUpdateTime()` and selector `0x9a8425bc` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct ConsensusUpdateTimeReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `dispatch` function with signature + /// `dispatch(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64,uint256,address))` and + /// selector `0x94480805` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct DispatchReturn { + pub commitment: [u8; 32], + } + ///Container type for all return fields from the `dispatch` function with signature + /// `dispatch((bytes,bytes,bytes,uint64,uint256,address))` and selector `0xb8f3e8f5` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct DispatchWithPostReturn { + pub commitment: [u8; 32], + } + ///Container type for all return fields from the `dispatch` function with signature + /// `dispatch((bytes,uint64,bytes[],uint64,uint256,bytes))` and selector `0xd22e3343` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct DispatchWithGetReturn { + pub commitment: [u8; 32], + } + ///Container type for all return fields from the `feeToken` function with signature + /// `feeToken()` and selector `0x647846a5` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct FeeTokenReturn(pub ::ethers::core::types::Address); + ///Container type for all return fields from the `frozen` function with signature `frozen()` + /// and selector `0x054f7d9c` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct FrozenReturn(pub u8); + ///Container type for all return fields from the `host` function with signature `host()` and + /// selector `0xf437bc59` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct HostReturn(pub ::ethers::core::types::Bytes); + ///Container type for all return fields from the `hostParams` function with signature + /// `hostParams()` and selector `0x2215364d` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct HostParamsReturn(pub HostParams); + ///Container type for all return fields from the `hyperbridge` function with signature + /// `hyperbridge()` and selector `0x005e763e` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct HyperbridgeReturn(pub ::ethers::core::types::Bytes); + ///Container type for all return fields from the `latestStateMachineHeight` function with + /// signature `latestStateMachineHeight(uint256)` and selector `0x9c095f86` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct LatestStateMachineHeightReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `nonce` function with signature `nonce()` and + /// selector `0xaffed0e0` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct NonceReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `perByteFee` function with signature + /// `perByteFee(bytes)` and selector `0x4011ec0a` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct PerByteFeeReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `requestCommitments` function with signature + /// `requestCommitments(bytes32)` and selector `0x368bf464` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct RequestCommitmentsReturn(pub FeeMetadata); + ///Container type for all return fields from the `requestReceipts` function with signature + /// `requestReceipts(bytes32)` and selector `0x19667a3e` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct RequestReceiptsReturn(pub ::ethers::core::types::Address); + ///Container type for all return fields from the `responded` function with signature + /// `responded(bytes32)` and selector `0x73bfa8ae` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct RespondedReturn(pub bool); + ///Container type for all return fields from the `responseCommitments` function with signature + /// `responseCommitments(bytes32)` and selector `0x2211f1dd` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct ResponseCommitmentsReturn(pub FeeMetadata); + ///Container type for all return fields from the `responseReceipts` function with signature + /// `responseReceipts(bytes32)` and selector `0x8856337e` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct ResponseReceiptsReturn(pub ResponseReceipt); + ///Container type for all return fields from the `stateCommitmentFee` function with signature + /// `stateCommitmentFee()` and selector `0xb5c8a08e` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct StateCommitmentFeeReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `stateMachineCommitment` function with + /// signature `stateMachineCommitment((uint256,uint256))` and selector `0xa70a8c47` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct StateMachineCommitmentReturn(pub StateCommitment); + ///Container type for all return fields from the `stateMachineCommitmentUpdateTime` function + /// with signature `stateMachineCommitmentUpdateTime((uint256,uint256))` and selector + /// `0x1a880a93` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct StateMachineCommitmentUpdateTimeReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `stateMachineId` function with signature + /// `stateMachineId(bytes,uint256)` and selector `0x7a1bd7c1` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct StateMachineIdReturn(pub ::std::string::String); + ///Container type for all return fields from the `timestamp` function with signature + /// `timestamp()` and selector `0xb80777ea` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct TimestampReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `unStakingPeriod` function with signature + /// `unStakingPeriod()` and selector `0xd40784c7` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct UnStakingPeriodReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `uniswapV2Router` function with signature + /// `uniswapV2Router()` and selector `0x1694505e` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct UniswapV2RouterReturn(pub ::ethers::core::types::Address); + ///Container type for all return fields from the `vetoes` function with signature + /// `vetoes(uint256,uint256)` and selector `0x5218d908` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct VetoesReturn(pub ::ethers::core::types::Address); + ///`DispatchGet(bytes,uint64,bytes[],uint64,uint256,bytes)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct DispatchGet { + pub dest: ::ethers::core::types::Bytes, + pub height: u64, + pub keys: ::std::vec::Vec<::ethers::core::types::Bytes>, + pub timeout: u64, + pub fee: ::ethers::core::types::U256, + pub context: ::ethers::core::types::Bytes, + } + ///`FeeMetadata(uint256,address)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct FeeMetadata { + pub fee: ::ethers::core::types::U256, + pub sender: ::ethers::core::types::Address, + } + ///`HostParams(uint256,uint256,uint256,address,address,address,address,address,uint256,uint256, + /// address,uint256[],(bytes32,uint256)[],bytes)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct HostParams { + pub default_timeout: ::ethers::core::types::U256, + pub default_per_byte_fee: ::ethers::core::types::U256, + pub state_commitment_fee: ::ethers::core::types::U256, + pub fee_token: ::ethers::core::types::Address, + pub admin: ::ethers::core::types::Address, + pub handler: ::ethers::core::types::Address, + pub host_manager: ::ethers::core::types::Address, + pub uniswap_v2: ::ethers::core::types::Address, + pub un_staking_period: ::ethers::core::types::U256, + pub challenge_period: ::ethers::core::types::U256, + pub consensus_client: ::ethers::core::types::Address, + pub state_machines: ::std::vec::Vec<::ethers::core::types::U256>, + pub per_byte_fees: ::std::vec::Vec, + pub hyperbridge: ::ethers::core::types::Bytes, + } + ///`PerByteFee(bytes32,uint256)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct PerByteFee { + pub state_id_hash: [u8; 32], + pub per_byte_fee: ::ethers::core::types::U256, + } + ///`ResponseReceipt(bytes32,address)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct ResponseReceipt { + pub response_commitment: [u8; 32], + pub relayer: ::ethers::core::types::Address, + } + ///`WithdrawParams(address,uint256,bool)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct WithdrawParams { + pub beneficiary: ::ethers::core::types::Address, + pub amount: ::ethers::core::types::U256, + pub native: bool, + } } diff --git a/evm/abi/src/generated/handler.rs b/evm/abi/src/generated/handler.rs index a29edf5e4..32cfe0d66 100644 --- a/evm/abi/src/generated/handler.rs +++ b/evm/abi/src/generated/handler.rs @@ -2,18 +2,18 @@ pub use handler::*; /// This module was auto-generated with ethers-rs Abigen. /// More information at: #[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, + clippy::enum_variant_names, + clippy::too_many_arguments, + clippy::upper_case_acronyms, + clippy::type_complexity, + dead_code, + non_camel_case_types )] pub mod handler { - pub use super::super::shared_types::*; - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { + pub use super::super::shared_types::*; + #[allow(deprecated)] + fn __abi() -> ::ethers::core::abi::Abi { + ::ethers::core::abi::ethabi::Contract { constructor: ::core::option::Option::None, functions: ::core::convert::From::from([ ( @@ -601,975 +601,931 @@ pub mod handler { receive: false, fallback: false, } - } - ///The parsed JSON ABI of the contract. - pub static HANDLER_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - pub struct Handler(::ethers::contract::Contract); - impl ::core::clone::Clone for Handler { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for Handler { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for Handler { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for Handler { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(Handler)).field(&self.address()).finish() - } - } - impl Handler { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - HANDLER_ABI.clone(), - client, - ), - ) - } - ///Calls the contract's `handleConsensus` (0xbb1689be) function - pub fn handle_consensus( - &self, - host: ::ethers::core::types::Address, - proof: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([187, 22, 137, 190], (host, proof)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `handleGetRequestTimeouts` (0x191c872b) function - pub fn handle_get_request_timeouts( - &self, - host: ::ethers::core::types::Address, - message: GetTimeoutMessage, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([25, 28, 135, 43], (host, message)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `handleGetResponses` (0xc96bdc16) function - pub fn handle_get_responses( - &self, - host: ::ethers::core::types::Address, - message: GetResponseMessage, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([201, 107, 220, 22], (host, message)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `handlePostRequestTimeouts` (0x089b174c) function - pub fn handle_post_request_timeouts( - &self, - host: ::ethers::core::types::Address, - message: PostRequestTimeoutMessage, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([8, 155, 23, 76], (host, message)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `handlePostRequests` (0x9d38eb35) function - pub fn handle_post_requests( - &self, - host: ::ethers::core::types::Address, - request: PostRequestMessage, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([157, 56, 235, 53], (host, request)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `handlePostResponseTimeouts` (0xe407f86b) function - pub fn handle_post_response_timeouts( - &self, - host: ::ethers::core::types::Address, - message: PostResponseTimeoutMessage, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([228, 7, 248, 107], (host, message)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `handlePostResponses` (0x72becccd) function - pub fn handle_post_responses( - &self, - host: ::ethers::core::types::Address, - response: PostResponseMessage, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([114, 190, 204, 205], (host, response)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `supportsInterface` (0x01ffc9a7) function - pub fn supports_interface( - &self, - interface_id: [u8; 4], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([1, 255, 201, 167], interface_id) - .expect("method not found (this should never happen)") - } - } - impl From<::ethers::contract::Contract> - for Handler { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - ///Custom Error type `ChallengePeriodNotElapsed` with signature `ChallengePeriodNotElapsed()` and selector `0x048c9699` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "ChallengePeriodNotElapsed", abi = "ChallengePeriodNotElapsed()")] - pub struct ChallengePeriodNotElapsed; - ///Custom Error type `ConsensusClientExpired` with signature `ConsensusClientExpired()` and selector `0x40dc5c30` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "ConsensusClientExpired", abi = "ConsensusClientExpired()")] - pub struct ConsensusClientExpired; - ///Custom Error type `DuplicateMessage` with signature `DuplicateMessage()` and selector `0x2ad4ae2e` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "DuplicateMessage", abi = "DuplicateMessage()")] - pub struct DuplicateMessage; - ///Custom Error type `HostFrozen` with signature `HostFrozen()` and selector `0xe36afbb8` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "HostFrozen", abi = "HostFrozen()")] - pub struct HostFrozen; - ///Custom Error type `InvalidMessageDestination` with signature `InvalidMessageDestination()` and selector `0x90d4c209` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "InvalidMessageDestination", abi = "InvalidMessageDestination()")] - pub struct InvalidMessageDestination; - ///Custom Error type `InvalidProof` with signature `InvalidProof()` and selector `0x09bde339` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "InvalidProof", abi = "InvalidProof()")] - pub struct InvalidProof; - ///Custom Error type `MessageNotTimedOut` with signature `MessageNotTimedOut()` and selector `0x91d1ba5e` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "MessageNotTimedOut", abi = "MessageNotTimedOut()")] - pub struct MessageNotTimedOut; - ///Custom Error type `MessageTimedOut` with signature `MessageTimedOut()` and selector `0x1676f4b3` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "MessageTimedOut", abi = "MessageTimedOut()")] - pub struct MessageTimedOut; - ///Custom Error type `StateCommitmentNotFound` with signature `StateCommitmentNotFound()` and selector `0xa75caa56` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "StateCommitmentNotFound", abi = "StateCommitmentNotFound()")] - pub struct StateCommitmentNotFound; - ///Custom Error type `UnknownMessage` with signature `UnknownMessage()` and selector `0xf058bfd9` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "UnknownMessage", abi = "UnknownMessage()")] - pub struct UnknownMessage; - ///Container type for all of the contract's custom errors - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum HandlerErrors { - ChallengePeriodNotElapsed(ChallengePeriodNotElapsed), - ConsensusClientExpired(ConsensusClientExpired), - DuplicateMessage(DuplicateMessage), - HostFrozen(HostFrozen), - InvalidMessageDestination(InvalidMessageDestination), - InvalidProof(InvalidProof), - MessageNotTimedOut(MessageNotTimedOut), - MessageTimedOut(MessageTimedOut), - StateCommitmentNotFound(StateCommitmentNotFound), - UnknownMessage(UnknownMessage), - /// The standard solidity revert string, with selector - /// Error(string) -- 0x08c379a0 - RevertString(::std::string::String), - } - impl ::ethers::core::abi::AbiDecode for HandlerErrors { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = <::std::string::String as ::ethers::core::abi::AbiDecode>::decode( - data, - ) { - return Ok(Self::RevertString(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::ChallengePeriodNotElapsed(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::ConsensusClientExpired(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::DuplicateMessage(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::HostFrozen(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::InvalidMessageDestination(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::InvalidProof(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::MessageNotTimedOut(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::MessageTimedOut(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::StateCommitmentNotFound(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::UnknownMessage(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for HandlerErrors { - fn encode(self) -> ::std::vec::Vec { - match self { - Self::ChallengePeriodNotElapsed(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::ConsensusClientExpired(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::DuplicateMessage(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::HostFrozen(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::InvalidMessageDestination(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::InvalidProof(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::MessageNotTimedOut(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::MessageTimedOut(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::StateCommitmentNotFound(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::UnknownMessage(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s), - } - } - } - impl ::ethers::contract::ContractRevert for HandlerErrors { - fn valid_selector(selector: [u8; 4]) -> bool { - match selector { - [0x08, 0xc3, 0x79, 0xa0] => true, - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => true, - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => true, - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ => false, - } - } - } - impl ::core::fmt::Display for HandlerErrors { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ChallengePeriodNotElapsed(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::ConsensusClientExpired(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::DuplicateMessage(element) => ::core::fmt::Display::fmt(element, f), - Self::HostFrozen(element) => ::core::fmt::Display::fmt(element, f), - Self::InvalidMessageDestination(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::InvalidProof(element) => ::core::fmt::Display::fmt(element, f), - Self::MessageNotTimedOut(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::MessageTimedOut(element) => ::core::fmt::Display::fmt(element, f), - Self::StateCommitmentNotFound(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::UnknownMessage(element) => ::core::fmt::Display::fmt(element, f), - Self::RevertString(s) => ::core::fmt::Display::fmt(s, f), - } - } - } - impl ::core::convert::From<::std::string::String> for HandlerErrors { - fn from(value: String) -> Self { - Self::RevertString(value) - } - } - impl ::core::convert::From for HandlerErrors { - fn from(value: ChallengePeriodNotElapsed) -> Self { - Self::ChallengePeriodNotElapsed(value) - } - } - impl ::core::convert::From for HandlerErrors { - fn from(value: ConsensusClientExpired) -> Self { - Self::ConsensusClientExpired(value) - } - } - impl ::core::convert::From for HandlerErrors { - fn from(value: DuplicateMessage) -> Self { - Self::DuplicateMessage(value) - } - } - impl ::core::convert::From for HandlerErrors { - fn from(value: HostFrozen) -> Self { - Self::HostFrozen(value) - } - } - impl ::core::convert::From for HandlerErrors { - fn from(value: InvalidMessageDestination) -> Self { - Self::InvalidMessageDestination(value) - } - } - impl ::core::convert::From for HandlerErrors { - fn from(value: InvalidProof) -> Self { - Self::InvalidProof(value) - } - } - impl ::core::convert::From for HandlerErrors { - fn from(value: MessageNotTimedOut) -> Self { - Self::MessageNotTimedOut(value) - } - } - impl ::core::convert::From for HandlerErrors { - fn from(value: MessageTimedOut) -> Self { - Self::MessageTimedOut(value) - } - } - impl ::core::convert::From for HandlerErrors { - fn from(value: StateCommitmentNotFound) -> Self { - Self::StateCommitmentNotFound(value) - } - } - impl ::core::convert::From for HandlerErrors { - fn from(value: UnknownMessage) -> Self { - Self::UnknownMessage(value) - } - } - ///Container type for all input parameters for the `handleConsensus` function with signature `handleConsensus(address,bytes)` and selector `0xbb1689be` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "handleConsensus", abi = "handleConsensus(address,bytes)")] - pub struct HandleConsensusCall { - pub host: ::ethers::core::types::Address, - pub proof: ::ethers::core::types::Bytes, - } - ///Container type for all input parameters for the `handleGetRequestTimeouts` function with signature `handleGetRequestTimeouts(address,((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes)[],(uint256,uint256),bytes[]))` and selector `0x191c872b` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "handleGetRequestTimeouts", - abi = "handleGetRequestTimeouts(address,((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes)[],(uint256,uint256),bytes[]))" - )] - pub struct HandleGetRequestTimeoutsCall { - pub host: ::ethers::core::types::Address, - pub message: GetTimeoutMessage, - } - ///Container type for all input parameters for the `handleGetResponses` function with signature `handleGetResponses(address,(((uint256,uint256),bytes32[],uint256),(((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]),uint256,uint256)[]))` and selector `0xc96bdc16` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "handleGetResponses", - abi = "handleGetResponses(address,(((uint256,uint256),bytes32[],uint256),(((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]),uint256,uint256)[]))" - )] - pub struct HandleGetResponsesCall { - pub host: ::ethers::core::types::Address, - pub message: GetResponseMessage, - } - ///Container type for all input parameters for the `handlePostRequestTimeouts` function with signature `handlePostRequestTimeouts(address,((bytes,bytes,uint64,bytes,bytes,uint64,bytes)[],(uint256,uint256),bytes[]))` and selector `0x089b174c` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "handlePostRequestTimeouts", - abi = "handlePostRequestTimeouts(address,((bytes,bytes,uint64,bytes,bytes,uint64,bytes)[],(uint256,uint256),bytes[]))" - )] - pub struct HandlePostRequestTimeoutsCall { - pub host: ::ethers::core::types::Address, - pub message: PostRequestTimeoutMessage, - } - ///Container type for all input parameters for the `handlePostRequests` function with signature `handlePostRequests(address,(((uint256,uint256),bytes32[],uint256),((bytes,bytes,uint64,bytes,bytes,uint64,bytes),uint256,uint256)[]))` and selector `0x9d38eb35` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "handlePostRequests", - abi = "handlePostRequests(address,(((uint256,uint256),bytes32[],uint256),((bytes,bytes,uint64,bytes,bytes,uint64,bytes),uint256,uint256)[]))" - )] - pub struct HandlePostRequestsCall { - pub host: ::ethers::core::types::Address, - pub request: PostRequestMessage, - } - ///Container type for all input parameters for the `handlePostResponseTimeouts` function with signature `handlePostResponseTimeouts(address,(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64)[],(uint256,uint256),bytes[]))` and selector `0xe407f86b` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "handlePostResponseTimeouts", - abi = "handlePostResponseTimeouts(address,(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64)[],(uint256,uint256),bytes[]))" - )] - pub struct HandlePostResponseTimeoutsCall { - pub host: ::ethers::core::types::Address, - pub message: PostResponseTimeoutMessage, - } - ///Container type for all input parameters for the `handlePostResponses` function with signature `handlePostResponses(address,(((uint256,uint256),bytes32[],uint256),(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),uint256,uint256)[]))` and selector `0x72becccd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "handlePostResponses", - abi = "handlePostResponses(address,(((uint256,uint256),bytes32[],uint256),(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),uint256,uint256)[]))" - )] - pub struct HandlePostResponsesCall { - pub host: ::ethers::core::types::Address, - pub response: PostResponseMessage, - } - ///Container type for all input parameters for the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")] - pub struct SupportsInterfaceCall { - pub interface_id: [u8; 4], - } - ///Container type for all of the contract's call - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum HandlerCalls { - HandleConsensus(HandleConsensusCall), - HandleGetRequestTimeouts(HandleGetRequestTimeoutsCall), - HandleGetResponses(HandleGetResponsesCall), - HandlePostRequestTimeouts(HandlePostRequestTimeoutsCall), - HandlePostRequests(HandlePostRequestsCall), - HandlePostResponseTimeouts(HandlePostResponseTimeoutsCall), - HandlePostResponses(HandlePostResponsesCall), - SupportsInterface(SupportsInterfaceCall), - } - impl ::ethers::core::abi::AbiDecode for HandlerCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::HandleConsensus(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::HandleGetRequestTimeouts(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::HandleGetResponses(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::HandlePostRequestTimeouts(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::HandlePostRequests(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::HandlePostResponseTimeouts(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::HandlePostResponses(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SupportsInterface(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for HandlerCalls { - fn encode(self) -> Vec { - match self { - Self::HandleConsensus(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::HandleGetRequestTimeouts(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::HandleGetResponses(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::HandlePostRequestTimeouts(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::HandlePostRequests(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::HandlePostResponseTimeouts(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::HandlePostResponses(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SupportsInterface(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for HandlerCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::HandleConsensus(element) => ::core::fmt::Display::fmt(element, f), - Self::HandleGetRequestTimeouts(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::HandleGetResponses(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::HandlePostRequestTimeouts(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::HandlePostRequests(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::HandlePostResponseTimeouts(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::HandlePostResponses(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for HandlerCalls { - fn from(value: HandleConsensusCall) -> Self { - Self::HandleConsensus(value) - } - } - impl ::core::convert::From for HandlerCalls { - fn from(value: HandleGetRequestTimeoutsCall) -> Self { - Self::HandleGetRequestTimeouts(value) - } - } - impl ::core::convert::From for HandlerCalls { - fn from(value: HandleGetResponsesCall) -> Self { - Self::HandleGetResponses(value) - } - } - impl ::core::convert::From for HandlerCalls { - fn from(value: HandlePostRequestTimeoutsCall) -> Self { - Self::HandlePostRequestTimeouts(value) - } - } - impl ::core::convert::From for HandlerCalls { - fn from(value: HandlePostRequestsCall) -> Self { - Self::HandlePostRequests(value) - } - } - impl ::core::convert::From for HandlerCalls { - fn from(value: HandlePostResponseTimeoutsCall) -> Self { - Self::HandlePostResponseTimeouts(value) - } - } - impl ::core::convert::From for HandlerCalls { - fn from(value: HandlePostResponsesCall) -> Self { - Self::HandlePostResponses(value) - } - } - impl ::core::convert::From for HandlerCalls { - fn from(value: SupportsInterfaceCall) -> Self { - Self::SupportsInterface(value) - } - } - ///Container type for all return fields from the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SupportsInterfaceReturn(pub bool); - ///`GetResponseLeaf(((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]),uint256,uint256)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetResponseLeaf { - pub response: GetResponse, - pub index: ::ethers::core::types::U256, - pub k_index: ::ethers::core::types::U256, - } - ///`GetResponseMessage(((uint256,uint256),bytes32[],uint256),(((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]),uint256,uint256)[])` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetResponseMessage { - pub proof: Proof, - pub responses: ::std::vec::Vec, - } - ///`GetTimeoutMessage((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes)[],(uint256,uint256),bytes[])` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetTimeoutMessage { - pub timeouts: ::std::vec::Vec, - pub height: StateMachineHeight, - pub proof: ::std::vec::Vec<::ethers::core::types::Bytes>, - } - ///`PostRequestLeaf((bytes,bytes,uint64,bytes,bytes,uint64,bytes),uint256,uint256)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct PostRequestLeaf { - pub request: PostRequest, - pub index: ::ethers::core::types::U256, - pub k_index: ::ethers::core::types::U256, - } - ///`PostRequestMessage(((uint256,uint256),bytes32[],uint256),((bytes,bytes,uint64,bytes,bytes,uint64,bytes),uint256,uint256)[])` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct PostRequestMessage { - pub proof: Proof, - pub requests: ::std::vec::Vec, - } - ///`PostRequestTimeoutMessage((bytes,bytes,uint64,bytes,bytes,uint64,bytes)[],(uint256,uint256),bytes[])` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct PostRequestTimeoutMessage { - pub timeouts: ::std::vec::Vec, - pub height: StateMachineHeight, - pub proof: ::std::vec::Vec<::ethers::core::types::Bytes>, - } - ///`PostResponseLeaf(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),uint256,uint256)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct PostResponseLeaf { - pub response: PostResponse, - pub index: ::ethers::core::types::U256, - pub k_index: ::ethers::core::types::U256, - } - ///`PostResponseMessage(((uint256,uint256),bytes32[],uint256),(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),uint256,uint256)[])` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct PostResponseMessage { - pub proof: Proof, - pub responses: ::std::vec::Vec, - } - ///`PostResponseTimeoutMessage(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64)[],(uint256,uint256),bytes[])` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct PostResponseTimeoutMessage { - pub timeouts: ::std::vec::Vec, - pub height: StateMachineHeight, - pub proof: ::std::vec::Vec<::ethers::core::types::Bytes>, - } - ///`Proof((uint256,uint256),bytes32[],uint256)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct Proof { - pub height: StateMachineHeight, - pub multiproof: ::std::vec::Vec<[u8; 32]>, - pub leaf_count: ::ethers::core::types::U256, - } + } + ///The parsed JSON ABI of the contract. + pub static HANDLER_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = + ::ethers::contract::Lazy::new(__abi); + pub struct Handler(::ethers::contract::Contract); + impl ::core::clone::Clone for Handler { + fn clone(&self) -> Self { + Self(::core::clone::Clone::clone(&self.0)) + } + } + impl ::core::ops::Deref for Handler { + type Target = ::ethers::contract::Contract; + fn deref(&self) -> &Self::Target { + &self.0 + } + } + impl ::core::ops::DerefMut for Handler { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } + } + impl ::core::fmt::Debug for Handler { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple(::core::stringify!(Handler)).field(&self.address()).finish() + } + } + impl Handler { + /// Creates a new contract instance with the specified `ethers` client at + /// `address`. The contract derefs to a `ethers::Contract` object. + pub fn new>( + address: T, + client: ::std::sync::Arc, + ) -> Self { + Self(::ethers::contract::Contract::new(address.into(), HANDLER_ABI.clone(), client)) + } + ///Calls the contract's `handleConsensus` (0xbb1689be) function + pub fn handle_consensus( + &self, + host: ::ethers::core::types::Address, + proof: ::ethers::core::types::Bytes, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([187, 22, 137, 190], (host, proof)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `handleGetRequestTimeouts` (0x191c872b) function + pub fn handle_get_request_timeouts( + &self, + host: ::ethers::core::types::Address, + message: GetTimeoutMessage, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([25, 28, 135, 43], (host, message)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `handleGetResponses` (0xc96bdc16) function + pub fn handle_get_responses( + &self, + host: ::ethers::core::types::Address, + message: GetResponseMessage, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([201, 107, 220, 22], (host, message)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `handlePostRequestTimeouts` (0x089b174c) function + pub fn handle_post_request_timeouts( + &self, + host: ::ethers::core::types::Address, + message: PostRequestTimeoutMessage, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([8, 155, 23, 76], (host, message)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `handlePostRequests` (0x9d38eb35) function + pub fn handle_post_requests( + &self, + host: ::ethers::core::types::Address, + request: PostRequestMessage, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([157, 56, 235, 53], (host, request)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `handlePostResponseTimeouts` (0xe407f86b) function + pub fn handle_post_response_timeouts( + &self, + host: ::ethers::core::types::Address, + message: PostResponseTimeoutMessage, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([228, 7, 248, 107], (host, message)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `handlePostResponses` (0x72becccd) function + pub fn handle_post_responses( + &self, + host: ::ethers::core::types::Address, + response: PostResponseMessage, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([114, 190, 204, 205], (host, response)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `supportsInterface` (0x01ffc9a7) function + pub fn supports_interface( + &self, + interface_id: [u8; 4], + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([1, 255, 201, 167], interface_id) + .expect("method not found (this should never happen)") + } + } + impl From<::ethers::contract::Contract> for Handler { + fn from(contract: ::ethers::contract::Contract) -> Self { + Self::new(contract.address(), contract.client()) + } + } + ///Custom Error type `ChallengePeriodNotElapsed` with signature `ChallengePeriodNotElapsed()` + /// and selector `0x048c9699` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "ChallengePeriodNotElapsed", abi = "ChallengePeriodNotElapsed()")] + pub struct ChallengePeriodNotElapsed; + ///Custom Error type `ConsensusClientExpired` with signature `ConsensusClientExpired()` and + /// selector `0x40dc5c30` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "ConsensusClientExpired", abi = "ConsensusClientExpired()")] + pub struct ConsensusClientExpired; + ///Custom Error type `DuplicateMessage` with signature `DuplicateMessage()` and selector + /// `0x2ad4ae2e` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "DuplicateMessage", abi = "DuplicateMessage()")] + pub struct DuplicateMessage; + ///Custom Error type `HostFrozen` with signature `HostFrozen()` and selector `0xe36afbb8` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "HostFrozen", abi = "HostFrozen()")] + pub struct HostFrozen; + ///Custom Error type `InvalidMessageDestination` with signature `InvalidMessageDestination()` + /// and selector `0x90d4c209` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "InvalidMessageDestination", abi = "InvalidMessageDestination()")] + pub struct InvalidMessageDestination; + ///Custom Error type `InvalidProof` with signature `InvalidProof()` and selector `0x09bde339` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "InvalidProof", abi = "InvalidProof()")] + pub struct InvalidProof; + ///Custom Error type `MessageNotTimedOut` with signature `MessageNotTimedOut()` and selector + /// `0x91d1ba5e` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "MessageNotTimedOut", abi = "MessageNotTimedOut()")] + pub struct MessageNotTimedOut; + ///Custom Error type `MessageTimedOut` with signature `MessageTimedOut()` and selector + /// `0x1676f4b3` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "MessageTimedOut", abi = "MessageTimedOut()")] + pub struct MessageTimedOut; + ///Custom Error type `StateCommitmentNotFound` with signature `StateCommitmentNotFound()` and + /// selector `0xa75caa56` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "StateCommitmentNotFound", abi = "StateCommitmentNotFound()")] + pub struct StateCommitmentNotFound; + ///Custom Error type `UnknownMessage` with signature `UnknownMessage()` and selector + /// `0xf058bfd9` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "UnknownMessage", abi = "UnknownMessage()")] + pub struct UnknownMessage; + ///Container type for all of the contract's custom errors + #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] + pub enum HandlerErrors { + ChallengePeriodNotElapsed(ChallengePeriodNotElapsed), + ConsensusClientExpired(ConsensusClientExpired), + DuplicateMessage(DuplicateMessage), + HostFrozen(HostFrozen), + InvalidMessageDestination(InvalidMessageDestination), + InvalidProof(InvalidProof), + MessageNotTimedOut(MessageNotTimedOut), + MessageTimedOut(MessageTimedOut), + StateCommitmentNotFound(StateCommitmentNotFound), + UnknownMessage(UnknownMessage), + /// The standard solidity revert string, with selector + /// Error(string) -- 0x08c379a0 + RevertString(::std::string::String), + } + impl ::ethers::core::abi::AbiDecode for HandlerErrors { + fn decode( + data: impl AsRef<[u8]>, + ) -> ::core::result::Result { + let data = data.as_ref(); + if let Ok(decoded) = + <::std::string::String as ::ethers::core::abi::AbiDecode>::decode(data) + { + return Ok(Self::RevertString(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::ChallengePeriodNotElapsed(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::ConsensusClientExpired(decoded)); + } + if let Ok(decoded) = ::decode(data) + { + return Ok(Self::DuplicateMessage(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::HostFrozen(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::InvalidMessageDestination(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::InvalidProof(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::MessageNotTimedOut(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::MessageTimedOut(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::StateCommitmentNotFound(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::UnknownMessage(decoded)); + } + Err(::ethers::core::abi::Error::InvalidData.into()) + } + } + impl ::ethers::core::abi::AbiEncode for HandlerErrors { + fn encode(self) -> ::std::vec::Vec { + match self { + Self::ChallengePeriodNotElapsed(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::ConsensusClientExpired(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::DuplicateMessage(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::HostFrozen(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::InvalidMessageDestination(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::InvalidProof(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::MessageNotTimedOut(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::MessageTimedOut(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::StateCommitmentNotFound(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::UnknownMessage(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s), + } + } + } + impl ::ethers::contract::ContractRevert for HandlerErrors { + fn valid_selector(selector: [u8; 4]) -> bool { + match selector { + [0x08, 0xc3, 0x79, 0xa0] => true, + _ if selector == + ::selector() => + true, + _ if selector == + ::selector() => + true, + _ if selector == ::selector() => + true, + _ if selector == ::selector() => true, + _ if selector == + ::selector() => + true, + _ if selector == ::selector() => true, + _ if selector == + ::selector() => + true, + _ if selector == ::selector() => + true, + _ if selector == + ::selector() => + true, + _ if selector == ::selector() => + true, + _ => false, + } + } + } + impl ::core::fmt::Display for HandlerErrors { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + match self { + Self::ChallengePeriodNotElapsed(element) => ::core::fmt::Display::fmt(element, f), + Self::ConsensusClientExpired(element) => ::core::fmt::Display::fmt(element, f), + Self::DuplicateMessage(element) => ::core::fmt::Display::fmt(element, f), + Self::HostFrozen(element) => ::core::fmt::Display::fmt(element, f), + Self::InvalidMessageDestination(element) => ::core::fmt::Display::fmt(element, f), + Self::InvalidProof(element) => ::core::fmt::Display::fmt(element, f), + Self::MessageNotTimedOut(element) => ::core::fmt::Display::fmt(element, f), + Self::MessageTimedOut(element) => ::core::fmt::Display::fmt(element, f), + Self::StateCommitmentNotFound(element) => ::core::fmt::Display::fmt(element, f), + Self::UnknownMessage(element) => ::core::fmt::Display::fmt(element, f), + Self::RevertString(s) => ::core::fmt::Display::fmt(s, f), + } + } + } + impl ::core::convert::From<::std::string::String> for HandlerErrors { + fn from(value: String) -> Self { + Self::RevertString(value) + } + } + impl ::core::convert::From for HandlerErrors { + fn from(value: ChallengePeriodNotElapsed) -> Self { + Self::ChallengePeriodNotElapsed(value) + } + } + impl ::core::convert::From for HandlerErrors { + fn from(value: ConsensusClientExpired) -> Self { + Self::ConsensusClientExpired(value) + } + } + impl ::core::convert::From for HandlerErrors { + fn from(value: DuplicateMessage) -> Self { + Self::DuplicateMessage(value) + } + } + impl ::core::convert::From for HandlerErrors { + fn from(value: HostFrozen) -> Self { + Self::HostFrozen(value) + } + } + impl ::core::convert::From for HandlerErrors { + fn from(value: InvalidMessageDestination) -> Self { + Self::InvalidMessageDestination(value) + } + } + impl ::core::convert::From for HandlerErrors { + fn from(value: InvalidProof) -> Self { + Self::InvalidProof(value) + } + } + impl ::core::convert::From for HandlerErrors { + fn from(value: MessageNotTimedOut) -> Self { + Self::MessageNotTimedOut(value) + } + } + impl ::core::convert::From for HandlerErrors { + fn from(value: MessageTimedOut) -> Self { + Self::MessageTimedOut(value) + } + } + impl ::core::convert::From for HandlerErrors { + fn from(value: StateCommitmentNotFound) -> Self { + Self::StateCommitmentNotFound(value) + } + } + impl ::core::convert::From for HandlerErrors { + fn from(value: UnknownMessage) -> Self { + Self::UnknownMessage(value) + } + } + ///Container type for all input parameters for the `handleConsensus` function with signature + /// `handleConsensus(address,bytes)` and selector `0xbb1689be` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "handleConsensus", abi = "handleConsensus(address,bytes)")] + pub struct HandleConsensusCall { + pub host: ::ethers::core::types::Address, + pub proof: ::ethers::core::types::Bytes, + } + ///Container type for all input parameters for the `handleGetRequestTimeouts` function with + /// signature `handleGetRequestTimeouts(address,((bytes,bytes,uint64,address,uint64,bytes[], + /// uint64,bytes)[],(uint256,uint256),bytes[]))` and selector `0x191c872b` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "handleGetRequestTimeouts", + abi = "handleGetRequestTimeouts(address,((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes)[],(uint256,uint256),bytes[]))" + )] + pub struct HandleGetRequestTimeoutsCall { + pub host: ::ethers::core::types::Address, + pub message: GetTimeoutMessage, + } + ///Container type for all input parameters for the `handleGetResponses` function with signature + /// `handleGetResponses(address,(((uint256,uint256),bytes32[],uint256),(((bytes,bytes,uint64, + /// address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]),uint256,uint256)[]))` and selector + /// `0xc96bdc16` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "handleGetResponses", + abi = "handleGetResponses(address,(((uint256,uint256),bytes32[],uint256),(((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]),uint256,uint256)[]))" + )] + pub struct HandleGetResponsesCall { + pub host: ::ethers::core::types::Address, + pub message: GetResponseMessage, + } + ///Container type for all input parameters for the `handlePostRequestTimeouts` function with + /// signature `handlePostRequestTimeouts(address,((bytes,bytes,uint64,bytes,bytes,uint64, + /// bytes)[],(uint256,uint256),bytes[]))` and selector `0x089b174c` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "handlePostRequestTimeouts", + abi = "handlePostRequestTimeouts(address,((bytes,bytes,uint64,bytes,bytes,uint64,bytes)[],(uint256,uint256),bytes[]))" + )] + pub struct HandlePostRequestTimeoutsCall { + pub host: ::ethers::core::types::Address, + pub message: PostRequestTimeoutMessage, + } + ///Container type for all input parameters for the `handlePostRequests` function with signature + /// `handlePostRequests(address,(((uint256,uint256),bytes32[],uint256),((bytes,bytes,uint64, + /// bytes,bytes,uint64,bytes),uint256,uint256)[]))` and selector `0x9d38eb35` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "handlePostRequests", + abi = "handlePostRequests(address,(((uint256,uint256),bytes32[],uint256),((bytes,bytes,uint64,bytes,bytes,uint64,bytes),uint256,uint256)[]))" + )] + pub struct HandlePostRequestsCall { + pub host: ::ethers::core::types::Address, + pub request: PostRequestMessage, + } + ///Container type for all input parameters for the `handlePostResponseTimeouts` function with + /// signature `handlePostResponseTimeouts(address,(((bytes,bytes,uint64,bytes,bytes,uint64, + /// bytes),bytes,uint64)[],(uint256,uint256),bytes[]))` and selector `0xe407f86b` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "handlePostResponseTimeouts", + abi = "handlePostResponseTimeouts(address,(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64)[],(uint256,uint256),bytes[]))" + )] + pub struct HandlePostResponseTimeoutsCall { + pub host: ::ethers::core::types::Address, + pub message: PostResponseTimeoutMessage, + } + ///Container type for all input parameters for the `handlePostResponses` function with + /// signature `handlePostResponses(address,(((uint256,uint256),bytes32[],uint256),(((bytes, + /// bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),uint256,uint256)[]))` and selector + /// `0x72becccd` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "handlePostResponses", + abi = "handlePostResponses(address,(((uint256,uint256),bytes32[],uint256),(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),uint256,uint256)[]))" + )] + pub struct HandlePostResponsesCall { + pub host: ::ethers::core::types::Address, + pub response: PostResponseMessage, + } + ///Container type for all input parameters for the `supportsInterface` function with signature + /// `supportsInterface(bytes4)` and selector `0x01ffc9a7` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")] + pub struct SupportsInterfaceCall { + pub interface_id: [u8; 4], + } + ///Container type for all of the contract's call + #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] + pub enum HandlerCalls { + HandleConsensus(HandleConsensusCall), + HandleGetRequestTimeouts(HandleGetRequestTimeoutsCall), + HandleGetResponses(HandleGetResponsesCall), + HandlePostRequestTimeouts(HandlePostRequestTimeoutsCall), + HandlePostRequests(HandlePostRequestsCall), + HandlePostResponseTimeouts(HandlePostResponseTimeoutsCall), + HandlePostResponses(HandlePostResponsesCall), + SupportsInterface(SupportsInterfaceCall), + } + impl ::ethers::core::abi::AbiDecode for HandlerCalls { + fn decode( + data: impl AsRef<[u8]>, + ) -> ::core::result::Result { + let data = data.as_ref(); + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::HandleConsensus(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::HandleGetRequestTimeouts(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::HandleGetResponses(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::HandlePostRequestTimeouts(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::HandlePostRequests(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::HandlePostResponseTimeouts(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::HandlePostResponses(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::SupportsInterface(decoded)); + } + Err(::ethers::core::abi::Error::InvalidData.into()) + } + } + impl ::ethers::core::abi::AbiEncode for HandlerCalls { + fn encode(self) -> Vec { + match self { + Self::HandleConsensus(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::HandleGetRequestTimeouts(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::HandleGetResponses(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::HandlePostRequestTimeouts(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::HandlePostRequests(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::HandlePostResponseTimeouts(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::HandlePostResponses(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::SupportsInterface(element) => ::ethers::core::abi::AbiEncode::encode(element), + } + } + } + impl ::core::fmt::Display for HandlerCalls { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + match self { + Self::HandleConsensus(element) => ::core::fmt::Display::fmt(element, f), + Self::HandleGetRequestTimeouts(element) => ::core::fmt::Display::fmt(element, f), + Self::HandleGetResponses(element) => ::core::fmt::Display::fmt(element, f), + Self::HandlePostRequestTimeouts(element) => ::core::fmt::Display::fmt(element, f), + Self::HandlePostRequests(element) => ::core::fmt::Display::fmt(element, f), + Self::HandlePostResponseTimeouts(element) => ::core::fmt::Display::fmt(element, f), + Self::HandlePostResponses(element) => ::core::fmt::Display::fmt(element, f), + Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f), + } + } + } + impl ::core::convert::From for HandlerCalls { + fn from(value: HandleConsensusCall) -> Self { + Self::HandleConsensus(value) + } + } + impl ::core::convert::From for HandlerCalls { + fn from(value: HandleGetRequestTimeoutsCall) -> Self { + Self::HandleGetRequestTimeouts(value) + } + } + impl ::core::convert::From for HandlerCalls { + fn from(value: HandleGetResponsesCall) -> Self { + Self::HandleGetResponses(value) + } + } + impl ::core::convert::From for HandlerCalls { + fn from(value: HandlePostRequestTimeoutsCall) -> Self { + Self::HandlePostRequestTimeouts(value) + } + } + impl ::core::convert::From for HandlerCalls { + fn from(value: HandlePostRequestsCall) -> Self { + Self::HandlePostRequests(value) + } + } + impl ::core::convert::From for HandlerCalls { + fn from(value: HandlePostResponseTimeoutsCall) -> Self { + Self::HandlePostResponseTimeouts(value) + } + } + impl ::core::convert::From for HandlerCalls { + fn from(value: HandlePostResponsesCall) -> Self { + Self::HandlePostResponses(value) + } + } + impl ::core::convert::From for HandlerCalls { + fn from(value: SupportsInterfaceCall) -> Self { + Self::SupportsInterface(value) + } + } + ///Container type for all return fields from the `supportsInterface` function with signature + /// `supportsInterface(bytes4)` and selector `0x01ffc9a7` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct SupportsInterfaceReturn(pub bool); + ///`GetResponseLeaf(((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]), + /// uint256,uint256)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetResponseLeaf { + pub response: GetResponse, + pub index: ::ethers::core::types::U256, + pub k_index: ::ethers::core::types::U256, + } + ///`GetResponseMessage(((uint256,uint256),bytes32[],uint256),(((bytes,bytes,uint64,address, + /// uint64,bytes[],uint64,bytes),(bytes,bytes)[]),uint256,uint256)[])` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetResponseMessage { + pub proof: Proof, + pub responses: ::std::vec::Vec, + } + ///`GetTimeoutMessage((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes)[],(uint256, + /// uint256),bytes[])` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetTimeoutMessage { + pub timeouts: ::std::vec::Vec, + pub height: StateMachineHeight, + pub proof: ::std::vec::Vec<::ethers::core::types::Bytes>, + } + ///`PostRequestLeaf((bytes,bytes,uint64,bytes,bytes,uint64,bytes),uint256,uint256)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct PostRequestLeaf { + pub request: PostRequest, + pub index: ::ethers::core::types::U256, + pub k_index: ::ethers::core::types::U256, + } + ///`PostRequestMessage(((uint256,uint256),bytes32[],uint256),((bytes,bytes,uint64,bytes,bytes, + /// uint64,bytes),uint256,uint256)[])` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct PostRequestMessage { + pub proof: Proof, + pub requests: ::std::vec::Vec, + } + ///`PostRequestTimeoutMessage((bytes,bytes,uint64,bytes,bytes,uint64,bytes)[],(uint256, + /// uint256),bytes[])` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct PostRequestTimeoutMessage { + pub timeouts: ::std::vec::Vec, + pub height: StateMachineHeight, + pub proof: ::std::vec::Vec<::ethers::core::types::Bytes>, + } + ///`PostResponseLeaf(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),uint256, + /// uint256)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct PostResponseLeaf { + pub response: PostResponse, + pub index: ::ethers::core::types::U256, + pub k_index: ::ethers::core::types::U256, + } + ///`PostResponseMessage(((uint256,uint256),bytes32[],uint256),(((bytes,bytes,uint64,bytes, + /// bytes,uint64,bytes),bytes,uint64),uint256,uint256)[])` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct PostResponseMessage { + pub proof: Proof, + pub responses: ::std::vec::Vec, + } + ///`PostResponseTimeoutMessage(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64)[], + /// (uint256,uint256),bytes[])` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct PostResponseTimeoutMessage { + pub timeouts: ::std::vec::Vec, + pub height: StateMachineHeight, + pub proof: ::std::vec::Vec<::ethers::core::types::Bytes>, + } + ///`Proof((uint256,uint256),bytes32[],uint256)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct Proof { + pub height: StateMachineHeight, + pub multiproof: ::std::vec::Vec<[u8; 32]>, + pub leaf_count: ::ethers::core::types::U256, + } } diff --git a/evm/abi/src/generated/host_manager.rs b/evm/abi/src/generated/host_manager.rs index 6f75bf8bb..8801bd8c1 100644 --- a/evm/abi/src/generated/host_manager.rs +++ b/evm/abi/src/generated/host_manager.rs @@ -2,1309 +2,1163 @@ pub use host_manager::*; /// This module was auto-generated with ethers-rs Abigen. /// More information at: #[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, + clippy::enum_variant_names, + clippy::too_many_arguments, + clippy::upper_case_acronyms, + clippy::type_complexity, + dead_code, + non_camel_case_types )] pub mod host_manager { - pub use super::super::shared_types::*; - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::Some(::ethers::core::abi::ethabi::Constructor { - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("managerParams"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Address, - ::ethers::core::abi::ethabi::ParamType::Address, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct HostManagerParams"), - ), - }, - ], - }), - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("host"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("host"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("h"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("onAccept"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("onAccept"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("incoming"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Address, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IncomingPostRequest", - ), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("onGetResponse"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("onGetResponse"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Address, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Bytes, - ), - ), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ), - ), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Address, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IncomingGetResponse", - ), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("onGetTimeout"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("onGetTimeout"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Address, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Bytes, - ), - ), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct GetRequest"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("onPostRequestTimeout"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "onPostRequestTimeout", - ), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct PostRequest"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("onPostResponse"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("onPostResponse"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Address, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IncomingPostResponse", - ), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("onPostResponseTimeout"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "onPostResponseTimeout", - ), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct PostResponse"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("params"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("params"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Address, - ::ethers::core::abi::ethabi::ParamType::Address, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct HostManagerParams"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("quote"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("quote"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("post"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Address, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct DispatchPost"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("quote"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("res"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Address, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct DispatchPostResponse", - ), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("setIsmpHost"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("setIsmpHost"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("host"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("supportsInterface"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("supportsInterface"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("interfaceId"), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 4usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes4"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ]), - events: ::std::collections::BTreeMap::new(), - errors: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("UnauthorizedAction"), - ::std::vec![ - ::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("UnauthorizedAction"), - inputs: ::std::vec![], - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("UnauthorizedCall"), - ::std::vec![ - ::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("UnauthorizedCall"), - inputs: ::std::vec![], - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("UnexpectedCall"), - ::std::vec![ - ::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("UnexpectedCall"), - inputs: ::std::vec![], - }, - ], - ), - ]), - receive: true, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static HOSTMANAGER_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - #[rustfmt::skip] + pub use super::super::shared_types::*; + #[allow(deprecated)] + fn __abi() -> ::ethers::core::abi::Abi { + ::ethers::core::abi::ethabi::Contract { + constructor: ::core::option::Option::Some(::ethers::core::abi::ethabi::Constructor { + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("managerParams"), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Address, + ::ethers::core::abi::ethabi::ParamType::Address, + ],), + internal_type: ::core::option::Option::Some(::std::borrow::ToOwned::to_owned( + "struct HostManagerParams" + ),), + },], + }), + functions: ::core::convert::From::from([ + ( + ::std::borrow::ToOwned::to_owned("host"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("host"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("h"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("onAccept"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("onAccept"), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("incoming"), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ],), + ::ethers::core::abi::ethabi::ParamType::Address, + ],), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct IncomingPostRequest",), + ), + },], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("onGetResponse"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("onGetResponse"), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Address, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Array( + ::std::boxed::Box::new( + ::ethers::core::abi::ethabi::ParamType::Bytes, + ), + ), + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ],), + ::ethers::core::abi::ethabi::ParamType::Array( + ::std::boxed::Box::new( + ::ethers::core::abi::ethabi::ParamType::Tuple( + ::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ], + ), + ), + ), + ],), + ::ethers::core::abi::ethabi::ParamType::Address, + ],), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct IncomingGetResponse",), + ), + },], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("onGetTimeout"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("onGetTimeout"), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Address, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Array( + ::std::boxed::Box::new( + ::ethers::core::abi::ethabi::ParamType::Bytes, + ), + ), + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ],), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct GetRequest"), + ), + },], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("onPostRequestTimeout"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("onPostRequestTimeout",), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ],), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct PostRequest"), + ), + },], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("onPostResponse"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("onPostResponse"), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ],), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ],), + ::ethers::core::abi::ethabi::ParamType::Address, + ],), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct IncomingPostResponse",), + ), + },], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("onPostResponseTimeout"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("onPostResponseTimeout",), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ],), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ],), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct PostResponse"), + ), + },], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("params"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("params"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Address, + ::ethers::core::abi::ethabi::ParamType::Address, + ],), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct HostManagerParams"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("quote"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("quote"), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("post"), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Uint(256usize), + ::ethers::core::abi::ethabi::ParamType::Address, + ],), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct DispatchPost"), + ), + },], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("quote"), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("res"), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ],), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Uint(256usize), + ::ethers::core::abi::ethabi::ParamType::Address, + ],), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct DispatchPostResponse",), + ), + },], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("setIsmpHost"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("setIsmpHost"), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("host"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + },], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("supportsInterface"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("supportsInterface"), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("interfaceId"), + kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(4usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bytes4"), + ), + },], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bool"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ]), + events: ::std::collections::BTreeMap::new(), + errors: ::core::convert::From::from([ + ( + ::std::borrow::ToOwned::to_owned("UnauthorizedAction"), + ::std::vec![::ethers::core::abi::ethabi::AbiError { + name: ::std::borrow::ToOwned::to_owned("UnauthorizedAction"), + inputs: ::std::vec![], + },], + ), + ( + ::std::borrow::ToOwned::to_owned("UnauthorizedCall"), + ::std::vec![::ethers::core::abi::ethabi::AbiError { + name: ::std::borrow::ToOwned::to_owned("UnauthorizedCall"), + inputs: ::std::vec![], + },], + ), + ( + ::std::borrow::ToOwned::to_owned("UnexpectedCall"), + ::std::vec![::ethers::core::abi::ethabi::AbiError { + name: ::std::borrow::ToOwned::to_owned("UnexpectedCall"), + inputs: ::std::vec![], + },], + ), + ]), + receive: true, + fallback: false, + } + } + ///The parsed JSON ABI of the contract. + pub static HOSTMANAGER_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = + ::ethers::contract::Lazy::new(__abi); + #[rustfmt::skip] const __BYTECODE: &[u8] = b"`\x80`@R4\x80\x15b\0\0\x10W_\x80\xFD[P`@Qb\0\x1B(8\x03\x80b\0\x1B(\x839\x81\x01`@\x81\x90Rb\0\x003\x91b\0\x02fV[_b\0\0>b\0\x01cV[\x90P`\x01`\x01`\xA0\x1B\x03\x81\x16\x15b\0\x01*W\x80`\x01`\x01`\xA0\x1B\x03\x16cdxF\xA5`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15b\0\0\x8DW=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90b\0\0\xB3\x91\x90b\0\x02\xD0V[`@Qc\t^\xA7\xB3`\xE0\x1B\x81R`\x01`\x01`\xA0\x1B\x03\x83\x81\x16`\x04\x83\x01R_\x19`$\x83\x01R\x91\x90\x91\x16\x90c\t^\xA7\xB3\x90`D\x01` `@Q\x80\x83\x03\x81_\x87Z\xF1\x15\x80\x15b\0\x01\x02W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90b\0\x01(\x91\x90b\0\x02\xF3V[P[P\x80Q_\x80T`\x01`\x01`\xA0\x1B\x03\x19\x90\x81\x16`\x01`\x01`\xA0\x1B\x03\x93\x84\x16\x17\x90\x91U` \x90\x92\x01Q`\x01\x80T\x90\x93\x16\x91\x16\x17\x90Ub\0\x03\x14V[_Fb\xAA6\xA7\x81\x14b\0\x01\xA8Wb\x06n\xEE\x81\x14b\0\x01\xC3Wb\xAA7\xDC\x81\x14b\0\x01\xDEWb\x01J4\x81\x14b\0\x01\xF9W`a\x81\x14b\0\x02\x14Wa'\xD8\x81\x14b\0\x02/WP\x90V[s'\xB0\xC6\x96\x0By*\x8D\xCB\x01\xF0e+\xDEH\x01\\\xD5\xF2>\x91PP\x90V[s\xFD~+*\xD0\xB2\x9E\xC8\x17\xDC}@h\x81\xB2%\xB8\x1D\xBF\xCF\x91PP\x90V[s0\xE3\xAF\x17G\xB1U\xF3\x7F\x93^\x0E\xC9\x95\xDE^\xA4\xE6u\x86\x91PP\x90V[s\rp7\xBD\x9C\xEA\xEF%\xE5!_\x80\x8D0\x9A\xDD\ne\xCD\xB9\x91PP\x90V[sL\xB0\xF5u\x0Fo\xE1MK\x86\xAC\xA6\xFE\x12iC\xBD\xA3\xC8\xC4\x91PP\x90V[s\x11\xEB\x87\xC7E\xD9zO\xA8\xAE\xC8\x055\x987E\x9D$\r\x1B\x91PP\x90V[\x80Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14b\0\x02aW_\x80\xFD[\x91\x90PV[_`@\x82\x84\x03\x12\x15b\0\x02wW_\x80\xFD[`@\x80Q\x90\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15b\0\x02\xA6WcNH{q`\xE0\x1B_R`A`\x04R`$_\xFD[`@Rb\0\x02\xB4\x83b\0\x02JV[\x81Rb\0\x02\xC4` \x84\x01b\0\x02JV[` \x82\x01R\x93\x92PPPV[_` \x82\x84\x03\x12\x15b\0\x02\xE1W_\x80\xFD[b\0\x02\xEC\x82b\0\x02JV[\x93\x92PPPV[_` \x82\x84\x03\x12\x15b\0\x03\x04W_\x80\xFD[\x81Q\x80\x15\x15\x81\x14b\0\x02\xECW_\x80\xFD[a\x18\x06\x80b\0\x03\"_9_\xF3\xFE`\x80`@R`\x046\x10a\0\xA8W_5`\xE0\x1C\x80c\xB2\xA0\x1B\xF5\x11a\0bW\x80c\xB2\xA0\x1B\xF5\x14a\x01\x8DW\x80c\xBC\r\xD4G\x14a\x01\xA7W\x80c\xCF\xF0\xAB\x96\x14a\x01\xC1W\x80c\xD0\xFF\xF3f\x14a\x02\x19W\x80c\xDD\x92\xA3\x16\x14a\x023W\x80c\xF47\xBCY\x14a\x02RW_\x80\xFD[\x80c\x01\xFF\xC9\xA7\x14a\0\xB3W\x80c\x0B\xC3{\xAB\x14a\0\xE7W\x80c\x0E\x83$\xA2\x14a\x01\x08W\x80c\x0F\xEE2\xCE\x14a\x01'W\x80c\x10\x8B\xC1\xDD\x14a\x01FW\x80cD\xAB \xF8\x14a\x01sW_\x80\xFD[6a\0\xAFW\0[_\x80\xFD[4\x80\x15a\0\xBEW_\x80\xFD[Pa\0\xD2a\0\xCD6`\x04a\x08AV[a\x02~V[`@Q\x90\x15\x15\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[4\x80\x15a\0\xF2W_\x80\xFD[Pa\x01\x06a\x01\x016`\x04a\x0B\xAFV[a\x02\xB4V[\0[4\x80\x15a\x01\x13W_\x80\xFD[Pa\x01\x06a\x01\"6`\x04a\x0B\xFEV[a\x03\x06V[4\x80\x15a\x012W_\x80\xFD[Pa\x01\x06a\x01A6`\x04a\x0C\x17V[a\x03ZV[4\x80\x15a\x01QW_\x80\xFD[Pa\x01ea\x01`6`\x04a\x0CMV[a\x06\rV[`@Q\x90\x81R` \x01a\0\xDEV[4\x80\x15a\x01~W_\x80\xFD[Pa\x01\x06a\x01\x016`\x04a\x0E\xC5V[4\x80\x15a\x01\x98W_\x80\xFD[Pa\x01\x06a\x01\x016`\x04a\x10_V[4\x80\x15a\x01\xB2W_\x80\xFD[Pa\x01\x06a\x01\x016`\x04a\x10\xC9V[4\x80\x15a\x01\xCCW_\x80\xFD[P`@\x80Q\x80\x82\x01\x82R_\x80\x82R` \x91\x82\x01\x81\x90R\x82Q\x80\x84\x01\x84R\x90T`\x01`\x01`\xA0\x1B\x03\x90\x81\x16\x80\x83R`\x01T\x82\x16\x92\x84\x01\x92\x83R\x84Q\x90\x81R\x91Q\x16\x91\x81\x01\x91\x90\x91R\x01a\0\xDEV[4\x80\x15a\x02$W_\x80\xFD[Pa\x01\x06a\x01\x016`\x04a\x10\xFAV[4\x80\x15a\x02>W_\x80\xFD[Pa\x01ea\x02M6`\x04a\x11+V[a\x06\xA2V[4\x80\x15a\x02]W_\x80\xFD[Pa\x02fa\x078V[`@Q`\x01`\x01`\xA0\x1B\x03\x90\x91\x16\x81R` \x01a\0\xDEV[_`\x01`\x01`\xE0\x1B\x03\x19\x82\x16c\x9E\xD4UI`\xE0\x1B\x14\x80a\x02\xAEWPc\x01\xFF\xC9\xA7`\xE0\x1B`\x01`\x01`\xE0\x1B\x03\x19\x83\x16\x14[\x92\x91PPV[a\x02\xBCa\x078V[`\x01`\x01`\xA0\x1B\x03\x163`\x01`\x01`\xA0\x1B\x03\x16\x14a\x02\xEDW`@Qc{\xF6\xA1o`\xE0\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[`@Qc\x02\xCB\xC7\x9F`\xE0\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[_T`\x01`\x01`\xA0\x1B\x03\x163\x81\x14a\x031W`@QcB\x1C\0}`\xE1\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[P`\x01\x80T`\x01`\x01`\xA0\x1B\x03\x90\x92\x16`\x01`\x01`\xA0\x1B\x03\x19\x92\x83\x16\x17\x90U_\x80T\x90\x91\x16\x90UV[`\x01T`\x01`\x01`\xA0\x1B\x03\x163\x81\x14a\x03\x86W`@QcB\x1C\0}`\xE1\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[6a\x03\x91\x83\x80a\x11\xE1V[\x90Pa\x04S_`\x01\x01_\x90T\x90a\x01\0\n\x90\x04`\x01`\x01`\xA0\x1B\x03\x16`\x01`\x01`\xA0\x1B\x03\x16b^v>`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01_`@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x03\xE6W=_\x80>=_\xFD[PPPP`@Q=_\x82>`\x1F=\x90\x81\x01`\x1F\x19\x16\x82\x01`@Ra\x04\r\x91\x90\x81\x01\x90a\x12!V[a\x04\x17\x83\x80a\x12\x92V[\x80\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x93\x92\x91\x90\x81\x81R` \x01\x83\x83\x80\x82\x847_\x92\x01\x91\x90\x91RP\x92\x93\x92PPa\x08\x19\x90PV[a\x04pW`@QcB\x1C\0}`\xE1\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[_a\x04~`\xC0\x83\x01\x83a\x12\x92V[_\x81\x81\x10a\x04\x8EWa\x04\x8Ea\x12\xDBV[\x91\x90\x91\x015`\xF8\x1C\x90P`\x01\x81\x11\x15a\x04\xA9Wa\x04\xA9a\x12\xEFV[\x90P_\x81`\x01\x81\x11\x15a\x04\xBEWa\x04\xBEa\x12\xEFV[\x03a\x05eW_a\x04\xD1`\xC0\x84\x01\x84a\x12\x92V[a\x04\xDF\x91`\x01\x90\x82\x90a\x13\x03V[\x81\x01\x90a\x04\xEC\x91\x90a\x13*V[`\x01T`@\x80Qc\xCB\x1An/`\xE0\x1B\x81R\x83Q`\x01`\x01`\xA0\x1B\x03\x90\x81\x16`\x04\x83\x01R` \x85\x01Q`$\x83\x01R\x91\x84\x01Q\x15\x15`D\x82\x01R\x92\x93P\x16\x90c\xCB\x1An/\x90`d\x01_`@Q\x80\x83\x03\x81_\x87\x80;\x15\x80\x15a\x05IW_\x80\xFD[PZ\xF1\x15\x80\x15a\x05[W=_\x80>=_\xFD[PPPPPa\x06\x07V[`\x01\x81`\x01\x81\x11\x15a\x05yWa\x05ya\x12\xEFV[\x03a\x06\x07W_a\x05\x8C`\xC0\x84\x01\x84a\x12\x92V[a\x05\x9A\x91`\x01\x90\x82\x90a\x13\x03V[\x81\x01\x90a\x05\xA7\x91\x90a\x14HV[`\x01T`@Qcj\xD7\xDFG`\xE0\x1B\x81R\x91\x92P`\x01`\x01`\xA0\x1B\x03\x16\x90cj\xD7\xDFG\x90a\x05\xD8\x90\x84\x90`\x04\x01a\x166V[_`@Q\x80\x83\x03\x81_\x87\x80;\x15\x80\x15a\x05\xEFW_\x80\xFD[PZ\xF1\x15\x80\x15a\x06\x01W=_\x80>=_\xFD[PPPPP[PPPPV[_a\x06\x16a\x078V[\x82Q`@Qc \x08\xF6\x05`\xE1\x1B\x81R`\x01`\x01`\xA0\x1B\x03\x92\x90\x92\x16\x91c@\x11\xEC\n\x91a\x06D\x91`\x04\x01a\x17iV[` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x06_W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x06\x83\x91\x90a\x17{V[\x82`@\x01QQa\x06\x93\x91\x90a\x17\xA6V[\x82`\x80\x01Qa\x02\xAE\x91\x90a\x17\xBDV[_a\x06\xABa\x078V[\x82QQ`@Qc \x08\xF6\x05`\xE1\x1B\x81R`\x01`\x01`\xA0\x1B\x03\x92\x90\x92\x16\x91c@\x11\xEC\n\x91a\x06\xDA\x91`\x04\x01a\x17iV[` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x06\xF5W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x07\x19\x91\x90a\x17{V[\x82` \x01QQa\x07)\x91\x90a\x17\xA6V[\x82``\x01Qa\x02\xAE\x91\x90a\x17\xBDV[_Fb\xAA6\xA7\x81\x14a\x07wWb\x06n\xEE\x81\x14a\x07\x92Wb\xAA7\xDC\x81\x14a\x07\xADWb\x01J4\x81\x14a\x07\xC8W`a\x81\x14a\x07\xE3Wa'\xD8\x81\x14a\x07\xFEWP\x90V[s'\xB0\xC6\x96\x0By*\x8D\xCB\x01\xF0e+\xDEH\x01\\\xD5\xF2>\x91PP\x90V[s\xFD~+*\xD0\xB2\x9E\xC8\x17\xDC}@h\x81\xB2%\xB8\x1D\xBF\xCF\x91PP\x90V[s0\xE3\xAF\x17G\xB1U\xF3\x7F\x93^\x0E\xC9\x95\xDE^\xA4\xE6u\x86\x91PP\x90V[s\rp7\xBD\x9C\xEA\xEF%\xE5!_\x80\x8D0\x9A\xDD\ne\xCD\xB9\x91PP\x90V[sL\xB0\xF5u\x0Fo\xE1MK\x86\xAC\xA6\xFE\x12iC\xBD\xA3\xC8\xC4\x91PP\x90V[s\x11\xEB\x87\xC7E\xD9zO\xA8\xAE\xC8\x055\x987E\x9D$\r\x1B\x91PP\x90V[_\x81Q\x83Q\x14a\x08*WP_a\x02\xAEV[P\x81Q` \x91\x82\x01\x81\x90 \x91\x90\x92\x01\x91\x90\x91 \x14\x90V[_` \x82\x84\x03\x12\x15a\x08QW_\x80\xFD[\x815`\x01`\x01`\xE0\x1B\x03\x19\x81\x16\x81\x14a\x08hW_\x80\xFD[\x93\x92PPPV[cNH{q`\xE0\x1B_R`A`\x04R`$_\xFD[`@Q`\xE0\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x08\xA5Wa\x08\xA5a\x08oV[`@R\x90V[`@Q``\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x08\xA5Wa\x08\xA5a\x08oV[`@Q`\xC0\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x08\xA5Wa\x08\xA5a\x08oV[`@Qa\x01\0\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x08\xA5Wa\x08\xA5a\x08oV[`@\x80Q\x90\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x08\xA5Wa\x08\xA5a\x08oV[`@Q`\xA0\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x08\xA5Wa\x08\xA5a\x08oV[`@Qa\x01\xC0\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x08\xA5Wa\x08\xA5a\x08oV[`@Q`\x1F\x82\x01`\x1F\x19\x16\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\t\xA1Wa\t\xA1a\x08oV[`@R\x91\x90PV[_`\x01`\x01`@\x1B\x03\x82\x11\x15a\t\xC1Wa\t\xC1a\x08oV[P`\x1F\x01`\x1F\x19\x16` \x01\x90V[_\x82`\x1F\x83\x01\x12a\t\xDEW_\x80\xFD[\x815a\t\xF1a\t\xEC\x82a\t\xA9V[a\tyV[\x81\x81R\x84` \x83\x86\x01\x01\x11\x15a\n\x05W_\x80\xFD[\x81` \x85\x01` \x83\x017_\x91\x81\x01` \x01\x91\x90\x91R\x93\x92PPPV[\x805`\x01`\x01`@\x1B\x03\x81\x16\x81\x14a\n7W_\x80\xFD[\x91\x90PV[_`\xE0\x82\x84\x03\x12\x15a\nLW_\x80\xFD[a\nTa\x08\x83V[\x90P\x815`\x01`\x01`@\x1B\x03\x80\x82\x11\x15a\nlW_\x80\xFD[a\nx\x85\x83\x86\x01a\t\xCFV[\x83R` \x84\x015\x91P\x80\x82\x11\x15a\n\x8DW_\x80\xFD[a\n\x99\x85\x83\x86\x01a\t\xCFV[` \x84\x01Ra\n\xAA`@\x85\x01a\n!V[`@\x84\x01R``\x84\x015\x91P\x80\x82\x11\x15a\n\xC2W_\x80\xFD[a\n\xCE\x85\x83\x86\x01a\t\xCFV[``\x84\x01R`\x80\x84\x015\x91P\x80\x82\x11\x15a\n\xE6W_\x80\xFD[a\n\xF2\x85\x83\x86\x01a\t\xCFV[`\x80\x84\x01Ra\x0B\x03`\xA0\x85\x01a\n!V[`\xA0\x84\x01R`\xC0\x84\x015\x91P\x80\x82\x11\x15a\x0B\x1BW_\x80\xFD[Pa\x0B(\x84\x82\x85\x01a\t\xCFV[`\xC0\x83\x01RP\x92\x91PPV[_``\x82\x84\x03\x12\x15a\x0BDW_\x80\xFD[a\x0BLa\x08\xABV[\x90P\x815`\x01`\x01`@\x1B\x03\x80\x82\x11\x15a\x0BdW_\x80\xFD[a\x0Bp\x85\x83\x86\x01a\nWa\r>a\x08oV[P`\x05\x1B` \x01\x90V[_\x82`\x1F\x83\x01\x12a\rWW_\x80\xFD[\x815` a\rga\t\xEC\x83a\r&V[\x82\x81R`\x05\x92\x90\x92\x1B\x84\x01\x81\x01\x91\x81\x81\x01\x90\x86\x84\x11\x15a\r\x85W_\x80\xFD[\x82\x86\x01[\x84\x81\x10\x15a\r\xC3W\x805`\x01`\x01`@\x1B\x03\x81\x11\x15a\r\xA7W_\x80\x81\xFD[a\r\xB5\x89\x86\x83\x8B\x01\x01a\t\xCFV[\x84RP\x91\x83\x01\x91\x83\x01a\r\x89V[P\x96\x95PPPPPPV[_a\x01\0\x82\x84\x03\x12\x15a\r\xDFW_\x80\xFD[a\r\xE7a\x08\xEFV[\x90P\x815`\x01`\x01`@\x1B\x03\x80\x82\x11\x15a\r\xFFW_\x80\xFD[a\x0E\x0B\x85\x83\x86\x01a\t\xCFV[\x83R` \x84\x015\x91P\x80\x82\x11\x15a\x0E W_\x80\xFD[a\x0E,\x85\x83\x86\x01a\t\xCFV[` \x84\x01Ra\x0E=`@\x85\x01a\n!V[`@\x84\x01Ra\x0EN``\x85\x01a\x0B\xE8V[``\x84\x01Ra\x0E_`\x80\x85\x01a\n!V[`\x80\x84\x01R`\xA0\x84\x015\x91P\x80\x82\x11\x15a\x0EwW_\x80\xFD[a\x0E\x83\x85\x83\x86\x01a\rHV[`\xA0\x84\x01Ra\x0E\x94`\xC0\x85\x01a\n!V[`\xC0\x84\x01R`\xE0\x84\x015\x91P\x80\x82\x11\x15a\x0E\xACW_\x80\xFD[Pa\x0E\xB9\x84\x82\x85\x01a\t\xCFV[`\xE0\x83\x01RP\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x0E\xD5W_\x80\xFD[`\x01`\x01`@\x1B\x03\x80\x835\x11\x15a\x0E\xEAW_\x80\xFD[\x825\x83\x01`@\x81\x86\x03\x12\x15a\x0E\xFDW_\x80\xFD[a\x0F\x05a\t\x12V[\x82\x825\x11\x15a\x0F\x12W_\x80\xFD[\x815\x82\x01`@\x81\x88\x03\x12\x15a\x0F%W_\x80\xFD[a\x0F-a\t\x12V[\x84\x825\x11\x15a\x0F:W_\x80\xFD[a\x0FG\x88\x835\x84\x01a\r\xCEV[\x81R\x84` \x83\x015\x11\x15a\x0FYW_\x80\xFD[` \x82\x015\x82\x01\x91P\x87`\x1F\x83\x01\x12a\x0FpW_\x80\xFD[a\x0F}a\t\xEC\x835a\r&V[\x825\x80\x82R` \x80\x83\x01\x92\x91`\x05\x1B\x85\x01\x01\x8A\x81\x11\x15a\x0F\x9BW_\x80\xFD[` \x85\x01[\x81\x81\x10\x15a\x106W\x88\x815\x11\x15a\x0F\xB5W_\x80\xFD[\x805\x86\x01`@\x81\x8E\x03`\x1F\x19\x01\x12\x15a\x0F\xCCW_\x80\xFD[a\x0F\xD4a\t\x12V[\x8A` \x83\x015\x11\x15a\x0F\xE4W_\x80\xFD[a\x0F\xF6\x8E` \x80\x85\x015\x85\x01\x01a\t\xCFV[\x81R\x8A`@\x83\x015\x11\x15a\x10\x08W_\x80\xFD[a\x10\x1B\x8E` `@\x85\x015\x85\x01\x01a\t\xCFV[` \x82\x01R\x80\x86RPP` \x84\x01\x93P` \x81\x01\x90Pa\x0F\xA0V[PP\x80` \x84\x01RPP\x80\x83RPPa\x10Q` \x83\x01a\x0B\xE8V[` \x82\x01R\x95\x94PPPPPV[_` \x82\x84\x03\x12\x15a\x10oW_\x80\xFD[\x815`\x01`\x01`@\x1B\x03\x80\x82\x11\x15a\x10\x85W_\x80\xFD[\x90\x83\x01\x90`@\x82\x86\x03\x12\x15a\x10\x98W_\x80\xFD[a\x10\xA0a\t\x12V[\x825\x82\x81\x11\x15a\x10\xAEW_\x80\xFD[a\x10\xBA\x87\x82\x86\x01a\x0B4V[\x82RPa\x10Q` \x84\x01a\x0B\xE8V[_` \x82\x84\x03\x12\x15a\x10\xD9W_\x80\xFD[\x815`\x01`\x01`@\x1B\x03\x81\x11\x15a\x10\xEEW_\x80\xFD[a\x0B\xE0\x84\x82\x85\x01a\n\x88\x82\x87\x01a\x13uV[\x82\x84\x01RPPa\x01\x80\x80\x84\x015\x83\x81\x11\x15a\x15WW_\x80\xFD[a\x15c\x88\x82\x87\x01a\x13\xCDV[\x82\x84\x01RPPa\x01\xA0\x80\x84\x015\x83\x81\x11\x15a\x15|W_\x80\xFD[a\x15\x88\x88\x82\x87\x01a\t\xCFV[\x91\x83\x01\x91\x90\x91RP\x95\x94PPPPPV[_\x81Q\x80\x84R` \x80\x85\x01\x94P\x80\x84\x01_[\x83\x81\x10\x15a\x15\xC7W\x81Q\x87R\x95\x82\x01\x95\x90\x82\x01\x90`\x01\x01a\x15\xABV[P\x94\x95\x94PPPPPV[_\x81Q\x80\x84R` \x80\x85\x01\x94P\x80\x84\x01_[\x83\x81\x10\x15a\x15\xC7W\x81Q\x80Q\x88R\x83\x01Q\x83\x88\x01R`@\x90\x96\x01\x95\x90\x82\x01\x90`\x01\x01a\x15\xE4V[_\x81Q\x80\x84Ra\x16\"\x81` \x86\x01` \x86\x01a\x11\xFFV[`\x1F\x01`\x1F\x19\x16\x92\x90\x92\x01` \x01\x92\x91PPV[` \x81R\x81Q` \x82\x01R` \x82\x01Q`@\x82\x01R`@\x82\x01Q``\x82\x01R_``\x83\x01Qa\x16p`\x80\x84\x01\x82`\x01`\x01`\xA0\x1B\x03\x16\x90RV[P`\x80\x83\x01Q`\x01`\x01`\xA0\x1B\x03\x81\x16`\xA0\x84\x01RP`\xA0\x83\x01Q`\x01`\x01`\xA0\x1B\x03\x81\x16`\xC0\x84\x01RP`\xC0\x83\x01Q`\x01`\x01`\xA0\x1B\x03\x81\x16`\xE0\x84\x01RP`\xE0\x83\x01Qa\x01\0a\x16\xCC\x81\x85\x01\x83`\x01`\x01`\xA0\x1B\x03\x16\x90RV[\x84\x01Qa\x01 \x84\x81\x01\x91\x90\x91R\x84\x01Qa\x01@\x80\x85\x01\x91\x90\x91R\x84\x01Q\x90Pa\x01`a\x17\x02\x81\x85\x01\x83`\x01`\x01`\xA0\x1B\x03\x16\x90RV[\x80\x85\x01Q\x91PPa\x01\xC0a\x01\x80\x81\x81\x86\x01Ra\x17\"a\x01\xE0\x86\x01\x84a\x15\x99V[\x92P\x80\x86\x01Q\x90P`\x1F\x19a\x01\xA0\x81\x87\x86\x03\x01\x81\x88\x01Ra\x17C\x85\x84a\x15\xD2V[\x90\x88\x01Q\x87\x82\x03\x90\x92\x01\x84\x88\x01R\x93P\x90Pa\x17_\x83\x82a\x16\x0BV[\x96\x95PPPPPPV[` \x81R_a\x08h` \x83\x01\x84a\x16\x0BV[_` \x82\x84\x03\x12\x15a\x17\x8BW_\x80\xFD[PQ\x91\x90PV[cNH{q`\xE0\x1B_R`\x11`\x04R`$_\xFD[\x80\x82\x02\x81\x15\x82\x82\x04\x84\x14\x17a\x02\xAEWa\x02\xAEa\x17\x92V[\x80\x82\x01\x80\x82\x11\x15a\x02\xAEWa\x02\xAEa\x17\x92V\xFE\xA2dipfsX\"\x12 \xFFX\xF5i\xC7\xDB\x86s\xA8\x1En\x03\xD0\xA1\xA2b.\xCF\x0Bbz\xA6\xD7\xD0<\x8A\xECy\t\xD1\xB9ndsolcC\0\x08\x14\x003"; - /// The bytecode of the contract. - pub static HOSTMANAGER_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static( - __BYTECODE, - ); - #[rustfmt::skip] + /// The bytecode of the contract. + pub static HOSTMANAGER_BYTECODE: ::ethers::core::types::Bytes = + ::ethers::core::types::Bytes::from_static(__BYTECODE); + #[rustfmt::skip] const __DEPLOYED_BYTECODE: &[u8] = b"`\x80`@R`\x046\x10a\0\xA8W_5`\xE0\x1C\x80c\xB2\xA0\x1B\xF5\x11a\0bW\x80c\xB2\xA0\x1B\xF5\x14a\x01\x8DW\x80c\xBC\r\xD4G\x14a\x01\xA7W\x80c\xCF\xF0\xAB\x96\x14a\x01\xC1W\x80c\xD0\xFF\xF3f\x14a\x02\x19W\x80c\xDD\x92\xA3\x16\x14a\x023W\x80c\xF47\xBCY\x14a\x02RW_\x80\xFD[\x80c\x01\xFF\xC9\xA7\x14a\0\xB3W\x80c\x0B\xC3{\xAB\x14a\0\xE7W\x80c\x0E\x83$\xA2\x14a\x01\x08W\x80c\x0F\xEE2\xCE\x14a\x01'W\x80c\x10\x8B\xC1\xDD\x14a\x01FW\x80cD\xAB \xF8\x14a\x01sW_\x80\xFD[6a\0\xAFW\0[_\x80\xFD[4\x80\x15a\0\xBEW_\x80\xFD[Pa\0\xD2a\0\xCD6`\x04a\x08AV[a\x02~V[`@Q\x90\x15\x15\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[4\x80\x15a\0\xF2W_\x80\xFD[Pa\x01\x06a\x01\x016`\x04a\x0B\xAFV[a\x02\xB4V[\0[4\x80\x15a\x01\x13W_\x80\xFD[Pa\x01\x06a\x01\"6`\x04a\x0B\xFEV[a\x03\x06V[4\x80\x15a\x012W_\x80\xFD[Pa\x01\x06a\x01A6`\x04a\x0C\x17V[a\x03ZV[4\x80\x15a\x01QW_\x80\xFD[Pa\x01ea\x01`6`\x04a\x0CMV[a\x06\rV[`@Q\x90\x81R` \x01a\0\xDEV[4\x80\x15a\x01~W_\x80\xFD[Pa\x01\x06a\x01\x016`\x04a\x0E\xC5V[4\x80\x15a\x01\x98W_\x80\xFD[Pa\x01\x06a\x01\x016`\x04a\x10_V[4\x80\x15a\x01\xB2W_\x80\xFD[Pa\x01\x06a\x01\x016`\x04a\x10\xC9V[4\x80\x15a\x01\xCCW_\x80\xFD[P`@\x80Q\x80\x82\x01\x82R_\x80\x82R` \x91\x82\x01\x81\x90R\x82Q\x80\x84\x01\x84R\x90T`\x01`\x01`\xA0\x1B\x03\x90\x81\x16\x80\x83R`\x01T\x82\x16\x92\x84\x01\x92\x83R\x84Q\x90\x81R\x91Q\x16\x91\x81\x01\x91\x90\x91R\x01a\0\xDEV[4\x80\x15a\x02$W_\x80\xFD[Pa\x01\x06a\x01\x016`\x04a\x10\xFAV[4\x80\x15a\x02>W_\x80\xFD[Pa\x01ea\x02M6`\x04a\x11+V[a\x06\xA2V[4\x80\x15a\x02]W_\x80\xFD[Pa\x02fa\x078V[`@Q`\x01`\x01`\xA0\x1B\x03\x90\x91\x16\x81R` \x01a\0\xDEV[_`\x01`\x01`\xE0\x1B\x03\x19\x82\x16c\x9E\xD4UI`\xE0\x1B\x14\x80a\x02\xAEWPc\x01\xFF\xC9\xA7`\xE0\x1B`\x01`\x01`\xE0\x1B\x03\x19\x83\x16\x14[\x92\x91PPV[a\x02\xBCa\x078V[`\x01`\x01`\xA0\x1B\x03\x163`\x01`\x01`\xA0\x1B\x03\x16\x14a\x02\xEDW`@Qc{\xF6\xA1o`\xE0\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[`@Qc\x02\xCB\xC7\x9F`\xE0\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[_T`\x01`\x01`\xA0\x1B\x03\x163\x81\x14a\x031W`@QcB\x1C\0}`\xE1\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[P`\x01\x80T`\x01`\x01`\xA0\x1B\x03\x90\x92\x16`\x01`\x01`\xA0\x1B\x03\x19\x92\x83\x16\x17\x90U_\x80T\x90\x91\x16\x90UV[`\x01T`\x01`\x01`\xA0\x1B\x03\x163\x81\x14a\x03\x86W`@QcB\x1C\0}`\xE1\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[6a\x03\x91\x83\x80a\x11\xE1V[\x90Pa\x04S_`\x01\x01_\x90T\x90a\x01\0\n\x90\x04`\x01`\x01`\xA0\x1B\x03\x16`\x01`\x01`\xA0\x1B\x03\x16b^v>`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01_`@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x03\xE6W=_\x80>=_\xFD[PPPP`@Q=_\x82>`\x1F=\x90\x81\x01`\x1F\x19\x16\x82\x01`@Ra\x04\r\x91\x90\x81\x01\x90a\x12!V[a\x04\x17\x83\x80a\x12\x92V[\x80\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x93\x92\x91\x90\x81\x81R` \x01\x83\x83\x80\x82\x847_\x92\x01\x91\x90\x91RP\x92\x93\x92PPa\x08\x19\x90PV[a\x04pW`@QcB\x1C\0}`\xE1\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[_a\x04~`\xC0\x83\x01\x83a\x12\x92V[_\x81\x81\x10a\x04\x8EWa\x04\x8Ea\x12\xDBV[\x91\x90\x91\x015`\xF8\x1C\x90P`\x01\x81\x11\x15a\x04\xA9Wa\x04\xA9a\x12\xEFV[\x90P_\x81`\x01\x81\x11\x15a\x04\xBEWa\x04\xBEa\x12\xEFV[\x03a\x05eW_a\x04\xD1`\xC0\x84\x01\x84a\x12\x92V[a\x04\xDF\x91`\x01\x90\x82\x90a\x13\x03V[\x81\x01\x90a\x04\xEC\x91\x90a\x13*V[`\x01T`@\x80Qc\xCB\x1An/`\xE0\x1B\x81R\x83Q`\x01`\x01`\xA0\x1B\x03\x90\x81\x16`\x04\x83\x01R` \x85\x01Q`$\x83\x01R\x91\x84\x01Q\x15\x15`D\x82\x01R\x92\x93P\x16\x90c\xCB\x1An/\x90`d\x01_`@Q\x80\x83\x03\x81_\x87\x80;\x15\x80\x15a\x05IW_\x80\xFD[PZ\xF1\x15\x80\x15a\x05[W=_\x80>=_\xFD[PPPPPa\x06\x07V[`\x01\x81`\x01\x81\x11\x15a\x05yWa\x05ya\x12\xEFV[\x03a\x06\x07W_a\x05\x8C`\xC0\x84\x01\x84a\x12\x92V[a\x05\x9A\x91`\x01\x90\x82\x90a\x13\x03V[\x81\x01\x90a\x05\xA7\x91\x90a\x14HV[`\x01T`@Qcj\xD7\xDFG`\xE0\x1B\x81R\x91\x92P`\x01`\x01`\xA0\x1B\x03\x16\x90cj\xD7\xDFG\x90a\x05\xD8\x90\x84\x90`\x04\x01a\x166V[_`@Q\x80\x83\x03\x81_\x87\x80;\x15\x80\x15a\x05\xEFW_\x80\xFD[PZ\xF1\x15\x80\x15a\x06\x01W=_\x80>=_\xFD[PPPPP[PPPPV[_a\x06\x16a\x078V[\x82Q`@Qc \x08\xF6\x05`\xE1\x1B\x81R`\x01`\x01`\xA0\x1B\x03\x92\x90\x92\x16\x91c@\x11\xEC\n\x91a\x06D\x91`\x04\x01a\x17iV[` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x06_W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x06\x83\x91\x90a\x17{V[\x82`@\x01QQa\x06\x93\x91\x90a\x17\xA6V[\x82`\x80\x01Qa\x02\xAE\x91\x90a\x17\xBDV[_a\x06\xABa\x078V[\x82QQ`@Qc \x08\xF6\x05`\xE1\x1B\x81R`\x01`\x01`\xA0\x1B\x03\x92\x90\x92\x16\x91c@\x11\xEC\n\x91a\x06\xDA\x91`\x04\x01a\x17iV[` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x06\xF5W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x07\x19\x91\x90a\x17{V[\x82` \x01QQa\x07)\x91\x90a\x17\xA6V[\x82``\x01Qa\x02\xAE\x91\x90a\x17\xBDV[_Fb\xAA6\xA7\x81\x14a\x07wWb\x06n\xEE\x81\x14a\x07\x92Wb\xAA7\xDC\x81\x14a\x07\xADWb\x01J4\x81\x14a\x07\xC8W`a\x81\x14a\x07\xE3Wa'\xD8\x81\x14a\x07\xFEWP\x90V[s'\xB0\xC6\x96\x0By*\x8D\xCB\x01\xF0e+\xDEH\x01\\\xD5\xF2>\x91PP\x90V[s\xFD~+*\xD0\xB2\x9E\xC8\x17\xDC}@h\x81\xB2%\xB8\x1D\xBF\xCF\x91PP\x90V[s0\xE3\xAF\x17G\xB1U\xF3\x7F\x93^\x0E\xC9\x95\xDE^\xA4\xE6u\x86\x91PP\x90V[s\rp7\xBD\x9C\xEA\xEF%\xE5!_\x80\x8D0\x9A\xDD\ne\xCD\xB9\x91PP\x90V[sL\xB0\xF5u\x0Fo\xE1MK\x86\xAC\xA6\xFE\x12iC\xBD\xA3\xC8\xC4\x91PP\x90V[s\x11\xEB\x87\xC7E\xD9zO\xA8\xAE\xC8\x055\x987E\x9D$\r\x1B\x91PP\x90V[_\x81Q\x83Q\x14a\x08*WP_a\x02\xAEV[P\x81Q` \x91\x82\x01\x81\x90 \x91\x90\x92\x01\x91\x90\x91 \x14\x90V[_` \x82\x84\x03\x12\x15a\x08QW_\x80\xFD[\x815`\x01`\x01`\xE0\x1B\x03\x19\x81\x16\x81\x14a\x08hW_\x80\xFD[\x93\x92PPPV[cNH{q`\xE0\x1B_R`A`\x04R`$_\xFD[`@Q`\xE0\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x08\xA5Wa\x08\xA5a\x08oV[`@R\x90V[`@Q``\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x08\xA5Wa\x08\xA5a\x08oV[`@Q`\xC0\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x08\xA5Wa\x08\xA5a\x08oV[`@Qa\x01\0\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x08\xA5Wa\x08\xA5a\x08oV[`@\x80Q\x90\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x08\xA5Wa\x08\xA5a\x08oV[`@Q`\xA0\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x08\xA5Wa\x08\xA5a\x08oV[`@Qa\x01\xC0\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x08\xA5Wa\x08\xA5a\x08oV[`@Q`\x1F\x82\x01`\x1F\x19\x16\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\t\xA1Wa\t\xA1a\x08oV[`@R\x91\x90PV[_`\x01`\x01`@\x1B\x03\x82\x11\x15a\t\xC1Wa\t\xC1a\x08oV[P`\x1F\x01`\x1F\x19\x16` \x01\x90V[_\x82`\x1F\x83\x01\x12a\t\xDEW_\x80\xFD[\x815a\t\xF1a\t\xEC\x82a\t\xA9V[a\tyV[\x81\x81R\x84` \x83\x86\x01\x01\x11\x15a\n\x05W_\x80\xFD[\x81` \x85\x01` \x83\x017_\x91\x81\x01` \x01\x91\x90\x91R\x93\x92PPPV[\x805`\x01`\x01`@\x1B\x03\x81\x16\x81\x14a\n7W_\x80\xFD[\x91\x90PV[_`\xE0\x82\x84\x03\x12\x15a\nLW_\x80\xFD[a\nTa\x08\x83V[\x90P\x815`\x01`\x01`@\x1B\x03\x80\x82\x11\x15a\nlW_\x80\xFD[a\nx\x85\x83\x86\x01a\t\xCFV[\x83R` \x84\x015\x91P\x80\x82\x11\x15a\n\x8DW_\x80\xFD[a\n\x99\x85\x83\x86\x01a\t\xCFV[` \x84\x01Ra\n\xAA`@\x85\x01a\n!V[`@\x84\x01R``\x84\x015\x91P\x80\x82\x11\x15a\n\xC2W_\x80\xFD[a\n\xCE\x85\x83\x86\x01a\t\xCFV[``\x84\x01R`\x80\x84\x015\x91P\x80\x82\x11\x15a\n\xE6W_\x80\xFD[a\n\xF2\x85\x83\x86\x01a\t\xCFV[`\x80\x84\x01Ra\x0B\x03`\xA0\x85\x01a\n!V[`\xA0\x84\x01R`\xC0\x84\x015\x91P\x80\x82\x11\x15a\x0B\x1BW_\x80\xFD[Pa\x0B(\x84\x82\x85\x01a\t\xCFV[`\xC0\x83\x01RP\x92\x91PPV[_``\x82\x84\x03\x12\x15a\x0BDW_\x80\xFD[a\x0BLa\x08\xABV[\x90P\x815`\x01`\x01`@\x1B\x03\x80\x82\x11\x15a\x0BdW_\x80\xFD[a\x0Bp\x85\x83\x86\x01a\nWa\r>a\x08oV[P`\x05\x1B` \x01\x90V[_\x82`\x1F\x83\x01\x12a\rWW_\x80\xFD[\x815` a\rga\t\xEC\x83a\r&V[\x82\x81R`\x05\x92\x90\x92\x1B\x84\x01\x81\x01\x91\x81\x81\x01\x90\x86\x84\x11\x15a\r\x85W_\x80\xFD[\x82\x86\x01[\x84\x81\x10\x15a\r\xC3W\x805`\x01`\x01`@\x1B\x03\x81\x11\x15a\r\xA7W_\x80\x81\xFD[a\r\xB5\x89\x86\x83\x8B\x01\x01a\t\xCFV[\x84RP\x91\x83\x01\x91\x83\x01a\r\x89V[P\x96\x95PPPPPPV[_a\x01\0\x82\x84\x03\x12\x15a\r\xDFW_\x80\xFD[a\r\xE7a\x08\xEFV[\x90P\x815`\x01`\x01`@\x1B\x03\x80\x82\x11\x15a\r\xFFW_\x80\xFD[a\x0E\x0B\x85\x83\x86\x01a\t\xCFV[\x83R` \x84\x015\x91P\x80\x82\x11\x15a\x0E W_\x80\xFD[a\x0E,\x85\x83\x86\x01a\t\xCFV[` \x84\x01Ra\x0E=`@\x85\x01a\n!V[`@\x84\x01Ra\x0EN``\x85\x01a\x0B\xE8V[``\x84\x01Ra\x0E_`\x80\x85\x01a\n!V[`\x80\x84\x01R`\xA0\x84\x015\x91P\x80\x82\x11\x15a\x0EwW_\x80\xFD[a\x0E\x83\x85\x83\x86\x01a\rHV[`\xA0\x84\x01Ra\x0E\x94`\xC0\x85\x01a\n!V[`\xC0\x84\x01R`\xE0\x84\x015\x91P\x80\x82\x11\x15a\x0E\xACW_\x80\xFD[Pa\x0E\xB9\x84\x82\x85\x01a\t\xCFV[`\xE0\x83\x01RP\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x0E\xD5W_\x80\xFD[`\x01`\x01`@\x1B\x03\x80\x835\x11\x15a\x0E\xEAW_\x80\xFD[\x825\x83\x01`@\x81\x86\x03\x12\x15a\x0E\xFDW_\x80\xFD[a\x0F\x05a\t\x12V[\x82\x825\x11\x15a\x0F\x12W_\x80\xFD[\x815\x82\x01`@\x81\x88\x03\x12\x15a\x0F%W_\x80\xFD[a\x0F-a\t\x12V[\x84\x825\x11\x15a\x0F:W_\x80\xFD[a\x0FG\x88\x835\x84\x01a\r\xCEV[\x81R\x84` \x83\x015\x11\x15a\x0FYW_\x80\xFD[` \x82\x015\x82\x01\x91P\x87`\x1F\x83\x01\x12a\x0FpW_\x80\xFD[a\x0F}a\t\xEC\x835a\r&V[\x825\x80\x82R` \x80\x83\x01\x92\x91`\x05\x1B\x85\x01\x01\x8A\x81\x11\x15a\x0F\x9BW_\x80\xFD[` \x85\x01[\x81\x81\x10\x15a\x106W\x88\x815\x11\x15a\x0F\xB5W_\x80\xFD[\x805\x86\x01`@\x81\x8E\x03`\x1F\x19\x01\x12\x15a\x0F\xCCW_\x80\xFD[a\x0F\xD4a\t\x12V[\x8A` \x83\x015\x11\x15a\x0F\xE4W_\x80\xFD[a\x0F\xF6\x8E` \x80\x85\x015\x85\x01\x01a\t\xCFV[\x81R\x8A`@\x83\x015\x11\x15a\x10\x08W_\x80\xFD[a\x10\x1B\x8E` `@\x85\x015\x85\x01\x01a\t\xCFV[` \x82\x01R\x80\x86RPP` \x84\x01\x93P` \x81\x01\x90Pa\x0F\xA0V[PP\x80` \x84\x01RPP\x80\x83RPPa\x10Q` \x83\x01a\x0B\xE8V[` \x82\x01R\x95\x94PPPPPV[_` \x82\x84\x03\x12\x15a\x10oW_\x80\xFD[\x815`\x01`\x01`@\x1B\x03\x80\x82\x11\x15a\x10\x85W_\x80\xFD[\x90\x83\x01\x90`@\x82\x86\x03\x12\x15a\x10\x98W_\x80\xFD[a\x10\xA0a\t\x12V[\x825\x82\x81\x11\x15a\x10\xAEW_\x80\xFD[a\x10\xBA\x87\x82\x86\x01a\x0B4V[\x82RPa\x10Q` \x84\x01a\x0B\xE8V[_` \x82\x84\x03\x12\x15a\x10\xD9W_\x80\xFD[\x815`\x01`\x01`@\x1B\x03\x81\x11\x15a\x10\xEEW_\x80\xFD[a\x0B\xE0\x84\x82\x85\x01a\n\x88\x82\x87\x01a\x13uV[\x82\x84\x01RPPa\x01\x80\x80\x84\x015\x83\x81\x11\x15a\x15WW_\x80\xFD[a\x15c\x88\x82\x87\x01a\x13\xCDV[\x82\x84\x01RPPa\x01\xA0\x80\x84\x015\x83\x81\x11\x15a\x15|W_\x80\xFD[a\x15\x88\x88\x82\x87\x01a\t\xCFV[\x91\x83\x01\x91\x90\x91RP\x95\x94PPPPPV[_\x81Q\x80\x84R` \x80\x85\x01\x94P\x80\x84\x01_[\x83\x81\x10\x15a\x15\xC7W\x81Q\x87R\x95\x82\x01\x95\x90\x82\x01\x90`\x01\x01a\x15\xABV[P\x94\x95\x94PPPPPV[_\x81Q\x80\x84R` \x80\x85\x01\x94P\x80\x84\x01_[\x83\x81\x10\x15a\x15\xC7W\x81Q\x80Q\x88R\x83\x01Q\x83\x88\x01R`@\x90\x96\x01\x95\x90\x82\x01\x90`\x01\x01a\x15\xE4V[_\x81Q\x80\x84Ra\x16\"\x81` \x86\x01` \x86\x01a\x11\xFFV[`\x1F\x01`\x1F\x19\x16\x92\x90\x92\x01` \x01\x92\x91PPV[` \x81R\x81Q` \x82\x01R` \x82\x01Q`@\x82\x01R`@\x82\x01Q``\x82\x01R_``\x83\x01Qa\x16p`\x80\x84\x01\x82`\x01`\x01`\xA0\x1B\x03\x16\x90RV[P`\x80\x83\x01Q`\x01`\x01`\xA0\x1B\x03\x81\x16`\xA0\x84\x01RP`\xA0\x83\x01Q`\x01`\x01`\xA0\x1B\x03\x81\x16`\xC0\x84\x01RP`\xC0\x83\x01Q`\x01`\x01`\xA0\x1B\x03\x81\x16`\xE0\x84\x01RP`\xE0\x83\x01Qa\x01\0a\x16\xCC\x81\x85\x01\x83`\x01`\x01`\xA0\x1B\x03\x16\x90RV[\x84\x01Qa\x01 \x84\x81\x01\x91\x90\x91R\x84\x01Qa\x01@\x80\x85\x01\x91\x90\x91R\x84\x01Q\x90Pa\x01`a\x17\x02\x81\x85\x01\x83`\x01`\x01`\xA0\x1B\x03\x16\x90RV[\x80\x85\x01Q\x91PPa\x01\xC0a\x01\x80\x81\x81\x86\x01Ra\x17\"a\x01\xE0\x86\x01\x84a\x15\x99V[\x92P\x80\x86\x01Q\x90P`\x1F\x19a\x01\xA0\x81\x87\x86\x03\x01\x81\x88\x01Ra\x17C\x85\x84a\x15\xD2V[\x90\x88\x01Q\x87\x82\x03\x90\x92\x01\x84\x88\x01R\x93P\x90Pa\x17_\x83\x82a\x16\x0BV[\x96\x95PPPPPPV[` \x81R_a\x08h` \x83\x01\x84a\x16\x0BV[_` \x82\x84\x03\x12\x15a\x17\x8BW_\x80\xFD[PQ\x91\x90PV[cNH{q`\xE0\x1B_R`\x11`\x04R`$_\xFD[\x80\x82\x02\x81\x15\x82\x82\x04\x84\x14\x17a\x02\xAEWa\x02\xAEa\x17\x92V[\x80\x82\x01\x80\x82\x11\x15a\x02\xAEWa\x02\xAEa\x17\x92V\xFE\xA2dipfsX\"\x12 \xFFX\xF5i\xC7\xDB\x86s\xA8\x1En\x03\xD0\xA1\xA2b.\xCF\x0Bbz\xA6\xD7\xD0<\x8A\xECy\t\xD1\xB9ndsolcC\0\x08\x14\x003"; - /// The deployed bytecode of the contract. - pub static HOSTMANAGER_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static( - __DEPLOYED_BYTECODE, - ); - pub struct HostManager(::ethers::contract::Contract); - impl ::core::clone::Clone for HostManager { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for HostManager { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for HostManager { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for HostManager { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(HostManager)) - .field(&self.address()) - .finish() - } - } - impl HostManager { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - HOSTMANAGER_ABI.clone(), - client, - ), - ) - } - /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it. - /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction - /// - /// Notes: - /// - If there are no constructor arguments, you should pass `()` as the argument. - /// - The default poll duration is 7 seconds. - /// - The default number of confirmations is 1 block. - /// - /// - /// # Example - /// - /// Generate contract bindings with `abigen!` and deploy a new contract instance. - /// - /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. - /// - /// ```ignore - /// # async fn deploy(client: ::std::sync::Arc) { - /// abigen!(Greeter, "../greeter.json"); - /// - /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); - /// let msg = greeter_contract.greet().call().await.unwrap(); - /// # } - /// ``` - pub fn deploy( - client: ::std::sync::Arc, - constructor_args: T, - ) -> ::core::result::Result< - ::ethers::contract::builders::ContractDeployer, - ::ethers::contract::ContractError, - > { - let factory = ::ethers::contract::ContractFactory::new( - HOSTMANAGER_ABI.clone(), - HOSTMANAGER_BYTECODE.clone().into(), - client, - ); - let deployer = factory.deploy(constructor_args)?; - let deployer = ::ethers::contract::ContractDeployer::new(deployer); - Ok(deployer) - } - ///Calls the contract's `host` (0xf437bc59) function - pub fn host( - &self, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([244, 55, 188, 89], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `onAccept` (0x0fee32ce) function - pub fn on_accept( - &self, - incoming: IncomingPostRequest, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([15, 238, 50, 206], (incoming,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `onGetResponse` (0x44ab20f8) function - pub fn on_get_response( - &self, - p0: IncomingGetResponse, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([68, 171, 32, 248], (p0,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `onGetTimeout` (0xd0fff366) function - pub fn on_get_timeout( - &self, - p0: GetRequest, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([208, 255, 243, 102], (p0,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `onPostRequestTimeout` (0xbc0dd447) function - pub fn on_post_request_timeout( - &self, - p0: PostRequest, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([188, 13, 212, 71], (p0,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `onPostResponse` (0xb2a01bf5) function - pub fn on_post_response( - &self, - p0: IncomingPostResponse, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([178, 160, 27, 245], (p0,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `onPostResponseTimeout` (0x0bc37bab) function - pub fn on_post_response_timeout( - &self, - p0: PostResponse, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([11, 195, 123, 171], (p0,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `params` (0xcff0ab96) function - pub fn params( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([207, 240, 171, 150], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `quote` (0x108bc1dd) function - pub fn quote( - &self, - post: DispatchPost, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([16, 139, 193, 221], (post,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `quote` (0xdd92a316) function - pub fn quote_with_res( - &self, - res: DispatchPostResponse, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([221, 146, 163, 22], (res,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `setIsmpHost` (0x0e8324a2) function - pub fn set_ismp_host( - &self, - host: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([14, 131, 36, 162], host) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `supportsInterface` (0x01ffc9a7) function - pub fn supports_interface( - &self, - interface_id: [u8; 4], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([1, 255, 201, 167], interface_id) - .expect("method not found (this should never happen)") - } - } - impl From<::ethers::contract::Contract> - for HostManager { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - ///Custom Error type `UnauthorizedAction` with signature `UnauthorizedAction()` and selector `0x843800fa` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "UnauthorizedAction", abi = "UnauthorizedAction()")] - pub struct UnauthorizedAction; - ///Custom Error type `UnauthorizedCall` with signature `UnauthorizedCall()` and selector `0x7bf6a16f` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "UnauthorizedCall", abi = "UnauthorizedCall()")] - pub struct UnauthorizedCall; - ///Custom Error type `UnexpectedCall` with signature `UnexpectedCall()` and selector `0x02cbc79f` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "UnexpectedCall", abi = "UnexpectedCall()")] - pub struct UnexpectedCall; - ///Container type for all of the contract's custom errors - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum HostManagerErrors { - UnauthorizedAction(UnauthorizedAction), - UnauthorizedCall(UnauthorizedCall), - UnexpectedCall(UnexpectedCall), - /// The standard solidity revert string, with selector - /// Error(string) -- 0x08c379a0 - RevertString(::std::string::String), - } - impl ::ethers::core::abi::AbiDecode for HostManagerErrors { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = <::std::string::String as ::ethers::core::abi::AbiDecode>::decode( - data, - ) { - return Ok(Self::RevertString(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::UnauthorizedAction(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::UnauthorizedCall(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::UnexpectedCall(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for HostManagerErrors { - fn encode(self) -> ::std::vec::Vec { - match self { - Self::UnauthorizedAction(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::UnauthorizedCall(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::UnexpectedCall(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s), - } - } - } - impl ::ethers::contract::ContractRevert for HostManagerErrors { - fn valid_selector(selector: [u8; 4]) -> bool { - match selector { - [0x08, 0xc3, 0x79, 0xa0] => true, - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => { - true - } - _ => false, - } - } - } - impl ::core::fmt::Display for HostManagerErrors { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::UnauthorizedAction(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::UnauthorizedCall(element) => ::core::fmt::Display::fmt(element, f), - Self::UnexpectedCall(element) => ::core::fmt::Display::fmt(element, f), - Self::RevertString(s) => ::core::fmt::Display::fmt(s, f), - } - } - } - impl ::core::convert::From<::std::string::String> for HostManagerErrors { - fn from(value: String) -> Self { - Self::RevertString(value) - } - } - impl ::core::convert::From for HostManagerErrors { - fn from(value: UnauthorizedAction) -> Self { - Self::UnauthorizedAction(value) - } - } - impl ::core::convert::From for HostManagerErrors { - fn from(value: UnauthorizedCall) -> Self { - Self::UnauthorizedCall(value) - } - } - impl ::core::convert::From for HostManagerErrors { - fn from(value: UnexpectedCall) -> Self { - Self::UnexpectedCall(value) - } - } - ///Container type for all input parameters for the `host` function with signature `host()` and selector `0xf437bc59` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "host", abi = "host()")] - pub struct HostCall; - ///Container type for all input parameters for the `onAccept` function with signature `onAccept(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),address))` and selector `0x0fee32ce` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "onAccept", - abi = "onAccept(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),address))" - )] - pub struct OnAcceptCall { - pub incoming: IncomingPostRequest, - } - ///Container type for all input parameters for the `onGetResponse` function with signature `onGetResponse((((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]),address))` and selector `0x44ab20f8` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "onGetResponse", - abi = "onGetResponse((((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]),address))" - )] - pub struct OnGetResponseCall(pub IncomingGetResponse); - ///Container type for all input parameters for the `onGetTimeout` function with signature `onGetTimeout((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes))` and selector `0xd0fff366` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "onGetTimeout", - abi = "onGetTimeout((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes))" - )] - pub struct OnGetTimeoutCall(pub GetRequest); - ///Container type for all input parameters for the `onPostRequestTimeout` function with signature `onPostRequestTimeout((bytes,bytes,uint64,bytes,bytes,uint64,bytes))` and selector `0xbc0dd447` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "onPostRequestTimeout", - abi = "onPostRequestTimeout((bytes,bytes,uint64,bytes,bytes,uint64,bytes))" - )] - pub struct OnPostRequestTimeoutCall(pub PostRequest); - ///Container type for all input parameters for the `onPostResponse` function with signature `onPostResponse((((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),address))` and selector `0xb2a01bf5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "onPostResponse", - abi = "onPostResponse((((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),address))" - )] - pub struct OnPostResponseCall(pub IncomingPostResponse); - ///Container type for all input parameters for the `onPostResponseTimeout` function with signature `onPostResponseTimeout(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64))` and selector `0x0bc37bab` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "onPostResponseTimeout", - abi = "onPostResponseTimeout(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64))" - )] - pub struct OnPostResponseTimeoutCall(pub PostResponse); - ///Container type for all input parameters for the `params` function with signature `params()` and selector `0xcff0ab96` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "params", abi = "params()")] - pub struct ParamsCall; - ///Container type for all input parameters for the `quote` function with signature `quote((bytes,bytes,bytes,uint64,uint256,address))` and selector `0x108bc1dd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "quote", abi = "quote((bytes,bytes,bytes,uint64,uint256,address))")] - pub struct QuoteCall { - pub post: DispatchPost, - } - ///Container type for all input parameters for the `quote` function with signature `quote(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64,uint256,address))` and selector `0xdd92a316` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "quote", - abi = "quote(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64,uint256,address))" - )] - pub struct QuoteWithResCall { - pub res: DispatchPostResponse, - } - ///Container type for all input parameters for the `setIsmpHost` function with signature `setIsmpHost(address)` and selector `0x0e8324a2` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "setIsmpHost", abi = "setIsmpHost(address)")] - pub struct SetIsmpHostCall { - pub host: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")] - pub struct SupportsInterfaceCall { - pub interface_id: [u8; 4], - } - ///Container type for all of the contract's call - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum HostManagerCalls { - Host(HostCall), - OnAccept(OnAcceptCall), - OnGetResponse(OnGetResponseCall), - OnGetTimeout(OnGetTimeoutCall), - OnPostRequestTimeout(OnPostRequestTimeoutCall), - OnPostResponse(OnPostResponseCall), - OnPostResponseTimeout(OnPostResponseTimeoutCall), - Params(ParamsCall), - Quote(QuoteCall), - QuoteWithRes(QuoteWithResCall), - SetIsmpHost(SetIsmpHostCall), - SupportsInterface(SupportsInterfaceCall), - } - impl ::ethers::core::abi::AbiDecode for HostManagerCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Host(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::OnAccept(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::OnGetResponse(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::OnGetTimeout(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::OnPostRequestTimeout(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::OnPostResponse(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::OnPostResponseTimeout(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Params(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Quote(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::QuoteWithRes(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SetIsmpHost(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SupportsInterface(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for HostManagerCalls { - fn encode(self) -> Vec { - match self { - Self::Host(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::OnAccept(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::OnGetResponse(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::OnGetTimeout(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::OnPostRequestTimeout(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::OnPostResponse(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::OnPostResponseTimeout(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Params(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Quote(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::QuoteWithRes(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SetIsmpHost(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SupportsInterface(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for HostManagerCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::Host(element) => ::core::fmt::Display::fmt(element, f), - Self::OnAccept(element) => ::core::fmt::Display::fmt(element, f), - Self::OnGetResponse(element) => ::core::fmt::Display::fmt(element, f), - Self::OnGetTimeout(element) => ::core::fmt::Display::fmt(element, f), - Self::OnPostRequestTimeout(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::OnPostResponse(element) => ::core::fmt::Display::fmt(element, f), - Self::OnPostResponseTimeout(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::Params(element) => ::core::fmt::Display::fmt(element, f), - Self::Quote(element) => ::core::fmt::Display::fmt(element, f), - Self::QuoteWithRes(element) => ::core::fmt::Display::fmt(element, f), - Self::SetIsmpHost(element) => ::core::fmt::Display::fmt(element, f), - Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for HostManagerCalls { - fn from(value: HostCall) -> Self { - Self::Host(value) - } - } - impl ::core::convert::From for HostManagerCalls { - fn from(value: OnAcceptCall) -> Self { - Self::OnAccept(value) - } - } - impl ::core::convert::From for HostManagerCalls { - fn from(value: OnGetResponseCall) -> Self { - Self::OnGetResponse(value) - } - } - impl ::core::convert::From for HostManagerCalls { - fn from(value: OnGetTimeoutCall) -> Self { - Self::OnGetTimeout(value) - } - } - impl ::core::convert::From for HostManagerCalls { - fn from(value: OnPostRequestTimeoutCall) -> Self { - Self::OnPostRequestTimeout(value) - } - } - impl ::core::convert::From for HostManagerCalls { - fn from(value: OnPostResponseCall) -> Self { - Self::OnPostResponse(value) - } - } - impl ::core::convert::From for HostManagerCalls { - fn from(value: OnPostResponseTimeoutCall) -> Self { - Self::OnPostResponseTimeout(value) - } - } - impl ::core::convert::From for HostManagerCalls { - fn from(value: ParamsCall) -> Self { - Self::Params(value) - } - } - impl ::core::convert::From for HostManagerCalls { - fn from(value: QuoteCall) -> Self { - Self::Quote(value) - } - } - impl ::core::convert::From for HostManagerCalls { - fn from(value: QuoteWithResCall) -> Self { - Self::QuoteWithRes(value) - } - } - impl ::core::convert::From for HostManagerCalls { - fn from(value: SetIsmpHostCall) -> Self { - Self::SetIsmpHost(value) - } - } - impl ::core::convert::From for HostManagerCalls { - fn from(value: SupportsInterfaceCall) -> Self { - Self::SupportsInterface(value) - } - } - ///Container type for all return fields from the `host` function with signature `host()` and selector `0xf437bc59` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct HostReturn { - pub h: ::ethers::core::types::Address, - } - ///Container type for all return fields from the `params` function with signature `params()` and selector `0xcff0ab96` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ParamsReturn(pub HostManagerParams); - ///Container type for all return fields from the `quote` function with signature `quote((bytes,bytes,bytes,uint64,uint256,address))` and selector `0x108bc1dd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct QuoteReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `quote` function with signature `quote(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64,uint256,address))` and selector `0xdd92a316` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct QuoteWithResReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SupportsInterfaceReturn(pub bool); - ///`HostManagerParams(address,address)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct HostManagerParams { - pub admin: ::ethers::core::types::Address, - pub host: ::ethers::core::types::Address, - } + /// The deployed bytecode of the contract. + pub static HOSTMANAGER_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = + ::ethers::core::types::Bytes::from_static(__DEPLOYED_BYTECODE); + pub struct HostManager(::ethers::contract::Contract); + impl ::core::clone::Clone for HostManager { + fn clone(&self) -> Self { + Self(::core::clone::Clone::clone(&self.0)) + } + } + impl ::core::ops::Deref for HostManager { + type Target = ::ethers::contract::Contract; + fn deref(&self) -> &Self::Target { + &self.0 + } + } + impl ::core::ops::DerefMut for HostManager { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } + } + impl ::core::fmt::Debug for HostManager { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple(::core::stringify!(HostManager)).field(&self.address()).finish() + } + } + impl HostManager { + /// Creates a new contract instance with the specified `ethers` client at + /// `address`. The contract derefs to a `ethers::Contract` object. + pub fn new>( + address: T, + client: ::std::sync::Arc, + ) -> Self { + Self(::ethers::contract::Contract::new(address.into(), HOSTMANAGER_ABI.clone(), client)) + } + /// Constructs the general purpose `Deployer` instance based on the provided constructor + /// arguments and sends it. Returns a new instance of a deployer that returns an instance + /// of this contract after sending the transaction + /// + /// Notes: + /// - If there are no constructor arguments, you should pass `()` as the argument. + /// - The default poll duration is 7 seconds. + /// - The default number of confirmations is 1 block. + /// + /// + /// # Example + /// + /// Generate contract bindings with `abigen!` and deploy a new contract instance. + /// + /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. + /// + /// ```ignore + /// # async fn deploy(client: ::std::sync::Arc) { + /// abigen!(Greeter, "../greeter.json"); + /// + /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); + /// let msg = greeter_contract.greet().call().await.unwrap(); + /// # } + /// ``` + pub fn deploy( + client: ::std::sync::Arc, + constructor_args: T, + ) -> ::core::result::Result< + ::ethers::contract::builders::ContractDeployer, + ::ethers::contract::ContractError, + > { + let factory = ::ethers::contract::ContractFactory::new( + HOSTMANAGER_ABI.clone(), + HOSTMANAGER_BYTECODE.clone().into(), + client, + ); + let deployer = factory.deploy(constructor_args)?; + let deployer = ::ethers::contract::ContractDeployer::new(deployer); + Ok(deployer) + } + ///Calls the contract's `host` (0xf437bc59) function + pub fn host( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([244, 55, 188, 89], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `onAccept` (0x0fee32ce) function + pub fn on_accept( + &self, + incoming: IncomingPostRequest, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([15, 238, 50, 206], (incoming,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `onGetResponse` (0x44ab20f8) function + pub fn on_get_response( + &self, + p0: IncomingGetResponse, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([68, 171, 32, 248], (p0,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `onGetTimeout` (0xd0fff366) function + pub fn on_get_timeout( + &self, + p0: GetRequest, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([208, 255, 243, 102], (p0,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `onPostRequestTimeout` (0xbc0dd447) function + pub fn on_post_request_timeout( + &self, + p0: PostRequest, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([188, 13, 212, 71], (p0,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `onPostResponse` (0xb2a01bf5) function + pub fn on_post_response( + &self, + p0: IncomingPostResponse, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([178, 160, 27, 245], (p0,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `onPostResponseTimeout` (0x0bc37bab) function + pub fn on_post_response_timeout( + &self, + p0: PostResponse, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([11, 195, 123, 171], (p0,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `params` (0xcff0ab96) function + pub fn params(&self) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([207, 240, 171, 150], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `quote` (0x108bc1dd) function + pub fn quote( + &self, + post: DispatchPost, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([16, 139, 193, 221], (post,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `quote` (0xdd92a316) function + pub fn quote_with_res( + &self, + res: DispatchPostResponse, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([221, 146, 163, 22], (res,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `setIsmpHost` (0x0e8324a2) function + pub fn set_ismp_host( + &self, + host: ::ethers::core::types::Address, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([14, 131, 36, 162], host) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `supportsInterface` (0x01ffc9a7) function + pub fn supports_interface( + &self, + interface_id: [u8; 4], + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([1, 255, 201, 167], interface_id) + .expect("method not found (this should never happen)") + } + } + impl From<::ethers::contract::Contract> for HostManager { + fn from(contract: ::ethers::contract::Contract) -> Self { + Self::new(contract.address(), contract.client()) + } + } + ///Custom Error type `UnauthorizedAction` with signature `UnauthorizedAction()` and selector + /// `0x843800fa` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "UnauthorizedAction", abi = "UnauthorizedAction()")] + pub struct UnauthorizedAction; + ///Custom Error type `UnauthorizedCall` with signature `UnauthorizedCall()` and selector + /// `0x7bf6a16f` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "UnauthorizedCall", abi = "UnauthorizedCall()")] + pub struct UnauthorizedCall; + ///Custom Error type `UnexpectedCall` with signature `UnexpectedCall()` and selector + /// `0x02cbc79f` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "UnexpectedCall", abi = "UnexpectedCall()")] + pub struct UnexpectedCall; + ///Container type for all of the contract's custom errors + #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] + pub enum HostManagerErrors { + UnauthorizedAction(UnauthorizedAction), + UnauthorizedCall(UnauthorizedCall), + UnexpectedCall(UnexpectedCall), + /// The standard solidity revert string, with selector + /// Error(string) -- 0x08c379a0 + RevertString(::std::string::String), + } + impl ::ethers::core::abi::AbiDecode for HostManagerErrors { + fn decode( + data: impl AsRef<[u8]>, + ) -> ::core::result::Result { + let data = data.as_ref(); + if let Ok(decoded) = + <::std::string::String as ::ethers::core::abi::AbiDecode>::decode(data) + { + return Ok(Self::RevertString(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::UnauthorizedAction(decoded)); + } + if let Ok(decoded) = ::decode(data) + { + return Ok(Self::UnauthorizedCall(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::UnexpectedCall(decoded)); + } + Err(::ethers::core::abi::Error::InvalidData.into()) + } + } + impl ::ethers::core::abi::AbiEncode for HostManagerErrors { + fn encode(self) -> ::std::vec::Vec { + match self { + Self::UnauthorizedAction(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::UnauthorizedCall(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::UnexpectedCall(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s), + } + } + } + impl ::ethers::contract::ContractRevert for HostManagerErrors { + fn valid_selector(selector: [u8; 4]) -> bool { + match selector { + [0x08, 0xc3, 0x79, 0xa0] => true, + _ if selector == + ::selector() => + true, + _ if selector == ::selector() => + true, + _ if selector == ::selector() => + true, + _ => false, + } + } + } + impl ::core::fmt::Display for HostManagerErrors { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + match self { + Self::UnauthorizedAction(element) => ::core::fmt::Display::fmt(element, f), + Self::UnauthorizedCall(element) => ::core::fmt::Display::fmt(element, f), + Self::UnexpectedCall(element) => ::core::fmt::Display::fmt(element, f), + Self::RevertString(s) => ::core::fmt::Display::fmt(s, f), + } + } + } + impl ::core::convert::From<::std::string::String> for HostManagerErrors { + fn from(value: String) -> Self { + Self::RevertString(value) + } + } + impl ::core::convert::From for HostManagerErrors { + fn from(value: UnauthorizedAction) -> Self { + Self::UnauthorizedAction(value) + } + } + impl ::core::convert::From for HostManagerErrors { + fn from(value: UnauthorizedCall) -> Self { + Self::UnauthorizedCall(value) + } + } + impl ::core::convert::From for HostManagerErrors { + fn from(value: UnexpectedCall) -> Self { + Self::UnexpectedCall(value) + } + } + ///Container type for all input parameters for the `host` function with signature `host()` and + /// selector `0xf437bc59` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "host", abi = "host()")] + pub struct HostCall; + ///Container type for all input parameters for the `onAccept` function with signature + /// `onAccept(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),address))` and selector + /// `0x0fee32ce` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "onAccept", + abi = "onAccept(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),address))" + )] + pub struct OnAcceptCall { + pub incoming: IncomingPostRequest, + } + ///Container type for all input parameters for the `onGetResponse` function with signature + /// `onGetResponse((((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]), + /// address))` and selector `0x44ab20f8` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "onGetResponse", + abi = "onGetResponse((((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]),address))" + )] + pub struct OnGetResponseCall(pub IncomingGetResponse); + ///Container type for all input parameters for the `onGetTimeout` function with signature + /// `onGetTimeout((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes))` and selector + /// `0xd0fff366` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "onGetTimeout", + abi = "onGetTimeout((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes))" + )] + pub struct OnGetTimeoutCall(pub GetRequest); + ///Container type for all input parameters for the `onPostRequestTimeout` function with + /// signature `onPostRequestTimeout((bytes,bytes,uint64,bytes,bytes,uint64,bytes))` and selector + /// `0xbc0dd447` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "onPostRequestTimeout", + abi = "onPostRequestTimeout((bytes,bytes,uint64,bytes,bytes,uint64,bytes))" + )] + pub struct OnPostRequestTimeoutCall(pub PostRequest); + ///Container type for all input parameters for the `onPostResponse` function with signature + /// `onPostResponse((((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),address))` and + /// selector `0xb2a01bf5` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "onPostResponse", + abi = "onPostResponse((((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),address))" + )] + pub struct OnPostResponseCall(pub IncomingPostResponse); + ///Container type for all input parameters for the `onPostResponseTimeout` function with + /// signature `onPostResponseTimeout(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes, + /// uint64))` and selector `0x0bc37bab` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "onPostResponseTimeout", + abi = "onPostResponseTimeout(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64))" + )] + pub struct OnPostResponseTimeoutCall(pub PostResponse); + ///Container type for all input parameters for the `params` function with signature `params()` + /// and selector `0xcff0ab96` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "params", abi = "params()")] + pub struct ParamsCall; + ///Container type for all input parameters for the `quote` function with signature + /// `quote((bytes,bytes,bytes,uint64,uint256,address))` and selector `0x108bc1dd` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "quote", abi = "quote((bytes,bytes,bytes,uint64,uint256,address))")] + pub struct QuoteCall { + pub post: DispatchPost, + } + ///Container type for all input parameters for the `quote` function with signature + /// `quote(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64,uint256,address))` and + /// selector `0xdd92a316` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "quote", + abi = "quote(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64,uint256,address))" + )] + pub struct QuoteWithResCall { + pub res: DispatchPostResponse, + } + ///Container type for all input parameters for the `setIsmpHost` function with signature + /// `setIsmpHost(address)` and selector `0x0e8324a2` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "setIsmpHost", abi = "setIsmpHost(address)")] + pub struct SetIsmpHostCall { + pub host: ::ethers::core::types::Address, + } + ///Container type for all input parameters for the `supportsInterface` function with signature + /// `supportsInterface(bytes4)` and selector `0x01ffc9a7` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")] + pub struct SupportsInterfaceCall { + pub interface_id: [u8; 4], + } + ///Container type for all of the contract's call + #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] + pub enum HostManagerCalls { + Host(HostCall), + OnAccept(OnAcceptCall), + OnGetResponse(OnGetResponseCall), + OnGetTimeout(OnGetTimeoutCall), + OnPostRequestTimeout(OnPostRequestTimeoutCall), + OnPostResponse(OnPostResponseCall), + OnPostResponseTimeout(OnPostResponseTimeoutCall), + Params(ParamsCall), + Quote(QuoteCall), + QuoteWithRes(QuoteWithResCall), + SetIsmpHost(SetIsmpHostCall), + SupportsInterface(SupportsInterfaceCall), + } + impl ::ethers::core::abi::AbiDecode for HostManagerCalls { + fn decode( + data: impl AsRef<[u8]>, + ) -> ::core::result::Result { + let data = data.as_ref(); + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Host(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::OnAccept(decoded)); + } + if let Ok(decoded) = ::decode(data) + { + return Ok(Self::OnGetResponse(decoded)); + } + if let Ok(decoded) = ::decode(data) + { + return Ok(Self::OnGetTimeout(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::OnPostRequestTimeout(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::OnPostResponse(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::OnPostResponseTimeout(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Params(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Quote(decoded)); + } + if let Ok(decoded) = ::decode(data) + { + return Ok(Self::QuoteWithRes(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::SetIsmpHost(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::SupportsInterface(decoded)); + } + Err(::ethers::core::abi::Error::InvalidData.into()) + } + } + impl ::ethers::core::abi::AbiEncode for HostManagerCalls { + fn encode(self) -> Vec { + match self { + Self::Host(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::OnAccept(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::OnGetResponse(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::OnGetTimeout(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::OnPostRequestTimeout(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::OnPostResponse(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::OnPostResponseTimeout(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::Params(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::Quote(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::QuoteWithRes(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::SetIsmpHost(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::SupportsInterface(element) => ::ethers::core::abi::AbiEncode::encode(element), + } + } + } + impl ::core::fmt::Display for HostManagerCalls { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + match self { + Self::Host(element) => ::core::fmt::Display::fmt(element, f), + Self::OnAccept(element) => ::core::fmt::Display::fmt(element, f), + Self::OnGetResponse(element) => ::core::fmt::Display::fmt(element, f), + Self::OnGetTimeout(element) => ::core::fmt::Display::fmt(element, f), + Self::OnPostRequestTimeout(element) => ::core::fmt::Display::fmt(element, f), + Self::OnPostResponse(element) => ::core::fmt::Display::fmt(element, f), + Self::OnPostResponseTimeout(element) => ::core::fmt::Display::fmt(element, f), + Self::Params(element) => ::core::fmt::Display::fmt(element, f), + Self::Quote(element) => ::core::fmt::Display::fmt(element, f), + Self::QuoteWithRes(element) => ::core::fmt::Display::fmt(element, f), + Self::SetIsmpHost(element) => ::core::fmt::Display::fmt(element, f), + Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f), + } + } + } + impl ::core::convert::From for HostManagerCalls { + fn from(value: HostCall) -> Self { + Self::Host(value) + } + } + impl ::core::convert::From for HostManagerCalls { + fn from(value: OnAcceptCall) -> Self { + Self::OnAccept(value) + } + } + impl ::core::convert::From for HostManagerCalls { + fn from(value: OnGetResponseCall) -> Self { + Self::OnGetResponse(value) + } + } + impl ::core::convert::From for HostManagerCalls { + fn from(value: OnGetTimeoutCall) -> Self { + Self::OnGetTimeout(value) + } + } + impl ::core::convert::From for HostManagerCalls { + fn from(value: OnPostRequestTimeoutCall) -> Self { + Self::OnPostRequestTimeout(value) + } + } + impl ::core::convert::From for HostManagerCalls { + fn from(value: OnPostResponseCall) -> Self { + Self::OnPostResponse(value) + } + } + impl ::core::convert::From for HostManagerCalls { + fn from(value: OnPostResponseTimeoutCall) -> Self { + Self::OnPostResponseTimeout(value) + } + } + impl ::core::convert::From for HostManagerCalls { + fn from(value: ParamsCall) -> Self { + Self::Params(value) + } + } + impl ::core::convert::From for HostManagerCalls { + fn from(value: QuoteCall) -> Self { + Self::Quote(value) + } + } + impl ::core::convert::From for HostManagerCalls { + fn from(value: QuoteWithResCall) -> Self { + Self::QuoteWithRes(value) + } + } + impl ::core::convert::From for HostManagerCalls { + fn from(value: SetIsmpHostCall) -> Self { + Self::SetIsmpHost(value) + } + } + impl ::core::convert::From for HostManagerCalls { + fn from(value: SupportsInterfaceCall) -> Self { + Self::SupportsInterface(value) + } + } + ///Container type for all return fields from the `host` function with signature `host()` and + /// selector `0xf437bc59` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct HostReturn { + pub h: ::ethers::core::types::Address, + } + ///Container type for all return fields from the `params` function with signature `params()` + /// and selector `0xcff0ab96` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct ParamsReturn(pub HostManagerParams); + ///Container type for all return fields from the `quote` function with signature + /// `quote((bytes,bytes,bytes,uint64,uint256,address))` and selector `0x108bc1dd` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct QuoteReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `quote` function with signature + /// `quote(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64,uint256,address))` and + /// selector `0xdd92a316` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct QuoteWithResReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `supportsInterface` function with signature + /// `supportsInterface(bytes4)` and selector `0x01ffc9a7` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct SupportsInterfaceReturn(pub bool); + ///`HostManagerParams(address,address)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct HostManagerParams { + pub admin: ::ethers::core::types::Address, + pub host: ::ethers::core::types::Address, + } } diff --git a/evm/abi/src/generated/ping_module.rs b/evm/abi/src/generated/ping_module.rs index 18d84c61f..67fef3f57 100644 --- a/evm/abi/src/generated/ping_module.rs +++ b/evm/abi/src/generated/ping_module.rs @@ -2,1814 +2,1587 @@ pub use ping_module::*; /// This module was auto-generated with ethers-rs Abigen. /// More information at: #[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, + clippy::enum_variant_names, + clippy::too_many_arguments, + clippy::upper_case_acronyms, + clippy::type_complexity, + dead_code, + non_camel_case_types )] pub mod ping_module { - pub use super::super::shared_types::*; - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::Some(::ethers::core::abi::ethabi::Constructor { - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("admin"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - }), - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("dispatch"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("dispatch"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("request"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct PostRequest"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 32usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("dispatch"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("request"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Address, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Bytes, - ), - ), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct GetRequest"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 32usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("dispatchPostResponse"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "dispatchPostResponse", - ), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("response"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct PostResponse"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 32usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("dispatchToParachain"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "dispatchToParachain", - ), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_paraId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("host"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("host"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("onAccept"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("onAccept"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("incoming"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Address, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IncomingPostRequest", - ), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("onGetResponse"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("onGetResponse"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("response"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Address, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Bytes, - ), - ), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ), - ), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Address, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IncomingGetResponse", - ), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("onGetTimeout"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("onGetTimeout"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Address, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Bytes, - ), - ), - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct GetRequest"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("onPostRequestTimeout"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "onPostRequestTimeout", - ), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct PostRequest"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("onPostResponse"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("onPostResponse"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Address, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned( - "struct IncomingPostResponse", - ), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("onPostResponseTimeout"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "onPostResponseTimeout", - ), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct PostResponse"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("ping"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("ping"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("pingMessage"), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Address, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct PingMessage"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("previousPostRequest"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "previousPostRequest", - ), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct PostRequest"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("setIsmpHost"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("setIsmpHost"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("hostAddr"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("tokenFaucet"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("GetResponseReceived"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned( - "GetResponseReceived", - ), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("message"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Bytes, - ::ethers::core::abi::ethabi::ParamType::Bytes, - ], - ), - ), - ), - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("GetTimeoutReceived"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("GetTimeoutReceived"), - inputs: ::std::vec![], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("MessageDispatched"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("MessageDispatched"), - inputs: ::std::vec![], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("PostReceived"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("PostReceived"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("message"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("PostRequestTimeoutReceived"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned( - "PostRequestTimeoutReceived", - ), - inputs: ::std::vec![], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("PostResponseReceived"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned( - "PostResponseReceived", - ), - inputs: ::std::vec![], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("PostResponseTimeoutReceived"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned( - "PostResponseTimeoutReceived", - ), - inputs: ::std::vec![], - anonymous: false, - }, - ], - ), - ]), - errors: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("ExecutionFailed"), - ::std::vec![ - ::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("ExecutionFailed"), - inputs: ::std::vec![], - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("NotIsmpHost"), - ::std::vec![ - ::ethers::core::abi::ethabi::AbiError { - name: ::std::borrow::ToOwned::to_owned("NotIsmpHost"), - inputs: ::std::vec![], - }, - ], - ), - ]), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static PINGMODULE_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - #[rustfmt::skip] + pub use super::super::shared_types::*; + #[allow(deprecated)] + fn __abi() -> ::ethers::core::abi::Abi { + ::ethers::core::abi::ethabi::Contract { + constructor: ::core::option::Option::Some(::ethers::core::abi::ethabi::Constructor { + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("admin"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some(::std::borrow::ToOwned::to_owned( + "address" + ),), + },], + }), + functions: ::core::convert::From::from([ + ( + ::std::borrow::ToOwned::to_owned("dispatch"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("dispatch"), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("request"), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ],), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct PostRequest"), + ), + },], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bytes32"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: + ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("dispatch"), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("request"), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Address, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Array( + ::std::boxed::Box::new( + ::ethers::core::abi::ethabi::ParamType::Bytes, + ), + ), + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ],), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct GetRequest"), + ), + },], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bytes32"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: + ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("dispatchPostResponse"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("dispatchPostResponse",), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("response"), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ],), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ],), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct PostResponse"), + ), + },], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(32usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bytes32"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("dispatchToParachain"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("dispatchToParachain",), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_paraId"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("host"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("host"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("onAccept"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("onAccept"), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("incoming"), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ],), + ::ethers::core::abi::ethabi::ParamType::Address, + ],), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct IncomingPostRequest",), + ), + },], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("onGetResponse"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("onGetResponse"), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("response"), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Address, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Array( + ::std::boxed::Box::new( + ::ethers::core::abi::ethabi::ParamType::Bytes, + ), + ), + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ],), + ::ethers::core::abi::ethabi::ParamType::Array( + ::std::boxed::Box::new( + ::ethers::core::abi::ethabi::ParamType::Tuple( + ::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ], + ), + ), + ), + ],), + ::ethers::core::abi::ethabi::ParamType::Address, + ],), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct IncomingGetResponse",), + ), + },], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("onGetTimeout"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("onGetTimeout"), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Address, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Array( + ::std::boxed::Box::new( + ::ethers::core::abi::ethabi::ParamType::Bytes, + ), + ), + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ],), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct GetRequest"), + ), + },], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("onPostRequestTimeout"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("onPostRequestTimeout",), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ],), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct PostRequest"), + ), + },], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("onPostResponse"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("onPostResponse"), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ],), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ],), + ::ethers::core::abi::ethabi::ParamType::Address, + ],), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct IncomingPostResponse",), + ), + },], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("onPostResponseTimeout"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("onPostResponseTimeout",), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ],), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ],), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct PostResponse"), + ), + },], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("ping"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("ping"), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("pingMessage"), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Address, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Uint(256usize), + ::ethers::core::abi::ethabi::ParamType::Uint(256usize), + ],), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct PingMessage"), + ), + },], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("previousPostRequest"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("previousPostRequest",), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + ::ethers::core::abi::ethabi::ParamType::Bytes, + ],), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("struct PostRequest"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("setIsmpHost"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("setIsmpHost"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("hostAddr"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("tokenFaucet"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ]), + events: ::core::convert::From::from([ + ( + ::std::borrow::ToOwned::to_owned("GetResponseReceived"), + ::std::vec![::ethers::core::abi::ethabi::Event { + name: ::std::borrow::ToOwned::to_owned("GetResponseReceived",), + inputs: ::std::vec![::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("message"), + kind: ::ethers::core::abi::ethabi::ParamType::Array( + ::std::boxed::Box::new( + ::ethers::core::abi::ethabi::ParamType::Tuple(::std::vec![ + ::ethers::core::abi::ethabi::ParamType::Bytes, + ::ethers::core::abi::ethabi::ParamType::Bytes, + ],), + ), + ), + indexed: false, + },], + anonymous: false, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("GetTimeoutReceived"), + ::std::vec![::ethers::core::abi::ethabi::Event { + name: ::std::borrow::ToOwned::to_owned("GetTimeoutReceived"), + inputs: ::std::vec![], + anonymous: false, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("MessageDispatched"), + ::std::vec![::ethers::core::abi::ethabi::Event { + name: ::std::borrow::ToOwned::to_owned("MessageDispatched"), + inputs: ::std::vec![], + anonymous: false, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("PostReceived"), + ::std::vec![::ethers::core::abi::ethabi::Event { + name: ::std::borrow::ToOwned::to_owned("PostReceived"), + inputs: ::std::vec![::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("message"), + kind: ::ethers::core::abi::ethabi::ParamType::String, + indexed: false, + },], + anonymous: false, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("PostRequestTimeoutReceived"), + ::std::vec![::ethers::core::abi::ethabi::Event { + name: ::std::borrow::ToOwned::to_owned("PostRequestTimeoutReceived",), + inputs: ::std::vec![], + anonymous: false, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("PostResponseReceived"), + ::std::vec![::ethers::core::abi::ethabi::Event { + name: ::std::borrow::ToOwned::to_owned("PostResponseReceived",), + inputs: ::std::vec![], + anonymous: false, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("PostResponseTimeoutReceived"), + ::std::vec![::ethers::core::abi::ethabi::Event { + name: ::std::borrow::ToOwned::to_owned("PostResponseTimeoutReceived",), + inputs: ::std::vec![], + anonymous: false, + },], + ), + ]), + errors: ::core::convert::From::from([ + ( + ::std::borrow::ToOwned::to_owned("ExecutionFailed"), + ::std::vec![::ethers::core::abi::ethabi::AbiError { + name: ::std::borrow::ToOwned::to_owned("ExecutionFailed"), + inputs: ::std::vec![], + },], + ), + ( + ::std::borrow::ToOwned::to_owned("NotIsmpHost"), + ::std::vec![::ethers::core::abi::ethabi::AbiError { + name: ::std::borrow::ToOwned::to_owned("NotIsmpHost"), + inputs: ::std::vec![], + },], + ), + ]), + receive: false, + fallback: false, + } + } + ///The parsed JSON ABI of the contract. + pub static PINGMODULE_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = + ::ethers::contract::Lazy::new(__abi); + #[rustfmt::skip] const __BYTECODE: &[u8] = b"`\x80`@R4\x80\x15a\0\x0FW_\x80\xFD[P`@Qb\0%M8\x03\x80b\0%M\x839\x81\x01`@\x81\x90Ra\x000\x91a\0UV[`\x01\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16`\x01`\x01`\xA0\x1B\x03\x92\x90\x92\x16\x91\x90\x91\x17\x90Ua\0\x82V[_` \x82\x84\x03\x12\x15a\0eW_\x80\xFD[\x81Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\0{W_\x80\xFD[\x93\x92PPPV[a$\xBD\x80b\0\0\x90_9_\xF3\xFE`\x80`@R4\x80\x15a\0\x0FW_\x80\xFD[P`\x046\x10a\0\xE5W_5`\xE0\x1C\x80c\x88\xD9\xF1p\x11a\0\x88W\x80c\xD0\xFF\xF3f\x11a\0cW\x80c\xD0\xFF\xF3f\x14a\x01\xBEW\x80c\xD2\x10P\xDB\x14a\x01\xD1W\x80c\xEF/I\x82\x14a\x01\xE4W\x80c\xF47\xBCY\x14a\x01\xF7W_\x80\xFD[\x80c\x88\xD9\xF1p\x14a\x01\x83W\x80c\xB2\xA0\x1B\xF5\x14a\x01\x98W\x80c\xBC\r\xD4G\x14a\x01\xABW_\x80\xFD[\x80cJi.\x06\x11a\0\xC3W\x80cJi.\x06\x14a\x01$W\x80cM\r\x9C;\x14a\x017W\x80cp\xC5GO\x14a\x01]W\x80cr5N\x9B\x14a\x01pW_\x80\xFD[\x80c\x0B\xC3{\xAB\x14a\0\xE9W\x80c\x0F\xEE2\xCE\x14a\0\xFEW\x80cD\xAB \xF8\x14a\x01\x11W[_\x80\xFD[a\0\xFCa\0\xF76`\x04a\x18\xA1V[a\x02\x11V[\0[a\0\xFCa\x01\x0C6`\x04a\x18\xFCV[a\x02fV[a\0\xFCa\x01\x1F6`\x04a\x1B\x19V[a\x03\x87V[a\0\xFCa\x0126`\x04a\x1C\xB3V[a\x03\xF0V[a\x01Ja\x01E6`\x04a\x18\xA1V[a\x07\xD7V[`@Q\x90\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[a\x01Ja\x01k6`\x04a\x1DXV[a\n\x10V[a\0\xFCa\x01~6`\x04a\x1D\x89V[a\x0C\x11V[a\x01\x8Ba\r$V[`@Qa\x01T\x91\x90a\x1E\x96V[a\0\xFCa\x01\xA66`\x04a\x1E\xA8V[a\x10\x83V[a\0\xFCa\x01\xB96`\x04a\x1DXV[a\x10\xD8V[a\0\xFCa\x01\xCC6`\x04a\x1F\x03V[a\x11-V[a\x01Ja\x01\xDF6`\x04a\x1F\x03V[a\x11\x82V[a\0\xFCa\x01\xF26`\x04a\x1F4V[a\x12\x8BV[_T`@Q`\x01`\x01`\xA0\x1B\x03\x90\x91\x16\x81R` \x01a\x01TV[_T`\x01`\x01`\xA0\x1B\x03\x163\x14a\x02;W`@QcQ\xAB\x8D\xE5`\xE0\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[`@Q\x7Fhv\xFA>\xCC}\x82\x1F!]\x82\x12B\xCB\xBE\x1F\x0E0\xA0\n\x85\xC2\"\xD6\x92\xA7\x96\x8F\xD3\xAF\xF1\x0B\x90_\x90\xA1PV[_T`\x01`\x01`\xA0\x1B\x03\x163\x14a\x02\x90W`@QcQ\xAB\x8D\xE5`\xE0\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[\x80Q`\xC0\x01Q`@Q\x7F\xFB\x08{?\xFB\xBB\x0F\xC9\"\xDC\xCF\x87%\x08g\x1Av\x05\x85\x94#\xEB\x90\xEB\x01LV\xFD\xBA\x14\x84\xDC\x91a\x02\xC4\x91a\x1FkV[`@Q\x80\x91\x03\x90\xA1\x80Q\x80Q`\x02\x90\x81\x90a\x02\xDF\x90\x82a \x02V[P` \x82\x01Q`\x01\x82\x01\x90a\x02\xF4\x90\x82a \x02V[P`@\x82\x01Q`\x02\x82\x01\x80Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x19\x16`\x01`\x01`@\x1B\x03\x90\x92\x16\x91\x90\x91\x17\x90U``\x82\x01Q`\x03\x82\x01\x90a\x030\x90\x82a \x02V[P`\x80\x82\x01Q`\x04\x82\x01\x90a\x03E\x90\x82a \x02V[P`\xA0\x82\x01Q`\x05\x82\x01\x80Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x19\x16`\x01`\x01`@\x1B\x03\x90\x92\x16\x91\x90\x91\x17\x90U`\xC0\x82\x01Q`\x06\x82\x01\x90a\x03\x81\x90\x82a \x02V[PPPPV[_T`\x01`\x01`\xA0\x1B\x03\x163\x14a\x03\xB1W`@QcQ\xAB\x8D\xE5`\xE0\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[\x80Q` \x01Q`@Q\x7FD\xABVY^\x8E\xF4.\xF9\xDF\x1D\xD8=\xBB\xCE\xF4Y=\xC8\x98\xF7\x94\xA0\x1D\x02_\x0C?\xF6\x01\xA6X\x91a\x03\xE5\x91a \xBDV[`@Q\x80\x91\x03\x90\xA1PV[_\x80_\x90T\x90a\x01\0\n\x90\x04`\x01`\x01`\xA0\x1B\x03\x16`\x01`\x01`\xA0\x1B\x03\x16c\xF47\xBCY`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01_`@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x04?W=_\x80>=_\xFD[PPPP`@Q=_\x82>`\x1F=\x90\x81\x01`\x1F\x19\x16\x82\x01`@Ra\x04f\x91\x90\x81\x01\x90a!@V[`@Q` \x01a\x04v\x91\x90a!\xA8V[`@\x80Q`\x1F\x19\x81\x84\x03\x01\x81R\x90\x82\x90R_\x80T\x85Qc \x08\xF6\x05`\xE1\x1B\x85R\x92\x94P\x90\x92`\x01`\x01`\xA0\x1B\x03\x90\x91\x16\x91c@\x11\xEC\n\x91a\x04\xBA\x91\x90`\x04\x01a\x1FkV[` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x04\xD5W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x04\xF9\x91\x90a!\xDAV[\x90P_\x80_\x90T\x90a\x01\0\n\x90\x04`\x01`\x01`\xA0\x1B\x03\x16`\x01`\x01`\xA0\x1B\x03\x16cdxF\xA5`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x05KW=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x05o\x91\x90a!\xF1V[\x90P_\x83Q` \x11a\x05\x82W\x83Qa\x05\x85V[` [\x90P_\x85``\x01Q\x82\x85a\x05\x99\x91\x90a\" V[\x87`\x80\x01Qa\x05\xA8\x91\x90a\"7V[a\x05\xB2\x91\x90a\" V[`@Qc#\xB8r\xDD`\xE0\x1B\x81R3`\x04\x82\x01R0`$\x82\x01R`D\x81\x01\x82\x90R\x90\x91P`\x01`\x01`\xA0\x1B\x03\x84\x16\x90c#\xB8r\xDD\x90`d\x01` `@Q\x80\x83\x03\x81_\x87Z\xF1\x15\x80\x15a\x06\x05W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x06)\x91\x90a\"JV[P_[\x86``\x01Q\x81\x10\x15a\x07\xCEW_`@Q\x80`\xC0\x01`@R\x80\x89_\x01Q\x81R` \x01\x89` \x01Q`@Q` \x01a\x06z\x91\x90``\x91\x90\x91\x1Bk\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x19\x16\x81R`\x14\x01\x90V[`@Q` \x81\x83\x03\x03\x81R\x90`@R\x81R` \x01_\x80T\x90a\x01\0\n\x90\x04`\x01`\x01`\xA0\x1B\x03\x16`\x01`\x01`\xA0\x1B\x03\x16c\xF47\xBCY`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01_`@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x06\xDBW=_\x80>=_\xFD[PPPP`@Q=_\x82>`\x1F=\x90\x81\x01`\x1F\x19\x16\x82\x01`@Ra\x07\x02\x91\x90\x81\x01\x90a!@V[`@Q` \x01a\x07\x12\x91\x90a!\xA8V[`@\x80Q`\x1F\x19\x81\x84\x03\x01\x81R\x91\x81R\x90\x82R\x8A\x81\x01Q`\x01`\x01`@\x1B\x03\x16` \x83\x01R`\x80\x8B\x01Q\x82\x82\x01R2``\x90\x92\x01\x91\x90\x91R_T\x90Qc\xB8\xF3\xE8\xF5`\xE0\x1B\x81R\x91\x92P`\x01`\x01`\xA0\x1B\x03\x16\x90c\xB8\xF3\xE8\xF5\x90a\x07y\x90\x84\x90`\x04\x01a\"iV[` `@Q\x80\x83\x03\x81_\x87Z\xF1\x15\x80\x15a\x07\x95W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x07\xB9\x91\x90a!\xDAV[PP\x80\x80a\x07\xC6\x90a\"\xFCV[\x91PPa\x06,V[PPPPPPPV[_\x80T\x82QQ`@Qc \x08\xF6\x05`\xE1\x1B\x81R\x83\x92`\x01`\x01`\xA0\x1B\x03\x16\x91c@\x11\xEC\n\x91a\x08\t\x91\x90`\x04\x01a\x1FkV[` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x08$W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x08H\x91\x90a!\xDAV[\x90P_\x80_\x90T\x90a\x01\0\n\x90\x04`\x01`\x01`\xA0\x1B\x03\x16`\x01`\x01`\xA0\x1B\x03\x16cdxF\xA5`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x08\x9AW=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x08\xBE\x91\x90a!\xF1V[\x90P_\x84` \x01QQ` \x11a\x08\xD9W\x84` \x01QQa\x08\xDCV[` [\x90P_a\x08\xE9\x82\x85a\" V[`@Qc#\xB8r\xDD`\xE0\x1B\x81R3`\x04\x82\x01R0`$\x82\x01R`D\x81\x01\x82\x90R\x90\x91P`\x01`\x01`\xA0\x1B\x03\x84\x16\x90c#\xB8r\xDD\x90`d\x01` `@Q\x80\x83\x03\x81_\x87Z\xF1\x15\x80\x15a\t=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\t`\x91\x90a\"JV[P`@\x80Q`\xA0\x81\x01\x82R\x87Q\x81R` \x80\x89\x01Q\x90\x82\x01R\x87\x82\x01Q`\x01`\x01`@\x1B\x03\x16\x81\x83\x01R_``\x82\x01\x81\x90R2`\x80\x83\x01RT\x91Qc\x94H\x08\x05`\xE0\x1B\x81R\x90\x91`\x01`\x01`\xA0\x1B\x03\x16\x90c\x94H\x08\x05\x90a\t\xC5\x90\x84\x90`\x04\x01a#\x14V[` `@Q\x80\x83\x03\x81_\x87Z\xF1\x15\x80\x15a\t\xE1W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\n\x05\x91\x90a!\xDAV[\x97\x96PPPPPPPV[_\x80T` \x83\x01Q`@Qc \x08\xF6\x05`\xE1\x1B\x81R\x83\x92`\x01`\x01`\xA0\x1B\x03\x16\x91c@\x11\xEC\n\x91a\nD\x91\x90`\x04\x01a\x1FkV[` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\n_W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\n\x83\x91\x90a!\xDAV[\x90P_\x80_\x90T\x90a\x01\0\n\x90\x04`\x01`\x01`\xA0\x1B\x03\x16`\x01`\x01`\xA0\x1B\x03\x16cdxF\xA5`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\n\xD5W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\n\xF9\x91\x90a!\xF1V[\x90P_\x84`\xC0\x01QQ` \x11a\x0B\x14W\x84`\xC0\x01QQa\x0B\x17V[` [\x90P_a\x0B$\x82\x85a\" V[`@Qc#\xB8r\xDD`\xE0\x1B\x81R3`\x04\x82\x01R0`$\x82\x01R`D\x81\x01\x82\x90R\x90\x91P`\x01`\x01`\xA0\x1B\x03\x84\x16\x90c#\xB8r\xDD\x90`d\x01` `@Q\x80\x83\x03\x81_\x87Z\xF1\x15\x80\x15a\x0BwW=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x0B\x9B\x91\x90a\"JV[P`@\x80Q`\xC0\x80\x82\x01\x83R` \x80\x8A\x01Q\x83R`\x80\x80\x8B\x01Q\x91\x84\x01\x91\x90\x91R\x90\x89\x01Q\x82\x84\x01R`\xA0\x80\x8A\x01Q`\x01`\x01`@\x1B\x03\x16``\x84\x01R_\x91\x83\x01\x82\x90R2\x90\x83\x01RT\x91Qc\xB8\xF3\xE8\xF5`\xE0\x1B\x81R\x90\x91`\x01`\x01`\xA0\x1B\x03\x16\x90c\xB8\xF3\xE8\xF5\x90a\t\xC5\x90\x84\x90`\x04\x01a\"iV[_`@Q\x80`\xC0\x01`@R\x80a\x0C&\x84a\x14\x15V[\x81R` \x01`@Q\x80`@\x01`@R\x80`\x08\x81R` \x01g\x1A\\\xDB\\\x0BX\\\xDD`\xC2\x1B\x81RP\x81R` \x01`@Q\x80`@\x01`@R\x80`\x0E\x81R` \x01mhello from evm`\x90\x1B\x81RP\x81R` \x01_`\x01`\x01`@\x1B\x03\x16\x81R` \x01_\x81R` \x012`\x01`\x01`\xA0\x1B\x03\x16\x81RP\x90P_\x80T\x90a\x01\0\n\x90\x04`\x01`\x01`\xA0\x1B\x03\x16`\x01`\x01`\xA0\x1B\x03\x16c\xB8\xF3\xE8\xF5\x82`@Q\x82c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01a\x0C\xDF\x91\x90a\"iV[` `@Q\x80\x83\x03\x81_\x87Z\xF1\x15\x80\x15a\x0C\xFBW=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\r\x1F\x91\x90a!\xDAV[PPPV[a\rt`@Q\x80`\xE0\x01`@R\x80``\x81R` \x01``\x81R` \x01_`\x01`\x01`@\x1B\x03\x16\x81R` \x01``\x81R` \x01``\x81R` \x01_`\x01`\x01`@\x1B\x03\x16\x81R` \x01``\x81RP\x90V[`\x02`@Q\x80`\xE0\x01`@R\x90\x81_\x82\x01\x80Ta\r\x90\x90a\x1F}V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\r\xBC\x90a\x1F}V[\x80\x15a\x0E\x07W\x80`\x1F\x10a\r\xDEWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x0E\x07V[\x82\x01\x91\x90_R` _ \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\r\xEAW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x81R` \x01`\x01\x82\x01\x80Ta\x0E \x90a\x1F}V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x0EL\x90a\x1F}V[\x80\x15a\x0E\x97W\x80`\x1F\x10a\x0EnWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x0E\x97V[\x82\x01\x91\x90_R` _ \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x0EzW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x02\x82\x01T`\x01`\x01`@\x1B\x03\x16` \x82\x01R`\x03\x82\x01\x80T`@\x90\x92\x01\x91a\x0E\xC7\x90a\x1F}V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x0E\xF3\x90a\x1F}V[\x80\x15a\x0F>W\x80`\x1F\x10a\x0F\x15Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x0F>V[\x82\x01\x91\x90_R` _ \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x0F!W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x81R` \x01`\x04\x82\x01\x80Ta\x0FW\x90a\x1F}V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x0F\x83\x90a\x1F}V[\x80\x15a\x0F\xCEW\x80`\x1F\x10a\x0F\xA5Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x0F\xCEV[\x82\x01\x91\x90_R` _ \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x0F\xB1W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x05\x82\x01T`\x01`\x01`@\x1B\x03\x16` \x82\x01R`\x06\x82\x01\x80T`@\x90\x92\x01\x91a\x0F\xFE\x90a\x1F}V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x10*\x90a\x1F}V[\x80\x15a\x10uW\x80`\x1F\x10a\x10LWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x10uV[\x82\x01\x91\x90_R` _ \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x10XW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x81RPP\x90P\x90V[_T`\x01`\x01`\xA0\x1B\x03\x163\x14a\x10\xADW`@QcQ\xAB\x8D\xE5`\xE0\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[`@Q\x7F\xD7\xDC\x99\xAF\xB6\xC309\xCE\xA4PZ\x9E,\xAB4q\xD3Y\xCE\xBE\x02\x1E\xC1'\xDC\x94\xDD\xD3Y\xD3\xC5\x90_\x90\xA1PV[_T`\x01`\x01`\xA0\x1B\x03\x163\x14a\x11\x02W`@QcQ\xAB\x8D\xE5`\xE0\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[`@Q\x7F\xBB\xF4\x8AR\xB8>\xBC=\x9E9\xF0\x92\xA8\xB9\xB7\xE5o\x1D\xD0\xDCC\x8B\xEF@\xDC}\x92\x99Bp\xA5\x9F\x90_\x90\xA1PV[_T`\x01`\x01`\xA0\x1B\x03\x163\x14a\x11WW`@QcQ\xAB\x8D\xE5`\xE0\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[`@Q\x7F\x83\xE6 %\xE4\xBCXu\x16\xD0\xBC1^2\x9E\xAC\x0Cf6(T\xFE\xB7\xCDA5\xEF\x81C\xBA\x15\xF9\x90_\x90\xA1PV[_\x80`@Q\x80`\xC0\x01`@R\x80\x84` \x01Q\x81R` \x01\x84`\xC0\x01Q`\x01`\x01`@\x1B\x03\x16\x81R` \x01\x84`\xA0\x01Q\x81R` \x01\x84`\x80\x01Q`\x01`\x01`@\x1B\x03\x16\x81R` \x01_\x81R` \x01_`\x01`\x01`@\x1B\x03\x81\x11\x15a\x11\xE7Wa\x11\xE7a\x15\xADV[`@Q\x90\x80\x82R\x80`\x1F\x01`\x1F\x19\x16` \x01\x82\x01`@R\x80\x15a\x12\x11W` \x82\x01\x81\x806\x837\x01\x90P[P\x90R_T`@Qc\xD2.3C`\xE0\x1B\x81R\x91\x92P`\x01`\x01`\xA0\x1B\x03\x16\x90c\xD2.3C\x90a\x12D\x90\x84\x90`\x04\x01a#\x88V[` `@Q\x80\x83\x03\x81_\x87Z\xF1\x15\x80\x15a\x12`W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x12\x84\x91\x90a!\xDAV[\x93\x92PPPV[`\x01T`\x01`\x01`\xA0\x1B\x03\x163\x14a\x12\xB6W`@QcQ\xAB\x8D\xE5`\xE0\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[_\x82`\x01`\x01`\xA0\x1B\x03\x16cdxF\xA5`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x12\xF3W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x13\x17\x91\x90a!\xF1V[`@Qc\t^\xA7\xB3`\xE0\x1B\x81R`\x01`\x01`\xA0\x1B\x03\x85\x81\x16`\x04\x83\x01R_\x19`$\x83\x01R\x91\x92P\x90\x82\x16\x90c\t^\xA7\xB3\x90`D\x01` `@Q\x80\x83\x03\x81_\x87Z\xF1\x15\x80\x15a\x13gW=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x13\x8B\x91\x90a\"JV[P`\x01`\x01`\xA0\x1B\x03\x82\x16\x15a\x13\xF2W`@Qc3\xD2\xE6\x83`\xE1\x1B\x81R`\x01`\x01`\xA0\x1B\x03\x82\x81\x16`\x04\x83\x01R\x83\x16\x90cg\xA5\xCD\x06\x90`$\x01_`@Q\x80\x83\x03\x81_\x87\x80;\x15\x80\x15a\x13\xDBW_\x80\xFD[PZ\xF1\x15\x80\x15a\x13\xEDW=_\x80>=_\xFD[PPPP[PP_\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16`\x01`\x01`\xA0\x1B\x03\x92\x90\x92\x16\x91\x90\x91\x17\x90UV[``a\x14 \x82a\x14FV[`@Q` \x01a\x140\x91\x90a$YV[`@Q` \x81\x83\x03\x03\x81R\x90`@R\x90P\x91\x90PV[``_a\x14R\x83a\x14\xD5V[`\x01\x01\x90P_\x81`\x01`\x01`@\x1B\x03\x81\x11\x15a\x14pWa\x14pa\x15\xADV[`@Q\x90\x80\x82R\x80`\x1F\x01`\x1F\x19\x16` \x01\x82\x01`@R\x80\x15a\x14\x9AW` \x82\x01\x81\x806\x837\x01\x90P[P\x90P\x81\x81\x01` \x01[_\x19\x01o\x18\x18\x99\x19\x9A\x1A\x9B\x1B\x9C\x1C\xB0\xB11\xB22\xB3`\x81\x1B`\n\x86\x06\x1A\x81S`\n\x85\x04\x94P\x84a\x14\xA4WP\x93\x92PPPV[_\x80r\x18O\x03\xE9?\xF9\xF4\xDA\xA7\x97\xEDn8\xEDd\xBFj\x1F\x01`@\x1B\x83\x10a\x15\x13Wr\x18O\x03\xE9?\xF9\xF4\xDA\xA7\x97\xEDn8\xEDd\xBFj\x1F\x01`@\x1B\x83\x04\x92P`@\x01[m\x04\xEE-mA[\x85\xAC\xEF\x81\0\0\0\0\x83\x10a\x15?Wm\x04\xEE-mA[\x85\xAC\xEF\x81\0\0\0\0\x83\x04\x92P` \x01[f#\x86\xF2o\xC1\0\0\x83\x10a\x15]Wf#\x86\xF2o\xC1\0\0\x83\x04\x92P`\x10\x01[c\x05\xF5\xE1\0\x83\x10a\x15uWc\x05\xF5\xE1\0\x83\x04\x92P`\x08\x01[a'\x10\x83\x10a\x15\x89Wa'\x10\x83\x04\x92P`\x04\x01[`d\x83\x10a\x15\x9BW`d\x83\x04\x92P`\x02\x01[`\n\x83\x10a\x15\xA7W`\x01\x01[\x92\x91PPV[cNH{q`\xE0\x1B_R`A`\x04R`$_\xFD[`@Q`\xE0\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x15\xE3Wa\x15\xE3a\x15\xADV[`@R\x90V[`@\x80Q\x90\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x15\xE3Wa\x15\xE3a\x15\xADV[`@Qa\x01\0\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x15\xE3Wa\x15\xE3a\x15\xADV[`@Q`\xA0\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x15\xE3Wa\x15\xE3a\x15\xADV[`@Q`\x1F\x82\x01`\x1F\x19\x16\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x16xWa\x16xa\x15\xADV[`@R\x91\x90PV[_`\x01`\x01`@\x1B\x03\x82\x11\x15a\x16\x98Wa\x16\x98a\x15\xADV[P`\x1F\x01`\x1F\x19\x16` \x01\x90V[_\x82`\x1F\x83\x01\x12a\x16\xB5W_\x80\xFD[\x815a\x16\xC8a\x16\xC3\x82a\x16\x80V[a\x16PV[\x81\x81R\x84` \x83\x86\x01\x01\x11\x15a\x16\xDCW_\x80\xFD[\x81` \x85\x01` \x83\x017_\x91\x81\x01` \x01\x91\x90\x91R\x93\x92PPPV[\x805`\x01`\x01`@\x1B\x03\x81\x16\x81\x14a\x17\x0EW_\x80\xFD[\x91\x90PV[_`\xE0\x82\x84\x03\x12\x15a\x17#W_\x80\xFD[a\x17+a\x15\xC1V[\x90P\x815`\x01`\x01`@\x1B\x03\x80\x82\x11\x15a\x17CW_\x80\xFD[a\x17O\x85\x83\x86\x01a\x16\xA6V[\x83R` \x84\x015\x91P\x80\x82\x11\x15a\x17dW_\x80\xFD[a\x17p\x85\x83\x86\x01a\x16\xA6V[` \x84\x01Ra\x17\x81`@\x85\x01a\x16\xF8V[`@\x84\x01R``\x84\x015\x91P\x80\x82\x11\x15a\x17\x99W_\x80\xFD[a\x17\xA5\x85\x83\x86\x01a\x16\xA6V[``\x84\x01R`\x80\x84\x015\x91P\x80\x82\x11\x15a\x17\xBDW_\x80\xFD[a\x17\xC9\x85\x83\x86\x01a\x16\xA6V[`\x80\x84\x01Ra\x17\xDA`\xA0\x85\x01a\x16\xF8V[`\xA0\x84\x01R`\xC0\x84\x015\x91P\x80\x82\x11\x15a\x17\xF2W_\x80\xFD[Pa\x17\xFF\x84\x82\x85\x01a\x16\xA6V[`\xC0\x83\x01RP\x92\x91PPV[_``\x82\x84\x03\x12\x15a\x18\x1BW_\x80\xFD[`@Q``\x81\x01`\x01`\x01`@\x1B\x03\x82\x82\x10\x81\x83\x11\x17\x15a\x18>Wa\x18>a\x15\xADV[\x81`@R\x82\x93P\x845\x91P\x80\x82\x11\x15a\x18UW_\x80\xFD[a\x18a\x86\x83\x87\x01a\x17\x13V[\x83R` \x85\x015\x91P\x80\x82\x11\x15a\x18vW_\x80\xFD[Pa\x18\x83\x85\x82\x86\x01a\x16\xA6V[` \x83\x01RPa\x18\x95`@\x84\x01a\x16\xF8V[`@\x82\x01RP\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x18\xB1W_\x80\xFD[\x815`\x01`\x01`@\x1B\x03\x81\x11\x15a\x18\xC6W_\x80\xFD[a\x18\xD2\x84\x82\x85\x01a\x18\x0BV[\x94\x93PPPPV[`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x18\xEEW_\x80\xFD[PV[\x805a\x17\x0E\x81a\x18\xDAV[_` \x82\x84\x03\x12\x15a\x19\x0CW_\x80\xFD[\x815`\x01`\x01`@\x1B\x03\x80\x82\x11\x15a\x19\"W_\x80\xFD[\x90\x83\x01\x90`@\x82\x86\x03\x12\x15a\x195W_\x80\xFD[a\x19=a\x15\xE9V[\x825\x82\x81\x11\x15a\x19KW_\x80\xFD[a\x19W\x87\x82\x86\x01a\x17\x13V[\x82RP` \x83\x015\x92Pa\x19j\x83a\x18\xDAV[` \x81\x01\x92\x90\x92RP\x93\x92PPPV[_`\x01`\x01`@\x1B\x03\x82\x11\x15a\x19\x92Wa\x19\x92a\x15\xADV[P`\x05\x1B` \x01\x90V[_\x82`\x1F\x83\x01\x12a\x19\xABW_\x80\xFD[\x815` a\x19\xBBa\x16\xC3\x83a\x19zV[\x82\x81R`\x05\x92\x90\x92\x1B\x84\x01\x81\x01\x91\x81\x81\x01\x90\x86\x84\x11\x15a\x19\xD9W_\x80\xFD[\x82\x86\x01[\x84\x81\x10\x15a\x1A\x17W\x805`\x01`\x01`@\x1B\x03\x81\x11\x15a\x19\xFBW_\x80\x81\xFD[a\x1A\t\x89\x86\x83\x8B\x01\x01a\x16\xA6V[\x84RP\x91\x83\x01\x91\x83\x01a\x19\xDDV[P\x96\x95PPPPPPV[_a\x01\0\x82\x84\x03\x12\x15a\x1A3W_\x80\xFD[a\x1A;a\x16\x0BV[\x90P\x815`\x01`\x01`@\x1B\x03\x80\x82\x11\x15a\x1ASW_\x80\xFD[a\x1A_\x85\x83\x86\x01a\x16\xA6V[\x83R` \x84\x015\x91P\x80\x82\x11\x15a\x1AtW_\x80\xFD[a\x1A\x80\x85\x83\x86\x01a\x16\xA6V[` \x84\x01Ra\x1A\x91`@\x85\x01a\x16\xF8V[`@\x84\x01Ra\x1A\xA2``\x85\x01a\x18\xF1V[``\x84\x01Ra\x1A\xB3`\x80\x85\x01a\x16\xF8V[`\x80\x84\x01R`\xA0\x84\x015\x91P\x80\x82\x11\x15a\x1A\xCBW_\x80\xFD[a\x1A\xD7\x85\x83\x86\x01a\x19\x9CV[`\xA0\x84\x01Ra\x1A\xE8`\xC0\x85\x01a\x16\xF8V[`\xC0\x84\x01R`\xE0\x84\x015\x91P\x80\x82\x11\x15a\x1B\0W_\x80\xFD[Pa\x1B\r\x84\x82\x85\x01a\x16\xA6V[`\xE0\x83\x01RP\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x1B)W_\x80\xFD[`\x01`\x01`@\x1B\x03\x80\x835\x11\x15a\x1B>W_\x80\xFD[\x825\x83\x01`@\x81\x86\x03\x12\x15a\x1BQW_\x80\xFD[a\x1BYa\x15\xE9V[\x82\x825\x11\x15a\x1BfW_\x80\xFD[\x815\x82\x01`@\x81\x88\x03\x12\x15a\x1ByW_\x80\xFD[a\x1B\x81a\x15\xE9V[\x84\x825\x11\x15a\x1B\x8EW_\x80\xFD[a\x1B\x9B\x88\x835\x84\x01a\x1A\"V[\x81R\x84` \x83\x015\x11\x15a\x1B\xADW_\x80\xFD[` \x82\x015\x82\x01\x91P\x87`\x1F\x83\x01\x12a\x1B\xC4W_\x80\xFD[a\x1B\xD1a\x16\xC3\x835a\x19zV[\x825\x80\x82R` \x80\x83\x01\x92\x91`\x05\x1B\x85\x01\x01\x8A\x81\x11\x15a\x1B\xEFW_\x80\xFD[` \x85\x01[\x81\x81\x10\x15a\x1C\x8AW\x88\x815\x11\x15a\x1C\tW_\x80\xFD[\x805\x86\x01`@\x81\x8E\x03`\x1F\x19\x01\x12\x15a\x1C W_\x80\xFD[a\x1C(a\x15\xE9V[\x8A` \x83\x015\x11\x15a\x1C8W_\x80\xFD[a\x1CJ\x8E` \x80\x85\x015\x85\x01\x01a\x16\xA6V[\x81R\x8A`@\x83\x015\x11\x15a\x1C\\W_\x80\xFD[a\x1Co\x8E` `@\x85\x015\x85\x01\x01a\x16\xA6V[` \x82\x01R\x80\x86RPP` \x84\x01\x93P` \x81\x01\x90Pa\x1B\xF4V[PP\x80` \x84\x01RPP\x80\x83RPPa\x1C\xA5` \x83\x01a\x18\xF1V[` \x82\x01R\x95\x94PPPPPV[_` \x82\x84\x03\x12\x15a\x1C\xC3W_\x80\xFD[\x815`\x01`\x01`@\x1B\x03\x80\x82\x11\x15a\x1C\xD9W_\x80\xFD[\x90\x83\x01\x90`\xA0\x82\x86\x03\x12\x15a\x1C\xECW_\x80\xFD[a\x1C\xF4a\x16.V[\x825\x82\x81\x11\x15a\x1D\x02W_\x80\xFD[a\x1D\x0E\x87\x82\x86\x01a\x16\xA6V[\x82RP` \x83\x015\x91Pa\x1D!\x82a\x18\xDAV[\x81` \x82\x01Ra\x1D3`@\x84\x01a\x16\xF8V[`@\x82\x01R``\x83\x015``\x82\x01R`\x80\x83\x015`\x80\x82\x01R\x80\x93PPPP\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x1DhW_\x80\xFD[\x815`\x01`\x01`@\x1B\x03\x81\x11\x15a\x1D}W_\x80\xFD[a\x18\xD2\x84\x82\x85\x01a\x17\x13V[_` \x82\x84\x03\x12\x15a\x1D\x99W_\x80\xFD[P5\x91\x90PV[_[\x83\x81\x10\x15a\x1D\xBAW\x81\x81\x01Q\x83\x82\x01R` \x01a\x1D\xA2V[PP_\x91\x01RV[_\x81Q\x80\x84Ra\x1D\xD9\x81` \x86\x01` \x86\x01a\x1D\xA0V[`\x1F\x01`\x1F\x19\x16\x92\x90\x92\x01` \x01\x92\x91PPV[_\x81Q`\xE0\x84Ra\x1E\x01`\xE0\x85\x01\x82a\x1D\xC2V[\x90P` \x83\x01Q\x84\x82\x03` \x86\x01Ra\x1E\x1A\x82\x82a\x1D\xC2V[\x91PP`@\x83\x01Q`\x01`\x01`@\x1B\x03\x80\x82\x16`@\x87\x01R``\x85\x01Q\x91P\x85\x83\x03``\x87\x01Ra\x1EK\x83\x83a\x1D\xC2V[\x92P`\x80\x85\x01Q\x91P\x85\x83\x03`\x80\x87\x01Ra\x1Ef\x83\x83a\x1D\xC2V[\x92P\x80`\xA0\x86\x01Q\x16`\xA0\x87\x01RPP`\xC0\x83\x01Q\x84\x82\x03`\xC0\x86\x01Ra\x1E\x8D\x82\x82a\x1D\xC2V[\x95\x94PPPPPV[` \x81R_a\x12\x84` \x83\x01\x84a\x1D\xEDV[_` \x82\x84\x03\x12\x15a\x1E\xB8W_\x80\xFD[\x815`\x01`\x01`@\x1B\x03\x80\x82\x11\x15a\x1E\xCEW_\x80\xFD[\x90\x83\x01\x90`@\x82\x86\x03\x12\x15a\x1E\xE1W_\x80\xFD[a\x1E\xE9a\x15\xE9V[\x825\x82\x81\x11\x15a\x1E\xF7W_\x80\xFD[a\x19W\x87\x82\x86\x01a\x18\x0BV[_` \x82\x84\x03\x12\x15a\x1F\x13W_\x80\xFD[\x815`\x01`\x01`@\x1B\x03\x81\x11\x15a\x1F(W_\x80\xFD[a\x18\xD2\x84\x82\x85\x01a\x1A\"V[_\x80`@\x83\x85\x03\x12\x15a\x1FEW_\x80\xFD[\x825a\x1FP\x81a\x18\xDAV[\x91P` \x83\x015a\x1F`\x81a\x18\xDAV[\x80\x91PP\x92P\x92\x90PV[` \x81R_a\x12\x84` \x83\x01\x84a\x1D\xC2V[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x1F\x91W`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x1F\xAFWcNH{q`\xE0\x1B_R`\"`\x04R`$_\xFD[P\x91\x90PV[`\x1F\x82\x11\x15a\r\x1FW_\x81\x81R` \x81 `\x1F\x85\x01`\x05\x1C\x81\x01` \x86\x10\x15a\x1F\xDBWP\x80[`\x1F\x85\x01`\x05\x1C\x82\x01\x91P[\x81\x81\x10\x15a\x1F\xFAW\x82\x81U`\x01\x01a\x1F\xE7V[PPPPPPV[\x81Q`\x01`\x01`@\x1B\x03\x81\x11\x15a \x1BWa \x1Ba\x15\xADV[a /\x81a )\x84Ta\x1F}V[\x84a\x1F\xB5V[` \x80`\x1F\x83\x11`\x01\x81\x14a bW_\x84\x15a KWP\x85\x83\x01Q[_\x19`\x03\x86\x90\x1B\x1C\x19\x16`\x01\x85\x90\x1B\x17\x85Ua\x1F\xFAV[_\x85\x81R` \x81 `\x1F\x19\x86\x16\x91[\x82\x81\x10\x15a \x90W\x88\x86\x01Q\x82U\x94\x84\x01\x94`\x01\x90\x91\x01\x90\x84\x01a qV[P\x85\x82\x10\x15a \xADW\x87\x85\x01Q_\x19`\x03\x88\x90\x1B`\xF8\x16\x1C\x19\x16\x81U[PPPPP`\x01\x90\x81\x1B\x01\x90UPV[_` \x80\x83\x01\x81\x84R\x80\x85Q\x80\x83R`@\x92P\x82\x86\x01\x91P\x82\x81`\x05\x1B\x87\x01\x01\x84\x88\x01_[\x83\x81\x10\x15a!2W\x88\x83\x03`?\x19\x01\x85R\x81Q\x80Q\x87\x85Ra!\x06\x88\x86\x01\x82a\x1D\xC2V[\x91\x89\x01Q\x85\x83\x03\x86\x8B\x01R\x91\x90Pa!\x1E\x81\x83a\x1D\xC2V[\x96\x89\x01\x96\x94PPP\x90\x86\x01\x90`\x01\x01a \xE2V[P\x90\x98\x97PPPPPPPPV[_` \x82\x84\x03\x12\x15a!PW_\x80\xFD[\x81Q`\x01`\x01`@\x1B\x03\x81\x11\x15a!eW_\x80\xFD[\x82\x01`\x1F\x81\x01\x84\x13a!uW_\x80\xFD[\x80Qa!\x83a\x16\xC3\x82a\x16\x80V[\x81\x81R\x85` \x83\x85\x01\x01\x11\x15a!\x97W_\x80\xFD[a\x1E\x8D\x82` \x83\x01` \x86\x01a\x1D\xA0V[j\x03C+ccy\x033\x93{i`\xAD\x1B\x81R_\x82Qa!\xCD\x81`\x0B\x85\x01` \x87\x01a\x1D\xA0V[\x91\x90\x91\x01`\x0B\x01\x92\x91PPV[_` \x82\x84\x03\x12\x15a!\xEAW_\x80\xFD[PQ\x91\x90PV[_` \x82\x84\x03\x12\x15a\"\x01W_\x80\xFD[\x81Qa\x12\x84\x81a\x18\xDAV[cNH{q`\xE0\x1B_R`\x11`\x04R`$_\xFD[\x80\x82\x02\x81\x15\x82\x82\x04\x84\x14\x17a\x15\xA7Wa\x15\xA7a\"\x0CV[\x80\x82\x01\x80\x82\x11\x15a\x15\xA7Wa\x15\xA7a\"\x0CV[_` \x82\x84\x03\x12\x15a\"ZW_\x80\xFD[\x81Q\x80\x15\x15\x81\x14a\x12\x84W_\x80\xFD[` \x81R_\x82Q`\xC0` \x84\x01Ra\"\x84`\xE0\x84\x01\x82a\x1D\xC2V[\x90P` \x84\x01Q`\x1F\x19\x80\x85\x84\x03\x01`@\x86\x01Ra\"\xA2\x83\x83a\x1D\xC2V[\x92P`@\x86\x01Q\x91P\x80\x85\x84\x03\x01``\x86\x01RPa\"\xC0\x82\x82a\x1D\xC2V[\x91PP`\x01`\x01`@\x1B\x03``\x85\x01Q\x16`\x80\x84\x01R`\x80\x84\x01Q`\xA0\x84\x01R`\x01\x80`\xA0\x1B\x03`\xA0\x85\x01Q\x16`\xC0\x84\x01R\x80\x91PP\x92\x91PPV[_`\x01\x82\x01a#\rWa#\ra\"\x0CV[P`\x01\x01\x90V[` \x81R_\x82Q`\xA0` \x84\x01Ra#/`\xC0\x84\x01\x82a\x1D\xEDV[\x90P` \x84\x01Q`\x1F\x19\x84\x83\x03\x01`@\x85\x01Ra#L\x82\x82a\x1D\xC2V[\x91PP`\x01`\x01`@\x1B\x03`@\x85\x01Q\x16``\x84\x01R``\x84\x01Q`\x80\x84\x01R`\x01\x80`\xA0\x1B\x03`\x80\x85\x01Q\x16`\xA0\x84\x01R\x80\x91PP\x92\x91PPV[_` \x80\x83R\x83Q`\xC0\x82\x85\x01Ra#\xA3`\xE0\x85\x01\x82a\x1D\xC2V[\x90P`\x01`\x01`@\x1B\x03\x82\x86\x01Q\x16`@\x85\x01R`@\x85\x01Q`\x1F\x19\x80\x86\x84\x03\x01``\x87\x01R\x82\x82Q\x80\x85R\x85\x85\x01\x91P\x85\x81`\x05\x1B\x86\x01\x01\x86\x85\x01\x94P_[\x82\x81\x10\x15a$\x0FW\x84\x87\x83\x03\x01\x84Ra#\xFD\x82\x87Qa\x1D\xC2V[\x95\x88\x01\x95\x93\x88\x01\x93\x91P`\x01\x01a#\xE3V[P``\x8A\x01Q`\x01`\x01`@\x1B\x03\x81\x16`\x80\x8B\x01R\x96P`\x80\x8A\x01Q`\xA0\x8A\x01R`\xA0\x8A\x01Q\x96P\x83\x89\x82\x03\x01`\xC0\x8A\x01Ra$K\x81\x88a\x1D\xC2V[\x9A\x99PPPPPPPPPPV[fKUSAMA-`\xC8\x1B\x81R_\x82Qa$z\x81`\x07\x85\x01` \x87\x01a\x1D\xA0V[\x91\x90\x91\x01`\x07\x01\x92\x91PPV\xFE\xA2dipfsX\"\x12 =\x83T\x85\xB0';%v\x0F{V\x17H\xBE>\xF0rJ+\x08\x86`\x05\xAEk\x92t2\x970bdsolcC\0\x08\x14\x003"; - /// The bytecode of the contract. - pub static PINGMODULE_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static( - __BYTECODE, - ); - #[rustfmt::skip] + /// The bytecode of the contract. + pub static PINGMODULE_BYTECODE: ::ethers::core::types::Bytes = + ::ethers::core::types::Bytes::from_static(__BYTECODE); + #[rustfmt::skip] const __DEPLOYED_BYTECODE: &[u8] = b"`\x80`@R4\x80\x15a\0\x0FW_\x80\xFD[P`\x046\x10a\0\xE5W_5`\xE0\x1C\x80c\x88\xD9\xF1p\x11a\0\x88W\x80c\xD0\xFF\xF3f\x11a\0cW\x80c\xD0\xFF\xF3f\x14a\x01\xBEW\x80c\xD2\x10P\xDB\x14a\x01\xD1W\x80c\xEF/I\x82\x14a\x01\xE4W\x80c\xF47\xBCY\x14a\x01\xF7W_\x80\xFD[\x80c\x88\xD9\xF1p\x14a\x01\x83W\x80c\xB2\xA0\x1B\xF5\x14a\x01\x98W\x80c\xBC\r\xD4G\x14a\x01\xABW_\x80\xFD[\x80cJi.\x06\x11a\0\xC3W\x80cJi.\x06\x14a\x01$W\x80cM\r\x9C;\x14a\x017W\x80cp\xC5GO\x14a\x01]W\x80cr5N\x9B\x14a\x01pW_\x80\xFD[\x80c\x0B\xC3{\xAB\x14a\0\xE9W\x80c\x0F\xEE2\xCE\x14a\0\xFEW\x80cD\xAB \xF8\x14a\x01\x11W[_\x80\xFD[a\0\xFCa\0\xF76`\x04a\x18\xA1V[a\x02\x11V[\0[a\0\xFCa\x01\x0C6`\x04a\x18\xFCV[a\x02fV[a\0\xFCa\x01\x1F6`\x04a\x1B\x19V[a\x03\x87V[a\0\xFCa\x0126`\x04a\x1C\xB3V[a\x03\xF0V[a\x01Ja\x01E6`\x04a\x18\xA1V[a\x07\xD7V[`@Q\x90\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[a\x01Ja\x01k6`\x04a\x1DXV[a\n\x10V[a\0\xFCa\x01~6`\x04a\x1D\x89V[a\x0C\x11V[a\x01\x8Ba\r$V[`@Qa\x01T\x91\x90a\x1E\x96V[a\0\xFCa\x01\xA66`\x04a\x1E\xA8V[a\x10\x83V[a\0\xFCa\x01\xB96`\x04a\x1DXV[a\x10\xD8V[a\0\xFCa\x01\xCC6`\x04a\x1F\x03V[a\x11-V[a\x01Ja\x01\xDF6`\x04a\x1F\x03V[a\x11\x82V[a\0\xFCa\x01\xF26`\x04a\x1F4V[a\x12\x8BV[_T`@Q`\x01`\x01`\xA0\x1B\x03\x90\x91\x16\x81R` \x01a\x01TV[_T`\x01`\x01`\xA0\x1B\x03\x163\x14a\x02;W`@QcQ\xAB\x8D\xE5`\xE0\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[`@Q\x7Fhv\xFA>\xCC}\x82\x1F!]\x82\x12B\xCB\xBE\x1F\x0E0\xA0\n\x85\xC2\"\xD6\x92\xA7\x96\x8F\xD3\xAF\xF1\x0B\x90_\x90\xA1PV[_T`\x01`\x01`\xA0\x1B\x03\x163\x14a\x02\x90W`@QcQ\xAB\x8D\xE5`\xE0\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[\x80Q`\xC0\x01Q`@Q\x7F\xFB\x08{?\xFB\xBB\x0F\xC9\"\xDC\xCF\x87%\x08g\x1Av\x05\x85\x94#\xEB\x90\xEB\x01LV\xFD\xBA\x14\x84\xDC\x91a\x02\xC4\x91a\x1FkV[`@Q\x80\x91\x03\x90\xA1\x80Q\x80Q`\x02\x90\x81\x90a\x02\xDF\x90\x82a \x02V[P` \x82\x01Q`\x01\x82\x01\x90a\x02\xF4\x90\x82a \x02V[P`@\x82\x01Q`\x02\x82\x01\x80Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x19\x16`\x01`\x01`@\x1B\x03\x90\x92\x16\x91\x90\x91\x17\x90U``\x82\x01Q`\x03\x82\x01\x90a\x030\x90\x82a \x02V[P`\x80\x82\x01Q`\x04\x82\x01\x90a\x03E\x90\x82a \x02V[P`\xA0\x82\x01Q`\x05\x82\x01\x80Tg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x19\x16`\x01`\x01`@\x1B\x03\x90\x92\x16\x91\x90\x91\x17\x90U`\xC0\x82\x01Q`\x06\x82\x01\x90a\x03\x81\x90\x82a \x02V[PPPPV[_T`\x01`\x01`\xA0\x1B\x03\x163\x14a\x03\xB1W`@QcQ\xAB\x8D\xE5`\xE0\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[\x80Q` \x01Q`@Q\x7FD\xABVY^\x8E\xF4.\xF9\xDF\x1D\xD8=\xBB\xCE\xF4Y=\xC8\x98\xF7\x94\xA0\x1D\x02_\x0C?\xF6\x01\xA6X\x91a\x03\xE5\x91a \xBDV[`@Q\x80\x91\x03\x90\xA1PV[_\x80_\x90T\x90a\x01\0\n\x90\x04`\x01`\x01`\xA0\x1B\x03\x16`\x01`\x01`\xA0\x1B\x03\x16c\xF47\xBCY`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01_`@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x04?W=_\x80>=_\xFD[PPPP`@Q=_\x82>`\x1F=\x90\x81\x01`\x1F\x19\x16\x82\x01`@Ra\x04f\x91\x90\x81\x01\x90a!@V[`@Q` \x01a\x04v\x91\x90a!\xA8V[`@\x80Q`\x1F\x19\x81\x84\x03\x01\x81R\x90\x82\x90R_\x80T\x85Qc \x08\xF6\x05`\xE1\x1B\x85R\x92\x94P\x90\x92`\x01`\x01`\xA0\x1B\x03\x90\x91\x16\x91c@\x11\xEC\n\x91a\x04\xBA\x91\x90`\x04\x01a\x1FkV[` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x04\xD5W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x04\xF9\x91\x90a!\xDAV[\x90P_\x80_\x90T\x90a\x01\0\n\x90\x04`\x01`\x01`\xA0\x1B\x03\x16`\x01`\x01`\xA0\x1B\x03\x16cdxF\xA5`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x05KW=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x05o\x91\x90a!\xF1V[\x90P_\x83Q` \x11a\x05\x82W\x83Qa\x05\x85V[` [\x90P_\x85``\x01Q\x82\x85a\x05\x99\x91\x90a\" V[\x87`\x80\x01Qa\x05\xA8\x91\x90a\"7V[a\x05\xB2\x91\x90a\" V[`@Qc#\xB8r\xDD`\xE0\x1B\x81R3`\x04\x82\x01R0`$\x82\x01R`D\x81\x01\x82\x90R\x90\x91P`\x01`\x01`\xA0\x1B\x03\x84\x16\x90c#\xB8r\xDD\x90`d\x01` `@Q\x80\x83\x03\x81_\x87Z\xF1\x15\x80\x15a\x06\x05W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x06)\x91\x90a\"JV[P_[\x86``\x01Q\x81\x10\x15a\x07\xCEW_`@Q\x80`\xC0\x01`@R\x80\x89_\x01Q\x81R` \x01\x89` \x01Q`@Q` \x01a\x06z\x91\x90``\x91\x90\x91\x1Bk\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x19\x16\x81R`\x14\x01\x90V[`@Q` \x81\x83\x03\x03\x81R\x90`@R\x81R` \x01_\x80T\x90a\x01\0\n\x90\x04`\x01`\x01`\xA0\x1B\x03\x16`\x01`\x01`\xA0\x1B\x03\x16c\xF47\xBCY`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01_`@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x06\xDBW=_\x80>=_\xFD[PPPP`@Q=_\x82>`\x1F=\x90\x81\x01`\x1F\x19\x16\x82\x01`@Ra\x07\x02\x91\x90\x81\x01\x90a!@V[`@Q` \x01a\x07\x12\x91\x90a!\xA8V[`@\x80Q`\x1F\x19\x81\x84\x03\x01\x81R\x91\x81R\x90\x82R\x8A\x81\x01Q`\x01`\x01`@\x1B\x03\x16` \x83\x01R`\x80\x8B\x01Q\x82\x82\x01R2``\x90\x92\x01\x91\x90\x91R_T\x90Qc\xB8\xF3\xE8\xF5`\xE0\x1B\x81R\x91\x92P`\x01`\x01`\xA0\x1B\x03\x16\x90c\xB8\xF3\xE8\xF5\x90a\x07y\x90\x84\x90`\x04\x01a\"iV[` `@Q\x80\x83\x03\x81_\x87Z\xF1\x15\x80\x15a\x07\x95W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x07\xB9\x91\x90a!\xDAV[PP\x80\x80a\x07\xC6\x90a\"\xFCV[\x91PPa\x06,V[PPPPPPPV[_\x80T\x82QQ`@Qc \x08\xF6\x05`\xE1\x1B\x81R\x83\x92`\x01`\x01`\xA0\x1B\x03\x16\x91c@\x11\xEC\n\x91a\x08\t\x91\x90`\x04\x01a\x1FkV[` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x08$W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x08H\x91\x90a!\xDAV[\x90P_\x80_\x90T\x90a\x01\0\n\x90\x04`\x01`\x01`\xA0\x1B\x03\x16`\x01`\x01`\xA0\x1B\x03\x16cdxF\xA5`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x08\x9AW=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x08\xBE\x91\x90a!\xF1V[\x90P_\x84` \x01QQ` \x11a\x08\xD9W\x84` \x01QQa\x08\xDCV[` [\x90P_a\x08\xE9\x82\x85a\" V[`@Qc#\xB8r\xDD`\xE0\x1B\x81R3`\x04\x82\x01R0`$\x82\x01R`D\x81\x01\x82\x90R\x90\x91P`\x01`\x01`\xA0\x1B\x03\x84\x16\x90c#\xB8r\xDD\x90`d\x01` `@Q\x80\x83\x03\x81_\x87Z\xF1\x15\x80\x15a\t=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\t`\x91\x90a\"JV[P`@\x80Q`\xA0\x81\x01\x82R\x87Q\x81R` \x80\x89\x01Q\x90\x82\x01R\x87\x82\x01Q`\x01`\x01`@\x1B\x03\x16\x81\x83\x01R_``\x82\x01\x81\x90R2`\x80\x83\x01RT\x91Qc\x94H\x08\x05`\xE0\x1B\x81R\x90\x91`\x01`\x01`\xA0\x1B\x03\x16\x90c\x94H\x08\x05\x90a\t\xC5\x90\x84\x90`\x04\x01a#\x14V[` `@Q\x80\x83\x03\x81_\x87Z\xF1\x15\x80\x15a\t\xE1W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\n\x05\x91\x90a!\xDAV[\x97\x96PPPPPPPV[_\x80T` \x83\x01Q`@Qc \x08\xF6\x05`\xE1\x1B\x81R\x83\x92`\x01`\x01`\xA0\x1B\x03\x16\x91c@\x11\xEC\n\x91a\nD\x91\x90`\x04\x01a\x1FkV[` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\n_W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\n\x83\x91\x90a!\xDAV[\x90P_\x80_\x90T\x90a\x01\0\n\x90\x04`\x01`\x01`\xA0\x1B\x03\x16`\x01`\x01`\xA0\x1B\x03\x16cdxF\xA5`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\n\xD5W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\n\xF9\x91\x90a!\xF1V[\x90P_\x84`\xC0\x01QQ` \x11a\x0B\x14W\x84`\xC0\x01QQa\x0B\x17V[` [\x90P_a\x0B$\x82\x85a\" V[`@Qc#\xB8r\xDD`\xE0\x1B\x81R3`\x04\x82\x01R0`$\x82\x01R`D\x81\x01\x82\x90R\x90\x91P`\x01`\x01`\xA0\x1B\x03\x84\x16\x90c#\xB8r\xDD\x90`d\x01` `@Q\x80\x83\x03\x81_\x87Z\xF1\x15\x80\x15a\x0BwW=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x0B\x9B\x91\x90a\"JV[P`@\x80Q`\xC0\x80\x82\x01\x83R` \x80\x8A\x01Q\x83R`\x80\x80\x8B\x01Q\x91\x84\x01\x91\x90\x91R\x90\x89\x01Q\x82\x84\x01R`\xA0\x80\x8A\x01Q`\x01`\x01`@\x1B\x03\x16``\x84\x01R_\x91\x83\x01\x82\x90R2\x90\x83\x01RT\x91Qc\xB8\xF3\xE8\xF5`\xE0\x1B\x81R\x90\x91`\x01`\x01`\xA0\x1B\x03\x16\x90c\xB8\xF3\xE8\xF5\x90a\t\xC5\x90\x84\x90`\x04\x01a\"iV[_`@Q\x80`\xC0\x01`@R\x80a\x0C&\x84a\x14\x15V[\x81R` \x01`@Q\x80`@\x01`@R\x80`\x08\x81R` \x01g\x1A\\\xDB\\\x0BX\\\xDD`\xC2\x1B\x81RP\x81R` \x01`@Q\x80`@\x01`@R\x80`\x0E\x81R` \x01mhello from evm`\x90\x1B\x81RP\x81R` \x01_`\x01`\x01`@\x1B\x03\x16\x81R` \x01_\x81R` \x012`\x01`\x01`\xA0\x1B\x03\x16\x81RP\x90P_\x80T\x90a\x01\0\n\x90\x04`\x01`\x01`\xA0\x1B\x03\x16`\x01`\x01`\xA0\x1B\x03\x16c\xB8\xF3\xE8\xF5\x82`@Q\x82c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01a\x0C\xDF\x91\x90a\"iV[` `@Q\x80\x83\x03\x81_\x87Z\xF1\x15\x80\x15a\x0C\xFBW=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\r\x1F\x91\x90a!\xDAV[PPPV[a\rt`@Q\x80`\xE0\x01`@R\x80``\x81R` \x01``\x81R` \x01_`\x01`\x01`@\x1B\x03\x16\x81R` \x01``\x81R` \x01``\x81R` \x01_`\x01`\x01`@\x1B\x03\x16\x81R` \x01``\x81RP\x90V[`\x02`@Q\x80`\xE0\x01`@R\x90\x81_\x82\x01\x80Ta\r\x90\x90a\x1F}V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\r\xBC\x90a\x1F}V[\x80\x15a\x0E\x07W\x80`\x1F\x10a\r\xDEWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x0E\x07V[\x82\x01\x91\x90_R` _ \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\r\xEAW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x81R` \x01`\x01\x82\x01\x80Ta\x0E \x90a\x1F}V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x0EL\x90a\x1F}V[\x80\x15a\x0E\x97W\x80`\x1F\x10a\x0EnWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x0E\x97V[\x82\x01\x91\x90_R` _ \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x0EzW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x02\x82\x01T`\x01`\x01`@\x1B\x03\x16` \x82\x01R`\x03\x82\x01\x80T`@\x90\x92\x01\x91a\x0E\xC7\x90a\x1F}V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x0E\xF3\x90a\x1F}V[\x80\x15a\x0F>W\x80`\x1F\x10a\x0F\x15Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x0F>V[\x82\x01\x91\x90_R` _ \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x0F!W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x81R` \x01`\x04\x82\x01\x80Ta\x0FW\x90a\x1F}V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x0F\x83\x90a\x1F}V[\x80\x15a\x0F\xCEW\x80`\x1F\x10a\x0F\xA5Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x0F\xCEV[\x82\x01\x91\x90_R` _ \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x0F\xB1W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x05\x82\x01T`\x01`\x01`@\x1B\x03\x16` \x82\x01R`\x06\x82\x01\x80T`@\x90\x92\x01\x91a\x0F\xFE\x90a\x1F}V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x10*\x90a\x1F}V[\x80\x15a\x10uW\x80`\x1F\x10a\x10LWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x10uV[\x82\x01\x91\x90_R` _ \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x10XW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x81RPP\x90P\x90V[_T`\x01`\x01`\xA0\x1B\x03\x163\x14a\x10\xADW`@QcQ\xAB\x8D\xE5`\xE0\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[`@Q\x7F\xD7\xDC\x99\xAF\xB6\xC309\xCE\xA4PZ\x9E,\xAB4q\xD3Y\xCE\xBE\x02\x1E\xC1'\xDC\x94\xDD\xD3Y\xD3\xC5\x90_\x90\xA1PV[_T`\x01`\x01`\xA0\x1B\x03\x163\x14a\x11\x02W`@QcQ\xAB\x8D\xE5`\xE0\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[`@Q\x7F\xBB\xF4\x8AR\xB8>\xBC=\x9E9\xF0\x92\xA8\xB9\xB7\xE5o\x1D\xD0\xDCC\x8B\xEF@\xDC}\x92\x99Bp\xA5\x9F\x90_\x90\xA1PV[_T`\x01`\x01`\xA0\x1B\x03\x163\x14a\x11WW`@QcQ\xAB\x8D\xE5`\xE0\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[`@Q\x7F\x83\xE6 %\xE4\xBCXu\x16\xD0\xBC1^2\x9E\xAC\x0Cf6(T\xFE\xB7\xCDA5\xEF\x81C\xBA\x15\xF9\x90_\x90\xA1PV[_\x80`@Q\x80`\xC0\x01`@R\x80\x84` \x01Q\x81R` \x01\x84`\xC0\x01Q`\x01`\x01`@\x1B\x03\x16\x81R` \x01\x84`\xA0\x01Q\x81R` \x01\x84`\x80\x01Q`\x01`\x01`@\x1B\x03\x16\x81R` \x01_\x81R` \x01_`\x01`\x01`@\x1B\x03\x81\x11\x15a\x11\xE7Wa\x11\xE7a\x15\xADV[`@Q\x90\x80\x82R\x80`\x1F\x01`\x1F\x19\x16` \x01\x82\x01`@R\x80\x15a\x12\x11W` \x82\x01\x81\x806\x837\x01\x90P[P\x90R_T`@Qc\xD2.3C`\xE0\x1B\x81R\x91\x92P`\x01`\x01`\xA0\x1B\x03\x16\x90c\xD2.3C\x90a\x12D\x90\x84\x90`\x04\x01a#\x88V[` `@Q\x80\x83\x03\x81_\x87Z\xF1\x15\x80\x15a\x12`W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x12\x84\x91\x90a!\xDAV[\x93\x92PPPV[`\x01T`\x01`\x01`\xA0\x1B\x03\x163\x14a\x12\xB6W`@QcQ\xAB\x8D\xE5`\xE0\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[_\x82`\x01`\x01`\xA0\x1B\x03\x16cdxF\xA5`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x12\xF3W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x13\x17\x91\x90a!\xF1V[`@Qc\t^\xA7\xB3`\xE0\x1B\x81R`\x01`\x01`\xA0\x1B\x03\x85\x81\x16`\x04\x83\x01R_\x19`$\x83\x01R\x91\x92P\x90\x82\x16\x90c\t^\xA7\xB3\x90`D\x01` `@Q\x80\x83\x03\x81_\x87Z\xF1\x15\x80\x15a\x13gW=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x13\x8B\x91\x90a\"JV[P`\x01`\x01`\xA0\x1B\x03\x82\x16\x15a\x13\xF2W`@Qc3\xD2\xE6\x83`\xE1\x1B\x81R`\x01`\x01`\xA0\x1B\x03\x82\x81\x16`\x04\x83\x01R\x83\x16\x90cg\xA5\xCD\x06\x90`$\x01_`@Q\x80\x83\x03\x81_\x87\x80;\x15\x80\x15a\x13\xDBW_\x80\xFD[PZ\xF1\x15\x80\x15a\x13\xEDW=_\x80>=_\xFD[PPPP[PP_\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16`\x01`\x01`\xA0\x1B\x03\x92\x90\x92\x16\x91\x90\x91\x17\x90UV[``a\x14 \x82a\x14FV[`@Q` \x01a\x140\x91\x90a$YV[`@Q` \x81\x83\x03\x03\x81R\x90`@R\x90P\x91\x90PV[``_a\x14R\x83a\x14\xD5V[`\x01\x01\x90P_\x81`\x01`\x01`@\x1B\x03\x81\x11\x15a\x14pWa\x14pa\x15\xADV[`@Q\x90\x80\x82R\x80`\x1F\x01`\x1F\x19\x16` \x01\x82\x01`@R\x80\x15a\x14\x9AW` \x82\x01\x81\x806\x837\x01\x90P[P\x90P\x81\x81\x01` \x01[_\x19\x01o\x18\x18\x99\x19\x9A\x1A\x9B\x1B\x9C\x1C\xB0\xB11\xB22\xB3`\x81\x1B`\n\x86\x06\x1A\x81S`\n\x85\x04\x94P\x84a\x14\xA4WP\x93\x92PPPV[_\x80r\x18O\x03\xE9?\xF9\xF4\xDA\xA7\x97\xEDn8\xEDd\xBFj\x1F\x01`@\x1B\x83\x10a\x15\x13Wr\x18O\x03\xE9?\xF9\xF4\xDA\xA7\x97\xEDn8\xEDd\xBFj\x1F\x01`@\x1B\x83\x04\x92P`@\x01[m\x04\xEE-mA[\x85\xAC\xEF\x81\0\0\0\0\x83\x10a\x15?Wm\x04\xEE-mA[\x85\xAC\xEF\x81\0\0\0\0\x83\x04\x92P` \x01[f#\x86\xF2o\xC1\0\0\x83\x10a\x15]Wf#\x86\xF2o\xC1\0\0\x83\x04\x92P`\x10\x01[c\x05\xF5\xE1\0\x83\x10a\x15uWc\x05\xF5\xE1\0\x83\x04\x92P`\x08\x01[a'\x10\x83\x10a\x15\x89Wa'\x10\x83\x04\x92P`\x04\x01[`d\x83\x10a\x15\x9BW`d\x83\x04\x92P`\x02\x01[`\n\x83\x10a\x15\xA7W`\x01\x01[\x92\x91PPV[cNH{q`\xE0\x1B_R`A`\x04R`$_\xFD[`@Q`\xE0\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x15\xE3Wa\x15\xE3a\x15\xADV[`@R\x90V[`@\x80Q\x90\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x15\xE3Wa\x15\xE3a\x15\xADV[`@Qa\x01\0\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x15\xE3Wa\x15\xE3a\x15\xADV[`@Q`\xA0\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x15\xE3Wa\x15\xE3a\x15\xADV[`@Q`\x1F\x82\x01`\x1F\x19\x16\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x16xWa\x16xa\x15\xADV[`@R\x91\x90PV[_`\x01`\x01`@\x1B\x03\x82\x11\x15a\x16\x98Wa\x16\x98a\x15\xADV[P`\x1F\x01`\x1F\x19\x16` \x01\x90V[_\x82`\x1F\x83\x01\x12a\x16\xB5W_\x80\xFD[\x815a\x16\xC8a\x16\xC3\x82a\x16\x80V[a\x16PV[\x81\x81R\x84` \x83\x86\x01\x01\x11\x15a\x16\xDCW_\x80\xFD[\x81` \x85\x01` \x83\x017_\x91\x81\x01` \x01\x91\x90\x91R\x93\x92PPPV[\x805`\x01`\x01`@\x1B\x03\x81\x16\x81\x14a\x17\x0EW_\x80\xFD[\x91\x90PV[_`\xE0\x82\x84\x03\x12\x15a\x17#W_\x80\xFD[a\x17+a\x15\xC1V[\x90P\x815`\x01`\x01`@\x1B\x03\x80\x82\x11\x15a\x17CW_\x80\xFD[a\x17O\x85\x83\x86\x01a\x16\xA6V[\x83R` \x84\x015\x91P\x80\x82\x11\x15a\x17dW_\x80\xFD[a\x17p\x85\x83\x86\x01a\x16\xA6V[` \x84\x01Ra\x17\x81`@\x85\x01a\x16\xF8V[`@\x84\x01R``\x84\x015\x91P\x80\x82\x11\x15a\x17\x99W_\x80\xFD[a\x17\xA5\x85\x83\x86\x01a\x16\xA6V[``\x84\x01R`\x80\x84\x015\x91P\x80\x82\x11\x15a\x17\xBDW_\x80\xFD[a\x17\xC9\x85\x83\x86\x01a\x16\xA6V[`\x80\x84\x01Ra\x17\xDA`\xA0\x85\x01a\x16\xF8V[`\xA0\x84\x01R`\xC0\x84\x015\x91P\x80\x82\x11\x15a\x17\xF2W_\x80\xFD[Pa\x17\xFF\x84\x82\x85\x01a\x16\xA6V[`\xC0\x83\x01RP\x92\x91PPV[_``\x82\x84\x03\x12\x15a\x18\x1BW_\x80\xFD[`@Q``\x81\x01`\x01`\x01`@\x1B\x03\x82\x82\x10\x81\x83\x11\x17\x15a\x18>Wa\x18>a\x15\xADV[\x81`@R\x82\x93P\x845\x91P\x80\x82\x11\x15a\x18UW_\x80\xFD[a\x18a\x86\x83\x87\x01a\x17\x13V[\x83R` \x85\x015\x91P\x80\x82\x11\x15a\x18vW_\x80\xFD[Pa\x18\x83\x85\x82\x86\x01a\x16\xA6V[` \x83\x01RPa\x18\x95`@\x84\x01a\x16\xF8V[`@\x82\x01RP\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x18\xB1W_\x80\xFD[\x815`\x01`\x01`@\x1B\x03\x81\x11\x15a\x18\xC6W_\x80\xFD[a\x18\xD2\x84\x82\x85\x01a\x18\x0BV[\x94\x93PPPPV[`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x18\xEEW_\x80\xFD[PV[\x805a\x17\x0E\x81a\x18\xDAV[_` \x82\x84\x03\x12\x15a\x19\x0CW_\x80\xFD[\x815`\x01`\x01`@\x1B\x03\x80\x82\x11\x15a\x19\"W_\x80\xFD[\x90\x83\x01\x90`@\x82\x86\x03\x12\x15a\x195W_\x80\xFD[a\x19=a\x15\xE9V[\x825\x82\x81\x11\x15a\x19KW_\x80\xFD[a\x19W\x87\x82\x86\x01a\x17\x13V[\x82RP` \x83\x015\x92Pa\x19j\x83a\x18\xDAV[` \x81\x01\x92\x90\x92RP\x93\x92PPPV[_`\x01`\x01`@\x1B\x03\x82\x11\x15a\x19\x92Wa\x19\x92a\x15\xADV[P`\x05\x1B` \x01\x90V[_\x82`\x1F\x83\x01\x12a\x19\xABW_\x80\xFD[\x815` a\x19\xBBa\x16\xC3\x83a\x19zV[\x82\x81R`\x05\x92\x90\x92\x1B\x84\x01\x81\x01\x91\x81\x81\x01\x90\x86\x84\x11\x15a\x19\xD9W_\x80\xFD[\x82\x86\x01[\x84\x81\x10\x15a\x1A\x17W\x805`\x01`\x01`@\x1B\x03\x81\x11\x15a\x19\xFBW_\x80\x81\xFD[a\x1A\t\x89\x86\x83\x8B\x01\x01a\x16\xA6V[\x84RP\x91\x83\x01\x91\x83\x01a\x19\xDDV[P\x96\x95PPPPPPV[_a\x01\0\x82\x84\x03\x12\x15a\x1A3W_\x80\xFD[a\x1A;a\x16\x0BV[\x90P\x815`\x01`\x01`@\x1B\x03\x80\x82\x11\x15a\x1ASW_\x80\xFD[a\x1A_\x85\x83\x86\x01a\x16\xA6V[\x83R` \x84\x015\x91P\x80\x82\x11\x15a\x1AtW_\x80\xFD[a\x1A\x80\x85\x83\x86\x01a\x16\xA6V[` \x84\x01Ra\x1A\x91`@\x85\x01a\x16\xF8V[`@\x84\x01Ra\x1A\xA2``\x85\x01a\x18\xF1V[``\x84\x01Ra\x1A\xB3`\x80\x85\x01a\x16\xF8V[`\x80\x84\x01R`\xA0\x84\x015\x91P\x80\x82\x11\x15a\x1A\xCBW_\x80\xFD[a\x1A\xD7\x85\x83\x86\x01a\x19\x9CV[`\xA0\x84\x01Ra\x1A\xE8`\xC0\x85\x01a\x16\xF8V[`\xC0\x84\x01R`\xE0\x84\x015\x91P\x80\x82\x11\x15a\x1B\0W_\x80\xFD[Pa\x1B\r\x84\x82\x85\x01a\x16\xA6V[`\xE0\x83\x01RP\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x1B)W_\x80\xFD[`\x01`\x01`@\x1B\x03\x80\x835\x11\x15a\x1B>W_\x80\xFD[\x825\x83\x01`@\x81\x86\x03\x12\x15a\x1BQW_\x80\xFD[a\x1BYa\x15\xE9V[\x82\x825\x11\x15a\x1BfW_\x80\xFD[\x815\x82\x01`@\x81\x88\x03\x12\x15a\x1ByW_\x80\xFD[a\x1B\x81a\x15\xE9V[\x84\x825\x11\x15a\x1B\x8EW_\x80\xFD[a\x1B\x9B\x88\x835\x84\x01a\x1A\"V[\x81R\x84` \x83\x015\x11\x15a\x1B\xADW_\x80\xFD[` \x82\x015\x82\x01\x91P\x87`\x1F\x83\x01\x12a\x1B\xC4W_\x80\xFD[a\x1B\xD1a\x16\xC3\x835a\x19zV[\x825\x80\x82R` \x80\x83\x01\x92\x91`\x05\x1B\x85\x01\x01\x8A\x81\x11\x15a\x1B\xEFW_\x80\xFD[` \x85\x01[\x81\x81\x10\x15a\x1C\x8AW\x88\x815\x11\x15a\x1C\tW_\x80\xFD[\x805\x86\x01`@\x81\x8E\x03`\x1F\x19\x01\x12\x15a\x1C W_\x80\xFD[a\x1C(a\x15\xE9V[\x8A` \x83\x015\x11\x15a\x1C8W_\x80\xFD[a\x1CJ\x8E` \x80\x85\x015\x85\x01\x01a\x16\xA6V[\x81R\x8A`@\x83\x015\x11\x15a\x1C\\W_\x80\xFD[a\x1Co\x8E` `@\x85\x015\x85\x01\x01a\x16\xA6V[` \x82\x01R\x80\x86RPP` \x84\x01\x93P` \x81\x01\x90Pa\x1B\xF4V[PP\x80` \x84\x01RPP\x80\x83RPPa\x1C\xA5` \x83\x01a\x18\xF1V[` \x82\x01R\x95\x94PPPPPV[_` \x82\x84\x03\x12\x15a\x1C\xC3W_\x80\xFD[\x815`\x01`\x01`@\x1B\x03\x80\x82\x11\x15a\x1C\xD9W_\x80\xFD[\x90\x83\x01\x90`\xA0\x82\x86\x03\x12\x15a\x1C\xECW_\x80\xFD[a\x1C\xF4a\x16.V[\x825\x82\x81\x11\x15a\x1D\x02W_\x80\xFD[a\x1D\x0E\x87\x82\x86\x01a\x16\xA6V[\x82RP` \x83\x015\x91Pa\x1D!\x82a\x18\xDAV[\x81` \x82\x01Ra\x1D3`@\x84\x01a\x16\xF8V[`@\x82\x01R``\x83\x015``\x82\x01R`\x80\x83\x015`\x80\x82\x01R\x80\x93PPPP\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x1DhW_\x80\xFD[\x815`\x01`\x01`@\x1B\x03\x81\x11\x15a\x1D}W_\x80\xFD[a\x18\xD2\x84\x82\x85\x01a\x17\x13V[_` \x82\x84\x03\x12\x15a\x1D\x99W_\x80\xFD[P5\x91\x90PV[_[\x83\x81\x10\x15a\x1D\xBAW\x81\x81\x01Q\x83\x82\x01R` \x01a\x1D\xA2V[PP_\x91\x01RV[_\x81Q\x80\x84Ra\x1D\xD9\x81` \x86\x01` \x86\x01a\x1D\xA0V[`\x1F\x01`\x1F\x19\x16\x92\x90\x92\x01` \x01\x92\x91PPV[_\x81Q`\xE0\x84Ra\x1E\x01`\xE0\x85\x01\x82a\x1D\xC2V[\x90P` \x83\x01Q\x84\x82\x03` \x86\x01Ra\x1E\x1A\x82\x82a\x1D\xC2V[\x91PP`@\x83\x01Q`\x01`\x01`@\x1B\x03\x80\x82\x16`@\x87\x01R``\x85\x01Q\x91P\x85\x83\x03``\x87\x01Ra\x1EK\x83\x83a\x1D\xC2V[\x92P`\x80\x85\x01Q\x91P\x85\x83\x03`\x80\x87\x01Ra\x1Ef\x83\x83a\x1D\xC2V[\x92P\x80`\xA0\x86\x01Q\x16`\xA0\x87\x01RPP`\xC0\x83\x01Q\x84\x82\x03`\xC0\x86\x01Ra\x1E\x8D\x82\x82a\x1D\xC2V[\x95\x94PPPPPV[` \x81R_a\x12\x84` \x83\x01\x84a\x1D\xEDV[_` \x82\x84\x03\x12\x15a\x1E\xB8W_\x80\xFD[\x815`\x01`\x01`@\x1B\x03\x80\x82\x11\x15a\x1E\xCEW_\x80\xFD[\x90\x83\x01\x90`@\x82\x86\x03\x12\x15a\x1E\xE1W_\x80\xFD[a\x1E\xE9a\x15\xE9V[\x825\x82\x81\x11\x15a\x1E\xF7W_\x80\xFD[a\x19W\x87\x82\x86\x01a\x18\x0BV[_` \x82\x84\x03\x12\x15a\x1F\x13W_\x80\xFD[\x815`\x01`\x01`@\x1B\x03\x81\x11\x15a\x1F(W_\x80\xFD[a\x18\xD2\x84\x82\x85\x01a\x1A\"V[_\x80`@\x83\x85\x03\x12\x15a\x1FEW_\x80\xFD[\x825a\x1FP\x81a\x18\xDAV[\x91P` \x83\x015a\x1F`\x81a\x18\xDAV[\x80\x91PP\x92P\x92\x90PV[` \x81R_a\x12\x84` \x83\x01\x84a\x1D\xC2V[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x1F\x91W`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x1F\xAFWcNH{q`\xE0\x1B_R`\"`\x04R`$_\xFD[P\x91\x90PV[`\x1F\x82\x11\x15a\r\x1FW_\x81\x81R` \x81 `\x1F\x85\x01`\x05\x1C\x81\x01` \x86\x10\x15a\x1F\xDBWP\x80[`\x1F\x85\x01`\x05\x1C\x82\x01\x91P[\x81\x81\x10\x15a\x1F\xFAW\x82\x81U`\x01\x01a\x1F\xE7V[PPPPPPV[\x81Q`\x01`\x01`@\x1B\x03\x81\x11\x15a \x1BWa \x1Ba\x15\xADV[a /\x81a )\x84Ta\x1F}V[\x84a\x1F\xB5V[` \x80`\x1F\x83\x11`\x01\x81\x14a bW_\x84\x15a KWP\x85\x83\x01Q[_\x19`\x03\x86\x90\x1B\x1C\x19\x16`\x01\x85\x90\x1B\x17\x85Ua\x1F\xFAV[_\x85\x81R` \x81 `\x1F\x19\x86\x16\x91[\x82\x81\x10\x15a \x90W\x88\x86\x01Q\x82U\x94\x84\x01\x94`\x01\x90\x91\x01\x90\x84\x01a qV[P\x85\x82\x10\x15a \xADW\x87\x85\x01Q_\x19`\x03\x88\x90\x1B`\xF8\x16\x1C\x19\x16\x81U[PPPPP`\x01\x90\x81\x1B\x01\x90UPV[_` \x80\x83\x01\x81\x84R\x80\x85Q\x80\x83R`@\x92P\x82\x86\x01\x91P\x82\x81`\x05\x1B\x87\x01\x01\x84\x88\x01_[\x83\x81\x10\x15a!2W\x88\x83\x03`?\x19\x01\x85R\x81Q\x80Q\x87\x85Ra!\x06\x88\x86\x01\x82a\x1D\xC2V[\x91\x89\x01Q\x85\x83\x03\x86\x8B\x01R\x91\x90Pa!\x1E\x81\x83a\x1D\xC2V[\x96\x89\x01\x96\x94PPP\x90\x86\x01\x90`\x01\x01a \xE2V[P\x90\x98\x97PPPPPPPPV[_` \x82\x84\x03\x12\x15a!PW_\x80\xFD[\x81Q`\x01`\x01`@\x1B\x03\x81\x11\x15a!eW_\x80\xFD[\x82\x01`\x1F\x81\x01\x84\x13a!uW_\x80\xFD[\x80Qa!\x83a\x16\xC3\x82a\x16\x80V[\x81\x81R\x85` \x83\x85\x01\x01\x11\x15a!\x97W_\x80\xFD[a\x1E\x8D\x82` \x83\x01` \x86\x01a\x1D\xA0V[j\x03C+ccy\x033\x93{i`\xAD\x1B\x81R_\x82Qa!\xCD\x81`\x0B\x85\x01` \x87\x01a\x1D\xA0V[\x91\x90\x91\x01`\x0B\x01\x92\x91PPV[_` \x82\x84\x03\x12\x15a!\xEAW_\x80\xFD[PQ\x91\x90PV[_` \x82\x84\x03\x12\x15a\"\x01W_\x80\xFD[\x81Qa\x12\x84\x81a\x18\xDAV[cNH{q`\xE0\x1B_R`\x11`\x04R`$_\xFD[\x80\x82\x02\x81\x15\x82\x82\x04\x84\x14\x17a\x15\xA7Wa\x15\xA7a\"\x0CV[\x80\x82\x01\x80\x82\x11\x15a\x15\xA7Wa\x15\xA7a\"\x0CV[_` \x82\x84\x03\x12\x15a\"ZW_\x80\xFD[\x81Q\x80\x15\x15\x81\x14a\x12\x84W_\x80\xFD[` \x81R_\x82Q`\xC0` \x84\x01Ra\"\x84`\xE0\x84\x01\x82a\x1D\xC2V[\x90P` \x84\x01Q`\x1F\x19\x80\x85\x84\x03\x01`@\x86\x01Ra\"\xA2\x83\x83a\x1D\xC2V[\x92P`@\x86\x01Q\x91P\x80\x85\x84\x03\x01``\x86\x01RPa\"\xC0\x82\x82a\x1D\xC2V[\x91PP`\x01`\x01`@\x1B\x03``\x85\x01Q\x16`\x80\x84\x01R`\x80\x84\x01Q`\xA0\x84\x01R`\x01\x80`\xA0\x1B\x03`\xA0\x85\x01Q\x16`\xC0\x84\x01R\x80\x91PP\x92\x91PPV[_`\x01\x82\x01a#\rWa#\ra\"\x0CV[P`\x01\x01\x90V[` \x81R_\x82Q`\xA0` \x84\x01Ra#/`\xC0\x84\x01\x82a\x1D\xEDV[\x90P` \x84\x01Q`\x1F\x19\x84\x83\x03\x01`@\x85\x01Ra#L\x82\x82a\x1D\xC2V[\x91PP`\x01`\x01`@\x1B\x03`@\x85\x01Q\x16``\x84\x01R``\x84\x01Q`\x80\x84\x01R`\x01\x80`\xA0\x1B\x03`\x80\x85\x01Q\x16`\xA0\x84\x01R\x80\x91PP\x92\x91PPV[_` \x80\x83R\x83Q`\xC0\x82\x85\x01Ra#\xA3`\xE0\x85\x01\x82a\x1D\xC2V[\x90P`\x01`\x01`@\x1B\x03\x82\x86\x01Q\x16`@\x85\x01R`@\x85\x01Q`\x1F\x19\x80\x86\x84\x03\x01``\x87\x01R\x82\x82Q\x80\x85R\x85\x85\x01\x91P\x85\x81`\x05\x1B\x86\x01\x01\x86\x85\x01\x94P_[\x82\x81\x10\x15a$\x0FW\x84\x87\x83\x03\x01\x84Ra#\xFD\x82\x87Qa\x1D\xC2V[\x95\x88\x01\x95\x93\x88\x01\x93\x91P`\x01\x01a#\xE3V[P``\x8A\x01Q`\x01`\x01`@\x1B\x03\x81\x16`\x80\x8B\x01R\x96P`\x80\x8A\x01Q`\xA0\x8A\x01R`\xA0\x8A\x01Q\x96P\x83\x89\x82\x03\x01`\xC0\x8A\x01Ra$K\x81\x88a\x1D\xC2V[\x9A\x99PPPPPPPPPPV[fKUSAMA-`\xC8\x1B\x81R_\x82Qa$z\x81`\x07\x85\x01` \x87\x01a\x1D\xA0V[\x91\x90\x91\x01`\x07\x01\x92\x91PPV\xFE\xA2dipfsX\"\x12 =\x83T\x85\xB0';%v\x0F{V\x17H\xBE>\xF0rJ+\x08\x86`\x05\xAEk\x92t2\x970bdsolcC\0\x08\x14\x003"; - /// The deployed bytecode of the contract. - pub static PINGMODULE_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static( - __DEPLOYED_BYTECODE, - ); - pub struct PingModule(::ethers::contract::Contract); - impl ::core::clone::Clone for PingModule { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for PingModule { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for PingModule { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for PingModule { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(PingModule)).field(&self.address()).finish() - } - } - impl PingModule { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - PINGMODULE_ABI.clone(), - client, - ), - ) - } - /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it. - /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction - /// - /// Notes: - /// - If there are no constructor arguments, you should pass `()` as the argument. - /// - The default poll duration is 7 seconds. - /// - The default number of confirmations is 1 block. - /// - /// - /// # Example - /// - /// Generate contract bindings with `abigen!` and deploy a new contract instance. - /// - /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. - /// - /// ```ignore - /// # async fn deploy(client: ::std::sync::Arc) { - /// abigen!(Greeter, "../greeter.json"); - /// - /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); - /// let msg = greeter_contract.greet().call().await.unwrap(); - /// # } - /// ``` - pub fn deploy( - client: ::std::sync::Arc, - constructor_args: T, - ) -> ::core::result::Result< - ::ethers::contract::builders::ContractDeployer, - ::ethers::contract::ContractError, - > { - let factory = ::ethers::contract::ContractFactory::new( - PINGMODULE_ABI.clone(), - PINGMODULE_BYTECODE.clone().into(), - client, - ); - let deployer = factory.deploy(constructor_args)?; - let deployer = ::ethers::contract::ContractDeployer::new(deployer); - Ok(deployer) - } - ///Calls the contract's `dispatch` (0x70c5474f) function - pub fn dispatch( - &self, - request: GetRequest, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([112, 197, 71, 79], (request,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `dispatch` (0xd21050db) function - pub fn dispatch_with_request( - &self, - request: GetRequest, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([210, 16, 80, 219], (request,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `dispatchPostResponse` (0x4d0d9c3b) function - pub fn dispatch_post_response( - &self, - response: PostResponse, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([77, 13, 156, 59], (response,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `dispatchToParachain` (0x72354e9b) function - pub fn dispatch_to_parachain( - &self, - para_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([114, 53, 78, 155], para_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `host` (0xf437bc59) function - pub fn host( - &self, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([244, 55, 188, 89], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `onAccept` (0x0fee32ce) function - pub fn on_accept( - &self, - incoming: IncomingPostRequest, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([15, 238, 50, 206], (incoming,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `onGetResponse` (0x44ab20f8) function - pub fn on_get_response( - &self, - response: IncomingGetResponse, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([68, 171, 32, 248], (response,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `onGetTimeout` (0xd0fff366) function - pub fn on_get_timeout( - &self, - p0: GetRequest, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([208, 255, 243, 102], (p0,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `onPostRequestTimeout` (0xbc0dd447) function - pub fn on_post_request_timeout( - &self, - p0: PostRequest, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([188, 13, 212, 71], (p0,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `onPostResponse` (0xb2a01bf5) function - pub fn on_post_response( - &self, - p0: IncomingPostResponse, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([178, 160, 27, 245], (p0,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `onPostResponseTimeout` (0x0bc37bab) function - pub fn on_post_response_timeout( - &self, - p0: PostResponse, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([11, 195, 123, 171], (p0,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `ping` (0x4a692e06) function - pub fn ping( - &self, - ping_message: PingMessage, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([74, 105, 46, 6], (ping_message,)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `previousPostRequest` (0x88d9f170) function - pub fn previous_post_request( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([136, 217, 241, 112], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `setIsmpHost` (0xef2f4982) function - pub fn set_ismp_host( - &self, - host_addr: ::ethers::core::types::Address, - token_faucet: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([239, 47, 73, 130], (host_addr, token_faucet)) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `GetResponseReceived` event - pub fn get_response_received_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - GetResponseReceivedFilter, - > { - self.0.event() - } - ///Gets the contract's `GetTimeoutReceived` event - pub fn get_timeout_received_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - GetTimeoutReceivedFilter, - > { - self.0.event() - } - ///Gets the contract's `MessageDispatched` event - pub fn message_dispatched_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - MessageDispatchedFilter, - > { - self.0.event() - } - ///Gets the contract's `PostReceived` event - pub fn post_received_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - PostReceivedFilter, - > { - self.0.event() - } - ///Gets the contract's `PostRequestTimeoutReceived` event - pub fn post_request_timeout_received_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - PostRequestTimeoutReceivedFilter, - > { - self.0.event() - } - ///Gets the contract's `PostResponseReceived` event - pub fn post_response_received_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - PostResponseReceivedFilter, - > { - self.0.event() - } - ///Gets the contract's `PostResponseTimeoutReceived` event - pub fn post_response_timeout_received_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - PostResponseTimeoutReceivedFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - PingModuleEvents, - > { - self.0.event_with_filter(::core::default::Default::default()) - } - } - impl From<::ethers::contract::Contract> - for PingModule { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - ///Custom Error type `ExecutionFailed` with signature `ExecutionFailed()` and selector `0xacfdb444` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "ExecutionFailed", abi = "ExecutionFailed()")] - pub struct ExecutionFailed; - ///Custom Error type `NotIsmpHost` with signature `NotIsmpHost()` and selector `0x51ab8de5` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "NotIsmpHost", abi = "NotIsmpHost()")] - pub struct NotIsmpHost; - ///Container type for all of the contract's custom errors - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum PingModuleErrors { - ExecutionFailed(ExecutionFailed), - NotIsmpHost(NotIsmpHost), - /// The standard solidity revert string, with selector - /// Error(string) -- 0x08c379a0 - RevertString(::std::string::String), - } - impl ::ethers::core::abi::AbiDecode for PingModuleErrors { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = <::std::string::String as ::ethers::core::abi::AbiDecode>::decode( - data, - ) { - return Ok(Self::RevertString(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::ExecutionFailed(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::NotIsmpHost(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for PingModuleErrors { - fn encode(self) -> ::std::vec::Vec { - match self { - Self::ExecutionFailed(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::NotIsmpHost(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s), - } - } - } - impl ::ethers::contract::ContractRevert for PingModuleErrors { - fn valid_selector(selector: [u8; 4]) -> bool { - match selector { - [0x08, 0xc3, 0x79, 0xa0] => true, - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => true, - _ => false, - } - } - } - impl ::core::fmt::Display for PingModuleErrors { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ExecutionFailed(element) => ::core::fmt::Display::fmt(element, f), - Self::NotIsmpHost(element) => ::core::fmt::Display::fmt(element, f), - Self::RevertString(s) => ::core::fmt::Display::fmt(s, f), - } - } - } - impl ::core::convert::From<::std::string::String> for PingModuleErrors { - fn from(value: String) -> Self { - Self::RevertString(value) - } - } - impl ::core::convert::From for PingModuleErrors { - fn from(value: ExecutionFailed) -> Self { - Self::ExecutionFailed(value) - } - } - impl ::core::convert::From for PingModuleErrors { - fn from(value: NotIsmpHost) -> Self { - Self::NotIsmpHost(value) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent( - name = "GetResponseReceived", - abi = "GetResponseReceived((bytes,bytes)[])" - )] - pub struct GetResponseReceivedFilter { - pub message: ::std::vec::Vec, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "GetTimeoutReceived", abi = "GetTimeoutReceived()")] - pub struct GetTimeoutReceivedFilter; - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "MessageDispatched", abi = "MessageDispatched()")] - pub struct MessageDispatchedFilter; - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "PostReceived", abi = "PostReceived(string)")] - pub struct PostReceivedFilter { - pub message: ::std::string::String, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent( - name = "PostRequestTimeoutReceived", - abi = "PostRequestTimeoutReceived()" - )] - pub struct PostRequestTimeoutReceivedFilter; - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "PostResponseReceived", abi = "PostResponseReceived()")] - pub struct PostResponseReceivedFilter; - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent( - name = "PostResponseTimeoutReceived", - abi = "PostResponseTimeoutReceived()" - )] - pub struct PostResponseTimeoutReceivedFilter; - ///Container type for all of the contract's events - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum PingModuleEvents { - GetResponseReceivedFilter(GetResponseReceivedFilter), - GetTimeoutReceivedFilter(GetTimeoutReceivedFilter), - MessageDispatchedFilter(MessageDispatchedFilter), - PostReceivedFilter(PostReceivedFilter), - PostRequestTimeoutReceivedFilter(PostRequestTimeoutReceivedFilter), - PostResponseReceivedFilter(PostResponseReceivedFilter), - PostResponseTimeoutReceivedFilter(PostResponseTimeoutReceivedFilter), - } - impl ::ethers::contract::EthLogDecode for PingModuleEvents { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = GetResponseReceivedFilter::decode_log(log) { - return Ok(PingModuleEvents::GetResponseReceivedFilter(decoded)); - } - if let Ok(decoded) = GetTimeoutReceivedFilter::decode_log(log) { - return Ok(PingModuleEvents::GetTimeoutReceivedFilter(decoded)); - } - if let Ok(decoded) = MessageDispatchedFilter::decode_log(log) { - return Ok(PingModuleEvents::MessageDispatchedFilter(decoded)); - } - if let Ok(decoded) = PostReceivedFilter::decode_log(log) { - return Ok(PingModuleEvents::PostReceivedFilter(decoded)); - } - if let Ok(decoded) = PostRequestTimeoutReceivedFilter::decode_log(log) { - return Ok(PingModuleEvents::PostRequestTimeoutReceivedFilter(decoded)); - } - if let Ok(decoded) = PostResponseReceivedFilter::decode_log(log) { - return Ok(PingModuleEvents::PostResponseReceivedFilter(decoded)); - } - if let Ok(decoded) = PostResponseTimeoutReceivedFilter::decode_log(log) { - return Ok(PingModuleEvents::PostResponseTimeoutReceivedFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for PingModuleEvents { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::GetResponseReceivedFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::GetTimeoutReceivedFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::MessageDispatchedFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::PostReceivedFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::PostRequestTimeoutReceivedFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::PostResponseReceivedFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::PostResponseTimeoutReceivedFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - } - } - } - impl ::core::convert::From for PingModuleEvents { - fn from(value: GetResponseReceivedFilter) -> Self { - Self::GetResponseReceivedFilter(value) - } - } - impl ::core::convert::From for PingModuleEvents { - fn from(value: GetTimeoutReceivedFilter) -> Self { - Self::GetTimeoutReceivedFilter(value) - } - } - impl ::core::convert::From for PingModuleEvents { - fn from(value: MessageDispatchedFilter) -> Self { - Self::MessageDispatchedFilter(value) - } - } - impl ::core::convert::From for PingModuleEvents { - fn from(value: PostReceivedFilter) -> Self { - Self::PostReceivedFilter(value) - } - } - impl ::core::convert::From for PingModuleEvents { - fn from(value: PostRequestTimeoutReceivedFilter) -> Self { - Self::PostRequestTimeoutReceivedFilter(value) - } - } - impl ::core::convert::From for PingModuleEvents { - fn from(value: PostResponseReceivedFilter) -> Self { - Self::PostResponseReceivedFilter(value) - } - } - impl ::core::convert::From for PingModuleEvents { - fn from(value: PostResponseTimeoutReceivedFilter) -> Self { - Self::PostResponseTimeoutReceivedFilter(value) - } - } - ///Container type for all input parameters for the `dispatch` function with signature `dispatch((bytes,bytes,uint64,bytes,bytes,uint64,bytes))` and selector `0x70c5474f` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "dispatch", - abi = "dispatch((bytes,bytes,uint64,bytes,bytes,uint64,bytes))" - )] - pub struct DispatchCall { - pub request: GetRequest, - } - ///Container type for all input parameters for the `dispatch` function with signature `dispatch((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes))` and selector `0xd21050db` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "dispatch", - abi = "dispatch((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes))" - )] - pub struct DispatchWithRequestCall { - pub request: GetRequest, - } - ///Container type for all input parameters for the `dispatchPostResponse` function with signature `dispatchPostResponse(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64))` and selector `0x4d0d9c3b` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "dispatchPostResponse", - abi = "dispatchPostResponse(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64))" - )] - pub struct DispatchPostResponseCall { - pub response: PostResponse, - } - ///Container type for all input parameters for the `dispatchToParachain` function with signature `dispatchToParachain(uint256)` and selector `0x72354e9b` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "dispatchToParachain", abi = "dispatchToParachain(uint256)")] - pub struct DispatchToParachainCall { - pub para_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `host` function with signature `host()` and selector `0xf437bc59` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "host", abi = "host()")] - pub struct HostCall; - ///Container type for all input parameters for the `onAccept` function with signature `onAccept(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),address))` and selector `0x0fee32ce` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "onAccept", - abi = "onAccept(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),address))" - )] - pub struct OnAcceptCall { - pub incoming: IncomingPostRequest, - } - ///Container type for all input parameters for the `onGetResponse` function with signature `onGetResponse((((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]),address))` and selector `0x44ab20f8` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "onGetResponse", - abi = "onGetResponse((((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]),address))" - )] - pub struct OnGetResponseCall { - pub response: IncomingGetResponse, - } - ///Container type for all input parameters for the `onGetTimeout` function with signature `onGetTimeout((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes))` and selector `0xd0fff366` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "onGetTimeout", - abi = "onGetTimeout((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes))" - )] - pub struct OnGetTimeoutCall(pub GetRequest); - ///Container type for all input parameters for the `onPostRequestTimeout` function with signature `onPostRequestTimeout((bytes,bytes,uint64,bytes,bytes,uint64,bytes))` and selector `0xbc0dd447` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "onPostRequestTimeout", - abi = "onPostRequestTimeout((bytes,bytes,uint64,bytes,bytes,uint64,bytes))" - )] - pub struct OnPostRequestTimeoutCall(pub PostRequest); - ///Container type for all input parameters for the `onPostResponse` function with signature `onPostResponse((((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),address))` and selector `0xb2a01bf5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "onPostResponse", - abi = "onPostResponse((((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),address))" - )] - pub struct OnPostResponseCall(pub IncomingPostResponse); - ///Container type for all input parameters for the `onPostResponseTimeout` function with signature `onPostResponseTimeout(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64))` and selector `0x0bc37bab` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "onPostResponseTimeout", - abi = "onPostResponseTimeout(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64))" - )] - pub struct OnPostResponseTimeoutCall(pub PostResponse); - ///Container type for all input parameters for the `ping` function with signature `ping((bytes,address,uint64,uint256,uint256))` and selector `0x4a692e06` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "ping", abi = "ping((bytes,address,uint64,uint256,uint256))")] - pub struct PingCall { - pub ping_message: PingMessage, - } - ///Container type for all input parameters for the `previousPostRequest` function with signature `previousPostRequest()` and selector `0x88d9f170` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "previousPostRequest", abi = "previousPostRequest()")] - pub struct PreviousPostRequestCall; - ///Container type for all input parameters for the `setIsmpHost` function with signature `setIsmpHost(address,address)` and selector `0xef2f4982` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "setIsmpHost", abi = "setIsmpHost(address,address)")] - pub struct SetIsmpHostCall { - pub host_addr: ::ethers::core::types::Address, - pub token_faucet: ::ethers::core::types::Address, - } - ///Container type for all of the contract's call - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum PingModuleCalls { - Dispatch(DispatchCall), - DispatchWithRequest(DispatchWithRequestCall), - DispatchPostResponse(DispatchPostResponseCall), - DispatchToParachain(DispatchToParachainCall), - Host(HostCall), - OnAccept(OnAcceptCall), - OnGetResponse(OnGetResponseCall), - OnGetTimeout(OnGetTimeoutCall), - OnPostRequestTimeout(OnPostRequestTimeoutCall), - OnPostResponse(OnPostResponseCall), - OnPostResponseTimeout(OnPostResponseTimeoutCall), - Ping(PingCall), - PreviousPostRequest(PreviousPostRequestCall), - SetIsmpHost(SetIsmpHostCall), - } - impl ::ethers::core::abi::AbiDecode for PingModuleCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Dispatch(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::DispatchWithRequest(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::DispatchPostResponse(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::DispatchToParachain(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Host(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::OnAccept(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::OnGetResponse(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::OnGetTimeout(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::OnPostRequestTimeout(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::OnPostResponse(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::OnPostResponseTimeout(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Ping(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::PreviousPostRequest(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SetIsmpHost(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for PingModuleCalls { - fn encode(self) -> Vec { - match self { - Self::Dispatch(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::DispatchWithRequest(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::DispatchPostResponse(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::DispatchToParachain(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Host(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::OnAccept(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::OnGetResponse(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::OnGetTimeout(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::OnPostRequestTimeout(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::OnPostResponse(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::OnPostResponseTimeout(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Ping(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::PreviousPostRequest(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SetIsmpHost(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for PingModuleCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::Dispatch(element) => ::core::fmt::Display::fmt(element, f), - Self::DispatchWithRequest(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::DispatchPostResponse(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::DispatchToParachain(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::Host(element) => ::core::fmt::Display::fmt(element, f), - Self::OnAccept(element) => ::core::fmt::Display::fmt(element, f), - Self::OnGetResponse(element) => ::core::fmt::Display::fmt(element, f), - Self::OnGetTimeout(element) => ::core::fmt::Display::fmt(element, f), - Self::OnPostRequestTimeout(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::OnPostResponse(element) => ::core::fmt::Display::fmt(element, f), - Self::OnPostResponseTimeout(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::Ping(element) => ::core::fmt::Display::fmt(element, f), - Self::PreviousPostRequest(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::SetIsmpHost(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for PingModuleCalls { - fn from(value: DispatchCall) -> Self { - Self::Dispatch(value) - } - } - impl ::core::convert::From for PingModuleCalls { - fn from(value: DispatchWithRequestCall) -> Self { - Self::DispatchWithRequest(value) - } - } - impl ::core::convert::From for PingModuleCalls { - fn from(value: DispatchPostResponseCall) -> Self { - Self::DispatchPostResponse(value) - } - } - impl ::core::convert::From for PingModuleCalls { - fn from(value: DispatchToParachainCall) -> Self { - Self::DispatchToParachain(value) - } - } - impl ::core::convert::From for PingModuleCalls { - fn from(value: HostCall) -> Self { - Self::Host(value) - } - } - impl ::core::convert::From for PingModuleCalls { - fn from(value: OnAcceptCall) -> Self { - Self::OnAccept(value) - } - } - impl ::core::convert::From for PingModuleCalls { - fn from(value: OnGetResponseCall) -> Self { - Self::OnGetResponse(value) - } - } - impl ::core::convert::From for PingModuleCalls { - fn from(value: OnGetTimeoutCall) -> Self { - Self::OnGetTimeout(value) - } - } - impl ::core::convert::From for PingModuleCalls { - fn from(value: OnPostRequestTimeoutCall) -> Self { - Self::OnPostRequestTimeout(value) - } - } - impl ::core::convert::From for PingModuleCalls { - fn from(value: OnPostResponseCall) -> Self { - Self::OnPostResponse(value) - } - } - impl ::core::convert::From for PingModuleCalls { - fn from(value: OnPostResponseTimeoutCall) -> Self { - Self::OnPostResponseTimeout(value) - } - } - impl ::core::convert::From for PingModuleCalls { - fn from(value: PingCall) -> Self { - Self::Ping(value) - } - } - impl ::core::convert::From for PingModuleCalls { - fn from(value: PreviousPostRequestCall) -> Self { - Self::PreviousPostRequest(value) - } - } - impl ::core::convert::From for PingModuleCalls { - fn from(value: SetIsmpHostCall) -> Self { - Self::SetIsmpHost(value) - } - } - ///Container type for all return fields from the `dispatch` function with signature `dispatch((bytes,bytes,uint64,bytes,bytes,uint64,bytes))` and selector `0x70c5474f` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct DispatchReturn(pub [u8; 32]); - ///Container type for all return fields from the `dispatch` function with signature `dispatch((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes))` and selector `0xd21050db` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct DispatchWithRequestReturn(pub [u8; 32]); - ///Container type for all return fields from the `dispatchPostResponse` function with signature `dispatchPostResponse(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64))` and selector `0x4d0d9c3b` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct DispatchPostResponseReturn(pub [u8; 32]); - ///Container type for all return fields from the `host` function with signature `host()` and selector `0xf437bc59` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct HostReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `previousPostRequest` function with signature `previousPostRequest()` and selector `0x88d9f170` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct PreviousPostRequestReturn(pub PostRequest); - ///`PingMessage(bytes,address,uint64,uint256,uint256)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct PingMessage { - pub dest: ::ethers::core::types::Bytes, - pub module: ::ethers::core::types::Address, - pub timeout: u64, - pub count: ::ethers::core::types::U256, - pub fee: ::ethers::core::types::U256, - } + /// The deployed bytecode of the contract. + pub static PINGMODULE_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = + ::ethers::core::types::Bytes::from_static(__DEPLOYED_BYTECODE); + pub struct PingModule(::ethers::contract::Contract); + impl ::core::clone::Clone for PingModule { + fn clone(&self) -> Self { + Self(::core::clone::Clone::clone(&self.0)) + } + } + impl ::core::ops::Deref for PingModule { + type Target = ::ethers::contract::Contract; + fn deref(&self) -> &Self::Target { + &self.0 + } + } + impl ::core::ops::DerefMut for PingModule { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } + } + impl ::core::fmt::Debug for PingModule { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple(::core::stringify!(PingModule)).field(&self.address()).finish() + } + } + impl PingModule { + /// Creates a new contract instance with the specified `ethers` client at + /// `address`. The contract derefs to a `ethers::Contract` object. + pub fn new>( + address: T, + client: ::std::sync::Arc, + ) -> Self { + Self(::ethers::contract::Contract::new(address.into(), PINGMODULE_ABI.clone(), client)) + } + /// Constructs the general purpose `Deployer` instance based on the provided constructor + /// arguments and sends it. Returns a new instance of a deployer that returns an instance + /// of this contract after sending the transaction + /// + /// Notes: + /// - If there are no constructor arguments, you should pass `()` as the argument. + /// - The default poll duration is 7 seconds. + /// - The default number of confirmations is 1 block. + /// + /// + /// # Example + /// + /// Generate contract bindings with `abigen!` and deploy a new contract instance. + /// + /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. + /// + /// ```ignore + /// # async fn deploy(client: ::std::sync::Arc) { + /// abigen!(Greeter, "../greeter.json"); + /// + /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); + /// let msg = greeter_contract.greet().call().await.unwrap(); + /// # } + /// ``` + pub fn deploy( + client: ::std::sync::Arc, + constructor_args: T, + ) -> ::core::result::Result< + ::ethers::contract::builders::ContractDeployer, + ::ethers::contract::ContractError, + > { + let factory = ::ethers::contract::ContractFactory::new( + PINGMODULE_ABI.clone(), + PINGMODULE_BYTECODE.clone().into(), + client, + ); + let deployer = factory.deploy(constructor_args)?; + let deployer = ::ethers::contract::ContractDeployer::new(deployer); + Ok(deployer) + } + ///Calls the contract's `dispatch` (0x70c5474f) function + pub fn dispatch( + &self, + request: GetRequest, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([112, 197, 71, 79], (request,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `dispatch` (0xd21050db) function + pub fn dispatch_with_request( + &self, + request: GetRequest, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([210, 16, 80, 219], (request,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `dispatchPostResponse` (0x4d0d9c3b) function + pub fn dispatch_post_response( + &self, + response: PostResponse, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([77, 13, 156, 59], (response,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `dispatchToParachain` (0x72354e9b) function + pub fn dispatch_to_parachain( + &self, + para_id: ::ethers::core::types::U256, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([114, 53, 78, 155], para_id) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `host` (0xf437bc59) function + pub fn host( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([244, 55, 188, 89], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `onAccept` (0x0fee32ce) function + pub fn on_accept( + &self, + incoming: IncomingPostRequest, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([15, 238, 50, 206], (incoming,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `onGetResponse` (0x44ab20f8) function + pub fn on_get_response( + &self, + response: IncomingGetResponse, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([68, 171, 32, 248], (response,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `onGetTimeout` (0xd0fff366) function + pub fn on_get_timeout( + &self, + p0: GetRequest, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([208, 255, 243, 102], (p0,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `onPostRequestTimeout` (0xbc0dd447) function + pub fn on_post_request_timeout( + &self, + p0: PostRequest, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([188, 13, 212, 71], (p0,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `onPostResponse` (0xb2a01bf5) function + pub fn on_post_response( + &self, + p0: IncomingPostResponse, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([178, 160, 27, 245], (p0,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `onPostResponseTimeout` (0x0bc37bab) function + pub fn on_post_response_timeout( + &self, + p0: PostResponse, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([11, 195, 123, 171], (p0,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `ping` (0x4a692e06) function + pub fn ping( + &self, + ping_message: PingMessage, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([74, 105, 46, 6], (ping_message,)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `previousPostRequest` (0x88d9f170) function + pub fn previous_post_request( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([136, 217, 241, 112], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `setIsmpHost` (0xef2f4982) function + pub fn set_ismp_host( + &self, + host_addr: ::ethers::core::types::Address, + token_faucet: ::ethers::core::types::Address, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([239, 47, 73, 130], (host_addr, token_faucet)) + .expect("method not found (this should never happen)") + } + ///Gets the contract's `GetResponseReceived` event + pub fn get_response_received_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, GetResponseReceivedFilter> + { + self.0.event() + } + ///Gets the contract's `GetTimeoutReceived` event + pub fn get_timeout_received_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, GetTimeoutReceivedFilter> + { + self.0.event() + } + ///Gets the contract's `MessageDispatched` event + pub fn message_dispatched_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, MessageDispatchedFilter> + { + self.0.event() + } + ///Gets the contract's `PostReceived` event + pub fn post_received_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, PostReceivedFilter> { + self.0.event() + } + ///Gets the contract's `PostRequestTimeoutReceived` event + pub fn post_request_timeout_received_filter( + &self, + ) -> ::ethers::contract::builders::Event< + ::std::sync::Arc, + M, + PostRequestTimeoutReceivedFilter, + > { + self.0.event() + } + ///Gets the contract's `PostResponseReceived` event + pub fn post_response_received_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, PostResponseReceivedFilter> + { + self.0.event() + } + ///Gets the contract's `PostResponseTimeoutReceived` event + pub fn post_response_timeout_received_filter( + &self, + ) -> ::ethers::contract::builders::Event< + ::std::sync::Arc, + M, + PostResponseTimeoutReceivedFilter, + > { + self.0.event() + } + /// Returns an `Event` builder for all the events of this contract. + pub fn events( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, PingModuleEvents> { + self.0.event_with_filter(::core::default::Default::default()) + } + } + impl From<::ethers::contract::Contract> for PingModule { + fn from(contract: ::ethers::contract::Contract) -> Self { + Self::new(contract.address(), contract.client()) + } + } + ///Custom Error type `ExecutionFailed` with signature `ExecutionFailed()` and selector + /// `0xacfdb444` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "ExecutionFailed", abi = "ExecutionFailed()")] + pub struct ExecutionFailed; + ///Custom Error type `NotIsmpHost` with signature `NotIsmpHost()` and selector `0x51ab8de5` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "NotIsmpHost", abi = "NotIsmpHost()")] + pub struct NotIsmpHost; + ///Container type for all of the contract's custom errors + #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] + pub enum PingModuleErrors { + ExecutionFailed(ExecutionFailed), + NotIsmpHost(NotIsmpHost), + /// The standard solidity revert string, with selector + /// Error(string) -- 0x08c379a0 + RevertString(::std::string::String), + } + impl ::ethers::core::abi::AbiDecode for PingModuleErrors { + fn decode( + data: impl AsRef<[u8]>, + ) -> ::core::result::Result { + let data = data.as_ref(); + if let Ok(decoded) = + <::std::string::String as ::ethers::core::abi::AbiDecode>::decode(data) + { + return Ok(Self::RevertString(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::ExecutionFailed(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::NotIsmpHost(decoded)); + } + Err(::ethers::core::abi::Error::InvalidData.into()) + } + } + impl ::ethers::core::abi::AbiEncode for PingModuleErrors { + fn encode(self) -> ::std::vec::Vec { + match self { + Self::ExecutionFailed(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::NotIsmpHost(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s), + } + } + } + impl ::ethers::contract::ContractRevert for PingModuleErrors { + fn valid_selector(selector: [u8; 4]) -> bool { + match selector { + [0x08, 0xc3, 0x79, 0xa0] => true, + _ if selector == ::selector() => + true, + _ if selector == ::selector() => true, + _ => false, + } + } + } + impl ::core::fmt::Display for PingModuleErrors { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + match self { + Self::ExecutionFailed(element) => ::core::fmt::Display::fmt(element, f), + Self::NotIsmpHost(element) => ::core::fmt::Display::fmt(element, f), + Self::RevertString(s) => ::core::fmt::Display::fmt(s, f), + } + } + } + impl ::core::convert::From<::std::string::String> for PingModuleErrors { + fn from(value: String) -> Self { + Self::RevertString(value) + } + } + impl ::core::convert::From for PingModuleErrors { + fn from(value: ExecutionFailed) -> Self { + Self::ExecutionFailed(value) + } + } + impl ::core::convert::From for PingModuleErrors { + fn from(value: NotIsmpHost) -> Self { + Self::NotIsmpHost(value) + } + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent(name = "GetResponseReceived", abi = "GetResponseReceived((bytes,bytes)[])")] + pub struct GetResponseReceivedFilter { + pub message: ::std::vec::Vec, + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent(name = "GetTimeoutReceived", abi = "GetTimeoutReceived()")] + pub struct GetTimeoutReceivedFilter; + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent(name = "MessageDispatched", abi = "MessageDispatched()")] + pub struct MessageDispatchedFilter; + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent(name = "PostReceived", abi = "PostReceived(string)")] + pub struct PostReceivedFilter { + pub message: ::std::string::String, + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent(name = "PostRequestTimeoutReceived", abi = "PostRequestTimeoutReceived()")] + pub struct PostRequestTimeoutReceivedFilter; + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent(name = "PostResponseReceived", abi = "PostResponseReceived()")] + pub struct PostResponseReceivedFilter; + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent(name = "PostResponseTimeoutReceived", abi = "PostResponseTimeoutReceived()")] + pub struct PostResponseTimeoutReceivedFilter; + ///Container type for all of the contract's events + #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] + pub enum PingModuleEvents { + GetResponseReceivedFilter(GetResponseReceivedFilter), + GetTimeoutReceivedFilter(GetTimeoutReceivedFilter), + MessageDispatchedFilter(MessageDispatchedFilter), + PostReceivedFilter(PostReceivedFilter), + PostRequestTimeoutReceivedFilter(PostRequestTimeoutReceivedFilter), + PostResponseReceivedFilter(PostResponseReceivedFilter), + PostResponseTimeoutReceivedFilter(PostResponseTimeoutReceivedFilter), + } + impl ::ethers::contract::EthLogDecode for PingModuleEvents { + fn decode_log( + log: &::ethers::core::abi::RawLog, + ) -> ::core::result::Result { + if let Ok(decoded) = GetResponseReceivedFilter::decode_log(log) { + return Ok(PingModuleEvents::GetResponseReceivedFilter(decoded)); + } + if let Ok(decoded) = GetTimeoutReceivedFilter::decode_log(log) { + return Ok(PingModuleEvents::GetTimeoutReceivedFilter(decoded)); + } + if let Ok(decoded) = MessageDispatchedFilter::decode_log(log) { + return Ok(PingModuleEvents::MessageDispatchedFilter(decoded)); + } + if let Ok(decoded) = PostReceivedFilter::decode_log(log) { + return Ok(PingModuleEvents::PostReceivedFilter(decoded)); + } + if let Ok(decoded) = PostRequestTimeoutReceivedFilter::decode_log(log) { + return Ok(PingModuleEvents::PostRequestTimeoutReceivedFilter(decoded)); + } + if let Ok(decoded) = PostResponseReceivedFilter::decode_log(log) { + return Ok(PingModuleEvents::PostResponseReceivedFilter(decoded)); + } + if let Ok(decoded) = PostResponseTimeoutReceivedFilter::decode_log(log) { + return Ok(PingModuleEvents::PostResponseTimeoutReceivedFilter(decoded)); + } + Err(::ethers::core::abi::Error::InvalidData) + } + } + impl ::core::fmt::Display for PingModuleEvents { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + match self { + Self::GetResponseReceivedFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::GetTimeoutReceivedFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::MessageDispatchedFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::PostReceivedFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::PostRequestTimeoutReceivedFilter(element) => + ::core::fmt::Display::fmt(element, f), + Self::PostResponseReceivedFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::PostResponseTimeoutReceivedFilter(element) => + ::core::fmt::Display::fmt(element, f), + } + } + } + impl ::core::convert::From for PingModuleEvents { + fn from(value: GetResponseReceivedFilter) -> Self { + Self::GetResponseReceivedFilter(value) + } + } + impl ::core::convert::From for PingModuleEvents { + fn from(value: GetTimeoutReceivedFilter) -> Self { + Self::GetTimeoutReceivedFilter(value) + } + } + impl ::core::convert::From for PingModuleEvents { + fn from(value: MessageDispatchedFilter) -> Self { + Self::MessageDispatchedFilter(value) + } + } + impl ::core::convert::From for PingModuleEvents { + fn from(value: PostReceivedFilter) -> Self { + Self::PostReceivedFilter(value) + } + } + impl ::core::convert::From for PingModuleEvents { + fn from(value: PostRequestTimeoutReceivedFilter) -> Self { + Self::PostRequestTimeoutReceivedFilter(value) + } + } + impl ::core::convert::From for PingModuleEvents { + fn from(value: PostResponseReceivedFilter) -> Self { + Self::PostResponseReceivedFilter(value) + } + } + impl ::core::convert::From for PingModuleEvents { + fn from(value: PostResponseTimeoutReceivedFilter) -> Self { + Self::PostResponseTimeoutReceivedFilter(value) + } + } + ///Container type for all input parameters for the `dispatch` function with signature + /// `dispatch((bytes,bytes,uint64,bytes,bytes,uint64,bytes))` and selector `0x70c5474f` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "dispatch", abi = "dispatch((bytes,bytes,uint64,bytes,bytes,uint64,bytes))")] + pub struct DispatchCall { + pub request: GetRequest, + } + ///Container type for all input parameters for the `dispatch` function with signature + /// `dispatch((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes))` and selector + /// `0xd21050db` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "dispatch", + abi = "dispatch((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes))" + )] + pub struct DispatchWithRequestCall { + pub request: GetRequest, + } + ///Container type for all input parameters for the `dispatchPostResponse` function with + /// signature `dispatchPostResponse(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes, + /// uint64))` and selector `0x4d0d9c3b` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "dispatchPostResponse", + abi = "dispatchPostResponse(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64))" + )] + pub struct DispatchPostResponseCall { + pub response: PostResponse, + } + ///Container type for all input parameters for the `dispatchToParachain` function with + /// signature `dispatchToParachain(uint256)` and selector `0x72354e9b` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "dispatchToParachain", abi = "dispatchToParachain(uint256)")] + pub struct DispatchToParachainCall { + pub para_id: ::ethers::core::types::U256, + } + ///Container type for all input parameters for the `host` function with signature `host()` and + /// selector `0xf437bc59` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "host", abi = "host()")] + pub struct HostCall; + ///Container type for all input parameters for the `onAccept` function with signature + /// `onAccept(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),address))` and selector + /// `0x0fee32ce` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "onAccept", + abi = "onAccept(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),address))" + )] + pub struct OnAcceptCall { + pub incoming: IncomingPostRequest, + } + ///Container type for all input parameters for the `onGetResponse` function with signature + /// `onGetResponse((((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]), + /// address))` and selector `0x44ab20f8` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "onGetResponse", + abi = "onGetResponse((((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]),address))" + )] + pub struct OnGetResponseCall { + pub response: IncomingGetResponse, + } + ///Container type for all input parameters for the `onGetTimeout` function with signature + /// `onGetTimeout((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes))` and selector + /// `0xd0fff366` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "onGetTimeout", + abi = "onGetTimeout((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes))" + )] + pub struct OnGetTimeoutCall(pub GetRequest); + ///Container type for all input parameters for the `onPostRequestTimeout` function with + /// signature `onPostRequestTimeout((bytes,bytes,uint64,bytes,bytes,uint64,bytes))` and selector + /// `0xbc0dd447` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "onPostRequestTimeout", + abi = "onPostRequestTimeout((bytes,bytes,uint64,bytes,bytes,uint64,bytes))" + )] + pub struct OnPostRequestTimeoutCall(pub PostRequest); + ///Container type for all input parameters for the `onPostResponse` function with signature + /// `onPostResponse((((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),address))` and + /// selector `0xb2a01bf5` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "onPostResponse", + abi = "onPostResponse((((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),address))" + )] + pub struct OnPostResponseCall(pub IncomingPostResponse); + ///Container type for all input parameters for the `onPostResponseTimeout` function with + /// signature `onPostResponseTimeout(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes, + /// uint64))` and selector `0x0bc37bab` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "onPostResponseTimeout", + abi = "onPostResponseTimeout(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64))" + )] + pub struct OnPostResponseTimeoutCall(pub PostResponse); + ///Container type for all input parameters for the `ping` function with signature + /// `ping((bytes,address,uint64,uint256,uint256))` and selector `0x4a692e06` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "ping", abi = "ping((bytes,address,uint64,uint256,uint256))")] + pub struct PingCall { + pub ping_message: PingMessage, + } + ///Container type for all input parameters for the `previousPostRequest` function with + /// signature `previousPostRequest()` and selector `0x88d9f170` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "previousPostRequest", abi = "previousPostRequest()")] + pub struct PreviousPostRequestCall; + ///Container type for all input parameters for the `setIsmpHost` function with signature + /// `setIsmpHost(address,address)` and selector `0xef2f4982` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "setIsmpHost", abi = "setIsmpHost(address,address)")] + pub struct SetIsmpHostCall { + pub host_addr: ::ethers::core::types::Address, + pub token_faucet: ::ethers::core::types::Address, + } + ///Container type for all of the contract's call + #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] + pub enum PingModuleCalls { + Dispatch(DispatchCall), + DispatchWithRequest(DispatchWithRequestCall), + DispatchPostResponse(DispatchPostResponseCall), + DispatchToParachain(DispatchToParachainCall), + Host(HostCall), + OnAccept(OnAcceptCall), + OnGetResponse(OnGetResponseCall), + OnGetTimeout(OnGetTimeoutCall), + OnPostRequestTimeout(OnPostRequestTimeoutCall), + OnPostResponse(OnPostResponseCall), + OnPostResponseTimeout(OnPostResponseTimeoutCall), + Ping(PingCall), + PreviousPostRequest(PreviousPostRequestCall), + SetIsmpHost(SetIsmpHostCall), + } + impl ::ethers::core::abi::AbiDecode for PingModuleCalls { + fn decode( + data: impl AsRef<[u8]>, + ) -> ::core::result::Result { + let data = data.as_ref(); + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Dispatch(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::DispatchWithRequest(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::DispatchPostResponse(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::DispatchToParachain(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Host(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::OnAccept(decoded)); + } + if let Ok(decoded) = ::decode(data) + { + return Ok(Self::OnGetResponse(decoded)); + } + if let Ok(decoded) = ::decode(data) + { + return Ok(Self::OnGetTimeout(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::OnPostRequestTimeout(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::OnPostResponse(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::OnPostResponseTimeout(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Ping(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::PreviousPostRequest(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::SetIsmpHost(decoded)); + } + Err(::ethers::core::abi::Error::InvalidData.into()) + } + } + impl ::ethers::core::abi::AbiEncode for PingModuleCalls { + fn encode(self) -> Vec { + match self { + Self::Dispatch(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::DispatchWithRequest(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::DispatchPostResponse(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::DispatchToParachain(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::Host(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::OnAccept(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::OnGetResponse(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::OnGetTimeout(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::OnPostRequestTimeout(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::OnPostResponse(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::OnPostResponseTimeout(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::Ping(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::PreviousPostRequest(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::SetIsmpHost(element) => ::ethers::core::abi::AbiEncode::encode(element), + } + } + } + impl ::core::fmt::Display for PingModuleCalls { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + match self { + Self::Dispatch(element) => ::core::fmt::Display::fmt(element, f), + Self::DispatchWithRequest(element) => ::core::fmt::Display::fmt(element, f), + Self::DispatchPostResponse(element) => ::core::fmt::Display::fmt(element, f), + Self::DispatchToParachain(element) => ::core::fmt::Display::fmt(element, f), + Self::Host(element) => ::core::fmt::Display::fmt(element, f), + Self::OnAccept(element) => ::core::fmt::Display::fmt(element, f), + Self::OnGetResponse(element) => ::core::fmt::Display::fmt(element, f), + Self::OnGetTimeout(element) => ::core::fmt::Display::fmt(element, f), + Self::OnPostRequestTimeout(element) => ::core::fmt::Display::fmt(element, f), + Self::OnPostResponse(element) => ::core::fmt::Display::fmt(element, f), + Self::OnPostResponseTimeout(element) => ::core::fmt::Display::fmt(element, f), + Self::Ping(element) => ::core::fmt::Display::fmt(element, f), + Self::PreviousPostRequest(element) => ::core::fmt::Display::fmt(element, f), + Self::SetIsmpHost(element) => ::core::fmt::Display::fmt(element, f), + } + } + } + impl ::core::convert::From for PingModuleCalls { + fn from(value: DispatchCall) -> Self { + Self::Dispatch(value) + } + } + impl ::core::convert::From for PingModuleCalls { + fn from(value: DispatchWithRequestCall) -> Self { + Self::DispatchWithRequest(value) + } + } + impl ::core::convert::From for PingModuleCalls { + fn from(value: DispatchPostResponseCall) -> Self { + Self::DispatchPostResponse(value) + } + } + impl ::core::convert::From for PingModuleCalls { + fn from(value: DispatchToParachainCall) -> Self { + Self::DispatchToParachain(value) + } + } + impl ::core::convert::From for PingModuleCalls { + fn from(value: HostCall) -> Self { + Self::Host(value) + } + } + impl ::core::convert::From for PingModuleCalls { + fn from(value: OnAcceptCall) -> Self { + Self::OnAccept(value) + } + } + impl ::core::convert::From for PingModuleCalls { + fn from(value: OnGetResponseCall) -> Self { + Self::OnGetResponse(value) + } + } + impl ::core::convert::From for PingModuleCalls { + fn from(value: OnGetTimeoutCall) -> Self { + Self::OnGetTimeout(value) + } + } + impl ::core::convert::From for PingModuleCalls { + fn from(value: OnPostRequestTimeoutCall) -> Self { + Self::OnPostRequestTimeout(value) + } + } + impl ::core::convert::From for PingModuleCalls { + fn from(value: OnPostResponseCall) -> Self { + Self::OnPostResponse(value) + } + } + impl ::core::convert::From for PingModuleCalls { + fn from(value: OnPostResponseTimeoutCall) -> Self { + Self::OnPostResponseTimeout(value) + } + } + impl ::core::convert::From for PingModuleCalls { + fn from(value: PingCall) -> Self { + Self::Ping(value) + } + } + impl ::core::convert::From for PingModuleCalls { + fn from(value: PreviousPostRequestCall) -> Self { + Self::PreviousPostRequest(value) + } + } + impl ::core::convert::From for PingModuleCalls { + fn from(value: SetIsmpHostCall) -> Self { + Self::SetIsmpHost(value) + } + } + ///Container type for all return fields from the `dispatch` function with signature + /// `dispatch((bytes,bytes,uint64,bytes,bytes,uint64,bytes))` and selector `0x70c5474f` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct DispatchReturn(pub [u8; 32]); + ///Container type for all return fields from the `dispatch` function with signature + /// `dispatch((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes))` and selector + /// `0xd21050db` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct DispatchWithRequestReturn(pub [u8; 32]); + ///Container type for all return fields from the `dispatchPostResponse` function with signature + /// `dispatchPostResponse(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64))` and + /// selector `0x4d0d9c3b` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct DispatchPostResponseReturn(pub [u8; 32]); + ///Container type for all return fields from the `host` function with signature `host()` and + /// selector `0xf437bc59` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct HostReturn(pub ::ethers::core::types::Address); + ///Container type for all return fields from the `previousPostRequest` function with signature + /// `previousPostRequest()` and selector `0x88d9f170` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct PreviousPostRequestReturn(pub PostRequest); + ///`PingMessage(bytes,address,uint64,uint256,uint256)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct PingMessage { + pub dest: ::ethers::core::types::Bytes, + pub module: ::ethers::core::types::Address, + pub timeout: u64, + pub count: ::ethers::core::types::U256, + pub fee: ::ethers::core::types::U256, + } } diff --git a/evm/abi/src/generated/shared_types.rs b/evm/abi/src/generated/shared_types.rs index 95f8e1c9b..63415668f 100644 --- a/evm/abi/src/generated/shared_types.rs +++ b/evm/abi/src/generated/shared_types.rs @@ -1,232 +1,234 @@ ///`AuthoritySetCommitment(uint256,uint256,bytes32)` #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, )] pub struct AuthoritySetCommitment { - pub id: ::ethers::core::types::U256, - pub len: ::ethers::core::types::U256, - pub root: [u8; 32], + pub id: ::ethers::core::types::U256, + pub len: ::ethers::core::types::U256, + pub root: [u8; 32], } ///`DispatchPost(bytes,bytes,bytes,uint64,uint256,address)` #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, )] pub struct DispatchPost { - pub dest: ::ethers::core::types::Bytes, - pub to: ::ethers::core::types::Bytes, - pub body: ::ethers::core::types::Bytes, - pub timeout: u64, - pub fee: ::ethers::core::types::U256, - pub payer: ::ethers::core::types::Address, + pub dest: ::ethers::core::types::Bytes, + pub to: ::ethers::core::types::Bytes, + pub body: ::ethers::core::types::Bytes, + pub timeout: u64, + pub fee: ::ethers::core::types::U256, + pub payer: ::ethers::core::types::Address, } -///`DispatchPostResponse((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64,uint256,address)` +///`DispatchPostResponse((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64,uint256, +/// address)` #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, )] pub struct DispatchPostResponse { - pub request: PostRequest, - pub response: ::ethers::core::types::Bytes, - pub timeout: u64, - pub fee: ::ethers::core::types::U256, - pub payer: ::ethers::core::types::Address, + pub request: PostRequest, + pub response: ::ethers::core::types::Bytes, + pub timeout: u64, + pub fee: ::ethers::core::types::U256, + pub payer: ::ethers::core::types::Address, } ///`GetRequest(bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes)` #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, )] pub struct GetRequest { - pub source: ::ethers::core::types::Bytes, - pub dest: ::ethers::core::types::Bytes, - pub nonce: u64, - pub from: ::ethers::core::types::Address, - pub timeout_timestamp: u64, - pub keys: ::std::vec::Vec<::ethers::core::types::Bytes>, - pub height: u64, - pub context: ::ethers::core::types::Bytes, + pub source: ::ethers::core::types::Bytes, + pub dest: ::ethers::core::types::Bytes, + pub nonce: u64, + pub from: ::ethers::core::types::Address, + pub timeout_timestamp: u64, + pub keys: ::std::vec::Vec<::ethers::core::types::Bytes>, + pub height: u64, + pub context: ::ethers::core::types::Bytes, } ///`GetResponse((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[])` #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, )] pub struct GetResponse { - pub request: GetRequest, - pub values: ::std::vec::Vec, + pub request: GetRequest, + pub values: ::std::vec::Vec, } -///`IncomingGetResponse(((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]),address)` +///`IncomingGetResponse(((bytes,bytes,uint64,address,uint64,bytes[],uint64,bytes),(bytes,bytes)[]), +/// address)` #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, )] pub struct IncomingGetResponse { - pub response: GetResponse, - pub relayer: ::ethers::core::types::Address, + pub response: GetResponse, + pub relayer: ::ethers::core::types::Address, } ///`IncomingPostRequest((bytes,bytes,uint64,bytes,bytes,uint64,bytes),address)` #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, )] pub struct IncomingPostRequest { - pub request: PostRequest, - pub relayer: ::ethers::core::types::Address, + pub request: PostRequest, + pub relayer: ::ethers::core::types::Address, } ///`IncomingPostResponse(((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64),address)` #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, )] pub struct IncomingPostResponse { - pub response: PostResponse, - pub relayer: ::ethers::core::types::Address, + pub response: PostResponse, + pub relayer: ::ethers::core::types::Address, } ///`IntermediateState(uint256,uint256,(uint256,bytes32,bytes32))` #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, )] pub struct IntermediateState { - pub state_machine_id: ::ethers::core::types::U256, - pub height: ::ethers::core::types::U256, - pub commitment: StateCommitment, + pub state_machine_id: ::ethers::core::types::U256, + pub height: ::ethers::core::types::U256, + pub commitment: StateCommitment, } ///`PostRequest(bytes,bytes,uint64,bytes,bytes,uint64,bytes)` #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, )] pub struct PostRequest { - pub source: ::ethers::core::types::Bytes, - pub dest: ::ethers::core::types::Bytes, - pub nonce: u64, - pub from: ::ethers::core::types::Bytes, - pub to: ::ethers::core::types::Bytes, - pub timeout_timestamp: u64, - pub body: ::ethers::core::types::Bytes, + pub source: ::ethers::core::types::Bytes, + pub dest: ::ethers::core::types::Bytes, + pub nonce: u64, + pub from: ::ethers::core::types::Bytes, + pub to: ::ethers::core::types::Bytes, + pub timeout_timestamp: u64, + pub body: ::ethers::core::types::Bytes, } ///`PostResponse((bytes,bytes,uint64,bytes,bytes,uint64,bytes),bytes,uint64)` #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, )] pub struct PostResponse { - pub request: PostRequest, - pub response: ::ethers::core::types::Bytes, - pub timeout_timestamp: u64, + pub request: PostRequest, + pub response: ::ethers::core::types::Bytes, + pub timeout_timestamp: u64, } ///`StateCommitment(uint256,bytes32,bytes32)` #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, )] pub struct StateCommitment { - pub timestamp: ::ethers::core::types::U256, - pub overlay_root: [u8; 32], - pub state_root: [u8; 32], + pub timestamp: ::ethers::core::types::U256, + pub overlay_root: [u8; 32], + pub state_root: [u8; 32], } ///`StateMachineHeight(uint256,uint256)` #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, )] pub struct StateMachineHeight { - pub state_machine_id: ::ethers::core::types::U256, - pub height: ::ethers::core::types::U256, + pub state_machine_id: ::ethers::core::types::U256, + pub height: ::ethers::core::types::U256, } ///`StorageValue(bytes,bytes)` #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, )] pub struct StorageValue { - pub key: ::ethers::core::types::Bytes, - pub value: ::ethers::core::types::Bytes, + pub key: ::ethers::core::types::Bytes, + pub value: ::ethers::core::types::Bytes, } diff --git a/evm/abi/src/generated/sp1_beefy.rs b/evm/abi/src/generated/sp1_beefy.rs index 99baac928..d908939ac 100644 --- a/evm/abi/src/generated/sp1_beefy.rs +++ b/evm/abi/src/generated/sp1_beefy.rs @@ -2,18 +2,18 @@ pub use sp1_beefy::*; /// This module was auto-generated with ethers-rs Abigen. /// More information at: #[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, + clippy::enum_variant_names, + clippy::too_many_arguments, + clippy::upper_case_acronyms, + clippy::type_complexity, + dead_code, + non_camel_case_types )] pub mod sp1_beefy { - pub use super::super::shared_types::*; - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { + pub use super::super::shared_types::*; + #[allow(deprecated)] + fn __abi() -> ::ethers::core::abi::Abi { + ::ethers::core::abi::ethabi::Contract { constructor: ::core::option::Option::Some(::ethers::core::abi::ethabi::Constructor { inputs: ::std::vec![ ::ethers::core::abi::ethabi::Param { @@ -249,504 +249,484 @@ pub mod sp1_beefy { receive: false, fallback: false, } - } - ///The parsed JSON ABI of the contract. - pub static SP1BEEFY_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - pub struct SP1Beefy(::ethers::contract::Contract); - impl ::core::clone::Clone for SP1Beefy { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for SP1Beefy { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for SP1Beefy { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for SP1Beefy { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(SP1Beefy)).field(&self.address()).finish() - } - } - impl SP1Beefy { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - SP1BEEFY_ABI.clone(), - client, - ), - ) - } - ///Calls the contract's `noOp` (0x09a07dd3) function - pub fn no_op( - &self, - s: Sp1BeefyProof, - p: PublicInputs, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([9, 160, 125, 211], (s, p)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `supportsInterface` (0x01ffc9a7) function - pub fn supports_interface( - &self, - interface_id: [u8; 4], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([1, 255, 201, 167], interface_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `verificationKey` (0x7ddc907d) function - pub fn verification_key( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([125, 220, 144, 125], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `verifyConsensus` (0x7d755598) function - pub fn verify_consensus( - &self, - encoded_state: ::ethers::core::types::Bytes, - encoded_proof: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall< - M, - (::ethers::core::types::Bytes, ::std::vec::Vec), - > { - self.0 - .method_hash([125, 117, 85, 152], (encoded_state, encoded_proof)) - .expect("method not found (this should never happen)") - } - } - impl From<::ethers::contract::Contract> - for SP1Beefy { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - ///Custom Error type `IllegalGenesisBlock` with signature `IllegalGenesisBlock()` and selector `0xb4eb9e51` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "IllegalGenesisBlock", abi = "IllegalGenesisBlock()")] - pub struct IllegalGenesisBlock; - ///Custom Error type `StaleHeight` with signature `StaleHeight()` and selector `0xbeda4fc3` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "StaleHeight", abi = "StaleHeight()")] - pub struct StaleHeight; - ///Custom Error type `UnknownAuthoritySet` with signature `UnknownAuthoritySet()` and selector `0xe405cd0a` - #[derive( - Clone, - ::ethers::contract::EthError, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[etherror(name = "UnknownAuthoritySet", abi = "UnknownAuthoritySet()")] - pub struct UnknownAuthoritySet; - ///Container type for all of the contract's custom errors - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum SP1BeefyErrors { - IllegalGenesisBlock(IllegalGenesisBlock), - StaleHeight(StaleHeight), - UnknownAuthoritySet(UnknownAuthoritySet), - /// The standard solidity revert string, with selector - /// Error(string) -- 0x08c379a0 - RevertString(::std::string::String), - } - impl ::ethers::core::abi::AbiDecode for SP1BeefyErrors { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = <::std::string::String as ::ethers::core::abi::AbiDecode>::decode( - data, - ) { - return Ok(Self::RevertString(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::IllegalGenesisBlock(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::StaleHeight(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::UnknownAuthoritySet(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for SP1BeefyErrors { - fn encode(self) -> ::std::vec::Vec { - match self { - Self::IllegalGenesisBlock(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::StaleHeight(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::UnknownAuthoritySet(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s), - } - } - } - impl ::ethers::contract::ContractRevert for SP1BeefyErrors { - fn valid_selector(selector: [u8; 4]) -> bool { - match selector { - [0x08, 0xc3, 0x79, 0xa0] => true, - _ if selector - == ::selector() => { - true - } - _ if selector - == ::selector() => true, - _ if selector - == ::selector() => { - true - } - _ => false, - } - } - } - impl ::core::fmt::Display for SP1BeefyErrors { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::IllegalGenesisBlock(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::StaleHeight(element) => ::core::fmt::Display::fmt(element, f), - Self::UnknownAuthoritySet(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::RevertString(s) => ::core::fmt::Display::fmt(s, f), - } - } - } - impl ::core::convert::From<::std::string::String> for SP1BeefyErrors { - fn from(value: String) -> Self { - Self::RevertString(value) - } - } - impl ::core::convert::From for SP1BeefyErrors { - fn from(value: IllegalGenesisBlock) -> Self { - Self::IllegalGenesisBlock(value) - } - } - impl ::core::convert::From for SP1BeefyErrors { - fn from(value: StaleHeight) -> Self { - Self::StaleHeight(value) - } - } - impl ::core::convert::From for SP1BeefyErrors { - fn from(value: UnknownAuthoritySet) -> Self { - Self::UnknownAuthoritySet(value) - } - } - ///Container type for all input parameters for the `noOp` function with signature `noOp(((uint256,uint256),(uint256,uint256,bytes32,(uint256,uint256,bytes32),bytes32),(uint256,bytes)[],bytes),(bytes32,uint256,bytes32,bytes32[]))` and selector `0x09a07dd3` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "noOp", - abi = "noOp(((uint256,uint256),(uint256,uint256,bytes32,(uint256,uint256,bytes32),bytes32),(uint256,bytes)[],bytes),(bytes32,uint256,bytes32,bytes32[]))" - )] - pub struct NoOpCall { - pub s: Sp1BeefyProof, - pub p: PublicInputs, - } - ///Container type for all input parameters for the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")] - pub struct SupportsInterfaceCall { - pub interface_id: [u8; 4], - } - ///Container type for all input parameters for the `verificationKey` function with signature `verificationKey()` and selector `0x7ddc907d` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "verificationKey", abi = "verificationKey()")] - pub struct VerificationKeyCall; - ///Container type for all input parameters for the `verifyConsensus` function with signature `verifyConsensus(bytes,bytes)` and selector `0x7d755598` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "verifyConsensus", abi = "verifyConsensus(bytes,bytes)")] - pub struct VerifyConsensusCall { - pub encoded_state: ::ethers::core::types::Bytes, - pub encoded_proof: ::ethers::core::types::Bytes, - } - ///Container type for all of the contract's call - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum SP1BeefyCalls { - NoOp(NoOpCall), - SupportsInterface(SupportsInterfaceCall), - VerificationKey(VerificationKeyCall), - VerifyConsensus(VerifyConsensusCall), - } - impl ::ethers::core::abi::AbiDecode for SP1BeefyCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::NoOp(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SupportsInterface(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::VerificationKey(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::VerifyConsensus(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for SP1BeefyCalls { - fn encode(self) -> Vec { - match self { - Self::NoOp(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::SupportsInterface(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::VerificationKey(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::VerifyConsensus(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for SP1BeefyCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::NoOp(element) => ::core::fmt::Display::fmt(element, f), - Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f), - Self::VerificationKey(element) => ::core::fmt::Display::fmt(element, f), - Self::VerifyConsensus(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for SP1BeefyCalls { - fn from(value: NoOpCall) -> Self { - Self::NoOp(value) - } - } - impl ::core::convert::From for SP1BeefyCalls { - fn from(value: SupportsInterfaceCall) -> Self { - Self::SupportsInterface(value) - } - } - impl ::core::convert::From for SP1BeefyCalls { - fn from(value: VerificationKeyCall) -> Self { - Self::VerificationKey(value) - } - } - impl ::core::convert::From for SP1BeefyCalls { - fn from(value: VerifyConsensusCall) -> Self { - Self::VerifyConsensus(value) - } - } - ///Container type for all return fields from the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SupportsInterfaceReturn(pub bool); - ///Container type for all return fields from the `verificationKey` function with signature `verificationKey()` and selector `0x7ddc907d` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct VerificationKeyReturn(pub [u8; 32]); - ///Container type for all return fields from the `verifyConsensus` function with signature `verifyConsensus(bytes,bytes)` and selector `0x7d755598` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct VerifyConsensusReturn( - pub ::ethers::core::types::Bytes, - pub ::std::vec::Vec, - ); - ///`MiniCommitment(uint256,uint256)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct MiniCommitment { - pub block_number: ::ethers::core::types::U256, - pub validator_set_id: ::ethers::core::types::U256, - } - ///`ParachainHeader(uint256,bytes)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ParachainHeader { - pub id: ::ethers::core::types::U256, - pub header: ::ethers::core::types::Bytes, - } - ///`PartialBeefyMmrLeaf(uint256,uint256,bytes32,(uint256,uint256,bytes32),bytes32)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct PartialBeefyMmrLeaf { - pub version: ::ethers::core::types::U256, - pub parent_number: ::ethers::core::types::U256, - pub parent_hash: [u8; 32], - pub next_authority_set: AuthoritySetCommitment, - pub extra: [u8; 32], - } - ///`PublicInputs(bytes32,uint256,bytes32,bytes32[])` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct PublicInputs { - pub authorities_root: [u8; 32], - pub authorities_len: ::ethers::core::types::U256, - pub leaf_hash: [u8; 32], - pub headers: ::std::vec::Vec<[u8; 32]>, - } - ///`Sp1BeefyProof((uint256,uint256),(uint256,uint256,bytes32,(uint256,uint256,bytes32),bytes32),(uint256,bytes)[],bytes)` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct Sp1BeefyProof { - pub commitment: MiniCommitment, - pub mmr_leaf: PartialBeefyMmrLeaf, - pub headers: ::std::vec::Vec, - pub proof: ::ethers::core::types::Bytes, - } + } + ///The parsed JSON ABI of the contract. + pub static SP1BEEFY_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = + ::ethers::contract::Lazy::new(__abi); + pub struct SP1Beefy(::ethers::contract::Contract); + impl ::core::clone::Clone for SP1Beefy { + fn clone(&self) -> Self { + Self(::core::clone::Clone::clone(&self.0)) + } + } + impl ::core::ops::Deref for SP1Beefy { + type Target = ::ethers::contract::Contract; + fn deref(&self) -> &Self::Target { + &self.0 + } + } + impl ::core::ops::DerefMut for SP1Beefy { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } + } + impl ::core::fmt::Debug for SP1Beefy { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple(::core::stringify!(SP1Beefy)).field(&self.address()).finish() + } + } + impl SP1Beefy { + /// Creates a new contract instance with the specified `ethers` client at + /// `address`. The contract derefs to a `ethers::Contract` object. + pub fn new>( + address: T, + client: ::std::sync::Arc, + ) -> Self { + Self(::ethers::contract::Contract::new(address.into(), SP1BEEFY_ABI.clone(), client)) + } + ///Calls the contract's `noOp` (0x09a07dd3) function + pub fn no_op( + &self, + s: Sp1BeefyProof, + p: PublicInputs, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([9, 160, 125, 211], (s, p)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `supportsInterface` (0x01ffc9a7) function + pub fn supports_interface( + &self, + interface_id: [u8; 4], + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([1, 255, 201, 167], interface_id) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `verificationKey` (0x7ddc907d) function + pub fn verification_key(&self) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([125, 220, 144, 125], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `verifyConsensus` (0x7d755598) function + pub fn verify_consensus( + &self, + encoded_state: ::ethers::core::types::Bytes, + encoded_proof: ::ethers::core::types::Bytes, + ) -> ::ethers::contract::builders::ContractCall< + M, + (::ethers::core::types::Bytes, ::std::vec::Vec), + > { + self.0 + .method_hash([125, 117, 85, 152], (encoded_state, encoded_proof)) + .expect("method not found (this should never happen)") + } + } + impl From<::ethers::contract::Contract> for SP1Beefy { + fn from(contract: ::ethers::contract::Contract) -> Self { + Self::new(contract.address(), contract.client()) + } + } + ///Custom Error type `IllegalGenesisBlock` with signature `IllegalGenesisBlock()` and selector + /// `0xb4eb9e51` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "IllegalGenesisBlock", abi = "IllegalGenesisBlock()")] + pub struct IllegalGenesisBlock; + ///Custom Error type `StaleHeight` with signature `StaleHeight()` and selector `0xbeda4fc3` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "StaleHeight", abi = "StaleHeight()")] + pub struct StaleHeight; + ///Custom Error type `UnknownAuthoritySet` with signature `UnknownAuthoritySet()` and selector + /// `0xe405cd0a` + #[derive( + Clone, + ::ethers::contract::EthError, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[etherror(name = "UnknownAuthoritySet", abi = "UnknownAuthoritySet()")] + pub struct UnknownAuthoritySet; + ///Container type for all of the contract's custom errors + #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] + pub enum SP1BeefyErrors { + IllegalGenesisBlock(IllegalGenesisBlock), + StaleHeight(StaleHeight), + UnknownAuthoritySet(UnknownAuthoritySet), + /// The standard solidity revert string, with selector + /// Error(string) -- 0x08c379a0 + RevertString(::std::string::String), + } + impl ::ethers::core::abi::AbiDecode for SP1BeefyErrors { + fn decode( + data: impl AsRef<[u8]>, + ) -> ::core::result::Result { + let data = data.as_ref(); + if let Ok(decoded) = + <::std::string::String as ::ethers::core::abi::AbiDecode>::decode(data) + { + return Ok(Self::RevertString(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::IllegalGenesisBlock(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::StaleHeight(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::UnknownAuthoritySet(decoded)); + } + Err(::ethers::core::abi::Error::InvalidData.into()) + } + } + impl ::ethers::core::abi::AbiEncode for SP1BeefyErrors { + fn encode(self) -> ::std::vec::Vec { + match self { + Self::IllegalGenesisBlock(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::StaleHeight(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::UnknownAuthoritySet(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s), + } + } + } + impl ::ethers::contract::ContractRevert for SP1BeefyErrors { + fn valid_selector(selector: [u8; 4]) -> bool { + match selector { + [0x08, 0xc3, 0x79, 0xa0] => true, + _ if selector == + ::selector() => + true, + _ if selector == ::selector() => true, + _ if selector == + ::selector() => + true, + _ => false, + } + } + } + impl ::core::fmt::Display for SP1BeefyErrors { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + match self { + Self::IllegalGenesisBlock(element) => ::core::fmt::Display::fmt(element, f), + Self::StaleHeight(element) => ::core::fmt::Display::fmt(element, f), + Self::UnknownAuthoritySet(element) => ::core::fmt::Display::fmt(element, f), + Self::RevertString(s) => ::core::fmt::Display::fmt(s, f), + } + } + } + impl ::core::convert::From<::std::string::String> for SP1BeefyErrors { + fn from(value: String) -> Self { + Self::RevertString(value) + } + } + impl ::core::convert::From for SP1BeefyErrors { + fn from(value: IllegalGenesisBlock) -> Self { + Self::IllegalGenesisBlock(value) + } + } + impl ::core::convert::From for SP1BeefyErrors { + fn from(value: StaleHeight) -> Self { + Self::StaleHeight(value) + } + } + impl ::core::convert::From for SP1BeefyErrors { + fn from(value: UnknownAuthoritySet) -> Self { + Self::UnknownAuthoritySet(value) + } + } + ///Container type for all input parameters for the `noOp` function with signature + /// `noOp(((uint256,uint256),(uint256,uint256,bytes32,(uint256,uint256,bytes32),bytes32), + /// (uint256,bytes)[],bytes),(bytes32,uint256,bytes32,bytes32[]))` and selector `0x09a07dd3` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "noOp", + abi = "noOp(((uint256,uint256),(uint256,uint256,bytes32,(uint256,uint256,bytes32),bytes32),(uint256,bytes)[],bytes),(bytes32,uint256,bytes32,bytes32[]))" + )] + pub struct NoOpCall { + pub s: Sp1BeefyProof, + pub p: PublicInputs, + } + ///Container type for all input parameters for the `supportsInterface` function with signature + /// `supportsInterface(bytes4)` and selector `0x01ffc9a7` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")] + pub struct SupportsInterfaceCall { + pub interface_id: [u8; 4], + } + ///Container type for all input parameters for the `verificationKey` function with signature + /// `verificationKey()` and selector `0x7ddc907d` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "verificationKey", abi = "verificationKey()")] + pub struct VerificationKeyCall; + ///Container type for all input parameters for the `verifyConsensus` function with signature + /// `verifyConsensus(bytes,bytes)` and selector `0x7d755598` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "verifyConsensus", abi = "verifyConsensus(bytes,bytes)")] + pub struct VerifyConsensusCall { + pub encoded_state: ::ethers::core::types::Bytes, + pub encoded_proof: ::ethers::core::types::Bytes, + } + ///Container type for all of the contract's call + #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] + pub enum SP1BeefyCalls { + NoOp(NoOpCall), + SupportsInterface(SupportsInterfaceCall), + VerificationKey(VerificationKeyCall), + VerifyConsensus(VerifyConsensusCall), + } + impl ::ethers::core::abi::AbiDecode for SP1BeefyCalls { + fn decode( + data: impl AsRef<[u8]>, + ) -> ::core::result::Result { + let data = data.as_ref(); + if let Ok(decoded) = ::decode(data) { + return Ok(Self::NoOp(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::SupportsInterface(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::VerificationKey(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::VerifyConsensus(decoded)); + } + Err(::ethers::core::abi::Error::InvalidData.into()) + } + } + impl ::ethers::core::abi::AbiEncode for SP1BeefyCalls { + fn encode(self) -> Vec { + match self { + Self::NoOp(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::SupportsInterface(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::VerificationKey(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::VerifyConsensus(element) => ::ethers::core::abi::AbiEncode::encode(element), + } + } + } + impl ::core::fmt::Display for SP1BeefyCalls { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + match self { + Self::NoOp(element) => ::core::fmt::Display::fmt(element, f), + Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f), + Self::VerificationKey(element) => ::core::fmt::Display::fmt(element, f), + Self::VerifyConsensus(element) => ::core::fmt::Display::fmt(element, f), + } + } + } + impl ::core::convert::From for SP1BeefyCalls { + fn from(value: NoOpCall) -> Self { + Self::NoOp(value) + } + } + impl ::core::convert::From for SP1BeefyCalls { + fn from(value: SupportsInterfaceCall) -> Self { + Self::SupportsInterface(value) + } + } + impl ::core::convert::From for SP1BeefyCalls { + fn from(value: VerificationKeyCall) -> Self { + Self::VerificationKey(value) + } + } + impl ::core::convert::From for SP1BeefyCalls { + fn from(value: VerifyConsensusCall) -> Self { + Self::VerifyConsensus(value) + } + } + ///Container type for all return fields from the `supportsInterface` function with signature + /// `supportsInterface(bytes4)` and selector `0x01ffc9a7` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct SupportsInterfaceReturn(pub bool); + ///Container type for all return fields from the `verificationKey` function with signature + /// `verificationKey()` and selector `0x7ddc907d` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct VerificationKeyReturn(pub [u8; 32]); + ///Container type for all return fields from the `verifyConsensus` function with signature + /// `verifyConsensus(bytes,bytes)` and selector `0x7d755598` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct VerifyConsensusReturn( + pub ::ethers::core::types::Bytes, + pub ::std::vec::Vec, + ); + ///`MiniCommitment(uint256,uint256)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct MiniCommitment { + pub block_number: ::ethers::core::types::U256, + pub validator_set_id: ::ethers::core::types::U256, + } + ///`ParachainHeader(uint256,bytes)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct ParachainHeader { + pub id: ::ethers::core::types::U256, + pub header: ::ethers::core::types::Bytes, + } + ///`PartialBeefyMmrLeaf(uint256,uint256,bytes32,(uint256,uint256,bytes32),bytes32)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct PartialBeefyMmrLeaf { + pub version: ::ethers::core::types::U256, + pub parent_number: ::ethers::core::types::U256, + pub parent_hash: [u8; 32], + pub next_authority_set: AuthoritySetCommitment, + pub extra: [u8; 32], + } + ///`PublicInputs(bytes32,uint256,bytes32,bytes32[])` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct PublicInputs { + pub authorities_root: [u8; 32], + pub authorities_len: ::ethers::core::types::U256, + pub leaf_hash: [u8; 32], + pub headers: ::std::vec::Vec<[u8; 32]>, + } + ///`Sp1BeefyProof((uint256,uint256),(uint256,uint256,bytes32,(uint256,uint256,bytes32), + /// bytes32),(uint256,bytes)[],bytes)` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct Sp1BeefyProof { + pub commitment: MiniCommitment, + pub mmr_leaf: PartialBeefyMmrLeaf, + pub headers: ::std::vec::Vec, + pub proof: ::ethers::core::types::Bytes, + } } diff --git a/modules/consensus/grandpa/verifier/src/lib.rs b/modules/consensus/grandpa/verifier/src/lib.rs index ddb966507..832733336 100644 --- a/modules/consensus/grandpa/verifier/src/lib.rs +++ b/modules/consensus/grandpa/verifier/src/lib.rs @@ -125,7 +125,7 @@ where for (hash, proof) in parachain_headers { if finalized_hashes.binary_search(&hash).is_err() { // seems relay hash isn't in the finalized chain. - continue + continue; } let relay_chain_header = headers.header(&hash).expect("Headers have been checked by AncestryChain; qed"); diff --git a/modules/hyperclient/src/internals/get_request.rs b/modules/hyperclient/src/internals/get_request.rs index 47a0df435..06206cba1 100644 --- a/modules/hyperclient/src/internals/get_request.rs +++ b/modules/hyperclient/src/internals/get_request.rs @@ -29,19 +29,19 @@ pub async fn query_get_request_status( let source_relayer = source_client.query_response_receipt(commitment).await?; if source_relayer != Default::default() { // request has been completed - return Ok(MessageStatusWithMetadata::DestinationDelivered { meta: Default::default() }) + return Ok(MessageStatusWithMetadata::DestinationDelivered { meta: Default::default() }); } let relayer = client.hyperbridge.query_request_receipt(commitment).await?; if relayer != Default::default() { // request has been handled by hyperbridge - return Ok(MessageStatusWithMetadata::HyperbridgeVerified { meta: Default::default() }) + return Ok(MessageStatusWithMetadata::HyperbridgeVerified { meta: Default::default() }); } let timestamp = client.hyperbridge.latest_timestamp().await?.as_secs(); if get.timeout_timestamp > timestamp { // request has timed out - return Ok(MessageStatusWithMetadata::Timeout) + return Ok(MessageStatusWithMetadata::Timeout); } Ok(MessageStatusWithMetadata::Pending) diff --git a/modules/ismp/pallets/token-gateway-inspector/src/lib.rs b/modules/ismp/pallets/token-gateway-inspector/src/lib.rs index 547e0062c..6512ea018 100644 --- a/modules/ismp/pallets/token-gateway-inspector/src/lib.rs +++ b/modules/ismp/pallets/token-gateway-inspector/src/lib.rs @@ -88,7 +88,7 @@ pub mod pallet { // As long as the initial deployment is valid // it's impossible to send malicious requests if source.is_evm() && dest.is_evm() { - return Ok(()) + return Ok(()); } if let Some(body) = Self::is_token_gateway_request(&body) { @@ -142,7 +142,7 @@ pub mod pallet { // As long as the initial deployment is valid // it's impossible to send malicious requests if source.is_evm() && dest.is_evm() { - return Ok(()) + return Ok(()); } if let Some(body) = Self::is_token_gateway_request(&body) { diff --git a/modules/ismp/pallets/token-gateway/Cargo.toml b/modules/ismp/pallets/token-gateway/Cargo.toml index 3d3eb3c16..c8bf6902a 100644 --- a/modules/ismp/pallets/token-gateway/Cargo.toml +++ b/modules/ismp/pallets/token-gateway/Cargo.toml @@ -37,6 +37,9 @@ pallet-hyperbridge = { workspace = true } pallet-balances = { workspace = true } pallet-timestamp = { workspace = true } ismp-parachain = { workspace = true } +frame-benchmarking = { optional = true, workspace = true } + +[dev-dependencies] cumulus-pallet-parachain-system = { workspace = true, default-features = false } pallet-message-queue = { workspace = true} polkadot-parachain-primitives = { workspace = true} @@ -46,11 +49,17 @@ pallet-mmr = { workspace = true } sp-mmr-primitives = { workspace = true } hyperbridge-client-machine = { workspace = true} pallet-ismp-host-executive = { workspace = true} +ismp-testsuite = { workspace = true } +pallet-assets = {workspace = true} +frame-benchmarking = { workspace = true, features = ["runtime-benchmarks"] } +frame-support = { workspace = true, features = ["runtime-benchmarks"] } +frame-system = { workspace = true, features = ["runtime-benchmarks"] } [features] default = ["std"] std = [ "frame-support/std", + "frame-benchmarking?/std", "frame-system/std", "sp-runtime/std", "sp-core/std", @@ -75,6 +84,15 @@ std = [ "pallet-mmr/std", "sp-mmr-primitives/std", "hyperbridge-client-machine/std", - "pallet-ismp-host-executive/std" + "pallet-ismp-host-executive/std", + "pallet-assets/std" +] + +runtime-benchmarks = [ + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", ] + try-runtime = [] diff --git a/modules/ismp/pallets/token-gateway/src/benchmarks.rs b/modules/ismp/pallets/token-gateway/src/benchmarks.rs index e69de29bb..e7d0140e3 100644 --- a/modules/ismp/pallets/token-gateway/src/benchmarks.rs +++ b/modules/ismp/pallets/token-gateway/src/benchmarks.rs @@ -0,0 +1,74 @@ +#![cfg(feature = "runtime-benchmarks")] + +use crate::*; +use frame_benchmarking::v2::*; +use frame_system::RawOrigin; +use ismp::host::StateMachine; + +#[benchmarks] +mod benchmarks { + use super::*; + + #[benchmark] + fn teleport() { + let dummy_teleport_params = TeleportParams:: { + asset_id: 1, + destination: StateMachine::Evm(100), + recepient: H256::from([1u8; 32]), + amount: 100, + timeout: 10, + token_gateway: vec![1, 2, 3, 4, 5], + relayer_fee: 10, + }; + + #[extrinsic_call] + _(RawOrigin::Signed([0u8, 32]), dummy_teleport_params); + } + + #[benchmark] + fn set_token_gateway_addresses() -> Result<(), BenchmarkError> { + let mut addresses = BTreeMap::new(); + for i in 0..50 { + let addr = i.to_string().as_bytes().to_vec(); + addresses.insert(StateMachine::Evm(100), addr); + } + + #[extrinsic_call] + _(RawOrigin::Root, addresses); + Ok(()) + } + + #[benchmark] + fn create_erc6160_asset() -> Result<(), BenchmarkError> { + let asset_details = GatewayAssetRegistration { + name: b"Spectre".into(), + + symbol: b"SPC".into(), + + chains: bounded_vec![StateMachine::Evm(100)], + minimum_balance: Some(10), + }; + let asset = AssetRegistration:: { local_id: 2, reg: asset_details }; + + #[extrinsic_call] + _(RawOrigin::Root, asset); + + Ok(()) + } + + #[benchmark] + fn update_erc6160_asset() -> Result<(), BenchmarkError> { + let asset_update = GatewayAssetUpdate { + asset_id: H256, + add_chains: bounded_vec![StateMachine::Evm(200)], + remove_chains: bounded_vec![], + new_admins: bounded_vec![], + }; + + #[extrinsic_call] + _(RawOrigin::Root, asset_update); + Ok(()) + } + + impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::tests::Test); +} diff --git a/modules/ismp/pallets/token-gateway/src/lib.rs b/modules/ismp/pallets/token-gateway/src/lib.rs index 7691506f5..e3526fc4a 100644 --- a/modules/ismp/pallets/token-gateway/src/lib.rs +++ b/modules/ismp/pallets/token-gateway/src/lib.rs @@ -18,9 +18,11 @@ extern crate alloc; +mod benchmarks; pub mod impls; -pub mod types; +#[cfg(test)] mod mock; +pub mod types; use crate::impls::{convert_to_balance, convert_to_erc20}; use alloy_sol_types::SolValue; @@ -480,7 +482,7 @@ where // Note the asset's ERC counterpart decimal Decimals::::insert(local_asset_id, metadata.decimals); } - return Ok(()) + return Ok(()); } if let Ok(meta) = DeregisterAssets::decode(&mut &body[..]) { diff --git a/modules/ismp/pallets/token-gateway/src/mock.rs b/modules/ismp/pallets/token-gateway/src/mock.rs index 9dba7fa95..ced90af49 100644 --- a/modules/ismp/pallets/token-gateway/src/mock.rs +++ b/modules/ismp/pallets/token-gateway/src/mock.rs @@ -1,23 +1,29 @@ -use std::cell::RefCell; -use std::marker::PhantomData; -use std::num::NonZeroU32; -use cumulus_pallet_parachain_system::{AnyRelayNumber, ConsensusHook, RelayChainStateProof}; -use cumulus_pallet_parachain_system::consensus_hook::UnincludedSegmentCapacity; -use cumulus_primitives_core::{AggregateMessageOrigin, ParaId, relay_chain, XcmpMessageSource}; use crate::*; -use frame_support::{assert_ok, derive_impl, dispatch::{DispatchInfo, GetDispatchInfo}, parameter_types, traits::{ConstU64, OnInitialize}}; -use frame_support::traits::{ProcessMessage, ProcessMessageError}; -use frame_support::weights::WeightMeter; +use cumulus_pallet_parachain_system::{ + consensus_hook::UnincludedSegmentCapacity, AnyRelayNumber, ConsensusHook, ParachainSetCode, + RelayChainStateProof, +}; +use cumulus_primitives_core::{relay_chain, AggregateMessageOrigin, ParaId, XcmpMessageSource}; +use frame_support::{ + pallet_prelude::ConstU32, + parameter_types, + traits::{ + AsEnsureOriginWithArg, ConstU64, OnTimestampSet, ProcessMessage, ProcessMessageError, + }, + weights::WeightMeter, +}; use frame_system::EnsureRoot; -use polkadot_parachain_primitives::primitives::XcmpMessageHandler; -use ismp::host::StateMachine; -use ismp::router::IsmpRouter; -use sp_runtime::traits::{BlakeTwo256, IdentityLookup, Keccak256}; -use hyperbridge_client_machine::HyperbridgeClientMachine; +use ismp::{host::StateMachine, router::IsmpRouter}; +use pallet_assets::AutoIncAssetId; use pallet_ismp::offchain::Leaf; use pallet_mmr::primitives::INDEXING_PREFIX; +use polkadot_core_primitives::Moment; +use polkadot_parachain_primitives::primitives::XcmpMessageHandler; +use sp_core::{crypto::AccountId32, ConstU128}; +use sp_runtime::{traits::Keccak256, BuildStorage}; +use std::{cell::RefCell, num::NonZeroU32}; - +use crate as pallet_token_gateway; type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( @@ -25,50 +31,80 @@ frame_support::construct_runtime!( { System: frame_system, Balances: pallet_balances, - Timestamp: pallet_timestamp, - Ismp: pallet_ismp::{Pallet, Storage, Call, Event}, - Mmr: pallet_mmr, - IsmpParachain: ismp_parachain, - HyperBridge: pallet_hyperbridge, - MessageQueue: pallet_message_queue, - CumulusParachain: cumulus_pallet_parachain_system, - // HostExecutive: pallet_ismp_host_executive + Timestamp: pallet_timestamp, + Ismp: pallet_ismp::{Pallet, Storage, Call, Event}, + Mmr: pallet_mmr, + IsmpParachain: ismp_parachain, + HyperBridge: pallet_hyperbridge, + MessageQueue: pallet_message_queue, + CumulusParachain: cumulus_pallet_parachain_system, + Assets: pallet_assets, + TokenGateway: pallet_token_gateway::{Pallet, Storage, Call, Event} + // HostExecutive: pallet_ismp_host_executive } ); - //mock default config implementation +pub struct TestBlockHashCount>(core::marker::PhantomData); +impl, C: Get> Get for TestBlockHashCount { + fn get() -> I { + C::get().into() + } +} - -#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = (); - type BlockLength = (); - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type Hash = H256; - type RuntimeCall = RuntimeCall; - type Hashing = BlakeTwo256; - type AccountId = u64; - type Lookup = IdentityLookup; - type Block = Block; - type RuntimeEvent = RuntimeEvent; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = (); - type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; - type MaxConsumers = frame_support::traits::ConstU32<16>; -} - -#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] + type Nonce = u32; + type Hash = sp_core::hash::H256; + type Hashing = sp_runtime::traits::BlakeTwo256; + type AccountId = AccountId32; + type Lookup = sp_runtime::traits::IdentityLookup; + type MaxConsumers = frame_support::traits::ConstU32<16>; + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = (); + type SS58Prefix = (); + type Version = (); + type BlockWeights = (); + type BlockLength = (); + type DbWeight = (); + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type PalletInfo = PalletInfo; + type RuntimeTask = RuntimeTask; + type BaseCallFilter = frame_support::traits::Everything; + type BlockHashCount = TestBlockHashCount>; + type OnSetCode = ParachainSetCode; + type SingleBlockMigrations = (); + type MultiBlockMigrator = (); + type PreInherents = (); + type PostInherents = (); + type PostTransactions = (); + type Block = Block; +} + impl pallet_balances::Config for Test { - type AccountStore = System; + type RuntimeEvent = RuntimeEvent; + type RuntimeHoldReason = RuntimeHoldReason; + + type RuntimeFreezeReason = RuntimeFreezeReason; + + type AccountStore = System; + + type Balance = u128; + type ExistentialDeposit = ConstU128<1>; + + type ReserveIdentifier = (); + type FreezeIdentifier = Self::RuntimeFreezeReason; + + type DustRemoval = (); + + type MaxLocks = ConstU32<100>; + type MaxReserves = ConstU32<100>; + type MaxFreezes = ConstU32<10>; + + type WeightInfo = (); } std::thread_local! { @@ -79,49 +115,48 @@ std::thread_local! { pub struct SaveIntoThreadLocal; impl XcmpMessageHandler for SaveIntoThreadLocal { - fn handle_xcmp_messages<'a, I: Iterator>( - iter: I, - _max_weight: Weight, - ) -> Weight { - HANDLED_XCMP_MESSAGES.with(|m| { - for (sender, sent_at, message) in iter { - m.borrow_mut().push((sender, sent_at, message.to_vec())); - } - Weight::zero() - }) - } + fn handle_xcmp_messages<'a, I: Iterator>( + iter: I, + _max_weight: Weight, + ) -> Weight { + HANDLED_XCMP_MESSAGES.with(|m| { + for (sender, sent_at, message) in iter { + m.borrow_mut().push((sender, sent_at, message.to_vec())); + } + Weight::zero() + }) + } } impl ProcessMessage for SaveIntoThreadLocal { - type Origin = AggregateMessageOrigin; - - fn process_message( - message: &[u8], - origin: Self::Origin, - _meter: &mut WeightMeter, - _id: &mut [u8; 32], - ) -> Result { - assert_eq!(origin, Self::Origin::Parent); - - HANDLED_DMP_MESSAGES.with(|m| { - m.borrow_mut().push(message.to_vec()); - Weight::zero() - }); - Ok(true) - } + type Origin = AggregateMessageOrigin; + + fn process_message( + message: &[u8], + origin: Self::Origin, + _meter: &mut WeightMeter, + _id: &mut [u8; 32], + ) -> Result { + assert_eq!(origin, Self::Origin::Parent); + + HANDLED_DMP_MESSAGES.with(|m| { + m.borrow_mut().push(message.to_vec()); + Weight::zero() + }); + Ok(true) + } } pub struct FromThreadLocal; impl XcmpMessageSource for FromThreadLocal { - fn take_outbound_messages(maximum_channels: usize) -> Vec<(ParaId, Vec)> { - let id = ParaId::new(1000); - let result = vec![(id,vec![])]; - result - } + fn take_outbound_messages(_maximum_channels: usize) -> Vec<(ParaId, Vec)> { + let id = ParaId::new(1000); + let result = vec![(id, vec![])]; + result + } } - std::thread_local! { pub static CONSENSUS_HOOK: RefCell (Weight, UnincludedSegmentCapacity)>> = RefCell::new(Box::new(|_| (Weight::zero(), NonZeroU32::new(1).unwrap().into()))); @@ -130,124 +165,199 @@ std::thread_local! { pub struct TestConsensusHook; impl ConsensusHook for TestConsensusHook { - fn on_state_proof(s: &RelayChainStateProof) -> (Weight, UnincludedSegmentCapacity) { - CONSENSUS_HOOK.with(|f| f.borrow_mut()(s)) - } + fn on_state_proof(s: &RelayChainStateProof) -> (Weight, UnincludedSegmentCapacity) { + CONSENSUS_HOOK.with(|f| f.borrow_mut()(s)) + } } - impl cumulus_pallet_parachain_system::Config for Test { - type RuntimeEvent = RuntimeEvent; - type OnSystemEvent = (); - type SelfParaId = ParachainId; - type OutboundXcmpMessageSource = FromThreadLocal; - type DmpQueue = frame_support::traits::EnqueueWithOrigin; - type ReservedDmpWeight = ReservedDmpWeight; - type XcmpMessageHandler = SaveIntoThreadLocal; - type ReservedXcmpWeight = ReservedXcmpWeight; - type CheckAssociatedRelayNumber = AnyRelayNumber; - type ConsensusHook = TestConsensusHook; - type WeightInfo = (); + type RuntimeEvent = RuntimeEvent; + type OnSystemEvent = (); + type SelfParaId = ParachainId; + type OutboundXcmpMessageSource = FromThreadLocal; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; + type ReservedDmpWeight = ReservedDmpWeight; + type XcmpMessageHandler = SaveIntoThreadLocal; + type ReservedXcmpWeight = ReservedXcmpWeight; + type CheckAssociatedRelayNumber = AnyRelayNumber; + type ConsensusHook = TestConsensusHook; + type WeightInfo = (); } impl pallet_message_queue::Config for Test { - type RuntimeEvent = RuntimeEvent; - // NOTE that normally for benchmarking we should use the No-OP message processor, but in this - // case its a mocked runtime and will only be used to generate insecure default weights. - type MessageProcessor = SaveIntoThreadLocal; - type Size = u32; - type QueueChangeHandler = (); - type QueuePausedQuery = (); - type HeapSize = sp_core::ConstU32<{ 103 * 1024 }>; - type MaxStale = sp_core::ConstU32<8>; - type ServiceWeight = MaxWeight; - type IdleMaxServiceWeight = (); - type WeightInfo = (); + type RuntimeEvent = RuntimeEvent; + // NOTE that normally for benchmarking we should use the No-OP message processor, but in this + // case its a mocked runtime and will only be used to generate insecure default weights. + type MessageProcessor = SaveIntoThreadLocal; + type Size = u32; + type QueueChangeHandler = (); + type QueuePausedQuery = (); + type HeapSize = sp_core::ConstU32<{ 103 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + type ServiceWeight = MaxWeight; + type IdleMaxServiceWeight = (); + type WeightInfo = (); } +pub struct MockOnTimestampSet; +impl OnTimestampSet for MockOnTimestampSet { + fn on_timestamp_set(moment: Moment) { + CapturedMoment::mutate(|x| *x = Some(moment)); + } +} + +pub(crate) fn clear_captured_moment() { + CapturedMoment::mutate(|x| *x = None); +} + +pub(crate) fn get_captured_moment() -> Option { + CapturedMoment::get() +} impl pallet_timestamp::Config for Test { - type Moment = u64; - type OnTimestampSet = (); - type MinimumPeriod = ConstU64<5>; - type WeightInfo = (); + type Moment = Moment; + type OnTimestampSet = MockOnTimestampSet; + type MinimumPeriod = ConstU64<5>; + type WeightInfo = (); } impl pallet_hyperbridge::Config for Test { - type RuntimeEvent = RuntimeEvent; - type IsmpHost = Ismp; + type RuntimeEvent = RuntimeEvent; + type IsmpHost = Ismp; } impl ismp_parachain::Config for Test { - type RuntimeEvent = RuntimeEvent; - type IsmpHost = Ismp; + type RuntimeEvent = RuntimeEvent; + type IsmpHost = Ismp; } - parameter_types! { - // The hyperbridge parachain on Polkadot - pub const Coprocessor: Option = Some(StateMachine::Polkadot(3367)); - // The host state machine of this pallet - pub const HostStateMachine: StateMachine = StateMachine::Polkadot(1000); // your paraId here + // The hyperbridge parachain on Polkadot + pub const Coprocessor: Option = Some(StateMachine::Polkadot(3367)); + // The host state machine of this pallet + pub const HostStateMachine: StateMachine = StateMachine::Polkadot(1000); // your paraId here - pub const ParachainId: ParaId = ParaId::new(1000); + pub const ParachainId: ParaId = ParaId::new(1000); pub const ReservedXcmpWeight: Weight = Weight::zero(); pub const ReservedDmpWeight: Weight = Weight::zero(); - pub const MaxWeight: Weight = Weight::MAX; - pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; + pub const MaxWeight: Weight = Weight::MAX; + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; + pub static CapturedMoment: Option = None; } impl pallet_mmr::Config for Test { - const INDEXING_PREFIX: &'static [u8] = INDEXING_PREFIX; - type Hashing = Keccak256; - type Leaf = Leaf; - type ForkIdentifierProvider = Ismp; + const INDEXING_PREFIX: &'static [u8] = INDEXING_PREFIX; + type Hashing = Keccak256; + type Leaf = Leaf; + type ForkIdentifierProvider = Ismp; } // impl pallet_ismp_host_executive::Config for Test { // type RuntimeEvent = RuntimeEvent; // type IsmpHost = Ismp; // } -impl pallet_ismp::Config for Test -{ - // configure the runtime event - type RuntimeEvent = RuntimeEvent; - // Permissioned origin who can create or update consensus clients - type AdminOrigin = EnsureRoot; - // The state machine identifier for this state machine - type HostStateMachine = HostStateMachine; - // The pallet_timestamp pallet - type TimestampProvider = Timestamp; - // The currency implementation that is offered to relayers - type Currency = Balances; - // The balance type for the currency implementation - type Balance = u64; - // Router implementation for routing requests/responses to their respective modules - type Router = Router; - // Optional coprocessor for incoming requests/responses - type Coprocessor = Coprocessor; - // Supported consensus clients - type ConsensusClients = ( - // as an example, the parachain consensus client - ismp_parachain::ParachainConsensusClient, - ); - // Offchain database implementation. Outgoing requests and responses are - // inserted in this database, while their commitments are stored onchain. - type OffchainDB = Mmr; - // Weight provider for local modules - type WeightProvider = (); +impl pallet_ismp::Config for Test { + // configure the runtime event + type RuntimeEvent = RuntimeEvent; + // Permissioned origin who can create or update consensus clients + type AdminOrigin = EnsureRoot; + // The state machine identifier for this state machine + type HostStateMachine = HostStateMachine; + // The pallet_timestamp pallet + type TimestampProvider = Timestamp; + // The currency implementation that is offered to relayers + type Currency = Balances; + // The balance type for the currency implementation + type Balance = u128; + // Router implementation for routing requests/responses to their respective modules + type Router = Router; + // Optional coprocessor for incoming requests/responses + type Coprocessor = Coprocessor; + // Supported consensus clients + type ConsensusClients = ( + // as an example, the parachain consensus client + ismp_parachain::ParachainConsensusClient, + ); + // Offchain database implementation. Outgoing requests and responses are + // inserted in this database, while their commitments are stored onchain. + type OffchainDB = Mmr; + // Weight provider for local modules + type WeightProvider = (); } #[derive(Default)] pub struct Router; impl IsmpRouter for Router { - fn module_for_id(&self, id: Vec) -> Result, anyhow::Error> { - // let module = match id.as_slice() { - // YOUR_MODULE_ID => Box::new(()), - // _ => Err(ismp::Error::ModuleNotFound(id))? - // }; - // Ok(module) - todo!() - } -} \ No newline at end of file + fn module_for_id(&self, _id: Vec) -> Result, anyhow::Error> { + // let module = match id.as_slice() { + // YOUR_MODULE_ID => Box::new(()), + // _ => Err(ismp::Error::ModuleNotFound(id))? + // }; + // Ok(module) + todo!() + } +} + +impl Config for Test { + type RuntimeEvent = RuntimeEvent; + + type Dispatcher = Ismp; + + type NativeCurrency = Balances; + + type AssetAdmin = AssetAdmin; + + type Assets = Assets; + + type NativeAssetId = NativeAssetId; + + type AssetIdFactory = (); + + type Decimals = Decimals; +} + +parameter_types! { + pub const AssetAdmin: AccountId32 = AccountId32::new([0u8;32]); + // A constant that should represent the native asset id + pub const NativeAssetId: u32 = 0; + // Set the correct precision for the native currency + pub const Decimals: u8 = 12; +} + +impl pallet_assets::Config for Test { + type RuntimeEvent = RuntimeEvent; + type Balance = u128; + type RemoveItemsLimit = ConstU32<5>; + type AssetId = u32; + type AssetIdParameter = u32; + type AssetDeposit = ConstU128<1>; + type AssetAccountDeposit = ConstU128<10>; + type MetadataDepositBase = ConstU128<1>; + type MetadataDepositPerByte = ConstU128<1>; + type ApprovalDeposit = ConstU128<1>; + type StringLimit = ConstU32<50>; + type Extra = (); + type CallbackHandle = AutoIncAssetId; + type WeightInfo = (); + type Currency = Balances; + type CreateOrigin = AsEnsureOriginWithArg>; + type ForceOrigin = EnsureRoot; + type Freezer = (); +} + +pub fn new_test_ext() -> sp_io::TestExternalities { + let t = RuntimeGenesisConfig { + // We use default for brevity, but you can configure as desired if needed. + system: Default::default(), + balances: Default::default(), + ismp_parachain: Default::default(), + assets: Default::default(), + cumulus_parachain: Default::default(), + } + .build_storage() + .unwrap(); + clear_captured_moment(); + + t.into() +} diff --git a/modules/ismp/pallets/token-governor/src/lib.rs b/modules/ismp/pallets/token-governor/src/lib.rs index 70b85965e..f58315c01 100644 --- a/modules/ismp/pallets/token-governor/src/lib.rs +++ b/modules/ismp/pallets/token-governor/src/lib.rs @@ -433,7 +433,7 @@ where }, } - return Ok(()) + return Ok(()); } let RegistrarParams { address, .. } = TokenRegistrarParams::::get(&source) .ok_or_else(|| ismp::error::Error::Custom(format!("Pallet is not initialized")))?; diff --git a/modules/ismp/state-machines/evm/src/lib.rs b/modules/ismp/state-machines/evm/src/lib.rs index 65309342f..c8d72b86b 100644 --- a/modules/ismp/state-machines/evm/src/lib.rs +++ b/modules/ismp/state-machines/evm/src/lib.rs @@ -96,7 +96,7 @@ pub fn verify_state_proof( ismp_address } else if key.len() == 20 { contract_account_queries.push(H160::from_slice(&key)); - continue + continue; } else { Err(Error::Custom( "Unsupported Key type, found a key whose length is not one of 20, 32 or 52" diff --git a/parachain/runtimes/gargantua/Cargo.toml b/parachain/runtimes/gargantua/Cargo.toml index 98c57f72a..65cbade53 100644 --- a/parachain/runtimes/gargantua/Cargo.toml +++ b/parachain/runtimes/gargantua/Cargo.toml @@ -104,6 +104,7 @@ sp-mmr-primitives = { workspace = true } simnode-runtime-api = { workspace = true } hyperbridge-client-machine = { workspace = true } pallet-token-gateway-inspector = { workspace = true } +#pallet-token-gateway = {workspace = true} [features] default = [ @@ -188,7 +189,8 @@ std = [ "simnode-runtime-api/std", "hyperbridge-client-machine/std", "frame-metadata-hash-extension/std", - "anyhow/std" + "anyhow/std", +# "pallet-token-gateway/std" ] runtime-benchmarks = [ @@ -214,6 +216,7 @@ runtime-benchmarks = [ "pallet-message-queue/runtime-benchmarks", "pallet-assets/runtime-benchmarks", "pallet-sudo/runtime-benchmarks", +# "pallet-token-gateway/runtime-benchmarks", "parachains-common/runtime-benchmarks" ] diff --git a/parachain/runtimes/gargantua/src/lib.rs b/parachain/runtimes/gargantua/src/lib.rs index b32467853..4743e2610 100644 --- a/parachain/runtimes/gargantua/src/lib.rs +++ b/parachain/runtimes/gargantua/src/lib.rs @@ -571,6 +571,24 @@ impl pallet_utility::Config for Runtime { type WeightInfo = weights::pallet_utility::WeightInfo; } +// impl pallet_token_gateway::Config for Test { +// type RuntimeEvent = RuntimeEvent; +// +// type Dispatcher = Ismp; +// +// type NativeCurrency = Balances; +// +// type AssetAdmin = TreasuryAccount; +// +// type Assets = Assets; +// +// type NativeAssetId = NativeAssetId; +// +// type AssetIdFactory = (); +// +// type Decimals = Decimals; +// } + parameter_types! { pub const SpendingPeriod: BlockNumber = 24 * DAYS; pub const TreasuryPalletId: PalletId = PalletId(*b"hb/trsry"); @@ -581,6 +599,9 @@ parameter_types! { pub const TechnicalMaxProposals: u32 = 100; pub const TechnicalMaxMembers: u32 = 10; pub MaxCollectivesProposalWeight: Weight = Perbill::from_percent(50) * RuntimeBlockWeights::get().max_block; + pub const NativeAssetId: u32 = 0; + // Set the correct precision for the native currency + pub const Decimals: u8 = 12; } #[cfg(feature = "runtime-benchmarks")] @@ -725,6 +746,7 @@ construct_runtime!( Fishermen: pallet_fishermen = 61, TokenGatewayInspector: pallet_token_gateway_inspector = 62, IsmpSyncCommitteeGno: ismp_sync_committee::pallet:: = 63, + //TokenGateway: pallet_token_gateway = 64, // Governance TechnicalCollective: pallet_collective = 80, diff --git a/tesseract/evm/src/abi/arb_gas_info.rs b/tesseract/evm/src/abi/arb_gas_info.rs index 2956c7002..b9b7b0a9a 100644 --- a/tesseract/evm/src/abi/arb_gas_info.rs +++ b/tesseract/evm/src/abi/arb_gas_info.rs @@ -2,1705 +2,1512 @@ pub use arb_gas_info::*; /// This module was auto-generated with ethers-rs Abigen. /// More information at: #[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, + clippy::enum_variant_names, + clippy::too_many_arguments, + clippy::upper_case_acronyms, + clippy::type_complexity, + dead_code, + non_camel_case_types )] pub mod arb_gas_info { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("getAmortizedCostCapBips"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "getAmortizedCostCapBips", - ), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getCurrentTxL1GasFees"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "getCurrentTxL1GasFees", - ), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getGasAccountingParams"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "getGasAccountingParams", - ), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getGasBacklog"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getGasBacklog"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getGasBacklogTolerance"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "getGasBacklogTolerance", - ), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getL1BaseFeeEstimate"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "getL1BaseFeeEstimate", - ), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getL1BaseFeeEstimateInertia"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "getL1BaseFeeEstimateInertia", - ), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getL1FeesAvailable"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getL1FeesAvailable"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getL1GasPriceEstimate"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "getL1GasPriceEstimate", - ), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getL1PricingSurplus"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "getL1PricingSurplus", - ), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Int(256usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("int256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getL1RewardRate"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getL1RewardRate"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getL1RewardRecipient"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "getL1RewardRecipient", - ), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getMinimumGasPrice"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getMinimumGasPrice"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getPerBatchGasCharge"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "getPerBatchGasCharge", - ), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Int(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("int64"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getPricesInArbGas"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getPricesInArbGas"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getPricesInArbGasWithAggregator"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "getPricesInArbGasWithAggregator", - ), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("aggregator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getPricesInWei"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getPricesInWei"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getPricesInWeiWithAggregator"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "getPricesInWeiWithAggregator", - ), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("aggregator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getPricingInertia"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getPricingInertia"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint64"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ]), - events: ::std::collections::BTreeMap::new(), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static ARBGASINFO_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - pub struct ArbGasInfo(::ethers::contract::Contract); - impl ::core::clone::Clone for ArbGasInfo { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for ArbGasInfo { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for ArbGasInfo { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for ArbGasInfo { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(ArbGasInfo)).field(&self.address()).finish() - } - } - impl ArbGasInfo { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - ARBGASINFO_ABI.clone(), - client, - ), - ) - } - ///Calls the contract's `getAmortizedCostCapBips` (0x7a7d6beb) function - pub fn get_amortized_cost_cap_bips( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([122, 125, 107, 235], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getCurrentTxL1GasFees` (0xc6f7de0e) function - pub fn get_current_tx_l1_gas_fees( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([198, 247, 222, 14], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getGasAccountingParams` (0x612af178) function - pub fn get_gas_accounting_params( - &self, - ) -> ::ethers::contract::builders::ContractCall< - M, - ( - ::ethers::core::types::U256, - ::ethers::core::types::U256, - ::ethers::core::types::U256, - ), - > { - self.0 - .method_hash([97, 42, 241, 120], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getGasBacklog` (0x1d5b5c20) function - pub fn get_gas_backlog( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([29, 91, 92, 32], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getGasBacklogTolerance` (0x25754f91) function - pub fn get_gas_backlog_tolerance( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([37, 117, 79, 145], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getL1BaseFeeEstimate` (0xf5d6ded7) function - pub fn get_l1_base_fee_estimate( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([245, 214, 222, 215], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getL1BaseFeeEstimateInertia` (0x29eb31ee) function - pub fn get_l1_base_fee_estimate_inertia( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([41, 235, 49, 238], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getL1FeesAvailable` (0x5b39d23c) function - pub fn get_l1_fees_available( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([91, 57, 210, 60], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getL1GasPriceEstimate` (0x055f362f) function - pub fn get_l1_gas_price_estimate( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([5, 95, 54, 47], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getL1PricingSurplus` (0x520acdd7) function - pub fn get_l1_pricing_surplus( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([82, 10, 205, 215], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getL1RewardRate` (0x8a5b1d28) function - pub fn get_l1_reward_rate( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([138, 91, 29, 40], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getL1RewardRecipient` (0x9e6d7e31) function - pub fn get_l1_reward_recipient( - &self, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([158, 109, 126, 49], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getMinimumGasPrice` (0xf918379a) function - pub fn get_minimum_gas_price( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([249, 24, 55, 154], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getPerBatchGasCharge` (0x6ecca45a) function - pub fn get_per_batch_gas_charge( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([110, 204, 164, 90], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getPricesInArbGas` (0x02199f34) function - pub fn get_prices_in_arb_gas( - &self, - ) -> ::ethers::contract::builders::ContractCall< - M, - ( - ::ethers::core::types::U256, - ::ethers::core::types::U256, - ::ethers::core::types::U256, - ), - > { - self.0 - .method_hash([2, 25, 159, 52], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getPricesInArbGasWithAggregator` (0x7a1ea732) function - pub fn get_prices_in_arb_gas_with_aggregator( - &self, - aggregator: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall< - M, - ( - ::ethers::core::types::U256, - ::ethers::core::types::U256, - ::ethers::core::types::U256, - ), - > { - self.0 - .method_hash([122, 30, 167, 50], aggregator) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getPricesInWei` (0x41b247a8) function - pub fn get_prices_in_wei( - &self, - ) -> ::ethers::contract::builders::ContractCall< - M, - ( - ::ethers::core::types::U256, - ::ethers::core::types::U256, - ::ethers::core::types::U256, - ::ethers::core::types::U256, - ::ethers::core::types::U256, - ::ethers::core::types::U256, - ), - > { - self.0 - .method_hash([65, 178, 71, 168], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getPricesInWeiWithAggregator` (0xba9c916e) function - pub fn get_prices_in_wei_with_aggregator( - &self, - aggregator: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall< - M, - ( - ::ethers::core::types::U256, - ::ethers::core::types::U256, - ::ethers::core::types::U256, - ::ethers::core::types::U256, - ::ethers::core::types::U256, - ::ethers::core::types::U256, - ), - > { - self.0 - .method_hash([186, 156, 145, 110], aggregator) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getPricingInertia` (0x3dfb45b9) function - pub fn get_pricing_inertia( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([61, 251, 69, 185], ()) - .expect("method not found (this should never happen)") - } - } - impl From<::ethers::contract::Contract> - for ArbGasInfo { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - ///Container type for all input parameters for the `getAmortizedCostCapBips` function with signature `getAmortizedCostCapBips()` and selector `0x7a7d6beb` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getAmortizedCostCapBips", abi = "getAmortizedCostCapBips()")] - pub struct GetAmortizedCostCapBipsCall; - ///Container type for all input parameters for the `getCurrentTxL1GasFees` function with signature `getCurrentTxL1GasFees()` and selector `0xc6f7de0e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getCurrentTxL1GasFees", abi = "getCurrentTxL1GasFees()")] - pub struct GetCurrentTxL1GasFeesCall; - ///Container type for all input parameters for the `getGasAccountingParams` function with signature `getGasAccountingParams()` and selector `0x612af178` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getGasAccountingParams", abi = "getGasAccountingParams()")] - pub struct GetGasAccountingParamsCall; - ///Container type for all input parameters for the `getGasBacklog` function with signature `getGasBacklog()` and selector `0x1d5b5c20` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getGasBacklog", abi = "getGasBacklog()")] - pub struct GetGasBacklogCall; - ///Container type for all input parameters for the `getGasBacklogTolerance` function with signature `getGasBacklogTolerance()` and selector `0x25754f91` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getGasBacklogTolerance", abi = "getGasBacklogTolerance()")] - pub struct GetGasBacklogToleranceCall; - ///Container type for all input parameters for the `getL1BaseFeeEstimate` function with signature `getL1BaseFeeEstimate()` and selector `0xf5d6ded7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getL1BaseFeeEstimate", abi = "getL1BaseFeeEstimate()")] - pub struct GetL1BaseFeeEstimateCall; - ///Container type for all input parameters for the `getL1BaseFeeEstimateInertia` function with signature `getL1BaseFeeEstimateInertia()` and selector `0x29eb31ee` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "getL1BaseFeeEstimateInertia", - abi = "getL1BaseFeeEstimateInertia()" - )] - pub struct GetL1BaseFeeEstimateInertiaCall; - ///Container type for all input parameters for the `getL1FeesAvailable` function with signature `getL1FeesAvailable()` and selector `0x5b39d23c` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getL1FeesAvailable", abi = "getL1FeesAvailable()")] - pub struct GetL1FeesAvailableCall; - ///Container type for all input parameters for the `getL1GasPriceEstimate` function with signature `getL1GasPriceEstimate()` and selector `0x055f362f` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getL1GasPriceEstimate", abi = "getL1GasPriceEstimate()")] - pub struct GetL1GasPriceEstimateCall; - ///Container type for all input parameters for the `getL1PricingSurplus` function with signature `getL1PricingSurplus()` and selector `0x520acdd7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getL1PricingSurplus", abi = "getL1PricingSurplus()")] - pub struct GetL1PricingSurplusCall; - ///Container type for all input parameters for the `getL1RewardRate` function with signature `getL1RewardRate()` and selector `0x8a5b1d28` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getL1RewardRate", abi = "getL1RewardRate()")] - pub struct GetL1RewardRateCall; - ///Container type for all input parameters for the `getL1RewardRecipient` function with signature `getL1RewardRecipient()` and selector `0x9e6d7e31` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getL1RewardRecipient", abi = "getL1RewardRecipient()")] - pub struct GetL1RewardRecipientCall; - ///Container type for all input parameters for the `getMinimumGasPrice` function with signature `getMinimumGasPrice()` and selector `0xf918379a` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getMinimumGasPrice", abi = "getMinimumGasPrice()")] - pub struct GetMinimumGasPriceCall; - ///Container type for all input parameters for the `getPerBatchGasCharge` function with signature `getPerBatchGasCharge()` and selector `0x6ecca45a` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getPerBatchGasCharge", abi = "getPerBatchGasCharge()")] - pub struct GetPerBatchGasChargeCall; - ///Container type for all input parameters for the `getPricesInArbGas` function with signature `getPricesInArbGas()` and selector `0x02199f34` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getPricesInArbGas", abi = "getPricesInArbGas()")] - pub struct GetPricesInArbGasCall; - ///Container type for all input parameters for the `getPricesInArbGasWithAggregator` function with signature `getPricesInArbGasWithAggregator(address)` and selector `0x7a1ea732` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "getPricesInArbGasWithAggregator", - abi = "getPricesInArbGasWithAggregator(address)" - )] - pub struct GetPricesInArbGasWithAggregatorCall { - pub aggregator: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `getPricesInWei` function with signature `getPricesInWei()` and selector `0x41b247a8` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getPricesInWei", abi = "getPricesInWei()")] - pub struct GetPricesInWeiCall; - ///Container type for all input parameters for the `getPricesInWeiWithAggregator` function with signature `getPricesInWeiWithAggregator(address)` and selector `0xba9c916e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "getPricesInWeiWithAggregator", - abi = "getPricesInWeiWithAggregator(address)" - )] - pub struct GetPricesInWeiWithAggregatorCall { - pub aggregator: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `getPricingInertia` function with signature `getPricingInertia()` and selector `0x3dfb45b9` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getPricingInertia", abi = "getPricingInertia()")] - pub struct GetPricingInertiaCall; - ///Container type for all of the contract's call - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum ArbGasInfoCalls { - GetAmortizedCostCapBips(GetAmortizedCostCapBipsCall), - GetCurrentTxL1GasFees(GetCurrentTxL1GasFeesCall), - GetGasAccountingParams(GetGasAccountingParamsCall), - GetGasBacklog(GetGasBacklogCall), - GetGasBacklogTolerance(GetGasBacklogToleranceCall), - GetL1BaseFeeEstimate(GetL1BaseFeeEstimateCall), - GetL1BaseFeeEstimateInertia(GetL1BaseFeeEstimateInertiaCall), - GetL1FeesAvailable(GetL1FeesAvailableCall), - GetL1GasPriceEstimate(GetL1GasPriceEstimateCall), - GetL1PricingSurplus(GetL1PricingSurplusCall), - GetL1RewardRate(GetL1RewardRateCall), - GetL1RewardRecipient(GetL1RewardRecipientCall), - GetMinimumGasPrice(GetMinimumGasPriceCall), - GetPerBatchGasCharge(GetPerBatchGasChargeCall), - GetPricesInArbGas(GetPricesInArbGasCall), - GetPricesInArbGasWithAggregator(GetPricesInArbGasWithAggregatorCall), - GetPricesInWei(GetPricesInWeiCall), - GetPricesInWeiWithAggregator(GetPricesInWeiWithAggregatorCall), - GetPricingInertia(GetPricingInertiaCall), - } - impl ::ethers::core::abi::AbiDecode for ArbGasInfoCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetAmortizedCostCapBips(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetCurrentTxL1GasFees(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetGasAccountingParams(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetGasBacklog(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetGasBacklogTolerance(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetL1BaseFeeEstimate(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetL1BaseFeeEstimateInertia(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetL1FeesAvailable(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetL1GasPriceEstimate(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetL1PricingSurplus(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetL1RewardRate(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetL1RewardRecipient(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetMinimumGasPrice(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetPerBatchGasCharge(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetPricesInArbGas(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetPricesInArbGasWithAggregator(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetPricesInWei(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetPricesInWeiWithAggregator(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetPricingInertia(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for ArbGasInfoCalls { - fn encode(self) -> Vec { - match self { - Self::GetAmortizedCostCapBips(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetCurrentTxL1GasFees(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetGasAccountingParams(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetGasBacklog(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetGasBacklogTolerance(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetL1BaseFeeEstimate(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetL1BaseFeeEstimateInertia(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetL1FeesAvailable(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetL1GasPriceEstimate(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetL1PricingSurplus(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetL1RewardRate(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetL1RewardRecipient(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetMinimumGasPrice(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetPerBatchGasCharge(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetPricesInArbGas(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetPricesInArbGasWithAggregator(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetPricesInWei(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetPricesInWeiWithAggregator(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetPricingInertia(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for ArbGasInfoCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::GetAmortizedCostCapBips(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::GetCurrentTxL1GasFees(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::GetGasAccountingParams(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::GetGasBacklog(element) => ::core::fmt::Display::fmt(element, f), - Self::GetGasBacklogTolerance(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::GetL1BaseFeeEstimate(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::GetL1BaseFeeEstimateInertia(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::GetL1FeesAvailable(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::GetL1GasPriceEstimate(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::GetL1PricingSurplus(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::GetL1RewardRate(element) => ::core::fmt::Display::fmt(element, f), - Self::GetL1RewardRecipient(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::GetMinimumGasPrice(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::GetPerBatchGasCharge(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::GetPricesInArbGas(element) => ::core::fmt::Display::fmt(element, f), - Self::GetPricesInArbGasWithAggregator(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::GetPricesInWei(element) => ::core::fmt::Display::fmt(element, f), - Self::GetPricesInWeiWithAggregator(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::GetPricingInertia(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for ArbGasInfoCalls { - fn from(value: GetAmortizedCostCapBipsCall) -> Self { - Self::GetAmortizedCostCapBips(value) - } - } - impl ::core::convert::From for ArbGasInfoCalls { - fn from(value: GetCurrentTxL1GasFeesCall) -> Self { - Self::GetCurrentTxL1GasFees(value) - } - } - impl ::core::convert::From for ArbGasInfoCalls { - fn from(value: GetGasAccountingParamsCall) -> Self { - Self::GetGasAccountingParams(value) - } - } - impl ::core::convert::From for ArbGasInfoCalls { - fn from(value: GetGasBacklogCall) -> Self { - Self::GetGasBacklog(value) - } - } - impl ::core::convert::From for ArbGasInfoCalls { - fn from(value: GetGasBacklogToleranceCall) -> Self { - Self::GetGasBacklogTolerance(value) - } - } - impl ::core::convert::From for ArbGasInfoCalls { - fn from(value: GetL1BaseFeeEstimateCall) -> Self { - Self::GetL1BaseFeeEstimate(value) - } - } - impl ::core::convert::From for ArbGasInfoCalls { - fn from(value: GetL1BaseFeeEstimateInertiaCall) -> Self { - Self::GetL1BaseFeeEstimateInertia(value) - } - } - impl ::core::convert::From for ArbGasInfoCalls { - fn from(value: GetL1FeesAvailableCall) -> Self { - Self::GetL1FeesAvailable(value) - } - } - impl ::core::convert::From for ArbGasInfoCalls { - fn from(value: GetL1GasPriceEstimateCall) -> Self { - Self::GetL1GasPriceEstimate(value) - } - } - impl ::core::convert::From for ArbGasInfoCalls { - fn from(value: GetL1PricingSurplusCall) -> Self { - Self::GetL1PricingSurplus(value) - } - } - impl ::core::convert::From for ArbGasInfoCalls { - fn from(value: GetL1RewardRateCall) -> Self { - Self::GetL1RewardRate(value) - } - } - impl ::core::convert::From for ArbGasInfoCalls { - fn from(value: GetL1RewardRecipientCall) -> Self { - Self::GetL1RewardRecipient(value) - } - } - impl ::core::convert::From for ArbGasInfoCalls { - fn from(value: GetMinimumGasPriceCall) -> Self { - Self::GetMinimumGasPrice(value) - } - } - impl ::core::convert::From for ArbGasInfoCalls { - fn from(value: GetPerBatchGasChargeCall) -> Self { - Self::GetPerBatchGasCharge(value) - } - } - impl ::core::convert::From for ArbGasInfoCalls { - fn from(value: GetPricesInArbGasCall) -> Self { - Self::GetPricesInArbGas(value) - } - } - impl ::core::convert::From for ArbGasInfoCalls { - fn from(value: GetPricesInArbGasWithAggregatorCall) -> Self { - Self::GetPricesInArbGasWithAggregator(value) - } - } - impl ::core::convert::From for ArbGasInfoCalls { - fn from(value: GetPricesInWeiCall) -> Self { - Self::GetPricesInWei(value) - } - } - impl ::core::convert::From for ArbGasInfoCalls { - fn from(value: GetPricesInWeiWithAggregatorCall) -> Self { - Self::GetPricesInWeiWithAggregator(value) - } - } - impl ::core::convert::From for ArbGasInfoCalls { - fn from(value: GetPricingInertiaCall) -> Self { - Self::GetPricingInertia(value) - } - } - ///Container type for all return fields from the `getAmortizedCostCapBips` function with signature `getAmortizedCostCapBips()` and selector `0x7a7d6beb` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetAmortizedCostCapBipsReturn(pub u64); - ///Container type for all return fields from the `getCurrentTxL1GasFees` function with signature `getCurrentTxL1GasFees()` and selector `0xc6f7de0e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetCurrentTxL1GasFeesReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `getGasAccountingParams` function with signature `getGasAccountingParams()` and selector `0x612af178` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetGasAccountingParamsReturn( - pub ::ethers::core::types::U256, - pub ::ethers::core::types::U256, - pub ::ethers::core::types::U256, - ); - ///Container type for all return fields from the `getGasBacklog` function with signature `getGasBacklog()` and selector `0x1d5b5c20` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetGasBacklogReturn(pub u64); - ///Container type for all return fields from the `getGasBacklogTolerance` function with signature `getGasBacklogTolerance()` and selector `0x25754f91` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetGasBacklogToleranceReturn(pub u64); - ///Container type for all return fields from the `getL1BaseFeeEstimate` function with signature `getL1BaseFeeEstimate()` and selector `0xf5d6ded7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetL1BaseFeeEstimateReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `getL1BaseFeeEstimateInertia` function with signature `getL1BaseFeeEstimateInertia()` and selector `0x29eb31ee` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetL1BaseFeeEstimateInertiaReturn(pub u64); - ///Container type for all return fields from the `getL1FeesAvailable` function with signature `getL1FeesAvailable()` and selector `0x5b39d23c` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetL1FeesAvailableReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `getL1GasPriceEstimate` function with signature `getL1GasPriceEstimate()` and selector `0x055f362f` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetL1GasPriceEstimateReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `getL1PricingSurplus` function with signature `getL1PricingSurplus()` and selector `0x520acdd7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetL1PricingSurplusReturn(pub ::ethers::core::types::I256); - ///Container type for all return fields from the `getL1RewardRate` function with signature `getL1RewardRate()` and selector `0x8a5b1d28` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetL1RewardRateReturn(pub u64); - ///Container type for all return fields from the `getL1RewardRecipient` function with signature `getL1RewardRecipient()` and selector `0x9e6d7e31` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetL1RewardRecipientReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `getMinimumGasPrice` function with signature `getMinimumGasPrice()` and selector `0xf918379a` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetMinimumGasPriceReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `getPerBatchGasCharge` function with signature `getPerBatchGasCharge()` and selector `0x6ecca45a` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetPerBatchGasChargeReturn(pub i64); - ///Container type for all return fields from the `getPricesInArbGas` function with signature `getPricesInArbGas()` and selector `0x02199f34` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetPricesInArbGasReturn( - pub ::ethers::core::types::U256, - pub ::ethers::core::types::U256, - pub ::ethers::core::types::U256, - ); - ///Container type for all return fields from the `getPricesInArbGasWithAggregator` function with signature `getPricesInArbGasWithAggregator(address)` and selector `0x7a1ea732` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetPricesInArbGasWithAggregatorReturn( - pub ::ethers::core::types::U256, - pub ::ethers::core::types::U256, - pub ::ethers::core::types::U256, - ); - ///Container type for all return fields from the `getPricesInWei` function with signature `getPricesInWei()` and selector `0x41b247a8` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetPricesInWeiReturn( - pub ::ethers::core::types::U256, - pub ::ethers::core::types::U256, - pub ::ethers::core::types::U256, - pub ::ethers::core::types::U256, - pub ::ethers::core::types::U256, - pub ::ethers::core::types::U256, - ); - ///Container type for all return fields from the `getPricesInWeiWithAggregator` function with signature `getPricesInWeiWithAggregator(address)` and selector `0xba9c916e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetPricesInWeiWithAggregatorReturn( - pub ::ethers::core::types::U256, - pub ::ethers::core::types::U256, - pub ::ethers::core::types::U256, - pub ::ethers::core::types::U256, - pub ::ethers::core::types::U256, - pub ::ethers::core::types::U256, - ); - ///Container type for all return fields from the `getPricingInertia` function with signature `getPricingInertia()` and selector `0x3dfb45b9` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetPricingInertiaReturn(pub u64); + #[allow(deprecated)] + fn __abi() -> ::ethers::core::abi::Abi { + ::ethers::core::abi::ethabi::Contract { + constructor: ::core::option::Option::None, + functions: ::core::convert::From::from([ + ( + ::std::borrow::ToOwned::to_owned("getAmortizedCostCapBips"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("getAmortizedCostCapBips",), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint64"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("getCurrentTxL1GasFees"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("getCurrentTxL1GasFees",), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("getGasAccountingParams"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("getGasAccountingParams",), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("getGasBacklog"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("getGasBacklog"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint64"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("getGasBacklogTolerance"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("getGasBacklogTolerance",), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint64"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("getL1BaseFeeEstimate"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("getL1BaseFeeEstimate",), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("getL1BaseFeeEstimateInertia"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("getL1BaseFeeEstimateInertia",), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint64"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("getL1FeesAvailable"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("getL1FeesAvailable"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("getL1GasPriceEstimate"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("getL1GasPriceEstimate",), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("getL1PricingSurplus"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("getL1PricingSurplus",), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Int(256usize), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("int256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("getL1RewardRate"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("getL1RewardRate"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint64"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("getL1RewardRecipient"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("getL1RewardRecipient",), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("getMinimumGasPrice"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("getMinimumGasPrice"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("getPerBatchGasCharge"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("getPerBatchGasCharge",), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Int(64usize), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("int64"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("getPricesInArbGas"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("getPricesInArbGas"), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("getPricesInArbGasWithAggregator"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("getPricesInArbGasWithAggregator",), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("aggregator"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + },], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("getPricesInWei"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("getPricesInWei"), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("getPricesInWeiWithAggregator"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("getPricesInWeiWithAggregator",), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("aggregator"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + },], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("getPricingInertia"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("getPricingInertia"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(64usize), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint64"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ]), + events: ::std::collections::BTreeMap::new(), + errors: ::std::collections::BTreeMap::new(), + receive: false, + fallback: false, + } + } + ///The parsed JSON ABI of the contract. + pub static ARBGASINFO_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = + ::ethers::contract::Lazy::new(__abi); + pub struct ArbGasInfo(::ethers::contract::Contract); + impl ::core::clone::Clone for ArbGasInfo { + fn clone(&self) -> Self { + Self(::core::clone::Clone::clone(&self.0)) + } + } + impl ::core::ops::Deref for ArbGasInfo { + type Target = ::ethers::contract::Contract; + fn deref(&self) -> &Self::Target { + &self.0 + } + } + impl ::core::ops::DerefMut for ArbGasInfo { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } + } + impl ::core::fmt::Debug for ArbGasInfo { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple(::core::stringify!(ArbGasInfo)).field(&self.address()).finish() + } + } + impl ArbGasInfo { + /// Creates a new contract instance with the specified `ethers` client at + /// `address`. The contract derefs to a `ethers::Contract` object. + pub fn new>( + address: T, + client: ::std::sync::Arc, + ) -> Self { + Self(::ethers::contract::Contract::new(address.into(), ARBGASINFO_ABI.clone(), client)) + } + ///Calls the contract's `getAmortizedCostCapBips` (0x7a7d6beb) function + pub fn get_amortized_cost_cap_bips( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([122, 125, 107, 235], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `getCurrentTxL1GasFees` (0xc6f7de0e) function + pub fn get_current_tx_l1_gas_fees( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([198, 247, 222, 14], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `getGasAccountingParams` (0x612af178) function + pub fn get_gas_accounting_params( + &self, + ) -> ::ethers::contract::builders::ContractCall< + M, + (::ethers::core::types::U256, ::ethers::core::types::U256, ::ethers::core::types::U256), + > { + self.0 + .method_hash([97, 42, 241, 120], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `getGasBacklog` (0x1d5b5c20) function + pub fn get_gas_backlog(&self) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([29, 91, 92, 32], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `getGasBacklogTolerance` (0x25754f91) function + pub fn get_gas_backlog_tolerance( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([37, 117, 79, 145], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `getL1BaseFeeEstimate` (0xf5d6ded7) function + pub fn get_l1_base_fee_estimate( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([245, 214, 222, 215], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `getL1BaseFeeEstimateInertia` (0x29eb31ee) function + pub fn get_l1_base_fee_estimate_inertia( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([41, 235, 49, 238], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `getL1FeesAvailable` (0x5b39d23c) function + pub fn get_l1_fees_available( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([91, 57, 210, 60], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `getL1GasPriceEstimate` (0x055f362f) function + pub fn get_l1_gas_price_estimate( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([5, 95, 54, 47], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `getL1PricingSurplus` (0x520acdd7) function + pub fn get_l1_pricing_surplus( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([82, 10, 205, 215], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `getL1RewardRate` (0x8a5b1d28) function + pub fn get_l1_reward_rate(&self) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([138, 91, 29, 40], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `getL1RewardRecipient` (0x9e6d7e31) function + pub fn get_l1_reward_recipient( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([158, 109, 126, 49], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `getMinimumGasPrice` (0xf918379a) function + pub fn get_minimum_gas_price( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([249, 24, 55, 154], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `getPerBatchGasCharge` (0x6ecca45a) function + pub fn get_per_batch_gas_charge( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([110, 204, 164, 90], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `getPricesInArbGas` (0x02199f34) function + pub fn get_prices_in_arb_gas( + &self, + ) -> ::ethers::contract::builders::ContractCall< + M, + (::ethers::core::types::U256, ::ethers::core::types::U256, ::ethers::core::types::U256), + > { + self.0 + .method_hash([2, 25, 159, 52], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `getPricesInArbGasWithAggregator` (0x7a1ea732) function + pub fn get_prices_in_arb_gas_with_aggregator( + &self, + aggregator: ::ethers::core::types::Address, + ) -> ::ethers::contract::builders::ContractCall< + M, + (::ethers::core::types::U256, ::ethers::core::types::U256, ::ethers::core::types::U256), + > { + self.0 + .method_hash([122, 30, 167, 50], aggregator) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `getPricesInWei` (0x41b247a8) function + pub fn get_prices_in_wei( + &self, + ) -> ::ethers::contract::builders::ContractCall< + M, + ( + ::ethers::core::types::U256, + ::ethers::core::types::U256, + ::ethers::core::types::U256, + ::ethers::core::types::U256, + ::ethers::core::types::U256, + ::ethers::core::types::U256, + ), + > { + self.0 + .method_hash([65, 178, 71, 168], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `getPricesInWeiWithAggregator` (0xba9c916e) function + pub fn get_prices_in_wei_with_aggregator( + &self, + aggregator: ::ethers::core::types::Address, + ) -> ::ethers::contract::builders::ContractCall< + M, + ( + ::ethers::core::types::U256, + ::ethers::core::types::U256, + ::ethers::core::types::U256, + ::ethers::core::types::U256, + ::ethers::core::types::U256, + ::ethers::core::types::U256, + ), + > { + self.0 + .method_hash([186, 156, 145, 110], aggregator) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `getPricingInertia` (0x3dfb45b9) function + pub fn get_pricing_inertia(&self) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([61, 251, 69, 185], ()) + .expect("method not found (this should never happen)") + } + } + impl From<::ethers::contract::Contract> for ArbGasInfo { + fn from(contract: ::ethers::contract::Contract) -> Self { + Self::new(contract.address(), contract.client()) + } + } + ///Container type for all input parameters for the `getAmortizedCostCapBips` function with + /// signature `getAmortizedCostCapBips()` and selector `0x7a7d6beb` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "getAmortizedCostCapBips", abi = "getAmortizedCostCapBips()")] + pub struct GetAmortizedCostCapBipsCall; + ///Container type for all input parameters for the `getCurrentTxL1GasFees` function with + /// signature `getCurrentTxL1GasFees()` and selector `0xc6f7de0e` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "getCurrentTxL1GasFees", abi = "getCurrentTxL1GasFees()")] + pub struct GetCurrentTxL1GasFeesCall; + ///Container type for all input parameters for the `getGasAccountingParams` function with + /// signature `getGasAccountingParams()` and selector `0x612af178` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "getGasAccountingParams", abi = "getGasAccountingParams()")] + pub struct GetGasAccountingParamsCall; + ///Container type for all input parameters for the `getGasBacklog` function with signature + /// `getGasBacklog()` and selector `0x1d5b5c20` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "getGasBacklog", abi = "getGasBacklog()")] + pub struct GetGasBacklogCall; + ///Container type for all input parameters for the `getGasBacklogTolerance` function with + /// signature `getGasBacklogTolerance()` and selector `0x25754f91` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "getGasBacklogTolerance", abi = "getGasBacklogTolerance()")] + pub struct GetGasBacklogToleranceCall; + ///Container type for all input parameters for the `getL1BaseFeeEstimate` function with + /// signature `getL1BaseFeeEstimate()` and selector `0xf5d6ded7` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "getL1BaseFeeEstimate", abi = "getL1BaseFeeEstimate()")] + pub struct GetL1BaseFeeEstimateCall; + ///Container type for all input parameters for the `getL1BaseFeeEstimateInertia` function with + /// signature `getL1BaseFeeEstimateInertia()` and selector `0x29eb31ee` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "getL1BaseFeeEstimateInertia", abi = "getL1BaseFeeEstimateInertia()")] + pub struct GetL1BaseFeeEstimateInertiaCall; + ///Container type for all input parameters for the `getL1FeesAvailable` function with signature + /// `getL1FeesAvailable()` and selector `0x5b39d23c` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "getL1FeesAvailable", abi = "getL1FeesAvailable()")] + pub struct GetL1FeesAvailableCall; + ///Container type for all input parameters for the `getL1GasPriceEstimate` function with + /// signature `getL1GasPriceEstimate()` and selector `0x055f362f` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "getL1GasPriceEstimate", abi = "getL1GasPriceEstimate()")] + pub struct GetL1GasPriceEstimateCall; + ///Container type for all input parameters for the `getL1PricingSurplus` function with + /// signature `getL1PricingSurplus()` and selector `0x520acdd7` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "getL1PricingSurplus", abi = "getL1PricingSurplus()")] + pub struct GetL1PricingSurplusCall; + ///Container type for all input parameters for the `getL1RewardRate` function with signature + /// `getL1RewardRate()` and selector `0x8a5b1d28` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "getL1RewardRate", abi = "getL1RewardRate()")] + pub struct GetL1RewardRateCall; + ///Container type for all input parameters for the `getL1RewardRecipient` function with + /// signature `getL1RewardRecipient()` and selector `0x9e6d7e31` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "getL1RewardRecipient", abi = "getL1RewardRecipient()")] + pub struct GetL1RewardRecipientCall; + ///Container type for all input parameters for the `getMinimumGasPrice` function with signature + /// `getMinimumGasPrice()` and selector `0xf918379a` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "getMinimumGasPrice", abi = "getMinimumGasPrice()")] + pub struct GetMinimumGasPriceCall; + ///Container type for all input parameters for the `getPerBatchGasCharge` function with + /// signature `getPerBatchGasCharge()` and selector `0x6ecca45a` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "getPerBatchGasCharge", abi = "getPerBatchGasCharge()")] + pub struct GetPerBatchGasChargeCall; + ///Container type for all input parameters for the `getPricesInArbGas` function with signature + /// `getPricesInArbGas()` and selector `0x02199f34` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "getPricesInArbGas", abi = "getPricesInArbGas()")] + pub struct GetPricesInArbGasCall; + ///Container type for all input parameters for the `getPricesInArbGasWithAggregator` function + /// with signature `getPricesInArbGasWithAggregator(address)` and selector `0x7a1ea732` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall( + name = "getPricesInArbGasWithAggregator", + abi = "getPricesInArbGasWithAggregator(address)" + )] + pub struct GetPricesInArbGasWithAggregatorCall { + pub aggregator: ::ethers::core::types::Address, + } + ///Container type for all input parameters for the `getPricesInWei` function with signature + /// `getPricesInWei()` and selector `0x41b247a8` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "getPricesInWei", abi = "getPricesInWei()")] + pub struct GetPricesInWeiCall; + ///Container type for all input parameters for the `getPricesInWeiWithAggregator` function with + /// signature `getPricesInWeiWithAggregator(address)` and selector `0xba9c916e` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "getPricesInWeiWithAggregator", abi = "getPricesInWeiWithAggregator(address)")] + pub struct GetPricesInWeiWithAggregatorCall { + pub aggregator: ::ethers::core::types::Address, + } + ///Container type for all input parameters for the `getPricingInertia` function with signature + /// `getPricingInertia()` and selector `0x3dfb45b9` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "getPricingInertia", abi = "getPricingInertia()")] + pub struct GetPricingInertiaCall; + ///Container type for all of the contract's call + #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] + pub enum ArbGasInfoCalls { + GetAmortizedCostCapBips(GetAmortizedCostCapBipsCall), + GetCurrentTxL1GasFees(GetCurrentTxL1GasFeesCall), + GetGasAccountingParams(GetGasAccountingParamsCall), + GetGasBacklog(GetGasBacklogCall), + GetGasBacklogTolerance(GetGasBacklogToleranceCall), + GetL1BaseFeeEstimate(GetL1BaseFeeEstimateCall), + GetL1BaseFeeEstimateInertia(GetL1BaseFeeEstimateInertiaCall), + GetL1FeesAvailable(GetL1FeesAvailableCall), + GetL1GasPriceEstimate(GetL1GasPriceEstimateCall), + GetL1PricingSurplus(GetL1PricingSurplusCall), + GetL1RewardRate(GetL1RewardRateCall), + GetL1RewardRecipient(GetL1RewardRecipientCall), + GetMinimumGasPrice(GetMinimumGasPriceCall), + GetPerBatchGasCharge(GetPerBatchGasChargeCall), + GetPricesInArbGas(GetPricesInArbGasCall), + GetPricesInArbGasWithAggregator(GetPricesInArbGasWithAggregatorCall), + GetPricesInWei(GetPricesInWeiCall), + GetPricesInWeiWithAggregator(GetPricesInWeiWithAggregatorCall), + GetPricingInertia(GetPricingInertiaCall), + } + impl ::ethers::core::abi::AbiDecode for ArbGasInfoCalls { + fn decode( + data: impl AsRef<[u8]>, + ) -> ::core::result::Result { + let data = data.as_ref(); + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::GetAmortizedCostCapBips(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::GetCurrentTxL1GasFees(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::GetGasAccountingParams(decoded)); + } + if let Ok(decoded) = ::decode(data) + { + return Ok(Self::GetGasBacklog(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::GetGasBacklogTolerance(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::GetL1BaseFeeEstimate(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::GetL1BaseFeeEstimateInertia(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::GetL1FeesAvailable(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::GetL1GasPriceEstimate(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::GetL1PricingSurplus(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::GetL1RewardRate(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::GetL1RewardRecipient(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::GetMinimumGasPrice(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::GetPerBatchGasCharge(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::GetPricesInArbGas(decoded)); + } + if let Ok(decoded) = + ::decode( + data, + ) { + return Ok(Self::GetPricesInArbGasWithAggregator(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::GetPricesInWei(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::GetPricesInWeiWithAggregator(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::GetPricingInertia(decoded)); + } + Err(::ethers::core::abi::Error::InvalidData.into()) + } + } + impl ::ethers::core::abi::AbiEncode for ArbGasInfoCalls { + fn encode(self) -> Vec { + match self { + Self::GetAmortizedCostCapBips(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::GetCurrentTxL1GasFees(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::GetGasAccountingParams(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::GetGasBacklog(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::GetGasBacklogTolerance(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::GetL1BaseFeeEstimate(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::GetL1BaseFeeEstimateInertia(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::GetL1FeesAvailable(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::GetL1GasPriceEstimate(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::GetL1PricingSurplus(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::GetL1RewardRate(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::GetL1RewardRecipient(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::GetMinimumGasPrice(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::GetPerBatchGasCharge(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::GetPricesInArbGas(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::GetPricesInArbGasWithAggregator(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::GetPricesInWei(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::GetPricesInWeiWithAggregator(element) => + ::ethers::core::abi::AbiEncode::encode(element), + Self::GetPricingInertia(element) => ::ethers::core::abi::AbiEncode::encode(element), + } + } + } + impl ::core::fmt::Display for ArbGasInfoCalls { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + match self { + Self::GetAmortizedCostCapBips(element) => ::core::fmt::Display::fmt(element, f), + Self::GetCurrentTxL1GasFees(element) => ::core::fmt::Display::fmt(element, f), + Self::GetGasAccountingParams(element) => ::core::fmt::Display::fmt(element, f), + Self::GetGasBacklog(element) => ::core::fmt::Display::fmt(element, f), + Self::GetGasBacklogTolerance(element) => ::core::fmt::Display::fmt(element, f), + Self::GetL1BaseFeeEstimate(element) => ::core::fmt::Display::fmt(element, f), + Self::GetL1BaseFeeEstimateInertia(element) => ::core::fmt::Display::fmt(element, f), + Self::GetL1FeesAvailable(element) => ::core::fmt::Display::fmt(element, f), + Self::GetL1GasPriceEstimate(element) => ::core::fmt::Display::fmt(element, f), + Self::GetL1PricingSurplus(element) => ::core::fmt::Display::fmt(element, f), + Self::GetL1RewardRate(element) => ::core::fmt::Display::fmt(element, f), + Self::GetL1RewardRecipient(element) => ::core::fmt::Display::fmt(element, f), + Self::GetMinimumGasPrice(element) => ::core::fmt::Display::fmt(element, f), + Self::GetPerBatchGasCharge(element) => ::core::fmt::Display::fmt(element, f), + Self::GetPricesInArbGas(element) => ::core::fmt::Display::fmt(element, f), + Self::GetPricesInArbGasWithAggregator(element) => + ::core::fmt::Display::fmt(element, f), + Self::GetPricesInWei(element) => ::core::fmt::Display::fmt(element, f), + Self::GetPricesInWeiWithAggregator(element) => + ::core::fmt::Display::fmt(element, f), + Self::GetPricingInertia(element) => ::core::fmt::Display::fmt(element, f), + } + } + } + impl ::core::convert::From for ArbGasInfoCalls { + fn from(value: GetAmortizedCostCapBipsCall) -> Self { + Self::GetAmortizedCostCapBips(value) + } + } + impl ::core::convert::From for ArbGasInfoCalls { + fn from(value: GetCurrentTxL1GasFeesCall) -> Self { + Self::GetCurrentTxL1GasFees(value) + } + } + impl ::core::convert::From for ArbGasInfoCalls { + fn from(value: GetGasAccountingParamsCall) -> Self { + Self::GetGasAccountingParams(value) + } + } + impl ::core::convert::From for ArbGasInfoCalls { + fn from(value: GetGasBacklogCall) -> Self { + Self::GetGasBacklog(value) + } + } + impl ::core::convert::From for ArbGasInfoCalls { + fn from(value: GetGasBacklogToleranceCall) -> Self { + Self::GetGasBacklogTolerance(value) + } + } + impl ::core::convert::From for ArbGasInfoCalls { + fn from(value: GetL1BaseFeeEstimateCall) -> Self { + Self::GetL1BaseFeeEstimate(value) + } + } + impl ::core::convert::From for ArbGasInfoCalls { + fn from(value: GetL1BaseFeeEstimateInertiaCall) -> Self { + Self::GetL1BaseFeeEstimateInertia(value) + } + } + impl ::core::convert::From for ArbGasInfoCalls { + fn from(value: GetL1FeesAvailableCall) -> Self { + Self::GetL1FeesAvailable(value) + } + } + impl ::core::convert::From for ArbGasInfoCalls { + fn from(value: GetL1GasPriceEstimateCall) -> Self { + Self::GetL1GasPriceEstimate(value) + } + } + impl ::core::convert::From for ArbGasInfoCalls { + fn from(value: GetL1PricingSurplusCall) -> Self { + Self::GetL1PricingSurplus(value) + } + } + impl ::core::convert::From for ArbGasInfoCalls { + fn from(value: GetL1RewardRateCall) -> Self { + Self::GetL1RewardRate(value) + } + } + impl ::core::convert::From for ArbGasInfoCalls { + fn from(value: GetL1RewardRecipientCall) -> Self { + Self::GetL1RewardRecipient(value) + } + } + impl ::core::convert::From for ArbGasInfoCalls { + fn from(value: GetMinimumGasPriceCall) -> Self { + Self::GetMinimumGasPrice(value) + } + } + impl ::core::convert::From for ArbGasInfoCalls { + fn from(value: GetPerBatchGasChargeCall) -> Self { + Self::GetPerBatchGasCharge(value) + } + } + impl ::core::convert::From for ArbGasInfoCalls { + fn from(value: GetPricesInArbGasCall) -> Self { + Self::GetPricesInArbGas(value) + } + } + impl ::core::convert::From for ArbGasInfoCalls { + fn from(value: GetPricesInArbGasWithAggregatorCall) -> Self { + Self::GetPricesInArbGasWithAggregator(value) + } + } + impl ::core::convert::From for ArbGasInfoCalls { + fn from(value: GetPricesInWeiCall) -> Self { + Self::GetPricesInWei(value) + } + } + impl ::core::convert::From for ArbGasInfoCalls { + fn from(value: GetPricesInWeiWithAggregatorCall) -> Self { + Self::GetPricesInWeiWithAggregator(value) + } + } + impl ::core::convert::From for ArbGasInfoCalls { + fn from(value: GetPricingInertiaCall) -> Self { + Self::GetPricingInertia(value) + } + } + ///Container type for all return fields from the `getAmortizedCostCapBips` function with + /// signature `getAmortizedCostCapBips()` and selector `0x7a7d6beb` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetAmortizedCostCapBipsReturn(pub u64); + ///Container type for all return fields from the `getCurrentTxL1GasFees` function with + /// signature `getCurrentTxL1GasFees()` and selector `0xc6f7de0e` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetCurrentTxL1GasFeesReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `getGasAccountingParams` function with + /// signature `getGasAccountingParams()` and selector `0x612af178` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetGasAccountingParamsReturn( + pub ::ethers::core::types::U256, + pub ::ethers::core::types::U256, + pub ::ethers::core::types::U256, + ); + ///Container type for all return fields from the `getGasBacklog` function with signature + /// `getGasBacklog()` and selector `0x1d5b5c20` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetGasBacklogReturn(pub u64); + ///Container type for all return fields from the `getGasBacklogTolerance` function with + /// signature `getGasBacklogTolerance()` and selector `0x25754f91` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetGasBacklogToleranceReturn(pub u64); + ///Container type for all return fields from the `getL1BaseFeeEstimate` function with signature + /// `getL1BaseFeeEstimate()` and selector `0xf5d6ded7` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetL1BaseFeeEstimateReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `getL1BaseFeeEstimateInertia` function with + /// signature `getL1BaseFeeEstimateInertia()` and selector `0x29eb31ee` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetL1BaseFeeEstimateInertiaReturn(pub u64); + ///Container type for all return fields from the `getL1FeesAvailable` function with signature + /// `getL1FeesAvailable()` and selector `0x5b39d23c` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetL1FeesAvailableReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `getL1GasPriceEstimate` function with + /// signature `getL1GasPriceEstimate()` and selector `0x055f362f` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetL1GasPriceEstimateReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `getL1PricingSurplus` function with signature + /// `getL1PricingSurplus()` and selector `0x520acdd7` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetL1PricingSurplusReturn(pub ::ethers::core::types::I256); + ///Container type for all return fields from the `getL1RewardRate` function with signature + /// `getL1RewardRate()` and selector `0x8a5b1d28` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetL1RewardRateReturn(pub u64); + ///Container type for all return fields from the `getL1RewardRecipient` function with signature + /// `getL1RewardRecipient()` and selector `0x9e6d7e31` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetL1RewardRecipientReturn(pub ::ethers::core::types::Address); + ///Container type for all return fields from the `getMinimumGasPrice` function with signature + /// `getMinimumGasPrice()` and selector `0xf918379a` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetMinimumGasPriceReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `getPerBatchGasCharge` function with signature + /// `getPerBatchGasCharge()` and selector `0x6ecca45a` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetPerBatchGasChargeReturn(pub i64); + ///Container type for all return fields from the `getPricesInArbGas` function with signature + /// `getPricesInArbGas()` and selector `0x02199f34` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetPricesInArbGasReturn( + pub ::ethers::core::types::U256, + pub ::ethers::core::types::U256, + pub ::ethers::core::types::U256, + ); + ///Container type for all return fields from the `getPricesInArbGasWithAggregator` function + /// with signature `getPricesInArbGasWithAggregator(address)` and selector `0x7a1ea732` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetPricesInArbGasWithAggregatorReturn( + pub ::ethers::core::types::U256, + pub ::ethers::core::types::U256, + pub ::ethers::core::types::U256, + ); + ///Container type for all return fields from the `getPricesInWei` function with signature + /// `getPricesInWei()` and selector `0x41b247a8` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetPricesInWeiReturn( + pub ::ethers::core::types::U256, + pub ::ethers::core::types::U256, + pub ::ethers::core::types::U256, + pub ::ethers::core::types::U256, + pub ::ethers::core::types::U256, + pub ::ethers::core::types::U256, + ); + ///Container type for all return fields from the `getPricesInWeiWithAggregator` function with + /// signature `getPricesInWeiWithAggregator(address)` and selector `0xba9c916e` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetPricesInWeiWithAggregatorReturn( + pub ::ethers::core::types::U256, + pub ::ethers::core::types::U256, + pub ::ethers::core::types::U256, + pub ::ethers::core::types::U256, + pub ::ethers::core::types::U256, + pub ::ethers::core::types::U256, + ); + ///Container type for all return fields from the `getPricingInertia` function with signature + /// `getPricingInertia()` and selector `0x3dfb45b9` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetPricingInertiaReturn(pub u64); } diff --git a/tesseract/evm/src/abi/erc_20.rs b/tesseract/evm/src/abi/erc_20.rs index 9de3f9b96..d8fe1fd99 100644 --- a/tesseract/evm/src/abi/erc_20.rs +++ b/tesseract/evm/src/abi/erc_20.rs @@ -2,1171 +2,1071 @@ pub use erc_20::*; /// This module was auto-generated with ethers-rs Abigen. /// More information at: #[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, + clippy::enum_variant_names, + clippy::too_many_arguments, + clippy::upper_case_acronyms, + clippy::type_complexity, + dead_code, + non_camel_case_types )] pub mod erc_20 { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::Some(::ethers::core::abi::ethabi::Constructor { - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("name_"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("symbol_"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - }), - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("allowance"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("allowance"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("approve"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("approve"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("amount"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("balanceOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("balanceOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("account"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("decimals"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("decimals"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("decreaseAllowance"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("decreaseAllowance"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("subtractedValue"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("increaseAllowance"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("increaseAllowance"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("addedValue"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("name"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("name"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("symbol"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("symbol"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("totalSupply"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("totalSupply"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("transfer"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("amount"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("transferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("amount"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("Approval"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Approval"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("value"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("Transfer"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("value"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static ERC20_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - #[rustfmt::skip] + #[allow(deprecated)] + fn __abi() -> ::ethers::core::abi::Abi { + ::ethers::core::abi::ethabi::Contract { + constructor: ::core::option::Option::Some(::ethers::core::abi::ethabi::Constructor { + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("name_"), + kind: ::ethers::core::abi::ethabi::ParamType::String, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("string"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("symbol_"), + kind: ::ethers::core::abi::ethabi::ParamType::String, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("string"), + ), + }, + ], + }), + functions: ::core::convert::From::from([ + ( + ::std::borrow::ToOwned::to_owned("allowance"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("allowance"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("owner"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("spender"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("approve"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("approve"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("spender"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("amount"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bool"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("balanceOf"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("balanceOf"), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("account"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + },], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("decimals"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("decimals"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint8"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("decreaseAllowance"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("decreaseAllowance"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("spender"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("subtractedValue"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bool"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("increaseAllowance"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("increaseAllowance"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("spender"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("addedValue"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bool"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("name"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("name"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::String, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("string"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("symbol"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("symbol"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::String, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("string"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("totalSupply"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("totalSupply"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("transfer"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("transfer"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("to"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("amount"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bool"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("transferFrom"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("transferFrom"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("from"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("to"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("amount"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + }, + ], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bool"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ]), + events: ::core::convert::From::from([ + ( + ::std::borrow::ToOwned::to_owned("Approval"), + ::std::vec![::ethers::core::abi::ethabi::Event { + name: ::std::borrow::ToOwned::to_owned("Approval"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("owner"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: true, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("spender"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: true, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("value"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + indexed: false, + }, + ], + anonymous: false, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("Transfer"), + ::std::vec![::ethers::core::abi::ethabi::Event { + name: ::std::borrow::ToOwned::to_owned("Transfer"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("from"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: true, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("to"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: true, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("value"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + indexed: false, + }, + ], + anonymous: false, + },], + ), + ]), + errors: ::std::collections::BTreeMap::new(), + receive: false, + fallback: false, + } + } + ///The parsed JSON ABI of the contract. + pub static ERC20_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = + ::ethers::contract::Lazy::new(__abi); + #[rustfmt::skip] const __DEPLOYED_BYTECODE: &[u8] = b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0\xA9W`\x005`\xE0\x1C\x80c9P\x93Q\x11a\0qW\x80c9P\x93Q\x14a\x01#W\x80cp\xA0\x821\x14a\x016W\x80c\x95\xD8\x9BA\x14a\x01_W\x80c\xA4W\xC2\xD7\x14a\x01gW\x80c\xA9\x05\x9C\xBB\x14a\x01zW\x80c\xDDb\xED>\x14a\x01\x8DW`\0\x80\xFD[\x80c\x06\xFD\xDE\x03\x14a\0\xAEW\x80c\t^\xA7\xB3\x14a\0\xCCW\x80c\x18\x16\r\xDD\x14a\0\xEFW\x80c#\xB8r\xDD\x14a\x01\x01W\x80c1<\xE5g\x14a\x01\x14W[`\0\x80\xFD[a\0\xB6a\x01\xA0V[`@Qa\0\xC3\x91\x90a\x06\x9CV[`@Q\x80\x91\x03\x90\xF3[a\0\xDFa\0\xDA6`\x04a\x07\x06V[a\x022V[`@Q\x90\x15\x15\x81R` \x01a\0\xC3V[`\x02T[`@Q\x90\x81R` \x01a\0\xC3V[a\0\xDFa\x01\x0F6`\x04a\x070V[a\x02LV[`@Q`\x12\x81R` \x01a\0\xC3V[a\0\xDFa\x0116`\x04a\x07\x06V[a\x02pV[a\0\xF3a\x01D6`\x04a\x07lV[`\x01`\x01`\xA0\x1B\x03\x16`\0\x90\x81R` \x81\x90R`@\x90 T\x90V[a\0\xB6a\x02\x92V[a\0\xDFa\x01u6`\x04a\x07\x06V[a\x02\xA1V[a\0\xDFa\x01\x886`\x04a\x07\x06V[a\x03!V[a\0\xF3a\x01\x9B6`\x04a\x07\x8EV[a\x03/V[```\x03\x80Ta\x01\xAF\x90a\x07\xC1V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x01\xDB\x90a\x07\xC1V[\x80\x15a\x02(W\x80`\x1F\x10a\x01\xFDWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x02(V[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x02\x0BW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x90P\x90V[`\x003a\x02@\x81\x85\x85a\x03ZV[`\x01\x91PP[\x92\x91PPV[`\x003a\x02Z\x85\x82\x85a\x04~V[a\x02e\x85\x85\x85a\x04\xF8V[P`\x01\x94\x93PPPPV[`\x003a\x02@\x81\x85\x85a\x02\x83\x83\x83a\x03/V[a\x02\x8D\x91\x90a\x07\xFBV[a\x03ZV[```\x04\x80Ta\x01\xAF\x90a\x07\xC1V[`\x003\x81a\x02\xAF\x82\x86a\x03/V[\x90P\x83\x81\x10\x15a\x03\x14W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`%`$\x82\x01R\x7FERC20: decreased allowance below`D\x82\x01Rd zero`\xD8\x1B`d\x82\x01R`\x84\x01[`@Q\x80\x91\x03\x90\xFD[a\x02e\x82\x86\x86\x84\x03a\x03ZV[`\x003a\x02@\x81\x85\x85a\x04\xF8V[`\x01`\x01`\xA0\x1B\x03\x91\x82\x16`\0\x90\x81R`\x01` \x90\x81R`@\x80\x83 \x93\x90\x94\x16\x82R\x91\x90\x91R T\x90V[`\x01`\x01`\xA0\x1B\x03\x83\x16a\x03\xBCW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`$\x80\x82\x01R\x7FERC20: approve from the zero add`D\x82\x01Rcress`\xE0\x1B`d\x82\x01R`\x84\x01a\x03\x0BV[`\x01`\x01`\xA0\x1B\x03\x82\x16a\x04\x1DW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\"`$\x82\x01R\x7FERC20: approve to the zero addre`D\x82\x01Rass`\xF0\x1B`d\x82\x01R`\x84\x01a\x03\x0BV[`\x01`\x01`\xA0\x1B\x03\x83\x81\x16`\0\x81\x81R`\x01` \x90\x81R`@\x80\x83 \x94\x87\x16\x80\x84R\x94\x82R\x91\x82\x90 \x85\x90U\x90Q\x84\x81R\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\x01`@Q\x80\x91\x03\x90\xA3PPPV[`\0a\x04\x8A\x84\x84a\x03/V[\x90P`\0\x19\x81\x14a\x04\xF2W\x81\x81\x10\x15a\x04\xE5W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1D`$\x82\x01R\x7FERC20: insufficient allowance\0\0\0`D\x82\x01R`d\x01a\x03\x0BV[a\x04\xF2\x84\x84\x84\x84\x03a\x03ZV[PPPPV[`\x01`\x01`\xA0\x1B\x03\x83\x16a\x05\\W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`%`$\x82\x01R\x7FERC20: transfer from the zero ad`D\x82\x01Rddress`\xD8\x1B`d\x82\x01R`\x84\x01a\x03\x0BV[`\x01`\x01`\xA0\x1B\x03\x82\x16a\x05\xBEW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`#`$\x82\x01R\x7FERC20: transfer to the zero addr`D\x82\x01Rbess`\xE8\x1B`d\x82\x01R`\x84\x01a\x03\x0BV[`\x01`\x01`\xA0\x1B\x03\x83\x16`\0\x90\x81R` \x81\x90R`@\x90 T\x81\x81\x10\x15a\x066W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`&`$\x82\x01R\x7FERC20: transfer amount exceeds b`D\x82\x01Realance`\xD0\x1B`d\x82\x01R`\x84\x01a\x03\x0BV[`\x01`\x01`\xA0\x1B\x03\x84\x81\x16`\0\x81\x81R` \x81\x81R`@\x80\x83 \x87\x87\x03\x90U\x93\x87\x16\x80\x83R\x91\x84\x90 \x80T\x87\x01\x90U\x92Q\x85\x81R\x90\x92\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x91\x01`@Q\x80\x91\x03\x90\xA3a\x04\xF2V[`\0` \x80\x83R\x83Q\x80\x82\x85\x01R`\0[\x81\x81\x10\x15a\x06\xC9W\x85\x81\x01\x83\x01Q\x85\x82\x01`@\x01R\x82\x01a\x06\xADV[P`\0`@\x82\x86\x01\x01R`@`\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x92PPP\x92\x91PPV[\x805`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x07\x01W`\0\x80\xFD[\x91\x90PV[`\0\x80`@\x83\x85\x03\x12\x15a\x07\x19W`\0\x80\xFD[a\x07\"\x83a\x06\xEAV[\x94` \x93\x90\x93\x015\x93PPPV[`\0\x80`\0``\x84\x86\x03\x12\x15a\x07EW`\0\x80\xFD[a\x07N\x84a\x06\xEAV[\x92Pa\x07\\` \x85\x01a\x06\xEAV[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[`\0` \x82\x84\x03\x12\x15a\x07~W`\0\x80\xFD[a\x07\x87\x82a\x06\xEAV[\x93\x92PPPV[`\0\x80`@\x83\x85\x03\x12\x15a\x07\xA1W`\0\x80\xFD[a\x07\xAA\x83a\x06\xEAV[\x91Pa\x07\xB8` \x84\x01a\x06\xEAV[\x90P\x92P\x92\x90PV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x07\xD5W`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x07\xF5WcNH{q`\xE0\x1B`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[\x80\x82\x01\x80\x82\x11\x15a\x02FWcNH{q`\xE0\x1B`\0R`\x11`\x04R`$`\0\xFD\xFE\xA2dipfsX\"\x12 _\x98h\x9D\xA2\xC3\x81(\x90\x86\xBB\xE4\0\xF4\x9C,y\x93M\xAD\xBC\x0C(::ethers::contract::Contract); - impl ::core::clone::Clone for Erc20 { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for Erc20 { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for Erc20 { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for Erc20 { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(Erc20)).field(&self.address()).finish() - } - } - impl Erc20 { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - ERC20_ABI.clone(), - client, - ), - ) - } - ///Calls the contract's `allowance` (0xdd62ed3e) function - pub fn allowance( - &self, - owner: ::ethers::core::types::Address, - spender: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([221, 98, 237, 62], (owner, spender)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `approve` (0x095ea7b3) function - pub fn approve( - &self, - spender: ::ethers::core::types::Address, - amount: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([9, 94, 167, 179], (spender, amount)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `balanceOf` (0x70a08231) function - pub fn balance_of( - &self, - account: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([112, 160, 130, 49], account) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `decimals` (0x313ce567) function - pub fn decimals(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([49, 60, 229, 103], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `decreaseAllowance` (0xa457c2d7) function - pub fn decrease_allowance( - &self, - spender: ::ethers::core::types::Address, - subtracted_value: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([164, 87, 194, 215], (spender, subtracted_value)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `increaseAllowance` (0x39509351) function - pub fn increase_allowance( - &self, - spender: ::ethers::core::types::Address, - added_value: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([57, 80, 147, 81], (spender, added_value)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `name` (0x06fdde03) function - pub fn name( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([6, 253, 222, 3], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `symbol` (0x95d89b41) function - pub fn symbol( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([149, 216, 155, 65], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `totalSupply` (0x18160ddd) function - pub fn total_supply( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([24, 22, 13, 221], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `transfer` (0xa9059cbb) function - pub fn transfer( - &self, - to: ::ethers::core::types::Address, - amount: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([169, 5, 156, 187], (to, amount)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `transferFrom` (0x23b872dd) function - pub fn transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - amount: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([35, 184, 114, 221], (from, to, amount)) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `Approval` event - pub fn approval_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalFilter, - > { - self.0.event() - } - ///Gets the contract's `Transfer` event - pub fn transfer_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - TransferFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, Erc20Events> { - self.0.event_with_filter(::core::default::Default::default()) - } - } - impl From<::ethers::contract::Contract> - for Erc20 { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")] - pub struct ApprovalFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub spender: ::ethers::core::types::Address, - pub value: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")] - pub struct TransferFilter { - #[ethevent(indexed)] - pub from: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub to: ::ethers::core::types::Address, - pub value: ::ethers::core::types::U256, - } - ///Container type for all of the contract's events - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum Erc20Events { - ApprovalFilter(ApprovalFilter), - TransferFilter(TransferFilter), - } - impl ::ethers::contract::EthLogDecode for Erc20Events { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = ApprovalFilter::decode_log(log) { - return Ok(Erc20Events::ApprovalFilter(decoded)); - } - if let Ok(decoded) = TransferFilter::decode_log(log) { - return Ok(Erc20Events::TransferFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for Erc20Events { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for Erc20Events { - fn from(value: ApprovalFilter) -> Self { - Self::ApprovalFilter(value) - } - } - impl ::core::convert::From for Erc20Events { - fn from(value: TransferFilter) -> Self { - Self::TransferFilter(value) - } - } - ///Container type for all input parameters for the `allowance` function with signature `allowance(address,address)` and selector `0xdd62ed3e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "allowance", abi = "allowance(address,address)")] - pub struct AllowanceCall { - pub owner: ::ethers::core::types::Address, - pub spender: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "approve", abi = "approve(address,uint256)")] - pub struct ApproveCall { - pub spender: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "balanceOf", abi = "balanceOf(address)")] - pub struct BalanceOfCall { - pub account: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `decimals` function with signature `decimals()` and selector `0x313ce567` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "decimals", abi = "decimals()")] - pub struct DecimalsCall; - ///Container type for all input parameters for the `decreaseAllowance` function with signature `decreaseAllowance(address,uint256)` and selector `0xa457c2d7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "decreaseAllowance", abi = "decreaseAllowance(address,uint256)")] - pub struct DecreaseAllowanceCall { - pub spender: ::ethers::core::types::Address, - pub subtracted_value: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `increaseAllowance` function with signature `increaseAllowance(address,uint256)` and selector `0x39509351` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "increaseAllowance", abi = "increaseAllowance(address,uint256)")] - pub struct IncreaseAllowanceCall { - pub spender: ::ethers::core::types::Address, - pub added_value: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "name", abi = "name()")] - pub struct NameCall; - ///Container type for all input parameters for the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "symbol", abi = "symbol()")] - pub struct SymbolCall; - ///Container type for all input parameters for the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "totalSupply", abi = "totalSupply()")] - pub struct TotalSupplyCall; - ///Container type for all input parameters for the `transfer` function with signature `transfer(address,uint256)` and selector `0xa9059cbb` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "transfer", abi = "transfer(address,uint256)")] - pub struct TransferCall { - pub to: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")] - pub struct TransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - } - ///Container type for all of the contract's call - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum Erc20Calls { - Allowance(AllowanceCall), - Approve(ApproveCall), - BalanceOf(BalanceOfCall), - Decimals(DecimalsCall), - DecreaseAllowance(DecreaseAllowanceCall), - IncreaseAllowance(IncreaseAllowanceCall), - Name(NameCall), - Symbol(SymbolCall), - TotalSupply(TotalSupplyCall), - Transfer(TransferCall), - TransferFrom(TransferFromCall), - } - impl ::ethers::core::abi::AbiDecode for Erc20Calls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Allowance(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Approve(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::BalanceOf(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Decimals(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::DecreaseAllowance(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::IncreaseAllowance(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Name(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Symbol(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TotalSupply(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Transfer(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TransferFrom(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for Erc20Calls { - fn encode(self) -> Vec { - match self { - Self::Allowance(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Approve(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::BalanceOf(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Decimals(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::DecreaseAllowance(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::IncreaseAllowance(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Name(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Symbol(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::TotalSupply(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Transfer(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::TransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for Erc20Calls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::Allowance(element) => ::core::fmt::Display::fmt(element, f), - Self::Approve(element) => ::core::fmt::Display::fmt(element, f), - Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f), - Self::Decimals(element) => ::core::fmt::Display::fmt(element, f), - Self::DecreaseAllowance(element) => ::core::fmt::Display::fmt(element, f), - Self::IncreaseAllowance(element) => ::core::fmt::Display::fmt(element, f), - Self::Name(element) => ::core::fmt::Display::fmt(element, f), - Self::Symbol(element) => ::core::fmt::Display::fmt(element, f), - Self::TotalSupply(element) => ::core::fmt::Display::fmt(element, f), - Self::Transfer(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for Erc20Calls { - fn from(value: AllowanceCall) -> Self { - Self::Allowance(value) - } - } - impl ::core::convert::From for Erc20Calls { - fn from(value: ApproveCall) -> Self { - Self::Approve(value) - } - } - impl ::core::convert::From for Erc20Calls { - fn from(value: BalanceOfCall) -> Self { - Self::BalanceOf(value) - } - } - impl ::core::convert::From for Erc20Calls { - fn from(value: DecimalsCall) -> Self { - Self::Decimals(value) - } - } - impl ::core::convert::From for Erc20Calls { - fn from(value: DecreaseAllowanceCall) -> Self { - Self::DecreaseAllowance(value) - } - } - impl ::core::convert::From for Erc20Calls { - fn from(value: IncreaseAllowanceCall) -> Self { - Self::IncreaseAllowance(value) - } - } - impl ::core::convert::From for Erc20Calls { - fn from(value: NameCall) -> Self { - Self::Name(value) - } - } - impl ::core::convert::From for Erc20Calls { - fn from(value: SymbolCall) -> Self { - Self::Symbol(value) - } - } - impl ::core::convert::From for Erc20Calls { - fn from(value: TotalSupplyCall) -> Self { - Self::TotalSupply(value) - } - } - impl ::core::convert::From for Erc20Calls { - fn from(value: TransferCall) -> Self { - Self::Transfer(value) - } - } - impl ::core::convert::From for Erc20Calls { - fn from(value: TransferFromCall) -> Self { - Self::TransferFrom(value) - } - } - ///Container type for all return fields from the `allowance` function with signature `allowance(address,address)` and selector `0xdd62ed3e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct AllowanceReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ApproveReturn(pub bool); - ///Container type for all return fields from the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct BalanceOfReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `decimals` function with signature `decimals()` and selector `0x313ce567` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct DecimalsReturn(pub u8); - ///Container type for all return fields from the `decreaseAllowance` function with signature `decreaseAllowance(address,uint256)` and selector `0xa457c2d7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct DecreaseAllowanceReturn(pub bool); - ///Container type for all return fields from the `increaseAllowance` function with signature `increaseAllowance(address,uint256)` and selector `0x39509351` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct IncreaseAllowanceReturn(pub bool); - ///Container type for all return fields from the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct NameReturn(pub ::std::string::String); - ///Container type for all return fields from the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SymbolReturn(pub ::std::string::String); - ///Container type for all return fields from the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TotalSupplyReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `transfer` function with signature `transfer(address,uint256)` and selector `0xa9059cbb` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TransferReturn(pub bool); - ///Container type for all return fields from the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TransferFromReturn(pub bool); + /// The deployed bytecode of the contract. + pub static ERC20_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = + ::ethers::core::types::Bytes::from_static(__DEPLOYED_BYTECODE); + pub struct Erc20(::ethers::contract::Contract); + impl ::core::clone::Clone for Erc20 { + fn clone(&self) -> Self { + Self(::core::clone::Clone::clone(&self.0)) + } + } + impl ::core::ops::Deref for Erc20 { + type Target = ::ethers::contract::Contract; + fn deref(&self) -> &Self::Target { + &self.0 + } + } + impl ::core::ops::DerefMut for Erc20 { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } + } + impl ::core::fmt::Debug for Erc20 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple(::core::stringify!(Erc20)).field(&self.address()).finish() + } + } + impl Erc20 { + /// Creates a new contract instance with the specified `ethers` client at + /// `address`. The contract derefs to a `ethers::Contract` object. + pub fn new>( + address: T, + client: ::std::sync::Arc, + ) -> Self { + Self(::ethers::contract::Contract::new(address.into(), ERC20_ABI.clone(), client)) + } + ///Calls the contract's `allowance` (0xdd62ed3e) function + pub fn allowance( + &self, + owner: ::ethers::core::types::Address, + spender: ::ethers::core::types::Address, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([221, 98, 237, 62], (owner, spender)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `approve` (0x095ea7b3) function + pub fn approve( + &self, + spender: ::ethers::core::types::Address, + amount: ::ethers::core::types::U256, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([9, 94, 167, 179], (spender, amount)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `balanceOf` (0x70a08231) function + pub fn balance_of( + &self, + account: ::ethers::core::types::Address, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([112, 160, 130, 49], account) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `decimals` (0x313ce567) function + pub fn decimals(&self) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([49, 60, 229, 103], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `decreaseAllowance` (0xa457c2d7) function + pub fn decrease_allowance( + &self, + spender: ::ethers::core::types::Address, + subtracted_value: ::ethers::core::types::U256, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([164, 87, 194, 215], (spender, subtracted_value)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `increaseAllowance` (0x39509351) function + pub fn increase_allowance( + &self, + spender: ::ethers::core::types::Address, + added_value: ::ethers::core::types::U256, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([57, 80, 147, 81], (spender, added_value)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `name` (0x06fdde03) function + pub fn name(&self) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([6, 253, 222, 3], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `symbol` (0x95d89b41) function + pub fn symbol( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([149, 216, 155, 65], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `totalSupply` (0x18160ddd) function + pub fn total_supply( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([24, 22, 13, 221], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `transfer` (0xa9059cbb) function + pub fn transfer( + &self, + to: ::ethers::core::types::Address, + amount: ::ethers::core::types::U256, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([169, 5, 156, 187], (to, amount)) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `transferFrom` (0x23b872dd) function + pub fn transfer_from( + &self, + from: ::ethers::core::types::Address, + to: ::ethers::core::types::Address, + amount: ::ethers::core::types::U256, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([35, 184, 114, 221], (from, to, amount)) + .expect("method not found (this should never happen)") + } + ///Gets the contract's `Approval` event + pub fn approval_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, ApprovalFilter> { + self.0.event() + } + ///Gets the contract's `Transfer` event + pub fn transfer_filter( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, TransferFilter> { + self.0.event() + } + /// Returns an `Event` builder for all the events of this contract. + pub fn events( + &self, + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, Erc20Events> { + self.0.event_with_filter(::core::default::Default::default()) + } + } + impl From<::ethers::contract::Contract> for Erc20 { + fn from(contract: ::ethers::contract::Contract) -> Self { + Self::new(contract.address(), contract.client()) + } + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")] + pub struct ApprovalFilter { + #[ethevent(indexed)] + pub owner: ::ethers::core::types::Address, + #[ethevent(indexed)] + pub spender: ::ethers::core::types::Address, + pub value: ::ethers::core::types::U256, + } + #[derive( + Clone, + ::ethers::contract::EthEvent, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")] + pub struct TransferFilter { + #[ethevent(indexed)] + pub from: ::ethers::core::types::Address, + #[ethevent(indexed)] + pub to: ::ethers::core::types::Address, + pub value: ::ethers::core::types::U256, + } + ///Container type for all of the contract's events + #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] + pub enum Erc20Events { + ApprovalFilter(ApprovalFilter), + TransferFilter(TransferFilter), + } + impl ::ethers::contract::EthLogDecode for Erc20Events { + fn decode_log( + log: &::ethers::core::abi::RawLog, + ) -> ::core::result::Result { + if let Ok(decoded) = ApprovalFilter::decode_log(log) { + return Ok(Erc20Events::ApprovalFilter(decoded)); + } + if let Ok(decoded) = TransferFilter::decode_log(log) { + return Ok(Erc20Events::TransferFilter(decoded)); + } + Err(::ethers::core::abi::Error::InvalidData) + } + } + impl ::core::fmt::Display for Erc20Events { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + match self { + Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f), + Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f), + } + } + } + impl ::core::convert::From for Erc20Events { + fn from(value: ApprovalFilter) -> Self { + Self::ApprovalFilter(value) + } + } + impl ::core::convert::From for Erc20Events { + fn from(value: TransferFilter) -> Self { + Self::TransferFilter(value) + } + } + ///Container type for all input parameters for the `allowance` function with signature + /// `allowance(address,address)` and selector `0xdd62ed3e` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "allowance", abi = "allowance(address,address)")] + pub struct AllowanceCall { + pub owner: ::ethers::core::types::Address, + pub spender: ::ethers::core::types::Address, + } + ///Container type for all input parameters for the `approve` function with signature + /// `approve(address,uint256)` and selector `0x095ea7b3` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "approve", abi = "approve(address,uint256)")] + pub struct ApproveCall { + pub spender: ::ethers::core::types::Address, + pub amount: ::ethers::core::types::U256, + } + ///Container type for all input parameters for the `balanceOf` function with signature + /// `balanceOf(address)` and selector `0x70a08231` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "balanceOf", abi = "balanceOf(address)")] + pub struct BalanceOfCall { + pub account: ::ethers::core::types::Address, + } + ///Container type for all input parameters for the `decimals` function with signature + /// `decimals()` and selector `0x313ce567` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "decimals", abi = "decimals()")] + pub struct DecimalsCall; + ///Container type for all input parameters for the `decreaseAllowance` function with signature + /// `decreaseAllowance(address,uint256)` and selector `0xa457c2d7` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "decreaseAllowance", abi = "decreaseAllowance(address,uint256)")] + pub struct DecreaseAllowanceCall { + pub spender: ::ethers::core::types::Address, + pub subtracted_value: ::ethers::core::types::U256, + } + ///Container type for all input parameters for the `increaseAllowance` function with signature + /// `increaseAllowance(address,uint256)` and selector `0x39509351` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "increaseAllowance", abi = "increaseAllowance(address,uint256)")] + pub struct IncreaseAllowanceCall { + pub spender: ::ethers::core::types::Address, + pub added_value: ::ethers::core::types::U256, + } + ///Container type for all input parameters for the `name` function with signature `name()` and + /// selector `0x06fdde03` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "name", abi = "name()")] + pub struct NameCall; + ///Container type for all input parameters for the `symbol` function with signature `symbol()` + /// and selector `0x95d89b41` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "symbol", abi = "symbol()")] + pub struct SymbolCall; + ///Container type for all input parameters for the `totalSupply` function with signature + /// `totalSupply()` and selector `0x18160ddd` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "totalSupply", abi = "totalSupply()")] + pub struct TotalSupplyCall; + ///Container type for all input parameters for the `transfer` function with signature + /// `transfer(address,uint256)` and selector `0xa9059cbb` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "transfer", abi = "transfer(address,uint256)")] + pub struct TransferCall { + pub to: ::ethers::core::types::Address, + pub amount: ::ethers::core::types::U256, + } + ///Container type for all input parameters for the `transferFrom` function with signature + /// `transferFrom(address,address,uint256)` and selector `0x23b872dd` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")] + pub struct TransferFromCall { + pub from: ::ethers::core::types::Address, + pub to: ::ethers::core::types::Address, + pub amount: ::ethers::core::types::U256, + } + ///Container type for all of the contract's call + #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] + pub enum Erc20Calls { + Allowance(AllowanceCall), + Approve(ApproveCall), + BalanceOf(BalanceOfCall), + Decimals(DecimalsCall), + DecreaseAllowance(DecreaseAllowanceCall), + IncreaseAllowance(IncreaseAllowanceCall), + Name(NameCall), + Symbol(SymbolCall), + TotalSupply(TotalSupplyCall), + Transfer(TransferCall), + TransferFrom(TransferFromCall), + } + impl ::ethers::core::abi::AbiDecode for Erc20Calls { + fn decode( + data: impl AsRef<[u8]>, + ) -> ::core::result::Result { + let data = data.as_ref(); + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Allowance(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Approve(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::BalanceOf(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Decimals(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::DecreaseAllowance(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::IncreaseAllowance(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Name(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Symbol(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::TotalSupply(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Transfer(decoded)); + } + if let Ok(decoded) = ::decode(data) + { + return Ok(Self::TransferFrom(decoded)); + } + Err(::ethers::core::abi::Error::InvalidData.into()) + } + } + impl ::ethers::core::abi::AbiEncode for Erc20Calls { + fn encode(self) -> Vec { + match self { + Self::Allowance(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::Approve(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::BalanceOf(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::Decimals(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::DecreaseAllowance(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::IncreaseAllowance(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::Name(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::Symbol(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::TotalSupply(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::Transfer(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::TransferFrom(element) => ::ethers::core::abi::AbiEncode::encode(element), + } + } + } + impl ::core::fmt::Display for Erc20Calls { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + match self { + Self::Allowance(element) => ::core::fmt::Display::fmt(element, f), + Self::Approve(element) => ::core::fmt::Display::fmt(element, f), + Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f), + Self::Decimals(element) => ::core::fmt::Display::fmt(element, f), + Self::DecreaseAllowance(element) => ::core::fmt::Display::fmt(element, f), + Self::IncreaseAllowance(element) => ::core::fmt::Display::fmt(element, f), + Self::Name(element) => ::core::fmt::Display::fmt(element, f), + Self::Symbol(element) => ::core::fmt::Display::fmt(element, f), + Self::TotalSupply(element) => ::core::fmt::Display::fmt(element, f), + Self::Transfer(element) => ::core::fmt::Display::fmt(element, f), + Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f), + } + } + } + impl ::core::convert::From for Erc20Calls { + fn from(value: AllowanceCall) -> Self { + Self::Allowance(value) + } + } + impl ::core::convert::From for Erc20Calls { + fn from(value: ApproveCall) -> Self { + Self::Approve(value) + } + } + impl ::core::convert::From for Erc20Calls { + fn from(value: BalanceOfCall) -> Self { + Self::BalanceOf(value) + } + } + impl ::core::convert::From for Erc20Calls { + fn from(value: DecimalsCall) -> Self { + Self::Decimals(value) + } + } + impl ::core::convert::From for Erc20Calls { + fn from(value: DecreaseAllowanceCall) -> Self { + Self::DecreaseAllowance(value) + } + } + impl ::core::convert::From for Erc20Calls { + fn from(value: IncreaseAllowanceCall) -> Self { + Self::IncreaseAllowance(value) + } + } + impl ::core::convert::From for Erc20Calls { + fn from(value: NameCall) -> Self { + Self::Name(value) + } + } + impl ::core::convert::From for Erc20Calls { + fn from(value: SymbolCall) -> Self { + Self::Symbol(value) + } + } + impl ::core::convert::From for Erc20Calls { + fn from(value: TotalSupplyCall) -> Self { + Self::TotalSupply(value) + } + } + impl ::core::convert::From for Erc20Calls { + fn from(value: TransferCall) -> Self { + Self::Transfer(value) + } + } + impl ::core::convert::From for Erc20Calls { + fn from(value: TransferFromCall) -> Self { + Self::TransferFrom(value) + } + } + ///Container type for all return fields from the `allowance` function with signature + /// `allowance(address,address)` and selector `0xdd62ed3e` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct AllowanceReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `approve` function with signature + /// `approve(address,uint256)` and selector `0x095ea7b3` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct ApproveReturn(pub bool); + ///Container type for all return fields from the `balanceOf` function with signature + /// `balanceOf(address)` and selector `0x70a08231` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct BalanceOfReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `decimals` function with signature + /// `decimals()` and selector `0x313ce567` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct DecimalsReturn(pub u8); + ///Container type for all return fields from the `decreaseAllowance` function with signature + /// `decreaseAllowance(address,uint256)` and selector `0xa457c2d7` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct DecreaseAllowanceReturn(pub bool); + ///Container type for all return fields from the `increaseAllowance` function with signature + /// `increaseAllowance(address,uint256)` and selector `0x39509351` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct IncreaseAllowanceReturn(pub bool); + ///Container type for all return fields from the `name` function with signature `name()` and + /// selector `0x06fdde03` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct NameReturn(pub ::std::string::String); + ///Container type for all return fields from the `symbol` function with signature `symbol()` + /// and selector `0x95d89b41` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct SymbolReturn(pub ::std::string::String); + ///Container type for all return fields from the `totalSupply` function with signature + /// `totalSupply()` and selector `0x18160ddd` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct TotalSupplyReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `transfer` function with signature + /// `transfer(address,uint256)` and selector `0xa9059cbb` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct TransferReturn(pub bool); + ///Container type for all return fields from the `transferFrom` function with signature + /// `transferFrom(address,address,uint256)` and selector `0x23b872dd` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct TransferFromReturn(pub bool); } diff --git a/tesseract/evm/src/abi/ovm_gas_price_oracle.rs b/tesseract/evm/src/abi/ovm_gas_price_oracle.rs index b9947d38f..1c67caa5e 100644 --- a/tesseract/evm/src/abi/ovm_gas_price_oracle.rs +++ b/tesseract/evm/src/abi/ovm_gas_price_oracle.rs @@ -2,1130 +2,1021 @@ pub use ovm_gas_price_oracle::*; /// This module was auto-generated with ethers-rs Abigen. /// More information at: #[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, + clippy::enum_variant_names, + clippy::too_many_arguments, + clippy::upper_case_acronyms, + clippy::type_complexity, + dead_code, + non_camel_case_types )] pub mod ovm_gas_price_oracle { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("DECIMALS"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("DECIMALS"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("baseFee"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("baseFee"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("baseFeeScalar"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("baseFeeScalar"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(32usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint32"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("blobBaseFee"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("blobBaseFee"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("blobBaseFeeScalar"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("blobBaseFeeScalar"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(32usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint32"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("decimals"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("decimals"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Pure, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("gasPrice"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("gasPrice"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getL1Fee"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getL1Fee"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_data"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getL1GasUsed"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getL1GasUsed"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_data"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("isEcotone"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("isEcotone"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("l1BaseFee"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("l1BaseFee"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("overhead"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("overhead"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("scalar"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("scalar"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("setEcotone"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("setEcotone"), - inputs: ::std::vec![], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("version"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("version"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ]), - events: ::std::collections::BTreeMap::new(), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static OVM_GASPRICEORACLE_ABI: ::ethers::contract::Lazy< - ::ethers::core::abi::Abi, - > = ::ethers::contract::Lazy::new(__abi); - pub struct OVM_gasPriceOracle(::ethers::contract::Contract); - impl ::core::clone::Clone for OVM_gasPriceOracle { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for OVM_gasPriceOracle { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for OVM_gasPriceOracle { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for OVM_gasPriceOracle { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(OVM_gasPriceOracle)) - .field(&self.address()) - .finish() - } - } - impl OVM_gasPriceOracle { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - OVM_GASPRICEORACLE_ABI.clone(), - client, - ), - ) - } - ///Calls the contract's `DECIMALS` (0x2e0f2625) function - pub fn DECIMALS( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([46, 15, 38, 37], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `baseFee` (0x6ef25c3a) function - pub fn base_fee( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([110, 242, 92, 58], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `baseFeeScalar` (0xc5985918) function - pub fn base_fee_scalar( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([197, 152, 89, 24], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `blobBaseFee` (0xf8206140) function - pub fn blob_base_fee( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([248, 32, 97, 64], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `blobBaseFeeScalar` (0x68d5dca6) function - pub fn blob_base_fee_scalar( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([104, 213, 220, 166], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `decimals` (0x313ce567) function - pub fn decimals( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([49, 60, 229, 103], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `gasPrice` (0xfe173b97) function - pub fn gas_price( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([254, 23, 59, 151], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getL1Fee` (0x49948e0e) function - pub fn get_l1_fee( - &self, - data: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([73, 148, 142, 14], data) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getL1GasUsed` (0xde26c4a1) function - pub fn get_l1_gas_used( - &self, - data: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([222, 38, 196, 161], data) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `isEcotone` (0x4ef6e224) function - pub fn is_ecotone(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([78, 246, 226, 36], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `l1BaseFee` (0x519b4bd3) function - pub fn l_1_base_fee( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([81, 155, 75, 211], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `overhead` (0x0c18c162) function - pub fn overhead( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([12, 24, 193, 98], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `scalar` (0xf45e65d8) function - pub fn scalar( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([244, 94, 101, 216], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `setEcotone` (0x22b90ab3) function - pub fn set_ecotone(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([34, 185, 10, 179], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `version` (0x54fd4d50) function - pub fn version( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([84, 253, 77, 80], ()) - .expect("method not found (this should never happen)") - } - } - impl From<::ethers::contract::Contract> - for OVM_gasPriceOracle { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - ///Container type for all input parameters for the `DECIMALS` function with signature `DECIMALS()` and selector `0x2e0f2625` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "DECIMALS", abi = "DECIMALS()")] - pub struct DECIMALSCall; - ///Container type for all input parameters for the `baseFee` function with signature `baseFee()` and selector `0x6ef25c3a` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "baseFee", abi = "baseFee()")] - pub struct BaseFeeCall; - ///Container type for all input parameters for the `baseFeeScalar` function with signature `baseFeeScalar()` and selector `0xc5985918` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "baseFeeScalar", abi = "baseFeeScalar()")] - pub struct BaseFeeScalarCall; - ///Container type for all input parameters for the `blobBaseFee` function with signature `blobBaseFee()` and selector `0xf8206140` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "blobBaseFee", abi = "blobBaseFee()")] - pub struct BlobBaseFeeCall; - ///Container type for all input parameters for the `blobBaseFeeScalar` function with signature `blobBaseFeeScalar()` and selector `0x68d5dca6` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "blobBaseFeeScalar", abi = "blobBaseFeeScalar()")] - pub struct BlobBaseFeeScalarCall; - ///Container type for all input parameters for the `decimals` function with signature `decimals()` and selector `0x313ce567` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "decimals", abi = "decimals()")] - pub struct decimalsCall; - ///Container type for all input parameters for the `gasPrice` function with signature `gasPrice()` and selector `0xfe173b97` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "gasPrice", abi = "gasPrice()")] - pub struct GasPriceCall; - ///Container type for all input parameters for the `getL1Fee` function with signature `getL1Fee(bytes)` and selector `0x49948e0e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getL1Fee", abi = "getL1Fee(bytes)")] - pub struct GetL1FeeCall { - pub data: ::ethers::core::types::Bytes, - } - ///Container type for all input parameters for the `getL1GasUsed` function with signature `getL1GasUsed(bytes)` and selector `0xde26c4a1` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getL1GasUsed", abi = "getL1GasUsed(bytes)")] - pub struct GetL1GasUsedCall { - pub data: ::ethers::core::types::Bytes, - } - ///Container type for all input parameters for the `isEcotone` function with signature `isEcotone()` and selector `0x4ef6e224` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "isEcotone", abi = "isEcotone()")] - pub struct IsEcotoneCall; - ///Container type for all input parameters for the `l1BaseFee` function with signature `l1BaseFee()` and selector `0x519b4bd3` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "l1BaseFee", abi = "l1BaseFee()")] - pub struct L1BaseFeeCall; - ///Container type for all input parameters for the `overhead` function with signature `overhead()` and selector `0x0c18c162` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "overhead", abi = "overhead()")] - pub struct OverheadCall; - ///Container type for all input parameters for the `scalar` function with signature `scalar()` and selector `0xf45e65d8` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "scalar", abi = "scalar()")] - pub struct ScalarCall; - ///Container type for all input parameters for the `setEcotone` function with signature `setEcotone()` and selector `0x22b90ab3` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "setEcotone", abi = "setEcotone()")] - pub struct SetEcotoneCall; - ///Container type for all input parameters for the `version` function with signature `version()` and selector `0x54fd4d50` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "version", abi = "version()")] - pub struct VersionCall; - ///Container type for all of the contract's call - #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] - pub enum OVM_gasPriceOracleCalls { - DECIMALS(DECIMALSCall), - BaseFee(BaseFeeCall), - BaseFeeScalar(BaseFeeScalarCall), - BlobBaseFee(BlobBaseFeeCall), - BlobBaseFeeScalar(BlobBaseFeeScalarCall), - decimals(decimalsCall), - GasPrice(GasPriceCall), - GetL1Fee(GetL1FeeCall), - GetL1GasUsed(GetL1GasUsedCall), - IsEcotone(IsEcotoneCall), - L1BaseFee(L1BaseFeeCall), - Overhead(OverheadCall), - Scalar(ScalarCall), - SetEcotone(SetEcotoneCall), - Version(VersionCall), - } - impl ::ethers::core::abi::AbiDecode for OVM_gasPriceOracleCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::DECIMALS(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::BaseFee(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::BaseFeeScalar(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::BlobBaseFee(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::BlobBaseFeeScalar(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::decimals(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GasPrice(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetL1Fee(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetL1GasUsed(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::IsEcotone(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::L1BaseFee(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Overhead(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Scalar(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SetEcotone(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Version(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for OVM_gasPriceOracleCalls { - fn encode(self) -> Vec { - match self { - Self::DECIMALS(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::BaseFee(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::BaseFeeScalar(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::BlobBaseFee(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::BlobBaseFeeScalar(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::decimals(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GasPrice(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetL1Fee(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetL1GasUsed(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::IsEcotone(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::L1BaseFee(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Overhead(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Scalar(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::SetEcotone(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Version(element) => ::ethers::core::abi::AbiEncode::encode(element), - } - } - } - impl ::core::fmt::Display for OVM_gasPriceOracleCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::DECIMALS(element) => ::core::fmt::Display::fmt(element, f), - Self::BaseFee(element) => ::core::fmt::Display::fmt(element, f), - Self::BaseFeeScalar(element) => ::core::fmt::Display::fmt(element, f), - Self::BlobBaseFee(element) => ::core::fmt::Display::fmt(element, f), - Self::BlobBaseFeeScalar(element) => ::core::fmt::Display::fmt(element, f), - Self::decimals(element) => ::core::fmt::Display::fmt(element, f), - Self::GasPrice(element) => ::core::fmt::Display::fmt(element, f), - Self::GetL1Fee(element) => ::core::fmt::Display::fmt(element, f), - Self::GetL1GasUsed(element) => ::core::fmt::Display::fmt(element, f), - Self::IsEcotone(element) => ::core::fmt::Display::fmt(element, f), - Self::L1BaseFee(element) => ::core::fmt::Display::fmt(element, f), - Self::Overhead(element) => ::core::fmt::Display::fmt(element, f), - Self::Scalar(element) => ::core::fmt::Display::fmt(element, f), - Self::SetEcotone(element) => ::core::fmt::Display::fmt(element, f), - Self::Version(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for OVM_gasPriceOracleCalls { - fn from(value: DECIMALSCall) -> Self { - Self::DECIMALS(value) - } - } - impl ::core::convert::From for OVM_gasPriceOracleCalls { - fn from(value: BaseFeeCall) -> Self { - Self::BaseFee(value) - } - } - impl ::core::convert::From for OVM_gasPriceOracleCalls { - fn from(value: BaseFeeScalarCall) -> Self { - Self::BaseFeeScalar(value) - } - } - impl ::core::convert::From for OVM_gasPriceOracleCalls { - fn from(value: BlobBaseFeeCall) -> Self { - Self::BlobBaseFee(value) - } - } - impl ::core::convert::From for OVM_gasPriceOracleCalls { - fn from(value: BlobBaseFeeScalarCall) -> Self { - Self::BlobBaseFeeScalar(value) - } - } - impl ::core::convert::From for OVM_gasPriceOracleCalls { - fn from(value: decimalsCall) -> Self { - Self::decimals(value) - } - } - impl ::core::convert::From for OVM_gasPriceOracleCalls { - fn from(value: GasPriceCall) -> Self { - Self::GasPrice(value) - } - } - impl ::core::convert::From for OVM_gasPriceOracleCalls { - fn from(value: GetL1FeeCall) -> Self { - Self::GetL1Fee(value) - } - } - impl ::core::convert::From for OVM_gasPriceOracleCalls { - fn from(value: GetL1GasUsedCall) -> Self { - Self::GetL1GasUsed(value) - } - } - impl ::core::convert::From for OVM_gasPriceOracleCalls { - fn from(value: IsEcotoneCall) -> Self { - Self::IsEcotone(value) - } - } - impl ::core::convert::From for OVM_gasPriceOracleCalls { - fn from(value: L1BaseFeeCall) -> Self { - Self::L1BaseFee(value) - } - } - impl ::core::convert::From for OVM_gasPriceOracleCalls { - fn from(value: OverheadCall) -> Self { - Self::Overhead(value) - } - } - impl ::core::convert::From for OVM_gasPriceOracleCalls { - fn from(value: ScalarCall) -> Self { - Self::Scalar(value) - } - } - impl ::core::convert::From for OVM_gasPriceOracleCalls { - fn from(value: SetEcotoneCall) -> Self { - Self::SetEcotone(value) - } - } - impl ::core::convert::From for OVM_gasPriceOracleCalls { - fn from(value: VersionCall) -> Self { - Self::Version(value) - } - } - ///Container type for all return fields from the `DECIMALS` function with signature `DECIMALS()` and selector `0x2e0f2625` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct DECIMALSReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `baseFee` function with signature `baseFee()` and selector `0x6ef25c3a` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct BaseFeeReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `baseFeeScalar` function with signature `baseFeeScalar()` and selector `0xc5985918` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct BaseFeeScalarReturn(pub u32); - ///Container type for all return fields from the `blobBaseFee` function with signature `blobBaseFee()` and selector `0xf8206140` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct BlobBaseFeeReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `blobBaseFeeScalar` function with signature `blobBaseFeeScalar()` and selector `0x68d5dca6` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct BlobBaseFeeScalarReturn(pub u32); - ///Container type for all return fields from the `decimals` function with signature `decimals()` and selector `0x313ce567` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct decimalsReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `gasPrice` function with signature `gasPrice()` and selector `0xfe173b97` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GasPriceReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `getL1Fee` function with signature `getL1Fee(bytes)` and selector `0x49948e0e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetL1FeeReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `getL1GasUsed` function with signature `getL1GasUsed(bytes)` and selector `0xde26c4a1` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetL1GasUsedReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `isEcotone` function with signature `isEcotone()` and selector `0x4ef6e224` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct IsEcotoneReturn(pub bool); - ///Container type for all return fields from the `l1BaseFee` function with signature `l1BaseFee()` and selector `0x519b4bd3` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct L1BaseFeeReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `overhead` function with signature `overhead()` and selector `0x0c18c162` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct OverheadReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `scalar` function with signature `scalar()` and selector `0xf45e65d8` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ScalarReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `version` function with signature `version()` and selector `0x54fd4d50` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct VersionReturn(pub ::std::string::String); + #[allow(deprecated)] + fn __abi() -> ::ethers::core::abi::Abi { + ::ethers::core::abi::ethabi::Contract { + constructor: ::core::option::Option::None, + functions: ::core::convert::From::from([ + ( + ::std::borrow::ToOwned::to_owned("DECIMALS"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("DECIMALS"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("baseFee"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("baseFee"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("baseFeeScalar"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("baseFeeScalar"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(32usize), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint32"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("blobBaseFee"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("blobBaseFee"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("blobBaseFeeScalar"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("blobBaseFeeScalar"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(32usize), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint32"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("decimals"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("decimals"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::Pure, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("gasPrice"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("gasPrice"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("getL1Fee"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("getL1Fee"), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_data"), + kind: ::ethers::core::abi::ethabi::ParamType::Bytes, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bytes"), + ), + },], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("getL1GasUsed"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("getL1GasUsed"), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_data"), + kind: ::ethers::core::abi::ethabi::ParamType::Bytes, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bytes"), + ), + },], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("isEcotone"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("isEcotone"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bool"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("l1BaseFee"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("l1BaseFee"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("overhead"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("overhead"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("scalar"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("scalar"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,), + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("uint256"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("setEcotone"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("setEcotone"), + inputs: ::std::vec![], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("version"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("version"), + inputs: ::std::vec![], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::String, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("string"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ]), + events: ::std::collections::BTreeMap::new(), + errors: ::std::collections::BTreeMap::new(), + receive: false, + fallback: false, + } + } + ///The parsed JSON ABI of the contract. + pub static OVM_GASPRICEORACLE_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = + ::ethers::contract::Lazy::new(__abi); + pub struct OVM_gasPriceOracle(::ethers::contract::Contract); + impl ::core::clone::Clone for OVM_gasPriceOracle { + fn clone(&self) -> Self { + Self(::core::clone::Clone::clone(&self.0)) + } + } + impl ::core::ops::Deref for OVM_gasPriceOracle { + type Target = ::ethers::contract::Contract; + fn deref(&self) -> &Self::Target { + &self.0 + } + } + impl ::core::ops::DerefMut for OVM_gasPriceOracle { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } + } + impl ::core::fmt::Debug for OVM_gasPriceOracle { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple(::core::stringify!(OVM_gasPriceOracle)) + .field(&self.address()) + .finish() + } + } + impl OVM_gasPriceOracle { + /// Creates a new contract instance with the specified `ethers` client at + /// `address`. The contract derefs to a `ethers::Contract` object. + pub fn new>( + address: T, + client: ::std::sync::Arc, + ) -> Self { + Self(::ethers::contract::Contract::new( + address.into(), + OVM_GASPRICEORACLE_ABI.clone(), + client, + )) + } + ///Calls the contract's `DECIMALS` (0x2e0f2625) function + pub fn DECIMALS( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([46, 15, 38, 37], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `baseFee` (0x6ef25c3a) function + pub fn base_fee( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([110, 242, 92, 58], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `baseFeeScalar` (0xc5985918) function + pub fn base_fee_scalar(&self) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([197, 152, 89, 24], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `blobBaseFee` (0xf8206140) function + pub fn blob_base_fee( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([248, 32, 97, 64], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `blobBaseFeeScalar` (0x68d5dca6) function + pub fn blob_base_fee_scalar(&self) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([104, 213, 220, 166], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `decimals` (0x313ce567) function + pub fn decimals( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([49, 60, 229, 103], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `gasPrice` (0xfe173b97) function + pub fn gas_price( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([254, 23, 59, 151], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `getL1Fee` (0x49948e0e) function + pub fn get_l1_fee( + &self, + data: ::ethers::core::types::Bytes, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([73, 148, 142, 14], data) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `getL1GasUsed` (0xde26c4a1) function + pub fn get_l1_gas_used( + &self, + data: ::ethers::core::types::Bytes, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([222, 38, 196, 161], data) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `isEcotone` (0x4ef6e224) function + pub fn is_ecotone(&self) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([78, 246, 226, 36], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `l1BaseFee` (0x519b4bd3) function + pub fn l_1_base_fee( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([81, 155, 75, 211], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `overhead` (0x0c18c162) function + pub fn overhead( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([12, 24, 193, 98], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `scalar` (0xf45e65d8) function + pub fn scalar( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([244, 94, 101, 216], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `setEcotone` (0x22b90ab3) function + pub fn set_ecotone(&self) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([34, 185, 10, 179], ()) + .expect("method not found (this should never happen)") + } + ///Calls the contract's `version` (0x54fd4d50) function + pub fn version( + &self, + ) -> ::ethers::contract::builders::ContractCall { + self.0 + .method_hash([84, 253, 77, 80], ()) + .expect("method not found (this should never happen)") + } + } + impl From<::ethers::contract::Contract> + for OVM_gasPriceOracle + { + fn from(contract: ::ethers::contract::Contract) -> Self { + Self::new(contract.address(), contract.client()) + } + } + ///Container type for all input parameters for the `DECIMALS` function with signature + /// `DECIMALS()` and selector `0x2e0f2625` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "DECIMALS", abi = "DECIMALS()")] + pub struct DECIMALSCall; + ///Container type for all input parameters for the `baseFee` function with signature + /// `baseFee()` and selector `0x6ef25c3a` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "baseFee", abi = "baseFee()")] + pub struct BaseFeeCall; + ///Container type for all input parameters for the `baseFeeScalar` function with signature + /// `baseFeeScalar()` and selector `0xc5985918` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "baseFeeScalar", abi = "baseFeeScalar()")] + pub struct BaseFeeScalarCall; + ///Container type for all input parameters for the `blobBaseFee` function with signature + /// `blobBaseFee()` and selector `0xf8206140` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "blobBaseFee", abi = "blobBaseFee()")] + pub struct BlobBaseFeeCall; + ///Container type for all input parameters for the `blobBaseFeeScalar` function with signature + /// `blobBaseFeeScalar()` and selector `0x68d5dca6` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "blobBaseFeeScalar", abi = "blobBaseFeeScalar()")] + pub struct BlobBaseFeeScalarCall; + ///Container type for all input parameters for the `decimals` function with signature + /// `decimals()` and selector `0x313ce567` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "decimals", abi = "decimals()")] + pub struct decimalsCall; + ///Container type for all input parameters for the `gasPrice` function with signature + /// `gasPrice()` and selector `0xfe173b97` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "gasPrice", abi = "gasPrice()")] + pub struct GasPriceCall; + ///Container type for all input parameters for the `getL1Fee` function with signature + /// `getL1Fee(bytes)` and selector `0x49948e0e` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "getL1Fee", abi = "getL1Fee(bytes)")] + pub struct GetL1FeeCall { + pub data: ::ethers::core::types::Bytes, + } + ///Container type for all input parameters for the `getL1GasUsed` function with signature + /// `getL1GasUsed(bytes)` and selector `0xde26c4a1` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "getL1GasUsed", abi = "getL1GasUsed(bytes)")] + pub struct GetL1GasUsedCall { + pub data: ::ethers::core::types::Bytes, + } + ///Container type for all input parameters for the `isEcotone` function with signature + /// `isEcotone()` and selector `0x4ef6e224` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "isEcotone", abi = "isEcotone()")] + pub struct IsEcotoneCall; + ///Container type for all input parameters for the `l1BaseFee` function with signature + /// `l1BaseFee()` and selector `0x519b4bd3` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "l1BaseFee", abi = "l1BaseFee()")] + pub struct L1BaseFeeCall; + ///Container type for all input parameters for the `overhead` function with signature + /// `overhead()` and selector `0x0c18c162` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "overhead", abi = "overhead()")] + pub struct OverheadCall; + ///Container type for all input parameters for the `scalar` function with signature `scalar()` + /// and selector `0xf45e65d8` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "scalar", abi = "scalar()")] + pub struct ScalarCall; + ///Container type for all input parameters for the `setEcotone` function with signature + /// `setEcotone()` and selector `0x22b90ab3` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "setEcotone", abi = "setEcotone()")] + pub struct SetEcotoneCall; + ///Container type for all input parameters for the `version` function with signature + /// `version()` and selector `0x54fd4d50` + #[derive( + Clone, + ::ethers::contract::EthCall, + ::ethers::contract::EthDisplay, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + #[ethcall(name = "version", abi = "version()")] + pub struct VersionCall; + ///Container type for all of the contract's call + #[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)] + pub enum OVM_gasPriceOracleCalls { + DECIMALS(DECIMALSCall), + BaseFee(BaseFeeCall), + BaseFeeScalar(BaseFeeScalarCall), + BlobBaseFee(BlobBaseFeeCall), + BlobBaseFeeScalar(BlobBaseFeeScalarCall), + decimals(decimalsCall), + GasPrice(GasPriceCall), + GetL1Fee(GetL1FeeCall), + GetL1GasUsed(GetL1GasUsedCall), + IsEcotone(IsEcotoneCall), + L1BaseFee(L1BaseFeeCall), + Overhead(OverheadCall), + Scalar(ScalarCall), + SetEcotone(SetEcotoneCall), + Version(VersionCall), + } + impl ::ethers::core::abi::AbiDecode for OVM_gasPriceOracleCalls { + fn decode( + data: impl AsRef<[u8]>, + ) -> ::core::result::Result { + let data = data.as_ref(); + if let Ok(decoded) = ::decode(data) { + return Ok(Self::DECIMALS(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::BaseFee(decoded)); + } + if let Ok(decoded) = ::decode(data) + { + return Ok(Self::BaseFeeScalar(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::BlobBaseFee(decoded)); + } + if let Ok(decoded) = + ::decode(data) + { + return Ok(Self::BlobBaseFeeScalar(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::decimals(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::GasPrice(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::GetL1Fee(decoded)); + } + if let Ok(decoded) = ::decode(data) + { + return Ok(Self::GetL1GasUsed(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::IsEcotone(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::L1BaseFee(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Overhead(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Scalar(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::SetEcotone(decoded)); + } + if let Ok(decoded) = ::decode(data) { + return Ok(Self::Version(decoded)); + } + Err(::ethers::core::abi::Error::InvalidData.into()) + } + } + impl ::ethers::core::abi::AbiEncode for OVM_gasPriceOracleCalls { + fn encode(self) -> Vec { + match self { + Self::DECIMALS(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::BaseFee(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::BaseFeeScalar(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::BlobBaseFee(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::BlobBaseFeeScalar(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::decimals(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::GasPrice(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::GetL1Fee(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::GetL1GasUsed(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::IsEcotone(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::L1BaseFee(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::Overhead(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::Scalar(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::SetEcotone(element) => ::ethers::core::abi::AbiEncode::encode(element), + Self::Version(element) => ::ethers::core::abi::AbiEncode::encode(element), + } + } + } + impl ::core::fmt::Display for OVM_gasPriceOracleCalls { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + match self { + Self::DECIMALS(element) => ::core::fmt::Display::fmt(element, f), + Self::BaseFee(element) => ::core::fmt::Display::fmt(element, f), + Self::BaseFeeScalar(element) => ::core::fmt::Display::fmt(element, f), + Self::BlobBaseFee(element) => ::core::fmt::Display::fmt(element, f), + Self::BlobBaseFeeScalar(element) => ::core::fmt::Display::fmt(element, f), + Self::decimals(element) => ::core::fmt::Display::fmt(element, f), + Self::GasPrice(element) => ::core::fmt::Display::fmt(element, f), + Self::GetL1Fee(element) => ::core::fmt::Display::fmt(element, f), + Self::GetL1GasUsed(element) => ::core::fmt::Display::fmt(element, f), + Self::IsEcotone(element) => ::core::fmt::Display::fmt(element, f), + Self::L1BaseFee(element) => ::core::fmt::Display::fmt(element, f), + Self::Overhead(element) => ::core::fmt::Display::fmt(element, f), + Self::Scalar(element) => ::core::fmt::Display::fmt(element, f), + Self::SetEcotone(element) => ::core::fmt::Display::fmt(element, f), + Self::Version(element) => ::core::fmt::Display::fmt(element, f), + } + } + } + impl ::core::convert::From for OVM_gasPriceOracleCalls { + fn from(value: DECIMALSCall) -> Self { + Self::DECIMALS(value) + } + } + impl ::core::convert::From for OVM_gasPriceOracleCalls { + fn from(value: BaseFeeCall) -> Self { + Self::BaseFee(value) + } + } + impl ::core::convert::From for OVM_gasPriceOracleCalls { + fn from(value: BaseFeeScalarCall) -> Self { + Self::BaseFeeScalar(value) + } + } + impl ::core::convert::From for OVM_gasPriceOracleCalls { + fn from(value: BlobBaseFeeCall) -> Self { + Self::BlobBaseFee(value) + } + } + impl ::core::convert::From for OVM_gasPriceOracleCalls { + fn from(value: BlobBaseFeeScalarCall) -> Self { + Self::BlobBaseFeeScalar(value) + } + } + impl ::core::convert::From for OVM_gasPriceOracleCalls { + fn from(value: decimalsCall) -> Self { + Self::decimals(value) + } + } + impl ::core::convert::From for OVM_gasPriceOracleCalls { + fn from(value: GasPriceCall) -> Self { + Self::GasPrice(value) + } + } + impl ::core::convert::From for OVM_gasPriceOracleCalls { + fn from(value: GetL1FeeCall) -> Self { + Self::GetL1Fee(value) + } + } + impl ::core::convert::From for OVM_gasPriceOracleCalls { + fn from(value: GetL1GasUsedCall) -> Self { + Self::GetL1GasUsed(value) + } + } + impl ::core::convert::From for OVM_gasPriceOracleCalls { + fn from(value: IsEcotoneCall) -> Self { + Self::IsEcotone(value) + } + } + impl ::core::convert::From for OVM_gasPriceOracleCalls { + fn from(value: L1BaseFeeCall) -> Self { + Self::L1BaseFee(value) + } + } + impl ::core::convert::From for OVM_gasPriceOracleCalls { + fn from(value: OverheadCall) -> Self { + Self::Overhead(value) + } + } + impl ::core::convert::From for OVM_gasPriceOracleCalls { + fn from(value: ScalarCall) -> Self { + Self::Scalar(value) + } + } + impl ::core::convert::From for OVM_gasPriceOracleCalls { + fn from(value: SetEcotoneCall) -> Self { + Self::SetEcotone(value) + } + } + impl ::core::convert::From for OVM_gasPriceOracleCalls { + fn from(value: VersionCall) -> Self { + Self::Version(value) + } + } + ///Container type for all return fields from the `DECIMALS` function with signature + /// `DECIMALS()` and selector `0x2e0f2625` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct DECIMALSReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `baseFee` function with signature `baseFee()` + /// and selector `0x6ef25c3a` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct BaseFeeReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `baseFeeScalar` function with signature + /// `baseFeeScalar()` and selector `0xc5985918` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct BaseFeeScalarReturn(pub u32); + ///Container type for all return fields from the `blobBaseFee` function with signature + /// `blobBaseFee()` and selector `0xf8206140` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct BlobBaseFeeReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `blobBaseFeeScalar` function with signature + /// `blobBaseFeeScalar()` and selector `0x68d5dca6` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct BlobBaseFeeScalarReturn(pub u32); + ///Container type for all return fields from the `decimals` function with signature + /// `decimals()` and selector `0x313ce567` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct decimalsReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `gasPrice` function with signature + /// `gasPrice()` and selector `0xfe173b97` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GasPriceReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `getL1Fee` function with signature + /// `getL1Fee(bytes)` and selector `0x49948e0e` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetL1FeeReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `getL1GasUsed` function with signature + /// `getL1GasUsed(bytes)` and selector `0xde26c4a1` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct GetL1GasUsedReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `isEcotone` function with signature + /// `isEcotone()` and selector `0x4ef6e224` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct IsEcotoneReturn(pub bool); + ///Container type for all return fields from the `l1BaseFee` function with signature + /// `l1BaseFee()` and selector `0x519b4bd3` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct L1BaseFeeReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `overhead` function with signature + /// `overhead()` and selector `0x0c18c162` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct OverheadReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `scalar` function with signature `scalar()` + /// and selector `0xf45e65d8` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct ScalarReturn(pub ::ethers::core::types::U256); + ///Container type for all return fields from the `version` function with signature `version()` + /// and selector `0x54fd4d50` + #[derive( + Clone, + ::ethers::contract::EthAbiType, + ::ethers::contract::EthAbiCodec, + Default, + Debug, + PartialEq, + Eq, + Hash, + )] + pub struct VersionReturn(pub ::std::string::String); } diff --git a/tesseract/evm/src/byzantine.rs b/tesseract/evm/src/byzantine.rs index fc4f00ed0..65860901b 100644 --- a/tesseract/evm/src/byzantine.rs +++ b/tesseract/evm/src/byzantine.rs @@ -35,7 +35,7 @@ impl ByzantineHandler for EvmClient { counterparty.state_machine_id().state_id ); counterparty.veto_state_commitment(height).await?; - return Ok(()) + return Ok(()); }; let state_machine_commitment = counterparty.query_state_machine_commitment(height).await?; diff --git a/tesseract/substrate/src/byzantine.rs b/tesseract/substrate/src/byzantine.rs index 3d5d40e06..779b08215 100644 --- a/tesseract/substrate/src/byzantine.rs +++ b/tesseract/substrate/src/byzantine.rs @@ -60,7 +60,7 @@ where ); counterparty.veto_state_commitment(height).await?; - return Ok(()) + return Ok(()); }; let header = self .client