Closed codesport closed 2 years ago
hey -- the ERC20 data type is only used by the solidity compiler. The ABI & typechain outputs (https://github.com/0xSplits/splits-sdk, also available via npm) simply take addresses as strings
if you're still having issues, @mihoward21 may be able to help more next week
Hi @wminshew
Thanks for tip!
We got it working!! 🎉🎈
Hi Guys,
Love your project. Hoping you can help.
TLDR: How can we get ethers on the frontend to recognize the ERC20 dataType when calling
getERC20Balance()
We're building a dApp to interact with your splitter on Polygon.
However, on the frontend, ethers.js is throwing the following error when we connect with your
getERC20Balance
function. The error is:Uncaught (in promise) Error: invalid type (argument="type", value="ERC20", code=INVALID_ARGUMENT, version=abi/5.6.4)
Specifically it doesn't like the
ERC20
dataType in line 580 ofSplitsMain.sol
. When I remove the call to this function everything works fine.We were able to clone your repo locally and all test passed.
Any, guidance, how to get ethers not to complain about this ERC20 dataType?