1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
use ;
use crateSolveError;
/// Signer for disable-slippage-taking encoding: server-signed zero-fee `ClientFee` params.
///
/// Crate-internal: the feature is driven by `EncodingOptions::disable_slippage_taking`, and the
/// deployment's signing key comes from the environment, so embedders never touch the signer.
pub
/// Route encoder: converts solver output into ABI-encoded on-chain calldata.
///
/// Wraps [tycho-execution](https://docs.propellerheads.xyz/tycho/for-solvers/execution) to
/// produce ABI-encoded calldata for single, sequential, and split swaps, with and without
/// Permit2. See
/// the [Fynd encoding guide](https://docs.fynd.xyz/guides/encoding-options) for supported
/// encoding options and how to configure them.
/// Validity window for a server-signed payload, in seconds.
///
/// Shared by [`exclusive_swap`] and [`disable_slippage_taking`]: a quote can carry both signatures
/// at once, and whichever expires first bounds how long the quote is executable. One window keeps
/// that bound the same whatever a quote is made of. Well under the Ekubo extension's 30-day cap.
pub const DEFAULT_DEADLINE_WINDOW_SECS: u32 = 120;
/// Current Unix time in seconds, for the deadlines the signing modules stamp into their payloads.
///
/// # Errors
/// Errors when the system clock reads before the Unix epoch. A fallback timestamp would be signed
/// into a payload the router rejects on every submission, so the encode fails instead.