pub struct Order {
pub salt: String,
pub maker: String,
pub signer: String,
pub taker: String,
pub token_id: String,
pub maker_amount: String,
pub taker_amount: String,
pub expiration: String,
pub nonce: String,
pub fee_rate_bps: String,
pub side: Side,
pub signature_type: SignatureType,
}Expand description
Order structure matching predict.fun specification
Fields§
§salt: StringA unique salt to ensure entropy
maker: StringThe maker of the order, e.g. the order’s signer
signer: StringThe signer of the order
taker: StringThe address of the order taker. The zero address is used to indicate a public order
token_id: StringThe token ID of the CTF ERC-1155 asset to be bought or sold
maker_amount: StringThe maker amount
For a BUY order, this represents the total (price per asset * assets quantity) collateral (e.g. USDT) being offered.
For a SELL order, this represents the total amount of CTF assets being offered.
taker_amount: StringThe taker amount
For a BUY order, this represents the total amount of CTF assets to be received.
For a SELL order, this represents the total (price per asset * assets quantity) amount of collateral (e.g. USDT) to be received.
expiration: StringThe timestamp in seconds after which the order is expired
nonce: StringThe nonce used for on-chain cancellations
fee_rate_bps: StringThe fee rate, in basis points
side: SideThe side of the order, BUY (Bid) or SELL (Ask)
signature_type: SignatureTypeSignature type used by the Order (EOA also supports EIP-1271)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Order
impl<'de> Deserialize<'de> for Order
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Order
impl RefUnwindSafe for Order
impl Send for Order
impl Sync for Order
impl Unpin 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 more