Ethers.js: How do I call functions with ambiguous overloaded signatures?

Created on 4 Jul 2020  路  3Comments  路  Source: ethers-io/ethers.js

Most helpful comment

Hi @thegostep, can you try the following:

await identiry['grantAttribute(address,string)'](arg1, arg2)

await identiry['grantAttribute(address,string,bytes[])'](arg1, arg2, arg3)

AFAIK javascript doesn't support two functions with same identifier, that's probably why it had to be like this.

All 3 comments

Hi @thegostep, can you try the following:

await identiry['grantAttribute(address,string)'](arg1, arg2)

await identiry['grantAttribute(address,string,bytes[])'](arg1, arg2, arg3)

AFAIK javascript doesn't support two functions with same identifier, that's probably why it had to be like this.

That did the trick ty !

Thanks @zemse. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dagogodboss picture dagogodboss  路  3Comments

jochenonline picture jochenonline  路  3Comments

Neozaru picture Neozaru  路  3Comments

abhishekp1996 picture abhishekp1996  路  3Comments

ricmoo picture ricmoo  路  3Comments