Content
@
0 reply
0 recast
2 reactions
J. Valeska 🦊🎩🫂
@jvaleska.eth
does someone know how to set the gas price in foundry? it is just ignoring the --gas-price command ?!
2 replies
1 recast
5 reactions
Ranger 🥷🎭
@just-nath
await vm.txGasPrice(2); const gasStart = await ethers.provider.getGasLeft(); await myContract.functionCall(); const gasEnd = await ethers.provider.getGasLeft(); // tx.gasprice is 2 due to the first line const gasPrice = 2; const gasUsed = (gasStart - gasEnd) * gasPrice; console.log("Gas used:", gasUsed);
1 reply
0 recast
0 reaction
J. Valeska 🦊🎩🫂
@jvaleska.eth
yeah, this is from stackoverflow, read it :) but, I need a gas price of 0.00.. and it does not let me set floating point numbers :) thank you 💜 (this just do the same as the command --gas-price) solved it by updating forge, just in case anyone got the same problem.
1 reply
0 recast
2 reactions