[ethers-v5] Contract types not exported in generated index.ts
See original GitHub issueThe index.ts only reexports the factory types, it does not export the contract types, the ones at <ContractName>.d.ts
.
These types should also be exported.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:21 (18 by maintainers)
Top Results From Across the Web
[ethers-v5] Contract types not exported in generated index.ts
The index.ts only reexports the factory types, it does not export the contract types, the ones at <ContractName>.d.ts . These types should also...
Read more >ABI Formats - ethers
There are several formats available to specify an ABI for a Smart Contract, which specifies to the under-lying library what methods, events and...
Read more >TypeScript errors and how to fix them
error TS1208 : 'index.ts' cannot be compiled under '–isolatedModules' because it is considered a global script file. Add an import, export, ...
Read more >How to deploy your first smart contract on Ethereum with ...
Zero Config Usage — Run the compile task as normal, and Typechain artifacts will automatically be generated in a root directory called typechain ......
Read more >ethereum-abi-types-generator
Generate types from an ethereum ABI json file.. Latest version: 1.3.2, last published: a year ago. Start using ethereum-abi-types-generator ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am stucking the same thing, have you found the answer?
Imagine you want to create a reusable npm package with the code generated by TypeChain, instead of generating it on demand in every project you want to use it.
In that case you want a package.json main key and a typescript types key with everything you typically need in the usage of package, which includes the contract types, so you can just do
import { MyContract } from "my_package";
.In the current state you have to do some trickery by copying the
.d.ts
files over to thetsc
destination directory.