Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [gas-price]

Questions dealing with the gas price of a transaction.

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

How to find gas settings for different chains?

I am using ethers.js and hardhat to deploy to different chains (testnets), but I don't know where to find the right gas settings. For example, if I wanted to deploy to the Aurora Testnet and used the ...
user avatar
  • 121
0 votes
0 answers
14 views

I get this error --We were not able to estimate gas. There might be an error in the contract and this transaction may fail,

when I try to transfer ownership, I get higher gas fees like 0.35bnb, and this message Transaction decoding is not available for chain ID 56, can any help? the contract has been added some liquidity ...
user avatar
0 votes
1 answer
24 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 ...
user avatar
  • 15
0 votes
0 answers
13 views

How do I determine the gas limit properly?

So I developed a minting website. But I don't know how can I determine and set the gas limit for users. I am new to blockchain.
user avatar
0 votes
0 answers
16 views

global variable vs state variable access gas cost

what costs more gas, accessing a global variable (like block.timestamp) or a state veriable (in particular, a value in a struct in a mapping, like infos[id].time) ?
user avatar
  • 101
1 vote
1 answer
27 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 ...
user avatar
-1 votes
1 answer
22 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 ...
user avatar
0 votes
1 answer
22 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 ...
user avatar
  • 103
0 votes
0 answers
12 views

Average basefee in Solidity

is there some way to get an average gas price over a certain period of time (e.g. week or month) in Solidity. I am aware that this would probably require an oracle. Is somewhere such an oracle ...
user avatar
0 votes
0 answers
75 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....
user avatar
1 vote
0 answers
12 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 '...
user avatar
0 votes
0 answers
14 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 ...
user avatar
  • 1
1 vote
1 answer
76 views

High Gas Flashbots Transaction

I'm trying to better understand flashbots impact on frontrunning. Can anyone help me understand why this sandwich attack tx from a Flashbots bundle would pay such a high gas price? Here is a similar ...
user avatar
  • 123
0 votes
0 answers
43 views

How to automatically get gas and gas price average values in web3.js?

I want to automatically get gas and gas price averages in web3.js and update them periodically. Here are the values (low, average, high) for gas prices. But they are constantly changing, and changing ...
user avatar
  • 117
0 votes
0 answers
21 views

Do you lose miners tip (priority fee) when transaction is reverted?

When a transaction fails or gets reverted do you lose miners tip aswell as gas fee? Also when it says "Error: internal transaction reverted" does that mean I got outgassed by someone else ...
user avatar
0 votes
0 answers
16 views

Gas fee for deploying smart contract

From ETH gas station, I see that the fee is relatively low. However, when I tried to deploy my own smart contract, why does it cost so much more? Is it a way to deploy my smart contract cheaper? ...
user avatar
0 votes
0 answers
16 views

How to use EIP-1559 gas instead of legacy gas in 1inch APIs?

I'm developing a web application (both frontend and backend) that executes swaps through the 1Inch APIs. When executing a transaction, it looks like it's using the legacy gas. However, I would like to ...
user avatar
0 votes
0 answers
34 views

Transaction underpriced on Metamask?

I'm trying to burn one of my ERC721 tokens in my deployed contract but as you can see from my image the transaction fails with that error even if I did not touch anything when metamask prompts me to ...
user avatar
0 votes
0 answers
26 views

Can we sign and approve a transaction or call a function from our NodeJS Backend without involving metamask?

I am creating an NFT marketplace where I need to accept fiat payments. I am using stripe and after confirmation of fiat payment, I want to call the transfer function of my smart contract from NodeJs ...
user avatar
0 votes
1 answer
18 views

Does it cost gas to cancel a transaction? Can I replace / speed up the transaction to just 1 gwei then cancel to reduce fees?

My transaction is stuck, but can I speed it up by replacing the fee with 1 gwei then cancel it to reduce the fees to cancel? I tried to cancel and speed up but its still stuck. I check etherscan and ...
user avatar
1 vote
0 answers
43 views

Do providers block transactions sent with a too low gas fee?

I am getting the following error when deploying a contract: ProviderError: err: max fee per gas less than block base fee, address ..., maxFeePerGas: 45000000000 baseFee: 63475853125 (supplied gas ...
user avatar
  • 864
1 vote
0 answers
40 views

What settings should a private PoA blockchain have to be free to use? ( No ether in use )

I am a total noob in creating blockchains, and I am trying to make one using geth with PoA. I want to make a PoA private blockchain where transactions and smart contracts ( usage and deployments ) are ...
user avatar
0 votes
1 answer
43 views

How to integrate Chainlink Fast Gas oracle

I am trying to estimate the gas fee in USD for a function call. I came across the term "Chainlink Fast Gas oracle" but I couldn't find any documentation on how to use this in a smart ...
user avatar
  • 118
0 votes
1 answer
15 views

Any alternative to while loop in conditional scenarios in solidity?

I am developing an NFT Marketplace with Dropsite module where free NFTs will be Distributed randomly. There are 3 categories of NFTs with fixed number as follows: Platinum: 150, Gold: 350, Silver: 500 ...
user avatar
0 votes
2 answers
50 views

Understand the output of eth-gas-reporter

So, I am using the eth-gas-reporter package to understand how much gas functions costs (via hardhat test). But I don't understand the output. What is the meaning of 5 gwei/gas,calls, what are the ...
user avatar
  • 118
0 votes
1 answer
29 views

Does it make a difference using multiple setter functions vs a single generic one?

Let's say I have an enum and set the default: enum Status { INACTIVE, FAIL, SUCCESS, PENDING } Status public myStatus = Status.INACTIVE; I'm wondering if one approach to updating ...
user avatar
1 vote
1 answer
204 views

Estimate gas fees for smart contract function call with Ethers.js

Let's say you have a function in your smart contract, like: function saveUser(address newUser) public { // Saving user } How can we estimate, with Ethers.js, what the gas price will be for ...
user avatar
1 vote
1 answer
253 views

What is max amount of ETH that can be spent during a single transaction (theoretically)

I know users can set up a gas limit as not to spend too much. I am also aware of the "gas block limit" (how much gas can be consumed in a single ETH block). However, the user can set the gas ...
user avatar
  • 592
0 votes
0 answers
23 views

Airdrop is Very Expensive

Cannot figure out why my Airdrop is costing so much gas. Testing on the Binance Smart Chain even when I try to send to just a few addresses metamask alerts transaction will fail and gas limit is over ...
user avatar
  • 1
0 votes
1 answer
35 views

How to get receipt gasUsed in string?

I'm using ethers.js and I do remember using console.log(Gas used: ${receipt.gasUsed.toString()}) before and I could get the gasUsed in string. But now it's returning the error TypeError: Cannot read ...
user avatar
0 votes
0 answers
278 views

Error: Transaction's maxFeePerGas (0) is less than the block's baseFeePerGas (527514873)

Not Able to deploy to Ganache- Local chain, I have tried using func from Web3.eth , tried to import GasNowStrategy, Redownload the ganache as well and also tried to copy exact same code from GIT. ...
user avatar
0 votes
2 answers
53 views

metamask Gas price must be greater than 0

I am using a private block chain that has zero gas prices. When I try to set the gas price to zero in MetaMask, I get the error, "Gas price must be greater than 0". Is there anyway to use ...
user avatar
0 votes
1 answer
425 views

Problems while deploying smart contract on Polygon mainnet

I'm trying to deploy a Smart Contract on Polygon mainnet but this happens when I run the migrate command using truffle > Network name: 'matic' > Network id: 137 > Block gas limit: ...
user avatar
0 votes
2 answers
98 views

A smart contract that receives USDT, not on ethereum

Ethereum is pretty expensive so I'm looking for other blockchains where I can deploy a smart contract that can receive USDT and transfer USDT to other addresses. Are there any that user Solidity? what ...
user avatar
0 votes
2 answers
213 views

How to convert gas price in GWEI to USD or ETH?

I'm using Etherscan Gas Fee API to get current gas fees in GWEI. It can only return gas fee in GWEI and I tried to find online but can't find an answer on how to convert the Fee from GWEI to ETH or to ...
user avatar
  • 3
0 votes
1 answer
143 views

Changing Gas Price value in Metamask input field with JS

Hello I have a problem when I need to accelerate transaction in Metamask, I want to increase the gas fee price but it`s not working... As u can see in image I run script to change value but metamask ...
user avatar
-1 votes
1 answer
418 views

Make my smart contract receive usdt [duplicate]

How can I make a smart contract receive usdt, and how the users are going to send it?
user avatar
0 votes
1 answer
41 views

How much it cost to deploy a smart contract which creates more smart contracts on Ethereum MainNet?

I want to create a smart contract which deploy smart contract to each user who use it "AllUserMetaData", therefore for each user one smart contract will be deploy. How much does it cost to ...
user avatar
0 votes
0 answers
94 views

tx fee exceeds the configured cap in a private ethereum sidechain

i need your help with this one. I have been struggling with the same issue for days now. I'm getting this error response (tx fee exceeds the configured cap (1.00 ether) when i try to set a relatively ...
user avatar
2 votes
0 answers
84 views

What does tx.gasprice represent after EIP-1559?

Now that ethereum has switched to using a base and priority fee system, what does tx.gasprice represent in solidity? Would calculating tx.gasprice - block.basefee give me the priority fee for the ...
user avatar
  • 521
1 vote
0 answers
49 views

block.basefee, tx.gasprice and gasleft() in Optimism/Arbitrum

Does block.basefee, tx.gasprice and gasleft() work the same in Optimism and Arbitrum as they do on L1? If not, how do they differ? Do these L2s even have a base fee like L1 does? I'm trying to make a ...
user avatar
  • 521
0 votes
0 answers
41 views

deploy one or multiple contracts?

I want to allow my users to make agreements between them. Each agreement is between exactly two users, and is handled by my smart contract. Should I deploy a new instance of the smart contract each ...
user avatar
0 votes
0 answers
175 views

Gas cost on Polygon chain?

If you know the cost of say, deploying a contract on Ethereum MainNet ends up being about $500.00, can I approximate the gas fee on of deploying the same contract on Polygon to be something like $500 ...
user avatar
  • 417
0 votes
0 answers
37 views

Is there a tool in VScode to predict optimal amount of gas price?

On MetaMask, it shows you the optimal (estimated) gas price (and you can even tweak it). Is there a similar tool for VSCode (Visual studio code) as well? Below is the screenshot of MetaMask:
user avatar
  • 118
0 votes
0 answers
49 views

How can I format gas price with eth-hooks?

import { useGasPrice } from 'eth-hooks' //using version 2.3.16 const NETWORK = { name: "mainnet", color: "#ff8b9e", chainId: 1, rpcUrl: REACT_APP_INFURA_ID, ...
user avatar
0 votes
0 answers
21 views

Getting gas price on (any) chain

In a multichain app, in which txs results depend on the gas price in that precise moment, how can I reliably get the gas price on chain? AFAIK I only see a GasPrice Chainlink oracle for Ethereum. What ...
user avatar
2 votes
2 answers
525 views

Error "replacement transaction underpriced" using Nonce method of cancelling transaction

I have a pending transaction that is not going through because of low gas price. I tried sending a new transaction with the same 57 nonce (https://etherscan.io/tx/...
user avatar
1 vote
0 answers
18 views

How do miners choose what transactions to include first in the block (after London)?

I have read Does using a very high gas limit somehow get your transactions executed slower? and How transactions are selected by the miners? My main question is the same, how do miners include ...
user avatar
  • 11
0 votes
0 answers
9 views

Ethereum transaction completed before another one with higher fee [duplicate]

1st transaction: https://etherscan.io/tx/0x2740f16684965d2e19469032a0e05e115fa07c017355041aedad7d4d25a83031 2nd transaction: https://etherscan.io/tx/...
user avatar
  • 1
0 votes
1 answer
36 views

Sending ethers in bulk to an array of addresses - advise on gas price and execution

Would bulk transfers work without failure/revert even if the below for loop is for 50,000 to 100,000+ accounts in bidders array? mapping(address => uint) public bidderAmount; address[] public ...
user avatar
  • 62

1
2 3 4 5
9