Skip to content

Weird revert with forge test #2417

Answered by onbjerg
CaledoniaProject asked this question in Help
Discussion options

You must be logged in to vote

When you use address.transfer, the gas limit is set to 2300 gas (this is not because of Forge, this is just how it works). Emitting those logs cost 750 gas each for the LOG0 opcode alone, but there is additional opcodes involved as well (parsing the calldata, jumping, checking msg.value, pushing the strings etc.) so most likely you are running out of gas.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by CaledoniaProject
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants