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
J. Valeska 🦊🎩🫂
@jvaleska.eth
already solved, I may had an outdated version of forge..
0 reply
0 recast
2 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