getFeeHistory type problem
Version: [email protected], [email protected]
https://docs.web3js.org/guides/web3_upgrade_guide/x/web3_eth_migration_guide#web3ethgetfeehistory
Actual type:
{
readonly oldestBlock: bigint;
readonly baseFeePerGas: bigint; // !! Not a string[] in the document or 1.x !!
readonly reward: bigint[][];
readonly gasUsedRatio: bigint[];
}
Which one is true?
@luu-alex
Hey Thanks for reporting this, we wont be able to update this for the V4 has this would be a breaking change but this is something we can change back for the next major release. in the meantime you can use web3.utils to change bigint -> hex
Hey Thanks for reporting this, we wont be able to update this for the V4 has this would be a breaking change but this is something we can change back for the next major release. in the meantime you can use web3.utils to change bigint -> hex
I just want to know which one is correct, document or type definition, not asking for a breaking change.
With 4.x, baseFeePerGas will return bigint. The type definition is correct. Thanks for catching this, if you would like to create a PR to fix the docs feel free. Otherwise @SantiagoDevRel can you take care of this problem
readonly baseFeePerGas: import("web3-types").NumberTypes[ReturnFormat["number"]]; should be Array?: readonly baseFeePerGas: import("web3-types").NumberTypes[ReturnFormat["number"]][];