Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structs are incorrectly generated in Typechain #826

Open
drewstone opened this issue Apr 25, 2023 · 0 comments
Open

Structs are incorrectly generated in Typechain #826

drewstone opened this issue Apr 25, 2023 · 0 comments

Comments

@drewstone
Copy link

drewstone commented Apr 25, 2023

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

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:

pragma solidity ^0.8.19;

struct CommonExtData {
	address recipient;
	int256 extAmount;
	address relayer;
	uint256 fee;
	uint256 refund;
	address token;
}
@drewstone drewstone changed the title Structs may be incorrectly generated in Typechain Structs are incorrectly generated in Typechain Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant