MCPcopy Create free account
hub / github.com/cowprotocol/services / encode

Method encode

crates/solver/src/settlement/mod.rs:87–96  ·  view source on GitHub ↗

Encodes the settlement's order_trade as a tuple, as expected by the smart contract.

(&self, sell_token_index: usize, buy_token_index: usize)

Source from the content-addressed store, hash-verified

85 /// Encodes the settlement's order_trade as a tuple, as expected by the
86 /// smart contract.
87 pub(crate) fn encode(&self, sell_token_index: usize, buy_token_index: usize) -> EncodedTrade {
88 encode_trade(
89 &self.order.data,
90 &self.order.signature,
91 self.order.metadata.owner,
92 sell_token_index,
93 buy_token_index,
94 self.executed_amount,
95 )
96 }
97}
98
99#[derive(Debug, Clone, Default)]

Callers 6

with_liquidityMethod · 0.45
includes_limit_order_ucpFunction · 0.45
encodeFunction · 0.45
generate_signatureMethod · 0.45
generate_signatureMethod · 0.45

Calls 2

encode_tradeFunction · 0.85
finishMethod · 0.45

Tested by 1

includes_limit_order_ucpFunction · 0.36