New answers tagged

0 votes

Ethernaut level 20 Denial probably no longer solvable. Why?

// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; contract AttackerContract { fallback() payable external { while(true){ } } } This solution ...
user avatar
1 vote

What should I do to mint 2000 items?

Maximum gasLimit on Evm-based(Ethereum) is 30 million gas for a TX. you can specify higher gas limit on your remix IDE. in large number of minting you may be faced with large amount of gas to pay ...
user avatar
  • 66
13 votes
Accepted

Why does ++i cost less gas than i++?

They do not work the same. i++ gets compiled to something like j = i; i = i + 1; return j while ++i gets compiled to something like i = i + 1; return i; Long story short, i++ returns the non-...
user avatar
  • 1,328
1 vote
Accepted

Why is the gas price so low even though daily transactions have not decreased

Just a supply/demand equation. Blocks are pretty much full, so you can't add too many txns to that chart. But if people are more ok with slower transactions, they won't be bidding up the gas price ...
user avatar
  • 3,369
0 votes

Discrepancy in gas prices in ENS

8 mos. old, but in case someone still wonders the answer.. Different transactions use different amounts of gas. The 83 is just the base GWEI for ETH transfers, which are the most simple trips of ...
user avatar
  • 1
0 votes

How to calculate GWEI back to ETH/USD?

Owlracle API uses the average gas used in the recent blocks to calculate the estimated fee. So if the fee is: gas price (in ether) * gas amount * ETH price And if we are getting 90.73 GWei for fast ...
user avatar
7 votes
Accepted

Why ether transfer sometimes use more that 21000 gas?

That's because when the normal transaction took place, there was no contract code at this address (it was created here at block 15158470, but the tx is at block 15152542). So all that was paid was the ...
user avatar
  • 5,889
2 votes
Accepted

Transaction gas cost in Foundry `forge` unit tests

It is not currently possible to create custom spans for gas reporting in Forge - or rather, Forge does not have a built-in mechanism for this. The only way you can achieve something similar, is to ...
user avatar
  • 170
0 votes

error: replacement transaction underpriced

I'm using Ganache and MetaMask suddenly stopped handling transactions, it queued the first one and every subsequent call would return either nothing or "transaction underpriced". Completely ...
user avatar
1 vote
Accepted

How much gas does the overflow check cost?

I have tested the following smart contract with an optimization of: 200000 contract TestGasCostUnchecked { uint256 a; function add() external{ unchecked { a = a + 1; ...
user avatar

Top 50 recent answers are included