Skip to content

[Bug]: Returning Err(Vec<u8>) From a Contract Function Should be Passed to Calling Contract #118

@0xNeshi

Description

@0xNeshi

What happened?

Currently when the error data is empty, the error message is converted to:

let selector = decode_selector(calldata);
format!("function not found for selector '{selector}' and no fallback defined").as_bytes().to_vec()

This doesn't align with actual blockchain behavior, which passes empty error data as-is.

platform

  • linux
  • windows
  • macos

Expected behavior

Motsu should just pass the error data as-is, i.e. the if e.is_empty() check should be removed.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions