Skip to content

Contract with function overloading #407

Closed
@marcelomorgado

Description

@marcelomorgado

Hi,

A contract that I'm testing has different interfaces for same function name:

// Order that appers on ABI
initialize(string _name, string _symbol);
initialize(string _name, string _symbol, address _registry);
initialize(string _sender);
initialize();

I'm getting the error: Error: incorrect number of arguments when I'm trying call the second function.
Seems that when Contract is reading the ABI and it's only considering the first interface and ignoring the others.

// Expose the first (and hopefully unique named function)

errors.warn('WARNING: Multiple definitions for ' + name);

Notes:

  • I'm receving "WARNING: Multiple definitions" as well.
  • With web3js I can call all of interfaces.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionQuestions, feedback and general information.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions