pub struct PoolKey {
pub currency0: <Currency as SolType>::RustType,
pub currency1: <Currency as SolType>::RustType,
pub fee: U24,
pub tickSpacing: I24,
pub hooks: <Hooks as SolType>::RustType,
}
Expand description
struct PoolKey { Currency currency0; Currency currency1; uint24 fee; int24 tickSpacing; Hooks hooks; }
Fields§
§currency0: <Currency as SolType>::RustType
@notice The lower currency of the pool, sorted numerically
currency1: <Currency as SolType>::RustType
@notice The higher currency of the pool, sorted numerically
fee: U24
@notice The pool swap fee, capped at 1_000_000. The upper 4 bits determine if the hook sets any fees.
tickSpacing: I24
@notice Ticks that involve positions must be a multiple of tick spacing
hooks: <Hooks as SolType>::RustType
@notice The hooks of the pool
Trait Implementations§
Source§impl EventTopic for PoolKey
impl EventTopic for PoolKey
Source§fn topic_preimage_length(rust: &Self::RustType) -> usize
fn topic_preimage_length(rust: &Self::RustType) -> usize
The number of bytes this type occupies in another topic’s preimage,
usually a multiple of 32. Read more
Source§fn encode_topic_preimage(rust: &Self::RustType, out: &mut Vec<u8>)
fn encode_topic_preimage(rust: &Self::RustType, out: &mut Vec<u8>)
Encodes this type as preimage bytes which are then hashed in
complex types’ [
encode_topic
][EventTopic::encode_topic]. Read moreSource§fn encode_topic(rust: &Self::RustType) -> WordToken
fn encode_topic(rust: &Self::RustType) -> WordToken
Indexed event parameter encoding. Read more
Source§impl SolStruct for PoolKey
impl SolStruct for PoolKey
Source§fn eip712_root_type() -> Cow<'static, str>
fn eip712_root_type() -> Cow<'static, str>
Return the root EIP-712 type. This type is used to construct the
encodeType
string.Source§fn eip712_components() -> Vec<Cow<'static, str>>
fn eip712_components() -> Vec<Cow<'static, str>>
Returns component EIP-712 types. These types are used to construct
the
encodeType
string. These are the types of the struct’s fields,
and should not include the root type.Source§fn eip712_encode_data(&self) -> Vec<u8> ⓘ
fn eip712_encode_data(&self) -> Vec<u8> ⓘ
Encodes this domain using EIP-712
encodeData
.§fn eip712_type_hash(&self) -> FixedBytes<32>
fn eip712_type_hash(&self) -> FixedBytes<32>
Calculates the EIP-712
typeHash
for this struct. Read more§fn eip712_hash_struct(&self) -> FixedBytes<32>
fn eip712_hash_struct(&self) -> FixedBytes<32>
Hashes this struct according to EIP-712
hashStruct
.§fn eip712_signing_hash(&self, domain: &Eip712Domain) -> FixedBytes<32>
fn eip712_signing_hash(&self, domain: &Eip712Domain) -> FixedBytes<32>
Does something. Read more
Source§impl SolType for PoolKey
impl SolType for PoolKey
Source§const SOL_NAME: &'static str = <Self as alloy_sol_types::SolStruct>::NAME
const SOL_NAME: &'static str = <Self as alloy_sol_types::SolStruct>::NAME
The name of this type in Solidity.
Source§const ENCODED_SIZE: Option<usize> = <UnderlyingSolTuple as alloy_sol_types::SolType>::ENCODED_SIZE
const ENCODED_SIZE: Option<usize> = <UnderlyingSolTuple as alloy_sol_types::SolType>::ENCODED_SIZE
The statically-known ABI-encoded size of the type. Read more
Source§const PACKED_ENCODED_SIZE: Option<usize> = <UnderlyingSolTuple as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE
const PACKED_ENCODED_SIZE: Option<usize> = <UnderlyingSolTuple as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE
The statically-known Non-standard Packed Mode ABI-encoded size of the type. Read more
Source§type Token<'a> = <(Currency, Currency, Uint<24>, Int<24>, Hooks) as SolType>::Token<'a>
type Token<'a> = <(Currency, Currency, Uint<24>, Int<24>, Hooks) as SolType>::Token<'a>
The corresponding ABI token type. Read more
Source§fn valid_token(token: &Self::Token<'_>) -> bool
fn valid_token(token: &Self::Token<'_>) -> bool
Returns
true
if the given token can be detokenized with this type.Source§fn detokenize(token: Self::Token<'_>) -> Self::RustType
fn detokenize(token: Self::Token<'_>) -> Self::RustType
Detokenize this type’s value from the given token. Read more
§fn sol_type_name() -> Cow<'static, str>
fn sol_type_name() -> Cow<'static, str>
👎Deprecated since 0.6.3: use
SOL_NAME
insteadReturns the name of this type in Solidity.
§fn abi_encoded_size<E>(rust: &E) -> usizewhere
E: SolTypeValue<Self> + ?Sized,
fn abi_encoded_size<E>(rust: &E) -> usizewhere
E: SolTypeValue<Self> + ?Sized,
Calculate the ABI-encoded size of the data, counting both head and tail
words. For a single-word type this will always be 32.
§fn type_check(token: &Self::Token<'_>) -> Result<(), Error>
fn type_check(token: &Self::Token<'_>) -> Result<(), Error>
Returns an error if the given token cannot be detokenized with this
type.
§fn tokenize<E>(rust: &E) -> Self::Token<'_>where
E: SolTypeValue<Self> + ?Sized,
fn tokenize<E>(rust: &E) -> Self::Token<'_>where
E: SolTypeValue<Self> + ?Sized,
Tokenizes the given value into this type’s token. Read more
§fn eip712_data_word<E>(rust: &E) -> FixedBytes<32>where
E: SolTypeValue<Self> + ?Sized,
fn eip712_data_word<E>(rust: &E) -> FixedBytes<32>where
E: SolTypeValue<Self> + ?Sized,
Encode this data according to EIP-712
encodeData
rules, and hash it
if necessary. Read more§fn abi_packed_encoded_size<E>(rust: &E) -> usizewhere
E: SolTypeValue<Self> + ?Sized,
fn abi_packed_encoded_size<E>(rust: &E) -> usizewhere
E: SolTypeValue<Self> + ?Sized,
Returns the length of this value when ABI-encoded in Non-standard Packed Mode. Read more
§fn abi_encode_packed_to<E>(rust: &E, out: &mut Vec<u8>)where
E: SolTypeValue<Self> + ?Sized,
fn abi_encode_packed_to<E>(rust: &E, out: &mut Vec<u8>)where
E: SolTypeValue<Self> + ?Sized,
Non-standard Packed Mode ABI encoding. Read more
§fn abi_encode_packed<E>(rust: &E) -> Vec<u8> ⓘwhere
E: SolTypeValue<Self> + ?Sized,
fn abi_encode_packed<E>(rust: &E) -> Vec<u8> ⓘwhere
E: SolTypeValue<Self> + ?Sized,
Non-standard Packed Mode ABI encoding. Read more
§fn abi_encode<E>(rust: &E) -> Vec<u8> ⓘwhere
E: SolTypeValue<Self> + ?Sized,
fn abi_encode<E>(rust: &E) -> Vec<u8> ⓘwhere
E: SolTypeValue<Self> + ?Sized,
Tokenizes and ABI-encodes the given value by wrapping it in a
single-element sequence. Read more
§fn abi_encode_params<E>(rust: &E) -> Vec<u8> ⓘwhere
E: SolTypeValue<Self> + ?Sized,
Self::Token<'a>: for<'a> TokenSeq<'a>,
fn abi_encode_params<E>(rust: &E) -> Vec<u8> ⓘwhere
E: SolTypeValue<Self> + ?Sized,
Self::Token<'a>: for<'a> TokenSeq<'a>,
Tokenizes and ABI-encodes the given value as function parameters. Read more
§fn abi_encode_sequence<E>(rust: &E) -> Vec<u8> ⓘwhere
E: SolTypeValue<Self> + ?Sized,
Self::Token<'a>: for<'a> TokenSeq<'a>,
fn abi_encode_sequence<E>(rust: &E) -> Vec<u8> ⓘwhere
E: SolTypeValue<Self> + ?Sized,
Self::Token<'a>: for<'a> TokenSeq<'a>,
Tokenizes and ABI-encodes the given value as a sequence. Read more
§fn abi_decode(data: &[u8], validate: bool) -> Result<Self::RustType, Error>
fn abi_decode(data: &[u8], validate: bool) -> Result<Self::RustType, Error>
Decodes this type’s value from an ABI blob by interpreting it as a
single-element sequence. Read more
Source§impl SolTypeValue<PoolKey> for PoolKey
impl SolTypeValue<PoolKey> for PoolKey
fn stv_to_tokens(&self) -> <Self as SolType>::Token<'_>
fn stv_abi_encoded_size(&self) -> usize
fn stv_eip712_data_word(&self) -> Word
fn stv_abi_encode_packed_to(&self, out: &mut Vec<u8>)
fn stv_abi_packed_encoded_size(&self) -> usize
Source§impl SolValue for PoolKey
impl SolValue for PoolKey
§fn sol_type_name(&self) -> Cow<'static, str>
fn sol_type_name(&self) -> Cow<'static, str>
👎Deprecated since 0.6.3: use
sol_name
insteadThe name of the associated Solidity type. Read more
§fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>
fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>
Tokenizes the given value into this type’s token. Read more
§fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Selfwhere
Self: From<<Self::SolType as SolType>::RustType>,
fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Selfwhere
Self: From<<Self::SolType as SolType>::RustType>,
Detokenize a value from the given token. Read more
§fn abi_encoded_size(&self) -> usize
fn abi_encoded_size(&self) -> usize
Calculate the ABI-encoded size of the data. Read more
§fn eip712_data_word(&self) -> FixedBytes<32>
fn eip712_data_word(&self) -> FixedBytes<32>
Encode this data according to EIP-712
encodeData
rules, and hash it
if necessary. Read more§fn abi_encode_packed_to(&self, out: &mut Vec<u8>)
fn abi_encode_packed_to(&self, out: &mut Vec<u8>)
Non-standard Packed Mode ABI encoding. Read more
§fn abi_encode_sequence(&self) -> Vec<u8> ⓘwhere
<Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,
fn abi_encode_sequence(&self) -> Vec<u8> ⓘwhere
<Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,
Encodes an ABI sequence. Read more
§fn abi_encode_params(&self) -> Vec<u8> ⓘwhere
<Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,
fn abi_encode_params(&self) -> Vec<u8> ⓘwhere
<Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,
Encodes an ABI sequence suitable for function parameters. Read more
§fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>where
Self: From<<Self::SolType as SolType>::RustType>,
fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>where
Self: From<<Self::SolType as SolType>::RustType>,
ABI-decode this type from the given data. Read more
impl Eq for PoolKey
impl StructuralPartialEq for PoolKey
Auto Trait Implementations§
impl Freeze for PoolKey
impl RefUnwindSafe for PoolKey
impl Send for PoolKey
impl Sync for PoolKey
impl Unpin for PoolKey
impl UnwindSafe for PoolKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeSendSync for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 80 bytes