Questions tagged [gas-price]

Questions dealing with the gas price of a transaction.

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

Would a dynamically generated variable use less gas than storing a large list in the contract?

Let's say I need a large array of items that are all the combinations of a number of arrays, eg: ['a','b','c','d'... ['1','2','3','4'... ['z','x','c','v'... ... The resulting list would be something ...
0
votes
1answer
28 views

Cost of event vs Storage

I have 2 approaches to store result of an election in the contract. I can store the result corresponding to different candidates. I do some computation and keep on updating the storage in the ...
0
votes
1answer
42 views

Event logs vs Storage in Solidity

In my ethereum smart contract, I have a function that registers a user (by adding a user object to a mapping). I am also triggering an event after successful registration to notify the user about the ...
0
votes
0answers
71 views

how to calculate the gas fee of my nft mint transaction

I have the following function to mint a nft on my smart contract (I am using the open zeppelin ERC721 contract) but I would like to stimate the gas feet from my web3 dapp. I know the formula is ...
3
votes
0answers
31 views

Does anything change on getGasPrice( ) in Web3js after EIP-1559?

Using getGasPrice in web3js returns the last few blocks median gas price. After EIP-1559, the fees system is divided into Base + Tip. My question is, what is returned using getGasPrice after EIP1559? ...
0
votes
0answers
15 views

Are ERC777 cheaper in transaction gas fees vs ERC20? And what is the major differences?

ERC777 is compatible with ERC20, but are the gas fees cheaper when sending? And what are some of the major differences in pros and cons vs ERC20? And what are some tokens already using this new ERC777 ...
0
votes
0answers
9 views

How to calculate tx fees per kb data, post London update

How does the London update affect price of data storage on ethereum? And how can I calculate the cost to store 1KB, 10KB, 100KB worth of data into the ethereum blockchain?
0
votes
1answer
22 views

Gas is too high in contract

I have the following stake function that whenever I call it uses almost 100.000 gas. I did the usual stuff optimizing the code to use less gas like using structs and uint256, but the gas price is ...
0
votes
0answers
15 views

Import existing code in Solidity, does it affect contract gas price?

I understand that import your own code in smart contract effect it's gas price (you can find more here: Import in Solidity.. Does it affect the Gas?) But what about already existing code? Let's say I'...
0
votes
0answers
68 views

Minting multiple ERC721 tokens estimating gas cost error

I have a function to mint multiple NFTs in my smart contract (max 10). I have another function to transfer the tokens to the msg.sender. Using hardhat locally, this all works nicely. However on the ...
0
votes
0answers
13 views

Any point to use storage for deterministic hash values that could just be computed every time instead?

I have a contract that assumes millions of people will all read the hash of the same number. I prefer to let the hash be computed once, and then stored. Like in example 1 below. But, gas-wise, it is ...
0
votes
0answers
8 views

When sending ETH from a contract, how do you get the amount that will be sent to the owner after gas?

Let's say I have a basic escrow contract that can send and receive ether to any EOA. Now I deposit 1 ETH into the contract as Bob and call the contract to send it to Alice. But Alice needs to recieve ...
1
vote
1answer
42 views

How do I retrieve the exact gas costs spent for a transaction with ethers.js?

Running const receipt = await contract.mint(4) console.log(receipt) gives me the following transaction receipt { hash: '...
1
vote
2answers
25 views

Is speculation over blockchains cryptocurrencies causing problem [closed]

So, based on what we can find on the internet, most of the transaction is done over blockchains (no matter which you pick) is for speculation purposes. Since: the transaction fees are based on the ...
1
vote
1answer
66 views

How does metamask come up its suggested gas fees?

How does metamask come up its suggested gas fees? How does it come up with a certain amount? What is it optimised for? Should you just use it or should you set your own?
0
votes
1answer
101 views

How do I set a gasPrice with ethers deploy script?

I'd like to set a gasPrice in my deploy script, so I could deploy and let miners pick up my transaction when gas is low. Like deploy my contract over night while I'm sleeping to save money. How can I ...
0
votes
1answer
227 views

Gas usage by the OpenSea ERC-721 example code

I am currently trying to mint some ERC-721 non-fungible tokens to the OpenSea website. I am following this tutorial and have got everything working on the testnet. My collection has been minted on ...
0
votes
0answers
16 views

Type-2 Transactions

There are a couple of tx-hashes such as txhash1 and txhash2 that has Gas Price == Miner Tip attirubute. How it that possible? Can you not pay any base fee and just pay everything to miner?
0
votes
0answers
23 views

Where do bot front bot runners get initial liquidity?

In order to pull off front running attacks or arbitrage, a person who runs a bot has to have enough liquidity, doesn't he? For instance, to beat a transaction of 100 ETH he'll have to do this amount ...
0
votes
0answers
33 views

When is the best time to make a ETH transaction without paying high gas fees?

Currently the gas prices are 100 gwei at 6AM EST. It would cost me $50 worth of eth to interact with a smart contract. When is the best time and day to do these transactions? Is there some type of ...
1
vote
0answers
25 views

How can exchanges afford to offer free deposits for ETH and ERC-20 tokens?

The question has been asked previously but the accepted answer does not hold a candle to reality: In both cases, the exchange pays the gas fee to send the tokens to the hot wallet. That's why the ...
0
votes
1answer
134 views

Getting current base fee from json rpc

I'm looking for a way to fetch current base fee using JSON RPC (and go-ethereum ethclient.Client as client) I'm aware of new JSON RPC eth_maxPriorityFeePerGas which gives me second parameter - but ...
2
votes
2answers
83 views

I set a 3 gwei for gas price. Now my transaction has been pending for 48+ hours now. But blocks aren't even full!

I tried to set a gas price of 3 gwei for interacting with a smart contract. Now the transaction is pending for 48+ hours. If the blocks aren't full, why dont the miners pick it up? I can bump the fee ...
0
votes
0answers
56 views

Insufficient funds for intrinsic transaction "response" "jsonrpc 2.0 method=sendTransaction

I have a problem, when i try to buy a token with my sniper bot have this error. I have > funds of gas require. this is my script (i use BNB) const ethers = require('ethers'); const prompt = ...
1
vote
1answer
467 views

gas fee on OpenSea

First, I'm brand new to the Ethereum platform, so I do apologise if any of the following is considered stupid questions. Now, I will ask my question anyway I am setting up the first sale of one of my ...
1
vote
1answer
47 views

If blocks aren't full, why can't I set a gas fee of 1-10 gwei? Who dictates that it needs to be 20-30 gwei when blocks aren't even full?

If blocks aren't full, why can't I set a gas fee of 1-10 gwei? Who dictates that it needs to be 20-30 gwei when blocks aren't even full? And where is the best place to adjust my gas fee if I don't ...
0
votes
1answer
20 views

Decode hexadecimals gas and gas price values "0xd9c5"

Hello i have following kvp: { gas: "0xd9c5" } But the ABI do not have gas func and the interface is not able to decode it, any idea how to decode the gas to extract the value when is ...
1
vote
1answer
215 views

Why, after the London Fork, the average gas price of mined blocks is so lower than the needed gas price to have transactions included?

I understand the reason behind empty blocks but it seems to me that after the EIP-1559 the average gas prices of the transactions in the mined blocks are really low compared to what is the needed gas ...
0
votes
1answer
25 views

Transactions that paid 0 fees

I took a sample of transactions from 2021-07-03 till 2021-07-05 and there seems to be a lot of transactions that paid 0 ETH in fees: `as.Date(dt)` count `min(dt)` `max(dt)` <...
0
votes
0answers
21 views

Is it possible to pay low gas price for low computation transaction?

I'm trying to update storage variable in my deployed smart contract every 5 minutes. Though this needs low computation power and therefore requires low gas amount, it is hardly payable as gas price ...
0
votes
0answers
19 views

Nested contracts gas fee implication

Let’s say I have a contract calling another contract calling another contract. Does this also impact the fee for executing the first contract?
0
votes
1answer
64 views

How to get Low / High gas price with ethers.js?

On etherscan gas tracker there are three gas prices: Low / Avg / High. The code var gasPrice = await provider.getGasPrice() only returns the Avg price. Sometimes I need the Low/High price, how to get ...
7
votes
1answer
147 views

How does EIP-1559 make Ethereum fees better?

I have a few questions that are mostly related to each other. I don't understand how EIP-1559 makes it a better way than the current one about fees. Since EIP-1559 brings priority fees and miners ...
0
votes
0answers
20 views

Does it cost more gas to call a function more than once in another function?

Does it cost more gas to call a function more than once in another function? For example: function getValue() public returns(uint){ return 5; } function getOtherValue() public returns(uint){ ...
0
votes
0answers
20 views

Hardhat config not working

I have defined from gas price gas limit in the config file but it picking up the default one not what I have defined.
0
votes
1answer
66 views

Ethereum gas fees

I am attempting to deploy a simple erc 20 token on the ethereum mainnet. I have tried twice now to deploy the contract each time paying around $20 in gas fees for contracts that would run out of gas ...
0
votes
1answer
87 views

very expensive remix NFT deployment

I'm testing a hello world NFT deploying with remix but the transaction without anything, says is $100?? why is this so expensive? what am I doing wrong? here the import is the only code on the .sol ...
0
votes
0answers
35 views

Lifecycle of transaction when sent via web3

I'm trying to optimize the speed between the time the tx is sent and the tx is mind on polygon (matic) blockchain via web3. I tried to raise significantly the gasPrice but it still takes a lot of time....
0
votes
0answers
39 views

Calculate estimated transaction time using web3.getGasPrice?

I am trying to estimate the time a smart contract will take to execute a particular function, based on a user-selected gas price. I have seen time estimates in various explorers - like so, on ...
0
votes
0answers
22 views

What is the gas cost when manipulating on-chain variable multiple times within one transaction?

Changing variables that are stored on the blockchain is expensive. How are gas costs calculated if I change one variable multiple times within the same transaction? For the sake of having a simple ...
0
votes
0answers
309 views

Transaction Underpriced at gas price less than 10Gwei on Binance Testnet

I am working on BEP20 token which I eventually want to deploy on the Mainnet. I have currently deployed the token on the Testnet. I am using metamask as my wallet. When I interact with the contract ...
0
votes
0answers
9 views

Bypass pending contracts in contract deployment?

I have 1 contract pending, and 1 contract queued for deployment due to low gas fees. I wish to deploy a 3rd contract that will bypass these two. The first contract has nonce 0. Sufficient gas fees ...
0
votes
0answers
29 views

Difference in Gascost between buying on Uniswap through UI and interacting with Uniswap Router contract on Etherscan

Why is the gas cost of going to uniswap.exchange and making a trade (significantly!) lower than the gas cost of going to https://etherscan.io/address/0x7a250d5630b4cf539739df2c5dacb4c659f2488d#...
2
votes
1answer
146 views

Why does smart contract successfully deploying to Rinkeby fail to deploy to mainnet?

truffle.js: var HDWalletProvider = require("truffle-hdwallet-provider"); var mnemonic = ""; module.exports = { networks: { development: { host: "localhost", ...
0
votes
1answer
36 views

Editing gas price to limite contract deployment cost?

My smart contract costs 3.65 USD to deploy from truffle-cli. I wish to accomplish this in 2.5 USD. Is it possible to limit the gas price in gwei in truffle-config.js to accomplish this? I don't mind ...
1
vote
1answer
40 views

Why is my transaction with a really high gasPrice pending?

I have created a transaction on the Polygon mainnet with a gasPrice of 496 GWEI (this is 496 times more than the normal gasPrice) and a gasLimit of 2,000,000. The transaction is a simple ERC20 ...
1
vote
1answer
22 views

Does copying mappings variables that are large such as balances cosume a lot of gas?

In erc20 contracts, conventionally balances mapping saves the current balance the users are holding. mapping (address => uint256) private balances; If this contract has a lot of users( which means ...
1
vote
1answer
271 views

Getting "ValueError: intrinsic gas too low" when trying to make a basic swap on Quickswap (polygon/matic)

I'm using Brownie to try and make a basic swap on Quickswap: from brownie import accounts, config, network, interface def main(): """ Runs the make_swap function on the Uniswap ...
0
votes
0answers
11 views

Re-send Transaction With Higher Gas Price In Web3js

I've seen that the geth client has functions to re-send transactions with a higher gas price but I'm not seeing that functionality anywhere in the web3js client. Does it exist? If not, is it ...
0
votes
0answers
25 views

Traded like 12$ of ethereum for husky at like 6 GWEI how long do those trades usually take?

I tried using "UniSwap" but 40$ prices for a 12$ trade seemed ridiculously high so I just went on a random site which allowed me to change "gwei" and I put it to 6 I think, I also ...

1
2 3 4 5
8