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

Add estimateGas() method to JsonRpcProvider #97

Closed
arimgibson opened this issue Apr 23, 2022 · 4 comments
Closed

Add estimateGas() method to JsonRpcProvider #97

arimgibson opened this issue Apr 23, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@arimgibson
Copy link
Contributor

Similar to the getGasPrice() method on JsonRpcProvider, this method estimates the gas price after being given additional information about the transaction being added to the blockchain.

ethers.js equivalent - provider.estimateGas

const essentialEth = require('essential-eth');
const provider = new JsonRpcProvider();
provider.estimateGas({
    to: '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41',
    data: '0x3b3b57debf074faa138b72c65adbdcfb329847e4f2c04bde7f7dd7fcad5a52d2f395a558'
})
// 25245 (in gwei)
@arimgibson arimgibson added the enhancement New feature or request label Apr 23, 2022
@arimgibson arimgibson added the good first issue Good for newcomers label Apr 23, 2022
@icepy
Copy link
Contributor

icepy commented May 17, 2022

i want would tryid it.

@dawsbot
Copy link
Owner

dawsbot commented May 17, 2022

You are assigned @icepy . Let me know if you need help or have questions!

@icepy
Copy link
Contributor

icepy commented May 21, 2022

@dawsbot
Copy link
Owner

dawsbot commented May 21, 2022

@dawsbot dawsbot closed this as completed May 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants