Questions tagged [gas-price]

Questions dealing with the gas price of a transaction.

Filter by
Sorted by
Tagged with
0 votes
0 answers
84 views

How to estimate fee price for exact address using quicknode and web3?

I have this contract: 0x32400084C286CF3E17e7B677ea9583e60a000324 How could I get fee price which is recommended by the contract? So that it gives the same fee price as per MetaMask. This is https://...
Oleksandr Tserkovnyi's user avatar
0 votes
1 answer
188 views

Smart contract gas costs

What is the gas cost of deploying a Solidity contract, and how can I estimate it before deploying? Are there any strategies for minimizing deployment costs?
PSS's user avatar
  • 537
1 vote
0 answers
80 views

How to set gas price to zero?

I set Nethermind to zero gas price: "Blocks": { "MinGasPrice": 0 }, Nevertheless, MetaMask for this network shows rather big positive gas prices and does not allow ...
porton's user avatar
  • 1,774
0 votes
1 answer
258 views

Contract deployment on Polygon mainnet being stuck

So I've been trying to deploy the simplest contract on Polygon mainnet for hours now with no luck. The transaction is stuck on pending. I tried with many different contracts and I tried changing the ...
Hasan Khadra's user avatar
1 vote
0 answers
27 views

Error message after contract interaction was successful

When calling a contract function, I am getting the common unable to estimate gaslimit error message: Error: cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://...
Xing Li's user avatar
  • 33
1 vote
1 answer
97 views

0x swap api gas is doubled when adding feeRecipient and buyTokenPercentageFee

I would like to collect fees on trade using 0x API. But the gas in the quote response is doubled or more when adding feeRecipient and buyTokenPercentageFee which doubles the gas price users are paying....
mtx dev's user avatar
  • 11
0 votes
1 answer
52 views

reactjs get contract call fees

Chain used: Poylgon/mainnet or mumbai I am trying to get gas fees for a contract call. I should be able to let user chose if : Medium or High Same as metamask does it: but this should be done on user ...
heustfd gehsgd's user avatar
0 votes
1 answer
52 views

Ethereum Mainnet Error: "Migrations" could not deploy due to insufficient funds

Newbie to Ethereum NFT contract deployment here. So please bear with my questions. I am trying to deploy a ERC-721 contract to ETH Mainnet and I have 0.285 ETH in my wallet. But I am still getting ...
j7coder's user avatar
0 votes
0 answers
564 views

transfer all ether from one account to a smart contract with ethers.js

i want to transfer ALL the ether in my account to the smart contract. I am calculating the gasEstimate and then subtracting it from my total ether balance...but i get an ERROR saying code: -32000, ...
Sukirat Warring's user avatar
0 votes
1 answer
205 views

How to transfer all the coins that an account may have?

I have a system where there'll be dozens of accounts, for ETH and tokens. I'll have access to the private keys of those. From time to time I'll need to withdraw all of the coins in each account, in ...
Camila326's user avatar
  • 115
0 votes
1 answer
158 views

Who pays gas when one transaction triggers functions from multiple smart contracts

The scenario is when an EOA interacted with Function 1 from smart contract A. But in a single transaction, function 1 also makes calls to contract B, which makes calls to contract C. Question 1: Would ...
bzpassersby's user avatar
1 vote
0 answers
129 views

tx.gasprice gives wrong gas estimation

I am using tx.gasprice and block.basefee in my contract to calculate the used gas. The problem is that I can't estimate the gas correctly or sometimes not at all when the contract uses tx.gasprice;. ...
Marvin Daum's user avatar
0 votes
1 answer
117 views

Wrong gas estimation when using tx.gasprice

I use tx.gasprice and block.basefee in my Smart Contract to calculate how much eth the User spent, to send the spent amount back to the Relayer, because I am using meta Transactions. Now I wanted to ...
Marvin Daum's user avatar
2 votes
1 answer
1k views

How to get gas estimate and gas price on Polygon Mumbai Chain using web3.py?

I have deployed a contract on Goerli test net and used the following to get the estimated gas and current gas price. contract = web3.eth.contract(address=contract_address, abi=contract_abi) ...
Sam11's user avatar
  • 63
0 votes
2 answers
111 views

Issues with custodial and non custodial wallet smart contract interactions

We have smart contract for minting ERC721 tokens. The non custodial mints work fine through Javascript but custodial mints are always in pending state. We are using go-ethereum to make that smart ...
ethnoob's user avatar
0 votes
1 answer
71 views

Why isn't calldata used in this function's argument? (OpenZeppelin/OwnableUpgradeable.sol)

Solidity noob here; reading about data locations i've learned that whenever you don't need to store or modify a function's input value it's actually more gas efficient to set its location to calldata (...
user113310's user avatar
0 votes
1 answer
162 views

Transaction gas problem

I wanna send transaction and before that i wanna calculate the gas fee and input value as much as : finalAmount = value - gasFee For doing this i get gas price from provider this way: const gasP = ...
Alireza's user avatar
  • 350
0 votes
1 answer
371 views

HttpProviderError when trying to send a tx with lower gasPrice

I am trying to send a tx to Ethereum mainnet with a lower gas price than the current gas price to have it in pending state until the gas price drops and it is picked up. I am using ethers.js for my ...
Sebastian Dine's user avatar
0 votes
1 answer
98 views

Mysterious self transaction erased my funds on Metamask

I wanted to withdraw some ETH from Binance to my Metamask wallet via Ethereum ERC-20 protocol and some "self" transaction erased all of the amount via gas fees. Can you please help me out? ...
f22daniel's user avatar
  • 353
0 votes
2 answers
62 views

Gas settings when sending a tx

I currently have several txs stuck on Pending even after passing them 100 gwei of gasPrice while current baseFee is 0.000001086 gwei (on Goerli and using ethers.js). const ops = { gasLimit: ethers....
dNyrM's user avatar
  • 924
1 vote
1 answer
173 views

What are the specifics of the base fee formula?

Looking at the ethereum.org page on Gas I see that post-London upgrade base fees are calculated according to the size of the previous block relative the target gas limit of 15 million. Then I read: ...
voyenavion's user avatar
0 votes
1 answer
255 views

unit of tx.gasprice and block.basefee

I'm querying tx.gasprice and block.basefee on a mainnet fork pinned to block 15823986 -kind of recent one at the time of writing- and I'm getting 1991927019 and 991927019 respectively. If these values ...
dNyrM's user avatar
  • 924
0 votes
1 answer
62 views

Decode Ethereum Gas Price Golang

I needed to get gas data from a transaction, I did it with the code below. The received data has been converted to a string. Now I need to decode the received value. How can I do this? import ( &...
Nikita Shvetsov's user avatar
1 vote
0 answers
86 views

What is the right way to round the suggestBaseFee value from Etherscan Gas Tracker API?

We are currently trying to calculate the correct priority gas value in GWEI as displayed on the Gas Tracker page on Etherscan using this API: https://api.etherscan.io/api?module=gastracker&action=...
buckwhitzer's user avatar
0 votes
1 answer
218 views

Is the all of Gas Fee refunded if the transaction fails?

function burn(uint256 _value) public returns (bool success) { balances[msg.sender] = balances[msg.sender].sub(_value); totalSupply = totalSupply.sub(_value); Burn(msg.sender, _value); ...
imelon2's user avatar
  • 528
0 votes
1 answer
119 views

Do gas prices for NFTs depend on file size?

If I am minting NFT does the file size and type affect gas price, i.e. if that's 5 GB video or just a small 15 digits number? Thanks, Yury
Yury Moskaltsov's user avatar
0 votes
1 answer
36 views

Remix Static Analysis: Why gas cost message?

I am doing the static analysis of the following smart contract (SC) on Remix: pragma solidity 0.5.1; contract TxUserWallet { address owner; constructor() public { owner = msg.sender; ...
zak100's user avatar
  • 1,406
3 votes
5 answers
3k views

Goerli more expensive than Ethereum Mainnet

Currently, a transaction on Goerli is more expensive than the Ethereum mainnet. Why is that the case? Here is the contract: contract Test { uint x; function test() external { x += 1; } } ...
Ahmet Yazıcı's user avatar
0 votes
2 answers
828 views

How can I set Gas Price in Solidity?

Can I set gas price in internal transactions, of my functions? For example: // SPDX-License-Identifier: MIT pragma solidity 0.8.17; interface Itest { function sendToken(address to) external; } ...
dimokrit's user avatar
5 votes
2 answers
603 views

Finalized Empty blocks with 0 transactions and 0 block reward

This block was finalized 21 mins ago from now and there is one exactly like this waiting to get finalized Here is the link of that. Both of them had 0 transaction, 0 block reward, 0 extra data, 0 gas ...
R.V's user avatar
  • 96
1 vote
1 answer
164 views

is OPCODE applicable for sending ethers from wallet to another account?

I know smart contracts are converted to bytecodes and they are executing OPCODES in the EVM. But I want to know, what OPCODES does Wallet to wallet transactions have?
toddash's user avatar
  • 92
2 votes
1 answer
566 views

How to get gas price in Solidity smart contract?

I'm on the most recent version on solidity. "tx.gas" and "tx.gasprice" both dont work. They error with "Member "gas" not found or not visible after argument-...
Robert Muresan's user avatar
2 votes
2 answers
32 views

Effect on Gas Fee from Eth Merge and expected time to see changes

I am working on an NFT project for a client and I would like to know if I should wait to deploy the smart contracts to the mainnet for lesser gas fee as it is a financially restricted project and ...
SideChain Labs's user avatar
0 votes
0 answers
115 views

explain get chainlink VRF fee cost

Hi can somebody explain to me every variable and operator of this function
Dũng Đàm's user avatar
1 vote
2 answers
868 views

I need to know gas price C# Nethereum

How can I get current gas price? I want to calculate the gas fee per transaction. I need to multiply Gas Price by _estimatedGas. I looked at the Gas price on https://bscscan.com/ it's 5 Gwei. Can I ...
Oleg's user avatar
  • 11
0 votes
1 answer
56 views

ETH Transaction cancellation and overriding

Consider your transaction is pending in mempool for too long and you want it to be validated ASAP (I) or cancelled (II). I) AFAIK In this case you are suggested to make the same transaction again (...
Александр Тряпицын's user avatar
2 votes
1 answer
1k views

Transaction Effective Gas Price

I am developing in Go and I have a question that I have been looking for the solution for a long time and I am not able to find it. How can I find the effective gas price used in the transaction? Not ...
alopez's user avatar
  • 21
1 vote
1 answer
298 views

Gas allowance geth

I have deployed an Ethereum private network PoA with geth connecting 3 nodes: 2 nodes in aws EC2 instances and my own laptop. My purpose is to store strings in the network, so therefore, i have ...
WakiApi's user avatar
  • 33
0 votes
1 answer
34 views

Which transaction will be prioritised: send or send by approved

Let’s say my address is X and I have 10 USDT there. Address Y is approved spender of wallet X USDT funds, meaning that address Y can send USDT from address X. Address Z and W are some other addresses. ...
btrader's user avatar
  • 11
1 vote
2 answers
194 views

How to calculate GWEI back to ETH/USD?

According to Owlracle, right now the recommended Ethereum fees are: According to them, an Ethereum fee of 90.73 GWei is equal to roughly 7.7 USD. Can anyone explain how they get to that number? I ask,...
rockstardev's user avatar
0 votes
1 answer
30 views

Extremely high gas fees

I'm paying 0.38 gas fees in this function. There's something wrong with it? function claim() external { require(allowed[msg.sender] == true, 'This address is not allowed to perform withdrawns'); ...
Rodrigo Burgos's user avatar
0 votes
1 answer
287 views

Gas price limit in metamask Rinkeby

Unknown processing time Max fee:0ETH This error occurs while testing a front end application with smart contract. code :- //this is deposit function function Depoist(){ var depAmt = document....
Internet and Computer Probe's user avatar
2 votes
1 answer
566 views

Why do my blocks not have a baseFeePerGas property?

I've got a private network that's using the clique consensus protocol and is running using Geth (if that's relevant). I have been confused about gas and transaction fees, so wrote a script to look at ...
IpsRich's user avatar
  • 131
2 votes
2 answers
1k views

How do node providers (e.g. Infura, Alchemy) determine gas pricing on contract writes?

When writing to a smart contract, we can specify the priority and fee per gas. await contract.connect(owner).foo({ maxFeePerGas: "<YOUR FEE>" maxPriorityFeePerGas: "<YOUR ...
Reginal's user avatar
  • 75
1 vote
1 answer
119 views

Fee for making a transaction Vs fee for recording a transaction

I'm in the process of learning how to write smart contracts and make transactions using the Ethereum blockchain. I'm following this tutorial and it looks like making a transaction and then adding a ...
Sprout Coder's user avatar
-1 votes
1 answer
32 views

What is the state of the art of transaction costs in a pure gambling smart contract?

AFAIK, the vast majority of crypto gambling uses crypto only as a payment rail, and then implements the gambling step in a traditional (though usually provably fair) way. Using a smart contract to ...
gas-efficiency-man's user avatar
0 votes
1 answer
100 views

How to cover the gas fees?

I want to create a solidity smart contract (ERC20) for a play to earn and I would like to know how to reward the winners without them having to pay gas fees when they claim their winnings. I think ...
seikida's user avatar
  • 103
2 votes
0 answers
2k views

Set maxFeePerGas and maxPriorityFeePerGas dynamically in ethers js

I want to set the value of maxPriorityFeePerGas and maxFeePerGas these two parameters when sending a transaction, say 10 gwei greater than the response from getFeeData() function. /* provider....
SHRENIK SHAH's user avatar
2 votes
0 answers
85 views

Eth-gas-reporter typeError

I am trying to understand how the eth-gas-reporter works but I keep getting TypeError: invalid reporter 'eth-gas-reporter' when I ran truffle test. Specifically the output is: Using network '...
null_user's user avatar
0 votes
1 answer
129 views

Getting incorrect GasPrice from tx type 2

Having transaction sent from Metamask (ropsten network): 0xddd70e7d8dbd3cf5c0618501911b045464ae2087bd537aa538f34b8c9600dcc7 I'm watching transactions in new blocks using golang, and when tx match ...
nomvd's user avatar
  • 3

1
2
3 4 5
10