ethereum-abi-types-generator
ethereum-abi-types-generator copied to clipboard
Duplicate length properties on responses
If a contract method response has a length
property on it, the generator creates an interface something like this:
interface SomeMethodResponse {
someProperty: boolean;
0: boolean;
someOtherProperty: BigNumber;
1: BigNumber;
length: BigNumber;
2: BigNumber;
length: 3;
}
the two conflicting length properties cause typescript (and esilnt) errors. I think that (at least for ethersv5) if you have a length property, it gets renamed to _length
so I think this should mimic that behaviour...
oh good catch.. so to confirm you have something called "length" on ABI ethers turns it to _length
right? or the other way around?
That's correct, yes.
good to know will look at both your issues the type
one may be a bit more of a rewrite but we should support it thanks for raising
Thanks for the quick response ❤️