Add custom error to CrossChainEnabledPolygonChild (#3380)

This commit is contained in:
Pascal Marco Caversaccio
2022-04-29 16:14:18 +02:00
committed by GitHub
parent fcf35e5722
commit be3cfa0f90
2 changed files with 3 additions and 2 deletions

View File

@ -63,10 +63,10 @@ abstract contract CrossChainEnabledPolygonChild is IFxMessageProcessor, CrossCha
address rootMessageSender,
bytes calldata data
) external override nonReentrant {
require(msg.sender == _fxChild, "unauthorized cross-chain relay");
if (!_isCrossChain()) revert NotCrossChainCall();
_sender = rootMessageSender;
Address.functionDelegateCall(address(this), data, "crosschain execution failled");
Address.functionDelegateCall(address(this), data, "cross-chain execution failed");
_sender = DEFAULT_SENDER;
}
}