New answers tagged gas
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 ...
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 ...
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-...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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;
...
Top 50 recent answers are included
Related Tags
gas × 1530solidity × 457
transactions × 231
gas-price × 218
gas-limit × 189
gas-estimate × 153
contract-development × 133
ether × 109
fees × 103
remix × 89
out-of-gas × 87
web3js × 85
contract-design × 76
contract-deployment × 62
erc-20 × 61
evm × 61
go-ethereum × 60
contract-invocation × 53
metamask × 52
tokens × 47
mining × 42
optimization × 42
blockchain × 39
truffle × 38
storage × 38