joshstevens19 / ethereum-abi-types-generator

Generate typings based on your ABIs, with provider wrappers exposed.
MIT License
163 stars 22 forks source link

missing property in ethers overrides - blockTag #43

Open TJakubek opened 2 years ago

TJakubek commented 2 years ago

hey bud,

first off - big fan, great project.

Not 100% sure as I've yet to test it out but I think the type 'ContractCallOverrides' is missing a property for ethers_v5. According to documentation there should also be a property 'blockTag' in the overrides, which allows querying data from a specific block (if your endpoint allows it).

So for example querying a balance could look like this:

const balance = await token.balanceOf('0xSuperGreatAddress', { blockTag: 12345 })

joshstevens19 commented 2 years ago

Nice! Think I need to upgrade to latest ethers as some other stuff is not pulled though in the typings.. FYI that call would work the typings are just missing I will sort thanks for raising

TJakubek commented 2 years ago

sure, have it working, just dont want to override types 😅 keep up the good work, I will keep an eye out for the update

joshstevens19 commented 2 years ago

I hit this myself today will update the repo to fix this sorry for delay