xclud / web3dart

Ethereum library, written in Dart.
https://pub.dev/packages/web3dart
MIT License
170 stars 94 forks source link

Value not in range: 32 on balanceOf #48

Closed jvinai closed 1 year ago

jvinai commented 2 years ago

Using the contract.dart example and using my own abi for balanceOf, i get this Value not in range: 32 error.

ABI for balanceOf:

{
    "inputs": [
      {
        "internalType": "address",
        "name": "owner",
        "type": "address"
      }
    ],
    "name": "balanceOf",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  }
BrunoHenrique00 commented 2 years ago

Had the same issue, make sure you are putting the right RPC URL and contract address. Also, make sure you are calling the same method name on the client and from your own abi

kaumudpa commented 1 year ago

Duplicate of https://github.com/xclud/web3dart/issues/46

xclud commented 1 year ago

Thank you guys. I am closing this one. We'll continue in #46.