Commit 3b937854 authored by elenadimitrova's avatar elenadimitrova Committed by Kelvin Fichter

Improve events usability by indexing helpful params

parent 841d7851
......@@ -212,7 +212,7 @@ contract OVM_L1CrossDomainMessenger is
_gasLimit
);
emit SentMessage(xDomainCalldata);
emit SentMessage(_target, _message, nonce, _gasLimit);
}
/**
......
......@@ -18,11 +18,11 @@ interface iOVM_CanonicalTransactionChain {
**********/
event TransactionEnqueued(
address _l1TxOrigin,
address _target,
address indexed _l1TxOrigin,
address indexed _target,
uint256 _gasLimit,
bytes _data,
uint256 _queueIndex,
uint256 indexed _queueIndex,
uint256 _timestamp
);
......
......@@ -102,7 +102,7 @@ contract OVM_L2CrossDomainMessenger is
sentMessages[keccak256(xDomainCalldata)] = true;
_sendXDomainMessage(xDomainCalldata, _gasLimit);
emit SentMessage(xDomainCalldata);
emit SentMessage(_target, _message, messageNonce, _gasLimit);
}
/**
......
......@@ -11,9 +11,9 @@ interface iOVM_CrossDomainMessenger {
* Events *
**********/
event SentMessage(bytes message);
event RelayedMessage(bytes32 msgHash);
event FailedRelayedMessage(bytes32 msgHash);
event SentMessage(address indexed target, bytes message, uint256 messageNonce, uint256 gasLimit);
event RelayedMessage(bytes32 indexed msgHash);
event FailedRelayedMessage(bytes32 indexed msgHash);
/*************
......
......@@ -10,7 +10,7 @@ contract MockL2CrossDomainMessenger {
uint256 messageNonce;
}
event SentMessage(bytes message);
event SentMessage(address indexed target, bytes message, uint256 messageNonce, uint256 gasLimit);
function emitSentMessageEvent(
MessageData memory _message
......@@ -18,13 +18,10 @@ contract MockL2CrossDomainMessenger {
public
{
emit SentMessage(
abi.encodeWithSignature(
"relayMessage(address,address,bytes,uint256)",
_message.target,
_message.sender,
_message.message,
_message.messageNonce
)
_message.target,
_message.message,
_message.messageNonce,
0
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment