Skip to content

Conversion error when two different data types are accepted for args #2670

@fubuloubu

Description

@fubuloubu

Have you ensured that all of these are up to date?

  • Ape
  • Ape plugins

What version of Ape are you on?

No response

What command(s) is the bug in?

No response

Operating System

Linux

Ape Configuration

No response

Description

A particular contract on Base is causing this issue, it has an overloaded method that accepts either an int or bytes[] (which would not be convertible between each other), but it will not attempt to call the correct selector.

I believe what should happen is if it can't find a matching set of args for the first selector, it should "fall through" to the second (in this case, a list is not convertible to int, but is convertible to bytes[])

Reproduction code

$ ape console --network base:mainnet:

>>> pyth = Contract("0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a")
>>> pyth.getUpdateFee
getUpdateFee(bytes[] updateData) -> uint256
getUpdateFee(uint256 updateDataSize) -> uint256
>>> pyth.getUpdateFee([])
ERROR:    (ConversionError) No conversion registered to handle '[]'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions