1

I did not write English well and used a translator. sorry :3

I would like to know the benefit of leaving data in the storage area rather than using the event log.

I know gas consumption has less log.

So when developing a smart contract, can not everything be an event log? I thought.

I would like to know what is essential to leave data in stroage.

thank you for reading.

1 Answer 1

1

You may use the blockchain to create a record. A log may be enough.

Contracts cannot read the log. So, if a contract needs to check a stored value, you need to store the value in a state variable.

Hope it helps.

1
  • thank you ! it`s very helpful ^^
    – YKH
    Commented Jul 11, 2019 at 7:35

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.