can not send Matic
Describe the bug I tried to use useConractFunction with MATIC , declaring like this const maticContarct = new Contract( "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0", ERC20Interface ); const {send}= useContractFunction(maticContarct, "transfer"); however i always get this error :
Software versions
-
useDappversion ;^1.0.12 - Package manager: yarn
- Node version v16.14.0
Additional context
**
**
@Merrick17 Can you also add a snippet on how exactly are you calling the send function? (the exact addresses or values can be anonymized of course)
You are connected to MetaMask? Are you able to send different transactions successfully?
i tried with NFT's and it worked fine using custom Contracts ... @rzadp
@Merrick17 hey i am trying to connect to the polygon network but it's failing, may i ask how you did the connection?
@VinHylme

Hey @Merrick17, From the calldata from the error screenshot you provided I can see that you're trying to send a lot of tokens (4908360000000000000?). I think the bug might be here:
...
toBn((price * tokenPrices.matic).toString())
...
Did you mean something else?
I am actually having the exact same issue but for calling a simple function on a contract on the goerli network. More here: https://github.com/TrueFiEng/useDApp/issues/931