I’ve been an avid Ethereum/Web3 developer for the last three years and have recently taken an interest to functional programming, specifically rescript.
The ethers.js library is a staple in web3 development that allows interacting with EVM compatible blockchains. I’ve spent the last few days attempting to write basic bindings from Typescript to ReScript. It has been a struggle.
Everything I’ve read says bindings should be easy, small, compact, etc, but this is not what I’ve experienced trying to interop with ethers.
For example, I tried to write a partial binding to interact with ethers contract.queryFilter() method. It requires an Event as the return type. This type is large, full of type unions, etc. Is this just a matter of writing large modules and will be easier with experience?