Skip to main content

Crate propamm

Crate propamm 

Source
Expand description

Rust SDK for interacting with the PropAMM contracts over JSON-RPC.

Mirrors the TypeScript SDK (sdk/typescript): a generic ContractClient, typed PropAmmRouter bindings (quotes, swaps, and views), and pAMM state-override sources so quotes price fresh off-chain liquidity.

Re-exports§

pub use client::CallOverrides;
pub use client::ContractClient;
pub use error::Error;
pub use error::Result;
pub use prices::PriceLevels;
pub use router::PropAmmRouter;

Modules§

client
Thin wrapper around rex/ethrex’s EthClient for reading from and writing to contracts. This module owns the JSON-RPC transport, including eth_call simulations with state and block overrides (rex’s StateOverrideSet/BlockOverrideSet); ABI encoding/decoding lives in router::abi on ethrex’s calldata codec.
common
error
overrides
pAMM state-override sources.
prices
pAMM price-level sources.
router
Typed bindings for the PropAMMRouter contract, built on ContractClient. Method names drop the on-chain V1 suffix: router.swap(...) calls swapV1, and so on.

Structs§

H256
Fixed-size uninterpreted hash type with 32 bytes (256 bits) size.
U256
Little-endian large integer type 256-bit unsigned integer.

Type Aliases§

Address
TxHash
Transaction hash.