simolus3 / web3dart

Ethereum library, written in Dart.
MIT License
442 stars 270 forks source link

error when abi.json have other types than function and event. #154

Closed benzsuankularb closed 3 years ago

benzsuankularb commented 3 years ago

For example, Erc20 has the type fallback in the ABI file.

{
        "payable": true,
        "stateMutability": "payable",
        "type": "fallback"
},

Or Pancakeswap router has the type receive in the ABI file.

{
       "stateMutability":"payable",
       "type":"receive"
}

This cause an error when generating file using build runner. Null check operator used on a null value

simolus3 commented 3 years ago

Thanks for the report! I've fixed this problem and the other one you reported in version 2.1.2 of web3dart.