Skip to content

Conversation

qalisander
Copy link
Contributor

@qalisander qalisander commented Sep 25, 2025

Description

Adds implementation of stylus_sdk::call::MethodError trait inside SolidityError macro.
MethodError trait is necessary for error types inside SolidityError enum.
By the end it will be possible to nest error like this:

#[derive(SolidityError, Debug)]
pub enum Error {
    Erc721(erc721::Error),
    Checkpoint(checkpoints::Error),
    ForbiddenBatchMint(ERC721ForbiddenBatchMint),
    ExceededMaxBatchMint(ERC721ExceededMaxBatchMint),
    ForbiddenMint(ERC721ForbiddenMint),
    ForbiddenBatchBurn(ERC721ForbiddenBatchBurn),
}

Resolves #135

Checklist

  • I have documented these changes where necessary.
  • I have read the DCO and ensured that these changes comply.
  • I assign this work under its open source licensing.

@qalisander qalisander marked this pull request as draft September 25, 2025 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature: add possibility to reuse error for the other contract
1 participant