Skip to content

Timelock Event Indexing#


The ExecutedTransaction event has txHash indexed

event ExecuteTransaction(
    bytes32 indexed txHash,
    address indexed target,
    uint256 value,
    bytes data,
    uint256 eta

Indexed event parameters cost more gas, and as such should only be used if useful for search filtering.

The majority of the time ExecuteTransaction is emitted with a hard coded zero txHash.

emit ExecuteTransaction(0, target, value, callData, proposalEta);

Which is not particularly useful for search.


Remove indexed from txHash or remove txHash altogether. Alternatively, implement two different ExecuteTransaction events, one with indexing for timelock functionality and one without for proposals.