FelipeRosa / rust-ethereum-abi

Ethereum Smart Contract ABI parsing library.
MIT License
15 stars 7 forks source link

ABI `"type": "error"` is not supported in main branch #62

Closed c0mm4nd closed 1 year ago

c0mm4nd commented 1 year ago

e.g. ABI from https://etherscan.io/token/0x00000000000001ad428e4906aE43D8F9852d0dD6#code which contains:

      {
        "inputs": [],
        "name": "BadContractSignature",
        "type": "error"
      },
      {
        "inputs": [],
        "name": "BadFraction",
        "type": "error"
      },

serde_json::from_str will panic on each "type": "error"

FelipeRosa commented 1 year ago

Added in this PR: https://github.com/FelipeRosa/rust-ethereum-abi/pull/63.

I'll release a new version soon.