feat: add multi-target Typechain typings build option#131
feat: add multi-target Typechain typings build option#131
Conversation
Signed-off-by: Jawad Tariq <sjcool420@hotmail.co.uk>
dvdplm
left a comment
There was a problem hiding this comment.
The code looks fine but I have two questions:
-
Why do we want to be agnostic about the typechain? Why not be opinioated and only support ethers 6? What do we gain from being flexible here?
-
Reading thew (great!) docs about how to pass in the preferred typechain, I'd like to know what the priority rules are. Env var is trumped by CLI arg? Both trumped by config file? The downside of great flexibility is that we now must test&document all the permutations. Is the flexibility worth it?
|
To answer the following question:
I did light testing on my part with all the scenarios. As for the priorities I set up the following: const typechainTarget =
args.typechainTarget ||
process.env.TYPECHAIN_TARGET ||
hre.config.typechain.target // default 'ethers-v6'The command line argument is the highest priority and overrides the rest since it is straightforward. As for the first question, @sebastiendan might be able to answer that with more detail. |
@dvdplm This is related to topos-js and its unbiased architecture (potentially usable with any evm chain client, with any graphql client, etc.) |
Description
Reopening the PR that was previously reverted.
Previous PR #127
PR Checklist: