Skip to content

Extend data types support for parsers #49

@MCarlomagno

Description

@MCarlomagno

The trait IntoScVal performs parsing between rust native types and ScVal (Soroban types format in the client library).

Currently the trait supports most common data types used for soroban contracts, but there are a couple missing, we want to create new parsers, extending the support to any Soroban ScVal type:

pub enum ScValType {
    // already supported
    Bool = 0,
    U32 = 3,
    I32 = 4,
    U64 = 5,
    I64 = 6,
    Duration = 8,
    Bytes = 13,
    String = 14,
    Vec = 16,
    Address = 18,

    // not supported
    Void = 1,
    Error = 2,
    Symbol = 15,
    Timepoint = 7,
    Map = 17,
    U128 = 9,
    I128 = 10,
    U256 = 11,
    I256 = 12,
    ContractInstance = 19,
    LedgerKeyContractInstance = 20,
    LedgerKeyNonce = 21,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    good-first-issueBeginner-friendly, low-complexity issues to help new contributors

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions