Aller au contenu

Camelot

almanak.connectors.camelot

Camelot connector.

CamelotCompiler

Bases: BaseProtocolCompiler[SwapCompilerContext]

Camelot Algebra V3 swap compiler. Arbitrum, SWAP-only.

Subclasses BaseProtocolCompiler[SwapCompilerContext] — not the CL base — so the class shape doesn't claim any LP capability. Uses SwapCompilerContext (not BaseCompilerContext) because it reads max_price_impact_pct and using_placeholders for the swap slippage / price-impact guard; those knobs are not on the universal base since lending / perp / bridge compilers don't have them.

compile_swap

compile_swap(
    ctx: SwapCompilerContext, intent: SwapIntent
) -> CompilationResult

Compile a Camelot Algebra V3 swap intent.

Algebra V3's exactInputSingle lacks a fee parameter (fees are set dynamically by the pool); DefaultSwapAdapter encodes the correct Algebra-shaped struct based on protocol="camelot" via SWAP_ROUTER_ALGEBRA_PROTOCOLS. There is no pool-validation step (Algebra has no fee tier to validate against) — the on-chain quoter is the source of truth for swap viability.

__getattr__

__getattr__(name: str) -> Any

PEP 562 lazy attribute access.