web3.js
web3.js copied to clipboard
refactor: eip1559 defaults
Description
The current 2x default for maxFeePerGas and 2.5x for priority fee are both not customizable as defaults and I think too high as a default. If a user has just enough to pay gas fees at near current rates he might not have the 2x amount that needs to be reserved for the TX.
- change defaults to 1.3x for basefee and 1gwei for priority fee
- add ability to change those defaults via the options object
Type of change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Checklist:
- [ ] I have selected the correct base branch.
- [ ] I have performed a self-review of my own code.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the documentation.
- [ ] My changes generate no new warnings.
- [ ] Any dependent changes have been merged and published in downstream modules.
- [ ] I ran
npm run dtslint
with success and extended the tests and types if necessary. - [ ] I ran
npm run test:cov
and my test cases cover all the lines and branches of the added code. - [ ] I ran
npm run build
with success. - [ ] I have tested the built
dist/web3.min.js
in a browser. - [ ] I have tested my code on the live network.
- [ ] I have checked the Deploy Preview and it looks correct.
- [ ] I have updated the
CHANGELOG.md
file in the root folder.
This pull request introduces 1 alert and fixes 2 when merging daaa366442d33bad8e69ac4d073a304a7ca891ed into 8620cba19f2a9250d395e0717669b274a89521a5 - view on LGTM.com
new alerts:
- 1 for Syntax error
fixed alerts:
- 1 for Useless conditional
- 1 for Prototype-polluting assignment
Thanks for reaching out to us. Currently, we are focused on the 4.x rewrite. However, feel free to open a PR.
Changing the default values would be a big change for a lot of users. Creating defaults (like defaultCommon
) that could be set for all transactions in an instance could work.
@sirpy +There are many tests failing in CI
This PR has been automatically marked as stale beacause it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.
This PR has been automatically marked as stale beacause it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.