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

Get gas right on polygon and reenable #60

Closed
wildmolasses opened this issue Jan 23, 2023 · 0 comments · Fixed by #68
Closed

Get gas right on polygon and reenable #60

wildmolasses opened this issue Jan 23, 2023 · 0 comments · Fixed by #68
Assignees

Comments

@wildmolasses
Copy link
Contributor

Let's see what conclusion results from sdk suggestions. If gas estimation is no longer a prereq, then great; otherwise we can use something like polygon gas station to calculate gas.

c.f. @mds1 element chat:

https://github.com/ethers-io/ethers.js/blob/bf0b468490cb293cd916e4fff06e0909273719e6/packages/abstract-provider/src.ts/index.ts#L252
so yea, 1.5gwei is just hardcoded by ethers
but we can just copy their logic

maxPriorityFeePerGas = BigNumber.from(30 gwei);
maxFeePerGas = block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas);

related open issue: ethers-io/ethers.js#3370
another one ethers-io/ethers.js#2828
seems people use https://wiki.polygon.technology/docs/develop/tools/polygon-gas-station/ manually for polygon
nice looking implementation here: ethers-io/ethers.js#2828 (comment)
good explanation from ricmoo here: ethers-io/ethers.js#2828 (comment)

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

Successfully merging a pull request may close this issue.

2 participants