From 2cc7642608952d5133897f58ce90b334880687ce Mon Sep 17 00:00:00 2001 From: MrishoLukamba Date: Fri, 2 Aug 2024 03:21:37 +0300 Subject: [PATCH 1/3] initial work --- Cargo.lock | 2 + modules/trees/mmr/pallet/Cargo.toml | 4 + modules/trees/mmr/pallet/src/lib.rs | 53 + modules/trees/mmr/primitives/src/lib.rs | 10 +- parachain/simtests/src/pallet_mmr.rs | 2 + tesseract/evm/src/abi/arb_gas_info.rs | 3205 +++++++++-------- tesseract/evm/src/abi/erc_20.rs | 2228 ++++++------ tesseract/evm/src/abi/ovm_gas_price_oracle.rs | 2139 +++++------ 8 files changed, 4057 insertions(+), 3586 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ed0b5803..0c5f2fb2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11333,9 +11333,11 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "ismp", "itertools 0.10.5", "log", "mmr-primitives", + "pallet-ismp", "parity-scale-codec", "scale-info", "serde", diff --git a/modules/trees/mmr/pallet/Cargo.toml b/modules/trees/mmr/pallet/Cargo.toml index 016a3d0b..a2c97fe5 100644 --- a/modules/trees/mmr/pallet/Cargo.toml +++ b/modules/trees/mmr/pallet/Cargo.toml @@ -27,6 +27,9 @@ mmr-primitives = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } merkle-mountain-range = { workspace = true } +itertools = { version = "0.10.3", default-features = false } +pallet-ismp = { workspace = true } +ismp = { workspace = true } [dev-dependencies] array-bytes = "6.1" @@ -50,6 +53,7 @@ std = [ "sp-std/std", "merkle-mountain-range/std", "serde/default", + "itertools/use_std" ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", diff --git a/modules/trees/mmr/pallet/src/lib.rs b/modules/trees/mmr/pallet/src/lib.rs index b4edeae6..5aa98248 100644 --- a/modules/trees/mmr/pallet/src/lib.rs +++ b/modules/trees/mmr/pallet/src/lib.rs @@ -58,7 +58,9 @@ use core::marker::PhantomData; use frame_system::pallet_prelude::{BlockNumberFor, HeaderFor}; +use itertools::Itertools; use log; +use merkle_mountain_range::helper::pos_height_in_tree; use merkle_mountain_range::MMRStore; use sp_core::H256; @@ -71,6 +73,8 @@ use sp_mmr_primitives::mmr_lib::leaf_index_to_pos; pub use sp_mmr_primitives::{ self as primitives, utils::NodesUtils, Error, LeafDataProvider, LeafIndex, NodeIndex, }; +use sp_mmr_primitives::INDEXING_PREFIX; +use ismp::router::Request; pub use mmr::storage::{OffchainStorage, Storage}; @@ -127,6 +131,9 @@ pub mod pallet { /// A type that returns a hash unique to every block as a fork identifer for offchain keys type ForkIdentifierProvider: ForkIdentifier; + + /// Leaves count to prune + const LEAF_COUNT_THRESHOLD: u64; } /// Latest MMR Root hash. @@ -171,6 +178,10 @@ pub mod pallet { Default::default() } + fn on_idle(_n: BlockNumberFor, _remaining_weight: Weight) -> Weight { + Pallet::::prune_mmr_leaves().unwrap(); // It should not do this + Default::default() + } } } @@ -264,6 +275,48 @@ where }) .map_err(|_| Error::LeafNotFound) } + + // fetch the peaks and under each peak see if latest leaves (i.e right most leaf (leafIndex) is still valid, + // meaning has not timedout or processed. if its invalid then prune all leaves and inner under the peak. + fn prune_mmr_leaves() -> Result<(), Error> { + + if Self::leaf_count() < T::LEAF_COUNT_THRESHOLD { + Ok(())? + } + + let peaks_indexs = Nodes::::iter().sorted_by_key(|(k,_)| *k).map(|(k,_v)| k).collect::>(); + Ok(for peak_index in peaks_indexs.iter() { + // get the last leaf under the peak + let last_leaf_index = *peak_index - pos_height_in_tree(*peak_index) as u64; + if let Some(leaf_type) = Self::get_leaf(last_leaf_index)? { + match leaf_type { + // check if timeout or claimed + pallet_ismp::mmr::Leaf::Response(response) => { + match response { + ismp::router::Response::Post(post_response) => { + let time_out = post_response.timeout_timestamp; + + } + ismp::router::Response::Get(get_response) => { + + } + } + }, + pallet_ismp::mmr::Leaf::Request(request) => { + match request { + Request::Post(post_request) => { + + } + Request::Get(get_request) => { + + } + } + }, + _ => unreachable!() + } + } + Ok(()) + }) } /// Stateless MMR proof verification for batch of leaves. diff --git a/modules/trees/mmr/primitives/src/lib.rs b/modules/trees/mmr/primitives/src/lib.rs index 9056e372..99fe0b9e 100644 --- a/modules/trees/mmr/primitives/src/lib.rs +++ b/modules/trees/mmr/primitives/src/lib.rs @@ -7,7 +7,7 @@ use core::marker::PhantomData; use merkle_mountain_range::helper::{get_peaks, parent_offset, pos_height_in_tree, sibling_offset}; use sp_core::H256; use sp_mmr_primitives as primitives; -use sp_mmr_primitives::NodeIndex; +use sp_mmr_primitives::{Error, NodeIndex}; use sp_runtime::{scale_info, traits, RuntimeDebug}; use sp_std::fmt; @@ -63,6 +63,10 @@ pub trait MerkleMountainRangeTree { /// Given the leaf position, it should return the leaf from the mmr store fn get_leaf(pos: NodeIndex) -> Result, primitives::Error>; + + /// Prune the leaves of the mmr stored offchain/onchain based on specific implementation while + /// maintaining MMR integrity (i.e leaving the peaks of the pruned leaves) + fn prune_mmr_leaves() -> Result<(),primitives::Error>; } /// NoOp tree can be used as a drop in replacement for when the underlying mmr tree is unneeded. @@ -105,6 +109,10 @@ impl MerkleMountainRangeTree for NoO fn get_leaf(_pos: NodeIndex) -> Result, primitives::Error> { Ok(None) } + + fn prune_mmr_leaves() -> Result<(), Error> { + Ok(()) + } } /// A full leaf content stored in the offchain-db. diff --git a/parachain/simtests/src/pallet_mmr.rs b/parachain/simtests/src/pallet_mmr.rs index c948f3f4..501bc8a0 100644 --- a/parachain/simtests/src/pallet_mmr.rs +++ b/parachain/simtests/src/pallet_mmr.rs @@ -447,3 +447,5 @@ async fn dispatch_requests() -> Result<(), anyhow::Error> { assert!(res); Ok(()) } + + diff --git a/tesseract/evm/src/abi/arb_gas_info.rs b/tesseract/evm/src/abi/arb_gas_info.rs index b9b7b0a9..2956c700 100644 --- a/tesseract/evm/src/abi/arb_gas_info.rs +++ b/tesseract/evm/src/abi/arb_gas_info.rs @@ -2,1512 +2,1705 @@ 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 { - 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< + 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); } diff --git a/tesseract/evm/src/abi/erc_20.rs b/tesseract/evm/src/abi/erc_20.rs index d8fe1fd9..9de3f9b9 100644 --- a/tesseract/evm/src/abi/erc_20.rs +++ b/tesseract/evm/src/abi/erc_20.rs @@ -2,1071 +2,1171 @@ 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 1c67caa5..b9947d38 100644 --- a/tesseract/evm/src/abi/ovm_gas_price_oracle.rs +++ b/tesseract/evm/src/abi/ovm_gas_price_oracle.rs @@ -2,1021 +2,1130 @@ 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); } From 3e0b3aa5c7bf34de68c51ad5aee737343a86d9ea Mon Sep 17 00:00:00 2001 From: MrishoLukamba Date: Fri, 2 Aug 2024 17:30:53 +0300 Subject: [PATCH 2/3] prune on the earliest peak --- evm/abi/src/generated/evm_host.rs | 15 +- evm/abi/src/generated/ping_module.rs | 6 +- .../beefy/prover/src/runtime/paseo.rs | 21 +- modules/trees/mmr/pallet/src/lib.rs | 122 +- modules/trees/mmr/primitives/src/lib.rs | 2 +- modules/utils/subxt/src/gargantua.rs | 9 +- parachain/runtimes/gargantua/src/lib.rs | 1 + parachain/runtimes/messier/src/lib.rs | 1 + parachain/runtimes/nexus/src/lib.rs | 1 + parachain/simtests/src/pallet_mmr.rs | 2 - tesseract/evm/src/abi/arb_gas_info.rs | 3205 ++++++++--------- tesseract/evm/src/abi/erc_20.rs | 2228 ++++++------ tesseract/evm/src/abi/ovm_gas_price_oracle.rs | 2139 ++++++----- 13 files changed, 3685 insertions(+), 4067 deletions(-) diff --git a/evm/abi/src/generated/evm_host.rs b/evm/abi/src/generated/evm_host.rs index bd22b998..d2d9e723 100644 --- a/evm/abi/src/generated/evm_host.rs +++ b/evm/abi/src/generated/evm_host.rs @@ -2712,8 +2712,7 @@ pub mod evm_host { ///Gets the contract's `GetRequestHandled` event pub fn get_request_handled_filter( &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, GetRequestHandledFilter> - { + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, GetRequestHandledFilter> { self.0.event() } ///Gets the contract's `GetRequestTimeoutHandled` event @@ -2735,8 +2734,7 @@ pub mod evm_host { ///Gets the contract's `HostParamsUpdated` event pub fn host_params_updated_filter( &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, HostParamsUpdatedFilter> - { + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, HostParamsUpdatedFilter> { self.0.event() } ///Gets the contract's `HostWithdrawal` event @@ -2754,8 +2752,7 @@ pub mod evm_host { ///Gets the contract's `PostRequestHandled` event pub fn post_request_handled_filter( &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, PostRequestHandledFilter> - { + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, PostRequestHandledFilter> { self.0.event() } ///Gets the contract's `PostRequestTimeoutHandled` event @@ -2771,15 +2768,13 @@ pub mod evm_host { ///Gets the contract's `PostResponseEvent` event pub fn post_response_event_filter( &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, PostResponseEventFilter> - { + ) -> ::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> - { + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, PostResponseFundedFilter> { self.0.event() } ///Gets the contract's `PostResponseHandled` event diff --git a/evm/abi/src/generated/ping_module.rs b/evm/abi/src/generated/ping_module.rs index 03496c83..5fcdb7c7 100644 --- a/evm/abi/src/generated/ping_module.rs +++ b/evm/abi/src/generated/ping_module.rs @@ -699,15 +699,13 @@ pub mod ping_module { ///Gets the contract's `GetTimeoutReceived` event pub fn get_timeout_received_filter( &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, GetTimeoutReceivedFilter> - { + ) -> ::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> - { + ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, MessageDispatchedFilter> { self.0.event() } ///Gets the contract's `PostReceived` event diff --git a/modules/consensus/beefy/prover/src/runtime/paseo.rs b/modules/consensus/beefy/prover/src/runtime/paseo.rs index 41a1d8dd..6f66b655 100644 --- a/modules/consensus/beefy/prover/src/runtime/paseo.rs +++ b/modules/consensus/beefy/prover/src/runtime/paseo.rs @@ -526,8 +526,7 @@ pub mod api { pub fn pending_rewards( &self, who: ::subxt::utils::AccountId32, - ) -> ::subxt::runtime_api::Payload - { + ) -> ::subxt::runtime_api::Payload { ::subxt::runtime_api::Payload::new_static( "NominationPoolsApi", "pending_rewards", @@ -2247,8 +2246,7 @@ pub mod api { #[doc = " Get current GRANDPA authority set id."] pub fn current_set_id( &self, - ) -> ::subxt::runtime_api::Payload - { + ) -> ::subxt::runtime_api::Payload { ::subxt::runtime_api::Payload::new_static( "GrandpaApi", "current_set_id", @@ -2685,8 +2683,7 @@ pub mod api { pub fn account_nonce( &self, account: ::subxt::utils::AccountId32, - ) -> ::subxt::runtime_api::Payload - { + ) -> ::subxt::runtime_api::Payload { ::subxt::runtime_api::Payload::new_static( "AccountNonceApi", "account_nonce", @@ -4398,8 +4395,7 @@ pub mod api { #[doc = " The maximum length of a block (in bytes)."] pub fn block_length( &self, - ) -> ::subxt::constants::Address - { + ) -> ::subxt::constants::Address { ::subxt::constants::Address::new_static( "System", "BlockLength", @@ -12689,8 +12685,7 @@ pub mod api { #[doc = " Maximum amount of funds that should be placed in a deposit for making a proposal."] pub fn proposal_bond_maximum( &self, - ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> - { + ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> { ::subxt::constants::Address::new_static( "Treasury", "ProposalBondMaximum", @@ -18654,8 +18649,7 @@ pub mod api { #[doc = " Maximum amount of funds that should be placed in a deposit for making a proposal."] pub fn curator_deposit_max( &self, - ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> - { + ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> { ::subxt::constants::Address::new_static( "Bounties", "CuratorDepositMax", @@ -18670,8 +18664,7 @@ pub mod api { #[doc = " Minimum amount of funds that should be placed in a deposit for making a proposal."] pub fn curator_deposit_min( &self, - ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> - { + ) -> ::subxt::constants::Address<::core::option::Option<::core::primitive::u128>> { ::subxt::constants::Address::new_static( "Bounties", "CuratorDepositMin", diff --git a/modules/trees/mmr/pallet/src/lib.rs b/modules/trees/mmr/pallet/src/lib.rs index 5aa98248..4b08476d 100644 --- a/modules/trees/mmr/pallet/src/lib.rs +++ b/modules/trees/mmr/pallet/src/lib.rs @@ -56,27 +56,32 @@ //! NOTE This pallet is experimental and not proven to work in production. #![cfg_attr(not(feature = "std"), no_std)] +use codec::Decode; use core::marker::PhantomData; use frame_system::pallet_prelude::{BlockNumberFor, HeaderFor}; use itertools::Itertools; use log; -use merkle_mountain_range::helper::pos_height_in_tree; -use merkle_mountain_range::MMRStore; +use log::trace; +use merkle_mountain_range::{helper::pos_height_in_tree, MMRStore}; use sp_core::H256; +use sp_core::offchain::StorageKind; use sp_runtime::traits::{self, One}; use sp_std::prelude::*; -use mmr_primitives::{DataOrHash, LeafMetadata, MerkleMountainRangeTree}; +use ismp::{ + messaging::{hash_request, Keccak256}, + router::Request, +}; +use mmr_primitives::{DataOrHash, FullLeaf, LeafMetadata, MerkleMountainRangeTree}; pub use pallet::*; -use sp_mmr_primitives::mmr_lib::leaf_index_to_pos; pub use sp_mmr_primitives::{ self as primitives, utils::NodesUtils, Error, LeafDataProvider, LeafIndex, NodeIndex, }; -use sp_mmr_primitives::INDEXING_PREFIX; -use ismp::router::Request; +use sp_mmr_primitives::mmr_lib::leaf_index_to_pos; pub use mmr::storage::{OffchainStorage, Storage}; +use pallet_ismp::NoOpMmrTree; pub mod mmr; @@ -103,7 +108,7 @@ pub mod pallet { /// This pallet's configuration trait #[pallet::config] - pub trait Config: frame_system::Config { + pub trait Config: frame_system::Config + pallet_ismp::Config { /// Prefix for elements stored in the Off-chain DB via Indexing API. /// /// Each node of the MMR is inserted both on-chain and off-chain via Indexing API. @@ -170,7 +175,10 @@ pub mod pallet { // Set the initial height at which leaves were pushed to the offchain db for the offchain // mmr gadget. Since this is in on_initialize, then the leaves were set in a previous block. #[pallet::hooks] - impl, I: 'static> Hooks> for Pallet { + impl, I: 'static> Hooks> for Pallet + where + HashOf: Into, + { fn on_initialize(_n: BlockNumberFor) -> Weight { if NumberOfLeaves::::get() > 0 && InitialHeight::::get().is_none() { InitialHeight::::put(frame_system::Pallet::::block_number() - One::one()) @@ -179,7 +187,7 @@ pub mod pallet { Default::default() } fn on_idle(_n: BlockNumberFor, _remaining_weight: Weight) -> Weight { - Pallet::::prune_mmr_leaves().unwrap(); // It should not do this + Self::prune_mmr_leaves().unwrap(); // It should not panic Default::default() } } @@ -276,49 +284,76 @@ where .map_err(|_| Error::LeafNotFound) } - // fetch the peaks and under each peak see if latest leaves (i.e right most leaf (leafIndex) is still valid, - // meaning has not timedout or processed. if its invalid then prune all leaves and inner under the peak. + // fetch the peaks and under each peak see if latest leaves (i.e right most leaf (leafIndex) is + // still valid, meaning has not timedout or processed. if its invalid then prune all leaves and + // inner under the peak. for now only prune the earliest peak fn prune_mmr_leaves() -> Result<(), Error> { - if Self::leaf_count() < T::LEAF_COUNT_THRESHOLD { - Ok(())? + Ok(())? } - let peaks_indexs = Nodes::::iter().sorted_by_key(|(k,_)| *k).map(|(k,_v)| k).collect::>(); - Ok(for peak_index in peaks_indexs.iter() { - // get the last leaf under the peak - let last_leaf_index = *peak_index - pos_height_in_tree(*peak_index) as u64; - if let Some(leaf_type) = Self::get_leaf(last_leaf_index)? { - match leaf_type { - // check if timeout or claimed - pallet_ismp::mmr::Leaf::Response(response) => { - match response { - ismp::router::Response::Post(post_response) => { - let time_out = post_response.timeout_timestamp; - - } - ismp::router::Response::Get(get_response) => { - - } + let peaks_indexs = Nodes::::iter() + .sorted_by_key(|(k, _)| *k) + .map(|(k, _v)| k) + .collect::>(); + // if there is only 1 peak meaning the tree has no of leaves 2^n we are pruning inner nodes + // i.e the left most inner node on the (h-1) layer, where h = height of the tree + // if there is more than 1 peak, then prune all the nodes on the first peak + if peaks_indexs.len() == 1 { + todo!() + } else { + if let Some(peak_index) = peaks_indexs.iter().next() { + // get the last leaf under the peak and check + let last_leaf_index = *peak_index - pos_height_in_tree(*peak_index) as u64; + if let Some(leaf_type) = Self::get_leaf(last_leaf_index)? { + let last_leaf_to_delete = { + let encoded_inner_leaf = leaf_type.preimage(); + let leaf_request: ismp::router::Request = + Decode::decode(&mut &encoded_inner_leaf[..]) + .map_err(|_| Error::LeafNotFound)?; + + let claimed = + pallet_ismp::child_trie::RequestCommitments::::get(hash_request::< + pallet_ismp::Pallet, + >(&leaf_request)) + .ok_or(Error::LeafNotFound)? + .claimed; + + match leaf_request { + Request::Post(post) => { + // check if it has timedout and if fees has been claimed by this + // request + let _timeout = post.timeout_timestamp; + claimed + }, + Request::Get(ref get) => { + // check if it has timedout and if fees has been claimed by this + // request + let _timeout = get.timeout_timestamp; + claimed + }, } - }, - pallet_ismp::mmr::Leaf::Request(request) => { - match request { - Request::Post(post_request) => { - - } - Request::Get(get_request) => { - - } + }; + + // if we can delete the last leaf we can delete all nodes under the peak + if last_leaf_to_delete { + for node_index in 0..*peak_index { + let leaf = Self::get_leaf(node_index)?.ok_or(Error::LeafNotFound)?; + let commitment = pallet_ismp::Pallet::::keccak256(&leaf.preimage()[..]); + // delete the node + let offchain_key = NoOpMmrTree::::offchain_key(commitment); + sp_io::offchain::local_storage_clear(StorageKind::PERSISTENT, &offchain_key) } - }, - _ => unreachable!() + }else{ + trace!(target: "mmr:pruning","No nodes to prune") + } } } - Ok(()) - }) -} + } + Ok(()) + } +} /// Stateless MMR proof verification for batch of leaves. /// /// This function can be used to verify received MMR [primitives::Proof] (`proof`) @@ -414,3 +449,4 @@ impl, I: 'static> Pallet { } } } + diff --git a/modules/trees/mmr/primitives/src/lib.rs b/modules/trees/mmr/primitives/src/lib.rs index 99fe0b9e..59d33a25 100644 --- a/modules/trees/mmr/primitives/src/lib.rs +++ b/modules/trees/mmr/primitives/src/lib.rs @@ -66,7 +66,7 @@ pub trait MerkleMountainRangeTree { /// Prune the leaves of the mmr stored offchain/onchain based on specific implementation while /// maintaining MMR integrity (i.e leaving the peaks of the pruned leaves) - fn prune_mmr_leaves() -> Result<(),primitives::Error>; + fn prune_mmr_leaves() -> Result<(), primitives::Error>; } /// NoOp tree can be used as a drop in replacement for when the underlying mmr tree is unneeded. diff --git a/modules/utils/subxt/src/gargantua.rs b/modules/utils/subxt/src/gargantua.rs index 9eaf13fb..e97cbb7b 100644 --- a/modules/utils/subxt/src/gargantua.rs +++ b/modules/utils/subxt/src/gargantua.rs @@ -245,8 +245,7 @@ pub mod api { &self, included_hash: ::subxt::utils::H256, slot: runtime_types::sp_consensus_slots::Slot, - ) -> ::subxt::runtime_api::Payload - { + ) -> ::subxt::runtime_api::Payload { ::subxt::runtime_api::Payload::new_static( "AuraUnincludedSegmentApi", "can_build_upon", @@ -854,8 +853,7 @@ pub mod api { pub fn account_nonce( &self, account: ::subxt::utils::AccountId32, - ) -> ::subxt::runtime_api::Payload - { + ) -> ::subxt::runtime_api::Payload { ::subxt::runtime_api::Payload::new_static( "AccountNonceApi", "account_nonce", @@ -3253,8 +3251,7 @@ pub mod api { #[doc = " The maximum length of a block (in bytes)."] pub fn block_length( &self, - ) -> ::subxt::constants::Address - { + ) -> ::subxt::constants::Address { ::subxt::constants::Address::new_static( "System", "BlockLength", diff --git a/parachain/runtimes/gargantua/src/lib.rs b/parachain/runtimes/gargantua/src/lib.rs index 59bd4aa2..c520a3c8 100644 --- a/parachain/runtimes/gargantua/src/lib.rs +++ b/parachain/runtimes/gargantua/src/lib.rs @@ -541,6 +541,7 @@ impl pallet_mmr::Config for Runtime { type Hashing = Keccak256; type Leaf = Leaf; type ForkIdentifierProvider = Ismp; + const LEAF_COUNT_THRESHOLD: u64 = 100_000; } impl pallet_utility::Config for Runtime { diff --git a/parachain/runtimes/messier/src/lib.rs b/parachain/runtimes/messier/src/lib.rs index 507e56c2..a784f043 100644 --- a/parachain/runtimes/messier/src/lib.rs +++ b/parachain/runtimes/messier/src/lib.rs @@ -553,6 +553,7 @@ impl pallet_mmr::Config for Runtime { type Hashing = Keccak256; type Leaf = Leaf; type ForkIdentifierProvider = Ismp; + const LEAF_COUNT_THRESHOLD: u64 = 100_000; } // Create the runtime by composing the FRAME pallets that were previously configured. diff --git a/parachain/runtimes/nexus/src/lib.rs b/parachain/runtimes/nexus/src/lib.rs index 4c520883..63644399 100644 --- a/parachain/runtimes/nexus/src/lib.rs +++ b/parachain/runtimes/nexus/src/lib.rs @@ -561,6 +561,7 @@ impl pallet_mmr::Config for Runtime { type Hashing = Keccak256; type Leaf = Leaf; type ForkIdentifierProvider = Ismp; + const LEAF_COUNT_THRESHOLD: u64 = 100_000; } // Create the runtime by composing the FRAME pallets that were previously configured. diff --git a/parachain/simtests/src/pallet_mmr.rs b/parachain/simtests/src/pallet_mmr.rs index 501bc8a0..c948f3f4 100644 --- a/parachain/simtests/src/pallet_mmr.rs +++ b/parachain/simtests/src/pallet_mmr.rs @@ -447,5 +447,3 @@ async fn dispatch_requests() -> Result<(), anyhow::Error> { assert!(res); Ok(()) } - - diff --git a/tesseract/evm/src/abi/arb_gas_info.rs b/tesseract/evm/src/abi/arb_gas_info.rs index 2956c700..b9b7b0a9 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 9de3f9b9..d8fe1fd9 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 b9947d38..1c67caa5 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); } From 2a95df9b40a1a4ffd3300dcc41ab381cc512e9c0 Mon Sep 17 00:00:00 2001 From: MrishoLukamba Date: Fri, 2 Aug 2024 18:24:37 +0300 Subject: [PATCH 3/3] prune on the earliest peak --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6343092..3c66d7d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ on: push: branches: - main - pull_request_target: + pull_request: types: [opened, synchronize] # pull_request: # branches: