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

getFeeHistory type problem #7135

Open
Jack-Works opened this issue Jul 3, 2024 · 5 comments · May be fixed by #7291
Open

getFeeHistory type problem #7135

Jack-Works opened this issue Jul 3, 2024 · 5 comments · May be fixed by #7291
Assignees
Labels
4.x 4.0 related Bug Addressing a bug Documentation Relates to project wiki or documentation P3 Low severity bugs

Comments

@Jack-Works
Copy link

Version: [email protected], [email protected]

https://docs.web3js.org/guides/web3_upgrade_guide/x/web3_eth_migration_guide#web3ethgetfeehistory

document

Actual type:

{
    readonly oldestBlock: bigint;
    readonly baseFeePerGas: bigint; // !! Not a string[] in the document or 1.x !!
    readonly reward: bigint[][];
    readonly gasUsedRatio: bigint[];
}
document

Which one is true?

@SantiagoDevRel
Copy link
Member

@luu-alex

@luu-alex
Copy link
Contributor

luu-alex commented Jul 7, 2024

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

@luu-alex luu-alex added 5.x 5.0 related issues Bug Addressing a bug labels Jul 7, 2024
@Jack-Works
Copy link
Author

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.

@luu-alex
Copy link
Contributor

luu-alex commented Jul 8, 2024

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

@sampleblood
Copy link

readonly baseFeePerGas: import("web3-types").NumberTypes[ReturnFormat["number"]];
should be Array?:
readonly baseFeePerGas: import("web3-types").NumberTypes[ReturnFormat["number"]][];

@mconnelly8 mconnelly8 added 4.x 4.0 related Documentation Relates to project wiki or documentation P3 Low severity bugs and removed 5.x 5.0 related issues labels Sep 16, 2024
@Muhammad-Altabba Muhammad-Altabba self-assigned this Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x 4.0 related Bug Addressing a bug Documentation Relates to project wiki or documentation P3 Low severity bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants