Skip to content

Add ContractError<T> enum helper #1447

@PolyProgrammist

Description

@PolyProgrammist

#[derive(Debug, thiserror::Error)]
pub enum ContractError
where T: Intocrate::BaseError
{
InvalidArgument(/.../),
InvalidContractState(/.../),
PermissionDenied(/.../),
// ...

#[error("{}", serde_json::json!(.0.into()))]
Other(T), //

}

#1165 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    NEW❗

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions