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 ...@@ -212,7 +212,7 @@ contract OVM_L1CrossDomainMessenger is
_gasLimit _gasLimit
); );
emit SentMessage(xDomainCalldata); emit SentMessage(_target, _message, nonce, _gasLimit);
} }
/** /**
......
...@@ -18,11 +18,11 @@ interface iOVM_CanonicalTransactionChain { ...@@ -18,11 +18,11 @@ interface iOVM_CanonicalTransactionChain {
**********/ **********/
event TransactionEnqueued( event TransactionEnqueued(
address _l1TxOrigin, address indexed _l1TxOrigin,
address _target, address indexed _target,
uint256 _gasLimit, uint256 _gasLimit,
bytes _data, bytes _data,
uint256 _queueIndex, uint256 indexed _queueIndex,
uint256 _timestamp uint256 _timestamp
); );
......
...@@ -102,7 +102,7 @@ contract OVM_L2CrossDomainMessenger is ...@@ -102,7 +102,7 @@ contract OVM_L2CrossDomainMessenger is
sentMessages[keccak256(xDomainCalldata)] = true; sentMessages[keccak256(xDomainCalldata)] = true;
_sendXDomainMessage(xDomainCalldata, _gasLimit); _sendXDomainMessage(xDomainCalldata, _gasLimit);
emit SentMessage(xDomainCalldata); emit SentMessage(_target, _message, messageNonce, _gasLimit);
} }
/** /**
......
...@@ -11,9 +11,9 @@ interface iOVM_CrossDomainMessenger { ...@@ -11,9 +11,9 @@ interface iOVM_CrossDomainMessenger {
* Events * * Events *
**********/ **********/
event SentMessage(bytes message); event SentMessage(address indexed target, bytes message, uint256 messageNonce, uint256 gasLimit);
event RelayedMessage(bytes32 msgHash); event RelayedMessage(bytes32 indexed msgHash);
event FailedRelayedMessage(bytes32 msgHash); event FailedRelayedMessage(bytes32 indexed msgHash);
/************* /*************
......
...@@ -10,7 +10,7 @@ contract MockL2CrossDomainMessenger { ...@@ -10,7 +10,7 @@ contract MockL2CrossDomainMessenger {
uint256 messageNonce; uint256 messageNonce;
} }
event SentMessage(bytes message); event SentMessage(address indexed target, bytes message, uint256 messageNonce, uint256 gasLimit);
function emitSentMessageEvent( function emitSentMessageEvent(
MessageData memory _message MessageData memory _message
...@@ -18,13 +18,10 @@ contract MockL2CrossDomainMessenger { ...@@ -18,13 +18,10 @@ contract MockL2CrossDomainMessenger {
public public
{ {
emit SentMessage( emit SentMessage(
abi.encodeWithSignature(
"relayMessage(address,address,bytes,uint256)",
_message.target, _message.target,
_message.sender,
_message.message, _message.message,
_message.messageNonce _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