pub use gaussian::*;
#[allow(
clippy::enum_variant_names,
clippy::too_many_arguments,
clippy::upper_case_acronyms,
clippy::type_complexity,
dead_code,
non_camel_case_types,
)]
pub mod gaussian {
#[allow(deprecated)]
fn __abi() -> ::ethers::core::abi::Abi {
::ethers::core::abi::ethabi::Contract {
constructor: ::core::option::Option::None,
functions: ::std::collections::BTreeMap::new(),
events: ::std::collections::BTreeMap::new(),
errors: ::core::convert::From::from([
(
::std::borrow::ToOwned::to_owned("Infinity"),
::std::vec![
::ethers::core::abi::ethabi::AbiError {
name: ::std::borrow::ToOwned::to_owned("Infinity"),
inputs: ::std::vec![],
},
],
),
(
::std::borrow::ToOwned::to_owned("NegativeInfinity"),
::std::vec![
::ethers::core::abi::ethabi::AbiError {
name: ::std::borrow::ToOwned::to_owned("NegativeInfinity"),
inputs: ::std::vec![],
},
],
),
(
::std::borrow::ToOwned::to_owned("OutOfBounds"),
::std::vec![
::ethers::core::abi::ethabi::AbiError {
name: ::std::borrow::ToOwned::to_owned("OutOfBounds"),
inputs: ::std::vec![],
},
],
),
(
::std::borrow::ToOwned::to_owned("Overflow"),
::std::vec![
::ethers::core::abi::ethabi::AbiError {
name: ::std::borrow::ToOwned::to_owned("Overflow"),
inputs: ::std::vec![],
},
],
),
]),
receive: false,
fallback: false,
}
}
pub static GAUSSIAN_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new(
__abi,
);
#[rustfmt::skip]
const __BYTECODE: &[u8] = b"`|`7`\x0B\x82\x82\x829\x80Q`\0\x1A`s\x14`*WcNH{q`\xE0\x1B`\0R`\0`\x04R`$`\0\xFD[0`\0R`s\x81S\x82\x81\xF3\xFEs\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\x80`@\x81\x90RbF\x1B\xCD`\xE5\x1B\x81R` `\x84\x90\x81R`5`\xA4R\x7FContract does not have fallback `\xC4\x90\x81Rtnor receive functions`X\x1B`\xE4R0\x93\x90\x93\x14\x92\x90\x82\xFD";
pub static GAUSSIAN_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static(
__BYTECODE,
);
#[rustfmt::skip]
const __DEPLOYED_BYTECODE: &[u8] = b"s\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\x80`@\x81\x90RbF\x1B\xCD`\xE5\x1B\x81R` `\x84\x90\x81R`5`\xA4R\x7FContract does not have fallback `\xC4\x90\x81Rtnor receive functions`X\x1B`\xE4R0\x93\x90\x93\x14\x92\x90\x82\xFD";
pub static GAUSSIAN_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static(
__DEPLOYED_BYTECODE,
);
pub struct Gaussian<M>(::ethers::contract::Contract<M>);
impl<M> ::core::clone::Clone for Gaussian<M> {
fn clone(&self) -> Self {
Self(::core::clone::Clone::clone(&self.0))
}
}
impl<M> ::core::ops::Deref for Gaussian<M> {
type Target = ::ethers::contract::Contract<M>;
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl<M> ::core::ops::DerefMut for Gaussian<M> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl<M> ::core::fmt::Debug for Gaussian<M> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple(::core::stringify!(Gaussian)).field(&self.address()).finish()
}
}
impl<M: ::ethers::providers::Middleware> Gaussian<M> {
pub fn new<T: Into<::ethers::core::types::Address>>(
address: T,
client: ::std::sync::Arc<M>,
) -> Self {
Self(
::ethers::contract::Contract::new(
address.into(),
GAUSSIAN_ABI.clone(),
client,
),
)
}
pub fn deploy<T: ::ethers::core::abi::Tokenize>(
client: ::std::sync::Arc<M>,
constructor_args: T,
) -> ::core::result::Result<
::ethers::contract::builders::ContractDeployer<M, Self>,
::ethers::contract::ContractError<M>,
> {
let factory = ::ethers::contract::ContractFactory::new(
GAUSSIAN_ABI.clone(),
GAUSSIAN_BYTECODE.clone().into(),
client,
);
let deployer = factory.deploy(constructor_args)?;
let deployer = ::ethers::contract::ContractDeployer::new(deployer);
Ok(deployer)
}
}
impl<M: ::ethers::providers::Middleware> From<::ethers::contract::Contract<M>>
for Gaussian<M> {
fn from(contract: ::ethers::contract::Contract<M>) -> Self {
Self::new(contract.address(), contract.client())
}
}
#[derive(
Clone,
::ethers::contract::EthError,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[etherror(name = "Infinity", abi = "Infinity()")]
pub struct Infinity;
#[derive(
Clone,
::ethers::contract::EthError,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[etherror(name = "NegativeInfinity", abi = "NegativeInfinity()")]
pub struct NegativeInfinity;
#[derive(
Clone,
::ethers::contract::EthError,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[etherror(name = "OutOfBounds", abi = "OutOfBounds()")]
pub struct OutOfBounds;
#[derive(
Clone,
::ethers::contract::EthError,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[etherror(name = "Overflow", abi = "Overflow()")]
pub struct Overflow;
#[derive(
Clone,
::ethers::contract::EthAbiType,
serde::Serialize,
serde::Deserialize,
Debug,
PartialEq,
Eq,
Hash
)]
pub enum GaussianErrors {
Infinity(Infinity),
NegativeInfinity(NegativeInfinity),
OutOfBounds(OutOfBounds),
Overflow(Overflow),
RevertString(::std::string::String),
}
impl ::ethers::core::abi::AbiDecode for GaussianErrors {
fn decode(
data: impl AsRef<[u8]>,
) -> ::core::result::Result<Self, ::ethers::core::abi::AbiError> {
let data = data.as_ref();
if let Ok(decoded) = <::std::string::String as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::RevertString(decoded));
}
if let Ok(decoded) = <Infinity as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::Infinity(decoded));
}
if let Ok(decoded) = <NegativeInfinity as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::NegativeInfinity(decoded));
}
if let Ok(decoded) = <OutOfBounds as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::OutOfBounds(decoded));
}
if let Ok(decoded) = <Overflow as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::Overflow(decoded));
}
Err(::ethers::core::abi::Error::InvalidData.into())
}
}
impl ::ethers::core::abi::AbiEncode for GaussianErrors {
fn encode(self) -> ::std::vec::Vec<u8> {
match self {
Self::Infinity(element) => {
::ethers::core::abi::AbiEncode::encode(element)
}
Self::NegativeInfinity(element) => {
::ethers::core::abi::AbiEncode::encode(element)
}
Self::OutOfBounds(element) => {
::ethers::core::abi::AbiEncode::encode(element)
}
Self::Overflow(element) => {
::ethers::core::abi::AbiEncode::encode(element)
}
Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s),
}
}
}
impl ::ethers::contract::ContractRevert for GaussianErrors {
fn valid_selector(selector: [u8; 4]) -> bool {
match selector {
[0x08, 0xc3, 0x79, 0xa0] => true,
_ if selector
== <Infinity as ::ethers::contract::EthError>::selector() => true,
_ if selector
== <NegativeInfinity as ::ethers::contract::EthError>::selector() => {
true
}
_ if selector
== <OutOfBounds as ::ethers::contract::EthError>::selector() => true,
_ if selector
== <Overflow as ::ethers::contract::EthError>::selector() => true,
_ => false,
}
}
}
impl ::core::fmt::Display for GaussianErrors {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
Self::Infinity(element) => ::core::fmt::Display::fmt(element, f),
Self::NegativeInfinity(element) => ::core::fmt::Display::fmt(element, f),
Self::OutOfBounds(element) => ::core::fmt::Display::fmt(element, f),
Self::Overflow(element) => ::core::fmt::Display::fmt(element, f),
Self::RevertString(s) => ::core::fmt::Display::fmt(s, f),
}
}
}
impl ::core::convert::From<::std::string::String> for GaussianErrors {
fn from(value: String) -> Self {
Self::RevertString(value)
}
}
impl ::core::convert::From<Infinity> for GaussianErrors {
fn from(value: Infinity) -> Self {
Self::Infinity(value)
}
}
impl ::core::convert::From<NegativeInfinity> for GaussianErrors {
fn from(value: NegativeInfinity) -> Self {
Self::NegativeInfinity(value)
}
}
impl ::core::convert::From<OutOfBounds> for GaussianErrors {
fn from(value: OutOfBounds) -> Self {
Self::OutOfBounds(value)
}
}
impl ::core::convert::From<Overflow> for GaussianErrors {
fn from(value: Overflow) -> Self {
Self::Overflow(value)
}
}
}