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

Polygon chain trades gas price insufficient - 1.7.1 #4857

Closed
1 task done
0123cf opened this issue Mar 16, 2022 · 4 comments
Closed
1 task done

Polygon chain trades gas price insufficient - 1.7.1 #4857

0123cf opened this issue Mar 16, 2022 · 4 comments
Labels
1.x 1.0 related issues Bug Addressing a bug Stale Has not received enough activity

Comments

@0123cf
Copy link

0123cf commented Mar 16, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Polygon Chain was unable to initiate transactions and gasPrice was in serious shortage

Expected Behavior

The default gasPrice won't work on Matic, which is currently 2, but actually needs at least 30.

Should maxPriorityFeePerGas not get, use responses.GasPrice

Steps to Reproduce

Contract.methods
.creatorClaim(poolId)
.send({ from: address })

Web3.js Version

1.7.1

Environment

  • NPM Version: 1.7.1

Anything Else?

No response

@0123cf 0123cf added the Bug Addressing a bug label Mar 16, 2022
@jdevcs jdevcs added the 1.x 1.0 related issues label Mar 16, 2022
@0123cf
Copy link
Author

0123cf commented Mar 17, 2022

version: 1.7.2

use

provider.defaultOnlineGasPrice = 1;
const web3 = new Web3(provider);

@0123cf
Copy link
Author

0123cf commented Mar 24, 2022

polygon use WalletConnect

NewBlockHeaders usage reference is not supported

provider.notSupportNewBlockHeaders = 1;
const web3 = new Web3(provider);

@github-actions
Copy link

This issue has been automatically marked as stale because 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.

@github-actions github-actions bot added the Stale Has not received enough activity label May 24, 2022
@jdevcs
Copy link
Contributor

jdevcs commented May 24, 2022

Based on user needs, instead of using default maxPriorityFeePerGas 2.5 Gwei there is method of setting it explicitly:

  1. estimate maxPriorityFee by using getfeehistory https://web3js.readthedocs.io/en/v1.7.3/web3-eth.html#getfeehistory
  2. set it explicitly using tx.maxPriorityFeePerGas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.0 related issues Bug Addressing a bug Stale Has not received enough activity
Projects
None yet
2 participants