pub struct SubgraphOrder {Show 24 fields
pub id: String,
pub owner: User,
pub sell_token: Token,
pub buy_token: Token,
pub receiver: Option<String>,
pub sell_amount: String,
pub buy_amount: String,
pub valid_to: String,
pub app_data: String,
pub fee_amount: String,
pub kind: String,
pub partially_fillable: bool,
pub status: String,
pub executed_sell_amount: String,
pub executed_sell_amount_before_fees: String,
pub executed_buy_amount: String,
pub executed_fee_amount: String,
pub invalidate_timestamp: Option<String>,
pub timestamp: String,
pub tx_hash: String,
pub is_signer_safe: bool,
pub signing_scheme: String,
pub uid: String,
pub surplus: Option<String>,
}Expand description
An order indexed by the subgraph.
Fields§
§id: StringEntity ID (order UID hex).
owner: UserOrder owner / trader.
sell_token: TokenToken to sell.
buy_token: TokenToken to buy.
receiver: Option<String>Optional receiver address (if different from owner).
sell_amount: StringTotal sell amount.
buy_amount: StringTotal buy amount (minimum for sell orders).
valid_to: StringOrder validity deadline (Unix timestamp).
app_data: StringApp-data hash (hex).
fee_amount: StringProtocol fee amount.
kind: StringOrder kind: "sell" or "buy".
partially_fillable: boolWhether the order can be partially filled.
status: StringOrder status: "open", "filled", "cancelled", or "expired".
executed_sell_amount: StringCumulative sell amount executed so far.
executed_sell_amount_before_fees: StringExecuted sell amount before fees.
executed_buy_amount: StringCumulative buy amount executed so far.
executed_fee_amount: StringCumulative fee amount executed so far.
invalidate_timestamp: Option<String>Timestamp of order cancellation (if any).
timestamp: StringOrder creation timestamp.
tx_hash: StringTransaction hash of the first fill.
is_signer_safe: boolWhether the signer is a smart contract (EIP-1271).
signing_scheme: StringSigning scheme used (e.g. "eip712", "ethsign", "eip1271").
uid: StringThe full order UID (bytes).
surplus: Option<String>Surplus generated by this order.
Implementations§
Source§impl Order
impl Order
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Returns true if the order is in a terminal state (filled, cancelled, or expired).
§Returns
true if the order is filled, cancelled, or expired.
Sourcepub const fn has_receiver(&self) -> bool
pub const fn has_receiver(&self) -> bool
Returns true if a custom receiver address is set (differs from owner).
§Returns
true if receiver is Some.
Sourcepub const fn has_invalidate_timestamp(&self) -> bool
pub const fn has_invalidate_timestamp(&self) -> bool
Returns true if a cancellation/invalidation timestamp is recorded.
§Returns
true if invalidate_timestamp is Some.
Sourcepub const fn has_surplus(&self) -> bool
pub const fn has_surplus(&self) -> bool
Sourcepub const fn is_partially_fillable(&self) -> bool
pub const fn is_partially_fillable(&self) -> bool
Returns true if the order may be partially filled.
§Returns
true if the partially_fillable flag is set.
Sourcepub const fn is_signer_safe(&self) -> bool
pub const fn is_signer_safe(&self) -> bool
Returns true if the order signer is a smart contract (EIP-1271).
§Returns
true if the is_signer_safe flag is set.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Order
impl<'de> Deserialize<'de> for Order
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Order, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Order, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for Order
impl Serialize for Order
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for Order
impl RefUnwindSafe for Order
impl Send for Order
impl Sync for Order
impl Unpin for Order
impl UnsafeUnpin for Order
impl UnwindSafe for Order
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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>
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.