Nethereum / Nethereum/Nethereum

Add capability to skip EstimatedGas

Open
#757 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
2.3k
Forks
744
PR merge metrics
No merged PRs in 30d

Description

Sometimes is needed to skip the gas estimation before sending the request, but leaving null the Gas field of FunctionMessage.

Using Metamask as EthereumHostProvider in an DAPP, when call ApproveRequestAsync (from Nethereum.Uniswap), Nethereum send eth_estimateGas call to Metamask not already signed because the DAPP does not know the user private key, Metamask route the message chain without signing it and some smart contract (like USDT 0x55d398326f99059ff775485246999027b3197955) that check for owner of the account return "BEP20: approve from the zero address" error.

I Please you to add an option (may be a bool inside the FunctionMessage class) to decide if skip or not the gas estimation.
Thanks.

Andrea

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with FunctionMessage and trace ApproveRequestAsync from Nethereum.Uniswap to the eth_estimateGas call used with MetaMask. Confirm how a null Gas value is handled, then define completion as an option that skips estimation when requested while preserving the existing estimation path otherwise.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
blockchain
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.