Questions tagged [gas-price]
Questions dealing with the gas price of a transaction.
492
questions
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://...
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?
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 ...
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 ...
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://...
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....
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 ...
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 ...
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, ...
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 ...
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 ...
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;.
...
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 ...
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)
...
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 ...
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 (...
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 = ...
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 ...
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?
...
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....
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:
...
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 ...
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 (
&...
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=...
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);
...
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
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;
...
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;
}
}
...
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;
}
...
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 ...
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?
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-...
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 ...
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
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 ...
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 (...
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 ...
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 ...
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.
...
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,...
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');
...
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....
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 ...
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 ...
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 ...
-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 ...
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 ...
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....
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 '...
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 ...