I want my contract to check that a claimed event was indeed logged.

Assuming I know how to follow a merkle path from a recent block and find the bit patterns of a log entry, how in solidity do I get the bit patterns from the claimed event object, so I may compare the two?

Also, how from the source code do I extract the topic and the bit pattern encoding, so I may do the same job from my client and server programs, outside of the contract itself?

PS: I suspect that at least part of the answer lies in the Solidity ABI Spec, but for the neophyte that I am, there is information or meta-information missing, such that I'm not sure how to interpret all that data. Examples and/or code would help.

1 Answer 1


Contracts have no access to what you refer to, they just emit events. Find more information in this article.

From outside of the contract, you can use web3 .

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.