Skip to content

[Bug]: Erc20Wrapper::_recover Should Bubble Up the Underlying Error on balance_of #800

@0xNeshi

Description

@0xNeshi

What happened?

We currently return ERC20InvalidUnderlying { token: contract_address } on error, which is problematic for 2 reasons:

  1. This doesn't align with Solidity behavior.
  2. The "invalid underlying token" should be token: underlying_token, not token: contract_address (i.e. wrapper address).

platform

  • linux
  • windows
  • macos

Expected behavior

Update the Wrapper to return Vec<u8> on all functions, enabling errors bubbling up.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort: mediumDefault level of effort.type: bugSomething is not working as intended.

    Type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions