2

I have a function to emit event. When I check Ganache, I find that gas used is 23078. Doesn't the event consume less gas than function with contract state change operations?

function log() {
    CheckUserAccess("John_Wick","Create",false);
}

1 Answer 1

4

I don't know if i understood your question right, but 23078 gas is corresponding to 21000 standard gas price for a transaction + 2078 for calling the Event.

2078 gas is definitely less expensive than the gas normally used for a function call.

Your Answer

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

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