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

Use estimateGas for gasLimit instead of arbitrary value #219

Open
TimDaub opened this issue Jun 7, 2019 · 1 comment
Open

Use estimateGas for gasLimit instead of arbitrary value #219

TimDaub opened this issue Jun 7, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@TimDaub
Copy link
Collaborator

TimDaub commented Jun 7, 2019

Scope

  • Currently when sending a transaction from a metaAccount, we simply take an arbitrary gasLimit value e.g. 200000
  • Often these transactions use way less gas
  • web3 implements a method on its Contract methods interface that is estimateGas
  • This runs a gasLimit simulation locally and returns a gasLimit that fairly accurately predicts how much gas will actually be spent

Deliverables

  • Identify all occurrences where gasLimits are set arbitrarily and replace them with estimateGas

Gains for the project

  • Users have to spend less money on sending transactions

Roles

bounty gardener: @TimDaub / 10%
bounty worker: name / 75%
bounty reviewer: name / 15%

@TimDaub TimDaub added the bug Something isn't working label Jun 7, 2019
@TimDaub TimDaub added this to the Sprint 1 milestone Jun 7, 2019
@johannbarbie johannbarbie added this to To do in Bounties Jun 7, 2019
@riusricardo
Copy link
Contributor

riusricardo commented Jun 7, 2019

@TimDaub Before creating this bounties, you need to take into account some previous limitations that we encountered on this.

  1. xDai returns a bad estimation if it doesn't has a lot of transactions on the previous blocks. Attempt to evaluate a gas price before relaying a call #105 #9795
  2. Metamask didn't accept the getGasPrice call on its web3 API.
    This is why it remained hard-coded. However it should be good to take another look and try to fix it.

@johannbarbie johannbarbie removed this from the Sprint 1 milestone Jun 13, 2019
@johannbarbie johannbarbie removed this from To do in Bounties Jun 13, 2019
iamonuwa pushed a commit to iamonuwa/burner-wallet that referenced this issue Jul 17, 2019
…e-state

Use new state variables for amount values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants