This repository contains rust snippets to get on-chain data from the Morpho protocol.
Rust and Cargo.
market.rs: Morpho market snippetsretrieve_market_info: retrieves various information (accounting, rates, user position) about a marketretrieve_markets: retrieves all market created on Morphoretrieve_events_with_logs: retrieve logs on Morpho over a specific range of blockssubscribe_to_event_log: listen to all events emitted on Morpho
vault.rs: Morpho vault snippetsretrive_vault_details: retrieve various information (accounting) about a vaultretrieve_vault_activity_details: retrieve vault interactions (deposit, withdraw, transfer and interest accrual) on a specific Morpho vaultretrieve_vaults: retrieve all vaults created by the Morpho vault factory
arithmetic.rs: Morpho protocol arithmetic logic (equivalent of MathLib.sol)api.rs: Morpho API snippet
Run the main file with
cargo run