Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple matching functions error when doing useContractFunction #1145

Open
Murphywes opened this issue Oct 16, 2023 · 0 comments
Open

Multiple matching functions error when doing useContractFunction #1145

Murphywes opened this issue Oct 16, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Murphywes
Copy link

const { send: sendDepositETH, state: stateDepositETH } = useContractFunction(GatewayContract, "depositETH")

There are 2 function with the same name but with different parameter lengths in the contract, I'm trying interact with this contract via useContractFunction, but got the following error.. Can anyone help me?

Error
multiple matching functions (argument="name", value="depositETH", code=INVALID_ARGUMENT, version=abi/5.6.4)
Call Stack
 Logger.makeError
  node_modules/.pnpm/@[email protected]/node_modules/@ethersproject/logger/lib.esm/index.js:224:23
 Logger.throwError
  node_modules/.pnpm/@[email protected]/node_modules/@ethersproject/logger/lib.esm/index.js:233:20
 Logger.throwArgumentError
  node_modules/.pnpm/@[email protected]/node_modules/@ethersproject/logger/lib.esm/index.js:236:21
 Interface.getFunction
  node_modules/.pnpm/@[email protected]/node_modules/@ethersproject/abi/lib.esm/interface.js:172:24
 eval
  core/dist/esm/src/hooks/useContractFunction.js:81:53
 handleClick
  src/components/SendEthForm/DepositEth.tsx:50:10
 HTMLUnknownElement.callCallback
  node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:3945:14
@Murphywes Murphywes added the bug Something isn't working label Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant