Comments (5)
you got Typechain from npm, right? I haven't do release in few days and there was a ton of changes. I will do one today.
In the meantime can you share ABI file that you want to parse?
from typechain.
Yes, downloaded from npm. I just updated to the new version and still have the same error unfortunately.
I have attached an example ABI that isn't working (extension renamed to txt so that Github doesn't complain!)
from typechain.
@kdelwat thanks! Okay, I see the problem: you don't have plain ABI file but the one generated by truffle or something i.e. it is a nested object — real abi is inside key "abi". Typechain
expects that abi file is a long array (value of "abi" key in your example). This what solc
generates.
However, I think that supporting these nested ABI files can be more user friendly and I will add it soon.
from typechain.
Ah that makes sense, sorry for the mistake on my part - I am using truffle to generate them. Thanks for the help, looking forward to the support.
from typechain.
Thanks for reporting! It got fixed in #13 and it's released as 0.0.7
.
from typechain.
Related Issues (20)
- Issues with identical contract names
- Broken imports in truffle-v5 in 8.0.x
- Add support for hardhat + ethers v6 HOT 1
- Feature request: add support for viem HOT 1
- Cannot find namespaces for events when `alwaysGenerateOverloads` is turned on HOT 3
- [hardhat + ethers-v6]Fallback to BaseContract when using hre.ethers.getContractFactory.attach HOT 2
- Update Contributing file
- getting wrong type after .connect() HOT 1
- 'type' folder layout changed and unable to import type for ethers.
- Overrides for `staticCall` and `staticCallResult` should always be viewOverrides in ethers-v6
- ethers-v6: wrong type generated for listening to contract events HOT 4
- Use branded type instead of string for addresses
- explicit contract method args
- Accessing `factoryInstance.interface` should return the exact contract interface type
- Upgrade js-sha3 to audited sha3 library
- Donating Funds to Type Chain HOT 2
- Types are not generated if hardhat config file is not typescript
- typechain-hardhat does not consider hardhat 'sources' config
- TypeScript: 'interface' is a reserved word in strict mode HOT 1
- Generated types are broken if contract function names clash with ethers built-ins
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typechain.