Function create_contract_data_key

Source
pub fn create_contract_data_key(
    symbol: &str,
    address: Option<ScAddress>,
) -> Result<ScVal, StellarTransactionUtilsError>
Expand description

Create an ScVal key for contract data queries.

Creates a ScVal::Vec containing a symbol and optional address. Used for SEP-41 token interface keys like “Balance” and “Decimals”.

§Arguments

  • symbol - Symbol name (e.g., “Balance”, “Decimals”)
  • address - Optional ScAddress to include in the key

§Returns

ScVal::Vec key or error if creation fails