Skip to content

the method may_load exists for struct cw_storage_plus::Map<'static, (std::string::String, Uint256), Uint256>, but its trait bounds were not satisfied the following trait bounds were not satisfied: (std::string::String, Uint256): PrimaryKey #663

@Flydexo

Description

@Flydexo

Hello I have this error when I try to call may_load on a Map.
my code
let c = CARDS.may_load(deps.storage, (from, token_id))?; Ok(match c { Some(v) => { if v < value { return Err(ContractError::NoOwnCard) } }, None => return Err(ContractError::Unkown) });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions