dethcrypto / dethcrypto/TypeChain
Structs are incorrectly generated in Typechain
- Dominant language
- TypeScript
- Stars
- 2.8k
- Forks
- 376
- PR merge metrics
- No merged PRs in 30d
Description
# Overview
I'm trying to generate typechain bindings using `ethers-v6`. I have some files in Solidity that are just structs. The are imported into contracts and appear in their typechain files.
The output of the typechain bindings for those structs looks like
```typescript
export type CommonExtDataStruct = {
undefined: AddressLike;
undefined: BigNumberish;
undefined: AddressLike;
undefined: BigNumberish;
undefined: BigNumberish;
undefined: AddressLike;
};
```
`tsc` throws tons of errors when trying to bundle this as a library. Is it normal for the keys to be `undefined`? I have a feeling this is off because I cannot build our library with the bindings created by Typechain.
For reference, our structs in Solidity look like:
```solidity
pragma solidity ^0.8.19;
struct CommonExtData {
address recipient;
int256 extAmount;
address relayer;
uint256 fee;
uint256 refund;
address token;
}
```
Contributor guide
Assessment
This issue has not been assessed yet.