Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

326
Vistas
How to use overloaded function from smart contract with wagmi?

So I have two function with the same name but different parameter in my solidity smart contract functionName(args1) and functionName(args1, args2)

And because of this function overloading, the ABI of the smart contract has 2 function with exactly the same name, functionName with 1 argument and functionName with 2 arguments

When I try to use wagmi useContractWrite to call the first function with:

const functionWrite = useContractWrite({
  ...ContractInstance,
  functionName: 'functionName',
  args: [args1],
});

or calling second function

const functionWrite = useContractWrite({
...ContractInstance,
functionName: 'functionName',
args: [args1, args2],
});

It seems wagmi didn't detect the function because of the duplicate name and it gave me this error: 'functionName' doesn't exist in interface for contract "{my contract address}"

Does anyone know how to use overloaded function with wagmi?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda