pub struct FormatParams {Show 28 fields
pub token_path: Option<String>,
pub token: Option<String>,
pub native_currency_address: Option<NativeCurrencyAddress>,
pub chain_id: Option<u64>,
pub chain_id_path: Option<String>,
pub enum_path: Option<String>,
pub ref_path: Option<String>,
pub map_reference: Option<String>,
pub threshold: Option<String>,
pub message: Option<String>,
pub base: Option<String>,
pub decimals: Option<u8>,
pub prefix: Option<bool>,
pub encryption: Option<EncryptionParams>,
pub encoding: Option<String>,
pub selector_path: Option<String>,
pub selector: Option<String>,
pub callee_path: Option<String>,
pub callee: Option<String>,
pub amount_path: Option<String>,
pub amount: Option<UintLiteral>,
pub spender_path: Option<String>,
pub spender: Option<String>,
pub types: Option<Vec<String>>,
pub sources: Option<Vec<String>>,
pub sender_address: Option<SenderAddress>,
pub collection_path: Option<String>,
pub collection: Option<String>,
}Expand description
Format parameters — varies by format type.
Fields§
§token_path: Option<String>Token address path for tokenAmount/tokenTicker (resolved from calldata).
token: Option<String>Static token address or $.metadata.constants.* ref for tokenAmount/tokenTicker.
native_currency_address: Option<NativeCurrencyAddress>Native currency address — single address or array of addresses/constant refs. Per spec: “Either a string or an array of strings.”
chain_id: Option<u64>Static chain ID for cross-chain token resolution.
chain_id_path: Option<String>Dynamic chain ID path from calldata.
enum_path: Option<String>Enum lookup key in metadata.enums.
ref_path: Option<String>$ref enum reference path (v2): e.g., "$.metadata.enums.interestRateMode".
map_reference: Option<String>Map reference key in metadata.maps.
threshold: Option<String>Threshold for max-amount display (v2).
Value or "$.metadata.constants.max" reference.
message: Option<String>Message to display when amount >= threshold (e.g., “All”, “Max”).
base: Option<String>Unit base symbol (e.g., “%”, “bps”, “h”) for the unit format.
decimals: Option<u8>Decimal places for the unit format (default 0).
prefix: Option<bool>Whether to use SI prefix notation for the unit format.
encryption: Option<EncryptionParams>Encryption parameters.
encoding: Option<String>Date encoding: "timestamp" (default) or "blockheight".
selector_path: Option<String>Path to resolve which selector to use for nested calldata decoding.
selector: Option<String>Constant selector override for nested calldata decoding.
callee_path: Option<String>Path to the callee address for nested calldata (e.g., “to”).
callee: Option<String>Constant callee address for nested calldata.
amount_path: Option<String>Path to the value amount for nested calldata (injected as @.value in inner context).
amount: Option<UintLiteral>Constant native amount for nested calldata.
spender_path: Option<String>Path to the spender/from address for nested calldata (injected as @.from in inner context).
spender: Option<String>Constant spender/from address for nested calldata.
types: Option<Vec<String>>Address types for addressName format (spec: “eoa”, “contract”, etc.).
sources: Option<Vec<String>>Trusted name sources for addressName format (spec: “ens”, “local”).
sender_address: Option<SenderAddress>Sender address check for addressName format.
collection_path: Option<String>Path to the collection address for nftName format.
collection: Option<String>Constant collection address for nftName format.
Trait Implementations§
Source§impl Clone for FormatParams
impl Clone for FormatParams
Source§fn clone(&self) -> FormatParams
fn clone(&self) -> FormatParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more