8

Since events are stored in the transaction receipts trie they should influence the gas a transaction costs since storage costs, right?

1 Answer 1

11

The increase it by 375 + 375 * numberOfIndexedParameters + numberOfUnindexedBits.

For example:

event Event(uint16 indexed a, uint32 indexed b, uint64 c, uint128 d);
emit Event(1, 2, 3, 4);

The additional cost is 375 + 375 * 2 + 64 + 128.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.