Can someone help me how to use events/logs for proof of publication? The way I understand it, I send a transaction with the metadata I want "proof of publication" for, to a contract. The contract does not update its state (ie. The metadata is not stored in its storage). But does there need to be anything in the contract to generate the log? Or is it easier to just aggregate all the transactions sent to that address and extract the metadata using the list of transactions?

I'm looking for the cheapest way (in gas) to log small bits of information and have it associated with a specific address/contract. Any help and suggestions are appreciated!

  • Can't you just include and event in the contract initilization methods ?
    – user697
    Feb 28 '16 at 22:15
  • @user697 can you?
    – Afr
    Feb 29 '16 at 8:59
  • I was considering updating the title to "Cheapest way to store a hash that's associated with a specific address/contract". What do you think OP?
    – eth
    Feb 29 '16 at 10:25
  • You don't even really need Events, you can just put the hash in the TX data. It would use slightly less gas, but would be more work to retrieve Apr 20 '16 at 20:23

Well then events would be the way to do it. Every time you run through those transactions in the chain then that log occurs. Events would be the best and most efficient way to run a proof of publication.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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