@@ -8,7 +8,7 @@ import {IGatewayReceiver} from "../interfaces/IGatewayReceiver.sol";
8
8
contract GatewayReceiverMock is IGatewayReceiver {
9
9
address public immutable GATEWAY;
10
10
11
- event MessageReceived (bytes gatewayData , string srcChain , string srcAccount , bytes payload , bytes [] attributes );
11
+ event MessageReceived (bytes gatewayMessageKey , string source , string sender , bytes payload , bytes [] attributes );
12
12
13
13
constructor (address _gateway ) {
14
14
GATEWAY = _gateway;
@@ -19,28 +19,28 @@ contract GatewayReceiverMock is IGatewayReceiver {
19
19
}
20
20
21
21
function receiveMessage (
22
- address gatewayAddr ,
23
- bytes calldata gatewayData ,
24
- string calldata srcChain ,
25
- string calldata srcAccount ,
22
+ address gateway ,
23
+ bytes calldata gatewayMessageKey ,
24
+ string calldata source ,
25
+ string calldata sender ,
26
26
bytes calldata payload ,
27
27
bytes [] calldata attributes
28
28
) public payable {
29
29
if (isGateway (msg .sender )) {
30
30
// Active mode
31
31
// no extra check
32
- } else if (isGateway (gatewayAddr )) {
32
+ } else if (isGateway (gateway )) {
33
33
// Passive mode
34
- IGatewayDestinationPassive (gatewayAddr ).validateReceivedMessage (
35
- gatewayData ,
36
- srcChain ,
37
- srcAccount ,
34
+ IGatewayDestinationPassive (gateway ).validateReceivedMessage (
35
+ gatewayMessageKey ,
36
+ source ,
37
+ sender ,
38
38
payload,
39
39
attributes
40
40
);
41
41
} else {
42
42
revert ("invalid call " );
43
43
}
44
- emit MessageReceived (gatewayData, srcChain, srcAccount , payload, attributes);
44
+ emit MessageReceived (gatewayMessageKey, source, sender , payload, attributes);
45
45
}
46
46
}
0 commit comments